From 38d9a5e9baddba1f488f51dd2987459ddd5c7bd1 Mon Sep 17 00:00:00 2001 From: autosubmit Date: Tue, 4 Jul 2023 17:21:47 +0800 Subject: [PATCH] Auto Submit --- color.less | 26 +-- index.html | 2 +- ...ework__SubmitWork__index.d36ece65.async.js | 156 +++++++++--------- ...ion__Topics__Edit__index.64038857.async.js | 140 ++++++++-------- ...sync.js => p__Terminal__.4be2e7f8.async.js | 8 +- ...nc.js => p__tasks__index.a78d577f.async.js | 128 +++++++------- umi.44c7db5e.js => umi.e8857e1c.js | 2 +- 7 files changed, 231 insertions(+), 231 deletions(-) rename p__Terminal__.d36523fb.async.js => p__Terminal__.4be2e7f8.async.js (90%) rename p__tasks__index.1b37a4bd.async.js => p__tasks__index.a78d577f.async.js (86%) rename umi.44c7db5e.js => umi.e8857e1c.js (99%) diff --git a/color.less b/color.less index 351bc16aab..6be7753788 100644 --- a/color.less +++ b/color.less @@ -727,42 +727,42 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {color: @success-color;} .ant-form-item-has-warning .ant-form-item-explain, .ant-form-item-has-warning .ant-form-item-split {color: @warning-color;} .ant-form-item-has-warning .ant-input, .ant-form-item-has-warning .ant-input-affix-wrapper, .ant-form-item-has-warning .ant-input:hover, .ant-form-item-has-warning .ant-input-affix-wrapper:hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(137, 64, 204, 0.2);} +.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(24, 175, 184, 0.2);} .ant-form-item-has-warning .ant-input:not(.ant-form-item-has-warning .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper:not(.ant-form-item-has-warning .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(137, 64, 204, 0.2);} +.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(24, 175, 184, 0.2);} .ant-form-item-has-warning .ant-input-prefix {color: @warning-color;} .ant-form-item-has-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} .ant-form-item-has-warning .has-feedback {color: @warning-color;} .ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {color: @warning-color;} .ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @warning-color !important;} -.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(137, 64, 204, 0.2);} +.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(24, 175, 184, 0.2);} .ant-form-item-has-warning .ant-input-number, .ant-form-item-has-warning .ant-picker {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(137, 64, 204, 0.2);} +.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(24, 175, 184, 0.2);} .ant-form-item-has-warning .ant-input-number:not([disabled]):hover, .ant-form-item-has-warning .ant-picker:not([disabled]):hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(137, 64, 204, 0.2);} +.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(24, 175, 184, 0.2);} .ant-form-item-has-error .ant-form-item-explain, .ant-form-item-has-error .ant-form-item-split {color: @error-color;} .ant-form-item-has-error .ant-input, .ant-form-item-has-error .ant-input-affix-wrapper, .ant-form-item-has-error .ant-input:hover, .ant-form-item-has-error .ant-input-affix-wrapper:hover {border-color: @error-color;} -.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} +.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} .ant-form-item-has-error .ant-input:not(.ant-form-item-has-error .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper:not(.ant-form-item-has-error .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} +.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} .ant-form-item-has-error .ant-input-prefix {color: @error-color;} .ant-form-item-has-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-form-item-has-error .has-feedback {color: @error-color;} .ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {color: @error-color;} .ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @error-color !important;} -.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} +.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} .ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {border: 0;} .ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {border-color: @error-color;} .ant-form-item-has-error .ant-input-number, .ant-form-item-has-error .ant-picker {border-color: @error-color;} -.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} +.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} .ant-form-item-has-error .ant-input-number:not([disabled]):hover, .ant-form-item-has-error .ant-picker:not([disabled]):hover {border-color: @error-color;} .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {border-color: @error-color;} -.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} -.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(202, 181, 138, 0.2);} +.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} +.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(45, 230, 199, 0.2);} .ant-form-item-has-error .ant-transfer-list {border-color: @error-color;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {border-color: @border-color-base;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px !important;} @@ -1457,9 +1457,9 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} -.ant-tag-pink {color: #eb2f96;background: #fff0f6;border-color: #ffadd2;} +.ant-tag-pink {color: #eb2f96;background: color(~`colorPalette("@{modal-heading-color}", 1)`);border-color: #ffadd2;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-magenta {color: #eb2f96;background: #fff0f6;border-color: #ffadd2;} +.ant-tag-magenta {color: #eb2f96;background: color(~`colorPalette("@{modal-heading-color}", 1)`);border-color: #ffadd2;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-red {color: #f5222d;background: #fff1f0;border-color: #ffa39e;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} diff --git a/index.html b/index.html index 130a233627..a3ac8db8ca 100644 --- a/index.html +++ b/index.html @@ -149,6 +149,6 @@ - + diff --git a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.d36ece65.async.js b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.d36ece65.async.js index adabd1a3f0..2185a1771c 100644 --- a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.d36ece65.async.js +++ b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.d36ece65.async.js @@ -1,11 +1,11 @@ (window.webpackJsonp=window.webpackJsonp||[]).push([[54,5,6,7],{"+NIl":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";ie.defineMode("stex",function(J,P){"use strict";function X(h,u){h.cmdState.push(u)}function j(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function U(h){var u=h.cmdState.pop();u&&u.closeBracket()}function K(h){for(var u=h.cmdState,f=u.length-1;f>=0;f--){var l=u[f];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function G(h,u,f){return function(){this.name=h,this.bracketNo=0,this.style=u,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=G("importmodule","tag",["string","builtin"]),r.documentclass=G("documentclass","tag",["","atom"]),r.usepackage=G("usepackage","tag",["atom"]),r.begin=G("begin","tag",["atom"]),r.end=G("end","tag",["atom"]),r.label=G("label","tag",["atom"]),r.ref=G("ref","tag",["atom"]),r.eqref=G("eqref","tag",["atom"]),r.cite=G("cite","tag",["atom"]),r.bibitem=G("bibitem","tag",["atom"]),r.Bibitem=G("Bibitem","tag",["atom"]),r.RBibitem=G("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function L(h,u){h.f=u}function v(h,u){var f;if(h.match(/^\\[a-zA-Z@]+/)){var l=h.current().slice(1);return f=r.hasOwnProperty(l)?r[l]:r.DEFAULT,f=new f,X(u,f),L(u,p),f.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return L(u,function(s,a){return m(s,a,"\\]")}),"keyword";if(h.match("\\("))return L(u,function(s,a){return m(s,a,"\\)")}),"keyword";if(h.match("$$"))return L(u,function(s,a){return m(s,a,"$$")}),"keyword";if(h.match("$"))return L(u,function(s,a){return m(s,a,"$")}),"keyword";var o=h.next();if(o=="%")return h.skipToEnd(),"comment";if(o=="}"||o=="]"){if(f=j(u),f)f.closeBracket(o),L(u,p);else return"error";return"bracket"}else return o=="{"||o=="["?(f=r.DEFAULT,f=new f,X(u,f),"bracket"):/\d/.test(o)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),f=K(u),f.name=="begin"&&(f.argument=h.current()),f.styleIdentifier())}function m(h,u,f){if(h.eatSpace())return null;if(f&&h.match(f))return L(u,v),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=h.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(h.skipToEnd(),"comment"):"error"}function p(h,u){var f=h.peek(),l;return f=="{"||f=="["?(l=j(u),l.openBracket(f),h.eat(f),L(u,v),"bracket"):/[ \t\r]/.test(f)?(h.eat(f),null):(L(u,v),U(u),v(h,u))}return{startState:function(){var h=P.inMathMode?function(u,f){return m(u,f)}:v;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,u){return u.f(h,u)},blankLine:function(h){h.f=v,h.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},"+ua5":function(rt,be,Z){},"/cxE":function(rt,be,Z){"use strict";Z.d(be,"f",function(){return P}),Z.d(be,"g",function(){return X}),Z.d(be,"h",function(){return j}),Z.d(be,"e",function(){return K}),Z.d(be,"b",function(){return G}),Z.d(be,"c",function(){return r}),Z.d(be,"d",function(){return L}),Z.d(be,"a",function(){return v});class ie{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+` -`+m.stack):m},0)}}emit(m){this.listeners.forEach(p=>{p(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const J=new ie;function P(m){K(m)||J.onUnexpectedError(m);return}function X(m){K(m)||J.onUnexpectedExternalError(m);return}function j(m){if(m instanceof Error){let{name:p,message:h}=m;const u=m.stacktrace||m.stack;return{$isError:!0,name:p,message:h,stack:u}}return m}const U="Canceled";function K(m){return m instanceof Error&&m.name===U&&m.message===U}function G(){const m=new Error(U);return m.name=m.message,m}function r(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function L(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class v extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){ie.defineOption("placeholder","",function(G,r,L){var v=L&&L!=ie.Init;if(r&&!v)G.on("blur",j),G.on("change",U),G.on("swapDoc",U),ie.on(G.getInputField(),"compositionupdate",G.state.placeholderCompose=function(){X(G)}),U(G);else if(!r&&v){G.off("blur",j),G.off("change",U),G.off("swapDoc",U),ie.off(G.getInputField(),"compositionupdate",G.state.placeholderCompose),J(G);var m=G.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}r&&!G.hasFocus()&&j(G)});function J(G){G.state.placeholder&&(G.state.placeholder.parentNode.removeChild(G.state.placeholder),G.state.placeholder=null)}function P(G){J(G);var r=G.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=G.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var L=G.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),r.appendChild(L),G.display.lineSpace.insertBefore(r,G.display.lineSpace.firstChild)}function X(G){setTimeout(function(){var r=!1,L=G.getInputField();L.nodeName=="TEXTAREA"?r=!L.value:G.lineCount()==1&&(r=!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)),r?P(G):J(G)},20)}function j(G){K(G)&&P(G)}function U(G){var r=G.getWrapperElement(),L=K(G);r.className=r.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?P(G):J(G)}function K(G){return G.lineCount()===1&&G.getLine(0)===""}})},"1eCo":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";var J={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(X,j){var U=X.indentUnit,K={},G=j.htmlMode?J:P;for(var r in G)K[r]=G[r];for(var r in j)K[r]=j[r];var L,v;function m(c,S){function y(F){return S.tokenize=F,F(c,S)}var b=c.next();if(b=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?y(u("atom","]]>")):null:c.match("--")?y(u("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),y(f(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),S.tokenize=u("meta","?>"),"meta"):(L=c.eat("/")?"closeTag":"openTag",S.tokenize=p,"tag bracket");if(b=="&"){var B;return c.eat("#")?c.eat("x")?B=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):B=c.eatWhile(/[\d]/)&&c.eat(";"):B=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),B?"atom":"error"}else return c.eatWhile(/[^&<]/),null}m.isInText=!0;function p(c,S){var y=c.next();if(y==">"||y=="/"&&c.eat(">"))return S.tokenize=m,L=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return L="equals",null;if(y=="<"){S.tokenize=m,S.state=a,S.tagName=S.tagStart=null;var b=S.tokenize(c,S);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(y)?(S.tokenize=h(y),S.stringStartCol=c.column(),S.tokenize(c,S)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(c){var S=function(y,b){for(;!y.eol();)if(y.next()==c){b.tokenize=p;break}return"string"};return S.isInAttribute=!0,S}function u(c,S){return function(y,b){for(;!y.eol();){if(y.match(S)){b.tokenize=m;break}y.next()}return c}}function f(c){return function(S,y){for(var b;(b=S.next())!=null;){if(b=="<")return y.tokenize=f(c+1),y.tokenize(S,y);if(b==">")if(c==1){y.tokenize=m;break}else return y.tokenize=f(c-1),y.tokenize(S,y)}return"meta"}}function l(c,S,y){this.prev=c.context,this.tagName=S,this.indent=c.indented,this.startOfLine=y,(K.doNotIndent.hasOwnProperty(S)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function o(c){c.context&&(c.context=c.context.prev)}function s(c,S){for(var y;;){if(!c.context)return;if(y=c.context.tagName,!K.contextGrabbers.hasOwnProperty(y)||!K.contextGrabbers[y].hasOwnProperty(S))return;o(c)}}function a(c,S,y){return c=="openTag"?(y.tagStart=S.column(),O):c=="closeTag"?E:a}function O(c,S,y){return c=="word"?(y.tagName=S.current(),v="tag",R):K.allowMissingTagName&&c=="endTag"?(v="tag bracket",R(c,S,y)):(v="error",O)}function E(c,S,y){if(c=="word"){var b=S.current();return y.context&&y.context.tagName!=b&&K.implicitlyClosed.hasOwnProperty(y.context.tagName)&&o(y),y.context&&y.context.tagName==b||K.matchClosing===!1?(v="tag",w):(v="tag error",D)}else return K.allowMissingTagName&&c=="endTag"?(v="tag bracket",w(c,S,y)):(v="error",D)}function w(c,S,y){return c!="endTag"?(v="error",w):(o(y),a)}function D(c,S,y){return v="error",w(c,S,y)}function R(c,S,y){if(c=="word")return v="attribute",A;if(c=="endTag"||c=="selfcloseTag"){var b=y.tagName,B=y.tagStart;return y.tagName=y.tagStart=null,c=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(b)?s(y,b):(s(y,b),y.context=new l(y,b,B==y.indented)),a}return v="error",R}function A(c,S,y){return c=="equals"?C:(K.allowMissing||(v="error"),R(c,S,y))}function C(c,S,y){return c=="string"?T:c=="word"&&K.allowUnquoted?(v="string",R):(v="error",R(c,S,y))}function T(c,S,y){return c=="string"?T:R(c,S,y)}return{startState:function(c){var S={tokenize:m,state:a,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(S.baseIndent=c),S},token:function(c,S){if(!S.tagName&&c.sol()&&(S.indented=c.indentation()),c.eatSpace())return null;L=null;var y=S.tokenize(c,S);return(y||L)&&y!="comment"&&(v=null,S.state=S.state(L||y,c,S),v&&(y=v=="error"?y+" error":v)),y},indent:function(c,S,y){var b=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+U;if(b&&b.noIndent)return ie.Pass;if(c.tokenize!=p&&c.tokenize!=m)return y?y.match(/^(\s*)/)[0].length:0;if(c.tagName)return K.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+U*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/$/,blockCommentStart:"",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(c){c.state==C&&(c.state=R)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var S=[],y=c.context;y;y=y.prev)y.tagName&&S.push(y.tagName);return S.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});class ie{constructor(P){this.element=P,this.next=ie.Undefined,this.prev=ie.Undefined}}ie.Undefined=new ie(void 0);class J{constructor(){this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ie.Undefined}clear(){let P=this._first;for(;P!==ie.Undefined;){const X=P.next;P.prev=ie.Undefined,P.next=ie.Undefined,P=X}this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,X){const j=new ie(P);if(this._first===ie.Undefined)this._first=j,this._last=j;else if(X){const K=this._last;this._last=j,j.prev=K,K.next=j}else{const K=this._first;this._first=j,j.next=K,K.prev=j}this._size+=1;let U=!1;return()=>{U||(U=!0,this._remove(j))}}shift(){if(this._first===ie.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===ie.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==ie.Undefined&&P.next!==ie.Undefined){const X=P.prev;X.next=P.next,P.next.prev=X}else P.prev===ie.Undefined&&P.next===ie.Undefined?(this._first=ie.Undefined,this._last=ie.Undefined):P.next===ie.Undefined?(this._last=this._last.prev,this._last.next=ie.Undefined):P.prev===ie.Undefined&&(this._first=this._first.next,this._first.prev=ie.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==ie.Undefined;)yield P.element,P=P.next}}},"3/fG":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});function ie(P,X){let j;return X.length===0?j=P:j=P.replace(/\{(\d+)\}/g,function(U,K){const G=K[0];return typeof X[G]!="undefined"?X[G]:U}),j}function J(P,X,...j){return ie(X,j)}},"500L":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return E});var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("2qtc"),X=Z("kLXV"),j=Z("9og8"),U=Z("k1fw"),K=Z("miYZ"),G=Z("tsqr"),r=Z("oBTY"),L=Z("tJVT"),v=Z("DZo9"),m=Z("8z0m"),p=Z("WmNS"),h=Z.n(p),u=Z("q1tI"),f=Z.n(u),l=Z("m3rI"),o=Z("wzkS"),s=Z("y5JW"),a=Z("LtfV"),O=m.a.Dragger;function E(w){var D=[];return w&&w.length>0&&(D=w.map(function(R){return{uid:R.id,id:R.id,name:R.title+s.c+R.filesize,url:R.url,filesize:R.filesize,status:"done",response:{id:R.id}}})),D}be.b=function(w){var D=w.value,R=w.onChange,A=w.action,C=w.className,T=w.maxSize,c=T===void 0?150:T,S=w.title,y=S===void 0?"\u4E0A\u4F20\u9644\u4EF6":S,b=w.showRemoveModal,B=b===void 0?!1:b,F=w.accept,_=F===void 0?"":F,M=w.additionalText,I=w.isDragger,g=w.number,H=g===void 0?1e3:g,$=w.aloneClear,ne=$===void 0?!1:$,se=Object(u.useState)(!1),Oe=Object(L.a)(se,2),ge=Oe[0],Te=Oe[1],Re=Object(u.useState)(D||[]),Le=Object(L.a)(Re,2),de=Le[0],he=Le[1];Object(u.useEffect)(function(){D&&(he(Object(r.a)(D)),H===(D==null?void 0:D.length)&&Te(!0))},[D]);var re=function(){setTimeout(function(){de.pop(),he(Object(r.a)(de))},500)},fe={multiple:!0,disabled:ge,accept:_,withCredentials:!0,fileList:de,beforeUpload:function(Fe,Ce){var Ne=Fe.size/1024/1024;return de.concat(Ce).length>H?(de.pop(),he(Object(r.a)(de)),G.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(H,"\u4E2A\u6587\u4EF6")),ne?Promise.reject():(re(),!1)):!0},action:A||"".concat(l.a.API_SERVER,"/api/attachments.json"),onChange:function(Fe){var Ce,Ne,Be=Object(r.a)(Fe.fileList);if(Fe.file.status==="done"&&((Ce=Fe.file)===null||Ce===void 0||((Ne=Ce.response)===null||Ne===void 0)?void 0:Ne.status)===-1){var le,ve;G.b.error((le=Fe.file)===null||le===void 0||((ve=le.response)===null||ve===void 0)?void 0:ve.message);return}Be.length>=H?Te(!0):Te(!1),he(Object(r.a)(Be)),Be=Be.map(function(Se){var Ie;if(Se!=null&&(Ie=Se.response)!==null&&Ie!==void 0&&Ie.id){var We;Se.url="/api/attachments/".concat(Se==null||((We=Se.response)===null||We===void 0)?void 0:We.id)}return Se.name.indexOf(s.c)===-1&&(Se.name="".concat(Se.name).concat(s.c).concat(Object(s.a)(Se.size))),Object(U.a)({},Se)}),console.log("info:",Fe),R(Be)},onRemove:function(){var De=Object(j.a)(h.a.mark(function Ce(Ne){var Be;return h.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(Be=function(){var Se=Object(j.a)(h.a.mark(function Ie(){var We,Ve;return h.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(We=Ne.response?Ne.response.id:Ne.id,!We){Je.next=8;break}return Je.next=4,Object(o.d)(Ne.response?Ne.response.id:Ne.uid);case 4:return Ve=Je.sent,Je.abrupt("return",Ve);case 8:return Je.abrupt("return",!0);case 9:case"end":return Je.stop()}},Ie)}));return function(){return Se.apply(this,arguments)}}(),!B){ve.next=5;break}return ve.abrupt("return",new Promise(function(Se,Ie){X.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:f.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var We=Object(j.a)(h.a.mark(function Qe(){var Je;return h.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Be();case 2:Je=qe.sent,G.b.success("\u5220\u9664\u6210\u529F"),Se(!0);case 5:case"end":return qe.stop()}},Qe)}));function Ve(){return We.apply(this,arguments)}return Ve}(),onCancel:function(){return Se(!1)}})}));case 5:return ve.next=7,Be();case 7:return ve.abrupt("return",ve.sent);case 8:case"end":return ve.stop()}},Ce)}));function Fe(Ce){return De.apply(this,arguments)}return Fe}()};function oe(De){De.preventDefault(),De.stopPropagation()}return f.a.createElement("div",{className:"multi-upload ".concat(C||"")},I&&f.a.createElement(O,fe,f.a.createElement("p",{className:"ant-upload-drag-icon"},f.a.createElement(a.a,null)),f.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",f.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",c,"MB)"," "),M),!I&&f.a.createElement(m.a,fe,f.a.createElement(J.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:f.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:ge},y),f.a.createElement("span",{onClick:oe,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",c,"MB)"," ")))}},"55Ip":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return s});var ie=Z("Ty5D"),J=Z("dI71"),P=Z("q1tI"),X=Z.n(P),j=Z("YS25"),U=Z("17x9"),K=Z.n(U),G=Z("wx14"),r=Z("zLVn"),L=Z("9R94"),v=function(C){Object(J.a)(T,C);function T(){for(var S,y=arguments.length,b=new Array(y),B=0;B{p(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const J=new ie;function P(m){K(m)||J.onUnexpectedError(m);return}function X(m){K(m)||J.onUnexpectedExternalError(m);return}function j(m){if(m instanceof Error){let{name:p,message:h}=m;const u=m.stacktrace||m.stack;return{$isError:!0,name:p,message:h,stack:u}}return m}const U="Canceled";function K(m){return m instanceof Error&&m.name===U&&m.message===U}function G(){const m=new Error(U);return m.name=m.message,m}function r(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function L(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class v extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){ie.defineOption("placeholder","",function(G,r,L){var v=L&&L!=ie.Init;if(r&&!v)G.on("blur",j),G.on("change",U),G.on("swapDoc",U),ie.on(G.getInputField(),"compositionupdate",G.state.placeholderCompose=function(){X(G)}),U(G);else if(!r&&v){G.off("blur",j),G.off("change",U),G.off("swapDoc",U),ie.off(G.getInputField(),"compositionupdate",G.state.placeholderCompose),J(G);var m=G.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}r&&!G.hasFocus()&&j(G)});function J(G){G.state.placeholder&&(G.state.placeholder.parentNode.removeChild(G.state.placeholder),G.state.placeholder=null)}function P(G){J(G);var r=G.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=G.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var L=G.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),r.appendChild(L),G.display.lineSpace.insertBefore(r,G.display.lineSpace.firstChild)}function X(G){setTimeout(function(){var r=!1,L=G.getInputField();L.nodeName=="TEXTAREA"?r=!L.value:G.lineCount()==1&&(r=!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)),r?P(G):J(G)},20)}function j(G){K(G)&&P(G)}function U(G){var r=G.getWrapperElement(),L=K(G);r.className=r.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?P(G):J(G)}function K(G){return G.lineCount()===1&&G.getLine(0)===""}})},"1eCo":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";var J={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(X,j){var U=X.indentUnit,K={},G=j.htmlMode?J:P;for(var r in G)K[r]=G[r];for(var r in j)K[r]=j[r];var L,v;function m(d,S){function y(F){return S.tokenize=F,F(d,S)}var b=d.next();if(b=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?y(u("atom","]]>")):null:d.match("--")?y(u("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),y(f(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=u("meta","?>"),"meta"):(L=d.eat("/")?"closeTag":"openTag",S.tokenize=p,"tag bracket");if(b=="&"){var B;return d.eat("#")?d.eat("x")?B=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):B=d.eatWhile(/[\d]/)&&d.eat(";"):B=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),B?"atom":"error"}else return d.eatWhile(/[^&<]/),null}m.isInText=!0;function p(d,S){var y=d.next();if(y==">"||y=="/"&&d.eat(">"))return S.tokenize=m,L=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return L="equals",null;if(y=="<"){S.tokenize=m,S.state=a,S.tagName=S.tagStart=null;var b=S.tokenize(d,S);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(y)?(S.tokenize=h(y),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(d){var S=function(y,b){for(;!y.eol();)if(y.next()==d){b.tokenize=p;break}return"string"};return S.isInAttribute=!0,S}function u(d,S){return function(y,b){for(;!y.eol();){if(y.match(S)){b.tokenize=m;break}y.next()}return d}}function f(d){return function(S,y){for(var b;(b=S.next())!=null;){if(b=="<")return y.tokenize=f(d+1),y.tokenize(S,y);if(b==">")if(d==1){y.tokenize=m;break}else return y.tokenize=f(d-1),y.tokenize(S,y)}return"meta"}}function l(d,S,y){this.prev=d.context,this.tagName=S,this.indent=d.indented,this.startOfLine=y,(K.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function o(d){d.context&&(d.context=d.context.prev)}function s(d,S){for(var y;;){if(!d.context)return;if(y=d.context.tagName,!K.contextGrabbers.hasOwnProperty(y)||!K.contextGrabbers[y].hasOwnProperty(S))return;o(d)}}function a(d,S,y){return d=="openTag"?(y.tagStart=S.column(),O):d=="closeTag"?E:a}function O(d,S,y){return d=="word"?(y.tagName=S.current(),v="tag",R):K.allowMissingTagName&&d=="endTag"?(v="tag bracket",R(d,S,y)):(v="error",O)}function E(d,S,y){if(d=="word"){var b=S.current();return y.context&&y.context.tagName!=b&&K.implicitlyClosed.hasOwnProperty(y.context.tagName)&&o(y),y.context&&y.context.tagName==b||K.matchClosing===!1?(v="tag",w):(v="tag error",D)}else return K.allowMissingTagName&&d=="endTag"?(v="tag bracket",w(d,S,y)):(v="error",D)}function w(d,S,y){return d!="endTag"?(v="error",w):(o(y),a)}function D(d,S,y){return v="error",w(d,S,y)}function R(d,S,y){if(d=="word")return v="attribute",A;if(d=="endTag"||d=="selfcloseTag"){var b=y.tagName,B=y.tagStart;return y.tagName=y.tagStart=null,d=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(b)?s(y,b):(s(y,b),y.context=new l(y,b,B==y.indented)),a}return v="error",R}function A(d,S,y){return d=="equals"?C:(K.allowMissing||(v="error"),R(d,S,y))}function C(d,S,y){return d=="string"?T:d=="word"&&K.allowUnquoted?(v="string",R):(v="error",R(d,S,y))}function T(d,S,y){return d=="string"?T:R(d,S,y)}return{startState:function(d){var S={tokenize:m,state:a,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;L=null;var y=S.tokenize(d,S);return(y||L)&&y!="comment"&&(v=null,S.state=S.state(L||y,d,S),v&&(y=v=="error"?y+" error":v)),y},indent:function(d,S,y){var b=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+U;if(b&&b.noIndent)return ie.Pass;if(d.tokenize!=p&&d.tokenize!=m)return y?y.match(/^(\s*)/)[0].length:0;if(d.tagName)return K.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+U*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/$/,blockCommentStart:"",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(d){d.state==C&&(d.state=R)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],y=d.context;y;y=y.prev)y.tagName&&S.push(y.tagName);return S.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});class ie{constructor(P){this.element=P,this.next=ie.Undefined,this.prev=ie.Undefined}}ie.Undefined=new ie(void 0);class J{constructor(){this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ie.Undefined}clear(){let P=this._first;for(;P!==ie.Undefined;){const X=P.next;P.prev=ie.Undefined,P.next=ie.Undefined,P=X}this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,X){const j=new ie(P);if(this._first===ie.Undefined)this._first=j,this._last=j;else if(X){const K=this._last;this._last=j,j.prev=K,K.next=j}else{const K=this._first;this._first=j,j.next=K,K.prev=j}this._size+=1;let U=!1;return()=>{U||(U=!0,this._remove(j))}}shift(){if(this._first===ie.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===ie.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==ie.Undefined&&P.next!==ie.Undefined){const X=P.prev;X.next=P.next,P.next.prev=X}else P.prev===ie.Undefined&&P.next===ie.Undefined?(this._first=ie.Undefined,this._last=ie.Undefined):P.next===ie.Undefined?(this._last=this._last.prev,this._last.next=ie.Undefined):P.prev===ie.Undefined&&(this._first=this._first.next,this._first.prev=ie.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==ie.Undefined;)yield P.element,P=P.next}}},"3/fG":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});function ie(P,X){let j;return X.length===0?j=P:j=P.replace(/\{(\d+)\}/g,function(U,K){const G=K[0];return typeof X[G]!="undefined"?X[G]:U}),j}function J(P,X,...j){return ie(X,j)}},"500L":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return E});var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("2qtc"),X=Z("kLXV"),j=Z("9og8"),U=Z("k1fw"),K=Z("miYZ"),G=Z("tsqr"),r=Z("oBTY"),L=Z("tJVT"),v=Z("DZo9"),m=Z("8z0m"),p=Z("WmNS"),h=Z.n(p),u=Z("q1tI"),f=Z.n(u),l=Z("m3rI"),o=Z("wzkS"),s=Z("y5JW"),a=Z("LtfV"),O=m.a.Dragger;function E(w){var D=[];return w&&w.length>0&&(D=w.map(function(R){return{uid:R.id,id:R.id,name:R.title+s.c+R.filesize,url:R.url,filesize:R.filesize,status:"done",response:{id:R.id}}})),D}be.b=function(w){var D=w.value,R=w.onChange,A=w.action,C=w.className,T=w.maxSize,d=T===void 0?150:T,S=w.title,y=S===void 0?"\u4E0A\u4F20\u9644\u4EF6":S,b=w.showRemoveModal,B=b===void 0?!1:b,F=w.accept,_=F===void 0?"":F,M=w.additionalText,I=w.isDragger,g=w.number,H=g===void 0?1e3:g,$=w.aloneClear,ne=$===void 0?!1:$,se=Object(u.useState)(!1),Oe=Object(L.a)(se,2),ge=Oe[0],Te=Oe[1],Re=Object(u.useState)(D||[]),Le=Object(L.a)(Re,2),ce=Le[0],he=Le[1];Object(u.useEffect)(function(){D&&(he(Object(r.a)(D)),H===(D==null?void 0:D.length)&&Te(!0))},[D]);var re=function(){setTimeout(function(){ce.pop(),he(Object(r.a)(ce))},500)},fe={multiple:!0,disabled:ge,accept:_,withCredentials:!0,fileList:ce,beforeUpload:function(Fe,Ce){var Ne=Fe.size/1024/1024;return ce.concat(Ce).length>H?(ce.pop(),he(Object(r.a)(ce)),G.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(H,"\u4E2A\u6587\u4EF6")),ne?Promise.reject():(re(),!1)):!0},action:A||"".concat(l.a.API_SERVER,"/api/attachments.json"),onChange:function(Fe){var Ce,Ne,Be=Object(r.a)(Fe.fileList);if(Fe.file.status==="done"&&((Ce=Fe.file)===null||Ce===void 0||((Ne=Ce.response)===null||Ne===void 0)?void 0:Ne.status)===-1){var le,ve;G.b.error((le=Fe.file)===null||le===void 0||((ve=le.response)===null||ve===void 0)?void 0:ve.message);return}Be.length>=H?Te(!0):Te(!1),he(Object(r.a)(Be)),Be=Be.map(function(Se){var Ie;if(Se!=null&&(Ie=Se.response)!==null&&Ie!==void 0&&Ie.id){var We;Se.url="/api/attachments/".concat(Se==null||((We=Se.response)===null||We===void 0)?void 0:We.id)}return Se.name.indexOf(s.c)===-1&&(Se.name="".concat(Se.name).concat(s.c).concat(Object(s.a)(Se.size))),Object(U.a)({},Se)}),console.log("info:",Fe),R(Be)},onRemove:function(){var De=Object(j.a)(h.a.mark(function Ce(Ne){var Be;return h.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(Be=function(){var Se=Object(j.a)(h.a.mark(function Ie(){var We,Ve;return h.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(We=Ne.response?Ne.response.id:Ne.id,!We){Je.next=8;break}return Je.next=4,Object(o.d)(Ne.response?Ne.response.id:Ne.uid);case 4:return Ve=Je.sent,Je.abrupt("return",Ve);case 8:return Je.abrupt("return",!0);case 9:case"end":return Je.stop()}},Ie)}));return function(){return Se.apply(this,arguments)}}(),!B){ve.next=5;break}return ve.abrupt("return",new Promise(function(Se,Ie){X.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:f.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var We=Object(j.a)(h.a.mark(function Qe(){var Je;return h.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Be();case 2:Je=qe.sent,G.b.success("\u5220\u9664\u6210\u529F"),Se(!0);case 5:case"end":return qe.stop()}},Qe)}));function Ve(){return We.apply(this,arguments)}return Ve}(),onCancel:function(){return Se(!1)}})}));case 5:return ve.next=7,Be();case 7:return ve.abrupt("return",ve.sent);case 8:case"end":return ve.stop()}},Ce)}));function Fe(Ce){return De.apply(this,arguments)}return Fe}()};function oe(De){De.preventDefault(),De.stopPropagation()}return f.a.createElement("div",{className:"multi-upload ".concat(C||"")},I&&f.a.createElement(O,fe,f.a.createElement("p",{className:"ant-upload-drag-icon"},f.a.createElement(a.a,null)),f.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",f.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",d,"MB)"," "),M),!I&&f.a.createElement(m.a,fe,f.a.createElement(J.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:f.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:ge},y),f.a.createElement("span",{onClick:oe,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",d,"MB)"," ")))}},"55Ip":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return s});var ie=Z("Ty5D"),J=Z("dI71"),P=Z("q1tI"),X=Z.n(P),j=Z("YS25"),U=Z("17x9"),K=Z.n(U),G=Z("wx14"),r=Z("zLVn"),L=Z("9R94"),v=function(C){Object(J.a)(T,C);function T(){for(var S,y=arguments.length,b=new Array(y),B=0;B$&&($=g.line_indent_level));var ne={mode:H,parent:g,last_token:g?g.last_token:new p(s.START_BLOCK,""),last_word:g?g.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:g?g.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},M.prototype._reset=function(g){var H=g.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var $=new f(g,this._options);return this._tokens=$.tokenize(),g},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g,H=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=` -`,H&&h.lineBreak.test(H||"")&&($=H.match(h.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return g=this._output.get_code($),g},M.prototype.handle_token=function(g,H){g.type===s.START_EXPR?this.handle_start_expr(g):g.type===s.END_EXPR?this.handle_end_expr(g):g.type===s.START_BLOCK?this.handle_start_block(g):g.type===s.END_BLOCK?this.handle_end_block(g):g.type===s.WORD?this.handle_word(g):g.type===s.RESERVED?this.handle_word(g):g.type===s.SEMICOLON?this.handle_semicolon(g):g.type===s.STRING?this.handle_string(g):g.type===s.EQUALS?this.handle_equals(g):g.type===s.OPERATOR?this.handle_operator(g):g.type===s.COMMA?this.handle_comma(g):g.type===s.BLOCK_COMMENT?this.handle_block_comment(g,H):g.type===s.COMMENT?this.handle_comment(g,H):g.type===s.DOT?this.handle_dot(g):g.type===s.EOF?this.handle_eof(g):g.type===s.UNKNOWN?this.handle_unknown(g,H):this.handle_unknown(g,H)},M.prototype.handle_whitespace_and_comments=function(g,H){var $=g.newlines,ne=this._options.keep_array_indentation&&b(this._flags.mode);if(g.comments_before)for(var se=g.comments_before.next();se;)this.handle_whitespace_and_comments(se,H),this.handle_token(se,H),se=g.comments_before.next();if(ne)for(var Oe=0;Oe<$;Oe+=1)this.print_newline(Oe>0,H);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,H);for(var ge=1;ge<$;ge+=1)this.print_newline(!0,H)}};var I=["async","break","continue","return","throw","yield"];M.prototype.allow_wrap_or_preserved_newline=function(g,H){if(H=H===void 0?!1:H,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&g.newlines||H,ne=a(this._flags.last_token.text,o)||a(g.text,o);if(ne){var se=a(this._flags.last_token.text,o)&&a(this._options.operator_position,T)||a(g.text,o);$=$&&se}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,I))return;this._output.set_wrap_point()}},M.prototype.print_newline=function(g,H){if(!H&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&w($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(g)&&(this._flags.multiline_frame=!0)},M.prototype.print_token_line_indentation=function(g){this._output.just_added_newline()&&(this._options.keep_array_indentation&&g.newlines&&(g.text==="["||b(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(g.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},M.prototype.print_token=function(g){if(this._output.raw){this._output.add_raw_token(g);return}if(this._options.comma_first&&g.previous&&g.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(g),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(g),this._output.non_breaking_space=!0,this._output.add_token(g.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},M.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.set_mode=function(g){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,g),this._flags=this.create_flags(this._previous_flags,g),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&S(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(g){var H=!1;return H=H||D(this._flags.last_token,["var","let","const"])&&g.type===s.WORD,H=H||w(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&D(this._flags.last_token,I)&&!g.newlines,H=H||w(this._flags.last_token,"else")&&!(w(g,"if")&&!g.comments_before),H=H||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),H=H||this._flags.last_token.type===s.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(g.text==="--"||g.text==="++")&&this._last_last_text!=="function"&&g.type!==s.WORD&&g.type!==s.RESERVED,H=H||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),H?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(g,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g,D(g,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g);var H=c.Expression;if(g.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(g),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=c.ArrayLiteral,b(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),a(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=c.ForInitializer):a(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=c.Conditional):a(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&g.whitespace_before===""?this._output.space_before_token=!1:(a(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var ne=this._tokens.peek(-4);D($,["async","function"])||$.text==="*"&&D(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(ne.text==="{"||ne.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(g);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&a(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(g,g.newlines),this.print_token(g),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(g){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(g,g.text==="]"&&b(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(g),this.restore_mode(),S(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(g){this.handle_whitespace_and_comments(g);var H=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):$&&(a($.text,[":",","])&&a(H.type,[s.STRING,s.WORD,s.RESERVED])||a(H.text,["get","set","..."])&&a($.type,[s.WORD,s.RESERVED]))?a(this._last_last_text,["class","interface"])&&!a($.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):a(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!H.comments_before&&H.text==="}",se=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,ge=null;this._flags.inline_frame=!0;do if(Oe+=1,ge=this._tokens.peek(Oe-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==s.EOF&&!(ge.type===s.END_BLOCK&&ge.opened===g))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(se||this._flags.last_token.type===s.EQUALS||D(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(b(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(g),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(g),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(g){for(this.handle_whitespace_and_comments(g);this._flags.mode===c.Statement;)this.restore_mode();var H=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(b(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(g)},M.prototype.handle_word=function(g){if(g.type===s.RESERVED){if(a(g.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)g.type=s.WORD;else if(g.text==="import"&&a(this._tokens.peek().text,["(","."]))g.type=s.WORD;else if(a(g.text,["as","from"])&&!this._flags.import_block)g.type=s.WORD;else if(this._flags.mode===c.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(g.type=s.WORD)}}if(this.start_of_statement(g)?D(this._flags.last_token,["var","let","const"])&&g.type===s.WORD&&(this._flags.declaration_statement=!0):g.newlines&&!B(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(g),this.print_newline()):this.handle_whitespace_and_comments(g),this._flags.do_block&&!this._flags.do_while)if(w(g,"while")){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&w(g,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(g,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(g),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g)),w(g,"function")){(a(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(a(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!g.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,I)?this._output.space_before_token=!0:w(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(B(this._flags.mode)||b(this._flags.mode))||this.print_newline(),this.print_token(g),this._flags.last_word=g.text;return}var $="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":D(g,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===c.BlockStatement?$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&B(this._flags.mode)?$="SPACE":this._flags.last_token.type===s.STRING?$="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&a(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),D(g,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),D(g,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?D(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(g,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!D(g,["var","let","const"]))&&this._flags.last_token.text!==":"&&(w(g,"if")&&w(g.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(g,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&b(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);g.previous&&(g.previous.type===s.WORD||g.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(g),this._flags.last_word=g.text,g.type===s.RESERVED&&(g.text==="do"?this._flags.do_block=!0:g.text==="if"?this._flags.if_block=!0:g.text==="import"?this._flags.import_block=!0:this._flags.import_block&&w(g,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(g){this.start_of_statement(g)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(g);for(var H=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&w(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(g)},M.prototype.handle_string=function(g){g.text.startsWith("`")&&g.newlines===0&&g.whitespace_before===""&&(g.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(g)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(g),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g):g.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(g.previous.text==="]"||g.previous.text===")")&&g.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(g)},M.prototype.handle_equals=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0},M.prototype.handle_comma=function(g){this.handle_whitespace_and_comments(g,!0),this.print_token(g),this._output.space_before_token=!0,this._flags.declaration_statement?(B(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)},M.prototype.handle_operator=function(g){var H=g.text==="*"&&(D(this._flags.last_token,["function","yield"])||a(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),$=a(g.text,["-","+"])&&(a(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||a(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(g)){var ne=!H;this.handle_whitespace_and_comments(g,ne)}if(g.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(g);return}if(g.text==="::"){this.print_token(g);return}if(this._flags.last_token.type===s.OPERATOR&&a(this._options.operator_position,T)&&this.allow_wrap_or_preserved_newline(g),g.text===":"&&this._flags.in_case){this.print_token(g),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var se=!0,Oe=!0,ge=!1;if(g.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):g.text==="?"&&(this._flags.ternary_depth+=1),!$&&!H&&this._options.preserve_newlines&&a(g.text,o)){var Te=g.text===":",Re=Te&&ge,Le=Te&&!ge;switch(this._options.operator_position){case C.before_newline:this._output.space_before_token=!Le,this.print_token(g),(!Te||Re)&&this.allow_wrap_or_preserved_newline(g),this._output.space_before_token=!0;return;case C.after_newline:this._output.space_before_token=!0,!Te||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(g):this._output.space_before_token=!1,this.print_token(g),this._output.space_before_token=!0;return;case C.preserve_newline:Le||this.allow_wrap_or_preserved_newline(g),se=!(this._output.just_added_newline()||Le),this._output.space_before_token=se,this.print_token(g),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(g),se=!1;var de=this._tokens.peek();Oe=de&&a(de.type,[s.WORD,s.RESERVED])}else if(g.text==="...")this.allow_wrap_or_preserved_newline(g),se=this._flags.last_token.type===s.START_BLOCK,Oe=!1;else if(a(g.text,["--","++","!","~"])||$){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(g),se=!1,Oe=!1,g.newlines&&(g.text==="--"||g.text==="++"||g.text==="~")){var he=D(this._flags.last_token,R)&&g.newlines;he&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(he,!0)}this._flags.last_token.text===";"&&B(this._flags.mode)&&(se=!0),this._flags.last_token.type===s.RESERVED?se=!0:this._flags.last_token.type===s.END_EXPR?se=!(this._flags.last_token.text==="]"&&(g.text==="--"||g.text==="++")):this._flags.last_token.type===s.OPERATOR&&(se=a(g.text,["--","-","++","+"])&&a(this._flags.last_token.text,["--","-","++","+"]),a(g.text,["+","-"])&&a(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||se,this.print_token(g),this._output.space_before_token=Oe},M.prototype.handle_block_comment=function(g,H){if(this._output.raw){this._output.add_raw_token(g),g.directives&&g.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(g.directives){this.print_newline(!1,H),this.print_token(g),g.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!h.newline.test(g.text)&&!g.newlines){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0;return}else this.print_block_commment(g,H)},M.prototype.print_block_commment=function(g,H){var $=y(g.text),ne,se=!1,Oe=!1,ge=g.whitespace_before,Te=ge.length;if(this.print_newline(!1,H),this.print_token_line_indentation(g),this._output.add_token($[0]),this.print_newline(!1,H),$.length>1){for($=$.slice(1),se=F($,"*"),Oe=_($,ge),se&&(this._flags.alignment=1),ne=0;ne<$.length;ne++)se?(this.print_token_line_indentation(g),this._output.add_token(O($[ne]))):Oe&&$[ne]?(this.print_token_line_indentation(g),this._output.add_token($[ne].substring(Te))):(this._output.current_line.set_indent(-1),this._output.add_token($[ne])),this.print_newline(!1,H);this._flags.alignment=0}},M.prototype.handle_comment=function(g,H){g.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(g),this.print_newline(!1,H)},M.prototype.handle_dot=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(g,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(g)},M.prototype.handle_unknown=function(g,H){this.print_token(g),g.text[g.text.length-1]===` -`&&this.print_newline(!1,H)},M.prototype.handle_eof=function(g){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g)},r.exports.Beautifier=M},function(r){function L(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}L.prototype.clone_empty=function(){var p=new L(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},L.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},L.prototype.has_match=function(p){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(p))return!0;return!1},L.prototype.set_indent=function(p,h){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},L.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},L.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},L.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},L.prototype.is_empty=function(){return this.__items.length===0},L.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},L.prototype.push=function(p){this.__items.push(p);var h=p.lastIndexOf(` +`);return g.length&&H.push(g),H}function b(g){return g===d.ArrayLiteral}function B(g){return a(g,[d.Expression,d.ForInitializer,d.Conditional])}function F(g,H){for(var $=0;$$&&($=g.line_indent_level));var ne={mode:H,parent:g,last_token:g?g.last_token:new p(s.START_BLOCK,""),last_word:g?g.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:g?g.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},M.prototype._reset=function(g){var H=g.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var $=new f(g,this._options);return this._tokens=$.tokenize(),g},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g,H=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=` +`,H&&h.lineBreak.test(H||"")&&($=H.match(h.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return g=this._output.get_code($),g},M.prototype.handle_token=function(g,H){g.type===s.START_EXPR?this.handle_start_expr(g):g.type===s.END_EXPR?this.handle_end_expr(g):g.type===s.START_BLOCK?this.handle_start_block(g):g.type===s.END_BLOCK?this.handle_end_block(g):g.type===s.WORD?this.handle_word(g):g.type===s.RESERVED?this.handle_word(g):g.type===s.SEMICOLON?this.handle_semicolon(g):g.type===s.STRING?this.handle_string(g):g.type===s.EQUALS?this.handle_equals(g):g.type===s.OPERATOR?this.handle_operator(g):g.type===s.COMMA?this.handle_comma(g):g.type===s.BLOCK_COMMENT?this.handle_block_comment(g,H):g.type===s.COMMENT?this.handle_comment(g,H):g.type===s.DOT?this.handle_dot(g):g.type===s.EOF?this.handle_eof(g):g.type===s.UNKNOWN?this.handle_unknown(g,H):this.handle_unknown(g,H)},M.prototype.handle_whitespace_and_comments=function(g,H){var $=g.newlines,ne=this._options.keep_array_indentation&&b(this._flags.mode);if(g.comments_before)for(var se=g.comments_before.next();se;)this.handle_whitespace_and_comments(se,H),this.handle_token(se,H),se=g.comments_before.next();if(ne)for(var Oe=0;Oe<$;Oe+=1)this.print_newline(Oe>0,H);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,H);for(var ge=1;ge<$;ge+=1)this.print_newline(!0,H)}};var I=["async","break","continue","return","throw","yield"];M.prototype.allow_wrap_or_preserved_newline=function(g,H){if(H=H===void 0?!1:H,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&g.newlines||H,ne=a(this._flags.last_token.text,o)||a(g.text,o);if(ne){var se=a(this._flags.last_token.text,o)&&a(this._options.operator_position,T)||a(g.text,o);$=$&&se}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,I))return;this._output.set_wrap_point()}},M.prototype.print_newline=function(g,H){if(!H&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&w($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(g)&&(this._flags.multiline_frame=!0)},M.prototype.print_token_line_indentation=function(g){this._output.just_added_newline()&&(this._options.keep_array_indentation&&g.newlines&&(g.text==="["||b(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(g.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},M.prototype.print_token=function(g){if(this._output.raw){this._output.add_raw_token(g);return}if(this._options.comma_first&&g.previous&&g.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(g),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(g),this._output.non_breaking_space=!0,this._output.add_token(g.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},M.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.set_mode=function(g){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,g),this._flags=this.create_flags(this._previous_flags,g),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&S(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(g){var H=!1;return H=H||D(this._flags.last_token,["var","let","const"])&&g.type===s.WORD,H=H||w(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&D(this._flags.last_token,I)&&!g.newlines,H=H||w(this._flags.last_token,"else")&&!(w(g,"if")&&!g.comments_before),H=H||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),H=H||this._flags.last_token.type===s.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(g.text==="--"||g.text==="++")&&this._last_last_text!=="function"&&g.type!==s.WORD&&g.type!==s.RESERVED,H=H||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),H?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(g,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g,D(g,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g);var H=d.Expression;if(g.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(g),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=d.ArrayLiteral,b(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),a(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=d.ForInitializer):a(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=d.Conditional):a(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&g.whitespace_before===""?this._output.space_before_token=!1:(a(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var ne=this._tokens.peek(-4);D($,["async","function"])||$.text==="*"&&D(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(ne.text==="{"||ne.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(g);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(g,g.newlines),this.print_token(g),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(g){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(g,g.text==="]"&&b(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(g),this.restore_mode(),S(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(g){this.handle_whitespace_and_comments(g);var H=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):$&&(a($.text,[":",","])&&a(H.type,[s.STRING,s.WORD,s.RESERVED])||a(H.text,["get","set","..."])&&a($.type,[s.WORD,s.RESERVED]))?a(this._last_last_text,["class","interface"])&&!a($.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):a(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!H.comments_before&&H.text==="}",se=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,ge=null;this._flags.inline_frame=!0;do if(Oe+=1,ge=this._tokens.peek(Oe-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==s.EOF&&!(ge.type===s.END_BLOCK&&ge.opened===g))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(se||this._flags.last_token.type===s.EQUALS||D(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(b(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(g),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(g),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(g){for(this.handle_whitespace_and_comments(g);this._flags.mode===d.Statement;)this.restore_mode();var H=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(b(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(g)},M.prototype.handle_word=function(g){if(g.type===s.RESERVED){if(a(g.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)g.type=s.WORD;else if(g.text==="import"&&a(this._tokens.peek().text,["(","."]))g.type=s.WORD;else if(a(g.text,["as","from"])&&!this._flags.import_block)g.type=s.WORD;else if(this._flags.mode===d.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(g.type=s.WORD)}}if(this.start_of_statement(g)?D(this._flags.last_token,["var","let","const"])&&g.type===s.WORD&&(this._flags.declaration_statement=!0):g.newlines&&!B(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(g),this.print_newline()):this.handle_whitespace_and_comments(g),this._flags.do_block&&!this._flags.do_while)if(w(g,"while")){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&w(g,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(g,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(g),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g)),w(g,"function")){(a(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(a(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!g.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,I)?this._output.space_before_token=!0:w(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(B(this._flags.mode)||b(this._flags.mode))||this.print_newline(),this.print_token(g),this._flags.last_word=g.text;return}var $="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":D(g,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===d.BlockStatement?$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&B(this._flags.mode)?$="SPACE":this._flags.last_token.type===s.STRING?$="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),D(g,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),D(g,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?D(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(g,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!D(g,["var","let","const"]))&&this._flags.last_token.text!==":"&&(w(g,"if")&&w(g.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(g,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&b(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);g.previous&&(g.previous.type===s.WORD||g.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(g),this._flags.last_word=g.text,g.type===s.RESERVED&&(g.text==="do"?this._flags.do_block=!0:g.text==="if"?this._flags.if_block=!0:g.text==="import"?this._flags.import_block=!0:this._flags.import_block&&w(g,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(g){this.start_of_statement(g)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(g);for(var H=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&w(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(g)},M.prototype.handle_string=function(g){g.text.startsWith("`")&&g.newlines===0&&g.whitespace_before===""&&(g.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(g)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(g),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g):g.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(g.previous.text==="]"||g.previous.text===")")&&g.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(g)},M.prototype.handle_equals=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0},M.prototype.handle_comma=function(g){this.handle_whitespace_and_comments(g,!0),this.print_token(g),this._output.space_before_token=!0,this._flags.declaration_statement?(B(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)},M.prototype.handle_operator=function(g){var H=g.text==="*"&&(D(this._flags.last_token,["function","yield"])||a(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),$=a(g.text,["-","+"])&&(a(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||a(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(g)){var ne=!H;this.handle_whitespace_and_comments(g,ne)}if(g.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(g);return}if(g.text==="::"){this.print_token(g);return}if(this._flags.last_token.type===s.OPERATOR&&a(this._options.operator_position,T)&&this.allow_wrap_or_preserved_newline(g),g.text===":"&&this._flags.in_case){this.print_token(g),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var se=!0,Oe=!0,ge=!1;if(g.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):g.text==="?"&&(this._flags.ternary_depth+=1),!$&&!H&&this._options.preserve_newlines&&a(g.text,o)){var Te=g.text===":",Re=Te&&ge,Le=Te&&!ge;switch(this._options.operator_position){case C.before_newline:this._output.space_before_token=!Le,this.print_token(g),(!Te||Re)&&this.allow_wrap_or_preserved_newline(g),this._output.space_before_token=!0;return;case C.after_newline:this._output.space_before_token=!0,!Te||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(g):this._output.space_before_token=!1,this.print_token(g),this._output.space_before_token=!0;return;case C.preserve_newline:Le||this.allow_wrap_or_preserved_newline(g),se=!(this._output.just_added_newline()||Le),this._output.space_before_token=se,this.print_token(g),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(g),se=!1;var ce=this._tokens.peek();Oe=ce&&a(ce.type,[s.WORD,s.RESERVED])}else if(g.text==="...")this.allow_wrap_or_preserved_newline(g),se=this._flags.last_token.type===s.START_BLOCK,Oe=!1;else if(a(g.text,["--","++","!","~"])||$){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(g),se=!1,Oe=!1,g.newlines&&(g.text==="--"||g.text==="++"||g.text==="~")){var he=D(this._flags.last_token,R)&&g.newlines;he&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(he,!0)}this._flags.last_token.text===";"&&B(this._flags.mode)&&(se=!0),this._flags.last_token.type===s.RESERVED?se=!0:this._flags.last_token.type===s.END_EXPR?se=!(this._flags.last_token.text==="]"&&(g.text==="--"||g.text==="++")):this._flags.last_token.type===s.OPERATOR&&(se=a(g.text,["--","-","++","+"])&&a(this._flags.last_token.text,["--","-","++","+"]),a(g.text,["+","-"])&&a(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||se,this.print_token(g),this._output.space_before_token=Oe},M.prototype.handle_block_comment=function(g,H){if(this._output.raw){this._output.add_raw_token(g),g.directives&&g.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(g.directives){this.print_newline(!1,H),this.print_token(g),g.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!h.newline.test(g.text)&&!g.newlines){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0;return}else this.print_block_commment(g,H)},M.prototype.print_block_commment=function(g,H){var $=y(g.text),ne,se=!1,Oe=!1,ge=g.whitespace_before,Te=ge.length;if(this.print_newline(!1,H),this.print_token_line_indentation(g),this._output.add_token($[0]),this.print_newline(!1,H),$.length>1){for($=$.slice(1),se=F($,"*"),Oe=_($,ge),se&&(this._flags.alignment=1),ne=0;ne<$.length;ne++)se?(this.print_token_line_indentation(g),this._output.add_token(O($[ne]))):Oe&&$[ne]?(this.print_token_line_indentation(g),this._output.add_token($[ne].substring(Te))):(this._output.current_line.set_indent(-1),this._output.add_token($[ne])),this.print_newline(!1,H);this._flags.alignment=0}},M.prototype.handle_comment=function(g,H){g.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(g),this.print_newline(!1,H)},M.prototype.handle_dot=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(g,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(g)},M.prototype.handle_unknown=function(g,H){this.print_token(g),g.text[g.text.length-1]===` +`&&this.print_newline(!1,H)},M.prototype.handle_eof=function(g){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g)},r.exports.Beautifier=M},function(r){function L(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}L.prototype.clone_empty=function(){var p=new L(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},L.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},L.prototype.has_match=function(p){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(p))return!0;return!1},L.prototype.set_indent=function(p,h){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},L.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},L.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},L.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},L.prototype.is_empty=function(){return this.__items.length===0},L.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},L.prototype.push=function(p){this.__items.push(p);var h=p.lastIndexOf(` `);h!==-1?this.__character_count=p.length-h:this.__character_count+=p.length},L.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},L.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},L.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},L.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},L.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function v(p,h){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),h=h||"",p.indent_level>0&&(h=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}v.prototype.get_indent_size=function(p,h){var u=this.__base_string_length;return h=h||0,p<0&&(u=0),u+=p*this.__indent_size,u+=h,u},v.prototype.get_indent_string=function(p,h){var u=this.__base_string;return h=h||0,p<0&&(p=0,u=""),h+=p*this.__indent_size,this.__ensure_cache(h),u+=this.__cache[h],u},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,h=0,u="";this.__indent_size&&p>=this.__indent_size&&(h=Math.floor(p/this.__indent_size),p-=h*this.__indent_size,u=new Array(h+1).join(this.__indent_string)),p&&(u+=new Array(p+1).join(" ")),this.__cache.push(u)};function m(p,h){this.__indent_cache=new v(p,h),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new L(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,h){return this.__indent_cache.get_indent_string(p,h)},m.prototype.get_indent_size=function(p,h){return this.__indent_cache.get_indent_size(p,h)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===` `&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(` `);return p!==` @@ -15,16 +15,16 @@ `+h+` You passed in: '`+this.raw_options[p]+"'");return f[0]},L.prototype._get_selection_list=function(p,h,u){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[h[0]],!this._is_valid_selection(u,h))throw new Error("Invalid Default Value!");var f=this._get_array(p,u);if(!this._is_valid_selection(f,h))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values: `+h+` -You passed in: '`+this.raw_options[p]+"'");return f},L.prototype._is_valid_selection=function(p,h){return p.length&&h.length&&!p.some(function(u){return h.indexOf(u)===-1})};function v(p,h){var u={};p=m(p);var f;for(f in p)f!==h&&(u[f]=p[f]);if(h&&p[h])for(f in p[h])u[f]=p[h][f];return u}function m(p){var h={},u;for(u in p){var f=u.replace(/-/g,"_");h[f]=p[u]}return h}r.exports.Options=L,r.exports.normalizeOpts=m,r.exports.mergeOpts=v},function(r,L,v){var m=v(8).InputScanner,p=v(9).Tokenizer,h=v(9).TOKEN,u=v(13).Directives,f=v(4),l=v(12).Pattern,o=v(14).TemplatablePattern;function s(F,_){return _.indexOf(F)!==-1}var a={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:h.START,RAW:h.RAW,EOF:h.EOF},O=new u(/\/\*/,/\*\//),E=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,w=/[0-9]/,D=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),A=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";A=A.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),A="\\?\\.(?!\\d) "+A,A=A.replace(/ /g,"|");var C=new RegExp(A),T="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=T.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),S=new RegExp("^(?:"+c.join("|")+")$"),y,b=function(F,_){p.call(this,F,_),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new l(this._input),I=new o(this._input).read_options(this._options);this.__patterns={template:I,identifier:I.starting_with(f.identifier).matching(f.identifierMatch),number:M.matching(E),punct:M.matching(C),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(//),include:M.starting_with(/#include/).until_after(f.lineBreak),shebang:M.starting_with(/#!/).until_after(f.lineBreak),xml:M.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:I.until(/['\\\n\r\u2028\u2029]/),double_quote:I.until(/["\\\n\r\u2028\u2029]/),template_text:I.until(/[`\\$]/),template_expression:I.until(/[`}\\]/)}};b.prototype=new p,b.prototype._is_comment=function(F){return F.type===a.COMMENT||F.type===a.BLOCK_COMMENT||F.type===a.UNKNOWN},b.prototype._is_opening=function(F){return F.type===a.START_BLOCK||F.type===a.START_EXPR},b.prototype._is_closing=function(F,_){return(F.type===a.END_BLOCK||F.type===a.END_EXPR)&&_&&(F.text==="]"&&_.text==="["||F.text===")"&&_.text==="("||F.text==="}"&&_.text==="{")},b.prototype._reset=function(){y=!1},b.prototype._get_next_token=function(F,_){var M=null;this._readWhitespace();var I=this._input.peek();return I===null?this._create_token(a.EOF,""):(M=M||this._read_non_javascript(I),M=M||this._read_string(I),M=M||this._read_word(F),M=M||this._read_singles(I),M=M||this._read_comment(I),M=M||this._read_regexp(I,F),M=M||this._read_xml(I,F),M=M||this._read_punctuation(),M=M||this._create_token(a.UNKNOWN,this._input.next()),M)},b.prototype._read_word=function(F){var _;if(_=this.__patterns.identifier.read(),_!=="")return _=_.replace(f.allLineBreaks,` +You passed in: '`+this.raw_options[p]+"'");return f},L.prototype._is_valid_selection=function(p,h){return p.length&&h.length&&!p.some(function(u){return h.indexOf(u)===-1})};function v(p,h){var u={};p=m(p);var f;for(f in p)f!==h&&(u[f]=p[f]);if(h&&p[h])for(f in p[h])u[f]=p[h][f];return u}function m(p){var h={},u;for(u in p){var f=u.replace(/-/g,"_");h[f]=p[u]}return h}r.exports.Options=L,r.exports.normalizeOpts=m,r.exports.mergeOpts=v},function(r,L,v){var m=v(8).InputScanner,p=v(9).Tokenizer,h=v(9).TOKEN,u=v(13).Directives,f=v(4),l=v(12).Pattern,o=v(14).TemplatablePattern;function s(F,_){return _.indexOf(F)!==-1}var a={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:h.START,RAW:h.RAW,EOF:h.EOF},O=new u(/\/\*/,/\*\//),E=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,w=/[0-9]/,D=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),A=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";A=A.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),A="\\?\\.(?!\\d) "+A,A=A.replace(/ /g,"|");var C=new RegExp(A),T="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=T.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),S=new RegExp("^(?:"+d.join("|")+")$"),y,b=function(F,_){p.call(this,F,_),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new l(this._input),I=new o(this._input).read_options(this._options);this.__patterns={template:I,identifier:I.starting_with(f.identifier).matching(f.identifierMatch),number:M.matching(E),punct:M.matching(C),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(//),include:M.starting_with(/#include/).until_after(f.lineBreak),shebang:M.starting_with(/#!/).until_after(f.lineBreak),xml:M.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:I.until(/['\\\n\r\u2028\u2029]/),double_quote:I.until(/["\\\n\r\u2028\u2029]/),template_text:I.until(/[`\\$]/),template_expression:I.until(/[`}\\]/)}};b.prototype=new p,b.prototype._is_comment=function(F){return F.type===a.COMMENT||F.type===a.BLOCK_COMMENT||F.type===a.UNKNOWN},b.prototype._is_opening=function(F){return F.type===a.START_BLOCK||F.type===a.START_EXPR},b.prototype._is_closing=function(F,_){return(F.type===a.END_BLOCK||F.type===a.END_EXPR)&&_&&(F.text==="]"&&_.text==="["||F.text===")"&&_.text==="("||F.text==="}"&&_.text==="{")},b.prototype._reset=function(){y=!1},b.prototype._get_next_token=function(F,_){var M=null;this._readWhitespace();var I=this._input.peek();return I===null?this._create_token(a.EOF,""):(M=M||this._read_non_javascript(I),M=M||this._read_string(I),M=M||this._read_word(F),M=M||this._read_singles(I),M=M||this._read_comment(I),M=M||this._read_regexp(I,F),M=M||this._read_xml(I,F),M=M||this._read_punctuation(),M=M||this._create_token(a.UNKNOWN,this._input.next()),M)},b.prototype._read_word=function(F){var _;if(_=this.__patterns.identifier.read(),_!=="")return _=_.replace(f.allLineBreaks,` `),!(F.type===a.DOT||F.type===a.RESERVED&&(F.text==="set"||F.text==="get"))&&S.test(_)?(_==="in"||_==="of")&&(F.type===a.WORD||F.type===a.STRING)?this._create_token(a.OPERATOR,_):this._create_token(a.RESERVED,_):this._create_token(a.WORD,_);if(_=this.__patterns.number.read(),_!=="")return this._create_token(a.WORD,_)},b.prototype._read_singles=function(F){var _=null;return F==="("||F==="["?_=this._create_token(a.START_EXPR,F):F===")"||F==="]"?_=this._create_token(a.END_EXPR,F):F==="{"?_=this._create_token(a.START_BLOCK,F):F==="}"?_=this._create_token(a.END_BLOCK,F):F===";"?_=this._create_token(a.SEMICOLON,F):F==="."&&D.test(this._input.peek(1))?_=this._create_token(a.DOT,F):F===","&&(_=this._create_token(a.COMMA,F)),_&&this._input.next(),_},b.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(a.EQUALS,F):F==="?."?this._create_token(a.DOT,F):this._create_token(a.OPERATOR,F)},b.prototype._read_non_javascript=function(F){var _="";if(F==="#"){if(this._is_first_token()&&(_=this.__patterns.shebang.read(),_))return this._create_token(a.UNKNOWN,_.trim()+` `);if(_=this.__patterns.include.read(),_)return this._create_token(a.UNKNOWN,_.trim()+` `);F=this._input.next();var M="#";if(this._input.hasNext()&&this._input.testChar(w)){do F=this._input.next(),M+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(M+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(M+="{}",this._input.next(),this._input.next())),this._create_token(a.WORD,M)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(_=this.__patterns.html_comment_start.read(),_){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)_+=this._input.next();return y=!0,this._create_token(a.COMMENT,_)}}else if(y&&F==="-"&&(_=this.__patterns.html_comment_end.read(),_))return y=!1,this._create_token(a.COMMENT,_);return null},b.prototype._read_comment=function(F){var _=null;if(F==="/"){var M="";if(this._input.peek(1)==="*"){M=this.__patterns.block_comment.read();var I=O.get_directives(M);I&&I.ignore==="start"&&(M+=O.readIgnored(this._input)),M=M.replace(f.allLineBreaks,` `),_=this._create_token(a.BLOCK_COMMENT,M),_.directives=I}else this._input.peek(1)==="/"&&(M=this.__patterns.comment.read(),_=this._create_token(a.COMMENT,M))}return _},b.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var _=this._input.next();return this.has_char_escapes=!1,F==="`"?_+=this._read_string_recursive("`",!0,"${"):_+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(_=B(_)),this._input.peek()===F&&(_+=this._input.next()),_=_.replace(f.allLineBreaks,` `),this._create_token(a.STRING,_)}return null},b.prototype._allow_regexp_or_xml=function(F){return F.type===a.RESERVED&&s(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===a.END_EXPR&&F.text===")"&&F.opened.previous.type===a.RESERVED&&s(F.opened.previous.text,["if","while","for"])||s(F.type,[a.COMMENT,a.START_EXPR,a.START_BLOCK,a.START,a.END_BLOCK,a.OPERATOR,a.EQUALS,a.EOF,a.SEMICOLON,a.COMMA])},b.prototype._read_regexp=function(F,_){if(F==="/"&&this._allow_regexp_or_xml(_)){for(var M=this._input.next(),I=!1,g=!1;this._input.hasNext()&&(I||g||this._input.peek()!==F)&&!this._input.testChar(f.newline);)M+=this._input.peek(),I?I=!1:(I=this._input.peek()==="\\",this._input.peek()==="["?g=!0:this._input.peek()==="]"&&(g=!1)),this._input.next();return this._input.peek()===F&&(M+=this._input.next(),M+=this._input.read(f.identifier)),this._create_token(a.STRING,M)}return null},b.prototype._read_xml=function(F,_){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(_)){var M="",I=this.__patterns.xml.read_match();if(I){for(var g=I[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=g.indexOf("{")===0,$=0;I;){var ne=!!I[1],se=I[2],Oe=!!I[I.length-1]||se.slice(0,8)==="![CDATA[";if(!Oe&&(se===g||H&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ne?--$:++$),M+=I[0],$<=0)break;I=this.__patterns.xml.read_match()}return I||(M+=this._input.match(/[\s\S]*/g)[0]),M=M.replace(f.allLineBreaks,` `),this._create_token(a.STRING,M)}}return null};function B(F){for(var _="",M=0,I=new m(F),g=null;I.hasNext();)if(g=I.match(/([\s]|[^\\]|\\\\)+/g),g&&(_+=g[0]),I.peek()==="\\"){if(I.next(),I.peek()==="x")g=I.match(/x([0-9A-Fa-f]{2})/g);else if(I.peek()==="u")g=I.match(/u([0-9A-Fa-f]{4})/g);else{_+="\\",I.hasNext()&&(_+=I.next());continue}if(!g)return F;if(M=parseInt(g[1],16),M>126&&M<=255&&g[0].indexOf("x")===0)return F;if(M>=0&&M<32){_+="\\"+g[0];continue}else M===34||M===39||M===92?_+="\\"+String.fromCharCode(M):_+=String.fromCharCode(M)}return _}b.prototype._read_string_recursive=function(F,_,M){var I,g;F==="'"?g=this.__patterns.single_quote:F==='"'?g=this.__patterns.double_quote:F==="`"?g=this.__patterns.template_text:F==="}"&&(g=this.__patterns.template_expression);for(var H=g.read(),$="";this._input.hasNext();){if($=this._input.next(),$===F||!_&&f.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(I=this._input.peek(),I==="x"||I==="u"?this.has_char_escapes=!0:I==="\r"&&this._input.peek(1)===` -`&&this._input.next(),$+=this._input.next()):M&&(M==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),M===$&&(F==="`"?$+=this._read_string_recursive("}",_,"`"):$+=this._read_string_recursive("`",_,"${"),this._input.hasNext()&&($+=this._input.next())));$+=g.read(),H+=$}return H},r.exports.Tokenizer=b,r.exports.TOKEN=a,r.exports.positionable_operators=R.slice(),r.exports.line_starters=T.slice()},function(r){var L=RegExp.prototype.hasOwnProperty("sticky");function v(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position=0&&m=0&&p=m.length&&this.__input.substring(p-m.length,p).toLowerCase()===m},r.exports.InputScanner=v},function(r,L,v){var m=v(8).InputScanner,p=v(3).Token,h=v(10).TokenStream,u=v(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(o,s){this._input=new m(o),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var o,s=new p(f.START,""),a=null,O=[],E=new h;s.type!==f.EOF;){for(o=this._get_next_token(s,a);this._is_comment(o);)E.add(o),o=this._get_next_token(s,a);E.isEmpty()||(o.comments_before=E,E=new h),o.parent=a,this._is_opening(o)?(O.push(a),a=o):a&&this._is_closing(o,a)&&(o.opened=a,a.closed=o,a=O.pop(),o.parent=a),o.previous=s,s.next=o,this.__tokens.add(o),s=o}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(o,s){this._readWhitespace();var a=this._input.read(/.+/g);return a?this._create_token(f.RAW,a):this._create_token(f.EOF,"")},l.prototype._is_comment=function(o){return!1},l.prototype._is_opening=function(o){return!1},l.prototype._is_closing=function(o,s){return!1},l.prototype._create_token=function(o,s){var a=new p(o,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return a},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=l,r.exports.TOKEN=f},function(r){function L(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}L.prototype.restart=function(){this.__position=0},L.prototype.isEmpty=function(){return this.__tokens_length===0},L.prototype.hasNext=function(){return this.__position=0&&v/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new m,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(u){var f=this._create();return f._disabled[u]=!0,f._update(),f},h.prototype.read_options=function(u){var f=this._create();for(var l in p)f._disabled[l]=u.templating.indexOf(l)===-1;return f._update(),f},h.prototype.exclude=function(u){var f=this._create();return f._excluded[u]=!0,f._update(),f},h.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),u+=f,f=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},h.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},h.prototype._read_template=function(){var u="",f=this._input.peek();if(f==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(u=u||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},r.exports.TemplatablePattern=h}],U={};function K(r){var L=U[r];if(L!==void 0)return L.exports;var v=U[r]={exports:{}};return j[r](v,v.exports,K),v.exports}var G=K(0);P=G})();var X=P;!(ie=[],J=function(){return{js_beautify:X}}.apply(be,ie),J!==void 0&&(rt.exports=J))})()},"746U":function(rt,be,Z){"use strict";Z.d(be,"f",function(){return ie}),Z.d(be,"l",function(){return J}),Z.d(be,"k",function(){return P}),Z.d(be,"j",function(){return X}),Z.d(be,"g",function(){return j}),Z.d(be,"m",function(){return U}),Z.d(be,"h",function(){return K}),Z.d(be,"n",function(){return G}),Z.d(be,"c",function(){return r}),Z.d(be,"a",function(){return L}),Z.d(be,"i",function(){return v}),Z.d(be,"o",function(){return m}),Z.d(be,"e",function(){return u}),Z.d(be,"d",function(){return f}),Z.d(be,"p",function(){return l}),Z.d(be,"b",function(){return o});function ie(s){return Array.isArray(s)}function J(s){return typeof s=="string"}function P(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function X(s){return typeof s=="number"&&!isNaN(s)}function j(s){return s===!0||s===!1}function U(s){return typeof s=="undefined"}function K(s){return!G(s)}function G(s){return U(s)||s===null}function r(s,a){if(!s)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function L(s){if(G(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function v(s){return typeof s=="function"}function m(s,a){const O=Math.min(s.length,a.length);for(let E=0;Efunction(){const D=Array.prototype.slice.call(arguments,0);return a(w,D)};let E={};for(const w of s)E[w]=O(w);return E}function l(s){return s===null?void 0:s}function o(s,a="Unreachable"){throw new Error(a)}},"7Cbv":function(rt,be,Z){"use strict";var ie=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),J=new Uint8Array(16);function P(){if(!ie)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ie(J)}var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function j(p){return typeof p=="string"&&X.test(p)}for(var U=j,K=[],G=0;G<256;++G)K.push((G+256).toString(16).substr(1));function r(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=(K[p[h+0]]+K[p[h+1]]+K[p[h+2]]+K[p[h+3]]+"-"+K[p[h+4]]+K[p[h+5]]+"-"+K[p[h+6]]+K[p[h+7]]+"-"+K[p[h+8]]+K[p[h+9]]+"-"+K[p[h+10]]+K[p[h+11]]+K[p[h+12]]+K[p[h+13]]+K[p[h+14]]+K[p[h+15]]).toLowerCase();if(!U(u))throw TypeError("Stringified UUID is invalid");return u}var L=r;function v(p,h,u){p=p||{};var f=p.random||(p.rng||P)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,h){u=u||0;for(var l=0;l<16;++l)h[u+l]=f[l];return h}return L(f)}var m=be.a=v},"7ahc":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return O});var ie=Z("k1fw"),J=Z("0Owb"),P=Z("+L6B"),X=Z("2/Rp"),j=Z("y8nQ"),U=Z("Vl3Y"),K=Z("tJVT"),G=Z("OaEy"),r=Z("2fM7"),L=Z("q1tI"),v=Z.n(L),m=Z("VrN/"),p=Z.n(m),h=Z("p77/"),u=Z.n(h),f=Z("c5Ni"),l=Z.n(f),o=r.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},a={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};be.b=function(E){var w=E.callback,D=E.onCancel,R=Object(L.useState)("python"),A=Object(K.a)(R,2),C=A[0],T=A[1];function c(y){T(a[y][1])}function S(y){w(y)}return v.a.createElement(U.a,Object(J.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:S}),v.a.createElement(U.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(r.a,{onChange:c},Object.keys(a).map(function(y){return v.a.createElement(o,{key:y,value:y},a[y][0])}))),v.a.createElement(U.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(O,{mode:C})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(X.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function O(E){var w=E.value,D=E.onChange,R=E.mode,A=E.options,C=A===void 0?{}:A,T=Object(L.useRef)(),c=Object(L.useState)(),S=Object(K.a)(c,2),y=S[0],b=S[1];return Object(L.useEffect)(function(){if(y){function B(F){var _=F.getValue();D&&D(_)}return y.on("change",B),function(){y.off("change",B)}}},[y,D]),Object(L.useEffect)(function(){y&&y.setOption("mode",R)},[y,R]),Object(L.useEffect)(function(){y&&((w!==y.getValue()||w==="")&&setTimeout(function(){y.setValue(w||" ")},300))},[y,w]),Object(L.useEffect)(function(){if(T.current&&!y){var B=p.a.fromTextArea(T.current,Object(ie.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},C));b(B)}},[T.current,y]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:T}))}},"8EBN":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";ie.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var J=0;J-1&&X.substring(K+1,X.length);if(G)return ie.findModeByExtension(G)},ie.findModeByName=function(X){X=X.toLowerCase();for(var j=0;j0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position=0&&m=0&&p=m.length&&this.__input.substring(p-m.length,p).toLowerCase()===m},r.exports.InputScanner=v},function(r,L,v){var m=v(8).InputScanner,p=v(3).Token,h=v(10).TokenStream,u=v(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(o,s){this._input=new m(o),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var o,s=new p(f.START,""),a=null,O=[],E=new h;s.type!==f.EOF;){for(o=this._get_next_token(s,a);this._is_comment(o);)E.add(o),o=this._get_next_token(s,a);E.isEmpty()||(o.comments_before=E,E=new h),o.parent=a,this._is_opening(o)?(O.push(a),a=o):a&&this._is_closing(o,a)&&(o.opened=a,a.closed=o,a=O.pop(),o.parent=a),o.previous=s,s.next=o,this.__tokens.add(o),s=o}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(o,s){this._readWhitespace();var a=this._input.read(/.+/g);return a?this._create_token(f.RAW,a):this._create_token(f.EOF,"")},l.prototype._is_comment=function(o){return!1},l.prototype._is_opening=function(o){return!1},l.prototype._is_closing=function(o,s){return!1},l.prototype._create_token=function(o,s){var a=new p(o,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return a},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=l,r.exports.TOKEN=f},function(r){function L(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}L.prototype.restart=function(){this.__position=0},L.prototype.isEmpty=function(){return this.__tokens_length===0},L.prototype.hasNext=function(){return this.__position=0&&v/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new m,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(u){var f=this._create();return f._disabled[u]=!0,f._update(),f},h.prototype.read_options=function(u){var f=this._create();for(var l in p)f._disabled[l]=u.templating.indexOf(l)===-1;return f._update(),f},h.prototype.exclude=function(u){var f=this._create();return f._excluded[u]=!0,f._update(),f},h.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),u+=f,f=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},h.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},h.prototype._read_template=function(){var u="",f=this._input.peek();if(f==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(u=u||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},r.exports.TemplatablePattern=h}],U={};function K(r){var L=U[r];if(L!==void 0)return L.exports;var v=U[r]={exports:{}};return j[r](v,v.exports,K),v.exports}var G=K(0);P=G})();var X=P;!(ie=[],J=function(){return{js_beautify:X}}.apply(be,ie),J!==void 0&&(rt.exports=J))})()},"746U":function(rt,be,Z){"use strict";Z.d(be,"f",function(){return ie}),Z.d(be,"l",function(){return J}),Z.d(be,"k",function(){return P}),Z.d(be,"j",function(){return X}),Z.d(be,"g",function(){return j}),Z.d(be,"m",function(){return U}),Z.d(be,"h",function(){return K}),Z.d(be,"n",function(){return G}),Z.d(be,"c",function(){return r}),Z.d(be,"a",function(){return L}),Z.d(be,"i",function(){return v}),Z.d(be,"o",function(){return m}),Z.d(be,"e",function(){return u}),Z.d(be,"d",function(){return f}),Z.d(be,"p",function(){return l}),Z.d(be,"b",function(){return o});function ie(s){return Array.isArray(s)}function J(s){return typeof s=="string"}function P(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function X(s){return typeof s=="number"&&!isNaN(s)}function j(s){return s===!0||s===!1}function U(s){return typeof s=="undefined"}function K(s){return!G(s)}function G(s){return U(s)||s===null}function r(s,a){if(!s)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function L(s){if(G(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function v(s){return typeof s=="function"}function m(s,a){const O=Math.min(s.length,a.length);for(let E=0;Efunction(){const D=Array.prototype.slice.call(arguments,0);return a(w,D)};let E={};for(const w of s)E[w]=O(w);return E}function l(s){return s===null?void 0:s}function o(s,a="Unreachable"){throw new Error(a)}},"7Cbv":function(rt,be,Z){"use strict";var ie=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),J=new Uint8Array(16);function P(){if(!ie)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ie(J)}var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function j(p){return typeof p=="string"&&X.test(p)}for(var U=j,K=[],G=0;G<256;++G)K.push((G+256).toString(16).substr(1));function r(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=(K[p[h+0]]+K[p[h+1]]+K[p[h+2]]+K[p[h+3]]+"-"+K[p[h+4]]+K[p[h+5]]+"-"+K[p[h+6]]+K[p[h+7]]+"-"+K[p[h+8]]+K[p[h+9]]+"-"+K[p[h+10]]+K[p[h+11]]+K[p[h+12]]+K[p[h+13]]+K[p[h+14]]+K[p[h+15]]).toLowerCase();if(!U(u))throw TypeError("Stringified UUID is invalid");return u}var L=r;function v(p,h,u){p=p||{};var f=p.random||(p.rng||P)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,h){u=u||0;for(var l=0;l<16;++l)h[u+l]=f[l];return h}return L(f)}var m=be.a=v},"7ahc":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return O});var ie=Z("k1fw"),J=Z("0Owb"),P=Z("+L6B"),X=Z("2/Rp"),j=Z("y8nQ"),U=Z("Vl3Y"),K=Z("tJVT"),G=Z("OaEy"),r=Z("2fM7"),L=Z("q1tI"),v=Z.n(L),m=Z("VrN/"),p=Z.n(m),h=Z("p77/"),u=Z.n(h),f=Z("c5Ni"),l=Z.n(f),o=r.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},a={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};be.b=function(E){var w=E.callback,D=E.onCancel,R=Object(L.useState)("python"),A=Object(K.a)(R,2),C=A[0],T=A[1];function d(y){T(a[y][1])}function S(y){w(y)}return v.a.createElement(U.a,Object(J.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:S}),v.a.createElement(U.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(r.a,{onChange:d},Object.keys(a).map(function(y){return v.a.createElement(o,{key:y,value:y},a[y][0])}))),v.a.createElement(U.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(O,{mode:C})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(X.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function O(E){var w=E.value,D=E.onChange,R=E.mode,A=E.options,C=A===void 0?{}:A,T=Object(L.useRef)(),d=Object(L.useState)(),S=Object(K.a)(d,2),y=S[0],b=S[1];return Object(L.useEffect)(function(){if(y){function B(F){var _=F.getValue();D&&D(_)}return y.on("change",B),function(){y.off("change",B)}}},[y,D]),Object(L.useEffect)(function(){y&&y.setOption("mode",R)},[y,R]),Object(L.useEffect)(function(){y&&((w!==y.getValue()||w==="")&&setTimeout(function(){y.setValue(w||" ")},300))},[y,w]),Object(L.useEffect)(function(){if(T.current&&!y){var B=p.a.fromTextArea(T.current,Object(ie.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},C));b(B)}},[T.current,y]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:T}))}},"8EBN":function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";ie.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var J=0;J-1&&X.substring(K+1,X.length);if(G)return ie.findModeByExtension(G)},ie.findModeByName=function(X){X=X.toLowerCase();for(var j=0;j=W.length?ee.slice(W.length):ee}).join(` -`)}var l=[],o=["
    "],s=new h.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function O(){l.length=0,o=["
      "]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(Y,x,k,W){if(x>=Y.length||Y[x].level<=k)return x;var ee=Y[x];W.push("
    • "+ee.text+""),x++;var V=[];return x=w(Y,x,ee.level,V),V.length>0&&(W.push("
        "),V.forEach(function(Ee){W.push(Ee)}),W.push("
      ")),W.push("
    • "),x=w(Y,x,k,W),x}function D(){return w(l,0,0,o),o.push("
    "),o.join("")}var R={heading:function(x){var k=a.exec(x);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(x){var k=this.rules.block.fences.exec(x);if(k){var W=k[0],ee=f(W,k[3]||""),V=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(V)>=0){var Ee=T(),Ye=ee;ee=Ee,c[Ee]={type:"block",expression:Ye}}return{type:"code",raw:W,lang:V,text:ee}}}},A=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,T=function(){return"__special_katext_id_".concat(C++,"__")},c={};function S(){return c}function y(){C=0,c={}}function b(Y){return Y=Y.replace(A,function(x,k){var W=T();return c[W]={type:"inline",expression:k},W}),Y}var B=s.listitem;s.listitem=function(Y){return B(b(Y))};var F=s.paragraph;s.paragraph=function(Y){return F(b(Y))};var _=s.tablecell;s.tablecell=function(Y,x){return _(b(Y),x)},s.code=function(Y,x,k){var W=(x||"").match(/\S*/)[0];return W?["latex","katex","math"].indexOf(W)>=0?"

    ".concat(Y,"

    "):'
    ').concat(k?Y:Object(u.escape)(Y,!0),`
    +`)}var l=[],o=["
      "],s=new h.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function O(){l.length=0,o=["
        "]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(Y,x,k,W){if(x>=Y.length||Y[x].level<=k)return x;var ee=Y[x];W.push("
      • "+ee.text+""),x++;var V=[];return x=w(Y,x,ee.level,V),V.length>0&&(W.push("
          "),V.forEach(function(Ee){W.push(Ee)}),W.push("
        ")),W.push("
      • "),x=w(Y,x,k,W),x}function D(){return w(l,0,0,o),o.push("
      "),o.join("")}var R={heading:function(x){var k=a.exec(x);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(x){var k=this.rules.block.fences.exec(x);if(k){var W=k[0],ee=f(W,k[3]||""),V=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(V)>=0){var Ee=T(),Ye=ee;ee=Ee,d[Ee]={type:"block",expression:Ye}}return{type:"code",raw:W,lang:V,text:ee}}}},A=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,T=function(){return"__special_katext_id_".concat(C++,"__")},d={};function S(){return d}function y(){C=0,d={}}function b(Y){return Y=Y.replace(A,function(x,k){var W=T();return d[W]={type:"inline",expression:k},W}),Y}var B=s.listitem;s.listitem=function(Y){return B(b(Y))};var F=s.paragraph;s.paragraph=function(Y){return F(b(Y))};var _=s.tablecell;s.tablecell=function(Y,x){return _(b(Y),x)},s.code=function(Y,x,k){var W=(x||"").match(/\S*/)[0];return W?["latex","katex","math"].indexOf(W)>=0?"

      ".concat(Y,"

      "):'
      ').concat(k?Y:Object(u.escape)(Y,!0),`
      `):'
      '+(k?Y:Object(u.escape)(Y,!0))+"
      "},s.heading=function(Y,x,k){var W=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:W,level:x,text:Y}),"'+Y+""},h.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),h.a.use({tokenizer:R,renderer:s});var M=h.a,I=Z("SJMd"),g=Z("ulZh"),H=Z.n(g),$=Z("m3rI"),ne=Z("Oy/b"),se=Z("p5ED"),Oe=Z("ErOA");/*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -38,7 +38,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ge=function(Y,x){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,W){k.__proto__=W}||function(k,W){for(var ee in W)Object.prototype.hasOwnProperty.call(W,ee)&&(k[ee]=W[ee])})(Y,x)};function Te(Y,x){function k(){this.constructor=Y}ge(Y,x),Y.prototype=x===null?Object.create(x):(k.prototype=x.prototype,new k)}function Re(Y,x,k,W){return new(k||(k=Promise))(function(ee,V){function Ee(gt){try{tt(W.next(gt))}catch(Xe){V(Xe)}}function Ye(gt){try{tt(W.throw(gt))}catch(Xe){V(Xe)}}function tt(gt){var Xe;gt.done?ee(gt.value):(Xe=gt.value,Xe instanceof k?Xe:new k(function(xt){xt(Xe)})).then(Ee,Ye)}tt((W=W.apply(Y,x||[])).next())})}function Le(Y,x){var k,W,ee,V,Ee={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Ye(tt){return function(gt){return function(Xe){if(k)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(k=1,W&&(ee=2&Xe[0]?W.return:Xe[0]?W.throw||((ee=W.return)&&ee.call(W),0):W.next)&&!(ee=ee.call(W,Xe[1])).done)return ee;switch(W=0,ee&&(Xe=[2&Xe[0],ee.value]),Xe[0]){case 0:case 1:ee=Xe;break;case 4:return Ee.label++,{value:Xe[1],done:!1};case 5:Ee.label++,W=Xe[1],Xe=[0];continue;case 7:Xe=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(ee=Ee.trys,(ee=ee.length>0&&ee[ee.length-1])||Xe[0]!==6&&Xe[0]!==2)){Ee=0;continue}if(Xe[0]===3&&(!ee||Xe[1]>ee[0]&&Xe[1]0&&ee[ee.length-1])||Xe[0]!==6&&Xe[0]!==2)){Ee=0;continue}if(Xe[0]===3&&(!ee||Xe[1]>ee[0]&&Xe[1] `),Ee.appendChild(Ye),Ee},x.prototype.setCurrentColor=function(k,W){var ee=this;this.currentColor=k,this.colorBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},x}(le),Se=function(){function Y(x,k,W){this._state="new",this._isSelected=!1,this._container=x,this._overlayContainer=k,this.globalSettings=W,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Y.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Y.prototype.ownsTarget=function(x){return!1},Object.defineProperty(Y.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Y.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Y.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Y.prototype.pointerDown=function(x,k){},Y.prototype.dblClick=function(x,k){},Y.prototype.manipulate=function(x){},Y.prototype.pointerUp=function(x){this.stateChanged()},Y.prototype.dispose=function(){},Y.prototype.addMarkerVisualToContainer=function(x){this.container.childNodes.length>0?this.container.insertBefore(x,this.container.childNodes[0]):this.container.appendChild(x)},Y.prototype.getState=function(){return{typeName:Y.typeName,state:this.state,notes:this.notes}},Y.prototype.restoreState=function(x){this._state=x.state,this.notes=x.notes},Y.prototype.scale=function(x,k){},Y.prototype.colorChanged=function(x){this.onColorChanged&&this.onColorChanged(x),this.stateChanged()},Y.prototype.fillColorChanged=function(x){this.onFillColorChanged&&this.onFillColorChanged(x),this.stateChanged()},Y.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var x=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),x.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(x)&&this.onStateChanged(this)}},Y.typeName="MarkerBase",Y}(),Ie=function(){function Y(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Y.prototype.findGripByVisual=function(x){return this.topLeft.ownsTarget(x)?this.topLeft:this.topCenter.ownsTarget(x)?this.topCenter:this.topRight.ownsTarget(x)?this.topRight:this.centerLeft.ownsTarget(x)?this.centerLeft:this.centerRight.ownsTarget(x)?this.centerRight:this.bottomLeft.ownsTarget(x)?this.bottomLeft:this.bottomCenter.ownsTarget(x)?this.bottomCenter:this.bottomRight.ownsTarget(x)?this.bottomRight:void 0},Y}(),We=function(){function Y(){this.GRIP_SIZE=10,this.visual=he.createGroup(),this.visual.appendChild(he.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(he.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},Y}(),Ve=function(){function Y(){}return Y.toITransformMatrix=function(x){return{a:x.a,b:x.b,c:x.c,d:x.d,e:x.e,f:x.f}},Y.toSVGMatrix=function(x,k){return x.a=k.a,x.b=k.b,x.c=k.c,x.d=k.d,x.e=k.e,x.f=k.f,x},Y}(),Qe=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.left=0,V.top=0,V.width=0,V.height=0,V.defaultSize={x:50,y:20},V.offsetX=0,V.offsetY=0,V.rotationAngle=0,V.CB_DISTANCE=10,V._suppressMarkerCreateEvent=!1,V.container.transform.baseVal.appendItem(he.createTransform()),V.setupControlBox(),V}return Te(x,Y),Object.defineProperty(x.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var W=he.createTransform();this._visual.transform.baseVal.appendItem(W)},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(k){return!!Y.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(k);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(W),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(W)){this.activeGrip=this.rotatorGrip;var V=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=V.x-this.width/2,this.top=V.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ee=this.container.transform.baseVal.getItem(0);Ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},x.prototype.pointerUp=function(k){var W=this.state;Y.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",W==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},x.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},x.prototype.manipulate=function(k){var W=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(W.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(W.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(W):this.state==="rotate"&&this.rotate(k)},x.prototype.resize=function(k){var W=this.manipulationStartLeft,ee=this.manipulationStartWidth,V=this.manipulationStartTop,Ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:W=this.manipulationStartLeft+k.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-W;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:V=this.manipulationStartTop+k.y-this.manipulationStartY,Ee=this.manipulationStartHeight+this.manipulationStartTop-V;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ee=this.manipulationStartHeight+k.y-this.manipulationStartY}ee>=0?(this.left=W,this.width=ee):(this.left=W+ee,this.width=-ee),Ee>=0?(this.top=V,this.height=Ee):(this.top=V+Ee,this.height=-Ee),this.setSize()},x.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},x.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var W=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*W,this.applyRotation()}},x.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},x.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var W=this.container.getCTM(),ee=he.createPoint(k.x,k.y);return{x:(ee=ee.matrixTransform(W)).x,y:ee.y}},x.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var W=this.container.getCTM();W=W.inverse();var ee=he.createPoint(k.x,k.y);return{x:(ee=ee.matrixTransform(W)).x,y:ee.y}},x.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=he.createGroup();var k=he.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=he.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=he.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ie,this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},x.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},x.prototype.createGrip=function(){var k=new We;return k.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(k.visual),k},x.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,W=-k/2,ee=W,V=(this.width+this.CB_DISTANCE)/2-k/2,Ee=(this.height+this.CB_DISTANCE)/2-k/2,Ye=this.height+this.CB_DISTANCE-k/2,tt=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,W,ee),this.positionGrip(this.controlGrips.topCenter.visual,V,ee),this.positionGrip(this.controlGrips.topRight.visual,tt,ee),this.positionGrip(this.controlGrips.centerLeft.visual,W,Ee),this.positionGrip(this.controlGrips.centerRight.visual,tt,Ee),this.positionGrip(this.controlGrips.bottomLeft.visual,W,Ye),this.positionGrip(this.controlGrips.bottomCenter.visual,V,Ye),this.positionGrip(this.controlGrips.bottomRight.visual,tt,Ye),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,V,ee-3*this.CB_DISTANCE)},x.prototype.positionGrip=function(k,W,ee){var V=k.transform.baseVal.getItem(0);V.setTranslate(W,ee),k.transform.baseVal.replaceItem(V,0)},x.prototype.hideControlBox=function(){this.controlBox.style.display="none"},x.prototype.showControlBox=function(){this.controlBox.style.display=""},x.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.left=W.left,this.top=W.top,this.width=W.width,this.height=W.height,this.rotationAngle=W.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,W.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,W.containerTransformMatrix))},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W);var ee=this.rotatePoint({x:this.left,y:this.top}),V=this.unrotatePoint({x:ee.x*k,y:ee.y*W});this.left=V.x,this.top=V.y,this.width=this.width*k,this.height=this.height*W,this.adjustControlBox()},x}(Se),Je=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.createVisual=V.createVisual.bind(V),V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual)},x.prototype.createVisual=function(){this.visual=he.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.setSize()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(k){Y.prototype.pointerUp.call(this,k),this.setSize()},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},x.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){var W=k;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize()},x.title="Rectangle marker",x}(Qe),st=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.widths=[],Ee.widthBoxes=[],Ee.widths=W,Ee.currentWidth=ee,Ee.setCurrentWidth=Ee.setCurrentWidth.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.widths.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.flexGrow="2",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentWidth(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.innerText=ee.toString(),Ee.style.marginRight="5px",V.appendChild(Ee);var Ye=document.createElement("div");Ye.style.minHeight="20px",Ye.style.flexGrow="2",Ye.style.display="flex",Ye.style.alignItems="center";var tt=document.createElement("hr");tt.style.minWidth="20px",tt.style.border="0px",tt.style.borderTop=ee+"px solid "+k.uiStyleSettings.toolboxColor,tt.style.flexGrow="2",Ye.appendChild(tt),V.appendChild(Ye),k.widthBoxes.push(V)}),W},x.prototype.setCurrentWidth=function(k,W){var ee=this;this.currentWidth=k,this.widthBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},x}(le),qe=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.styles=[],Ee.styleBoxes=[],Ee.styles=W,Ee.currentStyle=ee,Ee.setCurrentStyle=Ee.setCurrentStyle.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.styles.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/k.styles.length-5+"%",V.style.borderColor=ee===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentStyle(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.overflow="hidden";var Ye=` - `;Ee.innerHTML=Ye,V.appendChild(Ee),k.styleBoxes.push(V)}),W},x.prototype.setCurrentStyle=function(k,W){var ee=this;this.currentStyle=k,this.styleBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}(le),at=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="FrameMarker",x.title="Frame marker",x.icon='',x}(Je),Ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ct=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!!Y.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},x.prototype.pointerUp=function(k){var W=this.state;Y.prototype.pointerUp.call(this,k),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(k),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},x.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=he.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var k=new We;return k.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(k.visual),k},x.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},x.prototype.positionGrip=function(k,W,ee){var V=k.transform.baseVal.getItem(0);V.setTranslate(W,ee),k.transform.baseVal.replaceItem(V,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.x1=this.x1*k,this.y1=this.y1*W,this.x2=this.x2*k,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},x}(Se),lt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),he.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='',x}(ct),je=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=W,Ee.currentFont=ee,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(ee){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/k.fonts.length-5+"%",V.style.borderColor=ee===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentFont(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=ee,Ee.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(Ye),V.appendChild(Ee),k.fontBoxes.push(V)}),W},x.prototype.setCurrentFont=function(k,W){var ee=this;this.currentFont=k,this.fontBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}(le),Ge=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=ee.defaultColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new ve("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new je("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return Te(x,Y),x.prototype.ownsTarget=function(k){if(Y.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(ee){ee===k&&(W=!0)}),W},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.bgRectangle=he.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=he.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.renderText=function(){var k=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(W){k.textElement.appendChild(he.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var k=this.textElement.getBBox(),W=1;if(k.width>0&&k.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/k.width,V=(1*this.height-this.height*this.padding*2/100)/k.height;W=Math.min(ee,V)}return W},x.prototype.getTextPosition=function(k){var W=this.textElement.getBBox(),ee=0,V=0;return W.width>0&&W.height>0&&(ee=(this.width-W.width*k)/2,V=this.height/2-W.height*k/2),{x:ee,y:V}},x.prototype.sizeText=function(){var k=this.textElement.getBBox(),W=this.getTextScale(),ee=this.getTextPosition(W);ee.y-=k.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(k){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),Y.prototype.pointerUp.call(this,k),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var k=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&W>.9;)W-=.1,k.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var ee=W.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(ee)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),V={x:ee.width*k,y:ee.height*k};W.x-=V.x/2,W.y-=V.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){Y.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Y.prototype.deselect.call(this)},x.prototype.dblClick=function(k,W){Y.prototype.dblClick.call(this,k,W),this.showTextEditor()},x.prototype.setColor=function(k){this.textElement&&he.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},x.prototype.setFont=function(k){this.textElement&&he.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){var W=k;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='',x}(Qe),Ae=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=ee.defaultColor,V.lineWidth=ee.defaultStrokeWidth,V.pixelRatio=ee.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new ve("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.drawingImage=he.createImage(),this.visual.appendChild(this.drawingImage);var k=he.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(k.x,k.y),this.drawing=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Y.prototype.pointerUp.call(this,k)},x.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=W[0],V=W[1],Ee=W[2],Ye=W[3],tt=!1,gt=0;gt0&&(tt=!0,gtYe&&(Ye=gt),Xe>Ee&&(Ee=Xe));if(tt){this.left=ee/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(Ee-ee)/this.pixelRatio,this.height=(Ye-V)/this.pixelRatio;var xt=document.createElement("canvas");xt.width=Ee-ee,xt.height=Ye-V,xt.getContext("2d").putImageData(this.canvasContext.getImageData(ee,V,Ee-ee,Ye-V),0,0),this.drawingImgUrl=xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},x.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){this.createVisual(),Y.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='',x}(Qe),_e=function(Y){function x(k,W,ee){var V=Y.call(this,k,ee||'')||this;return V.typeBoxes=[],V.currentType=W,V.setCurrentType=V.setCurrentType.bind(V),V}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var ee=function(Ye){var tt="both";switch(Ye){case 0:tt="both";break;case 1:tt="start";break;case 2:tt="end";break;case 3:tt="none"}var gt=document.createElement("div");if(gt.style.display="flex",gt.style.flexGrow="2",gt.style.alignItems="center",gt.style.justifyContent="space-between",gt.style.padding="5px",gt.style.borderWidth="2px",gt.style.borderStyle="solid",gt.style.borderColor=tt===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",gt.addEventListener("click",function(){k.setCurrentType(tt,gt)}),W.appendChild(gt),tt==="both"||tt==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.innerHTML=` + `;Ee.innerHTML=Ye,V.appendChild(Ee),k.styleBoxes.push(V)}),W},x.prototype.setCurrentStyle=function(k,W){var ee=this;this.currentStyle=k,this.styleBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}(le),at=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="FrameMarker",x.title="Frame marker",x.icon='',x}(Je),Ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},dt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!!Y.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},x.prototype.pointerUp=function(k){var W=this.state;Y.prototype.pointerUp.call(this,k),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(k),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},x.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=he.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var k=new We;return k.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(k.visual),k},x.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},x.prototype.positionGrip=function(k,W,ee){var V=k.transform.baseVal.getItem(0);V.setTranslate(W,ee),k.transform.baseVal.replaceItem(V,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.x1=this.x1*k,this.y1=this.y1*W,this.x2=this.x2*k,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},x}(Se),lt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),he.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='',x}(dt),je=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=W,Ee.currentFont=ee,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(ee){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/k.fonts.length-5+"%",V.style.borderColor=ee===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentFont(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=ee,Ee.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(Ye),V.appendChild(Ee),k.fontBoxes.push(V)}),W},x.prototype.setCurrentFont=function(k,W){var ee=this;this.currentFont=k,this.fontBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}(le),Ge=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=ee.defaultColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new ve("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new je("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return Te(x,Y),x.prototype.ownsTarget=function(k){if(Y.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(ee){ee===k&&(W=!0)}),W},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.bgRectangle=he.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=he.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.renderText=function(){var k=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(W){k.textElement.appendChild(he.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var k=this.textElement.getBBox(),W=1;if(k.width>0&&k.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/k.width,V=(1*this.height-this.height*this.padding*2/100)/k.height;W=Math.min(ee,V)}return W},x.prototype.getTextPosition=function(k){var W=this.textElement.getBBox(),ee=0,V=0;return W.width>0&&W.height>0&&(ee=(this.width-W.width*k)/2,V=this.height/2-W.height*k/2),{x:ee,y:V}},x.prototype.sizeText=function(){var k=this.textElement.getBBox(),W=this.getTextScale(),ee=this.getTextPosition(W);ee.y-=k.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(k){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),Y.prototype.pointerUp.call(this,k),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var k=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&W>.9;)W-=.1,k.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var ee=W.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(ee)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),V={x:ee.width*k,y:ee.height*k};W.x-=V.x/2,W.y-=V.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){Y.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Y.prototype.deselect.call(this)},x.prototype.dblClick=function(k,W){Y.prototype.dblClick.call(this,k,W),this.showTextEditor()},x.prototype.setColor=function(k){this.textElement&&he.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},x.prototype.setFont=function(k){this.textElement&&he.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){var W=k;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='',x}(Qe),Ae=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=ee.defaultColor,V.lineWidth=ee.defaultStrokeWidth,V.pixelRatio=ee.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new ve("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.drawingImage=he.createImage(),this.visual.appendChild(this.drawingImage);var k=he.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(k.x,k.y),this.drawing=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Y.prototype.pointerUp.call(this,k)},x.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=W[0],V=W[1],Ee=W[2],Ye=W[3],tt=!1,gt=0;gt0&&(tt=!0,gtYe&&(Ye=gt),Xe>Ee&&(Ee=Xe));if(tt){this.left=ee/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(Ee-ee)/this.pixelRatio,this.height=(Ye-V)/this.pixelRatio;var xt=document.createElement("canvas");xt.width=Ee-ee,xt.height=Ye-V,xt.getContext("2d").putImageData(this.canvasContext.getImageData(ee,V,Ee-ee,Ye-V),0,0),this.drawingImgUrl=xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},x.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){this.createVisual(),Y.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='',x}(Qe),_e=function(Y){function x(k,W,ee){var V=Y.call(this,k,ee||'')||this;return V.typeBoxes=[],V.currentType=W,V.setCurrentType=V.setCurrentType.bind(V),V}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var ee=function(Ye){var tt="both";switch(Ye){case 0:tt="both";break;case 1:tt="start";break;case 2:tt="end";break;case 3:tt="none"}var gt=document.createElement("div");if(gt.style.display="flex",gt.style.flexGrow="2",gt.style.alignItems="center",gt.style.justifyContent="space-between",gt.style.padding="5px",gt.style.borderWidth="2px",gt.style.borderStyle="solid",gt.style.borderColor=tt===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",gt.addEventListener("click",function(){k.setCurrentType(tt,gt)}),W.appendChild(gt),tt==="both"||tt==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.innerHTML=` `,Xe.style.marginLeft="5px",gt.appendChild(Xe)}var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",xt.appendChild(jt),gt.appendChild(xt),tt==="both"||tt==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.innerHTML=` - `,$t.style.marginRight="5px",gt.appendChild($t)}V.typeBoxes.push(gt)},V=this,Ee=0;Ee<4;Ee++)ee(Ee);return W},x.prototype.setCurrentType=function(k,W){var ee=this;this.currentType=k,this.typeBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}(le),we=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new _e("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},x.prototype.getArrowPoints=function(k,W){var ee=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return k-ee/2+","+(W+V/2)+" "+k+","+(W-V/2)+" "+(k+ee/2)+","+(W+V/2)},x.prototype.createTips=function(){this.arrow1=he.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=he.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",he.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),he.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},x.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='',x}(lt),ae=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor=ee.defaultFillColor,V.strokeWidth=0,V.fillPanel=new ve("Color",ee.defaultColorSet,ee.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="CoverMarker",x.title="Cover marker",x.icon='',x}(Je),ue=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=W,Ee.currentOpacity=ee,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentOpacity(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.innerText=100*ee+"%",V.appendChild(Ee),k.opacityBoxes.push(V)}),W},x.prototype.setCurrentOpacity=function(k,W){var ee=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}(le),ce=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=ee.defaultHighlightColor,V.strokeWidth=0,V.opacity=ee.defaultHighlightOpacity,V.fillPanel=new ve("Color",ee.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new ue("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return Te(x,Y),x.prototype.setOpacity=function(k){this.opacity=k,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='',x}(ae),me='',xe=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=ee.defaultStrokeColor,V.bgColor=ee.defaultFillColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new ve("Text color",ee.defaultColorSet,V.color,''),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new ve("Fill color",ee.defaultColorSet,V.bgColor,me),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new je("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new We,V.tipGrip.visual.transform.baseVal.appendItem(he.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return Te(x,Y),x.prototype.ownsTarget=function(k){return Y.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},x.prototype.createTip=function(){he.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=he.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(k,W){this.state==="new"&&Y.prototype.pointerDown.call(this,k,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Y.prototype.pointerUp.call(this,k);else{var W=this.state==="creating";Y.prototype.pointerUp.call(this,k),this.setTipPoints(W),this.positionTip()}},x.prototype.manipulate=function(k){if(this.tipMoving){var W=this.unrotatePoint(k);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else Y.prototype.manipulate.call(this,k)},x.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(he.setAttributes(this.bgRectangle,[["fill",k]]),he.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},x.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},x.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var W=Math.min(this.height/2,15),ee=this.height/5;k&&(this.tipPosition={x:W+ee/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?V.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='',x}(lt),ze=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokePanel.colors=ee.defaultColorSet,V.fillColor="transparent",V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='',x}(Pe),ht=function(){function Y(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Y.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},Y.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},Y.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Y.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Y.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Y}(),ot=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorCurve=he.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=he.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),he.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){Y.prototype.setupControlBox.call(this),this.curveControlLine1=he.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=he.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Y.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){Y.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},x.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Y.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},x.prototype.scale=function(k,W){this.curveX=this.curveX*k,this.curveY=this.curveY*W,Y.prototype.scale.call(this,k,W)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='',x}(ct),yt=function(){function Y(x,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=k}return Object.defineProperty(Y.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Y.prototype.preventDefault=function(){this._defaultPrevented=!0},Y}(),dt=function(Y){function x(k,W,ee){var V=Y.call(this,k,!1)||this;return V.dataUrl=W,V.state=ee,V}return Te(x,Y),x}(yt),ft=function(Y){function x(k,W,ee){ee===void 0&&(ee=!1);var V=Y.call(this,k,ee)||this;return V.marker=W,V}return Te(x,Y),x}(yt),Ot=function(){function Y(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Y.prototype.addEventListener=function(x,k){this[x].push(k)},Y.prototype.removeEventListener=function(x,k){var W=this[x].indexOf(k);W>-1&&this[x].splice(W,1)},Y}(),It=function(){function Y(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ue,this._isOpen=!1,this.undoRedoManager=new ht,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Y.instanceCounter++,this.styles=new De(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Y.prototype,"ALL_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,ze,Pe,ce,xe,He,ae,lt,ot]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,Pe,ce,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"BASIC_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var k=this;this._availableMarkerTypes.splice(0),x.forEach(function(W){if(typeof W=="string"){var ee=k.ALL_MARKER_TYPES.find(function(V){return V.typeName===W});ee!==void 0&&k._availableMarkerTypes.push(ee)}else k._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Y.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&oe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=oe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new yt(x))})},Y.prototype.render=function(){return Re(this,void 0,void 0,function(){var x;return Le(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(x=new fe).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Y.prototype.close=function(x){var k=this;if(x===void 0&&(x=!1),this.isOpen){var W=!1;x||this.eventListeners.beforeclose.forEach(function(ee){var V=new yt(k,!0);ee(V),V.defaultPrevented&&(W=!0)}),W||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ee){return ee(new yt(k))}),this.detachEvents(),this._isOpen=!1)}},Y.prototype.addMarkersToToolbar=function(){for(var x,k=[],W=0;Wthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,W=k',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Y.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Y.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ne(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(x),1),x.dispose()},Y.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Y.prototype.toolbarButtonClicked=function(x,k){if(x==="marker"&&k!==void 0)this.createNewMarker(k);else if(x==="action")switch(k){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Y.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var V=new ft(x,x._currentMarker,!0);ee(V),V.defaultPrevented&&(k=!0)}),!k){var W=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ee){return ee(new ft(x,W))})}}},Y.prototype.clear=function(){var x=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var Ye=new ft(x,void 0,!0);Ee(Ye),Ye.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var W=function(Ee){var Ye=ee.markers[Ee];ee.setCurrentMarker(ee.markers[Ee]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(tt){return tt(new ft(x,Ye))})},ee=this,V=this.markers.length-1;V>=0;V--)W(V);this.addUndoStep()}},Object.defineProperty(Y.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Y.prototype.showNotesEditor=function(){var x;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},Y.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Y.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Y.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===k.width&&W.height===k.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),ee1&&this.panTo({x:x.clientX,y:x.clientY}))},Y.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},Y.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Y.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.markerImage.getBoundingClientRect();return{x:(x-W.left)/this.zoomLevel,y:(k-W.top)/this.zoomLevel}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Y.prototype.addLicenseKey=function(x){re.addKey(x)},Y.prototype.addEventListener=function(x,k){this.eventListeners.addEventListener(x,k)},Y.prototype.removeEventListener=function(x,k){this.eventListeners.removeEventListener(x,k)},Y.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Y.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Y.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new yt(x))}))},Y.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new yt(x))}))},Y.instanceCounter=0,Y}();/* ********************************** + `,$t.style.marginRight="5px",gt.appendChild($t)}V.typeBoxes.push(gt)},V=this,Ee=0;Ee<4;Ee++)ee(Ee);return W},x.prototype.setCurrentType=function(k,W){var ee=this;this.currentType=k,this.typeBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}(le),we=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new _e("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},x.prototype.getArrowPoints=function(k,W){var ee=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return k-ee/2+","+(W+V/2)+" "+k+","+(W-V/2)+" "+(k+ee/2)+","+(W+V/2)},x.prototype.createTips=function(){this.arrow1=he.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=he.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",he.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),he.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},x.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='',x}(lt),ae=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor=ee.defaultFillColor,V.strokeWidth=0,V.fillPanel=new ve("Color",ee.defaultColorSet,ee.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="CoverMarker",x.title="Cover marker",x.icon='',x}(Je),ue=function(Y){function x(k,W,ee,V){var Ee=Y.call(this,k,V||'')||this;return Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=W,Ee.currentOpacity=ee,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return Te(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentOpacity(ee,V)}),W.appendChild(V);var Ee=document.createElement("div");Ee.innerText=100*ee+"%",V.appendChild(Ee),k.opacityBoxes.push(V)}),W},x.prototype.setCurrentOpacity=function(k,W){var ee=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}(le),de=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=ee.defaultHighlightColor,V.strokeWidth=0,V.opacity=ee.defaultHighlightOpacity,V.fillPanel=new ve("Color",ee.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new ue("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return Te(x,Y),x.prototype.setOpacity=function(k){this.opacity=k,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='',x}(ae),me='',xe=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=ee.defaultStrokeColor,V.bgColor=ee.defaultFillColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new ve("Text color",ee.defaultColorSet,V.color,''),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new ve("Fill color",ee.defaultColorSet,V.bgColor,me),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new je("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new We,V.tipGrip.visual.transform.baseVal.appendItem(he.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return Te(x,Y),x.prototype.ownsTarget=function(k){return Y.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},x.prototype.createTip=function(){he.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=he.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(k,W){this.state==="new"&&Y.prototype.pointerDown.call(this,k,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Y.prototype.pointerUp.call(this,k);else{var W=this.state==="creating";Y.prototype.pointerUp.call(this,k),this.setTipPoints(W),this.positionTip()}},x.prototype.manipulate=function(k){if(this.tipMoving){var W=this.unrotatePoint(k);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else Y.prototype.manipulate.call(this,k)},x.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(he.setAttributes(this.bgRectangle,[["fill",k]]),he.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},x.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},x.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var W=Math.min(this.height/2,15),ee=this.height/5;k&&(this.tipPosition={x:W+ee/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?V.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='',x}(lt),ze=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokePanel.colors=ee.defaultColorSet,V.fillColor="transparent",V}return Te(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='',x}(Pe),ht=function(){function Y(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Y.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},Y.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},Y.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Y.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Y.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Y}(),ot=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new ve("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new st("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Te(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorCurve=he.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=he.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),he.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){Y.prototype.setupControlBox.call(this),this.curveControlLine1=he.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=he.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Y.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){Y.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},x.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Y.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},x.prototype.scale=function(k,W){this.curveX=this.curveX*k,this.curveY=this.curveY*W,Y.prototype.scale.call(this,k,W)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='',x}(dt),yt=function(){function Y(x,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=k}return Object.defineProperty(Y.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Y.prototype.preventDefault=function(){this._defaultPrevented=!0},Y}(),ct=function(Y){function x(k,W,ee){var V=Y.call(this,k,!1)||this;return V.dataUrl=W,V.state=ee,V}return Te(x,Y),x}(yt),ft=function(Y){function x(k,W,ee){ee===void 0&&(ee=!1);var V=Y.call(this,k,ee)||this;return V.marker=W,V}return Te(x,Y),x}(yt),Ot=function(){function Y(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Y.prototype.addEventListener=function(x,k){this[x].push(k)},Y.prototype.removeEventListener=function(x,k){var W=this[x].indexOf(k);W>-1&&this[x].splice(W,1)},Y}(),It=function(){function Y(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ue,this._isOpen=!1,this.undoRedoManager=new ht,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Y.instanceCounter++,this.styles=new De(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Y.prototype,"ALL_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,ze,Pe,de,xe,He,ae,lt,ot]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,Pe,de,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"BASIC_MARKER_TYPES",{get:function(){return[at,Ae,we,Ge,de]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var k=this;this._availableMarkerTypes.splice(0),x.forEach(function(W){if(typeof W=="string"){var ee=k.ALL_MARKER_TYPES.find(function(V){return V.typeName===W});ee!==void 0&&k._availableMarkerTypes.push(ee)}else k._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Y.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&oe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=oe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new yt(x))})},Y.prototype.render=function(){return Re(this,void 0,void 0,function(){var x;return Le(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(x=new fe).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Y.prototype.close=function(x){var k=this;if(x===void 0&&(x=!1),this.isOpen){var W=!1;x||this.eventListeners.beforeclose.forEach(function(ee){var V=new yt(k,!0);ee(V),V.defaultPrevented&&(W=!0)}),W||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ee){return ee(new yt(k))}),this.detachEvents(),this._isOpen=!1)}},Y.prototype.addMarkersToToolbar=function(){for(var x,k=[],W=0;Wthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,W=k',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Y.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Y.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ne(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(x),1),x.dispose()},Y.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Y.prototype.toolbarButtonClicked=function(x,k){if(x==="marker"&&k!==void 0)this.createNewMarker(k);else if(x==="action")switch(k){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Y.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var V=new ft(x,x._currentMarker,!0);ee(V),V.defaultPrevented&&(k=!0)}),!k){var W=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ee){return ee(new ft(x,W))})}}},Y.prototype.clear=function(){var x=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var Ye=new ft(x,void 0,!0);Ee(Ye),Ye.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var W=function(Ee){var Ye=ee.markers[Ee];ee.setCurrentMarker(ee.markers[Ee]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(tt){return tt(new ft(x,Ye))})},ee=this,V=this.markers.length-1;V>=0;V--)W(V);this.addUndoStep()}},Object.defineProperty(Y.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Y.prototype.showNotesEditor=function(){var x;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},Y.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Y.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Y.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===k.width&&W.height===k.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),ee1&&this.panTo({x:x.clientX,y:x.clientY}))},Y.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},Y.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Y.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.markerImage.getBoundingClientRect();return{x:(x-W.left)/this.zoomLevel,y:(k-W.top)/this.zoomLevel}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Y.prototype.addLicenseKey=function(x){re.addKey(x)},Y.prototype.addEventListener=function(x,k){this.eventListeners.addEventListener(x,k)},Y.prototype.removeEventListener=function(x,k){this.eventListeners.removeEventListener(x,k)},Y.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Y.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Y.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new yt(x))}))},Y.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new yt(x))}))},Y.instanceCounter=0,Y}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE @@ -190,7 +190,7 @@ PERFORMANCE OF THIS SOFTWARE. `)),this.addClass(new wt("_fade_out",` animation-duration: 0.3s; animation-name: `+this.classNamePrefix+`_fade_out_animation_frames; - `))},Y.prototype.removeStyleSheet=function(){var x;this.styleSheet&&(((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Y}(),Et=function(Y,x){this.selector=Y,this.style=x},wt=function(Y,x){this.localName=Y,this.style=x},Ut=function(){function Y(){this.blocks=[],this.display=""}return Y.prototype.addButtonBlock=function(x){x.className=this.blockClassName,x.buttonClassName=this.buttonClassName,x.buttonColorsClassName=this.buttonColorsClassName,x.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(x)},Y.prototype.addElementBlock=function(x){x.className===void 0&&(x.className=this.blockClassName),this.blocks.push(x)},Y.prototype.getUI=function(){var x=document.createElement("div");return x.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,x.style.display=this.display,this.blocks.forEach(function(k){return x.appendChild(k.getUI())}),x},Y}(),tr=function(){function Y(){}return Y.prototype.getUI=function(){var x=document.createElement("div");if(x.className=this.className,this.minWidth!==void 0&&(x.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":x.style.justifyContent="flex-start";break;case"center":x.style.justifyContent="center";break;case"end":x.style.justifyContent="flex-end"}return x.style.whiteSpace="nowrap",x},Y}(),dr=function(Y){function x(){var k=Y!==null&&Y.apply(this,arguments)||this;return k.buttons=[],k}return Zt(x,Y),x.prototype.addButton=function(k){k.className=this.buttonClassName,k.colorsClassName=this.buttonColorsClassName,k.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(k)},x.prototype.getUI=function(){var k=Y.prototype.getUI.call(this);return this.buttons.forEach(function(W){return k.appendChild(W.getUI())}),k},x}(tr),Nt=function(){function Y(x,k){this._isActive=!1,this._isHidden=!1,this._icon=x,this.title=k,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Y.prototype,"icon",{get:function(){return this._icon},set:function(x){this._icon=x,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isActive",{get:function(){return this._isActive},set:function(x){this._isActive=x,this.adjustClassName()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){var x=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return x.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Y.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},Y.prototype.hide=function(){this._isHidden=!0},Y}(),mt=function(Y){function x(){var k=Y!==null&&Y.apply(this,arguments)||this;return k.elements=[],k}return Zt(x,Y),x.prototype.addElement=function(k){this.elements.push(k)},x.prototype.getUI=function(){var k=Y.prototype.getUI.call(this);return this.elements.forEach(function(W){return k.appendChild(W)}),k},x}(tr),Br=function(){function Y(x,k){this.horizontal=x,this.vertical=k}return Object.defineProperty(Y.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Y.prototype.getVerticalLength=function(x){return x/this.ratio},Y.prototype.getHorizontalLength=function(x){return x*this.ratio},Y}(),Vt=function(){function Y(){}return Y.getIcon=function(x,k){if(x>0&&k>0){var W=new Br(x,k),ee=W.ratio>=1?20:W.getHorizontalLength(20),V=W.ratio<1?20:W.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ye=_t.createDefs();Ee.appendChild(Ye);var tt=_t.createElement("clipPath",[["id","text-bg-clip"]]);Ye.appendChild(tt);var gt=_t.createPath(_t.getHollowRectanglePath((24-ee)/2,(24-V)/2,ee,V,(24-ee)/2+2,(24-V)/2+2,ee-4,V-4));Ee.appendChild(gt);var Xe=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(_t.createTSpan(x+":"+k)),Ee.appendChild(Xe);var xt=Xe.getBBox();_t.setAttributes(Xe,[["x",((24-xt.width)/2).toString()],["y",((24-xt.height)/2-xt.y).toString()]]);var jt=_t.createPath(_t.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(xt.width))/2,(24-Math.ceil(xt.height))/2,Math.ceil(xt.width),Math.ceil(xt.height)));return tt.appendChild(jt),_t.setAttributes(gt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return''},Y}(),Jt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W)||this;return V.isDropdownOpen=!1,V.onClick=V.dropdownButtonClicked,V.dropdownButtons=ee,V}return Zt(x,Y),x.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(W){W.className=k.className,W.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(W.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(Nt),Rt=function(){function Y(x,k){this.GRIP_SIZE=10,this.color=x,this.fillColor=k,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},Y.prototype.setCenter=function(x,k){this.visual.childNodes.forEach(function(W){return _t.setAttributes(W,[["cx",x.toString()],["cy",k.toString()]])})},Y}(),lr=function(){function Y(x,k,W,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=k,this.margin=W,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&_t.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Y.prototype.open=function(){var x=this;this.cropShadeElement=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),_t.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var W=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(V,Ee){var Ye=k.y+W*(Ee+1);_t.setAttributes(V,[["x1",""+k.x],["y1",""+Ye],["x2",""+(k.x+k.width)],["y2",""+Ye]])});var ee=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(V,Ee){var Ye=k.x+ee*(Ee+1);_t.setAttributes(V,[["x1",""+Ye],["y1",""+k.y],["x2",""+Ye],["y2",""+(k.y+k.height)]])}),_t.setAttributes(this.cropShadeElement,[["d",_t.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Y.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.container.getBoundingClientRect();return{x:x-W.left+this.margin,y:k-W.top+this.margin}},Y.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},Y.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(k)}x.preventDefault()},Y.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},Y.prototype.move=function(x){var k=x.x-this.previousPoint.x,W=x.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,W=-W/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+W),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=x},Y.prototype.resize=function(x){var k=Object.assign({},this.cropRect),W=x.x-this.previousPoint.x,ee=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Wthis.canvasWidth*this.zoomFactor&&(W=this.canvasWidth*this.zoomFactor-k.width),k.width+=W}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(W),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=ee,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=ee}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=x,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Y.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,W=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);W/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=x-this.cropRect.width/2,this.cropRect.y=k-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Y.prototype.getRescaledRect=function(x,k,W,ee,V,Ee){var Ye=W/x,tt=ee/k;return{x:(V.x-Ee)*Ye+Ee,y:(V.y-Ee)*tt+Ee,width:V.width*Ye,height:V.height*tt}},Y.prototype.scaleCanvas=function(x,k){var W=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,k,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=k,this.onCropChange&&this.onCropChange(W),this.setCropRectangle(W)},Y}(),Ir=function(){function Y(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Y.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Y.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},Y.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},Y.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},Y.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();_t.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},Y.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},Y.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,W=1;W<=this.width/5+10;W++){var ee=W%5==0?this.height/3:this.height/6;k+="h4v"+-ee+"h1v"+ee}k+="v1H0Z",this.scaleShape=_t.createPath(k);var V=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(V),x.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=_t.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},Y}(),Xr=function(){function Y(){this.naturalSize=!1,this.imageType="image/png"}return Y.prototype.rasterize=function(x,k,W,ee,V,Ee,Ye){var tt=this;return new Promise(function(gt){var Xe=document.createElement("canvas");Xe.width=x.width.baseVal.value-2*ee,Xe.height=x.height.baseVal.value-2*ee;var xt=1,jt=1;tt.naturalSize===!0?(xt=k.naturalWidth/(x.width.baseVal.value-2*ee)/Ee,jt=k.naturalHeight/(x.height.baseVal.value-2*ee)/Ye,Xe.width=k.naturalWidth/Ee,Xe.height=k.naturalHeight/Ye):tt.width!==void 0&&tt.height!==void 0&&(xt=tt.width/W.width,jt=tt.height/W.height,Xe.width*=xt,Xe.height*=jt);var $t=Xe.getContext("2d");$t.translate(Xe.width/2,Xe.height/2),$t.rotate(V*Math.PI/180),$t.scale(Ee,Ye),$t.translate(-Xe.width/2,-Xe.height/2),$t.drawImage(k,0,0,Xe.width,Xe.height);var jr=document.createElement("canvas");jr.width=W.width*xt,jr.height=W.height*jt,jr.getContext("2d").putImageData($t.getImageData((W.x-ee)*xt,(W.y-ee)*jt,W.width*xt,W.height*jt),0,0),gt(jr.toDataURL(tt.imageType,tt.imageQuality))})},Y}(),Ze=function(){function Y(x){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Y.instanceCounter++,this.styles=new Lr(this.instanceNo),this.target=x,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Y.prototype.show=function(){this.showUI(),this.open()},Y.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Y.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},Y.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},Y.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},Y.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},Y.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Y.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,W=k+2*this.CANVAS_MARGINx+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Y.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Y.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new Ut,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new dr;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var W=[];this.aspectRatios.forEach(function(jt){var $t=new Nt(Vt.getIcon(jt.horizontal,jt.vertical),jt.horizontal===0&&jt.vertical===0?"FREE":jt.horizontal+":"+jt.vertical);$t.onClick=function(){return x.ratioButtonClicked(jt)},W.push($t)}),this.aspectRatioButton=new Jt(Vt.getIcon(0,0),"Aspect ratio",W),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Nt('',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){x.isGridVisible=!x.isGridVisible,ee.isActive=x.isGridVisible},k.addButton(ee);var V=new Nt('',"Zoom to selection");if(V.isActive=this.zoomToCropEnabled,V.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,V.isActive=x.zoomToCropEnabled},k.addButton(V),!Kr.isLicensed){var Ee=new mt;this.topToolbar.addElementBlock(Ee);var Ye=document.createElement("div");Ye.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var tt=document.createElement("a");tt.style.color="currentColor",tt.href="https://markerjs.com/products/cropro",tt.target="_blank",tt.innerHTML='',Ye.appendChild(tt),Ee.addElement(Ye)}var gt=new dr;gt.minWidth=3*this.toolbarHeight+"px",gt.contentAlign="end",this.topToolbar.addButtonBlock(gt);var Xe=new Nt('',"OK");Xe.onClick=this.startRenderAndClose,gt.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var xt=new Nt('',"Close");xt.onClick=this.close,gt.addButton(xt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(xt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Y.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new Ut,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new dr;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var W=new Nt('',"Rotate left");W.onClick=this.rotateLeftButtonClicked,k.addButton(W);var ee=new Nt('',"Rotate right");ee.onClick=this.rotateRightButtonClicked,k.addButton(ee);var V=new mt;V.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(V),this.straightener=new Ir("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(gt){x.rotateBy(gt),x.straightener.angle=x.rotationAngle},V.addElement(this.straightener.getUI());var Ee=new dr;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ye=new Nt('',"Flip horizontal");Ye.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ye);var tt=new Nt('',"Flip vertical");tt.onClick=this.flipVerticallyButtonClicked,Ee.addButton(tt)},Y.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Y.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Vt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Y.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Br(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Y.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Y.prototype.restoreState=function(x){if(x){var k=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.cropImage.getBoundingClientRect();return{x:x-W.left,y:k-W.top}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Y.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},Y.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},Y.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var W=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/W.width,this.imageHeight/W.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=x},Y.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Y.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Y.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Y.prototype.startRenderAndClose=function(){return Dt(this,void 0,void 0,function(){var x,k;return Cr(this,function(W){switch(W.label){case 0:return[4,this.render()];case 1:return x=W.sent(),k=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(x,k)}),this.close(!0),[2]}})})},Y.prototype.render=function(){return Dt(this,void 0,void 0,function(){var x;return Cr(this,function(k){switch(k.label){case 0:return(x=new Xr).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),_t.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return k.sent(),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,k.sent()]}})})},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new wt("toolbar",` + `))},Y.prototype.removeStyleSheet=function(){var x;this.styleSheet&&(((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Y}(),Et=function(Y,x){this.selector=Y,this.style=x},wt=function(Y,x){this.localName=Y,this.style=x},Ut=function(){function Y(){this.blocks=[],this.display=""}return Y.prototype.addButtonBlock=function(x){x.className=this.blockClassName,x.buttonClassName=this.buttonClassName,x.buttonColorsClassName=this.buttonColorsClassName,x.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(x)},Y.prototype.addElementBlock=function(x){x.className===void 0&&(x.className=this.blockClassName),this.blocks.push(x)},Y.prototype.getUI=function(){var x=document.createElement("div");return x.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,x.style.display=this.display,this.blocks.forEach(function(k){return x.appendChild(k.getUI())}),x},Y}(),tr=function(){function Y(){}return Y.prototype.getUI=function(){var x=document.createElement("div");if(x.className=this.className,this.minWidth!==void 0&&(x.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":x.style.justifyContent="flex-start";break;case"center":x.style.justifyContent="center";break;case"end":x.style.justifyContent="flex-end"}return x.style.whiteSpace="nowrap",x},Y}(),cr=function(Y){function x(){var k=Y!==null&&Y.apply(this,arguments)||this;return k.buttons=[],k}return Zt(x,Y),x.prototype.addButton=function(k){k.className=this.buttonClassName,k.colorsClassName=this.buttonColorsClassName,k.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(k)},x.prototype.getUI=function(){var k=Y.prototype.getUI.call(this);return this.buttons.forEach(function(W){return k.appendChild(W.getUI())}),k},x}(tr),Nt=function(){function Y(x,k){this._isActive=!1,this._isHidden=!1,this._icon=x,this.title=k,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Y.prototype,"icon",{get:function(){return this._icon},set:function(x){this._icon=x,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isActive",{get:function(){return this._isActive},set:function(x){this._isActive=x,this.adjustClassName()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){var x=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return x.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Y.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},Y.prototype.hide=function(){this._isHidden=!0},Y}(),mt=function(Y){function x(){var k=Y!==null&&Y.apply(this,arguments)||this;return k.elements=[],k}return Zt(x,Y),x.prototype.addElement=function(k){this.elements.push(k)},x.prototype.getUI=function(){var k=Y.prototype.getUI.call(this);return this.elements.forEach(function(W){return k.appendChild(W)}),k},x}(tr),Br=function(){function Y(x,k){this.horizontal=x,this.vertical=k}return Object.defineProperty(Y.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Y.prototype.getVerticalLength=function(x){return x/this.ratio},Y.prototype.getHorizontalLength=function(x){return x*this.ratio},Y}(),Vt=function(){function Y(){}return Y.getIcon=function(x,k){if(x>0&&k>0){var W=new Br(x,k),ee=W.ratio>=1?20:W.getHorizontalLength(20),V=W.ratio<1?20:W.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ye=_t.createDefs();Ee.appendChild(Ye);var tt=_t.createElement("clipPath",[["id","text-bg-clip"]]);Ye.appendChild(tt);var gt=_t.createPath(_t.getHollowRectanglePath((24-ee)/2,(24-V)/2,ee,V,(24-ee)/2+2,(24-V)/2+2,ee-4,V-4));Ee.appendChild(gt);var Xe=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(_t.createTSpan(x+":"+k)),Ee.appendChild(Xe);var xt=Xe.getBBox();_t.setAttributes(Xe,[["x",((24-xt.width)/2).toString()],["y",((24-xt.height)/2-xt.y).toString()]]);var jt=_t.createPath(_t.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(xt.width))/2,(24-Math.ceil(xt.height))/2,Math.ceil(xt.width),Math.ceil(xt.height)));return tt.appendChild(jt),_t.setAttributes(gt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return''},Y}(),Jt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W)||this;return V.isDropdownOpen=!1,V.onClick=V.dropdownButtonClicked,V.dropdownButtons=ee,V}return Zt(x,Y),x.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(W){W.className=k.className,W.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(W.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(Nt),Rt=function(){function Y(x,k){this.GRIP_SIZE=10,this.color=x,this.fillColor=k,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},Y.prototype.setCenter=function(x,k){this.visual.childNodes.forEach(function(W){return _t.setAttributes(W,[["cx",x.toString()],["cy",k.toString()]])})},Y}(),lr=function(){function Y(x,k,W,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=k,this.margin=W,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&_t.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Y.prototype.open=function(){var x=this;this.cropShadeElement=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),_t.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var W=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(V,Ee){var Ye=k.y+W*(Ee+1);_t.setAttributes(V,[["x1",""+k.x],["y1",""+Ye],["x2",""+(k.x+k.width)],["y2",""+Ye]])});var ee=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(V,Ee){var Ye=k.x+ee*(Ee+1);_t.setAttributes(V,[["x1",""+Ye],["y1",""+k.y],["x2",""+Ye],["y2",""+(k.y+k.height)]])}),_t.setAttributes(this.cropShadeElement,[["d",_t.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Y.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.container.getBoundingClientRect();return{x:x-W.left+this.margin,y:k-W.top+this.margin}},Y.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},Y.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(k)}x.preventDefault()},Y.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},Y.prototype.move=function(x){var k=x.x-this.previousPoint.x,W=x.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,W=-W/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+W),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=x},Y.prototype.resize=function(x){var k=Object.assign({},this.cropRect),W=x.x-this.previousPoint.x,ee=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Wthis.canvasWidth*this.zoomFactor&&(W=this.canvasWidth*this.zoomFactor-k.width),k.width+=W}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(W),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=ee,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=ee}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=x,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Y.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,W=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);W/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=x-this.cropRect.width/2,this.cropRect.y=k-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Y.prototype.getRescaledRect=function(x,k,W,ee,V,Ee){var Ye=W/x,tt=ee/k;return{x:(V.x-Ee)*Ye+Ee,y:(V.y-Ee)*tt+Ee,width:V.width*Ye,height:V.height*tt}},Y.prototype.scaleCanvas=function(x,k){var W=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,k,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=k,this.onCropChange&&this.onCropChange(W),this.setCropRectangle(W)},Y}(),Ir=function(){function Y(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Y.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Y.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},Y.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},Y.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},Y.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();_t.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},Y.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},Y.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,W=1;W<=this.width/5+10;W++){var ee=W%5==0?this.height/3:this.height/6;k+="h4v"+-ee+"h1v"+ee}k+="v1H0Z",this.scaleShape=_t.createPath(k);var V=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(V),x.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=_t.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},Y}(),Xr=function(){function Y(){this.naturalSize=!1,this.imageType="image/png"}return Y.prototype.rasterize=function(x,k,W,ee,V,Ee,Ye){var tt=this;return new Promise(function(gt){var Xe=document.createElement("canvas");Xe.width=x.width.baseVal.value-2*ee,Xe.height=x.height.baseVal.value-2*ee;var xt=1,jt=1;tt.naturalSize===!0?(xt=k.naturalWidth/(x.width.baseVal.value-2*ee)/Ee,jt=k.naturalHeight/(x.height.baseVal.value-2*ee)/Ye,Xe.width=k.naturalWidth/Ee,Xe.height=k.naturalHeight/Ye):tt.width!==void 0&&tt.height!==void 0&&(xt=tt.width/W.width,jt=tt.height/W.height,Xe.width*=xt,Xe.height*=jt);var $t=Xe.getContext("2d");$t.translate(Xe.width/2,Xe.height/2),$t.rotate(V*Math.PI/180),$t.scale(Ee,Ye),$t.translate(-Xe.width/2,-Xe.height/2),$t.drawImage(k,0,0,Xe.width,Xe.height);var jr=document.createElement("canvas");jr.width=W.width*xt,jr.height=W.height*jt,jr.getContext("2d").putImageData($t.getImageData((W.x-ee)*xt,(W.y-ee)*jt,W.width*xt,W.height*jt),0,0),gt(jr.toDataURL(tt.imageType,tt.imageQuality))})},Y}(),Ze=function(){function Y(x){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Y.instanceCounter++,this.styles=new Lr(this.instanceNo),this.target=x,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Y.prototype.show=function(){this.showUI(),this.open()},Y.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Y.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},Y.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},Y.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},Y.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},Y.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Y.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,W=k+2*this.CANVAS_MARGINx+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Y.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Y.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new Ut,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new cr;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var W=[];this.aspectRatios.forEach(function(jt){var $t=new Nt(Vt.getIcon(jt.horizontal,jt.vertical),jt.horizontal===0&&jt.vertical===0?"FREE":jt.horizontal+":"+jt.vertical);$t.onClick=function(){return x.ratioButtonClicked(jt)},W.push($t)}),this.aspectRatioButton=new Jt(Vt.getIcon(0,0),"Aspect ratio",W),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Nt('',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){x.isGridVisible=!x.isGridVisible,ee.isActive=x.isGridVisible},k.addButton(ee);var V=new Nt('',"Zoom to selection");if(V.isActive=this.zoomToCropEnabled,V.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,V.isActive=x.zoomToCropEnabled},k.addButton(V),!Kr.isLicensed){var Ee=new mt;this.topToolbar.addElementBlock(Ee);var Ye=document.createElement("div");Ye.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var tt=document.createElement("a");tt.style.color="currentColor",tt.href="https://markerjs.com/products/cropro",tt.target="_blank",tt.innerHTML='',Ye.appendChild(tt),Ee.addElement(Ye)}var gt=new cr;gt.minWidth=3*this.toolbarHeight+"px",gt.contentAlign="end",this.topToolbar.addButtonBlock(gt);var Xe=new Nt('',"OK");Xe.onClick=this.startRenderAndClose,gt.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var xt=new Nt('',"Close");xt.onClick=this.close,gt.addButton(xt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(xt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Y.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new Ut,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new cr;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var W=new Nt('',"Rotate left");W.onClick=this.rotateLeftButtonClicked,k.addButton(W);var ee=new Nt('',"Rotate right");ee.onClick=this.rotateRightButtonClicked,k.addButton(ee);var V=new mt;V.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(V),this.straightener=new Ir("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(gt){x.rotateBy(gt),x.straightener.angle=x.rotationAngle},V.addElement(this.straightener.getUI());var Ee=new cr;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ye=new Nt('',"Flip horizontal");Ye.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ye);var tt=new Nt('',"Flip vertical");tt.onClick=this.flipVerticallyButtonClicked,Ee.addButton(tt)},Y.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Y.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Vt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Y.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Br(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Y.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Y.prototype.restoreState=function(x){if(x){var k=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.cropImage.getBoundingClientRect();return{x:x-W.left,y:k-W.top}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Y.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},Y.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},Y.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var W=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/W.width,this.imageHeight/W.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=x},Y.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Y.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Y.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Y.prototype.startRenderAndClose=function(){return Dt(this,void 0,void 0,function(){var x,k;return Cr(this,function(W){switch(W.label){case 0:return[4,this.render()];case 1:return x=W.sent(),k=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(x,k)}),this.close(!0),[2]}})})},Y.prototype.render=function(){return Dt(this,void 0,void 0,function(){var x;return Cr(this,function(k){switch(k.label){case 0:return(x=new Xr).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),_t.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return k.sent(),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,k.sent()]}})})},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new wt("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; @@ -253,35 +253,35 @@ PERFORMANCE OF THIS SOFTWARE. `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new wt("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; - `))},Y.instanceCounter=0,Y}(),Ct=Z("8hTe"),mn=Z.n(Ct),gn=/]*>/g;function vn(Y){var x=document.createElement("div");return x.innerHTML=Y,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var yn=be.a=function(Y){var x=Y.value,k=x===void 0?"":x,W=Y.edit,ee=W===void 0?!1:W,V=Y.className,Ee=Y.showTextOnly,Ye=Y.showLines,tt=Y.replaces,gt=Y.zoomImg,Xe=Y.hasMask,xt=Y.style,jt=xt===void 0?{}:xt,$t=Y.stylesPrev,jr=$t===void 0?{}:$t,Er=String(k),xr=Object(L.useRef)(),Zr=Object(L.useRef)(),Dn=Object(L.useState)(""),cr=Object(K.a)(Dn,2),zr=cr[0],un=cr[1],hn=Object(L.useState)("office"),Hr=Object(K.a)(hn,2),kn=Hr[0],bn=Hr[1],zn=function(){var Ht=new Ze(Zr.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var yr=Object(U.a)(r.a.mark(function Mt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return xr.current.style.display="none",fr.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar}});case 3:Kt=fr.sent,Kt!=null&&Kt.id&&tt(Zr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return fr.stop()}},Mt)}));return function(Mt){return yr.apply(this,arguments)}}()),Ht.show()},Vn=function(){var Ht=new It(Zr.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var yr=Object(U.a)(r.a.mark(function Mt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(xr.current.style.display="none",!Zr.current){fr.next=6;break}return fr.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar.dataUrl}});case 4:Kt=fr.sent,Kt!=null&&Kt.id&&tt(Zr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return fr.stop()}},Mt)}));return function(Mt){return yr.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Qr=Object(L.useMemo)(function(){xr.current&&(xr.current.style.zIndex=-1);try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Er=Er.replace(nr,"("+$.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+$.a.API_SERVER+"/api/attachments/").replace(yr,'"'+$.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` -`)}catch(nn){}var Mt=M(Er),ar=S();if(Er.match(/\[TOC\]/)&&(Mt=Mt.replace("

      [TOC]

      ",D()),O()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(nn,fr){var Ar=ar[fr],Yn=Ar.type,xn=Ar.expression;return Object(ne.renderToString)(vn(xn)||"",{displayMode:Yn==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),y(),Ee){var Kt=document.createElement("div");return Kt.innerHTML=Mt,Kt.innerText}return setTimeout(function(){return di()},500),Mt},[Er]),$r=Object(L.useRef)();E.WebkitLineClamp=Ye,Ye&&(jt=Object(j.a)(Object(j.a)({},jt),E));function _n(nr){var Ht=nr.target;if(Ht.tagName.toUpperCase()==="IMG"){if(gt){var yr=Ht.getAttribute("src");un(yr),bn("image")}}else if(Ht.tagName.toUpperCase()==="A"){var Mt=Ht.getAttribute("href");if(Mt.indexOf("office")>-1)nr.preventDefault(),un(Mt),bn("office");else if(Mt.indexOf("application/pdf")>-1)nr.preventDefault(),un(Mt),bn("pdf");else if(Mt.indexOf("text/html")>-1)nr.preventDefault(),un(Mt),bn("html");else if(Mt.startsWith("#")){nr.preventDefault();var ar=document.getElementById(Mt.replace("#",""));ar&&ar.scrollIntoView(!0)}}}var di=function(){var Ht,yr=(Ht=$r.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");yr==null||yr.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var ar=new H.a;ar.loadSource(Mt.src),ar.attachMedia(Mt)}}})};Object(L.useEffect)(function(){if($r.current&&Qr&&(Qr.match(gn)&&window.PR.prettyPrint()),$r.current)return $r.current.addEventListener("click",_n),function(){$r.current.removeEventListener("click",_n),y(),O()}},[Qr,$r.current,_n]);var En=function(Ht){if(!ee)return;Ht.target.nodeName==="IMG"?(xr.current.style.zIndex=1,xr.current.style.display="flex",xr.current.style.width=Ht.target.clientWidth+"px",xr.current.style.height=Ht.target.clientHeight+"px",xr.current.style.top=Ht.target.offsetTop+"px",xr.current.style.left=Ht.target.offsetLeft+"px",Zr.current.src=Ht.target.getAttribute("src")):xr.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:$r,style:Object(j.a)({},jt),className:"".concat(V||""," markdown-body ").concat(mn.a.mdBody),onMouseOver:En,dangerouslySetInnerHTML:{__html:Qr}}),v.a.createElement("div",{ref:xr,className:mn.a.button},v.a.createElement(J.a,null,v.a.createElement(X.a,{onClick:function(){return zn()}},"\u88C1\u526A"),v.a.createElement(X.a,{onClick:function(){return Vn()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:Zr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(se.a,{close:!0,data:zr,type:zr!=null&&zr.length?kn:"",style:Object(j.a)({},jr),onClose:function(){return un("")}}))}},"9VGf":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return P});var ie=Z("q1tI"),J=Z.n(ie);function P(X,j){var U=Object(ie.useRef)();Object(ie.useEffect)(function(){U.current=X}),Object(ie.useEffect)(function(){function K(){U.current()}if(j!==null){var G=setInterval(K,j);return function(){return clearInterval(G)}}},[j])}},BU3w:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return U});var ie=Z("MNnm"),J="rc-util-key";function P(K){if(K.attachTo)return K.attachTo;var G=document.querySelector("head");return G||document.body}function X(K){var G,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var L=document.createElement("style");if((G=r.csp)===null||G===void 0?void 0:G.nonce){var v;L.nonce=(v=r.csp)===null||v===void 0?void 0:v.nonce}L.innerHTML=K;var m=P(r),p=m.firstChild;return r.prepend&&m.prepend?m.prepend(L):r.prepend&&p?m.insertBefore(L,p):m.appendChild(L),L}var j=new Map;function U(K,G){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=P(r);if(!j.has(L)){var v=X("",r),m=v.parentNode;j.set(L,m),m.removeChild(v)}var p=Array.from(j.get(L).children).find(function(o){return o.tagName==="STYLE"&&o[J]===G});if(p){var h,u;if(((h=r.csp)===null||h===void 0?void 0:h.nonce)&&p.nonce!==((u=r.csp)===null||u===void 0?void 0:u.nonce)){var f;p.nonce=(f=r.csp)===null||f===void 0?void 0:f.nonce}return p.innerHTML!==K&&(p.innerHTML=K),p}var l=X(K,r);return l[J]=G,l}},Bd2K:function(rt,be,Z){(function(ie){ie(Z("VrN/"),Z("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(r,L,v){if(v!=ie.Init&&v&&r.removeKeyMap("autoCloseTags"),!L)return;var m={name:"autoCloseTags"};(typeof L!="object"||L.whenClosing!==!1)&&(m["'/'"]=function(p){return U(p)}),(typeof L!="object"||L.whenOpening!==!1)&&(m["'>'"]=function(p){return X(p)}),r.addKeyMap(m)});var J=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function X(r){if(r.getOption("disableInput"))return ie.Pass;for(var L=r.listSelections(),v=[],m=r.getOption("autoCloseTags"),p=0;ph.ch&&(s=s.slice(0,s.length-u.end+h.ch));var w=s.toLowerCase();if(!s||u.type=="string"&&(u.end!=h.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&o.close||u.string.indexOf("/")==h.ch-u.start-1||O&&K(O,w)>-1||G(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(l)||[],s,h,!0))return ie.Pass;var D=typeof m=="object"&&m.emptyTags;if(D&&K(D,s)>-1){v[p]={text:"/>",newPos:ie.Pos(h.line,h.ch+2)};continue}var R=E&&K(E,w)>-1;v[p]={indent:R,text:">"+(R?` + `))},Y.instanceCounter=0,Y}(),Ct=Z("8hTe"),mn=Z.n(Ct),gn=/]*>/g;function vn(Y){var x=document.createElement("div");return x.innerHTML=Y,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var yn=be.a=function(Y){var x=Y.value,k=x===void 0?"":x,W=Y.edit,ee=W===void 0?!1:W,V=Y.className,Ee=Y.showTextOnly,Ye=Y.showLines,tt=Y.replaces,gt=Y.zoomImg,Xe=Y.hasMask,xt=Y.style,jt=xt===void 0?{}:xt,$t=Y.stylesPrev,jr=$t===void 0?{}:$t,Er=String(k),xr=Object(L.useRef)(),Zr=Object(L.useRef)(),Dn=Object(L.useState)(""),dr=Object(K.a)(Dn,2),zr=dr[0],un=dr[1],hn=Object(L.useState)("office"),Hr=Object(K.a)(hn,2),kn=Hr[0],bn=Hr[1],zn=function(){var Ht=new Ze(Zr.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var yr=Object(U.a)(r.a.mark(function Mt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return xr.current.style.display="none",fr.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar}});case 3:Kt=fr.sent,Kt!=null&&Kt.id&&tt(Zr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return fr.stop()}},Mt)}));return function(Mt){return yr.apply(this,arguments)}}()),Ht.show()},Vn=function(){var Ht=new It(Zr.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var yr=Object(U.a)(r.a.mark(function Mt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(xr.current.style.display="none",!Zr.current){fr.next=6;break}return fr.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar.dataUrl}});case 4:Kt=fr.sent,Kt!=null&&Kt.id&&tt(Zr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return fr.stop()}},Mt)}));return function(Mt){return yr.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Qr=Object(L.useMemo)(function(){xr.current&&(xr.current.style.zIndex=-1);try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Er=Er.replace(nr,"("+$.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+$.a.API_SERVER+"/api/attachments/").replace(yr,'"'+$.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` +`)}catch(nn){}var Mt=M(Er),ar=S();if(Er.match(/\[TOC\]/)&&(Mt=Mt.replace("

      [TOC]

      ",D()),O()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(nn,fr){var Ar=ar[fr],Yn=Ar.type,xn=Ar.expression;return Object(ne.renderToString)(vn(xn)||"",{displayMode:Yn==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),y(),Ee){var Kt=document.createElement("div");return Kt.innerHTML=Mt,Kt.innerText}return setTimeout(function(){return ci()},500),Mt},[Er]),$r=Object(L.useRef)();E.WebkitLineClamp=Ye,Ye&&(jt=Object(j.a)(Object(j.a)({},jt),E));function _n(nr){var Ht=nr.target;if(Ht.tagName.toUpperCase()==="IMG"){if(gt){var yr=Ht.getAttribute("src");un(yr),bn("image")}}else if(Ht.tagName.toUpperCase()==="A"){var Mt=Ht.getAttribute("href");if(Mt.indexOf("office")>-1)nr.preventDefault(),un(Mt),bn("office");else if(Mt.indexOf("application/pdf")>-1)nr.preventDefault(),un(Mt),bn("pdf");else if(Mt.indexOf("text/html")>-1)nr.preventDefault(),un(Mt),bn("html");else if(Mt.startsWith("#")){nr.preventDefault();var ar=document.getElementById(Mt.replace("#",""));ar&&ar.scrollIntoView(!0)}}}var ci=function(){var Ht,yr=(Ht=$r.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");yr==null||yr.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var ar=new H.a;ar.loadSource(Mt.src),ar.attachMedia(Mt)}}})};Object(L.useEffect)(function(){if($r.current&&Qr&&(Qr.match(gn)&&window.PR.prettyPrint()),$r.current)return $r.current.addEventListener("click",_n),function(){$r.current.removeEventListener("click",_n),y(),O()}},[Qr,$r.current,_n]);var En=function(Ht){if(!ee)return;Ht.target.nodeName==="IMG"?(xr.current.style.zIndex=1,xr.current.style.display="flex",xr.current.style.width=Ht.target.clientWidth+"px",xr.current.style.height=Ht.target.clientHeight+"px",xr.current.style.top=Ht.target.offsetTop+"px",xr.current.style.left=Ht.target.offsetLeft+"px",Zr.current.src=Ht.target.getAttribute("src")):xr.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:$r,style:Object(j.a)({},jt),className:"".concat(V||""," markdown-body ").concat(mn.a.mdBody),onMouseOver:En,dangerouslySetInnerHTML:{__html:Qr}}),v.a.createElement("div",{ref:xr,className:mn.a.button},v.a.createElement(J.a,null,v.a.createElement(X.a,{onClick:function(){return zn()}},"\u88C1\u526A"),v.a.createElement(X.a,{onClick:function(){return Vn()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:Zr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(se.a,{close:!0,data:zr,type:zr!=null&&zr.length?kn:"",style:Object(j.a)({},jr),onClose:function(){return un("")}}))}},"9VGf":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return P});var ie=Z("q1tI"),J=Z.n(ie);function P(X,j){var U=Object(ie.useRef)();Object(ie.useEffect)(function(){U.current=X}),Object(ie.useEffect)(function(){function K(){U.current()}if(j!==null){var G=setInterval(K,j);return function(){return clearInterval(G)}}},[j])}},BU3w:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return U});var ie=Z("MNnm"),J="rc-util-key";function P(K){if(K.attachTo)return K.attachTo;var G=document.querySelector("head");return G||document.body}function X(K){var G,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var L=document.createElement("style");if((G=r.csp)===null||G===void 0?void 0:G.nonce){var v;L.nonce=(v=r.csp)===null||v===void 0?void 0:v.nonce}L.innerHTML=K;var m=P(r),p=m.firstChild;return r.prepend&&m.prepend?m.prepend(L):r.prepend&&p?m.insertBefore(L,p):m.appendChild(L),L}var j=new Map;function U(K,G){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=P(r);if(!j.has(L)){var v=X("",r),m=v.parentNode;j.set(L,m),m.removeChild(v)}var p=Array.from(j.get(L).children).find(function(o){return o.tagName==="STYLE"&&o[J]===G});if(p){var h,u;if(((h=r.csp)===null||h===void 0?void 0:h.nonce)&&p.nonce!==((u=r.csp)===null||u===void 0?void 0:u.nonce)){var f;p.nonce=(f=r.csp)===null||f===void 0?void 0:f.nonce}return p.innerHTML!==K&&(p.innerHTML=K),p}var l=X(K,r);return l[J]=G,l}},Bd2K:function(rt,be,Z){(function(ie){ie(Z("VrN/"),Z("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(r,L,v){if(v!=ie.Init&&v&&r.removeKeyMap("autoCloseTags"),!L)return;var m={name:"autoCloseTags"};(typeof L!="object"||L.whenClosing!==!1)&&(m["'/'"]=function(p){return U(p)}),(typeof L!="object"||L.whenOpening!==!1)&&(m["'>'"]=function(p){return X(p)}),r.addKeyMap(m)});var J=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function X(r){if(r.getOption("disableInput"))return ie.Pass;for(var L=r.listSelections(),v=[],m=r.getOption("autoCloseTags"),p=0;ph.ch&&(s=s.slice(0,s.length-u.end+h.ch));var w=s.toLowerCase();if(!s||u.type=="string"&&(u.end!=h.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&o.close||u.string.indexOf("/")==h.ch-u.start-1||O&&K(O,w)>-1||G(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(l)||[],s,h,!0))return ie.Pass;var D=typeof m=="object"&&m.emptyTags;if(D&&K(D,s)>-1){v[p]={text:"/>",newPos:ie.Pos(h.line,h.ch+2)};continue}var R=E&&K(E,w)>-1;v[p]={indent:R,text:">"+(R?` `:"")+"",newPos:R?ie.Pos(h.line+1,0):ie.Pos(h.line,h.ch+1)}}for(var A=typeof m=="object"&&m.dontIndentOnAutoClose,p=L.length-1;p>=0;p--){var C=v[p];r.replaceRange(C.text,L[p].head,L[p].anchor,"+insert");var T=r.listSelections().slice(0);T[p]={head:C.newPos,anchor:C.newPos},r.setSelections(T),!A&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.newPos.line+1,null,!0))}}function j(r,L){for(var v=r.listSelections(),m=[],p=L?"/":""&&(O+=">"),m[f]=O}if(r.replaceSelections(m),v=r.listSelections(),!u)for(var f=0;f=0&&L[l]==v;l--)++f;m=u.to;for(var l=1;l0){for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:"",L=[],v=0;vU,ie.serviceIds.set(U,K),K}function j(U){return function(K,G,r){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(U,K,r,!0)}}},DlQD:function(rt,be,Z){(function(ie,J){rt.exports=J()})(this,function(){"use strict";function ie(Ae,_e){for(var we=0;we<_e.length;we++){var ae=_e[we];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Ae,ae.key,ae)}}function J(Ae,_e,we){return _e&&ie(Ae.prototype,_e),we&&ie(Ae,we),Ae}function P(Ae,_e){if(!Ae)return;if(typeof Ae=="string")return X(Ae,_e);var we=Object.prototype.toString.call(Ae).slice(8,-1);if(we==="Object"&&Ae.constructor&&(we=Ae.constructor.name),we==="Map"||we==="Set")return Array.from(Ae);if(we==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(we))return X(Ae,_e)}function X(Ae,_e){(_e==null||_e>Ae.length)&&(_e=Ae.length);for(var we=0,ae=new Array(_e);we<_e;we++)ae[we]=Ae[we];return ae}function j(Ae,_e){var we;if(typeof Symbol=="undefined"||Ae[Symbol.iterator]==null){if(Array.isArray(Ae)||(we=P(Ae))||_e&&Ae&&typeof Ae.length=="number"){we&&(Ae=we);var ae=0;return function(){return ae>=Ae.length?{done:!0}:{done:!1,value:Ae[ae++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return we=Ae[Symbol.iterator](),we.next.bind(we)}function U(Ae,_e){return _e={exports:{}},Ae(_e,_e.exports),_e.exports}var K=U(function(Ae){function _e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function we(ae){Ae.exports.defaults=ae}Ae.exports={defaults:_e(),getDefaults:_e,changeDefaults:we}}),G=K.defaults,r=K.getDefaults,L=K.changeDefaults,v=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(_e){return u[_e]};function l(Ae,_e){if(_e){if(v.test(Ae))return Ae.replace(m,f)}else if(p.test(Ae))return Ae.replace(h,f);return Ae}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ae){return Ae.replace(o,function(_e,we){return we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""})}var a=/(^|[^\[])\^/g;function O(Ae,_e){Ae=Ae.source||Ae,_e=_e||"";var we={replace:function(ue,ce){return ce=ce.source||ce,ce=ce.replace(a,"$1"),Ae=Ae.replace(ue,ce),we},getRegex:function(){return new RegExp(Ae,_e)}};return we}var E=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ae,_e,we){if(Ae){var ae;try{ae=decodeURIComponent(s(we)).replace(E,"").toLowerCase()}catch(ue){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}_e&&!w.test(we)&&(we=c(_e,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(ue){return null}return we}var R={},A=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,T=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(Ae,_e){R[" "+Ae]||(A.test(Ae)?R[" "+Ae]=Ae+"/":R[" "+Ae]=B(Ae,"/",!0)),Ae=R[" "+Ae];var we=Ae.indexOf(":")===-1;return _e.substring(0,2)==="//"?we?_e:Ae.replace(C,"$1")+_e:_e.charAt(0)==="/"?we?_e:Ae.replace(T,"$1")+_e:Ae+_e}var S={exec:function(){}};function y(Ae){for(var _e=1,we,ae;_e=0&&xe[He]==="\\";)Pe=!Pe;return Pe?"|":" |"}),ae=we.split(/ \|/),ue=0;if(ae.length>_e)ae.splice(_e);else for(;ae.length<_e;)ae.push("");for(;ue=ae.length?ue.slice(ae.length):ue}).join(` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return we=Ae[Symbol.iterator](),we.next.bind(we)}function U(Ae,_e){return _e={exports:{}},Ae(_e,_e.exports),_e.exports}var K=U(function(Ae){function _e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function we(ae){Ae.exports.defaults=ae}Ae.exports={defaults:_e(),getDefaults:_e,changeDefaults:we}}),G=K.defaults,r=K.getDefaults,L=K.changeDefaults,v=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(_e){return u[_e]};function l(Ae,_e){if(_e){if(v.test(Ae))return Ae.replace(m,f)}else if(p.test(Ae))return Ae.replace(h,f);return Ae}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ae){return Ae.replace(o,function(_e,we){return we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""})}var a=/(^|[^\[])\^/g;function O(Ae,_e){Ae=Ae.source||Ae,_e=_e||"";var we={replace:function(ue,de){return de=de.source||de,de=de.replace(a,"$1"),Ae=Ae.replace(ue,de),we},getRegex:function(){return new RegExp(Ae,_e)}};return we}var E=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ae,_e,we){if(Ae){var ae;try{ae=decodeURIComponent(s(we)).replace(E,"").toLowerCase()}catch(ue){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}_e&&!w.test(we)&&(we=d(_e,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(ue){return null}return we}var R={},A=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,T=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(Ae,_e){R[" "+Ae]||(A.test(Ae)?R[" "+Ae]=Ae+"/":R[" "+Ae]=B(Ae,"/",!0)),Ae=R[" "+Ae];var we=Ae.indexOf(":")===-1;return _e.substring(0,2)==="//"?we?_e:Ae.replace(C,"$1")+_e:_e.charAt(0)==="/"?we?_e:Ae.replace(T,"$1")+_e:Ae+_e}var S={exec:function(){}};function y(Ae){for(var _e=1,we,ae;_e=0&&xe[He]==="\\";)Pe=!Pe;return Pe?"|":" |"}),ae=we.split(/ \|/),ue=0;if(ae.length>_e)ae.splice(_e);else for(;ae.length<_e;)ae.push("");for(;ue=ae.length?ue.slice(ae.length):ue}).join(` `)}var ge=function(){function Ae(we){this.options=we||I}var _e=Ae.prototype;return _e.space=function(ae){var ue=this.rules.block.newline.exec(ae);if(ue)return ue[0].length>1?{type:"space",raw:ue[0]}:{raw:` -`}},_e.code=function(ae,ue){var ce=this.rules.block.code.exec(ae);if(ce){var me=ue[ue.length-1];if(me&&me.type==="paragraph")return{raw:ce[0],text:ce[0].trimRight()};var xe=ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:g(xe,` -`)}}},_e.fences=function(ae){var ue=this.rules.block.fences.exec(ae);if(ue){var ce=ue[0],me=Oe(ce,ue[3]||"");return{type:"code",raw:ce,lang:ue[2]?ue[2].trim():ue[2],text:me}}},_e.heading=function(ae){var ue=this.rules.block.heading.exec(ae);if(ue)return{type:"heading",raw:ue[0],depth:ue[1].length,text:ue[2]}},_e.nptable=function(ae){var ue=this.rules.block.nptable.exec(ae);if(ue){var ce={type:"table",header:H(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(` -`):[],raw:ue[0]};if(ce.header.length===ce.align.length){var me=ce.align.length,xe;for(xe=0;xe ?/gm,"");return{type:"blockquote",raw:ue[0],text:ce}}},_e.list=function(ae){var ue=this.rules.block.list.exec(ae);if(ue){for(var ce=ue[0],me=ue[2],xe=me.length>1,Pe=me[me.length-1]===")",He={type:"list",raw:ce,ordered:xe,start:xe?+me.slice(0,-1):"",loose:!1,items:[]},ze=ue[0].match(this.rules.block.item),ht=!1,ot,yt,dt,ft,Ot,It,qt,Zt=ze.length,Dt=0;Dt1||this.options.smartLists&&dt!==me)&&(ft=ze.slice(Dt+1).join(` +`}},_e.code=function(ae,ue){var de=this.rules.block.code.exec(ae);if(de){var me=ue[ue.length-1];if(me&&me.type==="paragraph")return{raw:de[0],text:de[0].trimRight()};var xe=de[0].replace(/^ {4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:g(xe,` +`)}}},_e.fences=function(ae){var ue=this.rules.block.fences.exec(ae);if(ue){var de=ue[0],me=Oe(de,ue[3]||"");return{type:"code",raw:de,lang:ue[2]?ue[2].trim():ue[2],text:me}}},_e.heading=function(ae){var ue=this.rules.block.heading.exec(ae);if(ue)return{type:"heading",raw:ue[0],depth:ue[1].length,text:ue[2]}},_e.nptable=function(ae){var ue=this.rules.block.nptable.exec(ae);if(ue){var de={type:"table",header:H(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(` +`):[],raw:ue[0]};if(de.header.length===de.align.length){var me=de.align.length,xe;for(xe=0;xe ?/gm,"");return{type:"blockquote",raw:ue[0],text:de}}},_e.list=function(ae){var ue=this.rules.block.list.exec(ae);if(ue){for(var de=ue[0],me=ue[2],xe=me.length>1,Pe=me[me.length-1]===")",He={type:"list",raw:de,ordered:xe,start:xe?+me.slice(0,-1):"",loose:!1,items:[]},ze=ue[0].match(this.rules.block.item),ht=!1,ot,yt,ct,ft,Ot,It,qt,Zt=ze.length,Dt=0;Dt1||this.options.smartLists&&ct!==me)&&(ft=ze.slice(Dt+1).join(` `),He.raw=He.raw.substring(0,He.raw.length-ft.length),Dt=Zt-1)),Ot=ht||/\n\n(?!\s*$)/.test(ot),Dt!==Zt-1&&(ht=ot.charAt(ot.length-1)===` -`,Ot||(Ot=ht)),Ot&&(He.loose=!0),It=/^\[[ xX]\] /.test(ot),qt=void 0,It&&(qt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),He.items.push({type:"list_item",raw:ce,task:It,checked:qt,loose:Ot,text:ot});return He}},_e.html=function(ae){var ue=this.rules.block.html.exec(ae);if(ue)return{type:this.options.sanitize?"paragraph":"html",raw:ue[0],pre:!this.options.sanitizer&&(ue[1]==="pre"||ue[1]==="script"||ue[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):$(ue[0]):ue[0]}},_e.def=function(ae){var ue=this.rules.block.def.exec(ae);if(ue){ue[3]&&(ue[3]=ue[3].substring(1,ue[3].length-1));var ce=ue[1].toLowerCase().replace(/\s+/g," ");return{tag:ce,raw:ue[0],href:ue[2],title:ue[3]}}},_e.table=function(ae){var ue=this.rules.block.table.exec(ae);if(ue){var ce={type:"table",header:H(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(` -`):[]};if(ce.header.length===ce.align.length){ce.raw=ue[0];var me=ce.align.length,xe;for(xe=0;xe/i.test(me[0])&&(ue=!1),!ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?ce=!0:ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(ce=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:ue,inRawBlock:ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):$(me[0]):me[0]}},_e.link=function(ae){var ue=this.rules.inline.link.exec(ae);if(ue){var ce=ne(ue[2],"()");if(ce>-1){var me=ue[0].indexOf("!")===0?5:4,xe=me+ue[1].length+ce;ue[2]=ue[2].substring(0,ce),ue[0]=ue[0].substring(0,xe).trim(),ue[3]=""}var Pe=ue[2],He="";if(this.options.pedantic){var ze=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);ze?(Pe=ze[1],He=ze[3]):He=""}else He=ue[3]?ue[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=se(ue,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:He&&He.replace(this.rules.inline._escapes,"$1")},ue[0]);return ht}},_e.reflink=function(ae,ue){var ce;if((ce=this.rules.inline.reflink.exec(ae))||(ce=this.rules.inline.nolink.exec(ae))){var me=(ce[2]||ce[1]).replace(/\s+/g," ");if(me=ue[me.toLowerCase()],!me||!me.href){var xe=ce[0].charAt(0);return{type:"text",raw:xe,text:xe}}var Pe=se(ce,me,ce[0]);return Pe}},_e.strong=function(ae,ue,ce){ce===void 0&&(ce="");var me=this.rules.inline.strong.start.exec(ae);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ue=ue.slice(-1*ae.length);var xe=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;xe.lastIndex=0;for(var Pe;(me=xe.exec(ue))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ue.slice(0,me.index+3)),Pe)return{type:"strong",raw:ae.slice(0,Pe[0].length),text:ae.slice(2,Pe[0].length-2)}}},_e.em=function(ae,ue,ce){ce===void 0&&(ce="");var me=this.rules.inline.em.start.exec(ae);if(me&&(!me[1]||me[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){ue=ue.slice(-1*ae.length);var xe=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;xe.lastIndex=0;for(var Pe;(me=xe.exec(ue))!=null;)if(Pe=this.rules.inline.em.middle.exec(ue.slice(0,me.index+2)),Pe)return{type:"em",raw:ae.slice(0,Pe[0].length),text:ae.slice(1,Pe[0].length-1)}}},_e.codespan=function(ae){var ue=this.rules.inline.code.exec(ae);if(ue){var ce=ue[2].replace(/\n/g," "),me=/[^ ]/.test(ce),xe=ce.startsWith(" ")&&ce.endsWith(" ");return me&&xe&&(ce=ce.substring(1,ce.length-1)),ce=$(ce,!0),{type:"codespan",raw:ue[0],text:ce}}},_e.br=function(ae){var ue=this.rules.inline.br.exec(ae);if(ue)return{type:"br",raw:ue[0]}},_e.del=function(ae){var ue=this.rules.inline.del.exec(ae);if(ue)return{type:"del",raw:ue[0],text:ue[1]}},_e.autolink=function(ae,ue){var ce=this.rules.inline.autolink.exec(ae);if(ce){var me,xe;return ce[2]==="@"?(me=$(this.options.mangle?ue(ce[1]):ce[1]),xe="mailto:"+me):(me=$(ce[1]),xe=me),{type:"link",raw:ce[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},_e.url=function(ae,ue){var ce;if(ce=this.rules.inline.url.exec(ae)){var me,xe;if(ce[2]==="@")me=$(this.options.mangle?ue(ce[0]):ce[0]),xe="mailto:"+me;else{var Pe;do Pe=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(Pe!==ce[0]);me=$(ce[0]),ce[1]==="www."?xe="http://"+me:xe=me}return{type:"link",raw:ce[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},_e.inlineText=function(ae,ue,ce){var me=this.rules.inline.text.exec(ae);if(me){var xe;return ue?xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):$(me[0]):me[0]:xe=$(this.options.smartypants?ce(me[0]):me[0]),{type:"text",raw:me[0],text:xe}}},Ae}(),Te=M.noopTest,Re=M.edit,Le=M.merge,de={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Te,table:Te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=Re(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=Re(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=Re(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de._comment=//,de.html=Re(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=Re(de._paragraph).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.blockquote=Re(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Le({},de),de.gfm=Le({},de.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),de.gfm.nptable=Re(de.gfm.nptable).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.gfm.table=Re(de.gfm.table).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.pedantic=Le({},de.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Te,paragraph:Re(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Te,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Te,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",he.punctuation=Re(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",he._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",he.em.start=Re(he.em.start).replace(/punctuation/g,he._punctuation).getRegex(),he.em.middle=Re(he.em.middle).replace(/punctuation/g,he._punctuation).replace(/overlapSkip/g,he._overlapSkip).getRegex(),he.em.endAst=Re(he.em.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.em.endUnd=Re(he.em.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.start=Re(he.strong.start).replace(/punctuation/g,he._punctuation).getRegex(),he.strong.middle=Re(he.strong.middle).replace(/punctuation/g,he._punctuation).replace(/blockSkip/g,he._blockSkip).getRegex(),he.strong.endAst=Re(he.strong.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.endUnd=Re(he.strong.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=Re(he._blockSkip,"g").getRegex(),he.overlapSkip=Re(he._overlapSkip,"g").getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,he.autolink=Re(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=Re(he.tag).replace("comment",de._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=Re(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=Re(he.reflink).replace("label",he._label).getRegex(),he.reflinkSearch=Re(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=Le({},he),he.pedantic=Le({},he.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=Le({},he.normal,{escape:Re(he.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ae="x"+ae.toString(16)),_e+="&#"+ae+";";return _e}var Ne=function(){function Ae(we){this.tokens=[],this.tokens.links=Object.create(null),this.options=we||fe,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:oe.normal,inline:De.normal};this.options.pedantic?(ae.block=oe.pedantic,ae.inline=De.pedantic):this.options.gfm&&(ae.block=oe.gfm,this.options.breaks?ae.inline=De.breaks:ae.inline=De.gfm),this.tokenizer.rules=ae}Ae.lex=function(ae,ue){var ce=new Ae(ue);return ce.lex(ae)};var _e=Ae.prototype;return _e.lex=function(ae){return ae=ae.replace(/\r\n|\r/g,` -`).replace(/\t/g," "),this.blockTokens(ae,this.tokens,!0),this.inline(this.tokens),this.tokens},_e.blockTokens=function(ae,ue,ce){ue===void 0&&(ue=[]),ce===void 0&&(ce=!0),ae=ae.replace(/^ +$/gm,"");for(var me,xe,Pe,He;ae;){if(me=this.tokenizer.space(ae)){ae=ae.substring(me.raw.length),me.type&&ue.push(me);continue}if(me=this.tokenizer.code(ae,ue)){ae=ae.substring(me.raw.length),me.type?ue.push(me):(He=ue[ue.length-1],He.raw+=` +`,Ot||(Ot=ht)),Ot&&(He.loose=!0),It=/^\[[ xX]\] /.test(ot),qt=void 0,It&&(qt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),He.items.push({type:"list_item",raw:de,task:It,checked:qt,loose:Ot,text:ot});return He}},_e.html=function(ae){var ue=this.rules.block.html.exec(ae);if(ue)return{type:this.options.sanitize?"paragraph":"html",raw:ue[0],pre:!this.options.sanitizer&&(ue[1]==="pre"||ue[1]==="script"||ue[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):$(ue[0]):ue[0]}},_e.def=function(ae){var ue=this.rules.block.def.exec(ae);if(ue){ue[3]&&(ue[3]=ue[3].substring(1,ue[3].length-1));var de=ue[1].toLowerCase().replace(/\s+/g," ");return{tag:de,raw:ue[0],href:ue[2],title:ue[3]}}},_e.table=function(ae){var ue=this.rules.block.table.exec(ae);if(ue){var de={type:"table",header:H(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(` +`):[]};if(de.header.length===de.align.length){de.raw=ue[0];var me=de.align.length,xe;for(xe=0;xe/i.test(me[0])&&(ue=!1),!de&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?de=!0:de&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(de=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:ue,inRawBlock:de,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):$(me[0]):me[0]}},_e.link=function(ae){var ue=this.rules.inline.link.exec(ae);if(ue){var de=ne(ue[2],"()");if(de>-1){var me=ue[0].indexOf("!")===0?5:4,xe=me+ue[1].length+de;ue[2]=ue[2].substring(0,de),ue[0]=ue[0].substring(0,xe).trim(),ue[3]=""}var Pe=ue[2],He="";if(this.options.pedantic){var ze=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);ze?(Pe=ze[1],He=ze[3]):He=""}else He=ue[3]?ue[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=se(ue,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:He&&He.replace(this.rules.inline._escapes,"$1")},ue[0]);return ht}},_e.reflink=function(ae,ue){var de;if((de=this.rules.inline.reflink.exec(ae))||(de=this.rules.inline.nolink.exec(ae))){var me=(de[2]||de[1]).replace(/\s+/g," ");if(me=ue[me.toLowerCase()],!me||!me.href){var xe=de[0].charAt(0);return{type:"text",raw:xe,text:xe}}var Pe=se(de,me,de[0]);return Pe}},_e.strong=function(ae,ue,de){de===void 0&&(de="");var me=this.rules.inline.strong.start.exec(ae);if(me&&(!me[1]||me[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){ue=ue.slice(-1*ae.length);var xe=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;xe.lastIndex=0;for(var Pe;(me=xe.exec(ue))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ue.slice(0,me.index+3)),Pe)return{type:"strong",raw:ae.slice(0,Pe[0].length),text:ae.slice(2,Pe[0].length-2)}}},_e.em=function(ae,ue,de){de===void 0&&(de="");var me=this.rules.inline.em.start.exec(ae);if(me&&(!me[1]||me[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){ue=ue.slice(-1*ae.length);var xe=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;xe.lastIndex=0;for(var Pe;(me=xe.exec(ue))!=null;)if(Pe=this.rules.inline.em.middle.exec(ue.slice(0,me.index+2)),Pe)return{type:"em",raw:ae.slice(0,Pe[0].length),text:ae.slice(1,Pe[0].length-1)}}},_e.codespan=function(ae){var ue=this.rules.inline.code.exec(ae);if(ue){var de=ue[2].replace(/\n/g," "),me=/[^ ]/.test(de),xe=de.startsWith(" ")&&de.endsWith(" ");return me&&xe&&(de=de.substring(1,de.length-1)),de=$(de,!0),{type:"codespan",raw:ue[0],text:de}}},_e.br=function(ae){var ue=this.rules.inline.br.exec(ae);if(ue)return{type:"br",raw:ue[0]}},_e.del=function(ae){var ue=this.rules.inline.del.exec(ae);if(ue)return{type:"del",raw:ue[0],text:ue[1]}},_e.autolink=function(ae,ue){var de=this.rules.inline.autolink.exec(ae);if(de){var me,xe;return de[2]==="@"?(me=$(this.options.mangle?ue(de[1]):de[1]),xe="mailto:"+me):(me=$(de[1]),xe=me),{type:"link",raw:de[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},_e.url=function(ae,ue){var de;if(de=this.rules.inline.url.exec(ae)){var me,xe;if(de[2]==="@")me=$(this.options.mangle?ue(de[0]):de[0]),xe="mailto:"+me;else{var Pe;do Pe=de[0],de[0]=this.rules.inline._backpedal.exec(de[0])[0];while(Pe!==de[0]);me=$(de[0]),de[1]==="www."?xe="http://"+me:xe=me}return{type:"link",raw:de[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},_e.inlineText=function(ae,ue,de){var me=this.rules.inline.text.exec(ae);if(me){var xe;return ue?xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):$(me[0]):me[0]:xe=$(this.options.smartypants?de(me[0]):me[0]),{type:"text",raw:me[0],text:xe}}},Ae}(),Te=M.noopTest,Re=M.edit,Le=M.merge,ce={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Te,table:Te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ce.def=Re(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex(),ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ce.item=Re(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Re(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ce._comment=//,ce.html=Re(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Re(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.blockquote=Re(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=Le({},ce),ce.gfm=Le({},ce.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ce.gfm.nptable=Re(ce.gfm.nptable).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.gfm.table=Re(ce.gfm.table).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.pedantic=Le({},ce.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Te,paragraph:Re(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Te,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Te,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",he.punctuation=Re(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",he._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",he.em.start=Re(he.em.start).replace(/punctuation/g,he._punctuation).getRegex(),he.em.middle=Re(he.em.middle).replace(/punctuation/g,he._punctuation).replace(/overlapSkip/g,he._overlapSkip).getRegex(),he.em.endAst=Re(he.em.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.em.endUnd=Re(he.em.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.start=Re(he.strong.start).replace(/punctuation/g,he._punctuation).getRegex(),he.strong.middle=Re(he.strong.middle).replace(/punctuation/g,he._punctuation).replace(/blockSkip/g,he._blockSkip).getRegex(),he.strong.endAst=Re(he.strong.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.endUnd=Re(he.strong.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=Re(he._blockSkip,"g").getRegex(),he.overlapSkip=Re(he._overlapSkip,"g").getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,he.autolink=Re(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=Re(he.tag).replace("comment",ce._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=Re(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=Re(he.reflink).replace("label",he._label).getRegex(),he.reflinkSearch=Re(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=Le({},he),he.pedantic=Le({},he.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=Le({},he.normal,{escape:Re(he.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ae="x"+ae.toString(16)),_e+="&#"+ae+";";return _e}var Ne=function(){function Ae(we){this.tokens=[],this.tokens.links=Object.create(null),this.options=we||fe,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:oe.normal,inline:De.normal};this.options.pedantic?(ae.block=oe.pedantic,ae.inline=De.pedantic):this.options.gfm&&(ae.block=oe.gfm,this.options.breaks?ae.inline=De.breaks:ae.inline=De.gfm),this.tokenizer.rules=ae}Ae.lex=function(ae,ue){var de=new Ae(ue);return de.lex(ae)};var _e=Ae.prototype;return _e.lex=function(ae){return ae=ae.replace(/\r\n|\r/g,` +`).replace(/\t/g," "),this.blockTokens(ae,this.tokens,!0),this.inline(this.tokens),this.tokens},_e.blockTokens=function(ae,ue,de){ue===void 0&&(ue=[]),de===void 0&&(de=!0),ae=ae.replace(/^ +$/gm,"");for(var me,xe,Pe,He;ae;){if(me=this.tokenizer.space(ae)){ae=ae.substring(me.raw.length),me.type&&ue.push(me);continue}if(me=this.tokenizer.code(ae,ue)){ae=ae.substring(me.raw.length),me.type?ue.push(me):(He=ue[ue.length-1],He.raw+=` `+me.raw,He.text+=` -`+me.text);continue}if(me=this.tokenizer.fences(ae)){ae=ae.substring(me.raw.length),ue.push(me);continue}if(me=this.tokenizer.heading(ae)){ae=ae.substring(me.raw.length),ue.push(me);continue}if(me=this.tokenizer.nptable(ae)){ae=ae.substring(me.raw.length),ue.push(me);continue}if(me=this.tokenizer.hr(ae)){ae=ae.substring(me.raw.length),ue.push(me);continue}if(me=this.tokenizer.blockquote(ae)){ae=ae.substring(me.raw.length),me.tokens=this.blockTokens(me.text,[],ce),ue.push(me);continue}if(me=this.tokenizer.list(ae)){for(ae=ae.substring(me.raw.length),Pe=me.items.length,xe=0;xe0)for(;(ze=this.tokenizer.rules.inline.reflinkSearch.exec(He))!=null;)ht.includes(ze[0].slice(ze[0].lastIndexOf("[")+1,-1))&&(He=He.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+He.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ze=this.tokenizer.rules.inline.blockSkip.exec(He))!=null;)He=He.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+He.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ae;){if(Pe=this.tokenizer.escape(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.tag(ae,ce,me)){ae=ae.substring(Pe.raw.length),ce=Pe.inLink,me=Pe.inRawBlock,ue.push(Pe);continue}if(Pe=this.tokenizer.link(ae)){ae=ae.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,me)),ue.push(Pe);continue}if(Pe=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,me)),ue.push(Pe);continue}if(Pe=this.tokenizer.strong(ae,He,xe)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],ce,me),ue.push(Pe);continue}if(Pe=this.tokenizer.em(ae,He,xe)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],ce,me),ue.push(Pe);continue}if(Pe=this.tokenizer.codespan(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.br(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.del(ae)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],ce,me),ue.push(Pe);continue}if(Pe=this.tokenizer.autolink(ae,Ce)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(!ce&&(Pe=this.tokenizer.url(ae,Ce))){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.inlineText(ae,me,Fe)){ae=ae.substring(Pe.raw.length),xe=Pe.raw.slice(-1),ue.push(Pe);continue}if(ae){var ot="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return ue},J(Ae,null,[{key:"rules",get:function(){return{block:oe,inline:De}}}]),Ae}(),Be=K.defaults,le=M.cleanUrl,ve=M.escape,Se=function(){function Ae(we){this.options=we||Be}var _e=Ae.prototype;return _e.code=function(ae,ue,ce){var me=(ue||"").match(/\S*/)[0];if(this.options.highlight){var xe=this.options.highlight(ae,me);xe!=null&&xe!==ae&&(ce=!0,ae=xe)}return me?'
      '+(ce?ae:ve(ae,!0))+`
      -`:"
      "+(ce?ae:ve(ae,!0))+`
      +`+me.text);continue}if(ae){var ze="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return ue},_e.inline=function(ae){var ue,de,me,xe,Pe,He,ze=ae.length;for(ue=0;ue0)for(;(ze=this.tokenizer.rules.inline.reflinkSearch.exec(He))!=null;)ht.includes(ze[0].slice(ze[0].lastIndexOf("[")+1,-1))&&(He=He.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+He.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ze=this.tokenizer.rules.inline.blockSkip.exec(He))!=null;)He=He.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+He.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ae;){if(Pe=this.tokenizer.escape(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.tag(ae,de,me)){ae=ae.substring(Pe.raw.length),de=Pe.inLink,me=Pe.inRawBlock,ue.push(Pe);continue}if(Pe=this.tokenizer.link(ae)){ae=ae.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,me)),ue.push(Pe);continue}if(Pe=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,me)),ue.push(Pe);continue}if(Pe=this.tokenizer.strong(ae,He,xe)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],de,me),ue.push(Pe);continue}if(Pe=this.tokenizer.em(ae,He,xe)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],de,me),ue.push(Pe);continue}if(Pe=this.tokenizer.codespan(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.br(ae)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.del(ae)){ae=ae.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],de,me),ue.push(Pe);continue}if(Pe=this.tokenizer.autolink(ae,Ce)){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(!de&&(Pe=this.tokenizer.url(ae,Ce))){ae=ae.substring(Pe.raw.length),ue.push(Pe);continue}if(Pe=this.tokenizer.inlineText(ae,me,Fe)){ae=ae.substring(Pe.raw.length),xe=Pe.raw.slice(-1),ue.push(Pe);continue}if(ae){var ot="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return ue},J(Ae,null,[{key:"rules",get:function(){return{block:oe,inline:De}}}]),Ae}(),Be=K.defaults,le=M.cleanUrl,ve=M.escape,Se=function(){function Ae(we){this.options=we||Be}var _e=Ae.prototype;return _e.code=function(ae,ue,de){var me=(ue||"").match(/\S*/)[0];if(this.options.highlight){var xe=this.options.highlight(ae,me);xe!=null&&xe!==ae&&(de=!0,ae=xe)}return me?'
      '+(de?ae:ve(ae,!0))+`
      +`:"
      "+(de?ae:ve(ae,!0))+`
      `},_e.blockquote=function(ae){return`
      `+ae+`
      -`},_e.html=function(ae){return ae},_e.heading=function(ae,ue,ce,me){return this.options.headerIds?"'+ae+" +`},_e.html=function(ae){return ae},_e.heading=function(ae,ue,de,me){return this.options.headerIds?"'+ae+" `:""+ae+" `},_e.hr=function(){return this.options.xhtml?`
      `:`
      -`},_e.list=function(ae,ue,ce){var me=ue?"ol":"ul",xe=ue&&ce!==1?' start="'+ce+'"':"";return"<"+me+xe+`> +`},_e.list=function(ae,ue,de){var me=ue?"ol":"ul",xe=ue&&de!==1?' start="'+de+'"':"";return"<"+me+xe+`> `+ae+" `},_e.listitem=function(ae){return"
    • "+ae+`
    • `},_e.checkbox=function(ae){return" "},_e.paragraph=function(ae){return"

      "+ae+`

      @@ -291,24 +291,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+ue+` `},_e.tablerow=function(ae){return` `+ae+` -`},_e.tablecell=function(ae,ue){var ce=ue.header?"th":"td",me=ue.align?"<"+ce+' align="'+ue.align+'">':"<"+ce+">";return me+ae+" -`},_e.strong=function(ae){return""+ae+""},_e.em=function(ae){return""+ae+""},_e.codespan=function(ae){return""+ae+""},_e.br=function(){return this.options.xhtml?"
      ":"
      "},_e.del=function(ae){return""+ae+""},_e.link=function(ae,ue,ce){if(ae=le(this.options.sanitize,this.options.baseUrl,ae),ae===null)return ce;var me='",me},_e.image=function(ae,ue,ce){if(ae=le(this.options.sanitize,this.options.baseUrl,ae),ae===null)return ce;var me=''+ce+'":">",me},_e.text=function(ae){return ae},Ae}(),Ie=function(){function Ae(){}var _e=Ae.prototype;return _e.strong=function(ae){return ae},_e.em=function(ae){return ae},_e.codespan=function(ae){return ae},_e.del=function(ae){return ae},_e.html=function(ae){return ae},_e.text=function(ae){return ae},_e.link=function(ae,ue,ce){return""+ce},_e.image=function(ae,ue,ce){return""+ce},_e.br=function(){return""},Ae}(),We=function(){function Ae(){this.seen={}}var _e=Ae.prototype;return _e.slug=function(ae){var ue=ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ue)){var ce=ue;do this.seen[ce]++,ue=ce+"-"+this.seen[ce];while(this.seen.hasOwnProperty(ue))}return this.seen[ue]=0,ue},Ae}(),Ve=K.defaults,Qe=M.unescape,Je=function(){function Ae(we){this.options=we||Ve,this.options.renderer=this.options.renderer||new Se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new We}Ae.parse=function(ae,ue){var ce=new Ae(ue);return ce.parse(ae)};var _e=Ae.prototype;return _e.parse=function(ae,ue){ue===void 0&&(ue=!0);var ce="",me,xe,Pe,He,ze,ht,ot,yt,dt,ft,Ot,It,qt,Zt,Dt,Cr,Kr,_t,Lr=ae.length;for(me=0;me0&&Dt.tokens[0].type==="text"?(Dt.tokens[0].text=_t+" "+Dt.tokens[0].text,Dt.tokens[0].tokens&&Dt.tokens[0].tokens.length>0&&Dt.tokens[0].tokens[0].type==="text"&&(Dt.tokens[0].tokens[0].text=_t+" "+Dt.tokens[0].tokens[0].text)):Dt.tokens.unshift({type:"text",text:_t}):Zt+=_t),Zt+=this.parse(Dt.tokens,qt),dt+=this.renderer.listitem(Zt,Kr,Cr);ce+=this.renderer.list(dt,Ot,It);continue}case"html":{ce+=this.renderer.html(ft.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(dt=ft.tokens?this.parseInline(ft.tokens):ft.text;me+1An error occurred:

      "+at(Pe.message+"",!0)+"
      ";throw Pe}}je.options=je.setOptions=function(Ae){return st(je.defaults,Ae),ct(je.defaults),je},je.getDefaults=Ue,je.defaults=lt,je.use=function(Ae){var _e=st({},Ae);if(Ae.renderer&&function(){var ae=je.defaults.renderer||new Se,ue=function(xe){var Pe=ae[xe];ae[xe]=function(){for(var He=arguments.length,ze=new Array(He),ht=0;ht`,triples:"",explode:"[]{}"},P=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(u,f,l){l&&l!=ie.Init&&(u.removeKeyMap(j),u.state.closeBrackets=null),f&&(U(X(f,"pairs")),u.state.closeBrackets=f,u.addKeyMap(j))});function X(u,f){return f=="pairs"&&typeof u=="string"?u:typeof u=="object"&&u[f]!=null?u[f]:J[f]}var j={Backspace:r,Enter:L};function U(u){for(var f=0;f=0;s--){var O=o[s].head;u.replaceRange("",P(O.line,O.ch-1),P(O.line,O.ch+1),"+delete")}}function L(u){var f=G(u),l=f&&X(f,"explode");if(!l||u.getOption("disableInput"))return ie.Pass;for(var o=u.listSelections(),s=0;s0;return{anchor:new P(u.anchor.line,u.anchor.ch+(f?-1:1)),head:new P(u.head.line,u.head.ch+(f?1:-1))}}function m(u,f){var l=G(u);if(!l||u.getOption("disableInput"))return ie.Pass;var o=X(l,"pairs"),s=o.indexOf(f);if(s==-1)return ie.Pass;for(var a=X(l,"closeBefore"),O=X(l,"triples"),E=o.charAt(s+1)==f,w=u.listSelections(),D=s%2==0,R,A=0;A=0&&u.getRange(T,P(T.line,T.ch+3))==f+f+f?c="skipThree":c="skip";else if(E&&T.ch>1&&O.indexOf(f)>=0&&u.getRange(P(T.line,T.ch-2),T)==f+f){if(T.ch>2&&/\bstring/.test(u.getTokenTypeAt(P(T.line,T.ch-2))))return ie.Pass;c="addFour"}else if(E){var y=T.ch==0?" ":u.getRange(P(T.line,T.ch-1),T);if(!ie.isWordChar(S)&&y!=f&&!ie.isWordChar(y))c="both";else return ie.Pass}else if(D&&(S.length===0||/\s/.test(S)||a.indexOf(S)>-1))c="both";else return ie.Pass;if(!R)R=c;else if(R!=c)return ie.Pass}var b=s%2?o.charAt(s-1):f,B=s%2?f:o.charAt(s+1);u.operation(function(){if(R=="skip")u.execCommand("goCharRight");else if(R=="skipThree")for(var F=0;F<3;F++)u.execCommand("goCharRight");else if(R=="surround"){for(var _=u.getSelections(),F=0;F<_.length;F++)_[F]=b+_[F]+B;u.replaceSelections(_,"around"),_=u.listSelections().slice();for(var F=0;F<_.length;F++)_[F]=v(_[F]);u.setSelections(_)}else R=="both"?(u.replaceSelection(b+B,null),u.triggerElectric(b+B),u.execCommand("goCharLeft")):R=="addFour"&&(u.replaceSelection(b+b+b+b,"before"),u.execCommand("goCharRight"))})}function p(u,f){var l=u.getRange(P(f.line,f.ch-1),P(f.line,f.ch+1));return l.length==2?l:null}function h(u,f){var l=u.getTokenAt(P(f.line,f.ch+1));return/\bstring/.test(l.type)&&l.start==f.ch&&(f.ch==0||!/\bstring/.test(u.getTokenTypeAt(f)))}})},FWmy:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return ie});function ie(J,P){if(!J)throw new Error(P?`Assertion failed (${P})`:"Assertion Failed")}},GfqC:function(rt,be,Z){"use strict";var ie=Z("q1tI"),J=Z.n(ie),P=Z("TSYQ"),X=Z.n(P);function j(M,I){var g="cannot "+M.method+" "+M.action+" "+I.status+"'",H=new Error(g);return H.status=I.status,H.method=M.method,H.url=M.action,H}function U(M){var I=M.responseText||M.response;if(!I)return I;try{return JSON.parse(I)}catch(g){return I}}function K(M){var I=new XMLHttpRequest;M.onProgress&&I.upload&&(I.upload.onprogress=function(ne){ne.total>0&&(ne.percent=ne.loaded/ne.total*100),M.onProgress(ne)});var g=new FormData;M.data&&Object.keys(M.data).forEach(function($){var ne=M.data[$];if(Array.isArray(ne)){ne.forEach(function(se){g.append($+"[]",se)});return}g.append($,M.data[$])}),M.file instanceof Blob?g.append(M.filename,M.file,M.file.name):g.append(M.filename,M.file),I.onerror=function(ne){M.onError(ne)},I.onload=function(){return I.status<200||I.status>=300?M.onError(j(M,I),U(I)):M.onSuccess(U(I),I)},I.open(M.method,M.action,!0),M.withCredentials&&"withCredentials"in I&&(I.withCredentials=!0);var H=M.headers||{};return H["X-Requested-With"]!==null&&I.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function($){H[$]!==null&&I.setRequestHeader($,H[$])}),I.send(g),{abort:function(){I.abort()}}}var G=+new Date,r=0;function L(){return"rc-upload-"+G+"-"+ ++r}function v(M,I){return M.indexOf(I,M.length-I.length)!==-1}var m=function(M,I){if(M&&I){var g=Array.isArray(I)?I:I.split(","),H=M.name||"",$=M.type||"",ne=$.replace(/\/.*$/,"");return g.some(function(se){var Oe=se.trim();return Oe.charAt(0)==="."?v(H.toLowerCase(),Oe.toLowerCase()):/\/\*$/.test(Oe)?ne===Oe.replace(/\/.*$/,""):$===Oe})}return!0};function p(M,I){var g=M.createReader(),H=[];function $(){g.readEntries(function(ne){var se=Array.prototype.slice.apply(ne);H=H.concat(se);var Oe=!se.length;Oe?I(H):$()})}$()}var h=function(I,g,H){var $=function ne(se,Oe){Oe=Oe||"",se.isFile?se.file(function(ge){H(ge)&&(se.fullPath&&!ge.webkitRelativePath&&(Object.defineProperties(ge,{webkitRelativePath:{writable:!0}}),ge.webkitRelativePath=se.fullPath.replace(/^\//,""),Object.defineProperties(ge,{webkitRelativePath:{writable:!1}})),g([ge]))}):se.isDirectory&&p(se,function(ge){ge.forEach(function(Te){ne(Te,""+Oe+se.name+"/")})})};I.forEach(function(ne){$(ne.webkitGetAsEntry())})},u=h,f=Object.assign||function(M){for(var I=1;I=0)continue;if(!Object.prototype.hasOwnProperty.call(M,H))continue;g[H]=M[H]}return g}function O(M,I){if(!(M instanceof I))throw new TypeError("Cannot call a class as a function")}function E(M,I){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:M}function w(M,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);M.prototype=Object.create(I&&I.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(M,I):M.__proto__=I)}var D=function(I){return Object.keys(I).reduce(function(g,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(g[H]=I[H]),g},{})},R=function(M){w(I,M);function I(){var g,H,$,ne;O(this,I);for(var se=arguments.length,Oe=Array(se),ge=0;gea.length&&(E=a.length);Ow===D){const w=a[Symbol.iterator](),D=O[Symbol.iterator]();for(;;){const R=w.next(),A=D.next();if(R.done!==A.done)return!1;if(R.done)return!0;if(!E(R.value,A.value))return!1}}J.equals=s})(ie||(ie={}))},LdHM:function(rt,be,Z){"use strict";Z.d(be,"b",function(){return a}),Z.d(be,"a",function(){return E});var ie=Z("1OyB"),J=Z("vuIU"),P=Z("Ji7U"),X=Z("LK+K"),j=Z("q1tI"),U=Z("rePB"),K=Z("Ff2n"),G=Z("ODXe"),r=Z("4IlW"),L=Z("bX4T"),v=Z("YrtM"),m=Z("TSYQ"),p=Z.n(m),h=Z("+nKL"),u=Z("8OUc"),f=function(H,$){var ne=H.prefixCls,se=H.id,Oe=H.flattenOptions,ge=H.childrenAsData,Te=H.values,Re=H.searchValue,Le=H.multiple,de=H.defaultActiveFirstOption,he=H.height,re=H.itemHeight,fe=H.notFoundContent,oe=H.open,De=H.menuItemSelectedIcon,Fe=H.virtual,Ce=H.onSelect,Ne=H.onToggleOpen,Be=H.onActiveValue,le=H.onScroll,ve=H.onMouseEnter,Se="".concat(ne,"-item"),Ie=Object(v.a)(function(){return Oe},[oe,Oe],function(Ge,Ae){return Ae[0]&&Ge[1]!==Ae[1]}),We=j.useRef(null),Ve=function(Ae){Ae.preventDefault()},Qe=function(Ae){We.current&&We.current.scrollTo({index:Ae})},Je=function(Ae){for(var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,we=Ie.length,ae=0;ae1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(g).map(function($,ne){if(!j.isValidElement($)||!$.type)return null;var se=$.type.isSelectOptGroup,Oe=$.key,ge=$.props,Te=ge.children,Re=Object(K.a)(ge,["children"]);return H||!se?R($):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?ne:Oe,"__"),label:Oe},Re),{},{options:A(Te)})}).filter(function($){return $})}var C=Z("2Qr1"),T=Z("qNPg"),c=Z("U8pU"),S=Z("Kwbf"),y=Z("WKfj");function b(g){var H=g.mode,$=g.options,ne=g.children,se=g.backfill,Oe=g.allowClear,ge=g.placeholder,Te=g.getInputElement,Re=g.showSearch,Le=g.onSearch,de=g.defaultOpen,he=g.autoFocus,re=g.labelInValue,fe=g.value,oe=g.inputValue,De=g.optionLabelProp,Fe=H==="multiple"||H==="tags",Ce=Re!==void 0?Re:Fe||H==="combobox",Ne=$||A(ne);if(Object(S.a)(H!=="tags"||Ne.every(function(Se){return!Se.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var Be=Ne.some(function(Se){return Se.options?Se.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Se?Se.value:Se.key)=="number"});Object(S.a)(!Be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(S.a)(H!=="combobox"||!De,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(S.a)(H==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(S.a)(H==="combobox"||!Te,"`getInputElement` only work with `combobox` mode."),Object(S.b)(H!=="combobox"||!Te||!Oe||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Le&&!Ce&&H!=="combobox"&&H!=="tags"&&Object(S.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(S.b)(!de||he,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var le=Object(y.d)(fe);Object(S.a)(!re||le.every(function(Se){return Object(c.a)(Se)==="object"&&("key"in Se||"value"in Se)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(S.a)(!Fe||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var ve=null;Object(D.a)(ne).some(function(Se){if(!j.isValidElement(Se)||!Se.type)return!1;var Ie=Se.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var We=Object(D.a)(Se.props.children).every(function(Ve){return!j.isValidElement(Ve)||!Se.type||Ve.type.isSelectOption?!0:(ve=Ve.type,!1)});return!We}return ve=Ie,!0}),ve&&Object(S.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(S.a)(oe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var B=b,F=Object(T.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:A,flattenOptions:C.d,getLabeledValue:C.e,filterOptions:C.b,isValueDisabled:C.g,findValueOption:C.c,warningProps:B,fillOptionsWithMissingValue:C.a}),_=function(g){Object(P.a)($,g);var H=Object(X.a)($);function $(){var ne;return Object(ie.a)(this,$),ne=H.apply(this,arguments),ne.selectRef=j.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(J.a)($,[{key:"render",value:function(){return j.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),$}(j.Component);_.Option=a,_.OptGroup=E;var M=_,I=be.c=M},M8RZ:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return r});var ie=Z("fWQN"),J=Z("mtLc"),P=Z("yKVA"),X=Z("879j"),j=Z("q1tI"),U=Z.n(j),K=Z("i8i4"),G=Z.n(K),r=function(L){Object(P.a)(m,L);var v=Object(X.a)(m);function m(p){var h;Object(ie.a)(this,m),h=v.call(this,p);var u=window.document;return h.node=u.createElement("div"),u.body.appendChild(h.node),h}return Object(J.a)(m,[{key:"render",value:function(){var h=this.props.children;return Object(K.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(U.a.Component)},MI8n:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return j}),Z.d(be,"b",function(){return r}),Z.d(be,"e",function(){return L}),Z.d(be,"a",function(){return v}),Z.d(be,"d",function(){return m}),Z.d(be,"f",function(){return p});var ie=Z("/cxE"),J=Z("pmY6"),P=Z("24hK"),X=Z("5Y4S"),j;(function(h){h.None=()=>J.a.None;function u(b){return(B,F=null,_)=>{let M=!1,I;return I=b(g=>M?void 0:(I?I.dispose():M=!0,B.call(F,g)),null,_),M&&I.dispose(),I}}h.once=u;function f(b,B){return E((F,_=null,M)=>b(I=>F.call(_,B(I)),null,M))}h.map=f;function l(b,B){return E((F,_=null,M)=>b(I=>{B(I),F.call(_,I)},null,M))}h.forEach=l;function o(b,B){return E((F,_=null,M)=>b(I=>B(I)&&F.call(_,I),null,M))}h.filter=o;function s(b){return b}h.signal=s;function a(...b){return(B,F=null,_)=>Object(J.e)(...b.map(M=>M(I=>B.call(F,I),null,_)))}h.any=a;function O(b,B,F){let _=F;return f(b,M=>(_=B(_,M),_))}h.reduce=O;function E(b){let B;const F=new r({onFirstListenerAdd(){B=b(F.fire,F)},onLastListenerRemove(){B.dispose()}});return F.event}function w(b,B,F=100,_=!1,M){let I,g,H,$=0;const ne=new r({leakWarningThreshold:M,onFirstListenerAdd(){I=b(se=>{$++,g=B(g,se),_&&!H&&(ne.fire(g),g=void 0),clearTimeout(H),H=setTimeout(()=>{const Oe=g;g=void 0,H=void 0,(!_||$>1)&&ne.fire(Oe),$=0},F)})},onLastListenerRemove(){I.dispose()}});return ne.event}h.debounce=w;function D(b,B=(F,_)=>F===_){let F=!0,_;return o(b,M=>{const I=F||!B(M,_);return F=!1,_=M,I})}h.latch=D;function R(b,B){return[h.filter(b,B),h.filter(b,F=>!B(F))]}h.split=R;function A(b,B=!1,F=[]){let _=F.slice(),M=b(H=>{_?_.push(H):g.fire(H)});const I=()=>{_&&_.forEach(H=>g.fire(H)),_=null},g=new r({onFirstListenerAdd(){M||(M=b(H=>g.fire(H)))},onFirstListenerDidAdd(){_&&(B?setTimeout(I):I())},onLastListenerRemove(){M&&M.dispose(),M=null}});return g.event}h.buffer=A;class C{constructor(b){this.event=b}map(b){return new C(f(this.event,b))}forEach(b){return new C(l(this.event,b))}filter(b){return new C(o(this.event,b))}reduce(b,B){return new C(O(this.event,b,B))}latch(){return new C(D(this.event))}debounce(b,B=100,F=!1,_){return new C(w(this.event,b,B,F,_))}on(b,B,F){return this.event(b,B,F)}once(b,B,F){return u(this.event)(b,B,F)}}function T(b){return new C(b)}h.chain=T;function c(b,B,F=_=>_){const _=(...H)=>g.fire(F(...H)),M=()=>b.on(B,_),I=()=>b.removeListener(B,_),g=new r({onFirstListenerAdd:M,onLastListenerRemove:I});return g.event}h.fromNodeEventEmitter=c;function S(b,B,F=_=>_){const _=(...H)=>g.fire(F(...H)),M=()=>b.addEventListener(B,_),I=()=>b.removeEventListener(B,_),g=new r({onFirstListenerAdd:M,onLastListenerRemove:I});return g.event}h.fromDOMEventEmitter=S;function y(b){return new Promise(B=>u(b)(B))}h.toPromise=y})(j||(j={}));class U{constructor(h){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${h}_${U._idPool++}`}start(h){this._stopWatch=new X.a(!0),this._listenerCount=h}stop(){if(this._stopWatch){const h=this._stopWatch.elapsed();this._elapsedOverall+=h,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${h.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}U._idPool=0;let K=-1;class G{constructor(h,u=Math.random().toString(18).slice(2,5)){this.customThreshold=h,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(h){let u=K;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||h':"<"+de+">";return me+ae+" +`},_e.strong=function(ae){return""+ae+""},_e.em=function(ae){return""+ae+""},_e.codespan=function(ae){return""+ae+""},_e.br=function(){return this.options.xhtml?"
      ":"
      "},_e.del=function(ae){return""+ae+""},_e.link=function(ae,ue,de){if(ae=le(this.options.sanitize,this.options.baseUrl,ae),ae===null)return de;var me='
      ",me},_e.image=function(ae,ue,de){if(ae=le(this.options.sanitize,this.options.baseUrl,ae),ae===null)return de;var me=''+de+'":">",me},_e.text=function(ae){return ae},Ae}(),Ie=function(){function Ae(){}var _e=Ae.prototype;return _e.strong=function(ae){return ae},_e.em=function(ae){return ae},_e.codespan=function(ae){return ae},_e.del=function(ae){return ae},_e.html=function(ae){return ae},_e.text=function(ae){return ae},_e.link=function(ae,ue,de){return""+de},_e.image=function(ae,ue,de){return""+de},_e.br=function(){return""},Ae}(),We=function(){function Ae(){this.seen={}}var _e=Ae.prototype;return _e.slug=function(ae){var ue=ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ue)){var de=ue;do this.seen[de]++,ue=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(ue))}return this.seen[ue]=0,ue},Ae}(),Ve=K.defaults,Qe=M.unescape,Je=function(){function Ae(we){this.options=we||Ve,this.options.renderer=this.options.renderer||new Se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new We}Ae.parse=function(ae,ue){var de=new Ae(ue);return de.parse(ae)};var _e=Ae.prototype;return _e.parse=function(ae,ue){ue===void 0&&(ue=!0);var de="",me,xe,Pe,He,ze,ht,ot,yt,ct,ft,Ot,It,qt,Zt,Dt,Cr,Kr,_t,Lr=ae.length;for(me=0;me0&&Dt.tokens[0].type==="text"?(Dt.tokens[0].text=_t+" "+Dt.tokens[0].text,Dt.tokens[0].tokens&&Dt.tokens[0].tokens.length>0&&Dt.tokens[0].tokens[0].type==="text"&&(Dt.tokens[0].tokens[0].text=_t+" "+Dt.tokens[0].tokens[0].text)):Dt.tokens.unshift({type:"text",text:_t}):Zt+=_t),Zt+=this.parse(Dt.tokens,qt),ct+=this.renderer.listitem(Zt,Kr,Cr);de+=this.renderer.list(ct,Ot,It);continue}case"html":{de+=this.renderer.html(ft.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(ct=ft.tokens?this.parseInline(ft.tokens):ft.text;me+1An error occurred:

      "+at(Pe.message+"",!0)+"
      ";throw Pe}}je.options=je.setOptions=function(Ae){return st(je.defaults,Ae),dt(je.defaults),je},je.getDefaults=Ue,je.defaults=lt,je.use=function(Ae){var _e=st({},Ae);if(Ae.renderer&&function(){var ae=je.defaults.renderer||new Se,ue=function(xe){var Pe=ae[xe];ae[xe]=function(){for(var He=arguments.length,ze=new Array(He),ht=0;ht`,triples:"",explode:"[]{}"},P=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(u,f,l){l&&l!=ie.Init&&(u.removeKeyMap(j),u.state.closeBrackets=null),f&&(U(X(f,"pairs")),u.state.closeBrackets=f,u.addKeyMap(j))});function X(u,f){return f=="pairs"&&typeof u=="string"?u:typeof u=="object"&&u[f]!=null?u[f]:J[f]}var j={Backspace:r,Enter:L};function U(u){for(var f=0;f=0;s--){var O=o[s].head;u.replaceRange("",P(O.line,O.ch-1),P(O.line,O.ch+1),"+delete")}}function L(u){var f=G(u),l=f&&X(f,"explode");if(!l||u.getOption("disableInput"))return ie.Pass;for(var o=u.listSelections(),s=0;s0;return{anchor:new P(u.anchor.line,u.anchor.ch+(f?-1:1)),head:new P(u.head.line,u.head.ch+(f?1:-1))}}function m(u,f){var l=G(u);if(!l||u.getOption("disableInput"))return ie.Pass;var o=X(l,"pairs"),s=o.indexOf(f);if(s==-1)return ie.Pass;for(var a=X(l,"closeBefore"),O=X(l,"triples"),E=o.charAt(s+1)==f,w=u.listSelections(),D=s%2==0,R,A=0;A=0&&u.getRange(T,P(T.line,T.ch+3))==f+f+f?d="skipThree":d="skip";else if(E&&T.ch>1&&O.indexOf(f)>=0&&u.getRange(P(T.line,T.ch-2),T)==f+f){if(T.ch>2&&/\bstring/.test(u.getTokenTypeAt(P(T.line,T.ch-2))))return ie.Pass;d="addFour"}else if(E){var y=T.ch==0?" ":u.getRange(P(T.line,T.ch-1),T);if(!ie.isWordChar(S)&&y!=f&&!ie.isWordChar(y))d="both";else return ie.Pass}else if(D&&(S.length===0||/\s/.test(S)||a.indexOf(S)>-1))d="both";else return ie.Pass;if(!R)R=d;else if(R!=d)return ie.Pass}var b=s%2?o.charAt(s-1):f,B=s%2?f:o.charAt(s+1);u.operation(function(){if(R=="skip")u.execCommand("goCharRight");else if(R=="skipThree")for(var F=0;F<3;F++)u.execCommand("goCharRight");else if(R=="surround"){for(var _=u.getSelections(),F=0;F<_.length;F++)_[F]=b+_[F]+B;u.replaceSelections(_,"around"),_=u.listSelections().slice();for(var F=0;F<_.length;F++)_[F]=v(_[F]);u.setSelections(_)}else R=="both"?(u.replaceSelection(b+B,null),u.triggerElectric(b+B),u.execCommand("goCharLeft")):R=="addFour"&&(u.replaceSelection(b+b+b+b,"before"),u.execCommand("goCharRight"))})}function p(u,f){var l=u.getRange(P(f.line,f.ch-1),P(f.line,f.ch+1));return l.length==2?l:null}function h(u,f){var l=u.getTokenAt(P(f.line,f.ch+1));return/\bstring/.test(l.type)&&l.start==f.ch&&(f.ch==0||!/\bstring/.test(u.getTokenTypeAt(f)))}})},FWmy:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return ie});function ie(J,P){if(!J)throw new Error(P?`Assertion failed (${P})`:"Assertion Failed")}},GfqC:function(rt,be,Z){"use strict";var ie=Z("q1tI"),J=Z.n(ie),P=Z("TSYQ"),X=Z.n(P);function j(M,I){var g="cannot "+M.method+" "+M.action+" "+I.status+"'",H=new Error(g);return H.status=I.status,H.method=M.method,H.url=M.action,H}function U(M){var I=M.responseText||M.response;if(!I)return I;try{return JSON.parse(I)}catch(g){return I}}function K(M){var I=new XMLHttpRequest;M.onProgress&&I.upload&&(I.upload.onprogress=function(ne){ne.total>0&&(ne.percent=ne.loaded/ne.total*100),M.onProgress(ne)});var g=new FormData;M.data&&Object.keys(M.data).forEach(function($){var ne=M.data[$];if(Array.isArray(ne)){ne.forEach(function(se){g.append($+"[]",se)});return}g.append($,M.data[$])}),M.file instanceof Blob?g.append(M.filename,M.file,M.file.name):g.append(M.filename,M.file),I.onerror=function(ne){M.onError(ne)},I.onload=function(){return I.status<200||I.status>=300?M.onError(j(M,I),U(I)):M.onSuccess(U(I),I)},I.open(M.method,M.action,!0),M.withCredentials&&"withCredentials"in I&&(I.withCredentials=!0);var H=M.headers||{};return H["X-Requested-With"]!==null&&I.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function($){H[$]!==null&&I.setRequestHeader($,H[$])}),I.send(g),{abort:function(){I.abort()}}}var G=+new Date,r=0;function L(){return"rc-upload-"+G+"-"+ ++r}function v(M,I){return M.indexOf(I,M.length-I.length)!==-1}var m=function(M,I){if(M&&I){var g=Array.isArray(I)?I:I.split(","),H=M.name||"",$=M.type||"",ne=$.replace(/\/.*$/,"");return g.some(function(se){var Oe=se.trim();return Oe.charAt(0)==="."?v(H.toLowerCase(),Oe.toLowerCase()):/\/\*$/.test(Oe)?ne===Oe.replace(/\/.*$/,""):$===Oe})}return!0};function p(M,I){var g=M.createReader(),H=[];function $(){g.readEntries(function(ne){var se=Array.prototype.slice.apply(ne);H=H.concat(se);var Oe=!se.length;Oe?I(H):$()})}$()}var h=function(I,g,H){var $=function ne(se,Oe){Oe=Oe||"",se.isFile?se.file(function(ge){H(ge)&&(se.fullPath&&!ge.webkitRelativePath&&(Object.defineProperties(ge,{webkitRelativePath:{writable:!0}}),ge.webkitRelativePath=se.fullPath.replace(/^\//,""),Object.defineProperties(ge,{webkitRelativePath:{writable:!1}})),g([ge]))}):se.isDirectory&&p(se,function(ge){ge.forEach(function(Te){ne(Te,""+Oe+se.name+"/")})})};I.forEach(function(ne){$(ne.webkitGetAsEntry())})},u=h,f=Object.assign||function(M){for(var I=1;I=0)continue;if(!Object.prototype.hasOwnProperty.call(M,H))continue;g[H]=M[H]}return g}function O(M,I){if(!(M instanceof I))throw new TypeError("Cannot call a class as a function")}function E(M,I){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:M}function w(M,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);M.prototype=Object.create(I&&I.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(M,I):M.__proto__=I)}var D=function(I){return Object.keys(I).reduce(function(g,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(g[H]=I[H]),g},{})},R=function(M){w(I,M);function I(){var g,H,$,ne;O(this,I);for(var se=arguments.length,Oe=Array(se),ge=0;gea.length&&(E=a.length);Ow===D){const w=a[Symbol.iterator](),D=O[Symbol.iterator]();for(;;){const R=w.next(),A=D.next();if(R.done!==A.done)return!1;if(R.done)return!0;if(!E(R.value,A.value))return!1}}J.equals=s})(ie||(ie={}))},LdHM:function(rt,be,Z){"use strict";Z.d(be,"b",function(){return a}),Z.d(be,"a",function(){return E});var ie=Z("1OyB"),J=Z("vuIU"),P=Z("Ji7U"),X=Z("LK+K"),j=Z("q1tI"),U=Z("rePB"),K=Z("Ff2n"),G=Z("ODXe"),r=Z("4IlW"),L=Z("bX4T"),v=Z("YrtM"),m=Z("TSYQ"),p=Z.n(m),h=Z("+nKL"),u=Z("8OUc"),f=function(H,$){var ne=H.prefixCls,se=H.id,Oe=H.flattenOptions,ge=H.childrenAsData,Te=H.values,Re=H.searchValue,Le=H.multiple,ce=H.defaultActiveFirstOption,he=H.height,re=H.itemHeight,fe=H.notFoundContent,oe=H.open,De=H.menuItemSelectedIcon,Fe=H.virtual,Ce=H.onSelect,Ne=H.onToggleOpen,Be=H.onActiveValue,le=H.onScroll,ve=H.onMouseEnter,Se="".concat(ne,"-item"),Ie=Object(v.a)(function(){return Oe},[oe,Oe],function(Ge,Ae){return Ae[0]&&Ge[1]!==Ae[1]}),We=j.useRef(null),Ve=function(Ae){Ae.preventDefault()},Qe=function(Ae){We.current&&We.current.scrollTo({index:Ae})},Je=function(Ae){for(var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,we=Ie.length,ae=0;ae1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(g).map(function($,ne){if(!j.isValidElement($)||!$.type)return null;var se=$.type.isSelectOptGroup,Oe=$.key,ge=$.props,Te=ge.children,Re=Object(K.a)(ge,["children"]);return H||!se?R($):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?ne:Oe,"__"),label:Oe},Re),{},{options:A(Te)})}).filter(function($){return $})}var C=Z("2Qr1"),T=Z("qNPg"),d=Z("U8pU"),S=Z("Kwbf"),y=Z("WKfj");function b(g){var H=g.mode,$=g.options,ne=g.children,se=g.backfill,Oe=g.allowClear,ge=g.placeholder,Te=g.getInputElement,Re=g.showSearch,Le=g.onSearch,ce=g.defaultOpen,he=g.autoFocus,re=g.labelInValue,fe=g.value,oe=g.inputValue,De=g.optionLabelProp,Fe=H==="multiple"||H==="tags",Ce=Re!==void 0?Re:Fe||H==="combobox",Ne=$||A(ne);if(Object(S.a)(H!=="tags"||Ne.every(function(Se){return!Se.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var Be=Ne.some(function(Se){return Se.options?Se.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Se?Se.value:Se.key)=="number"});Object(S.a)(!Be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(S.a)(H!=="combobox"||!De,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(S.a)(H==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(S.a)(H==="combobox"||!Te,"`getInputElement` only work with `combobox` mode."),Object(S.b)(H!=="combobox"||!Te||!Oe||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Le&&!Ce&&H!=="combobox"&&H!=="tags"&&Object(S.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(S.b)(!ce||he,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var le=Object(y.d)(fe);Object(S.a)(!re||le.every(function(Se){return Object(d.a)(Se)==="object"&&("key"in Se||"value"in Se)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(S.a)(!Fe||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var ve=null;Object(D.a)(ne).some(function(Se){if(!j.isValidElement(Se)||!Se.type)return!1;var Ie=Se.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var We=Object(D.a)(Se.props.children).every(function(Ve){return!j.isValidElement(Ve)||!Se.type||Ve.type.isSelectOption?!0:(ve=Ve.type,!1)});return!We}return ve=Ie,!0}),ve&&Object(S.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(S.a)(oe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var B=b,F=Object(T.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:A,flattenOptions:C.d,getLabeledValue:C.e,filterOptions:C.b,isValueDisabled:C.g,findValueOption:C.c,warningProps:B,fillOptionsWithMissingValue:C.a}),_=function(g){Object(P.a)($,g);var H=Object(X.a)($);function $(){var ne;return Object(ie.a)(this,$),ne=H.apply(this,arguments),ne.selectRef=j.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(J.a)($,[{key:"render",value:function(){return j.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),$}(j.Component);_.Option=a,_.OptGroup=E;var M=_,I=be.c=M},M8RZ:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return r});var ie=Z("fWQN"),J=Z("mtLc"),P=Z("yKVA"),X=Z("879j"),j=Z("q1tI"),U=Z.n(j),K=Z("i8i4"),G=Z.n(K),r=function(L){Object(P.a)(m,L);var v=Object(X.a)(m);function m(p){var h;Object(ie.a)(this,m),h=v.call(this,p);var u=window.document;return h.node=u.createElement("div"),u.body.appendChild(h.node),h}return Object(J.a)(m,[{key:"render",value:function(){var h=this.props.children;return Object(K.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(U.a.Component)},MI8n:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return j}),Z.d(be,"b",function(){return r}),Z.d(be,"e",function(){return L}),Z.d(be,"a",function(){return v}),Z.d(be,"d",function(){return m}),Z.d(be,"f",function(){return p});var ie=Z("/cxE"),J=Z("pmY6"),P=Z("24hK"),X=Z("5Y4S"),j;(function(h){h.None=()=>J.a.None;function u(b){return(B,F=null,_)=>{let M=!1,I;return I=b(g=>M?void 0:(I?I.dispose():M=!0,B.call(F,g)),null,_),M&&I.dispose(),I}}h.once=u;function f(b,B){return E((F,_=null,M)=>b(I=>F.call(_,B(I)),null,M))}h.map=f;function l(b,B){return E((F,_=null,M)=>b(I=>{B(I),F.call(_,I)},null,M))}h.forEach=l;function o(b,B){return E((F,_=null,M)=>b(I=>B(I)&&F.call(_,I),null,M))}h.filter=o;function s(b){return b}h.signal=s;function a(...b){return(B,F=null,_)=>Object(J.e)(...b.map(M=>M(I=>B.call(F,I),null,_)))}h.any=a;function O(b,B,F){let _=F;return f(b,M=>(_=B(_,M),_))}h.reduce=O;function E(b){let B;const F=new r({onFirstListenerAdd(){B=b(F.fire,F)},onLastListenerRemove(){B.dispose()}});return F.event}function w(b,B,F=100,_=!1,M){let I,g,H,$=0;const ne=new r({leakWarningThreshold:M,onFirstListenerAdd(){I=b(se=>{$++,g=B(g,se),_&&!H&&(ne.fire(g),g=void 0),clearTimeout(H),H=setTimeout(()=>{const Oe=g;g=void 0,H=void 0,(!_||$>1)&&ne.fire(Oe),$=0},F)})},onLastListenerRemove(){I.dispose()}});return ne.event}h.debounce=w;function D(b,B=(F,_)=>F===_){let F=!0,_;return o(b,M=>{const I=F||!B(M,_);return F=!1,_=M,I})}h.latch=D;function R(b,B){return[h.filter(b,B),h.filter(b,F=>!B(F))]}h.split=R;function A(b,B=!1,F=[]){let _=F.slice(),M=b(H=>{_?_.push(H):g.fire(H)});const I=()=>{_&&_.forEach(H=>g.fire(H)),_=null},g=new r({onFirstListenerAdd(){M||(M=b(H=>g.fire(H)))},onFirstListenerDidAdd(){_&&(B?setTimeout(I):I())},onLastListenerRemove(){M&&M.dispose(),M=null}});return g.event}h.buffer=A;class C{constructor(b){this.event=b}map(b){return new C(f(this.event,b))}forEach(b){return new C(l(this.event,b))}filter(b){return new C(o(this.event,b))}reduce(b,B){return new C(O(this.event,b,B))}latch(){return new C(D(this.event))}debounce(b,B=100,F=!1,_){return new C(w(this.event,b,B,F,_))}on(b,B,F){return this.event(b,B,F)}once(b,B,F){return u(this.event)(b,B,F)}}function T(b){return new C(b)}h.chain=T;function d(b,B,F=_=>_){const _=(...H)=>g.fire(F(...H)),M=()=>b.on(B,_),I=()=>b.removeListener(B,_),g=new r({onFirstListenerAdd:M,onLastListenerRemove:I});return g.event}h.fromNodeEventEmitter=d;function S(b,B,F=_=>_){const _=(...H)=>g.fire(F(...H)),M=()=>b.addEventListener(B,_),I=()=>b.removeEventListener(B,_),g=new r({onFirstListenerAdd:M,onLastListenerRemove:I});return g.event}h.fromDOMEventEmitter=S;function y(b){return new Promise(B=>u(b)(B))}h.toPromise=y})(j||(j={}));class U{constructor(h){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${h}_${U._idPool++}`}start(h){this._stopWatch=new X.a(!0),this._listenerCount=h}stop(){if(this._stopWatch){const h=this._stopWatch.elapsed();this._elapsedOverall+=h,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${h.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}U._idPool=0;let K=-1;class G{constructor(h,u=Math.random().toString(18).slice(2,5)){this.customThreshold=h,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(h){let u=K;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||h{const o=this._stacks.get(f)||0;this._stacks.set(f,o-1)}}}class r{constructor(h){var u;this._disposed=!1,this._options=h,this._leakageMon=K>0?new G(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((u=this._options)===null||u===void 0?void 0:u._profName)?new U(this._options._profName):void 0}get event(){return this._event||(this._event=(h,u,f)=>{var l;this._listeners||(this._listeners=new P.a);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(u?[h,u]:h);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,h,u);const a=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),O=Object(J.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const E=this._listeners&&!this._listeners.isEmpty();E||this._options.onLastListenerRemove(this)}});return f instanceof J.b?f.add(O):Array.isArray(f)&&f.push(O),O}),this._event}fire(h){var u,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let l of this._listeners)this._deliveryQueue.push([l,h]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,o]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,o):l[0].call(l[1],o)}catch(s){Object(ie.f)(s)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var h,u,f,l,o;this._disposed||(this._disposed=!0,(h=this._listeners)===null||h===void 0||h.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(l=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||l===void 0||l.call(f),(o=this._leakageMon)===null||o===void 0||o.dispose())}}class L extends r{constructor(h){super(h);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=h==null?void 0:h.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const h=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(h))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(h){this._listeners&&(this._isPaused!==0?this._eventQueue.push(h):super.fire(h))}}class v extends L{constructor(h){var u;super(h);this._delay=(u=h.delay)!==null&&u!==void 0?u:100}fire(h){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(h)}}class m{constructor(){this.buffers=[]}wrapEvent(h){return(u,f,l)=>h(o=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>u.call(f,o)):u.call(f,o)},void 0,l)}bufferEvents(h){const u=[];this.buffers.push(u);const f=h();return this.buffers.pop(),u.forEach(l=>l()),f}}class p{constructor(){this.listening=!1,this.inputEvent=j.None,this.inputEventListener=J.a.None,this.emitter=new r({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(rt,be,Z){"use strict";(function(ie,J){Z.d(be,"b",function(){return f}),Z.d(be,"i",function(){return a}),Z.d(be,"f",function(){return O}),Z.d(be,"d",function(){return E}),Z.d(be,"g",function(){return w}),Z.d(be,"h",function(){return D}),Z.d(be,"c",function(){return R}),Z.d(be,"k",function(){return A}),Z.d(be,"j",function(){return C}),Z.d(be,"a",function(){return T}),Z.d(be,"e",function(){return y});var P;const X="en";let j=!1,U=!1,K=!1,G=!1,r=!1,L=!1,v=!1,m,p=X,h,u;const f=typeof self=="object"?self:typeof ie=="object"?ie:{};let l;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?l=f.vscode.process:typeof J!="undefined"&&(l=J);const o=typeof((P=l==null?void 0:l.versions)===null||P===void 0?void 0:P.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!o)u=navigator.userAgent,j=u.indexOf("Windows")>=0,U=u.indexOf("Macintosh")>=0,v=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=u.indexOf("Linux")>=0,L=!0,m=navigator.language,p=m;else if(typeof l=="object"){j=l.platform==="win32",U=l.platform==="darwin",K=l.platform==="linux",G=K&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,m=X,p=X;const b=l.env.VSCODE_NLS_CONFIG;if(b)try{const B=JSON.parse(b),F=B.availableLanguages["*"];m=B.locale,p=F||X,h=B._translationsConfigFile}catch(B){}r=!0}else console.error("Unable to resolve platform.");let s=0;U?s=1:j?s=3:K&&(s=2);const a=j,O=U,E=K,w=r,D=L,R=v,A=u,C=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let F=[];f.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let I=0,g=F.length;I{const I=++_;F.push({id:I,callback:M}),f.postMessage({vscodeSetImmediateId:I},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const B=Promise.resolve();return F=>B.then(F)}(),T=U||v?2:j?1:3;let c=!0,S=!1;function y(){if(!S){S=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2;const B=new Uint16Array(b.buffer);c=B[0]===(2<<8)+1}return c}}).call(this,Z("IyRk"),Z("Q2Ig"))},N0LK:function(rt,be,Z){"use strict";Z.d(be,"C",function(){return ie}),Z.d(be,"v",function(){return P}),Z.d(be,"s",function(){return X}),Z.d(be,"t",function(){return j}),Z.d(be,"U",function(){return U}),Z.d(be,"J",function(){return K}),Z.d(be,"O",function(){return G}),Z.d(be,"p",function(){return r}),Z.d(be,"T",function(){return L}),Z.d(be,"q",function(){return v}),Z.d(be,"N",function(){return m}),Z.d(be,"M",function(){return p}),Z.d(be,"Q",function(){return h}),Z.d(be,"u",function(){return u}),Z.d(be,"x",function(){return f}),Z.d(be,"I",function(){return l}),Z.d(be,"f",function(){return o}),Z.d(be,"h",function(){return s}),Z.d(be,"g",function(){return a}),Z.d(be,"i",function(){return O}),Z.d(be,"G",function(){return E}),Z.d(be,"H",function(){return w}),Z.d(be,"r",function(){return D}),Z.d(be,"R",function(){return R}),Z.d(be,"d",function(){return A}),Z.d(be,"e",function(){return C}),Z.d(be,"E",function(){return T}),Z.d(be,"F",function(){return c}),Z.d(be,"j",function(){return S}),Z.d(be,"z",function(){return y}),Z.d(be,"K",function(){return B}),Z.d(be,"L",function(){return F}),Z.d(be,"m",function(){return M}),Z.d(be,"k",function(){return g}),Z.d(be,"A",function(){return $}),Z.d(be,"a",function(){return ne}),Z.d(be,"n",function(){return se}),Z.d(be,"l",function(){return Oe}),Z.d(be,"D",function(){return ge}),Z.d(be,"B",function(){return Te}),Z.d(be,"b",function(){return Re}),Z.d(be,"S",function(){return Le}),Z.d(be,"o",function(){return de}),Z.d(be,"P",function(){return he}),Z.d(be,"w",function(){return re}),Z.d(be,"c",function(){return fe}),Z.d(be,"y",function(){return Fe});function ie(le){return!le||typeof le!="string"?!0:le.trim().length===0}const J=/{(\d+)}/g;function P(le,...ve){return ve.length===0?le:le.replace(J,function(Se,Ie){const We=parseInt(Ie,10);return isNaN(We)||We<0||We>=ve.length?Se:ve[We]})}function X(le){return le.replace(/[<>&]/g,function(ve){switch(ve){case"<":return"<";case">":return">";case"&":return"&";default:return ve}})}function j(le){return le.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function U(le,ve=" "){const Se=K(le,ve);return G(Se,ve)}function K(le,ve){if(!le||!ve)return le;const Se=ve.length;if(Se===0||le.length===0)return le;let Ie=0;for(;le.indexOf(ve,Ie)===Ie;)Ie=Ie+Se;return le.substring(Ie)}function G(le,ve){if(!le||!ve)return le;const Se=ve.length,Ie=le.length;if(Se===0||Ie===0)return le;let We=Ie,Ve=-1;for(;!(Ve=le.lastIndexOf(ve,We-1),Ve===-1||Ve+Se!==We);){if(Ve===0)return"";We=Ve}return le.substring(0,We)}function r(le){return le.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function L(le){return le.replace(/\*/g,"")}function v(le,ve,Se={}){if(!le)throw new Error("Cannot create regex from empty string");ve||(le=j(le)),Se.wholeWord&&(/\B/.test(le.charAt(0))||(le="\\b"+le),/\B/.test(le.charAt(le.length-1))||(le=le+"\\b"));let Ie="";return Se.global&&(Ie+="g"),Se.matchCase||(Ie+="i"),Se.multiline&&(Ie+="m"),Se.unicode&&(Ie+="u"),new RegExp(le,Ie)}function m(le){if(le.source==="^"||le.source==="^$"||le.source==="$"||le.source==="^\\s*$")return!1;const ve=le.exec("");return!!(ve&&le.lastIndex===0)}function p(le){return(le.global?"g":"")+(le.ignoreCase?"i":"")+(le.multiline?"m":"")+(le.unicode?"u":"")}function h(le){return le.split(/\r\n|\r|\n/)}function u(le){for(let ve=0,Se=le.length;ve=0;Se--){const Ie=le.charCodeAt(Se);if(Ie!==32&&Ie!==9)return Se}return-1}function o(le,ve){return leve?1:0}function s(le,ve,Se=0,Ie=le.length,We=0,Ve=ve.length){for(;Seqe)return 1}const Qe=Ie-Se,Je=Ve-We;return QeJe?1:0}function a(le,ve){return O(le,ve,0,le.length,0,ve.length)}function O(le,ve,Se=0,Ie=le.length,We=0,Ve=ve.length){for(;Se=128||qe>=128)return s(le.toLowerCase(),ve.toLowerCase(),Se,Ie,We,Ve);E(st)&&(st-=32),E(qe)&&(qe-=32);const at=st-qe;if(at===0)continue;return at}const Qe=Ie-Se,Je=Ve-We;return QeJe?1:0}function E(le){return le>=97&&le<=122}function w(le){return le>=65&&le<=90}function D(le,ve){return le.length===ve.length&&O(le,ve)===0}function R(le,ve){const Se=ve.length;return ve.length>le.length?!1:O(le,ve,0,Se)===0}function A(le,ve){let Se,Ie=Math.min(le.length,ve.length);for(Se=0;Se1){const Ie=le.charCodeAt(ve-2);if(T(Ie))return S(Ie,Se)}return Se}function B(le,ve){const Se=oe.getInstance(),Ie=ve,We=le.length,Ve=y(le,We,ve);ve+=Ve>=65536?2:1;let Qe=Se.getGraphemeBreakType(Ve);for(;ve=65536?2:1,Qe=st}return ve-Ie}function F(le,ve){const Se=oe.getInstance(),Ie=ve,We=b(le,ve);ve-=We>=65536?2:1;let Ve=Se.getGraphemeBreakType(We);for(;ve>0;){const Qe=b(le,ve),Je=Se.getGraphemeBreakType(Qe);if(fe(Je,Ve))break;ve-=Qe>=65536?2:1,Ve=Je}return Ie-ve}const _=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function M(le){return _.test(le)}const I=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function g(le){return I.test(le)}const H=/^[\t\n\r\x20-\x7E]*$/;function $(le){return H.test(le)}const ne=/[\u2028\u2029]/;function se(le){return ne.test(le)}function Oe(le){for(let ve=0,Se=le.length;ve=11904&&le<=55215||le>=63744&&le<=64255||le>=65281&&le<=65374}function Te(le){return le>=127462&&le<=127487||le===8986||le===8987||le===9200||le===9203||le>=9728&&le<=10175||le===11088||le===11093||le>=127744&&le<=128591||le>=128640&&le<=128764||le>=128992&&le<=129003||le>=129280&&le<=129535||le>=129648&&le<=129750}const Re=String.fromCharCode(65279);function Le(le){return!!(le&&le.length>0&&le.charCodeAt(0)===65279)}function de(le,ve=!1){return le?(ve&&(le=le.replace(/\\./g,"")),le.toLowerCase()!==le):!1}function he(le){const ve=90-65+1;return le=le%(2*ve),leve[3*Ie+1])Ie=2*Ie+1;else return ve[3*Ie+2];return 0}}oe._INSTANCE=null;function De(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Fe(le,ve){if(le===0)return 0;const Se=Ce(le,ve);if(Se!==void 0)return Se;const Ie=b(ve,le);return le-=Ne(Ie),le}function Ce(le,ve){let Se=b(ve,le);for(le-=Ne(Se);Be(Se)||Se===65039||Se===8419;){if(le===0)return;Se=b(ve,le),le-=Ne(Se)}if(!Te(Se))return;if(le>=0){const Ie=b(ve,le);Ie===8205&&(le-=Ne(Ie))}return le}function Ne(le){return le>=65536?2:1}function Be(le){return 127995<=le&&le<=127999}},Ot1p:function(rt,be,Z){"use strict";var ie=Z("2qtc"),J=Z("kLXV"),P=Z("rAM+"),X=Z("miYZ"),j=Z("tsqr"),U=Z("9og8"),K=Z("tJVT"),G=Z("jrin"),r=Z("WmNS"),L=Z.n(r),v=Z("q1tI"),m=Z.n(v),p=Z("VrN/"),h=Z.n(p),u=Z("bdgK"),f=Z("p77/"),l=Z("Bd2K"),o=Z("ELLl"),s=Z("19Vz"),a=Z("lZu9"),O=Z("+NIl"),E=Z("kSUc"),w=Z("9Bee"),D=function(xe){var Pe=xe.value,He=Pe===void 0?"":Pe,ze=xe.className,ht=xe.showTextOnly,ot=xe.showLines,yt=xe.style,dt=yt===void 0?{}:yt,ft=Object(v.useMemo)(function(){return""},[He]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},R=Z("0Owb"),A=Z("dejd"),C=Z("C+DQ"),T=Z("1vsH"),c=Z("m3rI"),S=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function y(xe){var Pe=xe.onActionCallback,He=xe.title,ze=xe.icon,ht=xe.actionName,ot=xe.className,yt=ot===void 0?"":ot,dt=xe.children;function ft(){Pe(ht)}return m.a.createElement("a",{title:He,className:yt,onClick:ft},m.a.createElement("i",{className:"md-iconfont ".concat(ze)}),dt)}var b=function(xe){var Pe=xe.watch,He=xe.showNullButton,ze=xe.onActionCallback,ht=xe.fullScreen,ot=xe.insertTemp,yt=xe.hidetoolBar,dt=xe.uuid,ft=xe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(T.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(T.F)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var Ot=[].concat(S,[{title:"".concat(Pe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Pe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!yt&&Ot.map(function(It,qt){return m.a.createElement("li",{key:qt},It.actionName?m.a.createElement(y,Object(R.a)({},It,{onActionCallback:ze})):m.a.createElement("span",{className:"v-line"}))}),He?m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ze},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ot&&m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ot),onActionCallback:ze},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(y,{icon:"".concat(ht?"icon-shrink":"icon-enlarge"),title:ht?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ze})))},B=Z("M8RZ"),F=Z("+L6B"),_=Z("2/Rp"),M=Z("y8nQ"),I=Z("Vl3Y"),g=Z("5NDa"),H=Z("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},ne=function(xe){var Pe=xe.callback,He=xe.onCancel;function ze(ht){Pe(ht)}return m.a.createElement(I.a,Object(R.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ze}),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(H.a,null)),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(H.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))},se=Z("7ahc"),Oe=Z("HmJG"),ge=Z("BjJ7"),Te=I.a.useForm,Re={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}},de=function(xe){var Pe=xe.callback,He=xe.onCancel,ze=Te(),ht=Object(K.a)(ze,1),ot=ht[0];function yt(Ot){Pe(Ot)}function dt(Ot,It){if(Ot.status===-1){j.b.error(Ot.message);return}ot.setFieldsValue({src:"/api/attachments/".concat(Ot.id),type:It.type})}function ft(Ot){var It=Ot.target.files[0];re(It,dt)}return m.a.createElement(I.a,Object(R.a)({form:ot},Le,{className:"upload-image-panel",onFinish:yt}),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(I.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(H.a,{style:Re})),m.a.createElement(he,{onFileChange:ft}))),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(H.a,{style:{width:264}})),m.a.createElement(I.a.Item,{style:{textAlign:"right"}},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))};function he(xe){var Pe=xe.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Pe}))}function re(xe,Pe){if(!xe)throw new String("\u6CA1\u6709\u6587\u4EF6");var He=new FormData;He.append("editormd-image-file",xe),He.append("file_param_name","editormd-image-file"),He.append("byxhr","true");var ze=new window.XMLHttpRequest;ze.withCredentials=!0,ze.addEventListener("load",function(ht){Pe(JSON.parse(ht.target.responseText),xe)},!1),ze.addEventListener("error",function(ht){console.error(ht)},!1),ze.open("POST","".concat(ge.a,"/api/attachments.json")),ze.send(He)}var fe=Z("giR+"),oe=Z("fyUT"),De=Z("7Kak"),Fe=Z("9yH6"),Ce=Fe.a.Group,Ne={margin:"0 8px"},Be=function(xe){var Pe=xe.callback,He=xe.onCancel;function ze(ht){Pe(ht)}return m.a.createElement(I.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ze},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Ne},"\u884C\u6570"),m.a.createElement(I.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(oe.a,null)),m.a.createElement("span",{style:Ne},"\u5217\u6570"),m.a.createElement(I.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(oe.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(I.a.Item,{name:"align"},m.a.createElement(Ce,null,m.a.createElement(Fe.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(Fe.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(Fe.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(Fe.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))},le=Z("ErOA"),ve=Z("7Cbv"),Se="link",Ie="upload-image",We="code-block",Ve="add-table",Qe="------------",Je={default:Qe,left:":".concat(Qe),center:":".concat(Qe,":"),right:"".concat(Qe,":")},st=Z("9VGf"),qe,at;function Ue(){}var ct=0,lt=1e4,je="\u2581",Ge=` +`),l=this._stacks.get(f)||0;if(this._stacks.set(f,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=u*.5;let o,s=0;for(const[a,O]of this._stacks)(!o||s{const o=this._stacks.get(f)||0;this._stacks.set(f,o-1)}}}class r{constructor(h){var u;this._disposed=!1,this._options=h,this._leakageMon=K>0?new G(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((u=this._options)===null||u===void 0?void 0:u._profName)?new U(this._options._profName):void 0}get event(){return this._event||(this._event=(h,u,f)=>{var l;this._listeners||(this._listeners=new P.a);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(u?[h,u]:h);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,h,u);const a=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),O=Object(J.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const E=this._listeners&&!this._listeners.isEmpty();E||this._options.onLastListenerRemove(this)}});return f instanceof J.b?f.add(O):Array.isArray(f)&&f.push(O),O}),this._event}fire(h){var u,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let l of this._listeners)this._deliveryQueue.push([l,h]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,o]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,o):l[0].call(l[1],o)}catch(s){Object(ie.f)(s)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var h,u,f,l,o;this._disposed||(this._disposed=!0,(h=this._listeners)===null||h===void 0||h.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(l=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||l===void 0||l.call(f),(o=this._leakageMon)===null||o===void 0||o.dispose())}}class L extends r{constructor(h){super(h);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=h==null?void 0:h.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const h=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(h))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(h){this._listeners&&(this._isPaused!==0?this._eventQueue.push(h):super.fire(h))}}class v extends L{constructor(h){var u;super(h);this._delay=(u=h.delay)!==null&&u!==void 0?u:100}fire(h){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(h)}}class m{constructor(){this.buffers=[]}wrapEvent(h){return(u,f,l)=>h(o=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>u.call(f,o)):u.call(f,o)},void 0,l)}bufferEvents(h){const u=[];this.buffers.push(u);const f=h();return this.buffers.pop(),u.forEach(l=>l()),f}}class p{constructor(){this.listening=!1,this.inputEvent=j.None,this.inputEventListener=J.a.None,this.emitter=new r({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(rt,be,Z){"use strict";(function(ie,J){Z.d(be,"b",function(){return f}),Z.d(be,"i",function(){return a}),Z.d(be,"f",function(){return O}),Z.d(be,"d",function(){return E}),Z.d(be,"g",function(){return w}),Z.d(be,"h",function(){return D}),Z.d(be,"c",function(){return R}),Z.d(be,"k",function(){return A}),Z.d(be,"j",function(){return C}),Z.d(be,"a",function(){return T}),Z.d(be,"e",function(){return y});var P;const X="en";let j=!1,U=!1,K=!1,G=!1,r=!1,L=!1,v=!1,m,p=X,h,u;const f=typeof self=="object"?self:typeof ie=="object"?ie:{};let l;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?l=f.vscode.process:typeof J!="undefined"&&(l=J);const o=typeof((P=l==null?void 0:l.versions)===null||P===void 0?void 0:P.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!o)u=navigator.userAgent,j=u.indexOf("Windows")>=0,U=u.indexOf("Macintosh")>=0,v=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=u.indexOf("Linux")>=0,L=!0,m=navigator.language,p=m;else if(typeof l=="object"){j=l.platform==="win32",U=l.platform==="darwin",K=l.platform==="linux",G=K&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,m=X,p=X;const b=l.env.VSCODE_NLS_CONFIG;if(b)try{const B=JSON.parse(b),F=B.availableLanguages["*"];m=B.locale,p=F||X,h=B._translationsConfigFile}catch(B){}r=!0}else console.error("Unable to resolve platform.");let s=0;U?s=1:j?s=3:K&&(s=2);const a=j,O=U,E=K,w=r,D=L,R=v,A=u,C=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let F=[];f.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let I=0,g=F.length;I{const I=++_;F.push({id:I,callback:M}),f.postMessage({vscodeSetImmediateId:I},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const B=Promise.resolve();return F=>B.then(F)}(),T=U||v?2:j?1:3;let d=!0,S=!1;function y(){if(!S){S=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2;const B=new Uint16Array(b.buffer);d=B[0]===(2<<8)+1}return d}}).call(this,Z("IyRk"),Z("Q2Ig"))},N0LK:function(rt,be,Z){"use strict";Z.d(be,"C",function(){return ie}),Z.d(be,"v",function(){return P}),Z.d(be,"s",function(){return X}),Z.d(be,"t",function(){return j}),Z.d(be,"U",function(){return U}),Z.d(be,"J",function(){return K}),Z.d(be,"O",function(){return G}),Z.d(be,"p",function(){return r}),Z.d(be,"T",function(){return L}),Z.d(be,"q",function(){return v}),Z.d(be,"N",function(){return m}),Z.d(be,"M",function(){return p}),Z.d(be,"Q",function(){return h}),Z.d(be,"u",function(){return u}),Z.d(be,"x",function(){return f}),Z.d(be,"I",function(){return l}),Z.d(be,"f",function(){return o}),Z.d(be,"h",function(){return s}),Z.d(be,"g",function(){return a}),Z.d(be,"i",function(){return O}),Z.d(be,"G",function(){return E}),Z.d(be,"H",function(){return w}),Z.d(be,"r",function(){return D}),Z.d(be,"R",function(){return R}),Z.d(be,"d",function(){return A}),Z.d(be,"e",function(){return C}),Z.d(be,"E",function(){return T}),Z.d(be,"F",function(){return d}),Z.d(be,"j",function(){return S}),Z.d(be,"z",function(){return y}),Z.d(be,"K",function(){return B}),Z.d(be,"L",function(){return F}),Z.d(be,"m",function(){return M}),Z.d(be,"k",function(){return g}),Z.d(be,"A",function(){return $}),Z.d(be,"a",function(){return ne}),Z.d(be,"n",function(){return se}),Z.d(be,"l",function(){return Oe}),Z.d(be,"D",function(){return ge}),Z.d(be,"B",function(){return Te}),Z.d(be,"b",function(){return Re}),Z.d(be,"S",function(){return Le}),Z.d(be,"o",function(){return ce}),Z.d(be,"P",function(){return he}),Z.d(be,"w",function(){return re}),Z.d(be,"c",function(){return fe}),Z.d(be,"y",function(){return Fe});function ie(le){return!le||typeof le!="string"?!0:le.trim().length===0}const J=/{(\d+)}/g;function P(le,...ve){return ve.length===0?le:le.replace(J,function(Se,Ie){const We=parseInt(Ie,10);return isNaN(We)||We<0||We>=ve.length?Se:ve[We]})}function X(le){return le.replace(/[<>&]/g,function(ve){switch(ve){case"<":return"<";case">":return">";case"&":return"&";default:return ve}})}function j(le){return le.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function U(le,ve=" "){const Se=K(le,ve);return G(Se,ve)}function K(le,ve){if(!le||!ve)return le;const Se=ve.length;if(Se===0||le.length===0)return le;let Ie=0;for(;le.indexOf(ve,Ie)===Ie;)Ie=Ie+Se;return le.substring(Ie)}function G(le,ve){if(!le||!ve)return le;const Se=ve.length,Ie=le.length;if(Se===0||Ie===0)return le;let We=Ie,Ve=-1;for(;!(Ve=le.lastIndexOf(ve,We-1),Ve===-1||Ve+Se!==We);){if(Ve===0)return"";We=Ve}return le.substring(0,We)}function r(le){return le.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function L(le){return le.replace(/\*/g,"")}function v(le,ve,Se={}){if(!le)throw new Error("Cannot create regex from empty string");ve||(le=j(le)),Se.wholeWord&&(/\B/.test(le.charAt(0))||(le="\\b"+le),/\B/.test(le.charAt(le.length-1))||(le=le+"\\b"));let Ie="";return Se.global&&(Ie+="g"),Se.matchCase||(Ie+="i"),Se.multiline&&(Ie+="m"),Se.unicode&&(Ie+="u"),new RegExp(le,Ie)}function m(le){if(le.source==="^"||le.source==="^$"||le.source==="$"||le.source==="^\\s*$")return!1;const ve=le.exec("");return!!(ve&&le.lastIndex===0)}function p(le){return(le.global?"g":"")+(le.ignoreCase?"i":"")+(le.multiline?"m":"")+(le.unicode?"u":"")}function h(le){return le.split(/\r\n|\r|\n/)}function u(le){for(let ve=0,Se=le.length;ve=0;Se--){const Ie=le.charCodeAt(Se);if(Ie!==32&&Ie!==9)return Se}return-1}function o(le,ve){return leve?1:0}function s(le,ve,Se=0,Ie=le.length,We=0,Ve=ve.length){for(;Seqe)return 1}const Qe=Ie-Se,Je=Ve-We;return QeJe?1:0}function a(le,ve){return O(le,ve,0,le.length,0,ve.length)}function O(le,ve,Se=0,Ie=le.length,We=0,Ve=ve.length){for(;Se=128||qe>=128)return s(le.toLowerCase(),ve.toLowerCase(),Se,Ie,We,Ve);E(st)&&(st-=32),E(qe)&&(qe-=32);const at=st-qe;if(at===0)continue;return at}const Qe=Ie-Se,Je=Ve-We;return QeJe?1:0}function E(le){return le>=97&&le<=122}function w(le){return le>=65&&le<=90}function D(le,ve){return le.length===ve.length&&O(le,ve)===0}function R(le,ve){const Se=ve.length;return ve.length>le.length?!1:O(le,ve,0,Se)===0}function A(le,ve){let Se,Ie=Math.min(le.length,ve.length);for(Se=0;Se1){const Ie=le.charCodeAt(ve-2);if(T(Ie))return S(Ie,Se)}return Se}function B(le,ve){const Se=oe.getInstance(),Ie=ve,We=le.length,Ve=y(le,We,ve);ve+=Ve>=65536?2:1;let Qe=Se.getGraphemeBreakType(Ve);for(;ve=65536?2:1,Qe=st}return ve-Ie}function F(le,ve){const Se=oe.getInstance(),Ie=ve,We=b(le,ve);ve-=We>=65536?2:1;let Ve=Se.getGraphemeBreakType(We);for(;ve>0;){const Qe=b(le,ve),Je=Se.getGraphemeBreakType(Qe);if(fe(Je,Ve))break;ve-=Qe>=65536?2:1,Ve=Je}return Ie-ve}const _=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function M(le){return _.test(le)}const I=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function g(le){return I.test(le)}const H=/^[\t\n\r\x20-\x7E]*$/;function $(le){return H.test(le)}const ne=/[\u2028\u2029]/;function se(le){return ne.test(le)}function Oe(le){for(let ve=0,Se=le.length;ve=11904&&le<=55215||le>=63744&&le<=64255||le>=65281&&le<=65374}function Te(le){return le>=127462&&le<=127487||le===8986||le===8987||le===9200||le===9203||le>=9728&&le<=10175||le===11088||le===11093||le>=127744&&le<=128591||le>=128640&&le<=128764||le>=128992&&le<=129003||le>=129280&&le<=129535||le>=129648&&le<=129750}const Re=String.fromCharCode(65279);function Le(le){return!!(le&&le.length>0&&le.charCodeAt(0)===65279)}function ce(le,ve=!1){return le?(ve&&(le=le.replace(/\\./g,"")),le.toLowerCase()!==le):!1}function he(le){const ve=90-65+1;return le=le%(2*ve),leve[3*Ie+1])Ie=2*Ie+1;else return ve[3*Ie+2];return 0}}oe._INSTANCE=null;function De(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Fe(le,ve){if(le===0)return 0;const Se=Ce(le,ve);if(Se!==void 0)return Se;const Ie=b(ve,le);return le-=Ne(Ie),le}function Ce(le,ve){let Se=b(ve,le);for(le-=Ne(Se);Be(Se)||Se===65039||Se===8419;){if(le===0)return;Se=b(ve,le),le-=Ne(Se)}if(!Te(Se))return;if(le>=0){const Ie=b(ve,le);Ie===8205&&(le-=Ne(Ie))}return le}function Ne(le){return le>=65536?2:1}function Be(le){return 127995<=le&&le<=127999}},Ot1p:function(rt,be,Z){"use strict";var ie=Z("2qtc"),J=Z("kLXV"),P=Z("rAM+"),X=Z("miYZ"),j=Z("tsqr"),U=Z("9og8"),K=Z("tJVT"),G=Z("jrin"),r=Z("WmNS"),L=Z.n(r),v=Z("q1tI"),m=Z.n(v),p=Z("VrN/"),h=Z.n(p),u=Z("bdgK"),f=Z("p77/"),l=Z("Bd2K"),o=Z("ELLl"),s=Z("19Vz"),a=Z("lZu9"),O=Z("+NIl"),E=Z("kSUc"),w=Z("9Bee"),D=function(xe){var Pe=xe.value,He=Pe===void 0?"":Pe,ze=xe.className,ht=xe.showTextOnly,ot=xe.showLines,yt=xe.style,ct=yt===void 0?{}:yt,ft=Object(v.useMemo)(function(){return""},[He]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},R=Z("0Owb"),A=Z("dejd"),C=Z("C+DQ"),T=Z("1vsH"),d=Z("m3rI"),S=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function y(xe){var Pe=xe.onActionCallback,He=xe.title,ze=xe.icon,ht=xe.actionName,ot=xe.className,yt=ot===void 0?"":ot,ct=xe.children;function ft(){Pe(ht)}return m.a.createElement("a",{title:He,className:yt,onClick:ft},m.a.createElement("i",{className:"md-iconfont ".concat(ze)}),ct)}var b=function(xe){var Pe=xe.watch,He=xe.showNullButton,ze=xe.onActionCallback,ht=xe.fullScreen,ot=xe.insertTemp,yt=xe.hidetoolBar,ct=xe.uuid,ft=xe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(T.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(T.F)("_educoder_session"),"&key=").concat(ct,"&api=").concat(encodeURIComponent(d.a.PROXY_SERVER)));var Ot=[].concat(S,[{title:"".concat(Pe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Pe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!yt&&Ot.map(function(It,qt){return m.a.createElement("li",{key:qt},It.actionName?m.a.createElement(y,Object(R.a)({},It,{onActionCallback:ze})):m.a.createElement("span",{className:"v-line"}))}),He?m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ze},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ot&&m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ot),onActionCallback:ze},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(y,{icon:"".concat(ht?"icon-shrink":"icon-enlarge"),title:ht?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ze})))},B=Z("M8RZ"),F=Z("+L6B"),_=Z("2/Rp"),M=Z("y8nQ"),I=Z("Vl3Y"),g=Z("5NDa"),H=Z("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},ne=function(xe){var Pe=xe.callback,He=xe.onCancel;function ze(ht){Pe(ht)}return m.a.createElement(I.a,Object(R.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ze}),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(H.a,null)),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(H.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))},se=Z("7ahc"),Oe=Z("HmJG"),ge=Z("BjJ7"),Te=I.a.useForm,Re={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}},ce=function(xe){var Pe=xe.callback,He=xe.onCancel,ze=Te(),ht=Object(K.a)(ze,1),ot=ht[0];function yt(Ot){Pe(Ot)}function ct(Ot,It){if(Ot.status===-1){j.b.error(Ot.message);return}ot.setFieldsValue({src:"/api/attachments/".concat(Ot.id),type:It.type})}function ft(Ot){var It=Ot.target.files[0];re(It,ct)}return m.a.createElement(I.a,Object(R.a)({form:ot},Le,{className:"upload-image-panel",onFinish:yt}),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(I.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(H.a,{style:Re})),m.a.createElement(he,{onFileChange:ft}))),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(H.a,{style:{width:264}})),m.a.createElement(I.a.Item,{style:{textAlign:"right"}},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))};function he(xe){var Pe=xe.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Pe}))}function re(xe,Pe){if(!xe)throw new String("\u6CA1\u6709\u6587\u4EF6");var He=new FormData;He.append("editormd-image-file",xe),He.append("file_param_name","editormd-image-file"),He.append("byxhr","true");var ze=new window.XMLHttpRequest;ze.withCredentials=!0,ze.addEventListener("load",function(ht){Pe(JSON.parse(ht.target.responseText),xe)},!1),ze.addEventListener("error",function(ht){console.error(ht)},!1),ze.open("POST","".concat(ge.a,"/api/attachments.json")),ze.send(He)}var fe=Z("giR+"),oe=Z("fyUT"),De=Z("7Kak"),Fe=Z("9yH6"),Ce=Fe.a.Group,Ne={margin:"0 8px"},Be=function(xe){var Pe=xe.callback,He=xe.onCancel;function ze(ht){Pe(ht)}return m.a.createElement(I.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ze},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Ne},"\u884C\u6570"),m.a.createElement(I.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(oe.a,null)),m.a.createElement("span",{style:Ne},"\u5217\u6570"),m.a.createElement(I.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(oe.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(I.a.Item,{name:"align"},m.a.createElement(Ce,null,m.a.createElement(Fe.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(Fe.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(Fe.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(Fe.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(_.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))},le=Z("ErOA"),ve=Z("7Cbv"),Se="link",Ie="upload-image",We="code-block",Ve="add-table",Qe="------------",Je={default:Qe,left:":".concat(Qe),center:":".concat(Qe,":"),right:"".concat(Qe,":")},st=Z("9VGf"),qe,at;function Ue(){}var dt=0,lt=1e4,je="\u2581",Ge=` **\u6A21\u677F\u6807\u9898** -\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ae(xe){return/^\d+$/.test(xe)?"".concat(xe,"px"):xe}var _e=navigator.platform.toUpperCase().indexOf("MAC")>=0,we=_e?"Cmd":"Ctrl",ae=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ue=(qe={},Object(G.a)(qe,we+"-B","bold"),Object(G.a)(qe,we+"-I","italic"),qe),ce=(at={},Object(G.a)(at,Se,"\u6DFB\u52A0\u94FE\u63A5"),Object(G.a)(at,We,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(G.a)(at,Ie,"\u6DFB\u52A0\u6587\u4EF6"),Object(G.a)(at,Ve,"\u6DFB\u52A0\u8868\u683C"),at),me=be.a=function(xe){var Pe=xe.defaultValue,He=Pe===void 0?"":Pe,ze=xe.onChange,ht=xe.width,ot=ht===void 0?"100%":ht,yt=xe.height,dt=yt===void 0?400:yt,ft=xe.miniToolbar,Ot=ft===void 0?!1:ft,It=xe.isFocus,qt=It===void 0?!1:It,Zt=xe.watch,Dt=xe.insertTemp,Cr=xe.mode,Kr=Cr===void 0?"markdown":Cr,_t=xe.id,Lr=_t===void 0?"markdown-editor-id":_t,Et=xe.showResizeBar,wt=Et===void 0?!1:Et,Ut=xe.noStorage,tr=Ut===void 0?!1:Ut,dr=xe.showNullButton,Nt=dr===void 0?!1:dr,mt=xe.hidetoolBar,Br=mt===void 0?!1:mt,Vt=xe.fullScreen,Jt=Vt===void 0?!1:Vt,Rt=xe.onBlur,lr=xe.onCMBeforeChange,Ir=xe.onFullScreen,Xr=xe.className,Ze=Xr===void 0?"":Xr,Ct=xe.disablePaste,mn=Ct===void 0?!1:Ct,gn=xe.placeholder,vn=gn===void 0?"":gn,yn=xe.values,Y=yn===void 0?"":yn,x=Object(v.useState)(null),k=Object(K.a)(x,2),W=k[0],ee=k[1],V=Object(v.useState)(He),Ee=Object(K.a)(V,2),Ye=Ee[0],tt=Ee[1],gt=Object(v.useState)(Zt),Xe=Object(K.a)(gt,2),xt=Xe[0],jt=Xe[1],$t=Object(v.useState)(Jt),jr=Object(K.a)($t,2),Er=jr[0],xr=jr[1],Zr=Object(v.useState)(""),Dn=Object(K.a)(Zr,2),cr=Dn[0],zr=Dn[1],un=Object(v.useState)(0),hn=Object(K.a)(un,2),Hr=hn[0],kn=hn[1],bn=Object(v.useState)(dt),zn=Object(K.a)(bn,2),Vn=zn[0],Qr=zn[1],$r=Object(v.useState)(!1),_n=Object(K.a)($r,2),di=_n[0],En=_n[1],nr=Object(v.useRef)(Object(ve.a)()),Ht=Object(v.useRef)(!1),yr=Object(v.useRef)(),Mt=Object(v.useRef)(),ar=Object(v.useRef)(),Kt=Object(v.useRef)(),nn=Object(v.useRef)(),fr=function(){var vt=Object(U.a)(L.a.mark(function At(){var Tt,kt;return L.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Object(le.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:nr.current}});case 2:kt=Yt.sent,kt!=null&&(Tt=kt.attachments)!==null&&Tt!==void 0&&Tt.length&&(console.log("cm:",W,Mt),kt.attachments.map(function(Ft){Ft.content_type.indexOf("image")>-1?W.replaceSelection("![,](/api/attachments/".concat(Ft.id,"?type=").concat(Ft.content_type,")")):Ft.content_type.indexOf("video")>-1?W.replaceSelection('')):Ft.content_type.indexOf("pdf")>-1?W.replaceSelection('
      ').concat(Ft.name,"")):W.replaceSelection("[".concat(Ft.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Ft.id,"?type=").concat(Ft.content_type,")"))}));case 4:case"end":return Yt.stop()}},At)}));return function(){return vt.apply(this,arguments)}}();Object(v.useEffect)(function(){tt(Y),W==null||W.setValue(Y)},[Y]),Object(v.useEffect)(function(){Ir==null||Ir(Er)},[Er]),Object(v.useEffect)(function(){if(Mt.current){var vt=h.a.fromTextArea(Mt.current,{mode:Kr,lineNumbers:!Ot,lineWrapping:!0,value:He,autoCloseTags:!0,autoCloseBrackets:!0});qt&&vt.focus();function At(Tt,kt){if(mn){kt.preventDefault();return}var Bt=kt.clipboardData;if(Bt){var Yt=Bt.types.toString(),Ft=Bt.items;if(Yt==="Files"||Bt.types.indexOf("Files")>-1){if(kt.preventDefault(),Kr=="stex")return;try{var ur,Dr=Ft[1];((ur=Ft[0])===null||ur===void 0?void 0:ur.kind)==="file"&&(Dr=Ft[0]);var Pt=Dr.getAsFile(),dn=Pt.name.split(".").pop();re(Pt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Pt==null||((kr=Pt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Pt==null||((Tr=Pt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?vt.replaceSelection('')):(Pt==null||((Jr=Pt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?vt.replaceSelection('').concat(Pt.name,"")):ae.includes(dn)?vt.replaceSelection('').concat(Pt.name,"")):vt.replaceSelection("[".concat(Pt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})}catch(Wt){j.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",At),vt.on("dragleave",function(Tt,kt){ar.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(Tt,kt){ar.current.classList.add("mouse-hover-md")}),vt.on("drop",function(Tt,kt){ar.current.classList.add("mouse-hover-md");var Bt;if(Bt=kt.dataTransfer.files,Bt.length>0){kt.preventDefault(),kt.stopPropagation();for(var Yt=function(Dr){var Pt=Bt[Dr],dn=Pt.name.split(".").pop();re(Pt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Pt==null||((kr=Pt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Pt==null||((Tr=Pt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?vt.replaceSelection('')):(Pt==null||((Jr=Pt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?vt.replaceSelection('').concat(Pt.name,"")):ae.includes(dn)?vt.replaceSelection('').concat(Pt.name,"")):vt.replaceSelection("[".concat(Pt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})},Ft=0;Ft0||Ft.target.offsetWidth>0)&&(Ar(),W.setSize("100%","100%"),W.refresh())}}catch(ur){Bt.e(ur)}finally{Bt.f()}});return Tt.observe(Mt.current.parentElement),Tt}if(W){var At=vt();return function(){At.unobserve(Mt.current.parentElement)}}},[W,Ar]),Object(v.useEffect)(function(){if(W){for(var vt=[],At=function(){var Ft=kt[Tt];Bt=Object(K.a)(Ft,2);var ur=Bt[0],Dr=Bt[1],Pt=Object(G.a)({},ur,function(){Yn(Dr)});vt.push(Pt),W.addKeyMap(Pt)},Tt=0,kt=Object.entries(ue);Tt0){var vt=new Date().getTime(),At=window.sessionStorage.getItem(Lr);vt>=Hr+lt&&(!At||At!==Ye)&&(window.sessionStorage.setItem(Lr,Ye),En(!0))}},lt),Object(v.useEffect)(function(){jt(Zt)},[W,Zt]),Object(v.useEffect)(function(){W&&(qt&&W.focus())},[W,qt]),Object(v.useEffect)(function(){if(xt&&W){var vt=W.getScrollerElement();function At(Tt){var kt=Tt.target;if(nn.current){var Bt=kt.scrollTop/kt.scrollHeight;nn.current.scrollTop=nn.current.scrollHeight*Bt}}return vt.addEventListener("scroll",At),function(){vt.removeEventListener("scroll",At)}}},[W,xt]),Object(v.useEffect)(function(){if(W&&lr){function vt(At,Tt){lr(At,Tt)}return W.on("beforeChange",vt),function(){W.off("beforeChange",vt)}}},[W,lr]),Object(v.useEffect)(function(){if(W&&Rt){function vt(){Rt(W.getValue())}return W.on("blur",vt),function(){W.off("blur",vt)}}},[W,Rt]),Object(v.useEffect)(function(){if(W){function vt(At){var Tt=At.getValue();tt(Tt),kn(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ze&&ze(Tt)}return W.on("change",vt),function(){W.off("change",vt)}}},[W,ze]),Object(v.useEffect)(function(){W&&(He==null?(W.setValue(""),tt("")):He!==W.getValue()&&(W.setValue(He),tt(He),W.setCursor(W.lineCount(),0)))},[W,He]);var Yn=Object(v.useCallback)(function(vt){var At=W.getCursor(),Tt=W.getSelection(),kt=Tt.split(` +\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ae(xe){return/^\d+$/.test(xe)?"".concat(xe,"px"):xe}var _e=navigator.platform.toUpperCase().indexOf("MAC")>=0,we=_e?"Cmd":"Ctrl",ae=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ue=(qe={},Object(G.a)(qe,we+"-B","bold"),Object(G.a)(qe,we+"-I","italic"),qe),de=(at={},Object(G.a)(at,Se,"\u6DFB\u52A0\u94FE\u63A5"),Object(G.a)(at,We,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(G.a)(at,Ie,"\u6DFB\u52A0\u6587\u4EF6"),Object(G.a)(at,Ve,"\u6DFB\u52A0\u8868\u683C"),at),me=be.a=function(xe){var Pe=xe.defaultValue,He=Pe===void 0?"":Pe,ze=xe.onChange,ht=xe.width,ot=ht===void 0?"100%":ht,yt=xe.height,ct=yt===void 0?400:yt,ft=xe.miniToolbar,Ot=ft===void 0?!1:ft,It=xe.isFocus,qt=It===void 0?!1:It,Zt=xe.watch,Dt=xe.insertTemp,Cr=xe.mode,Kr=Cr===void 0?"markdown":Cr,_t=xe.id,Lr=_t===void 0?"markdown-editor-id":_t,Et=xe.showResizeBar,wt=Et===void 0?!1:Et,Ut=xe.noStorage,tr=Ut===void 0?!1:Ut,cr=xe.showNullButton,Nt=cr===void 0?!1:cr,mt=xe.hidetoolBar,Br=mt===void 0?!1:mt,Vt=xe.fullScreen,Jt=Vt===void 0?!1:Vt,Rt=xe.onBlur,lr=xe.onCMBeforeChange,Ir=xe.onFullScreen,Xr=xe.className,Ze=Xr===void 0?"":Xr,Ct=xe.disablePaste,mn=Ct===void 0?!1:Ct,gn=xe.placeholder,vn=gn===void 0?"":gn,yn=xe.values,Y=yn===void 0?"":yn,x=Object(v.useState)(null),k=Object(K.a)(x,2),W=k[0],ee=k[1],V=Object(v.useState)(He),Ee=Object(K.a)(V,2),Ye=Ee[0],tt=Ee[1],gt=Object(v.useState)(Zt),Xe=Object(K.a)(gt,2),xt=Xe[0],jt=Xe[1],$t=Object(v.useState)(Jt),jr=Object(K.a)($t,2),Er=jr[0],xr=jr[1],Zr=Object(v.useState)(""),Dn=Object(K.a)(Zr,2),dr=Dn[0],zr=Dn[1],un=Object(v.useState)(0),hn=Object(K.a)(un,2),Hr=hn[0],kn=hn[1],bn=Object(v.useState)(ct),zn=Object(K.a)(bn,2),Vn=zn[0],Qr=zn[1],$r=Object(v.useState)(!1),_n=Object(K.a)($r,2),ci=_n[0],En=_n[1],nr=Object(v.useRef)(Object(ve.a)()),Ht=Object(v.useRef)(!1),yr=Object(v.useRef)(),Mt=Object(v.useRef)(),ar=Object(v.useRef)(),Kt=Object(v.useRef)(),nn=Object(v.useRef)(),fr=function(){var vt=Object(U.a)(L.a.mark(function At(){var Tt,kt;return L.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Object(le.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:nr.current}});case 2:kt=Yt.sent,kt!=null&&(Tt=kt.attachments)!==null&&Tt!==void 0&&Tt.length&&(console.log("cm:",W,Mt),kt.attachments.map(function(Ft){Ft.content_type.indexOf("image")>-1?W.replaceSelection("![,](/api/attachments/".concat(Ft.id,"?type=").concat(Ft.content_type,")")):Ft.content_type.indexOf("video")>-1?W.replaceSelection('')):Ft.content_type.indexOf("pdf")>-1?W.replaceSelection('').concat(Ft.name,"")):W.replaceSelection("[".concat(Ft.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Ft.id,"?type=").concat(Ft.content_type,")"))}));case 4:case"end":return Yt.stop()}},At)}));return function(){return vt.apply(this,arguments)}}();Object(v.useEffect)(function(){tt(Y),W==null||W.setValue(Y)},[Y]),Object(v.useEffect)(function(){Ir==null||Ir(Er)},[Er]),Object(v.useEffect)(function(){if(Mt.current){var vt=h.a.fromTextArea(Mt.current,{mode:Kr,lineNumbers:!Ot,lineWrapping:!0,value:He,autoCloseTags:!0,autoCloseBrackets:!0});qt&&vt.focus();function At(Tt,kt){if(mn){kt.preventDefault();return}var Bt=kt.clipboardData;if(Bt){var Yt=Bt.types.toString(),Ft=Bt.items;if(Yt==="Files"||Bt.types.indexOf("Files")>-1){if(kt.preventDefault(),Kr=="stex")return;try{var ur,Dr=Ft[1];((ur=Ft[0])===null||ur===void 0?void 0:ur.kind)==="file"&&(Dr=Ft[0]);var Pt=Dr.getAsFile(),cn=Pt.name.split(".").pop();re(Pt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Pt==null||((kr=Pt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Pt==null||((Tr=Pt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?vt.replaceSelection('')):(Pt==null||((Jr=Pt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?vt.replaceSelection('').concat(Pt.name,"")):ae.includes(cn)?vt.replaceSelection('').concat(Pt.name,"")):vt.replaceSelection("[".concat(Pt.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})}catch(Wt){j.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",At),vt.on("dragleave",function(Tt,kt){ar.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(Tt,kt){ar.current.classList.add("mouse-hover-md")}),vt.on("drop",function(Tt,kt){ar.current.classList.add("mouse-hover-md");var Bt;if(Bt=kt.dataTransfer.files,Bt.length>0){kt.preventDefault(),kt.stopPropagation();for(var Yt=function(Dr){var Pt=Bt[Dr],cn=Pt.name.split(".").pop();re(Pt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Pt==null||((kr=Pt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Pt==null||((Tr=Pt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?vt.replaceSelection('')):(Pt==null||((Jr=Pt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?vt.replaceSelection('').concat(Pt.name,"")):ae.includes(cn)?vt.replaceSelection('').concat(Pt.name,"")):vt.replaceSelection("[".concat(Pt.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})},Ft=0;Ft0||Ft.target.offsetWidth>0)&&(Ar(),W.setSize("100%","100%"),W.refresh())}}catch(ur){Bt.e(ur)}finally{Bt.f()}});return Tt.observe(Mt.current.parentElement),Tt}if(W){var At=vt();return function(){At.unobserve(Mt.current.parentElement)}}},[W,Ar]),Object(v.useEffect)(function(){if(W){for(var vt=[],At=function(){var Ft=kt[Tt];Bt=Object(K.a)(Ft,2);var ur=Bt[0],Dr=Bt[1],Pt=Object(G.a)({},ur,function(){Yn(Dr)});vt.push(Pt),W.addKeyMap(Pt)},Tt=0,kt=Object.entries(ue);Tt0){var vt=new Date().getTime(),At=window.sessionStorage.getItem(Lr);vt>=Hr+lt&&(!At||At!==Ye)&&(window.sessionStorage.setItem(Lr,Ye),En(!0))}},lt),Object(v.useEffect)(function(){jt(Zt)},[W,Zt]),Object(v.useEffect)(function(){W&&(qt&&W.focus())},[W,qt]),Object(v.useEffect)(function(){if(xt&&W){var vt=W.getScrollerElement();function At(Tt){var kt=Tt.target;if(nn.current){var Bt=kt.scrollTop/kt.scrollHeight;nn.current.scrollTop=nn.current.scrollHeight*Bt}}return vt.addEventListener("scroll",At),function(){vt.removeEventListener("scroll",At)}}},[W,xt]),Object(v.useEffect)(function(){if(W&&lr){function vt(At,Tt){lr(At,Tt)}return W.on("beforeChange",vt),function(){W.off("beforeChange",vt)}}},[W,lr]),Object(v.useEffect)(function(){if(W&&Rt){function vt(){Rt(W.getValue())}return W.on("blur",vt),function(){W.off("blur",vt)}}},[W,Rt]),Object(v.useEffect)(function(){if(W){function vt(At){var Tt=At.getValue();tt(Tt),kn(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ze&&ze(Tt)}return W.on("change",vt),function(){W.off("change",vt)}}},[W,ze]),Object(v.useEffect)(function(){W&&(He==null?(W.setValue(""),tt("")):He!==W.getValue()&&(W.setValue(He),tt(He),W.setCursor(W.lineCount(),0)))},[W,He]);var Yn=Object(v.useCallback)(function(vt){var At=W.getCursor(),Tt=W.getSelection(),kt=Tt.split(` `);switch(vt){case"bold":return W.replaceSelection("**"+Tt+"**"),Tt===""&&W.setCursor(At.line,At.ch+2),W.focus();case"italic":return W.replaceSelection("*"+Tt+"*"),Tt===""&&W.setCursor(At.line,At.ch+1),W.focus();case"code":return W.replaceSelection("`"+Tt+"`"),Tt===""&&W.setCursor(At.line,At.ch+1),W.focus();case"inline-latex":return W.replaceSelection("`$$"+Tt+"$$`"),Tt===""&&W.setCursor(At.line,At.ch+3),W.focus();case"latex":return W.replaceSelection("```latex\n"+Tt+"\n```"),W.setCursor(At.line+1,Tt.length+1),W.focus();case"line-break":return W.replaceSelection(`
      `),W.focus();case"list-ul":return Tt===""?W.replaceSelection("- "+Tt):W.replaceSelection(kt.map(function(Bt){return Bt===""?"":"- ".concat(Bt)}).join(` `)),W.focus();case"list-ol":return Tt===""?W.replaceSelection("1. "+Tt):W.replaceSelection(kt.map(function(Bt,Yt){return Bt===""?"":"".concat(Yt+1,". ").concat(Bt)}).join(` -`)),W.focus();case"add-null-ch":return Tt===""&&W.setCursor(At.line,At.ch+1),W.replaceSelection(je),W.focus();case"inster-template-1":return Tt===""&&W.setCursor(At.line,At.ch),W.replaceSelection(Ge),W.focus();case"eraser":return W.setValue(""),W.focus();case"trigger-watch":return jt(!xt),W.focus();case"trigger-full-screen":return xr(!Er),W.focus();case Se:zr(Se);return;case We:zr(We);return;case Ie:zr(Ie);return;case Ve:zr(Ve);return;default:throw new Error}},[W,xt,Er]),xn=Object(v.useCallback)(function(vt){zr("");switch(cr){case Se:var At=vt.title,Tt=vt.link;return W.replaceSelection("[".concat(At,"](").concat(Tt,")")),W.focus();case We:var kt=vt.language,Bt=vt.content;return W.replaceSelection(["```"+kt,Bt,"```"].join(` -`)),W.focus();case Ie:var Yt=vt.src,Ft=vt.alt;return Ft?W.replaceSelection("![ ".concat(Ft," ]( ").concat(Yt,' "').concat(Ft,'" )')):W.replaceSelection("![,](".concat(Yt,")")),W.focus();case Ve:for(var ur=vt.row,Dr=vt.col,Pt=vt.align,dn=` -`,Wt=0;Wt300&&(ur=300);var Dr=dt+ur+"px";Qr(Dr)}}return vt.addEventListener("mousedown",kt),document.addEventListener("mousemove",Yt),document.addEventListener("mouseup",Bt),function(){vt.removeEventListener("mousedown",kt),document.removeEventListener("mousemove",Yt),document.removeEventListener("mouseup",Bt)}}},[W,Kt]),Object(v.useEffect)(function(){Qr(dt)},[dt]);var an=Ae(ot),fi=Ae(Vn),qr={width:an,height:fi},pi=Object(v.useMemo)(function(){if(Hr){var vt=new Date(Hr),At=vt.getHours(),Tt=vt.getMinutes(),kt=vt.getSeconds();return At=At<10?"0"+At:At,Tt=Tt<10?"0"+Tt:Tt,kt=kt<10?"0"+kt:kt,"".concat(At,":").concat(Tt,":").concat(kt)}return 0},[Hr]);function ji(){window.sessionStorage.removeItem(Lr),En(!1),kn(0)}function Mn(){En(!1),kn(0),W.setValue(window.sessionStorage.getItem(Lr))}function ua(vt,At){var Tt=W.getValue();Tt=Tt.replace(vt,At),tt(Tt),W==null||W.setValue(Tt)}return m.a.createElement(v.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:ar},m.a.createElement("div",{className:"markdown-editor-container ".concat(Ze," ").concat(xt?"on-preview":""," ").concat(Ot?"mini":""," ").concat(Er?"full-screen":""),style:qr},m.a.createElement(b,{insertTemp:Dt,watch:xt,fullScreen:Er,showNullButton:Nt,onActionCallback:Yn,hidetoolBar:Br,uuid:nr.current,setOpenPhones:function(){Ht.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Mt,placeholder:vn})),xt?m.a.createElement("div",{ref:nn,className:"preview-container"},Kr==="stex"&&m.a.createElement(D,{value:Ye}),Kr!=="stex"&&m.a.createElement(w.a,{edit:!0,value:Ye,replaces:ua})):null))),wt?m.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,m.a.createElement(B.a,null,ce[cr]?m.a.createElement(J.a,{centered:!0,title:ce[cr],visible:!0,onCancel:Tn,footer:null,className:"markdown-popup-form"},ci):null))}},SJMd:function(rt,be){/** +`)),W.focus();case"add-null-ch":return Tt===""&&W.setCursor(At.line,At.ch+1),W.replaceSelection(je),W.focus();case"inster-template-1":return Tt===""&&W.setCursor(At.line,At.ch),W.replaceSelection(Ge),W.focus();case"eraser":return W.setValue(""),W.focus();case"trigger-watch":return jt(!xt),W.focus();case"trigger-full-screen":return xr(!Er),W.focus();case Se:zr(Se);return;case We:zr(We);return;case Ie:zr(Ie);return;case Ve:zr(Ve);return;default:throw new Error}},[W,xt,Er]),xn=Object(v.useCallback)(function(vt){zr("");switch(dr){case Se:var At=vt.title,Tt=vt.link;return W.replaceSelection("[".concat(At,"](").concat(Tt,")")),W.focus();case We:var kt=vt.language,Bt=vt.content;return W.replaceSelection(["```"+kt,Bt,"```"].join(` +`)),W.focus();case Ie:var Yt=vt.src,Ft=vt.alt;return Ft?W.replaceSelection("![ ".concat(Ft," ]( ").concat(Yt,' "').concat(Ft,'" )')):W.replaceSelection("![,](".concat(Yt,")")),W.focus();case Ve:for(var ur=vt.row,Dr=vt.col,Pt=vt.align,cn=` +`,Wt=0;Wt300&&(ur=300);var Dr=ct+ur+"px";Qr(Dr)}}return vt.addEventListener("mousedown",kt),document.addEventListener("mousemove",Yt),document.addEventListener("mouseup",Bt),function(){vt.removeEventListener("mousedown",kt),document.removeEventListener("mousemove",Yt),document.removeEventListener("mouseup",Bt)}}},[W,Kt]),Object(v.useEffect)(function(){Qr(ct)},[ct]);var an=Ae(ot),fi=Ae(Vn),qr={width:an,height:fi},pi=Object(v.useMemo)(function(){if(Hr){var vt=new Date(Hr),At=vt.getHours(),Tt=vt.getMinutes(),kt=vt.getSeconds();return At=At<10?"0"+At:At,Tt=Tt<10?"0"+Tt:Tt,kt=kt<10?"0"+kt:kt,"".concat(At,":").concat(Tt,":").concat(kt)}return 0},[Hr]);function ji(){window.sessionStorage.removeItem(Lr),En(!1),kn(0)}function Mn(){En(!1),kn(0),W.setValue(window.sessionStorage.getItem(Lr))}function ua(vt,At){var Tt=W.getValue();Tt=Tt.replace(vt,At),tt(Tt),W==null||W.setValue(Tt)}return m.a.createElement(v.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:ar},m.a.createElement("div",{className:"markdown-editor-container ".concat(Ze," ").concat(xt?"on-preview":""," ").concat(Ot?"mini":""," ").concat(Er?"full-screen":""),style:qr},m.a.createElement(b,{insertTemp:Dt,watch:xt,fullScreen:Er,showNullButton:Nt,onActionCallback:Yn,hidetoolBar:Br,uuid:nr.current,setOpenPhones:function(){Ht.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Mt,placeholder:vn})),xt?m.a.createElement("div",{ref:nn,className:"preview-container"},Kr==="stex"&&m.a.createElement(D,{value:Ye}),Kr!=="stex"&&m.a.createElement(w.a,{edit:!0,value:Ye,replaces:ua})):null))),wt?m.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,m.a.createElement(B.a,null,de[dr]?m.a.createElement(J.a,{centered:!0,title:de[dr],visible:!0,onCancel:Tn,footer:null,className:"markdown-popup-form"},di):null))}},SJMd:function(rt,be){/** * @license * Copyright (C) 2006 Google Inc. * @@ -323,12 +323,12 @@ Please report this to https://github.com/markedjs/marked.`,_e.silent)return"

      A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Z,ie,J,P=!1,X,j;window.PR_SHOULD_USE_CONTINUATION=!0;var U,K;(function(){var G=window,r=["break,continue,do,else,for,if,return,while"],L=[r,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],v=[L,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[v,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[v,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],u="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[r,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],s=[r,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],a=[r,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[m,h,p,f,l,o,s,a],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,w="str",D="kwd",R="com",A="typ",C="lit",T="pun",c="pln",S="tag",y="dec",b="src",B="atn",F="atv",_="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function I(Ce){for(var Ne=0,Be=!1,le=!1,ve=0,Se=Ce.length;ve122||(ae<65||we>90||ct.push([Math.max(65,we)|32,Math.min(ae,90)|32]),ae<97||we>122||ct.push([Math.max(97,we)&~32,Math.min(ae,122)&~32]))}}ct.sort(function(xe,Pe){return xe[0]-Pe[0]||Pe[1]-xe[1]});for(var ue=[],ce=[],Ge=0;Geme[0]&&(me[1]+1>me[0]&&je.push("-"),je.push(Qe(me[1])))}return je.push("]"),je.join("")}function st(at){for(var Ue=at.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),ct=Ue.length,lt=[],je=0,Ge=0;je=2&&we==="["?Ue[je]=Je(Ae):we!=="\\"&&(Ue[je]=Ae.replace(/[a-zA-Z]/g,function(ce){var me=ce.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return Ue.join("")}for(var qe=[],ve=0,Se=Ce.length;ve|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function I(Ce){for(var Ne=0,Be=!1,le=!1,ve=0,Se=Ce.length;ve122||(ae<65||we>90||dt.push([Math.max(65,we)|32,Math.min(ae,90)|32]),ae<97||we>122||dt.push([Math.max(97,we)&~32,Math.min(ae,122)&~32]))}}dt.sort(function(xe,Pe){return xe[0]-Pe[0]||Pe[1]-xe[1]});for(var ue=[],de=[],Ge=0;Geme[0]&&(me[1]+1>me[0]&&je.push("-"),je.push(Qe(me[1])))}return je.push("]"),je.join("")}function st(at){for(var Ue=at.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),dt=Ue.length,lt=[],je=0,Ge=0;je=2&&we==="["?Ue[je]=Je(Ae):we!=="\\"&&(Ue[je]=Ae.replace(/[a-zA-Z]/g,function(de){var me=de.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return Ue.join("")}for(var qe=[],ve=0,Se=Ce.length;ve=0;)Be[qe.charAt(at)]=st;var Ue=st[1],ct=""+Ue;Ve.hasOwnProperty(ct)||(We.push(Ue),Ve[ct]=null)}We.push(/[\0-\uffff]/),le=I(We)})();var ve=Ne.length,Se=function(Ie){for(var We=Ie.sourceCode,Ve=Ie.basePos,Qe=Ie.sourceNode,Je=[Ve,c],st=0,qe=We.match(le)||[],at={},Ue=0,ct=qe.length;Ue=5&&je.substring(0,5)==="lang-",Ae&&!(Ge&&typeof Ge[1]=="string")&&(Ae=!1,je=b),Ae||(at[lt]=je)}var ae=st;if(st+=lt.length,!Ae)Je.push(Ve+ae,je);else{var ue=Ge[1],ce=lt.indexOf(ue),me=ce+ue.length;Ge[2]&&(me=lt.length-Ge[2].length,ce=me-ue.length);var xe=je.substring(5);H(Qe,Ve+ae,lt.substring(0,ce),Se,Je),H(Qe,Ve+ae+ce,ue,he(xe,ue),Je),H(Qe,Ve+ae+me,lt.substring(me),Se,Je)}}Ie.decorations=Je};return Se}function Oe(Ce){var Ne=[],Be=[];Ce.tripleQuotedStrings?Ne.push([w,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?Ne.push([w,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ne.push([w,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Be.push([w,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var le=Ce.hashComments;le&&(Ce.cStyleComments?(le>1?Ne.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ne.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Be.push([w,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ne.push([R,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Be.push([R,/^\/\/[^\r\n]*/,null]),Be.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=Ce.regexLiterals;if(ve){var Se=ve>1?"":` -\r`,Ie=Se?".":"[\\S\\s]",We="/(?=[^/*"+Se+"])(?:[^/\\x5B\\x5C"+Se+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Se+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";Be.push(["lang-regex",RegExp("^"+M+"("+We+")")])}var Ve=Ce.types;Ve&&Be.push([A,Ve]);var Qe=(""+Ce.keywords).replace(/^ | $/g,"");Qe.length&&Be.push([D,new RegExp("^(?:"+Qe.replace(/[\s,]+/g,"|")+")\\b"),null]),Ne.push([c,/^\s+/,null,` \r - \xA0`]);var Je="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(Je+="(?!s*/)"),Be.push([C,/^@[a-z_$][a-z_$@0-9]*/i,null],[A,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[C,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[T,new RegExp(Je),null]),se(Ne,Be)}var ge=Oe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Te(Ce,Ne,Be){for(var le=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,Se=Ce.ownerDocument,Ie=Se.createElement("li");Ce.firstChild;)Ie.appendChild(Ce.firstChild);var We=[Ie];function Ve(Ue){var ct=Ue.nodeType;if(ct==1&&!le.test(Ue.className))if(Ue.nodeName==="br")Qe(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var lt=Ue.firstChild;lt;lt=lt.nextSibling)Ve(lt);else if((ct==3||ct==4)&&Be){var je=Ue.nodeValue,Ge=je.match(ve);if(Ge){var Ae=je.substring(0,Ge.index);Ue.nodeValue=Ae;var _e=je.substring(Ge.index+Ge[0].length);if(_e){var we=Ue.parentNode;we.insertBefore(Se.createTextNode(_e),Ue.nextSibling)}Qe(Ue),Ae||Ue.parentNode.removeChild(Ue)}}}function Qe(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function ct(Ge,Ae){var _e=Ae?Ge.cloneNode(!1):Ge,we=Ge.parentNode;if(we){var ae=ct(we,1),ue=Ge.nextSibling;ae.appendChild(_e);for(var ce=ue;ce;ce=ue)ue=ce.nextSibling,ae.appendChild(ce)}return _e}for(var lt=ct(Ue.nextSibling,0),je;(je=lt.parentNode)&&je.nodeType===1;)lt=je;We.push(lt)}for(var Je=0;Je=we&&(Ve+=2),Se>=ae&&(st+=2)}}finally{je&&(je.style.display=Ge)}}var Le={};function de(Ce,Ne){for(var Be=Ne.length;--Be>=0;){var le=Ne[Be];Le.hasOwnProperty(le)?G.console&&console.warn("cannot override language handler %s",le):Le[le]=Ce}}function he(Ce,Ne){return Ce&&Le.hasOwnProperty(Ce)||(Ce=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[T,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),de(se([[c,/^[\s]+/,null,` \r -`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[S,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[T,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),de(se([],[[F,/^[\s\S]+/]]),["uq.val"]),de(Oe({keywords:m,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),de(Oe({keywords:"null,true,false"}),["json"]),de(Oe({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),de(Oe({keywords:p,cStyleComments:!0}),["java"]),de(Oe({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(Oe({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(Oe({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(Oe({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(Oe({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(Oe({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(se([],[[w,/^[\s\S]+/]]),["regex"]);function re(Ce){var Ne=Ce.langExtension;try{var Be=g(Ce.sourceNode,Ce.pre),le=Be.sourceCode;Ce.sourceCode=le,Ce.spans=Be.spans,Ce.basePos=0,he(Ne,le)(Ce),Re(Ce)}catch(ve){G.console&&console.log(ve&&ve.stack||ve)}}function fe(Ce,Ne,Be){var le=Be||!1,ve=Ne||null,Se=document.createElement("div");Se.innerHTML="

      "+Ce+"
      ",Se=Se.firstChild,le&&Te(Se,le,!0);var Ie={langExtension:ve,numberLines:le,sourceNode:Se,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Ie),Se.innerHTML}function oe(Ce,Ne){var Be=Ne||document.body,le=Be.ownerDocument||document;function ve(_e){return Be.getElementsByTagName(_e)}for(var Se=[ve("pre"),ve("code"),ve("xmp")],Ie=[],We=0;We=0),j.set("isFirefox",X.indexOf("Firefox")>=0),j.set("isChrome",X.indexOf("Chrome")>=0),j.set("isSafari",X.indexOf("Safari")>=0);const U=Object.prototype.hasOwnProperty;class K{static has(_){return m.create(_)}static equals(_,M){return p.create(_,M)}static regex(_,M){return w.create(_,M)}static not(_){return l.create(_)}static and(..._){return A.create(_,null)}static or(..._){return C.create(_,null,!0)}static deserialize(_,M=!1){return _?this._deserializeOrExpression(_,M):void 0}static _deserializeOrExpression(_,M){let I=_.split("||");return C.create(I.map(g=>this._deserializeAndExpression(g,M)),null,!0)}static _deserializeAndExpression(_,M){let I=_.split("&&");return A.create(I.map(g=>this._deserializeOne(g,M)),null)}static _deserializeOne(_,M){if(_=_.trim(),_.indexOf("!=")>=0){let I=_.split("!=");return f.create(I[0].trim(),this._deserializeValue(I[1],M))}if(_.indexOf("==")>=0){let I=_.split("==");return p.create(I[0].trim(),this._deserializeValue(I[1],M))}if(_.indexOf("=~")>=0){let I=_.split("=~");return w.create(I[0].trim(),this._deserializeRegexValue(I[1],M))}if(_.indexOf(" in ")>=0){let I=_.split(" in ");return h.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(_)){const I=_.split(">=");return a.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(_)){const I=_.split(">");return s.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(_)){const I=_.split("<=");return E.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(_)){const I=_.split("<");return O.create(I[0].trim(),I[1].trim())}return/^\!\s*/.test(_)?l.create(_.substr(1).trim()):m.create(_)}static _deserializeValue(_,M){if(_=_.trim(),_==="true")return!0;if(_==="false")return!1;let I=/^'([^']*)'$/.exec(_);return I?I[1].trim():_}static _deserializeRegexValue(_,M){if(Object(J.C)(_)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let I=_.indexOf("/"),g=_.lastIndexOf("/");if(I===g||I<0){if(M)throw new Error(`bad regexp-value '${_}', missing /-enclosure`);return console.warn(`bad regexp-value '${_}', missing /-enclosure`),null}let H=_.slice(I+1,g),$=_[g+1]==="i"?"i":"";try{return new RegExp(H,$)}catch(ne){if(M)throw new Error(`bad regexp-value '${_}', parse error: ${ne}`);return console.warn(`bad regexp-value '${_}', parse error: ${ne}`),null}}}function G(_,M){const I=_?_.substituteConstants():void 0,g=M?M.substituteConstants():void 0;return!I&&!g?!0:!I||!g?!1:I.equals(g)}function r(_,M){return _.cmp(M)}class L{constructor(){this.type=0}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!1}serialize(){return"false"}keys(){return[]}negate(){return v.INSTANCE}}L.INSTANCE=new L;class v{constructor(){this.type=1}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!0}serialize(){return"true"}keys(){return[]}negate(){return L.INSTANCE}}v.INSTANCE=new v;class m{constructor(_,M){this.key=_,this.negated=M,this.type=2}static create(_,M=null){const I=j.get(_);return typeof I=="boolean"?I?v.INSTANCE:L.INSTANCE:new m(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:y(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=j.get(this.key);return typeof _=="boolean"?_?v.INSTANCE:L.INSTANCE:this}evaluate(_){return!!_.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class p{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=4}static create(_,M,I=null){if(typeof M=="boolean")return M?m.create(_,I):l.create(_,I);const g=j.get(_);if(typeof g=="boolean"){const H=g?"true":"false";return M===H?v.INSTANCE:L.INSTANCE}return new p(_,M,I)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=j.get(this.key);if(typeof _=="boolean"){const M=_?"true":"false";return this.value===M?v.INSTANCE:L.INSTANCE}return this}evaluate(_){return _.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class h{constructor(_,M){this.key=_,this.valueKey=M,this.type=10,this.negated=null}static create(_,M){return new h(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.valueKey,_.key,_.valueKey)}equals(_){return _.type===this.type?this.key===_.key&&this.valueKey===_.valueKey:!1}substituteConstants(){return this}evaluate(_){const M=_.getValue(this.valueKey),I=_.getValue(this.key);return Array.isArray(M)?M.indexOf(I)>=0:typeof I=="string"&&typeof M=="object"&&M!==null?U.call(M,I):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(_){this._actual=_,this.type=11}static create(_){return new u(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=5}static create(_,M,I=null){if(typeof M=="boolean")return M?l.create(_,I):m.create(_,I);const g=j.get(_);if(typeof g=="boolean"){const H=g?"true":"false";return M===H?L.INSTANCE:v.INSTANCE}return new f(_,M,I)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=j.get(this.key);if(typeof _=="boolean"){const M=_?"true":"false";return this.value===M?L.INSTANCE:v.INSTANCE}return this}evaluate(_){return _.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class l{constructor(_,M){this.key=_,this.negated=M,this.type=3}static create(_,M=null){const I=j.get(_);return typeof I=="boolean"?I?L.INSTANCE:v.INSTANCE:new l(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:y(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=j.get(this.key);return typeof _=="boolean"?_?L.INSTANCE:v.INSTANCE:this}evaluate(_){return!_.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function o(_,M){if(typeof _=="string"){const I=parseFloat(_);isNaN(I)||(_=I)}return typeof _=="string"||typeof _=="number"?M(_):L.INSTANCE}class s{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=12}static create(_,M,I=null){return o(M,g=>new s(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class a{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=13}static create(_,M,I=null){return o(M,g=>new a(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class O{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=14}static create(_,M,I=null){return o(M,g=>new O(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))new E(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class w{constructor(_,M){this.key=_,this.regexp=M,this.type=7,this.negated=null}static create(_,M){return new w(_,M)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.key<_.key)return-1;if(this.key>_.key)return 1;const M=this.regexp?this.regexp.source:"",I=_.regexp?_.regexp.source:"";return MI?1:0}equals(_){if(_.type===this.type){const M=this.regexp?this.regexp.source:"",I=_.regexp?_.regexp.source:"";return this.key===_.key&&M===I}return!1}substituteConstants(){return this}evaluate(_){let M=_.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const _=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${_}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(_){this._actual=_,this.type=8}static create(_){return new D(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(_){let M=null;for(let I=0,g=_.length;I_.expr.length)return 1;for(let M=0,I=this.expr.length;M1;){const H=I[I.length-1];if(H.type!==9)break;I.pop();const $=I.pop(),ne=I.length===0,se=C.create(H.expr.map(Oe=>A.create([Oe,$],null)),null,ne);se&&(I.push(se),I.sort(r))}return I.length===1?I[0]:new A(I,M)}serialize(){return this.expr.map(_=>_.serialize()).join(" && ")}keys(){const _=[];for(let M of this.expr)_.push(...M.keys());return _}negate(){if(!this.negated){const _=[];for(let M of this.expr)_.push(M.negate());this.negated=C.create(_,this,!0)}return this.negated}}class C{constructor(_,M){this.expr=_,this.negated=M,this.type=9}static create(_,M,I){return C._normalizeArr(_,M,I)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.expr.length<_.expr.length)return-1;if(this.expr.length>_.expr.length)return 1;for(let M=0,I=this.expr.length;M_.serialize()).join(" || ")}keys(){const _=[];for(let M of this.expr)_.push(...M.keys());return _}negate(){if(!this.negated){let _=[];for(let M of this.expr)_.push(M.negate());for(;_.length>1;){const M=_.shift(),I=_.shift(),g=[];for(const $ of F(M))for(const ne of F(I))g.push(A.create([$,ne],null));const H=_.length===0;_.unshift(C.create(g,null,H))}this.negated=_[0]}return this.negated}}class T extends m{constructor(_,M,I){super(_,null);this._defaultValue=M,typeof I=="object"?T._info.push(Object.assign(Object.assign({},I),{key:_})):I!==!0&&T._info.push({key:_,description:I,type:M!=null?typeof M:void 0})}static all(){return T._info.values()}bindTo(_){return _.createKey(this.key,this._defaultValue)}getValue(_){return _.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(_){return p.create(this.key,_)}}T._info=[];const c=Object(P.c)("contextKeyService"),S="setContext";function y(_,M){return _M?1:0}function b(_,M,I,g){return _I?1:Mg?1:0}function B(_,M){if(M.type===6&&_.type!==9&&_.type!==6){for(const H of M.expr)if(_.equals(H))return!0}const I=_.negate(),g=F(I).concat(F(M));g.sort(r);for(let H=0;H=0;h--)if(this.__items[h].match(p))return!0;return!1},L.prototype.set_indent=function(p,h){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},L.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},L.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},L.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},L.prototype.is_empty=function(){return this.__items.length===0},L.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},L.prototype.push=function(p){this.__items.push(p);var h=p.lastIndexOf(` +`):qe=qe.replace(/[ \t\r\n]+/g," "),le[Ie]=qe,Se[Ie<<1]=ve,ve+=qe.length,Se[Ie++<<1|1]=Ve)}}return We(Ce),{sourceCode:le.join("").replace(/\n$/,""),spans:Se}}function H(Ce,Ne,Be,le,ve){if(!Be)return;var Se={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:Be,spans:null,basePos:Ne,decorations:null};le(Se),ve.push.apply(ve,Se.decorations)}var $=/\S/;function ne(Ce){for(var Ne=void 0,Be=Ce.firstChild;Be;Be=Be.nextSibling){var le=Be.nodeType;Ne=le===1?Ne?Ce:Be:le===3&&$.test(Be.nodeValue)?Ce:Ne}return Ne===Ce?void 0:Ne}function se(Ce,Ne){var Be={},le;(function(){for(var Ie=Ce.concat(Ne),We=[],Ve={},Qe=0,Je=Ie.length;Qe=0;)Be[qe.charAt(at)]=st;var Ue=st[1],dt=""+Ue;Ve.hasOwnProperty(dt)||(We.push(Ue),Ve[dt]=null)}We.push(/[\0-\uffff]/),le=I(We)})();var ve=Ne.length,Se=function(Ie){for(var We=Ie.sourceCode,Ve=Ie.basePos,Qe=Ie.sourceNode,Je=[Ve,d],st=0,qe=We.match(le)||[],at={},Ue=0,dt=qe.length;Ue=5&&je.substring(0,5)==="lang-",Ae&&!(Ge&&typeof Ge[1]=="string")&&(Ae=!1,je=b),Ae||(at[lt]=je)}var ae=st;if(st+=lt.length,!Ae)Je.push(Ve+ae,je);else{var ue=Ge[1],de=lt.indexOf(ue),me=de+ue.length;Ge[2]&&(me=lt.length-Ge[2].length,de=me-ue.length);var xe=je.substring(5);H(Qe,Ve+ae,lt.substring(0,de),Se,Je),H(Qe,Ve+ae+de,ue,he(xe,ue),Je),H(Qe,Ve+ae+me,lt.substring(me),Se,Je)}}Ie.decorations=Je};return Se}function Oe(Ce){var Ne=[],Be=[];Ce.tripleQuotedStrings?Ne.push([w,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?Ne.push([w,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ne.push([w,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Be.push([w,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var le=Ce.hashComments;le&&(Ce.cStyleComments?(le>1?Ne.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ne.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Be.push([w,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ne.push([R,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Be.push([R,/^\/\/[^\r\n]*/,null]),Be.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=Ce.regexLiterals;if(ve){var Se=ve>1?"":` +\r`,Ie=Se?".":"[\\S\\s]",We="/(?=[^/*"+Se+"])(?:[^/\\x5B\\x5C"+Se+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Se+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";Be.push(["lang-regex",RegExp("^"+M+"("+We+")")])}var Ve=Ce.types;Ve&&Be.push([A,Ve]);var Qe=(""+Ce.keywords).replace(/^ | $/g,"");Qe.length&&Be.push([D,new RegExp("^(?:"+Qe.replace(/[\s,]+/g,"|")+")\\b"),null]),Ne.push([d,/^\s+/,null,` \r + \xA0`]);var Je="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(Je+="(?!s*/)"),Be.push([C,/^@[a-z_$][a-z_$@0-9]*/i,null],[A,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[C,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[T,new RegExp(Je),null]),se(Ne,Be)}var ge=Oe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Te(Ce,Ne,Be){for(var le=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,Se=Ce.ownerDocument,Ie=Se.createElement("li");Ce.firstChild;)Ie.appendChild(Ce.firstChild);var We=[Ie];function Ve(Ue){var dt=Ue.nodeType;if(dt==1&&!le.test(Ue.className))if(Ue.nodeName==="br")Qe(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var lt=Ue.firstChild;lt;lt=lt.nextSibling)Ve(lt);else if((dt==3||dt==4)&&Be){var je=Ue.nodeValue,Ge=je.match(ve);if(Ge){var Ae=je.substring(0,Ge.index);Ue.nodeValue=Ae;var _e=je.substring(Ge.index+Ge[0].length);if(_e){var we=Ue.parentNode;we.insertBefore(Se.createTextNode(_e),Ue.nextSibling)}Qe(Ue),Ae||Ue.parentNode.removeChild(Ue)}}}function Qe(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function dt(Ge,Ae){var _e=Ae?Ge.cloneNode(!1):Ge,we=Ge.parentNode;if(we){var ae=dt(we,1),ue=Ge.nextSibling;ae.appendChild(_e);for(var de=ue;de;de=ue)ue=de.nextSibling,ae.appendChild(de)}return _e}for(var lt=dt(Ue.nextSibling,0),je;(je=lt.parentNode)&&je.nodeType===1;)lt=je;We.push(lt)}for(var Je=0;Je=we&&(Ve+=2),Se>=ae&&(st+=2)}}finally{je&&(je.style.display=Ge)}}var Le={};function ce(Ce,Ne){for(var Be=Ne.length;--Be>=0;){var le=Ne[Be];Le.hasOwnProperty(le)?G.console&&console.warn("cannot override language handler %s",le):Le[le]=Ce}}function he(Ce,Ne){return Ce&&Le.hasOwnProperty(Ce)||(Ce=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[T,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ce(se([[d,/^[\s]+/,null,` \r +`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[S,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[T,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ce(se([],[[F,/^[\s\S]+/]]),["uq.val"]),ce(Oe({keywords:m,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),ce(Oe({keywords:"null,true,false"}),["json"]),ce(Oe({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),ce(Oe({keywords:p,cStyleComments:!0}),["java"]),ce(Oe({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(Oe({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(Oe({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(Oe({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(Oe({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(Oe({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(se([],[[w,/^[\s\S]+/]]),["regex"]);function re(Ce){var Ne=Ce.langExtension;try{var Be=g(Ce.sourceNode,Ce.pre),le=Be.sourceCode;Ce.sourceCode=le,Ce.spans=Be.spans,Ce.basePos=0,he(Ne,le)(Ce),Re(Ce)}catch(ve){G.console&&console.log(ve&&ve.stack||ve)}}function fe(Ce,Ne,Be){var le=Be||!1,ve=Ne||null,Se=document.createElement("div");Se.innerHTML="
      "+Ce+"
      ",Se=Se.firstChild,le&&Te(Se,le,!0);var Ie={langExtension:ve,numberLines:le,sourceNode:Se,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Ie),Se.innerHTML}function oe(Ce,Ne){var Be=Ne||document.body,le=Be.ownerDocument||document;function ve(_e){return Be.getElementsByTagName(_e)}for(var Se=[ve("pre"),ve("code"),ve("xmp")],Ie=[],We=0;We=0),j.set("isFirefox",X.indexOf("Firefox")>=0),j.set("isChrome",X.indexOf("Chrome")>=0),j.set("isSafari",X.indexOf("Safari")>=0);const U=Object.prototype.hasOwnProperty;class K{static has(_){return m.create(_)}static equals(_,M){return p.create(_,M)}static regex(_,M){return w.create(_,M)}static not(_){return l.create(_)}static and(..._){return A.create(_,null)}static or(..._){return C.create(_,null,!0)}static deserialize(_,M=!1){return _?this._deserializeOrExpression(_,M):void 0}static _deserializeOrExpression(_,M){let I=_.split("||");return C.create(I.map(g=>this._deserializeAndExpression(g,M)),null,!0)}static _deserializeAndExpression(_,M){let I=_.split("&&");return A.create(I.map(g=>this._deserializeOne(g,M)),null)}static _deserializeOne(_,M){if(_=_.trim(),_.indexOf("!=")>=0){let I=_.split("!=");return f.create(I[0].trim(),this._deserializeValue(I[1],M))}if(_.indexOf("==")>=0){let I=_.split("==");return p.create(I[0].trim(),this._deserializeValue(I[1],M))}if(_.indexOf("=~")>=0){let I=_.split("=~");return w.create(I[0].trim(),this._deserializeRegexValue(I[1],M))}if(_.indexOf(" in ")>=0){let I=_.split(" in ");return h.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(_)){const I=_.split(">=");return a.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(_)){const I=_.split(">");return s.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(_)){const I=_.split("<=");return E.create(I[0].trim(),I[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(_)){const I=_.split("<");return O.create(I[0].trim(),I[1].trim())}return/^\!\s*/.test(_)?l.create(_.substr(1).trim()):m.create(_)}static _deserializeValue(_,M){if(_=_.trim(),_==="true")return!0;if(_==="false")return!1;let I=/^'([^']*)'$/.exec(_);return I?I[1].trim():_}static _deserializeRegexValue(_,M){if(Object(J.C)(_)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let I=_.indexOf("/"),g=_.lastIndexOf("/");if(I===g||I<0){if(M)throw new Error(`bad regexp-value '${_}', missing /-enclosure`);return console.warn(`bad regexp-value '${_}', missing /-enclosure`),null}let H=_.slice(I+1,g),$=_[g+1]==="i"?"i":"";try{return new RegExp(H,$)}catch(ne){if(M)throw new Error(`bad regexp-value '${_}', parse error: ${ne}`);return console.warn(`bad regexp-value '${_}', parse error: ${ne}`),null}}}function G(_,M){const I=_?_.substituteConstants():void 0,g=M?M.substituteConstants():void 0;return!I&&!g?!0:!I||!g?!1:I.equals(g)}function r(_,M){return _.cmp(M)}class L{constructor(){this.type=0}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!1}serialize(){return"false"}keys(){return[]}negate(){return v.INSTANCE}}L.INSTANCE=new L;class v{constructor(){this.type=1}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!0}serialize(){return"true"}keys(){return[]}negate(){return L.INSTANCE}}v.INSTANCE=new v;class m{constructor(_,M){this.key=_,this.negated=M,this.type=2}static create(_,M=null){const I=j.get(_);return typeof I=="boolean"?I?v.INSTANCE:L.INSTANCE:new m(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:y(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=j.get(this.key);return typeof _=="boolean"?_?v.INSTANCE:L.INSTANCE:this}evaluate(_){return!!_.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class p{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=4}static create(_,M,I=null){if(typeof M=="boolean")return M?m.create(_,I):l.create(_,I);const g=j.get(_);if(typeof g=="boolean"){const H=g?"true":"false";return M===H?v.INSTANCE:L.INSTANCE}return new p(_,M,I)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=j.get(this.key);if(typeof _=="boolean"){const M=_?"true":"false";return this.value===M?v.INSTANCE:L.INSTANCE}return this}evaluate(_){return _.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class h{constructor(_,M){this.key=_,this.valueKey=M,this.type=10,this.negated=null}static create(_,M){return new h(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.valueKey,_.key,_.valueKey)}equals(_){return _.type===this.type?this.key===_.key&&this.valueKey===_.valueKey:!1}substituteConstants(){return this}evaluate(_){const M=_.getValue(this.valueKey),I=_.getValue(this.key);return Array.isArray(M)?M.indexOf(I)>=0:typeof I=="string"&&typeof M=="object"&&M!==null?U.call(M,I):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(_){this._actual=_,this.type=11}static create(_){return new u(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=5}static create(_,M,I=null){if(typeof M=="boolean")return M?l.create(_,I):m.create(_,I);const g=j.get(_);if(typeof g=="boolean"){const H=g?"true":"false";return M===H?L.INSTANCE:v.INSTANCE}return new f(_,M,I)}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=j.get(this.key);if(typeof _=="boolean"){const M=_?"true":"false";return this.value===M?L.INSTANCE:v.INSTANCE}return this}evaluate(_){return _.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class l{constructor(_,M){this.key=_,this.negated=M,this.type=3}static create(_,M=null){const I=j.get(_);return typeof I=="boolean"?I?L.INSTANCE:v.INSTANCE:new l(_,M)}cmp(_){return _.type!==this.type?this.type-_.type:y(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=j.get(this.key);return typeof _=="boolean"?_?L.INSTANCE:v.INSTANCE:this}evaluate(_){return!_.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function o(_,M){if(typeof _=="string"){const I=parseFloat(_);isNaN(I)||(_=I)}return typeof _=="string"||typeof _=="number"?M(_):L.INSTANCE}class s{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=12}static create(_,M,I=null){return o(M,g=>new s(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class a{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=13}static create(_,M,I=null){return o(M,g=>new a(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class O{constructor(_,M,I){this.key=_,this.value=M,this.negated=I,this.type=14}static create(_,M,I=null){return o(M,g=>new O(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))new E(_,g,I))}cmp(_){return _.type!==this.type?this.type-_.type:b(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class w{constructor(_,M){this.key=_,this.regexp=M,this.type=7,this.negated=null}static create(_,M){return new w(_,M)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.key<_.key)return-1;if(this.key>_.key)return 1;const M=this.regexp?this.regexp.source:"",I=_.regexp?_.regexp.source:"";return MI?1:0}equals(_){if(_.type===this.type){const M=this.regexp?this.regexp.source:"",I=_.regexp?_.regexp.source:"";return this.key===_.key&&M===I}return!1}substituteConstants(){return this}evaluate(_){let M=_.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const _=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${_}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(_){this._actual=_,this.type=8}static create(_){return new D(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(_){let M=null;for(let I=0,g=_.length;I_.expr.length)return 1;for(let M=0,I=this.expr.length;M1;){const H=I[I.length-1];if(H.type!==9)break;I.pop();const $=I.pop(),ne=I.length===0,se=C.create(H.expr.map(Oe=>A.create([Oe,$],null)),null,ne);se&&(I.push(se),I.sort(r))}return I.length===1?I[0]:new A(I,M)}serialize(){return this.expr.map(_=>_.serialize()).join(" && ")}keys(){const _=[];for(let M of this.expr)_.push(...M.keys());return _}negate(){if(!this.negated){const _=[];for(let M of this.expr)_.push(M.negate());this.negated=C.create(_,this,!0)}return this.negated}}class C{constructor(_,M){this.expr=_,this.negated=M,this.type=9}static create(_,M,I){return C._normalizeArr(_,M,I)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.expr.length<_.expr.length)return-1;if(this.expr.length>_.expr.length)return 1;for(let M=0,I=this.expr.length;M_.serialize()).join(" || ")}keys(){const _=[];for(let M of this.expr)_.push(...M.keys());return _}negate(){if(!this.negated){let _=[];for(let M of this.expr)_.push(M.negate());for(;_.length>1;){const M=_.shift(),I=_.shift(),g=[];for(const $ of F(M))for(const ne of F(I))g.push(A.create([$,ne],null));const H=_.length===0;_.unshift(C.create(g,null,H))}this.negated=_[0]}return this.negated}}class T extends m{constructor(_,M,I){super(_,null);this._defaultValue=M,typeof I=="object"?T._info.push(Object.assign(Object.assign({},I),{key:_})):I!==!0&&T._info.push({key:_,description:I,type:M!=null?typeof M:void 0})}static all(){return T._info.values()}bindTo(_){return _.createKey(this.key,this._defaultValue)}getValue(_){return _.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(_){return p.create(this.key,_)}}T._info=[];const d=Object(P.c)("contextKeyService"),S="setContext";function y(_,M){return _M?1:0}function b(_,M,I,g){return _I?1:Mg?1:0}function B(_,M){if(M.type===6&&_.type!==9&&_.type!==6){for(const H of M.expr)if(_.equals(H))return!0}const I=_.negate(),g=F(I).concat(F(M));g.sort(r);for(let H=0;H=0;h--)if(this.__items[h].match(p))return!0;return!1},L.prototype.set_indent=function(p,h){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},L.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},L.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},L.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},L.prototype.is_empty=function(){return this.__items.length===0},L.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},L.prototype.push=function(p){this.__items.push(p);var h=p.lastIndexOf(` `);h!==-1?this.__character_count=p.length-h:this.__character_count+=p.length},L.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},L.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},L.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},L.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},L.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function v(p,h){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),h=h||"",p.indent_level>0&&(h=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}v.prototype.get_indent_size=function(p,h){var u=this.__base_string_length;return h=h||0,p<0&&(u=0),u+=p*this.__indent_size,u+=h,u},v.prototype.get_indent_string=function(p,h){var u=this.__base_string;return h=h||0,p<0&&(p=0,u=""),h+=p*this.__indent_size,this.__ensure_cache(h),u+=this.__cache[h],u},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,h=0,u="";this.__indent_size&&p>=this.__indent_size&&(h=Math.floor(p/this.__indent_size),p-=h*this.__indent_size,u=new Array(h+1).join(this.__indent_string)),p&&(u+=new Array(p+1).join(" ")),this.__cache.push(u)};function m(p,h){this.__indent_cache=new v(p,h),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new L(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,h){return this.__indent_cache.get_indent_string(p,h)},m.prototype.get_indent_size=function(p,h){return this.__indent_cache.get_indent_size(p,h)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===` `&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(` `);return p!==` @@ -341,31 +341,31 @@ You passed in: '`+this.raw_options[p]+"'");return f},L.prototype._is_valid_selec `)break;this._ch=this._input.next()}return R},w.prototype.eatWhitespace=function(D){for(var R=s.test(this._input.peek()),A=0;s.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===` `&&((A===0||A0&&this._indentLevel--},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D=this._source_text,R=this._options.eol;R==="auto"&&(R=` `,D&&l.test(D||"")&&(R=D.match(l)[0])),D=D.replace(o,` -`);var A=D.match(/^[\t ]*/)[0];this._output=new p(this._options,A),this._input=new h(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var C=0,T=!1,c=!1,S=!1,y=!1,b=!1,B=!1,F=this._ch,_=!1,M,I,g;M=this._input.read(a),I=M!=="",g=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(O),$=f.get_directives(H);$&&$.ignore==="start"&&(H+=f.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(E)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(I),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ne.match(/[ :]$/)&&(ne=this.eatString(": ").replace(/\s$/,""),this.print_string(ne),this._output.space_before_token=!0),ne=ne.replace(/\s$/,""),ne==="extend"?y=!0:ne==="import"&&(b=!0),ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,ne in this.CONDITIONAL_GROUP_RULE&&(S=!0)):!T&&C===0&&ne.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(I),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),S?(S=!1,T=this._indentLevel>=this._nestedLevel):T=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&T&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(g==="("?this._output.space_before_token=!1:g!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),g==="{"&&this._output.trim(!0),b=!1,y=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),T=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var se=0;se"||this._ch==="+"||this._ch==="~")&&!c&&C===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&s.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(I),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),s.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Te=g==='"'||g==="'";this.preserveSingleSpace(Te||I),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&_&&this._output.add_new_line()}var Re=this._output.get_code(R);return Re},r.exports.Beautifier=w},function(r,L,v){var m=v(6).Options;function p(h){m.call(this,h,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var u=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||u;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l` ${v} `).trim():""}class K{constructor(r,L,v){this.id=r,this.definition=L,this.description=v,P.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var G;(function(r){r.iconNameSegment="[A-Za-z0-9]+",r.iconNameExpression="[A-Za-z0-9\\-]+",r.iconModifierExpression="~[A-Za-z]+";const L=new RegExp(`^(${r.iconNameExpression})(${r.iconModifierExpression})?$`);function v(h){if(h instanceof K)return["codicon","codicon-"+h.id];const u=L.exec(h.id);if(!u)return v(K.error);let[,f,l]=u;const o=["codicon","codicon-"+f];return l&&o.push("codicon-modifier-"+l.substr(1)),o}r.asClassNameArray=v;function m(h){return v(h).join(" ")}r.asClassName=m;function p(h){return"."+v(h).join(".")}r.asCSSSelector=p})(G||(G={})),function(r){r.add=new r("add",{fontCharacter:"\\ea60"}),r.plus=new r("plus",r.add.definition),r.gistNew=new r("gist-new",r.add.definition),r.repoCreate=new r("repo-create",r.add.definition),r.lightbulb=new r("lightbulb",{fontCharacter:"\\ea61"}),r.lightBulb=new r("light-bulb",{fontCharacter:"\\ea61"}),r.repo=new r("repo",{fontCharacter:"\\ea62"}),r.repoDelete=new r("repo-delete",{fontCharacter:"\\ea62"}),r.gistFork=new r("gist-fork",{fontCharacter:"\\ea63"}),r.repoForked=new r("repo-forked",{fontCharacter:"\\ea63"}),r.gitPullRequest=new r("git-pull-request",{fontCharacter:"\\ea64"}),r.gitPullRequestAbandoned=new r("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),r.recordKeys=new r("record-keys",{fontCharacter:"\\ea65"}),r.keyboard=new r("keyboard",{fontCharacter:"\\ea65"}),r.tag=new r("tag",{fontCharacter:"\\ea66"}),r.tagAdd=new r("tag-add",{fontCharacter:"\\ea66"}),r.tagRemove=new r("tag-remove",{fontCharacter:"\\ea66"}),r.person=new r("person",{fontCharacter:"\\ea67"}),r.personFollow=new r("person-follow",{fontCharacter:"\\ea67"}),r.personOutline=new r("person-outline",{fontCharacter:"\\ea67"}),r.personFilled=new r("person-filled",{fontCharacter:"\\ea67"}),r.gitBranch=new r("git-branch",{fontCharacter:"\\ea68"}),r.gitBranchCreate=new r("git-branch-create",{fontCharacter:"\\ea68"}),r.gitBranchDelete=new r("git-branch-delete",{fontCharacter:"\\ea68"}),r.sourceControl=new r("source-control",{fontCharacter:"\\ea68"}),r.mirror=new r("mirror",{fontCharacter:"\\ea69"}),r.mirrorPublic=new r("mirror-public",{fontCharacter:"\\ea69"}),r.star=new r("star",{fontCharacter:"\\ea6a"}),r.starAdd=new r("star-add",{fontCharacter:"\\ea6a"}),r.starDelete=new r("star-delete",{fontCharacter:"\\ea6a"}),r.starEmpty=new r("star-empty",{fontCharacter:"\\ea6a"}),r.comment=new r("comment",{fontCharacter:"\\ea6b"}),r.commentAdd=new r("comment-add",{fontCharacter:"\\ea6b"}),r.alert=new r("alert",{fontCharacter:"\\ea6c"}),r.warning=new r("warning",{fontCharacter:"\\ea6c"}),r.search=new r("search",{fontCharacter:"\\ea6d"}),r.searchSave=new r("search-save",{fontCharacter:"\\ea6d"}),r.logOut=new r("log-out",{fontCharacter:"\\ea6e"}),r.signOut=new r("sign-out",{fontCharacter:"\\ea6e"}),r.logIn=new r("log-in",{fontCharacter:"\\ea6f"}),r.signIn=new r("sign-in",{fontCharacter:"\\ea6f"}),r.eye=new r("eye",{fontCharacter:"\\ea70"}),r.eyeUnwatch=new r("eye-unwatch",{fontCharacter:"\\ea70"}),r.eyeWatch=new r("eye-watch",{fontCharacter:"\\ea70"}),r.circleFilled=new r("circle-filled",{fontCharacter:"\\ea71"}),r.primitiveDot=new r("primitive-dot",{fontCharacter:"\\ea71"}),r.closeDirty=new r("close-dirty",{fontCharacter:"\\ea71"}),r.debugBreakpoint=new r("debug-breakpoint",{fontCharacter:"\\ea71"}),r.debugBreakpointDisabled=new r("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),r.debugHint=new r("debug-hint",{fontCharacter:"\\ea71"}),r.primitiveSquare=new r("primitive-square",{fontCharacter:"\\ea72"}),r.edit=new r("edit",{fontCharacter:"\\ea73"}),r.pencil=new r("pencil",{fontCharacter:"\\ea73"}),r.info=new r("info",{fontCharacter:"\\ea74"}),r.issueOpened=new r("issue-opened",{fontCharacter:"\\ea74"}),r.gistPrivate=new r("gist-private",{fontCharacter:"\\ea75"}),r.gitForkPrivate=new r("git-fork-private",{fontCharacter:"\\ea75"}),r.lock=new r("lock",{fontCharacter:"\\ea75"}),r.mirrorPrivate=new r("mirror-private",{fontCharacter:"\\ea75"}),r.close=new r("close",{fontCharacter:"\\ea76"}),r.removeClose=new r("remove-close",{fontCharacter:"\\ea76"}),r.x=new r("x",{fontCharacter:"\\ea76"}),r.repoSync=new r("repo-sync",{fontCharacter:"\\ea77"}),r.sync=new r("sync",{fontCharacter:"\\ea77"}),r.clone=new r("clone",{fontCharacter:"\\ea78"}),r.desktopDownload=new r("desktop-download",{fontCharacter:"\\ea78"}),r.beaker=new r("beaker",{fontCharacter:"\\ea79"}),r.microscope=new r("microscope",{fontCharacter:"\\ea79"}),r.vm=new r("vm",{fontCharacter:"\\ea7a"}),r.deviceDesktop=new r("device-desktop",{fontCharacter:"\\ea7a"}),r.file=new r("file",{fontCharacter:"\\ea7b"}),r.fileText=new r("file-text",{fontCharacter:"\\ea7b"}),r.more=new r("more",{fontCharacter:"\\ea7c"}),r.ellipsis=new r("ellipsis",{fontCharacter:"\\ea7c"}),r.kebabHorizontal=new r("kebab-horizontal",{fontCharacter:"\\ea7c"}),r.mailReply=new r("mail-reply",{fontCharacter:"\\ea7d"}),r.reply=new r("reply",{fontCharacter:"\\ea7d"}),r.organization=new r("organization",{fontCharacter:"\\ea7e"}),r.organizationFilled=new r("organization-filled",{fontCharacter:"\\ea7e"}),r.organizationOutline=new r("organization-outline",{fontCharacter:"\\ea7e"}),r.newFile=new r("new-file",{fontCharacter:"\\ea7f"}),r.fileAdd=new r("file-add",{fontCharacter:"\\ea7f"}),r.newFolder=new r("new-folder",{fontCharacter:"\\ea80"}),r.fileDirectoryCreate=new r("file-directory-create",{fontCharacter:"\\ea80"}),r.trash=new r("trash",{fontCharacter:"\\ea81"}),r.trashcan=new r("trashcan",{fontCharacter:"\\ea81"}),r.history=new r("history",{fontCharacter:"\\ea82"}),r.clock=new r("clock",{fontCharacter:"\\ea82"}),r.folder=new r("folder",{fontCharacter:"\\ea83"}),r.fileDirectory=new r("file-directory",{fontCharacter:"\\ea83"}),r.symbolFolder=new r("symbol-folder",{fontCharacter:"\\ea83"}),r.logoGithub=new r("logo-github",{fontCharacter:"\\ea84"}),r.markGithub=new r("mark-github",{fontCharacter:"\\ea84"}),r.github=new r("github",{fontCharacter:"\\ea84"}),r.terminal=new r("terminal",{fontCharacter:"\\ea85"}),r.console=new r("console",{fontCharacter:"\\ea85"}),r.repl=new r("repl",{fontCharacter:"\\ea85"}),r.zap=new r("zap",{fontCharacter:"\\ea86"}),r.symbolEvent=new r("symbol-event",{fontCharacter:"\\ea86"}),r.error=new r("error",{fontCharacter:"\\ea87"}),r.stop=new r("stop",{fontCharacter:"\\ea87"}),r.variable=new r("variable",{fontCharacter:"\\ea88"}),r.symbolVariable=new r("symbol-variable",{fontCharacter:"\\ea88"}),r.array=new r("array",{fontCharacter:"\\ea8a"}),r.symbolArray=new r("symbol-array",{fontCharacter:"\\ea8a"}),r.symbolModule=new r("symbol-module",{fontCharacter:"\\ea8b"}),r.symbolPackage=new r("symbol-package",{fontCharacter:"\\ea8b"}),r.symbolNamespace=new r("symbol-namespace",{fontCharacter:"\\ea8b"}),r.symbolObject=new r("symbol-object",{fontCharacter:"\\ea8b"}),r.symbolMethod=new r("symbol-method",{fontCharacter:"\\ea8c"}),r.symbolFunction=new r("symbol-function",{fontCharacter:"\\ea8c"}),r.symbolConstructor=new r("symbol-constructor",{fontCharacter:"\\ea8c"}),r.symbolBoolean=new r("symbol-boolean",{fontCharacter:"\\ea8f"}),r.symbolNull=new r("symbol-null",{fontCharacter:"\\ea8f"}),r.symbolNumeric=new r("symbol-numeric",{fontCharacter:"\\ea90"}),r.symbolNumber=new r("symbol-number",{fontCharacter:"\\ea90"}),r.symbolStructure=new r("symbol-structure",{fontCharacter:"\\ea91"}),r.symbolStruct=new r("symbol-struct",{fontCharacter:"\\ea91"}),r.symbolParameter=new r("symbol-parameter",{fontCharacter:"\\ea92"}),r.symbolTypeParameter=new r("symbol-type-parameter",{fontCharacter:"\\ea92"}),r.symbolKey=new r("symbol-key",{fontCharacter:"\\ea93"}),r.symbolText=new r("symbol-text",{fontCharacter:"\\ea93"}),r.symbolReference=new r("symbol-reference",{fontCharacter:"\\ea94"}),r.goToFile=new r("go-to-file",{fontCharacter:"\\ea94"}),r.symbolEnum=new r("symbol-enum",{fontCharacter:"\\ea95"}),r.symbolValue=new r("symbol-value",{fontCharacter:"\\ea95"}),r.symbolRuler=new r("symbol-ruler",{fontCharacter:"\\ea96"}),r.symbolUnit=new r("symbol-unit",{fontCharacter:"\\ea96"}),r.activateBreakpoints=new r("activate-breakpoints",{fontCharacter:"\\ea97"}),r.archive=new r("archive",{fontCharacter:"\\ea98"}),r.arrowBoth=new r("arrow-both",{fontCharacter:"\\ea99"}),r.arrowDown=new r("arrow-down",{fontCharacter:"\\ea9a"}),r.arrowLeft=new r("arrow-left",{fontCharacter:"\\ea9b"}),r.arrowRight=new r("arrow-right",{fontCharacter:"\\ea9c"}),r.arrowSmallDown=new r("arrow-small-down",{fontCharacter:"\\ea9d"}),r.arrowSmallLeft=new r("arrow-small-left",{fontCharacter:"\\ea9e"}),r.arrowSmallRight=new r("arrow-small-right",{fontCharacter:"\\ea9f"}),r.arrowSmallUp=new r("arrow-small-up",{fontCharacter:"\\eaa0"}),r.arrowUp=new r("arrow-up",{fontCharacter:"\\eaa1"}),r.bell=new r("bell",{fontCharacter:"\\eaa2"}),r.bold=new r("bold",{fontCharacter:"\\eaa3"}),r.book=new r("book",{fontCharacter:"\\eaa4"}),r.bookmark=new r("bookmark",{fontCharacter:"\\eaa5"}),r.debugBreakpointConditionalUnverified=new r("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),r.debugBreakpointConditional=new r("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),r.debugBreakpointConditionalDisabled=new r("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),r.debugBreakpointDataUnverified=new r("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),r.debugBreakpointData=new r("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),r.debugBreakpointDataDisabled=new r("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),r.debugBreakpointLogUnverified=new r("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),r.debugBreakpointLog=new r("debug-breakpoint-log",{fontCharacter:"\\eaab"}),r.debugBreakpointLogDisabled=new r("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),r.briefcase=new r("briefcase",{fontCharacter:"\\eaac"}),r.broadcast=new r("broadcast",{fontCharacter:"\\eaad"}),r.browser=new r("browser",{fontCharacter:"\\eaae"}),r.bug=new r("bug",{fontCharacter:"\\eaaf"}),r.calendar=new r("calendar",{fontCharacter:"\\eab0"}),r.caseSensitive=new r("case-sensitive",{fontCharacter:"\\eab1"}),r.check=new r("check",{fontCharacter:"\\eab2"}),r.checklist=new r("checklist",{fontCharacter:"\\eab3"}),r.chevronDown=new r("chevron-down",{fontCharacter:"\\eab4"}),r.dropDownButton=new r("drop-down-button",r.chevronDown.definition),r.chevronLeft=new r("chevron-left",{fontCharacter:"\\eab5"}),r.chevronRight=new r("chevron-right",{fontCharacter:"\\eab6"}),r.chevronUp=new r("chevron-up",{fontCharacter:"\\eab7"}),r.chromeClose=new r("chrome-close",{fontCharacter:"\\eab8"}),r.chromeMaximize=new r("chrome-maximize",{fontCharacter:"\\eab9"}),r.chromeMinimize=new r("chrome-minimize",{fontCharacter:"\\eaba"}),r.chromeRestore=new r("chrome-restore",{fontCharacter:"\\eabb"}),r.circleOutline=new r("circle-outline",{fontCharacter:"\\eabc"}),r.debugBreakpointUnverified=new r("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),r.circleSlash=new r("circle-slash",{fontCharacter:"\\eabd"}),r.circuitBoard=new r("circuit-board",{fontCharacter:"\\eabe"}),r.clearAll=new r("clear-all",{fontCharacter:"\\eabf"}),r.clippy=new r("clippy",{fontCharacter:"\\eac0"}),r.closeAll=new r("close-all",{fontCharacter:"\\eac1"}),r.cloudDownload=new r("cloud-download",{fontCharacter:"\\eac2"}),r.cloudUpload=new r("cloud-upload",{fontCharacter:"\\eac3"}),r.code=new r("code",{fontCharacter:"\\eac4"}),r.collapseAll=new r("collapse-all",{fontCharacter:"\\eac5"}),r.colorMode=new r("color-mode",{fontCharacter:"\\eac6"}),r.commentDiscussion=new r("comment-discussion",{fontCharacter:"\\eac7"}),r.compareChanges=new r("compare-changes",{fontCharacter:"\\eafd"}),r.creditCard=new r("credit-card",{fontCharacter:"\\eac9"}),r.dash=new r("dash",{fontCharacter:"\\eacc"}),r.dashboard=new r("dashboard",{fontCharacter:"\\eacd"}),r.database=new r("database",{fontCharacter:"\\eace"}),r.debugContinue=new r("debug-continue",{fontCharacter:"\\eacf"}),r.debugDisconnect=new r("debug-disconnect",{fontCharacter:"\\ead0"}),r.debugPause=new r("debug-pause",{fontCharacter:"\\ead1"}),r.debugRestart=new r("debug-restart",{fontCharacter:"\\ead2"}),r.debugStart=new r("debug-start",{fontCharacter:"\\ead3"}),r.debugStepInto=new r("debug-step-into",{fontCharacter:"\\ead4"}),r.debugStepOut=new r("debug-step-out",{fontCharacter:"\\ead5"}),r.debugStepOver=new r("debug-step-over",{fontCharacter:"\\ead6"}),r.debugStop=new r("debug-stop",{fontCharacter:"\\ead7"}),r.debug=new r("debug",{fontCharacter:"\\ead8"}),r.deviceCameraVideo=new r("device-camera-video",{fontCharacter:"\\ead9"}),r.deviceCamera=new r("device-camera",{fontCharacter:"\\eada"}),r.deviceMobile=new r("device-mobile",{fontCharacter:"\\eadb"}),r.diffAdded=new r("diff-added",{fontCharacter:"\\eadc"}),r.diffIgnored=new r("diff-ignored",{fontCharacter:"\\eadd"}),r.diffModified=new r("diff-modified",{fontCharacter:"\\eade"}),r.diffRemoved=new r("diff-removed",{fontCharacter:"\\eadf"}),r.diffRenamed=new r("diff-renamed",{fontCharacter:"\\eae0"}),r.diff=new r("diff",{fontCharacter:"\\eae1"}),r.discard=new r("discard",{fontCharacter:"\\eae2"}),r.editorLayout=new r("editor-layout",{fontCharacter:"\\eae3"}),r.emptyWindow=new r("empty-window",{fontCharacter:"\\eae4"}),r.exclude=new r("exclude",{fontCharacter:"\\eae5"}),r.extensions=new r("extensions",{fontCharacter:"\\eae6"}),r.eyeClosed=new r("eye-closed",{fontCharacter:"\\eae7"}),r.fileBinary=new r("file-binary",{fontCharacter:"\\eae8"}),r.fileCode=new r("file-code",{fontCharacter:"\\eae9"}),r.fileMedia=new r("file-media",{fontCharacter:"\\eaea"}),r.filePdf=new r("file-pdf",{fontCharacter:"\\eaeb"}),r.fileSubmodule=new r("file-submodule",{fontCharacter:"\\eaec"}),r.fileSymlinkDirectory=new r("file-symlink-directory",{fontCharacter:"\\eaed"}),r.fileSymlinkFile=new r("file-symlink-file",{fontCharacter:"\\eaee"}),r.fileZip=new r("file-zip",{fontCharacter:"\\eaef"}),r.files=new r("files",{fontCharacter:"\\eaf0"}),r.filter=new r("filter",{fontCharacter:"\\eaf1"}),r.flame=new r("flame",{fontCharacter:"\\eaf2"}),r.foldDown=new r("fold-down",{fontCharacter:"\\eaf3"}),r.foldUp=new r("fold-up",{fontCharacter:"\\eaf4"}),r.fold=new r("fold",{fontCharacter:"\\eaf5"}),r.folderActive=new r("folder-active",{fontCharacter:"\\eaf6"}),r.folderOpened=new r("folder-opened",{fontCharacter:"\\eaf7"}),r.gear=new r("gear",{fontCharacter:"\\eaf8"}),r.gift=new r("gift",{fontCharacter:"\\eaf9"}),r.gistSecret=new r("gist-secret",{fontCharacter:"\\eafa"}),r.gist=new r("gist",{fontCharacter:"\\eafb"}),r.gitCommit=new r("git-commit",{fontCharacter:"\\eafc"}),r.gitCompare=new r("git-compare",{fontCharacter:"\\eafd"}),r.gitMerge=new r("git-merge",{fontCharacter:"\\eafe"}),r.githubAction=new r("github-action",{fontCharacter:"\\eaff"}),r.githubAlt=new r("github-alt",{fontCharacter:"\\eb00"}),r.globe=new r("globe",{fontCharacter:"\\eb01"}),r.grabber=new r("grabber",{fontCharacter:"\\eb02"}),r.graph=new r("graph",{fontCharacter:"\\eb03"}),r.gripper=new r("gripper",{fontCharacter:"\\eb04"}),r.heart=new r("heart",{fontCharacter:"\\eb05"}),r.home=new r("home",{fontCharacter:"\\eb06"}),r.horizontalRule=new r("horizontal-rule",{fontCharacter:"\\eb07"}),r.hubot=new r("hubot",{fontCharacter:"\\eb08"}),r.inbox=new r("inbox",{fontCharacter:"\\eb09"}),r.issueClosed=new r("issue-closed",{fontCharacter:"\\eba4"}),r.issueReopened=new r("issue-reopened",{fontCharacter:"\\eb0b"}),r.issues=new r("issues",{fontCharacter:"\\eb0c"}),r.italic=new r("italic",{fontCharacter:"\\eb0d"}),r.jersey=new r("jersey",{fontCharacter:"\\eb0e"}),r.json=new r("json",{fontCharacter:"\\eb0f"}),r.kebabVertical=new r("kebab-vertical",{fontCharacter:"\\eb10"}),r.key=new r("key",{fontCharacter:"\\eb11"}),r.law=new r("law",{fontCharacter:"\\eb12"}),r.lightbulbAutofix=new r("lightbulb-autofix",{fontCharacter:"\\eb13"}),r.linkExternal=new r("link-external",{fontCharacter:"\\eb14"}),r.link=new r("link",{fontCharacter:"\\eb15"}),r.listOrdered=new r("list-ordered",{fontCharacter:"\\eb16"}),r.listUnordered=new r("list-unordered",{fontCharacter:"\\eb17"}),r.liveShare=new r("live-share",{fontCharacter:"\\eb18"}),r.loading=new r("loading",{fontCharacter:"\\eb19"}),r.location=new r("location",{fontCharacter:"\\eb1a"}),r.mailRead=new r("mail-read",{fontCharacter:"\\eb1b"}),r.mail=new r("mail",{fontCharacter:"\\eb1c"}),r.markdown=new r("markdown",{fontCharacter:"\\eb1d"}),r.megaphone=new r("megaphone",{fontCharacter:"\\eb1e"}),r.mention=new r("mention",{fontCharacter:"\\eb1f"}),r.milestone=new r("milestone",{fontCharacter:"\\eb20"}),r.mortarBoard=new r("mortar-board",{fontCharacter:"\\eb21"}),r.move=new r("move",{fontCharacter:"\\eb22"}),r.multipleWindows=new r("multiple-windows",{fontCharacter:"\\eb23"}),r.mute=new r("mute",{fontCharacter:"\\eb24"}),r.noNewline=new r("no-newline",{fontCharacter:"\\eb25"}),r.note=new r("note",{fontCharacter:"\\eb26"}),r.octoface=new r("octoface",{fontCharacter:"\\eb27"}),r.openPreview=new r("open-preview",{fontCharacter:"\\eb28"}),r.package_=new r("package",{fontCharacter:"\\eb29"}),r.paintcan=new r("paintcan",{fontCharacter:"\\eb2a"}),r.pin=new r("pin",{fontCharacter:"\\eb2b"}),r.play=new r("play",{fontCharacter:"\\eb2c"}),r.run=new r("run",{fontCharacter:"\\eb2c"}),r.plug=new r("plug",{fontCharacter:"\\eb2d"}),r.preserveCase=new r("preserve-case",{fontCharacter:"\\eb2e"}),r.preview=new r("preview",{fontCharacter:"\\eb2f"}),r.project=new r("project",{fontCharacter:"\\eb30"}),r.pulse=new r("pulse",{fontCharacter:"\\eb31"}),r.question=new r("question",{fontCharacter:"\\eb32"}),r.quote=new r("quote",{fontCharacter:"\\eb33"}),r.radioTower=new r("radio-tower",{fontCharacter:"\\eb34"}),r.reactions=new r("reactions",{fontCharacter:"\\eb35"}),r.references=new r("references",{fontCharacter:"\\eb36"}),r.refresh=new r("refresh",{fontCharacter:"\\eb37"}),r.regex=new r("regex",{fontCharacter:"\\eb38"}),r.remoteExplorer=new r("remote-explorer",{fontCharacter:"\\eb39"}),r.remote=new r("remote",{fontCharacter:"\\eb3a"}),r.remove=new r("remove",{fontCharacter:"\\eb3b"}),r.replaceAll=new r("replace-all",{fontCharacter:"\\eb3c"}),r.replace=new r("replace",{fontCharacter:"\\eb3d"}),r.repoClone=new r("repo-clone",{fontCharacter:"\\eb3e"}),r.repoForcePush=new r("repo-force-push",{fontCharacter:"\\eb3f"}),r.repoPull=new r("repo-pull",{fontCharacter:"\\eb40"}),r.repoPush=new r("repo-push",{fontCharacter:"\\eb41"}),r.report=new r("report",{fontCharacter:"\\eb42"}),r.requestChanges=new r("request-changes",{fontCharacter:"\\eb43"}),r.rocket=new r("rocket",{fontCharacter:"\\eb44"}),r.rootFolderOpened=new r("root-folder-opened",{fontCharacter:"\\eb45"}),r.rootFolder=new r("root-folder",{fontCharacter:"\\eb46"}),r.rss=new r("rss",{fontCharacter:"\\eb47"}),r.ruby=new r("ruby",{fontCharacter:"\\eb48"}),r.saveAll=new r("save-all",{fontCharacter:"\\eb49"}),r.saveAs=new r("save-as",{fontCharacter:"\\eb4a"}),r.save=new r("save",{fontCharacter:"\\eb4b"}),r.screenFull=new r("screen-full",{fontCharacter:"\\eb4c"}),r.screenNormal=new r("screen-normal",{fontCharacter:"\\eb4d"}),r.searchStop=new r("search-stop",{fontCharacter:"\\eb4e"}),r.server=new r("server",{fontCharacter:"\\eb50"}),r.settingsGear=new r("settings-gear",{fontCharacter:"\\eb51"}),r.settings=new r("settings",{fontCharacter:"\\eb52"}),r.shield=new r("shield",{fontCharacter:"\\eb53"}),r.smiley=new r("smiley",{fontCharacter:"\\eb54"}),r.sortPrecedence=new r("sort-precedence",{fontCharacter:"\\eb55"}),r.splitHorizontal=new r("split-horizontal",{fontCharacter:"\\eb56"}),r.splitVertical=new r("split-vertical",{fontCharacter:"\\eb57"}),r.squirrel=new r("squirrel",{fontCharacter:"\\eb58"}),r.starFull=new r("star-full",{fontCharacter:"\\eb59"}),r.starHalf=new r("star-half",{fontCharacter:"\\eb5a"}),r.symbolClass=new r("symbol-class",{fontCharacter:"\\eb5b"}),r.symbolColor=new r("symbol-color",{fontCharacter:"\\eb5c"}),r.symbolConstant=new r("symbol-constant",{fontCharacter:"\\eb5d"}),r.symbolEnumMember=new r("symbol-enum-member",{fontCharacter:"\\eb5e"}),r.symbolField=new r("symbol-field",{fontCharacter:"\\eb5f"}),r.symbolFile=new r("symbol-file",{fontCharacter:"\\eb60"}),r.symbolInterface=new r("symbol-interface",{fontCharacter:"\\eb61"}),r.symbolKeyword=new r("symbol-keyword",{fontCharacter:"\\eb62"}),r.symbolMisc=new r("symbol-misc",{fontCharacter:"\\eb63"}),r.symbolOperator=new r("symbol-operator",{fontCharacter:"\\eb64"}),r.symbolProperty=new r("symbol-property",{fontCharacter:"\\eb65"}),r.wrench=new r("wrench",{fontCharacter:"\\eb65"}),r.wrenchSubaction=new r("wrench-subaction",{fontCharacter:"\\eb65"}),r.symbolSnippet=new r("symbol-snippet",{fontCharacter:"\\eb66"}),r.tasklist=new r("tasklist",{fontCharacter:"\\eb67"}),r.telescope=new r("telescope",{fontCharacter:"\\eb68"}),r.textSize=new r("text-size",{fontCharacter:"\\eb69"}),r.threeBars=new r("three-bars",{fontCharacter:"\\eb6a"}),r.thumbsdown=new r("thumbsdown",{fontCharacter:"\\eb6b"}),r.thumbsup=new r("thumbsup",{fontCharacter:"\\eb6c"}),r.tools=new r("tools",{fontCharacter:"\\eb6d"}),r.triangleDown=new r("triangle-down",{fontCharacter:"\\eb6e"}),r.triangleLeft=new r("triangle-left",{fontCharacter:"\\eb6f"}),r.triangleRight=new r("triangle-right",{fontCharacter:"\\eb70"}),r.triangleUp=new r("triangle-up",{fontCharacter:"\\eb71"}),r.twitter=new r("twitter",{fontCharacter:"\\eb72"}),r.unfold=new r("unfold",{fontCharacter:"\\eb73"}),r.unlock=new r("unlock",{fontCharacter:"\\eb74"}),r.unmute=new r("unmute",{fontCharacter:"\\eb75"}),r.unverified=new r("unverified",{fontCharacter:"\\eb76"}),r.verified=new r("verified",{fontCharacter:"\\eb77"}),r.versions=new r("versions",{fontCharacter:"\\eb78"}),r.vmActive=new r("vm-active",{fontCharacter:"\\eb79"}),r.vmOutline=new r("vm-outline",{fontCharacter:"\\eb7a"}),r.vmRunning=new r("vm-running",{fontCharacter:"\\eb7b"}),r.watch=new r("watch",{fontCharacter:"\\eb7c"}),r.whitespace=new r("whitespace",{fontCharacter:"\\eb7d"}),r.wholeWord=new r("whole-word",{fontCharacter:"\\eb7e"}),r.window=new r("window",{fontCharacter:"\\eb7f"}),r.wordWrap=new r("word-wrap",{fontCharacter:"\\eb80"}),r.zoomIn=new r("zoom-in",{fontCharacter:"\\eb81"}),r.zoomOut=new r("zoom-out",{fontCharacter:"\\eb82"}),r.listFilter=new r("list-filter",{fontCharacter:"\\eb83"}),r.listFlat=new r("list-flat",{fontCharacter:"\\eb84"}),r.listSelection=new r("list-selection",{fontCharacter:"\\eb85"}),r.selection=new r("selection",{fontCharacter:"\\eb85"}),r.listTree=new r("list-tree",{fontCharacter:"\\eb86"}),r.debugBreakpointFunctionUnverified=new r("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),r.debugBreakpointFunction=new r("debug-breakpoint-function",{fontCharacter:"\\eb88"}),r.debugBreakpointFunctionDisabled=new r("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),r.debugStackframeActive=new r("debug-stackframe-active",{fontCharacter:"\\eb89"}),r.debugStackframeDot=new r("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),r.debugStackframe=new r("debug-stackframe",{fontCharacter:"\\eb8b"}),r.debugStackframeFocused=new r("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),r.debugBreakpointUnsupported=new r("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),r.symbolString=new r("symbol-string",{fontCharacter:"\\eb8d"}),r.debugReverseContinue=new r("debug-reverse-continue",{fontCharacter:"\\eb8e"}),r.debugStepBack=new r("debug-step-back",{fontCharacter:"\\eb8f"}),r.debugRestartFrame=new r("debug-restart-frame",{fontCharacter:"\\eb90"}),r.callIncoming=new r("call-incoming",{fontCharacter:"\\eb92"}),r.callOutgoing=new r("call-outgoing",{fontCharacter:"\\eb93"}),r.menu=new r("menu",{fontCharacter:"\\eb94"}),r.expandAll=new r("expand-all",{fontCharacter:"\\eb95"}),r.feedback=new r("feedback",{fontCharacter:"\\eb96"}),r.groupByRefType=new r("group-by-ref-type",{fontCharacter:"\\eb97"}),r.ungroupByRefType=new r("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),r.account=new r("account",{fontCharacter:"\\eb99"}),r.bellDot=new r("bell-dot",{fontCharacter:"\\eb9a"}),r.debugConsole=new r("debug-console",{fontCharacter:"\\eb9b"}),r.library=new r("library",{fontCharacter:"\\eb9c"}),r.output=new r("output",{fontCharacter:"\\eb9d"}),r.runAll=new r("run-all",{fontCharacter:"\\eb9e"}),r.syncIgnored=new r("sync-ignored",{fontCharacter:"\\eb9f"}),r.pinned=new r("pinned",{fontCharacter:"\\eba0"}),r.githubInverted=new r("github-inverted",{fontCharacter:"\\eba1"}),r.debugAlt=new r("debug-alt",{fontCharacter:"\\eb91"}),r.serverProcess=new r("server-process",{fontCharacter:"\\eba2"}),r.serverEnvironment=new r("server-environment",{fontCharacter:"\\eba3"}),r.pass=new r("pass",{fontCharacter:"\\eba4"}),r.stopCircle=new r("stop-circle",{fontCharacter:"\\eba5"}),r.playCircle=new r("play-circle",{fontCharacter:"\\eba6"}),r.record=new r("record",{fontCharacter:"\\eba7"}),r.debugAltSmall=new r("debug-alt-small",{fontCharacter:"\\eba8"}),r.vmConnect=new r("vm-connect",{fontCharacter:"\\eba9"}),r.cloud=new r("cloud",{fontCharacter:"\\ebaa"}),r.merge=new r("merge",{fontCharacter:"\\ebab"}),r.exportIcon=new r("export",{fontCharacter:"\\ebac"}),r.graphLeft=new r("graph-left",{fontCharacter:"\\ebad"}),r.magnet=new r("magnet",{fontCharacter:"\\ebae"}),r.notebook=new r("notebook",{fontCharacter:"\\ebaf"}),r.redo=new r("redo",{fontCharacter:"\\ebb0"}),r.checkAll=new r("check-all",{fontCharacter:"\\ebb1"}),r.pinnedDirty=new r("pinned-dirty",{fontCharacter:"\\ebb2"}),r.passFilled=new r("pass-filled",{fontCharacter:"\\ebb3"}),r.circleLargeFilled=new r("circle-large-filled",{fontCharacter:"\\ebb4"}),r.circleLargeOutline=new r("circle-large-outline",{fontCharacter:"\\ebb5"}),r.combine=new r("combine",{fontCharacter:"\\ebb6"}),r.gather=new r("gather",{fontCharacter:"\\ebb6"}),r.table=new r("table",{fontCharacter:"\\ebb7"}),r.variableGroup=new r("variable-group",{fontCharacter:"\\ebb8"}),r.typeHierarchy=new r("type-hierarchy",{fontCharacter:"\\ebb9"}),r.typeHierarchySub=new r("type-hierarchy-sub",{fontCharacter:"\\ebba"}),r.typeHierarchySuper=new r("type-hierarchy-super",{fontCharacter:"\\ebbb"}),r.gitPullRequestCreate=new r("git-pull-request-create",{fontCharacter:"\\ebbc"}),r.runAbove=new r("run-above",{fontCharacter:"\\ebbd"}),r.runBelow=new r("run-below",{fontCharacter:"\\ebbe"}),r.notebookTemplate=new r("notebook-template",{fontCharacter:"\\ebbf"}),r.debugRerun=new r("debug-rerun",{fontCharacter:"\\ebc0"}),r.workspaceTrusted=new r("workspace-trusted",{fontCharacter:"\\ebc1"}),r.workspaceUntrusted=new r("workspace-untrusted",{fontCharacter:"\\ebc2"}),r.workspaceUnspecified=new r("workspace-unspecified",{fontCharacter:"\\ebc3"}),r.terminalCmd=new r("terminal-cmd",{fontCharacter:"\\ebc4"}),r.terminalDebian=new r("terminal-debian",{fontCharacter:"\\ebc5"}),r.terminalLinux=new r("terminal-linux",{fontCharacter:"\\ebc6"}),r.terminalPowershell=new r("terminal-powershell",{fontCharacter:"\\ebc7"}),r.terminalTmux=new r("terminal-tmux",{fontCharacter:"\\ebc8"}),r.terminalUbuntu=new r("terminal-ubuntu",{fontCharacter:"\\ebc9"}),r.terminalBash=new r("terminal-bash",{fontCharacter:"\\ebca"}),r.arrowSwap=new r("arrow-swap",{fontCharacter:"\\ebcb"}),r.copy=new r("copy",{fontCharacter:"\\ebcc"}),r.personAdd=new r("person-add",{fontCharacter:"\\ebcd"}),r.filterFilled=new r("filter-filled",{fontCharacter:"\\ebce"}),r.wand=new r("wand",{fontCharacter:"\\ebcf"}),r.debugLineByLine=new r("debug-line-by-line",{fontCharacter:"\\ebd0"}),r.inspect=new r("inspect",{fontCharacter:"\\ebd1"}),r.layers=new r("layers",{fontCharacter:"\\ebd2"}),r.layersDot=new r("layers-dot",{fontCharacter:"\\ebd3"}),r.layersActive=new r("layers-active",{fontCharacter:"\\ebd4"}),r.compass=new r("compass",{fontCharacter:"\\ebd5"}),r.compassDot=new r("compass-dot",{fontCharacter:"\\ebd6"}),r.compassActive=new r("compass-active",{fontCharacter:"\\ebd7"}),r.azure=new r("azure",{fontCharacter:"\\ebd8"}),r.issueDraft=new r("issue-draft",{fontCharacter:"\\ebd9"}),r.gitPullRequestClosed=new r("git-pull-request-closed",{fontCharacter:"\\ebda"}),r.gitPullRequestDraft=new r("git-pull-request-draft",{fontCharacter:"\\ebdb"}),r.debugAll=new r("debug-all",{fontCharacter:"\\ebdc"}),r.debugCoverage=new r("debug-coverage",{fontCharacter:"\\ebdd"}),r.runErrors=new r("run-errors",{fontCharacter:"\\ebde"}),r.folderLibrary=new r("folder-library",{fontCharacter:"\\ebdf"}),r.debugContinueSmall=new r("debug-continue-small",{fontCharacter:"\\ebe0"}),r.beakerStop=new r("beaker-stop",{fontCharacter:"\\ebe1"}),r.graphLine=new r("graph-line",{fontCharacter:"\\ebe2"}),r.graphScatter=new r("graph-scatter",{fontCharacter:"\\ebe3"}),r.pieChart=new r("pie-chart",{fontCharacter:"\\ebe4"}),r.bracket=new r("bracket",r.json.definition),r.bracketDot=new r("bracket-dot",{fontCharacter:"\\ebe5"}),r.bracketError=new r("bracket-error",{fontCharacter:"\\ebe6"}),r.lockSmall=new r("lock-small",{fontCharacter:"\\ebe7"}),r.azureDevops=new r("azure-devops",{fontCharacter:"\\ebe8"}),r.verifiedFilled=new r("verified-filled",{fontCharacter:"\\ebe9"})}(K||(K={}))},"VrN/":function(rt,be,Z){(function(ie,J){rt.exports=J()})(this,function(){"use strict";var ie=navigator.userAgent,J=navigator.platform,P=/gecko\/\d/i.test(ie),X=/MSIE \d/.test(ie),j=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),U=/Edge\/(\d+)/.exec(ie),K=X||j||U,G=K&&(X?document.documentMode||6:+(U||j)[1]),r=!U&&/WebKit\//.test(ie),L=r&&/Qt\/\d+\.\d+/.test(ie),v=!U&&/Chrome\//.test(ie),m=/Opera\//.test(ie),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),u=/PhantomJS/.test(ie),f=!U&&/AppleWebKit/.test(ie)&&/Mobile\/\w+/.test(ie),l=/Android/.test(ie),o=f||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),s=f||/Mac/.test(J),a=/\bCrOS\b/.test(ie),O=/win/i.test(J),E=m&&ie.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(m=!1,r=!0);var w=s&&(L||m&&(E==null||E<12.11)),D=P||K&&G>=9;function R(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var A=function(e,t){var i=e.className,n=R(t).exec(i);if(n){var d=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(d?n[1]+d:"")}};function C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return C(e).appendChild(t)}function c(e,t,i,n){var d=document.createElement(e);if(i&&(d.className=i),n&&(d.style.cssText=n),typeof t=="string")d.appendChild(document.createTextNode(t));else if(t)for(var N=0;N=t)return z+(t-N);z+=Q-N,z+=i-z%i,N=Q+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return n+Math.min(z,t-d);if(d+=N-n,d+=i-d%i,n=N+1,d>=t)return n}}var de=[""];function he(e){for(;de.length<=e;)de.push(re(de)+" ");return de[e]}function re(e){return e[e.length-1]}function fe(e,t){for(var i=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ce.test(e))}function Be(e,t){return t?t.source.indexOf("\\w")>-1&&Ne(e)?!0:t.test(e):Ne(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ve=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Se(e){return e.charCodeAt(0)>=768&&ve.test(e)}function Ie(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var d=(t+i)/2,N=n<0?Math.ceil(d):Math.floor(d);if(N==t)return e(N)?t:i;e(N)?i=N:t=N+n}}function Ve(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var d=!1,N=0;Nt||t==i&&z.to==t)&&(n(Math.max(z.from,t),Math.min(z.to,i),z.level==1?"rtl":"ltr",N),d=!0)}d||n(t,i,"ltr")}var Qe=null;function Je(e,t,i){var n;Qe=null;for(var d=0;dt)return d;N.to==t&&(N.from!=N.to&&i=="before"?n=d:Qe=d),N.from==t&&(N.from!=N.to&&i!="before"?n=d:Qe=d)}return n!=null?n:Qe}var st=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(te){return te<=247?e.charAt(te):1424<=te&&te<=1524?"R":1536<=te&&te<=1785?t.charAt(te-1536):1774<=te&&te<=2220?"r":8192<=te&&te<=8203?"w":te==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,N=/[LRr]/,z=/[Lb1n]/,Q=/[1n]/;function q(te,pe,ye){this.level=te,this.from=pe,this.to=ye}return function(te,pe){var ye=pe=="ltr"?"L":"R";if(te.length==0||pe=="ltr"&&!n.test(te))return!1;for(var Me=te.length,ke=[],Ke=0;Ke-1&&(n[t]=d.slice(0,N).concat(d.slice(N+1)))}}}function je(e,t){var i=ct(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),d=0;d0}function we(e){e.prototype.on=function(t,i){Ue(this,t,i)},e.prototype.off=function(t,i){lt(this,t,i)}}function ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ue(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ce(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function me(e){ae(e),ue(e)}function xe(e){return e.target||e.srcElement}function Pe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var He=function(){if(K&&G<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),ze;function ht(e){if(ze==null){var t=c("span","\u200B");T(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ze=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&G<8))}var i=ze?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var ot;function yt(e){if(ot!=null)return ot;var t=T(e,document.createTextNode("A\u062EA")),i=y(t,0,1).getBoundingClientRect(),n=y(t,1,2).getBoundingClientRect();return C(e),!i||i.left==i.right?!1:ot=n.right-i.right<3}var dt=` +`);var A=D.match(/^[\t ]*/)[0];this._output=new p(this._options,A),this._input=new h(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var C=0,T=!1,d=!1,S=!1,y=!1,b=!1,B=!1,F=this._ch,_=!1,M,I,g;M=this._input.read(a),I=M!=="",g=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(O),$=f.get_directives(H);$&&$.ignore==="start"&&(H+=f.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(E)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(I),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ne.match(/[ :]$/)&&(ne=this.eatString(": ").replace(/\s$/,""),this.print_string(ne),this._output.space_before_token=!0),ne=ne.replace(/\s$/,""),ne==="extend"?y=!0:ne==="import"&&(b=!0),ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,ne in this.CONDITIONAL_GROUP_RULE&&(S=!0)):!T&&C===0&&ne.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(I),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),S?(S=!1,T=this._indentLevel>=this._nestedLevel):T=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&T&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(g==="("?this._output.space_before_token=!1:g!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),g==="{"&&this._output.trim(!0),b=!1,y=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),T=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var se=0;se"||this._ch==="+"||this._ch==="~")&&!d&&C===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&s.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(I),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),s.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Te=g==='"'||g==="'";this.preserveSingleSpace(Te||I),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` +`&&_&&this._output.add_new_line()}var Re=this._output.get_code(R);return Re},r.exports.Beautifier=w},function(r,L,v){var m=v(6).Options;function p(h){m.call(this,h,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var u=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||u;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l` ${v} `).trim():""}class K{constructor(r,L,v){this.id=r,this.definition=L,this.description=v,P.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var G;(function(r){r.iconNameSegment="[A-Za-z0-9]+",r.iconNameExpression="[A-Za-z0-9\\-]+",r.iconModifierExpression="~[A-Za-z]+";const L=new RegExp(`^(${r.iconNameExpression})(${r.iconModifierExpression})?$`);function v(h){if(h instanceof K)return["codicon","codicon-"+h.id];const u=L.exec(h.id);if(!u)return v(K.error);let[,f,l]=u;const o=["codicon","codicon-"+f];return l&&o.push("codicon-modifier-"+l.substr(1)),o}r.asClassNameArray=v;function m(h){return v(h).join(" ")}r.asClassName=m;function p(h){return"."+v(h).join(".")}r.asCSSSelector=p})(G||(G={})),function(r){r.add=new r("add",{fontCharacter:"\\ea60"}),r.plus=new r("plus",r.add.definition),r.gistNew=new r("gist-new",r.add.definition),r.repoCreate=new r("repo-create",r.add.definition),r.lightbulb=new r("lightbulb",{fontCharacter:"\\ea61"}),r.lightBulb=new r("light-bulb",{fontCharacter:"\\ea61"}),r.repo=new r("repo",{fontCharacter:"\\ea62"}),r.repoDelete=new r("repo-delete",{fontCharacter:"\\ea62"}),r.gistFork=new r("gist-fork",{fontCharacter:"\\ea63"}),r.repoForked=new r("repo-forked",{fontCharacter:"\\ea63"}),r.gitPullRequest=new r("git-pull-request",{fontCharacter:"\\ea64"}),r.gitPullRequestAbandoned=new r("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),r.recordKeys=new r("record-keys",{fontCharacter:"\\ea65"}),r.keyboard=new r("keyboard",{fontCharacter:"\\ea65"}),r.tag=new r("tag",{fontCharacter:"\\ea66"}),r.tagAdd=new r("tag-add",{fontCharacter:"\\ea66"}),r.tagRemove=new r("tag-remove",{fontCharacter:"\\ea66"}),r.person=new r("person",{fontCharacter:"\\ea67"}),r.personFollow=new r("person-follow",{fontCharacter:"\\ea67"}),r.personOutline=new r("person-outline",{fontCharacter:"\\ea67"}),r.personFilled=new r("person-filled",{fontCharacter:"\\ea67"}),r.gitBranch=new r("git-branch",{fontCharacter:"\\ea68"}),r.gitBranchCreate=new r("git-branch-create",{fontCharacter:"\\ea68"}),r.gitBranchDelete=new r("git-branch-delete",{fontCharacter:"\\ea68"}),r.sourceControl=new r("source-control",{fontCharacter:"\\ea68"}),r.mirror=new r("mirror",{fontCharacter:"\\ea69"}),r.mirrorPublic=new r("mirror-public",{fontCharacter:"\\ea69"}),r.star=new r("star",{fontCharacter:"\\ea6a"}),r.starAdd=new r("star-add",{fontCharacter:"\\ea6a"}),r.starDelete=new r("star-delete",{fontCharacter:"\\ea6a"}),r.starEmpty=new r("star-empty",{fontCharacter:"\\ea6a"}),r.comment=new r("comment",{fontCharacter:"\\ea6b"}),r.commentAdd=new r("comment-add",{fontCharacter:"\\ea6b"}),r.alert=new r("alert",{fontCharacter:"\\ea6c"}),r.warning=new r("warning",{fontCharacter:"\\ea6c"}),r.search=new r("search",{fontCharacter:"\\ea6d"}),r.searchSave=new r("search-save",{fontCharacter:"\\ea6d"}),r.logOut=new r("log-out",{fontCharacter:"\\ea6e"}),r.signOut=new r("sign-out",{fontCharacter:"\\ea6e"}),r.logIn=new r("log-in",{fontCharacter:"\\ea6f"}),r.signIn=new r("sign-in",{fontCharacter:"\\ea6f"}),r.eye=new r("eye",{fontCharacter:"\\ea70"}),r.eyeUnwatch=new r("eye-unwatch",{fontCharacter:"\\ea70"}),r.eyeWatch=new r("eye-watch",{fontCharacter:"\\ea70"}),r.circleFilled=new r("circle-filled",{fontCharacter:"\\ea71"}),r.primitiveDot=new r("primitive-dot",{fontCharacter:"\\ea71"}),r.closeDirty=new r("close-dirty",{fontCharacter:"\\ea71"}),r.debugBreakpoint=new r("debug-breakpoint",{fontCharacter:"\\ea71"}),r.debugBreakpointDisabled=new r("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),r.debugHint=new r("debug-hint",{fontCharacter:"\\ea71"}),r.primitiveSquare=new r("primitive-square",{fontCharacter:"\\ea72"}),r.edit=new r("edit",{fontCharacter:"\\ea73"}),r.pencil=new r("pencil",{fontCharacter:"\\ea73"}),r.info=new r("info",{fontCharacter:"\\ea74"}),r.issueOpened=new r("issue-opened",{fontCharacter:"\\ea74"}),r.gistPrivate=new r("gist-private",{fontCharacter:"\\ea75"}),r.gitForkPrivate=new r("git-fork-private",{fontCharacter:"\\ea75"}),r.lock=new r("lock",{fontCharacter:"\\ea75"}),r.mirrorPrivate=new r("mirror-private",{fontCharacter:"\\ea75"}),r.close=new r("close",{fontCharacter:"\\ea76"}),r.removeClose=new r("remove-close",{fontCharacter:"\\ea76"}),r.x=new r("x",{fontCharacter:"\\ea76"}),r.repoSync=new r("repo-sync",{fontCharacter:"\\ea77"}),r.sync=new r("sync",{fontCharacter:"\\ea77"}),r.clone=new r("clone",{fontCharacter:"\\ea78"}),r.desktopDownload=new r("desktop-download",{fontCharacter:"\\ea78"}),r.beaker=new r("beaker",{fontCharacter:"\\ea79"}),r.microscope=new r("microscope",{fontCharacter:"\\ea79"}),r.vm=new r("vm",{fontCharacter:"\\ea7a"}),r.deviceDesktop=new r("device-desktop",{fontCharacter:"\\ea7a"}),r.file=new r("file",{fontCharacter:"\\ea7b"}),r.fileText=new r("file-text",{fontCharacter:"\\ea7b"}),r.more=new r("more",{fontCharacter:"\\ea7c"}),r.ellipsis=new r("ellipsis",{fontCharacter:"\\ea7c"}),r.kebabHorizontal=new r("kebab-horizontal",{fontCharacter:"\\ea7c"}),r.mailReply=new r("mail-reply",{fontCharacter:"\\ea7d"}),r.reply=new r("reply",{fontCharacter:"\\ea7d"}),r.organization=new r("organization",{fontCharacter:"\\ea7e"}),r.organizationFilled=new r("organization-filled",{fontCharacter:"\\ea7e"}),r.organizationOutline=new r("organization-outline",{fontCharacter:"\\ea7e"}),r.newFile=new r("new-file",{fontCharacter:"\\ea7f"}),r.fileAdd=new r("file-add",{fontCharacter:"\\ea7f"}),r.newFolder=new r("new-folder",{fontCharacter:"\\ea80"}),r.fileDirectoryCreate=new r("file-directory-create",{fontCharacter:"\\ea80"}),r.trash=new r("trash",{fontCharacter:"\\ea81"}),r.trashcan=new r("trashcan",{fontCharacter:"\\ea81"}),r.history=new r("history",{fontCharacter:"\\ea82"}),r.clock=new r("clock",{fontCharacter:"\\ea82"}),r.folder=new r("folder",{fontCharacter:"\\ea83"}),r.fileDirectory=new r("file-directory",{fontCharacter:"\\ea83"}),r.symbolFolder=new r("symbol-folder",{fontCharacter:"\\ea83"}),r.logoGithub=new r("logo-github",{fontCharacter:"\\ea84"}),r.markGithub=new r("mark-github",{fontCharacter:"\\ea84"}),r.github=new r("github",{fontCharacter:"\\ea84"}),r.terminal=new r("terminal",{fontCharacter:"\\ea85"}),r.console=new r("console",{fontCharacter:"\\ea85"}),r.repl=new r("repl",{fontCharacter:"\\ea85"}),r.zap=new r("zap",{fontCharacter:"\\ea86"}),r.symbolEvent=new r("symbol-event",{fontCharacter:"\\ea86"}),r.error=new r("error",{fontCharacter:"\\ea87"}),r.stop=new r("stop",{fontCharacter:"\\ea87"}),r.variable=new r("variable",{fontCharacter:"\\ea88"}),r.symbolVariable=new r("symbol-variable",{fontCharacter:"\\ea88"}),r.array=new r("array",{fontCharacter:"\\ea8a"}),r.symbolArray=new r("symbol-array",{fontCharacter:"\\ea8a"}),r.symbolModule=new r("symbol-module",{fontCharacter:"\\ea8b"}),r.symbolPackage=new r("symbol-package",{fontCharacter:"\\ea8b"}),r.symbolNamespace=new r("symbol-namespace",{fontCharacter:"\\ea8b"}),r.symbolObject=new r("symbol-object",{fontCharacter:"\\ea8b"}),r.symbolMethod=new r("symbol-method",{fontCharacter:"\\ea8c"}),r.symbolFunction=new r("symbol-function",{fontCharacter:"\\ea8c"}),r.symbolConstructor=new r("symbol-constructor",{fontCharacter:"\\ea8c"}),r.symbolBoolean=new r("symbol-boolean",{fontCharacter:"\\ea8f"}),r.symbolNull=new r("symbol-null",{fontCharacter:"\\ea8f"}),r.symbolNumeric=new r("symbol-numeric",{fontCharacter:"\\ea90"}),r.symbolNumber=new r("symbol-number",{fontCharacter:"\\ea90"}),r.symbolStructure=new r("symbol-structure",{fontCharacter:"\\ea91"}),r.symbolStruct=new r("symbol-struct",{fontCharacter:"\\ea91"}),r.symbolParameter=new r("symbol-parameter",{fontCharacter:"\\ea92"}),r.symbolTypeParameter=new r("symbol-type-parameter",{fontCharacter:"\\ea92"}),r.symbolKey=new r("symbol-key",{fontCharacter:"\\ea93"}),r.symbolText=new r("symbol-text",{fontCharacter:"\\ea93"}),r.symbolReference=new r("symbol-reference",{fontCharacter:"\\ea94"}),r.goToFile=new r("go-to-file",{fontCharacter:"\\ea94"}),r.symbolEnum=new r("symbol-enum",{fontCharacter:"\\ea95"}),r.symbolValue=new r("symbol-value",{fontCharacter:"\\ea95"}),r.symbolRuler=new r("symbol-ruler",{fontCharacter:"\\ea96"}),r.symbolUnit=new r("symbol-unit",{fontCharacter:"\\ea96"}),r.activateBreakpoints=new r("activate-breakpoints",{fontCharacter:"\\ea97"}),r.archive=new r("archive",{fontCharacter:"\\ea98"}),r.arrowBoth=new r("arrow-both",{fontCharacter:"\\ea99"}),r.arrowDown=new r("arrow-down",{fontCharacter:"\\ea9a"}),r.arrowLeft=new r("arrow-left",{fontCharacter:"\\ea9b"}),r.arrowRight=new r("arrow-right",{fontCharacter:"\\ea9c"}),r.arrowSmallDown=new r("arrow-small-down",{fontCharacter:"\\ea9d"}),r.arrowSmallLeft=new r("arrow-small-left",{fontCharacter:"\\ea9e"}),r.arrowSmallRight=new r("arrow-small-right",{fontCharacter:"\\ea9f"}),r.arrowSmallUp=new r("arrow-small-up",{fontCharacter:"\\eaa0"}),r.arrowUp=new r("arrow-up",{fontCharacter:"\\eaa1"}),r.bell=new r("bell",{fontCharacter:"\\eaa2"}),r.bold=new r("bold",{fontCharacter:"\\eaa3"}),r.book=new r("book",{fontCharacter:"\\eaa4"}),r.bookmark=new r("bookmark",{fontCharacter:"\\eaa5"}),r.debugBreakpointConditionalUnverified=new r("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),r.debugBreakpointConditional=new r("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),r.debugBreakpointConditionalDisabled=new r("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),r.debugBreakpointDataUnverified=new r("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),r.debugBreakpointData=new r("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),r.debugBreakpointDataDisabled=new r("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),r.debugBreakpointLogUnverified=new r("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),r.debugBreakpointLog=new r("debug-breakpoint-log",{fontCharacter:"\\eaab"}),r.debugBreakpointLogDisabled=new r("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),r.briefcase=new r("briefcase",{fontCharacter:"\\eaac"}),r.broadcast=new r("broadcast",{fontCharacter:"\\eaad"}),r.browser=new r("browser",{fontCharacter:"\\eaae"}),r.bug=new r("bug",{fontCharacter:"\\eaaf"}),r.calendar=new r("calendar",{fontCharacter:"\\eab0"}),r.caseSensitive=new r("case-sensitive",{fontCharacter:"\\eab1"}),r.check=new r("check",{fontCharacter:"\\eab2"}),r.checklist=new r("checklist",{fontCharacter:"\\eab3"}),r.chevronDown=new r("chevron-down",{fontCharacter:"\\eab4"}),r.dropDownButton=new r("drop-down-button",r.chevronDown.definition),r.chevronLeft=new r("chevron-left",{fontCharacter:"\\eab5"}),r.chevronRight=new r("chevron-right",{fontCharacter:"\\eab6"}),r.chevronUp=new r("chevron-up",{fontCharacter:"\\eab7"}),r.chromeClose=new r("chrome-close",{fontCharacter:"\\eab8"}),r.chromeMaximize=new r("chrome-maximize",{fontCharacter:"\\eab9"}),r.chromeMinimize=new r("chrome-minimize",{fontCharacter:"\\eaba"}),r.chromeRestore=new r("chrome-restore",{fontCharacter:"\\eabb"}),r.circleOutline=new r("circle-outline",{fontCharacter:"\\eabc"}),r.debugBreakpointUnverified=new r("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),r.circleSlash=new r("circle-slash",{fontCharacter:"\\eabd"}),r.circuitBoard=new r("circuit-board",{fontCharacter:"\\eabe"}),r.clearAll=new r("clear-all",{fontCharacter:"\\eabf"}),r.clippy=new r("clippy",{fontCharacter:"\\eac0"}),r.closeAll=new r("close-all",{fontCharacter:"\\eac1"}),r.cloudDownload=new r("cloud-download",{fontCharacter:"\\eac2"}),r.cloudUpload=new r("cloud-upload",{fontCharacter:"\\eac3"}),r.code=new r("code",{fontCharacter:"\\eac4"}),r.collapseAll=new r("collapse-all",{fontCharacter:"\\eac5"}),r.colorMode=new r("color-mode",{fontCharacter:"\\eac6"}),r.commentDiscussion=new r("comment-discussion",{fontCharacter:"\\eac7"}),r.compareChanges=new r("compare-changes",{fontCharacter:"\\eafd"}),r.creditCard=new r("credit-card",{fontCharacter:"\\eac9"}),r.dash=new r("dash",{fontCharacter:"\\eacc"}),r.dashboard=new r("dashboard",{fontCharacter:"\\eacd"}),r.database=new r("database",{fontCharacter:"\\eace"}),r.debugContinue=new r("debug-continue",{fontCharacter:"\\eacf"}),r.debugDisconnect=new r("debug-disconnect",{fontCharacter:"\\ead0"}),r.debugPause=new r("debug-pause",{fontCharacter:"\\ead1"}),r.debugRestart=new r("debug-restart",{fontCharacter:"\\ead2"}),r.debugStart=new r("debug-start",{fontCharacter:"\\ead3"}),r.debugStepInto=new r("debug-step-into",{fontCharacter:"\\ead4"}),r.debugStepOut=new r("debug-step-out",{fontCharacter:"\\ead5"}),r.debugStepOver=new r("debug-step-over",{fontCharacter:"\\ead6"}),r.debugStop=new r("debug-stop",{fontCharacter:"\\ead7"}),r.debug=new r("debug",{fontCharacter:"\\ead8"}),r.deviceCameraVideo=new r("device-camera-video",{fontCharacter:"\\ead9"}),r.deviceCamera=new r("device-camera",{fontCharacter:"\\eada"}),r.deviceMobile=new r("device-mobile",{fontCharacter:"\\eadb"}),r.diffAdded=new r("diff-added",{fontCharacter:"\\eadc"}),r.diffIgnored=new r("diff-ignored",{fontCharacter:"\\eadd"}),r.diffModified=new r("diff-modified",{fontCharacter:"\\eade"}),r.diffRemoved=new r("diff-removed",{fontCharacter:"\\eadf"}),r.diffRenamed=new r("diff-renamed",{fontCharacter:"\\eae0"}),r.diff=new r("diff",{fontCharacter:"\\eae1"}),r.discard=new r("discard",{fontCharacter:"\\eae2"}),r.editorLayout=new r("editor-layout",{fontCharacter:"\\eae3"}),r.emptyWindow=new r("empty-window",{fontCharacter:"\\eae4"}),r.exclude=new r("exclude",{fontCharacter:"\\eae5"}),r.extensions=new r("extensions",{fontCharacter:"\\eae6"}),r.eyeClosed=new r("eye-closed",{fontCharacter:"\\eae7"}),r.fileBinary=new r("file-binary",{fontCharacter:"\\eae8"}),r.fileCode=new r("file-code",{fontCharacter:"\\eae9"}),r.fileMedia=new r("file-media",{fontCharacter:"\\eaea"}),r.filePdf=new r("file-pdf",{fontCharacter:"\\eaeb"}),r.fileSubmodule=new r("file-submodule",{fontCharacter:"\\eaec"}),r.fileSymlinkDirectory=new r("file-symlink-directory",{fontCharacter:"\\eaed"}),r.fileSymlinkFile=new r("file-symlink-file",{fontCharacter:"\\eaee"}),r.fileZip=new r("file-zip",{fontCharacter:"\\eaef"}),r.files=new r("files",{fontCharacter:"\\eaf0"}),r.filter=new r("filter",{fontCharacter:"\\eaf1"}),r.flame=new r("flame",{fontCharacter:"\\eaf2"}),r.foldDown=new r("fold-down",{fontCharacter:"\\eaf3"}),r.foldUp=new r("fold-up",{fontCharacter:"\\eaf4"}),r.fold=new r("fold",{fontCharacter:"\\eaf5"}),r.folderActive=new r("folder-active",{fontCharacter:"\\eaf6"}),r.folderOpened=new r("folder-opened",{fontCharacter:"\\eaf7"}),r.gear=new r("gear",{fontCharacter:"\\eaf8"}),r.gift=new r("gift",{fontCharacter:"\\eaf9"}),r.gistSecret=new r("gist-secret",{fontCharacter:"\\eafa"}),r.gist=new r("gist",{fontCharacter:"\\eafb"}),r.gitCommit=new r("git-commit",{fontCharacter:"\\eafc"}),r.gitCompare=new r("git-compare",{fontCharacter:"\\eafd"}),r.gitMerge=new r("git-merge",{fontCharacter:"\\eafe"}),r.githubAction=new r("github-action",{fontCharacter:"\\eaff"}),r.githubAlt=new r("github-alt",{fontCharacter:"\\eb00"}),r.globe=new r("globe",{fontCharacter:"\\eb01"}),r.grabber=new r("grabber",{fontCharacter:"\\eb02"}),r.graph=new r("graph",{fontCharacter:"\\eb03"}),r.gripper=new r("gripper",{fontCharacter:"\\eb04"}),r.heart=new r("heart",{fontCharacter:"\\eb05"}),r.home=new r("home",{fontCharacter:"\\eb06"}),r.horizontalRule=new r("horizontal-rule",{fontCharacter:"\\eb07"}),r.hubot=new r("hubot",{fontCharacter:"\\eb08"}),r.inbox=new r("inbox",{fontCharacter:"\\eb09"}),r.issueClosed=new r("issue-closed",{fontCharacter:"\\eba4"}),r.issueReopened=new r("issue-reopened",{fontCharacter:"\\eb0b"}),r.issues=new r("issues",{fontCharacter:"\\eb0c"}),r.italic=new r("italic",{fontCharacter:"\\eb0d"}),r.jersey=new r("jersey",{fontCharacter:"\\eb0e"}),r.json=new r("json",{fontCharacter:"\\eb0f"}),r.kebabVertical=new r("kebab-vertical",{fontCharacter:"\\eb10"}),r.key=new r("key",{fontCharacter:"\\eb11"}),r.law=new r("law",{fontCharacter:"\\eb12"}),r.lightbulbAutofix=new r("lightbulb-autofix",{fontCharacter:"\\eb13"}),r.linkExternal=new r("link-external",{fontCharacter:"\\eb14"}),r.link=new r("link",{fontCharacter:"\\eb15"}),r.listOrdered=new r("list-ordered",{fontCharacter:"\\eb16"}),r.listUnordered=new r("list-unordered",{fontCharacter:"\\eb17"}),r.liveShare=new r("live-share",{fontCharacter:"\\eb18"}),r.loading=new r("loading",{fontCharacter:"\\eb19"}),r.location=new r("location",{fontCharacter:"\\eb1a"}),r.mailRead=new r("mail-read",{fontCharacter:"\\eb1b"}),r.mail=new r("mail",{fontCharacter:"\\eb1c"}),r.markdown=new r("markdown",{fontCharacter:"\\eb1d"}),r.megaphone=new r("megaphone",{fontCharacter:"\\eb1e"}),r.mention=new r("mention",{fontCharacter:"\\eb1f"}),r.milestone=new r("milestone",{fontCharacter:"\\eb20"}),r.mortarBoard=new r("mortar-board",{fontCharacter:"\\eb21"}),r.move=new r("move",{fontCharacter:"\\eb22"}),r.multipleWindows=new r("multiple-windows",{fontCharacter:"\\eb23"}),r.mute=new r("mute",{fontCharacter:"\\eb24"}),r.noNewline=new r("no-newline",{fontCharacter:"\\eb25"}),r.note=new r("note",{fontCharacter:"\\eb26"}),r.octoface=new r("octoface",{fontCharacter:"\\eb27"}),r.openPreview=new r("open-preview",{fontCharacter:"\\eb28"}),r.package_=new r("package",{fontCharacter:"\\eb29"}),r.paintcan=new r("paintcan",{fontCharacter:"\\eb2a"}),r.pin=new r("pin",{fontCharacter:"\\eb2b"}),r.play=new r("play",{fontCharacter:"\\eb2c"}),r.run=new r("run",{fontCharacter:"\\eb2c"}),r.plug=new r("plug",{fontCharacter:"\\eb2d"}),r.preserveCase=new r("preserve-case",{fontCharacter:"\\eb2e"}),r.preview=new r("preview",{fontCharacter:"\\eb2f"}),r.project=new r("project",{fontCharacter:"\\eb30"}),r.pulse=new r("pulse",{fontCharacter:"\\eb31"}),r.question=new r("question",{fontCharacter:"\\eb32"}),r.quote=new r("quote",{fontCharacter:"\\eb33"}),r.radioTower=new r("radio-tower",{fontCharacter:"\\eb34"}),r.reactions=new r("reactions",{fontCharacter:"\\eb35"}),r.references=new r("references",{fontCharacter:"\\eb36"}),r.refresh=new r("refresh",{fontCharacter:"\\eb37"}),r.regex=new r("regex",{fontCharacter:"\\eb38"}),r.remoteExplorer=new r("remote-explorer",{fontCharacter:"\\eb39"}),r.remote=new r("remote",{fontCharacter:"\\eb3a"}),r.remove=new r("remove",{fontCharacter:"\\eb3b"}),r.replaceAll=new r("replace-all",{fontCharacter:"\\eb3c"}),r.replace=new r("replace",{fontCharacter:"\\eb3d"}),r.repoClone=new r("repo-clone",{fontCharacter:"\\eb3e"}),r.repoForcePush=new r("repo-force-push",{fontCharacter:"\\eb3f"}),r.repoPull=new r("repo-pull",{fontCharacter:"\\eb40"}),r.repoPush=new r("repo-push",{fontCharacter:"\\eb41"}),r.report=new r("report",{fontCharacter:"\\eb42"}),r.requestChanges=new r("request-changes",{fontCharacter:"\\eb43"}),r.rocket=new r("rocket",{fontCharacter:"\\eb44"}),r.rootFolderOpened=new r("root-folder-opened",{fontCharacter:"\\eb45"}),r.rootFolder=new r("root-folder",{fontCharacter:"\\eb46"}),r.rss=new r("rss",{fontCharacter:"\\eb47"}),r.ruby=new r("ruby",{fontCharacter:"\\eb48"}),r.saveAll=new r("save-all",{fontCharacter:"\\eb49"}),r.saveAs=new r("save-as",{fontCharacter:"\\eb4a"}),r.save=new r("save",{fontCharacter:"\\eb4b"}),r.screenFull=new r("screen-full",{fontCharacter:"\\eb4c"}),r.screenNormal=new r("screen-normal",{fontCharacter:"\\eb4d"}),r.searchStop=new r("search-stop",{fontCharacter:"\\eb4e"}),r.server=new r("server",{fontCharacter:"\\eb50"}),r.settingsGear=new r("settings-gear",{fontCharacter:"\\eb51"}),r.settings=new r("settings",{fontCharacter:"\\eb52"}),r.shield=new r("shield",{fontCharacter:"\\eb53"}),r.smiley=new r("smiley",{fontCharacter:"\\eb54"}),r.sortPrecedence=new r("sort-precedence",{fontCharacter:"\\eb55"}),r.splitHorizontal=new r("split-horizontal",{fontCharacter:"\\eb56"}),r.splitVertical=new r("split-vertical",{fontCharacter:"\\eb57"}),r.squirrel=new r("squirrel",{fontCharacter:"\\eb58"}),r.starFull=new r("star-full",{fontCharacter:"\\eb59"}),r.starHalf=new r("star-half",{fontCharacter:"\\eb5a"}),r.symbolClass=new r("symbol-class",{fontCharacter:"\\eb5b"}),r.symbolColor=new r("symbol-color",{fontCharacter:"\\eb5c"}),r.symbolConstant=new r("symbol-constant",{fontCharacter:"\\eb5d"}),r.symbolEnumMember=new r("symbol-enum-member",{fontCharacter:"\\eb5e"}),r.symbolField=new r("symbol-field",{fontCharacter:"\\eb5f"}),r.symbolFile=new r("symbol-file",{fontCharacter:"\\eb60"}),r.symbolInterface=new r("symbol-interface",{fontCharacter:"\\eb61"}),r.symbolKeyword=new r("symbol-keyword",{fontCharacter:"\\eb62"}),r.symbolMisc=new r("symbol-misc",{fontCharacter:"\\eb63"}),r.symbolOperator=new r("symbol-operator",{fontCharacter:"\\eb64"}),r.symbolProperty=new r("symbol-property",{fontCharacter:"\\eb65"}),r.wrench=new r("wrench",{fontCharacter:"\\eb65"}),r.wrenchSubaction=new r("wrench-subaction",{fontCharacter:"\\eb65"}),r.symbolSnippet=new r("symbol-snippet",{fontCharacter:"\\eb66"}),r.tasklist=new r("tasklist",{fontCharacter:"\\eb67"}),r.telescope=new r("telescope",{fontCharacter:"\\eb68"}),r.textSize=new r("text-size",{fontCharacter:"\\eb69"}),r.threeBars=new r("three-bars",{fontCharacter:"\\eb6a"}),r.thumbsdown=new r("thumbsdown",{fontCharacter:"\\eb6b"}),r.thumbsup=new r("thumbsup",{fontCharacter:"\\eb6c"}),r.tools=new r("tools",{fontCharacter:"\\eb6d"}),r.triangleDown=new r("triangle-down",{fontCharacter:"\\eb6e"}),r.triangleLeft=new r("triangle-left",{fontCharacter:"\\eb6f"}),r.triangleRight=new r("triangle-right",{fontCharacter:"\\eb70"}),r.triangleUp=new r("triangle-up",{fontCharacter:"\\eb71"}),r.twitter=new r("twitter",{fontCharacter:"\\eb72"}),r.unfold=new r("unfold",{fontCharacter:"\\eb73"}),r.unlock=new r("unlock",{fontCharacter:"\\eb74"}),r.unmute=new r("unmute",{fontCharacter:"\\eb75"}),r.unverified=new r("unverified",{fontCharacter:"\\eb76"}),r.verified=new r("verified",{fontCharacter:"\\eb77"}),r.versions=new r("versions",{fontCharacter:"\\eb78"}),r.vmActive=new r("vm-active",{fontCharacter:"\\eb79"}),r.vmOutline=new r("vm-outline",{fontCharacter:"\\eb7a"}),r.vmRunning=new r("vm-running",{fontCharacter:"\\eb7b"}),r.watch=new r("watch",{fontCharacter:"\\eb7c"}),r.whitespace=new r("whitespace",{fontCharacter:"\\eb7d"}),r.wholeWord=new r("whole-word",{fontCharacter:"\\eb7e"}),r.window=new r("window",{fontCharacter:"\\eb7f"}),r.wordWrap=new r("word-wrap",{fontCharacter:"\\eb80"}),r.zoomIn=new r("zoom-in",{fontCharacter:"\\eb81"}),r.zoomOut=new r("zoom-out",{fontCharacter:"\\eb82"}),r.listFilter=new r("list-filter",{fontCharacter:"\\eb83"}),r.listFlat=new r("list-flat",{fontCharacter:"\\eb84"}),r.listSelection=new r("list-selection",{fontCharacter:"\\eb85"}),r.selection=new r("selection",{fontCharacter:"\\eb85"}),r.listTree=new r("list-tree",{fontCharacter:"\\eb86"}),r.debugBreakpointFunctionUnverified=new r("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),r.debugBreakpointFunction=new r("debug-breakpoint-function",{fontCharacter:"\\eb88"}),r.debugBreakpointFunctionDisabled=new r("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),r.debugStackframeActive=new r("debug-stackframe-active",{fontCharacter:"\\eb89"}),r.debugStackframeDot=new r("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),r.debugStackframe=new r("debug-stackframe",{fontCharacter:"\\eb8b"}),r.debugStackframeFocused=new r("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),r.debugBreakpointUnsupported=new r("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),r.symbolString=new r("symbol-string",{fontCharacter:"\\eb8d"}),r.debugReverseContinue=new r("debug-reverse-continue",{fontCharacter:"\\eb8e"}),r.debugStepBack=new r("debug-step-back",{fontCharacter:"\\eb8f"}),r.debugRestartFrame=new r("debug-restart-frame",{fontCharacter:"\\eb90"}),r.callIncoming=new r("call-incoming",{fontCharacter:"\\eb92"}),r.callOutgoing=new r("call-outgoing",{fontCharacter:"\\eb93"}),r.menu=new r("menu",{fontCharacter:"\\eb94"}),r.expandAll=new r("expand-all",{fontCharacter:"\\eb95"}),r.feedback=new r("feedback",{fontCharacter:"\\eb96"}),r.groupByRefType=new r("group-by-ref-type",{fontCharacter:"\\eb97"}),r.ungroupByRefType=new r("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),r.account=new r("account",{fontCharacter:"\\eb99"}),r.bellDot=new r("bell-dot",{fontCharacter:"\\eb9a"}),r.debugConsole=new r("debug-console",{fontCharacter:"\\eb9b"}),r.library=new r("library",{fontCharacter:"\\eb9c"}),r.output=new r("output",{fontCharacter:"\\eb9d"}),r.runAll=new r("run-all",{fontCharacter:"\\eb9e"}),r.syncIgnored=new r("sync-ignored",{fontCharacter:"\\eb9f"}),r.pinned=new r("pinned",{fontCharacter:"\\eba0"}),r.githubInverted=new r("github-inverted",{fontCharacter:"\\eba1"}),r.debugAlt=new r("debug-alt",{fontCharacter:"\\eb91"}),r.serverProcess=new r("server-process",{fontCharacter:"\\eba2"}),r.serverEnvironment=new r("server-environment",{fontCharacter:"\\eba3"}),r.pass=new r("pass",{fontCharacter:"\\eba4"}),r.stopCircle=new r("stop-circle",{fontCharacter:"\\eba5"}),r.playCircle=new r("play-circle",{fontCharacter:"\\eba6"}),r.record=new r("record",{fontCharacter:"\\eba7"}),r.debugAltSmall=new r("debug-alt-small",{fontCharacter:"\\eba8"}),r.vmConnect=new r("vm-connect",{fontCharacter:"\\eba9"}),r.cloud=new r("cloud",{fontCharacter:"\\ebaa"}),r.merge=new r("merge",{fontCharacter:"\\ebab"}),r.exportIcon=new r("export",{fontCharacter:"\\ebac"}),r.graphLeft=new r("graph-left",{fontCharacter:"\\ebad"}),r.magnet=new r("magnet",{fontCharacter:"\\ebae"}),r.notebook=new r("notebook",{fontCharacter:"\\ebaf"}),r.redo=new r("redo",{fontCharacter:"\\ebb0"}),r.checkAll=new r("check-all",{fontCharacter:"\\ebb1"}),r.pinnedDirty=new r("pinned-dirty",{fontCharacter:"\\ebb2"}),r.passFilled=new r("pass-filled",{fontCharacter:"\\ebb3"}),r.circleLargeFilled=new r("circle-large-filled",{fontCharacter:"\\ebb4"}),r.circleLargeOutline=new r("circle-large-outline",{fontCharacter:"\\ebb5"}),r.combine=new r("combine",{fontCharacter:"\\ebb6"}),r.gather=new r("gather",{fontCharacter:"\\ebb6"}),r.table=new r("table",{fontCharacter:"\\ebb7"}),r.variableGroup=new r("variable-group",{fontCharacter:"\\ebb8"}),r.typeHierarchy=new r("type-hierarchy",{fontCharacter:"\\ebb9"}),r.typeHierarchySub=new r("type-hierarchy-sub",{fontCharacter:"\\ebba"}),r.typeHierarchySuper=new r("type-hierarchy-super",{fontCharacter:"\\ebbb"}),r.gitPullRequestCreate=new r("git-pull-request-create",{fontCharacter:"\\ebbc"}),r.runAbove=new r("run-above",{fontCharacter:"\\ebbd"}),r.runBelow=new r("run-below",{fontCharacter:"\\ebbe"}),r.notebookTemplate=new r("notebook-template",{fontCharacter:"\\ebbf"}),r.debugRerun=new r("debug-rerun",{fontCharacter:"\\ebc0"}),r.workspaceTrusted=new r("workspace-trusted",{fontCharacter:"\\ebc1"}),r.workspaceUntrusted=new r("workspace-untrusted",{fontCharacter:"\\ebc2"}),r.workspaceUnspecified=new r("workspace-unspecified",{fontCharacter:"\\ebc3"}),r.terminalCmd=new r("terminal-cmd",{fontCharacter:"\\ebc4"}),r.terminalDebian=new r("terminal-debian",{fontCharacter:"\\ebc5"}),r.terminalLinux=new r("terminal-linux",{fontCharacter:"\\ebc6"}),r.terminalPowershell=new r("terminal-powershell",{fontCharacter:"\\ebc7"}),r.terminalTmux=new r("terminal-tmux",{fontCharacter:"\\ebc8"}),r.terminalUbuntu=new r("terminal-ubuntu",{fontCharacter:"\\ebc9"}),r.terminalBash=new r("terminal-bash",{fontCharacter:"\\ebca"}),r.arrowSwap=new r("arrow-swap",{fontCharacter:"\\ebcb"}),r.copy=new r("copy",{fontCharacter:"\\ebcc"}),r.personAdd=new r("person-add",{fontCharacter:"\\ebcd"}),r.filterFilled=new r("filter-filled",{fontCharacter:"\\ebce"}),r.wand=new r("wand",{fontCharacter:"\\ebcf"}),r.debugLineByLine=new r("debug-line-by-line",{fontCharacter:"\\ebd0"}),r.inspect=new r("inspect",{fontCharacter:"\\ebd1"}),r.layers=new r("layers",{fontCharacter:"\\ebd2"}),r.layersDot=new r("layers-dot",{fontCharacter:"\\ebd3"}),r.layersActive=new r("layers-active",{fontCharacter:"\\ebd4"}),r.compass=new r("compass",{fontCharacter:"\\ebd5"}),r.compassDot=new r("compass-dot",{fontCharacter:"\\ebd6"}),r.compassActive=new r("compass-active",{fontCharacter:"\\ebd7"}),r.azure=new r("azure",{fontCharacter:"\\ebd8"}),r.issueDraft=new r("issue-draft",{fontCharacter:"\\ebd9"}),r.gitPullRequestClosed=new r("git-pull-request-closed",{fontCharacter:"\\ebda"}),r.gitPullRequestDraft=new r("git-pull-request-draft",{fontCharacter:"\\ebdb"}),r.debugAll=new r("debug-all",{fontCharacter:"\\ebdc"}),r.debugCoverage=new r("debug-coverage",{fontCharacter:"\\ebdd"}),r.runErrors=new r("run-errors",{fontCharacter:"\\ebde"}),r.folderLibrary=new r("folder-library",{fontCharacter:"\\ebdf"}),r.debugContinueSmall=new r("debug-continue-small",{fontCharacter:"\\ebe0"}),r.beakerStop=new r("beaker-stop",{fontCharacter:"\\ebe1"}),r.graphLine=new r("graph-line",{fontCharacter:"\\ebe2"}),r.graphScatter=new r("graph-scatter",{fontCharacter:"\\ebe3"}),r.pieChart=new r("pie-chart",{fontCharacter:"\\ebe4"}),r.bracket=new r("bracket",r.json.definition),r.bracketDot=new r("bracket-dot",{fontCharacter:"\\ebe5"}),r.bracketError=new r("bracket-error",{fontCharacter:"\\ebe6"}),r.lockSmall=new r("lock-small",{fontCharacter:"\\ebe7"}),r.azureDevops=new r("azure-devops",{fontCharacter:"\\ebe8"}),r.verifiedFilled=new r("verified-filled",{fontCharacter:"\\ebe9"})}(K||(K={}))},"VrN/":function(rt,be,Z){(function(ie,J){rt.exports=J()})(this,function(){"use strict";var ie=navigator.userAgent,J=navigator.platform,P=/gecko\/\d/i.test(ie),X=/MSIE \d/.test(ie),j=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),U=/Edge\/(\d+)/.exec(ie),K=X||j||U,G=K&&(X?document.documentMode||6:+(U||j)[1]),r=!U&&/WebKit\//.test(ie),L=r&&/Qt\/\d+\.\d+/.test(ie),v=!U&&/Chrome\//.test(ie),m=/Opera\//.test(ie),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),u=/PhantomJS/.test(ie),f=!U&&/AppleWebKit/.test(ie)&&/Mobile\/\w+/.test(ie),l=/Android/.test(ie),o=f||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),s=f||/Mac/.test(J),a=/\bCrOS\b/.test(ie),O=/win/i.test(J),E=m&&ie.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(m=!1,r=!0);var w=s&&(L||m&&(E==null||E<12.11)),D=P||K&&G>=9;function R(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var A=function(e,t){var i=e.className,n=R(t).exec(i);if(n){var c=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(c?n[1]+c:"")}};function C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return C(e).appendChild(t)}function d(e,t,i,n){var c=document.createElement(e);if(i&&(c.className=i),n&&(c.style.cssText=n),typeof t=="string")c.appendChild(document.createTextNode(t));else if(t)for(var N=0;N=t)return z+(t-N);z+=Q-N,z+=i-z%i,N=Q+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return n+Math.min(z,t-c);if(c+=N-n,c+=i-c%i,n=N+1,c>=t)return n}}var ce=[""];function he(e){for(;ce.length<=e;)ce.push(re(ce)+" ");return ce[e]}function re(e){return e[e.length-1]}function fe(e,t){for(var i=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ce.test(e))}function Be(e,t){return t?t.source.indexOf("\\w")>-1&&Ne(e)?!0:t.test(e):Ne(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ve=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Se(e){return e.charCodeAt(0)>=768&&ve.test(e)}function Ie(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var c=(t+i)/2,N=n<0?Math.ceil(c):Math.floor(c);if(N==t)return e(N)?t:i;e(N)?i=N:t=N+n}}function Ve(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var c=!1,N=0;Nt||t==i&&z.to==t)&&(n(Math.max(z.from,t),Math.min(z.to,i),z.level==1?"rtl":"ltr",N),c=!0)}c||n(t,i,"ltr")}var Qe=null;function Je(e,t,i){var n;Qe=null;for(var c=0;ct)return c;N.to==t&&(N.from!=N.to&&i=="before"?n=c:Qe=c),N.from==t&&(N.from!=N.to&&i!="before"?n=c:Qe=c)}return n!=null?n:Qe}var st=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(te){return te<=247?e.charAt(te):1424<=te&&te<=1524?"R":1536<=te&&te<=1785?t.charAt(te-1536):1774<=te&&te<=2220?"r":8192<=te&&te<=8203?"w":te==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,c=/[stwN]/,N=/[LRr]/,z=/[Lb1n]/,Q=/[1n]/;function q(te,pe,ye){this.level=te,this.from=pe,this.to=ye}return function(te,pe){var ye=pe=="ltr"?"L":"R";if(te.length==0||pe=="ltr"&&!n.test(te))return!1;for(var Me=te.length,ke=[],Ke=0;Ke-1&&(n[t]=c.slice(0,N).concat(c.slice(N+1)))}}}function je(e,t){var i=dt(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),c=0;c0}function we(e){e.prototype.on=function(t,i){Ue(this,t,i)},e.prototype.off=function(t,i){lt(this,t,i)}}function ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ue(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function de(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function me(e){ae(e),ue(e)}function xe(e){return e.target||e.srcElement}function Pe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var He=function(){if(K&&G<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),ze;function ht(e){if(ze==null){var t=d("span","\u200B");T(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ze=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&G<8))}var i=ze?d("span","\u200B"):d("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var ot;function yt(e){if(ot!=null)return ot;var t=T(e,document.createTextNode("A\u062EA")),i=y(t,0,1).getBoundingClientRect(),n=y(t,1,2).getBoundingClientRect();return C(e),!i||i.left==i.right?!1:ot=n.right-i.right<3}var ct=` -b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var d=e.indexOf(` -`,t);d==-1&&(d=e.length);var N=e.slice(t,e.charAt(d-1)=="\r"?d-1:d),z=N.indexOf("\r");z!=-1?(i.push(N.slice(0,z)),t+=z+1):(i.push(N),t=d+1)}return i}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ot=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),It=null;function qt(e){if(It!=null)return It;var t=T(e,c("span","x")),i=t.getBoundingClientRect(),n=y(t,0,1).getBoundingClientRect();return It=Math.abs(i.left-n.left)>1}var Zt={},Dt={};function Cr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=t}function Kr(e,t){Dt[e]=t}function _t(e){if(typeof e=="string"&&Dt.hasOwnProperty(e))e=Dt[e];else if(e&&typeof e.name=="string"&&Dt.hasOwnProperty(e.name)){var t=Dt[e.name];typeof t=="string"&&(t={name:t}),e=Fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _t("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _t("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Lr(e,t){t=_t(t);var i=Zt[t.name];if(!i)return Lr(e,"text/plain");var n=i(e,t);if(Et.hasOwnProperty(t.name)){var d=Et[t.name];for(var N in d){if(!d.hasOwnProperty(N))continue;n.hasOwnProperty(N)&&(n["_"+N]=n[N]),n[N]=d[N]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var z in t.modeProps)n[z]=t.modeProps[z];return n}var Et={};function wt(e,t){var i=Et.hasOwnProperty(e)?Et[e]:Et[e]={};g(t,i)}function Ut(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var d=t[n];d instanceof Array&&(d=d.concat([])),i[n]=d}return i}function tr(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function dr(e,t,i){return e.startState?e.startState(t,i):!0}var Nt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};Nt.prototype.eol=function(){return this.pos>=this.string.length},Nt.prototype.sol=function(){return this.pos==this.lineStart},Nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nt.prototype.next=function(){if(this.post},Nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Nt.prototype.skipToEnd=function(){this.pos=this.string.length},Nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Nt.prototype.backUp=function(e){this.pos-=e},Nt.prototype.column=function(){return this.lastColumnPos0?null:(N&&t!==!1&&(this.pos+=N[0].length),N)}},Nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var d=i.children[n],N=d.chunkSize();if(t=e.first&&ti?Ze(i,mt(e,i).text.length):k(t,mt(e,t.line).text.length)}function k(e,t){var i=e.ch;return i==null||i>t?Ze(e.line,t):i<0?Ze(e.line,0):e}function W(e,t){for(var i=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},V.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},V.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},V.fromSaved=function(e,t,i){return t instanceof ee?new V(e,Ut(e.mode,t.state),i,t.lookAhead):new V(e,Ut(e.mode,t),i)},V.prototype.save=function(e){var t=e!==!1?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ee(t,this.maxLookAhead):t};function Ee(e,t,i,n){var d=[e.state.modeGen],N={};Er(e,t.text,e.doc.mode,i,function(te,pe){return d.push(te,pe)},N,n);for(var z=i.state,Q=function(te){i.baseTokens=d;var pe=e.state.overlays[te],ye=1,Me=0;i.state=!0,Er(e,t.text,pe.mode,i,function(ke,Ke){for(var $e=ye;Meke&&d.splice(ye,1,ke,d[ye+1],et),ye+=2,Me=Math.min(ke,et)}if(!Ke)return;if(pe.opaque)d.splice($e,ye-$e,ke,"overlay "+Ke),ye=$e+2;else for(;$ee.options.maxHighlightLength&&Ut(e.doc.mode,n.state),N=Ee(e,t,n);d&&(n.state=d),t.stateAfter=n.save(!d),t.styles=N.styles,N.classes?t.styleClasses=N.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function tt(e,t,i){var n=e.doc,d=e.display;if(!n.mode.startState)return new V(n,!0,t);var N=xr(e,t,i),z=N>n.first&&mt(n,N-1).stateAfter,Q=z?V.fromSaved(n,z,N):new V(n,dr(n.mode),N);return n.iter(N,t,function(q){gt(e,q.text,Q);var te=Q.line;q.stateAfter=te==t-1||te%5==0||te>=d.viewFrom&&tet.start)return N}throw new Error("Mode "+e.name+" failed to advance stream.")}var jt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function $t(e,t,i,n){var d=e.doc,N=d.mode,z;t=x(d,t);var Q=mt(d,t.line),q=tt(e,t.line,i),te=new Nt(Q.text,e.options.tabSize,q),pe;for(n&&(pe=[]);(n||te.pose.options.maxHighlightLength?(Q=!1,z&>(e,t,n,pe.pos),pe.pos=t.length,ye=null):ye=jr(xt(i,pe,n.state,Me),N),Me){var ke=Me[0].name;ke&&(ye="m-"+(ye?ke+" "+ye:ke))}if(!Q||te!=ye){for(;qz;--Q){if(Q<=N.first)return N.first;var q=mt(N,Q-1),te=q.stateAfter;if(te&&(!i||Q+(te instanceof ee?te.lookAhead:0)<=N.modeFrontier))return Q;var pe=H(q.text,null,e.options.tabSize);(d==null||n>pe)&&(d=Q-1,n=pe)}return d}function Zr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontieri;n--){var d=mt(e,n).stateAfter;if(d&&(!(d instanceof ee)||n+d.lookAhead=t:N.to>t);(n||(n=[])).push(new hn(z,N.from,q?null:N.to))}}return n}function Vn(e,t,i){var n;if(e)for(var d=0;d=t:N.to>t);if(Q||N.from==t&&z.type=="bookmark"&&(!i||N.marker.insertLeft)){var q=N.from==null||(z.inclusiveLeft?N.from<=t:N.from0&&Q)for(var pt=0;pt0)continue;var pe=[q,1],ye=Ct(te.from,Q.from),Me=Ct(te.to,Q.to);(ye<0||!z.inclusiveLeft&&!ye)&&pe.push({from:te.from,to:Q.from}),(Me>0||!z.inclusiveRight&&!Me)&&pe.push({from:Q.to,to:te.to}),d.splice.apply(d,pe),q+=pe.length-3}return d}function di(e){var t=e.markedSpans;if(!t)return;for(var i=0;it)&&(!n||yr(n,N.marker)<0)&&(n=N.marker)}return n}function fr(e,t,i,n,d){var N=mt(e,t),z=cr&&N.markedSpans;if(z)for(var Q=0;Q=0&&ye<=0||pe<=0&&ye>=0)continue;if(pe<=0&&(q.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.to,i)>=0:Ct(te.to,i)>0)||pe>=0&&(q.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.from,n)<=0:Ct(te.from,n)<0))return!0}}function Ar(e){for(var t;t=ar(e);)e=t.find(-1,!0).line;return e}function Yn(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function xn(e){for(var t,i;t=Kt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function ci(e,t){var i=mt(e,t),n=Ar(i);return i==n?t:Rt(n)}function Tn(e,t){if(t>e.lastLine())return t;var i=mt(e,t),n;if(!an(e,i))return t;for(;n=Kt(i);)i=n.find(1,!0).line;return Rt(i)+1}function an(e,t){var i=cr&&t.markedSpans;if(i)for(var n=void 0,d=0;dt.maxLineLength&&(t.maxLineLength=d,t.maxLine=n)})}var Mn=function(e,t,i){this.text=e,En(this,t),this.height=i?i(this):1};Mn.prototype.lineNo=function(){return Rt(this)},we(Mn);function ua(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),di(e),En(e,i);var d=n?n(e):1;d!=e.height&&Jt(e,d)}function vt(e){e.parent=null,di(e)}var At={},Tt={};function kt(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Tt:At;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Bt(e,t){var i=S("span",null,null,r?"padding-right: .1px":null),n={pre:S("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var d=0;d<=(t.rest?t.rest.length:0);d++){var N=d?t.rest[d-1]:t.line,z=void 0;n.pos=0,n.addToken=Ft,yt(e.display.measure)&&(z=qe(N,e.doc.direction))&&(n.addToken=Dr(n.addToken,z)),n.map=[];var Q=t!=e.display.externalMeasured&&Rt(N);dn(N,n,Ye(e,N,Q)),N.styleClasses&&(N.styleClasses.bgClass&&(n.bgClass=_(N.styleClasses.bgClass,n.bgClass||"")),N.styleClasses.textClass&&(n.textClass=_(N.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ht(e.display.measure))),d==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(r){var q=n.content.lastChild;(/\bcm-tab\b/.test(q.className)||q.querySelector&&q.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return je(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=_(n.pre.className,n.textClass||"")),n}function Yt(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ft(e,t,i,n,d,N,z){if(!t)return;var Q=e.splitSpaces?ur(t,e.trailingSpace):t,q=e.cm.state.specialChars,te=!1,pe;if(!q.test(t))e.col+=t.length,pe=document.createTextNode(Q),e.map.push(e.pos,e.pos+t.length,pe),K&&G<9&&(te=!0),e.pos+=t.length;else{pe=document.createDocumentFragment();for(var ye=0;;){q.lastIndex=ye;var Me=q.exec(t),ke=Me?Me.index-ye:t.length-ye;if(ke){var Ke=document.createTextNode(Q.slice(ye,ye+ke));K&&G<9?pe.appendChild(c("span",[Ke])):pe.appendChild(Ke),e.map.push(e.pos,e.pos+ke,Ke),e.col+=ke,e.pos+=ke}if(!Me)break;ye+=ke+1;var $e=void 0;if(Me[0]==" "){var et=e.cm.options.tabSize,nt=et-e.col%et;$e=pe.appendChild(c("span",he(nt),"cm-tab")),$e.setAttribute("role","presentation"),$e.setAttribute("cm-text"," "),e.col+=nt}else Me[0]=="\r"||Me[0]==` -`?($e=pe.appendChild(c("span",Me[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$e.setAttribute("cm-text",Me[0]),e.col+=1):($e=e.cm.options.specialCharPlaceholder(Me[0]),$e.setAttribute("cm-text",Me[0]),K&&G<9?pe.appendChild(c("span",[$e])):pe.appendChild($e),e.col+=1);e.map.push(e.pos,e.pos+1,$e),e.pos++}}if(e.trailingSpace=Q.charCodeAt(t.length-1)==32,i||n||d||te||N||z){var ut=i||"";n&&(ut+=n),d&&(ut+=d);var it=c("span",[pe],ut,N);if(z)for(var pt in z)z.hasOwnProperty(pt)&&pt!="style"&&pt!="class"&&it.setAttribute(pt,z[pt]);return e.content.appendChild(it)}e.content.appendChild(pe)}function ur(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",d=0;dte&&ye.from<=te);Me++);if(ye.to>=pe)return e(i,n,d,N,z,Q,q);e(i,n.slice(0,ye.to-te),d,N,null,Q,q),N=null,n=n.slice(ye.to-te),te=ye.to}}}function Pt(e,t,i,n){var d=!n&&i.widgetNode;d&&e.map.push(e.pos,e.pos+t,d),!n&&e.cm.display.input.needsContentAttribute&&(d||(d=e.content.appendChild(document.createElement("span"))),d.setAttribute("cm-marker",i.id)),d&&(e.cm.display.input.setUneditable(d),e.content.appendChild(d)),e.pos+=t,e.trailingSpace=!1}function dn(e,t,i){var n=e.markedSpans,d=e.text,N=0;if(!n){for(var z=1;zq||Lt.collapsed&&bt.to==q&&bt.from==q)){if(bt.to!=null&&bt.to!=q&&ke>bt.to&&(ke=bt.to,$e=""),Lt.className&&(Ke+=" "+Lt.className),Lt.css&&(Me=(Me?Me+";":"")+Lt.css),Lt.startStyle&&bt.from==q&&(et+=" "+Lt.startStyle),Lt.endStyle&&bt.to==ke&&(pt||(pt=[])).push(Lt.endStyle,bt.to),Lt.title&&((ut||(ut={})).title=Lt.title),Lt.attributes)for(var Xt in Lt.attributes)(ut||(ut={}))[Xt]=Lt.attributes[Xt];Lt.collapsed&&(!nt||yr(nt.marker,Lt)<0)&&(nt=bt)}else bt.from>q&&ke>bt.from&&(ke=bt.from)}if(pt)for(var gr=0;gr=Q)break;for(var Gr=Math.min(Q,ke);;){if(pe){var Nr=q+pe.length;if(!nt){var sr=Nr>Gr?pe.slice(0,Gr-q):pe;t.addToken(t,sr,ye?ye+Ke:Ke,et,q+sr.length==ke?$e:"",Me,ut)}if(Nr>=Gr){pe=pe.slice(Gr-q),q=Gr;break}q=Nr,et=""}pe=d.slice(N,N=i[te++]),ye=kt(i[te++],t.cm.options)}}}function Wt(e,t,i){this.line=t,this.rest=xn(t),this.size=this.rest?Rt(re(this.rest))-i+1:1,this.node=this.text=null,this.hidden=an(e,t)}function kr(e,t,i){for(var n=[],d,N=t;N2&&N.push((q.bottom+te.top)/2-i.top)}}N.push(i.bottom-i.top)}}function es(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;ni)return{map:e.measure.maps[d],cache:e.measure.caches[d],before:!0}}function Bo(e,t){t=Ar(t);var i=Rt(t),n=e.display.externalMeasured=new Wt(e.doc,t,i);n.lineN=i;var d=n.built=Bt(e,n);return n.text=d.pre,T(e.display.lineMeasure,d.pre),n}function ts(e,t,i,n){return on(e,Xn(e,t),i,n)}function fa(e,t){if(t>=e.display.viewFrom&&t=i.lineN&&tt)&&(N=q-Q,d=N-1,t>=q&&(z="right")),d!=null){if(n=e[te+2],Q==q&&i==(n.insertLeft?"left":"right")&&(z=i),i=="left"&&d==0)for(;te&&e[te-2]==e[te-3]&&e[te-1].insertLeft;)n=e[(te-=3)+2],z="left";if(i=="right"&&d==q-Q)for(;te=0&&!((i=e[d]).left!=i.right);d--);return i}function Ho(e,t,i,n){var d=ns(t.map,i,n),N=d.node,z=d.start,Q=d.end,q=d.collapse,te;if(N.nodeType==3){for(var pe=0;pe<4;pe++){for(;z&&Se(t.line.text.charAt(d.coverStart+z));)--z;for(;d.coverStart+Q0&&(q=n="right");var ye;e.options.lineWrapping&&(ye=N.getClientRects()).length>1?te=ye[n=="right"?ye.length-1:0]:te=N.getBoundingClientRect()}if(K&&G<9&&!z&&(!te||!te.left&&!te.right)){var Me=N.parentNode.getClientRects()[0];Me?te={left:Me.left,right:Me.left+Jn(e.display),top:Me.top,bottom:Me.bottom}:te=rs}for(var ke=te.top-t.rect.top,Ke=te.bottom-t.rect.top,$e=(ke+Ke)/2,et=t.view.measure.heights,nt=0;nt=n.text.length?(q=n.text.length,te="before"):q<=0&&(q=0,te="after"),!Q)return z(te=="before"?q-1:q,te=="before");function pe(Ke,$e,et){var nt=Q[$e],ut=nt.level==1;return z(et?Ke-1:Ke,ut!=et)}var ye=Je(Q,q,te),Me=Qe,ke=pe(q,ye,te=="before");return Me!=null&&(ke.other=pe(q,Me,te!="before")),ke}function us(e,t){var i=0;t=x(e.doc,t),e.options.lineWrapping||(i=Jn(e.display)*t.ch);var n=mt(e.doc,t.line),d=qr(n)+Hi(e.display);return{left:i,right:i,top:d,bottom:d+n.height}}function ga(e,t,i,n,d){var N=Ze(e,t,i);return N.xRel=d,n&&(N.outside=n),N}function va(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return ga(n.first,0,null,-1,-1);var d=lr(n,i),N=n.first+n.size-1;if(d>N)return ga(n.first+n.size-1,mt(n,N).text.length,null,1,1);t<0&&(t=0);for(var z=mt(n,d);;){var Q=Go(e,z,d,t,i),q=nn(z,Q.ch+(Q.xRel>0||Q.outside>0?1:0));if(!q)return Q;var te=q.find(1);if(te.line==d)return te;z=mt(n,d=te.line)}}function hs(e,t,i,n){n-=pa(t);var d=t.text.length,N=We(function(z){return on(e,i,z-1).bottom<=n},d,0);return d=We(function(z){return on(e,i,z).top>n},N,d),{begin:N,end:d}}function ds(e,t,i,n){i||(i=Xn(e,t));var d=Wi(e,t,on(e,i,n),"line").top;return hs(e,t,i,d)}function ya(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Go(e,t,i,n,d){d-=qr(t);var N=Xn(e,t),z=pa(t),Q=0,q=t.text.length,te=!0,pe=qe(t,e.doc.direction);if(pe){var ye=(e.options.lineWrapping?zo:Ko)(e,t,i,N,pe,n,d);te=ye.level!=1,Q=te?ye.from:ye.to-1,q=te?ye.to:ye.from-1}var Me=null,ke=null,Ke=We(function(St){var bt=on(e,N,St);return bt.top+=z,bt.bottom+=z,ya(bt,n,d,!1)?(bt.top<=d&&bt.left<=n&&(Me=St,ke=bt),!0):!1},Q,q),$e,et,nt=!1;if(ke){var ut=n-ke.left=pt.bottom?1:0}return Ke=Ie(t.text,Ke,1),ga(i,Ke,et,nt,n-$e)}function Ko(e,t,i,n,d,N,z){var Q=We(function(ye){var Me=d[ye],ke=Me.level!=1;return ya(en(e,Ze(i,ke?Me.to:Me.from,ke?"before":"after"),"line",t,n),N,z,!0)},0,d.length-1),q=d[Q];if(Q>0){var te=q.level!=1,pe=en(e,Ze(i,te?q.from:q.to,te?"after":"before"),"line",t,n);ya(pe,N,z,!0)&&pe.top>z&&(q=d[Q-1])}return q}function zo(e,t,i,n,d,N,z){var Q=hs(e,t,n,z),q=Q.begin,te=Q.end;/\s/.test(t.text.charAt(te-1))&&te--;for(var pe=null,ye=null,Me=0;Me=te||ke.to<=q)continue;var Ke=ke.level!=1,$e=on(e,n,Ke?Math.min(te,ke.to)-1:Math.max(q,ke.from)).right,et=$eet)&&(pe=ke,ye=et)}return pe||(pe=d[d.length-1]),pe.fromte&&(pe={from:pe.from,to:te,level:pe.level}),pe}var Nn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Nn==null){Nn=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(c("br"));Nn.appendChild(document.createTextNode("x"))}T(e.measure,Nn);var i=Nn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),C(e.measure),i||1}function Jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),i=c("pre",[t],"CodeMirror-line-like");T(e.measure,i);var n=t.getBoundingClientRect(),d=(n.right-n.left)/10;return d>2&&(e.cachedCharWidth=d),d||10}function ba(e){for(var t=e.display,i={},n={},d=t.gutters.clientLeft,N=t.gutters.firstChild,z=0;N;N=N.nextSibling,++z){var Q=e.display.gutterSpecs[z].className;i[Q]=N.offsetLeft+N.clientLeft+d,n[Q]=N.clientWidth}return{fixedPos:_a(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function _a(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cs(e){var t=$n(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Jn(e.display)-3);return function(d){if(an(e.doc,d))return 0;var N=0;if(d.widgets)for(var z=0;z0&&(te=mt(e.doc,q.line).text).length==q.ch){var pe=H(te,te.length,e.options.tabSize)-te.length;q=Ze(q.line,Math.max(0,Math.round((N-qa(e.display).left)/Jn(e.display))-pe))}return q}function Un(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;nt)&&(d.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=d.viewTo)cr&&ci(e.doc,t)d.viewFrom?Sn(e):(d.viewFrom+=n,d.viewTo+=n);else if(t<=d.viewFrom&&i>=d.viewTo)Sn(e);else if(t<=d.viewFrom){var N=Gi(e,i,i+n,1);N?(d.view=d.view.slice(N.index),d.viewFrom=N.lineN,d.viewTo+=n):Sn(e)}else if(i>=d.viewTo){var z=Gi(e,t,t,-1);z?(d.view=d.view.slice(0,z.index),d.viewTo=z.lineN):Sn(e)}else{var Q=Gi(e,t,t,-1),q=Gi(e,i,i+n,1);Q&&q?(d.view=d.view.slice(0,Q.index).concat(kr(e,Q.lineN,q.lineN)).concat(d.view.slice(q.index)),d.viewTo+=n):Sn(e)}var te=d.externalMeasured;te&&(i=d.lineN&&t=n.viewTo)return;var N=n.view[Un(e,t)];if(N.node==null)return;var z=N.changes||(N.changes=[]);ne(z,i)==-1&&z.push(i)}function Sn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gi(e,t,i,n){var d=Un(e,t),N,z=e.display.view;if(!cr||i==e.doc.first+e.doc.size)return{index:d,lineN:i};for(var Q=e.display.viewFrom,q=0;q0){if(d==z.length-1)return null;N=Q+z[d].size-t,d++}else N=Q-t;t+=N,i+=N}for(;ci(e.doc,i)!=i;){if(d==(n<0?0:z.length-1))return null;i+=n*z[d-(n<0?1:0)].size,d+=n}return{index:d,lineN:i}}function Vo(e,t,i){var n=e.display,d=n.view;d.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=kr(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=kr(e,t,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Un(e,i)))),n.viewTo=i}function fs(e){for(var t=e.display.view,i=0,n=0;n=e.display.viewTo||Q.to().line1}var Zt={},Dt={};function Cr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=t}function Kr(e,t){Dt[e]=t}function _t(e){if(typeof e=="string"&&Dt.hasOwnProperty(e))e=Dt[e];else if(e&&typeof e.name=="string"&&Dt.hasOwnProperty(e.name)){var t=Dt[e.name];typeof t=="string"&&(t={name:t}),e=Fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _t("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _t("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Lr(e,t){t=_t(t);var i=Zt[t.name];if(!i)return Lr(e,"text/plain");var n=i(e,t);if(Et.hasOwnProperty(t.name)){var c=Et[t.name];for(var N in c){if(!c.hasOwnProperty(N))continue;n.hasOwnProperty(N)&&(n["_"+N]=n[N]),n[N]=c[N]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var z in t.modeProps)n[z]=t.modeProps[z];return n}var Et={};function wt(e,t){var i=Et.hasOwnProperty(e)?Et[e]:Et[e]={};g(t,i)}function Ut(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var c=t[n];c instanceof Array&&(c=c.concat([])),i[n]=c}return i}function tr(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function cr(e,t,i){return e.startState?e.startState(t,i):!0}var Nt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};Nt.prototype.eol=function(){return this.pos>=this.string.length},Nt.prototype.sol=function(){return this.pos==this.lineStart},Nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nt.prototype.next=function(){if(this.post},Nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Nt.prototype.skipToEnd=function(){this.pos=this.string.length},Nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Nt.prototype.backUp=function(e){this.pos-=e},Nt.prototype.column=function(){return this.lastColumnPos0?null:(N&&t!==!1&&(this.pos+=N[0].length),N)}},Nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var c=i.children[n],N=c.chunkSize();if(t=e.first&&ti?Ze(i,mt(e,i).text.length):k(t,mt(e,t.line).text.length)}function k(e,t){var i=e.ch;return i==null||i>t?Ze(e.line,t):i<0?Ze(e.line,0):e}function W(e,t){for(var i=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},V.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},V.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},V.fromSaved=function(e,t,i){return t instanceof ee?new V(e,Ut(e.mode,t.state),i,t.lookAhead):new V(e,Ut(e.mode,t),i)},V.prototype.save=function(e){var t=e!==!1?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ee(t,this.maxLookAhead):t};function Ee(e,t,i,n){var c=[e.state.modeGen],N={};Er(e,t.text,e.doc.mode,i,function(te,pe){return c.push(te,pe)},N,n);for(var z=i.state,Q=function(te){i.baseTokens=c;var pe=e.state.overlays[te],ye=1,Me=0;i.state=!0,Er(e,t.text,pe.mode,i,function(ke,Ke){for(var $e=ye;Meke&&c.splice(ye,1,ke,c[ye+1],et),ye+=2,Me=Math.min(ke,et)}if(!Ke)return;if(pe.opaque)c.splice($e,ye-$e,ke,"overlay "+Ke),ye=$e+2;else for(;$ee.options.maxHighlightLength&&Ut(e.doc.mode,n.state),N=Ee(e,t,n);c&&(n.state=c),t.stateAfter=n.save(!c),t.styles=N.styles,N.classes?t.styleClasses=N.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function tt(e,t,i){var n=e.doc,c=e.display;if(!n.mode.startState)return new V(n,!0,t);var N=xr(e,t,i),z=N>n.first&&mt(n,N-1).stateAfter,Q=z?V.fromSaved(n,z,N):new V(n,cr(n.mode),N);return n.iter(N,t,function(q){gt(e,q.text,Q);var te=Q.line;q.stateAfter=te==t-1||te%5==0||te>=c.viewFrom&&tet.start)return N}throw new Error("Mode "+e.name+" failed to advance stream.")}var jt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function $t(e,t,i,n){var c=e.doc,N=c.mode,z;t=x(c,t);var Q=mt(c,t.line),q=tt(e,t.line,i),te=new Nt(Q.text,e.options.tabSize,q),pe;for(n&&(pe=[]);(n||te.pose.options.maxHighlightLength?(Q=!1,z&>(e,t,n,pe.pos),pe.pos=t.length,ye=null):ye=jr(xt(i,pe,n.state,Me),N),Me){var ke=Me[0].name;ke&&(ye="m-"+(ye?ke+" "+ye:ke))}if(!Q||te!=ye){for(;qz;--Q){if(Q<=N.first)return N.first;var q=mt(N,Q-1),te=q.stateAfter;if(te&&(!i||Q+(te instanceof ee?te.lookAhead:0)<=N.modeFrontier))return Q;var pe=H(q.text,null,e.options.tabSize);(c==null||n>pe)&&(c=Q-1,n=pe)}return c}function Zr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontieri;n--){var c=mt(e,n).stateAfter;if(c&&(!(c instanceof ee)||n+c.lookAhead=t:N.to>t);(n||(n=[])).push(new hn(z,N.from,q?null:N.to))}}return n}function Vn(e,t,i){var n;if(e)for(var c=0;c=t:N.to>t);if(Q||N.from==t&&z.type=="bookmark"&&(!i||N.marker.insertLeft)){var q=N.from==null||(z.inclusiveLeft?N.from<=t:N.from0&&Q)for(var pt=0;pt0)continue;var pe=[q,1],ye=Ct(te.from,Q.from),Me=Ct(te.to,Q.to);(ye<0||!z.inclusiveLeft&&!ye)&&pe.push({from:te.from,to:Q.from}),(Me>0||!z.inclusiveRight&&!Me)&&pe.push({from:Q.to,to:te.to}),c.splice.apply(c,pe),q+=pe.length-3}return c}function ci(e){var t=e.markedSpans;if(!t)return;for(var i=0;it)&&(!n||yr(n,N.marker)<0)&&(n=N.marker)}return n}function fr(e,t,i,n,c){var N=mt(e,t),z=dr&&N.markedSpans;if(z)for(var Q=0;Q=0&&ye<=0||pe<=0&&ye>=0)continue;if(pe<=0&&(q.marker.inclusiveRight&&c.inclusiveLeft?Ct(te.to,i)>=0:Ct(te.to,i)>0)||pe>=0&&(q.marker.inclusiveRight&&c.inclusiveLeft?Ct(te.from,n)<=0:Ct(te.from,n)<0))return!0}}function Ar(e){for(var t;t=ar(e);)e=t.find(-1,!0).line;return e}function Yn(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function xn(e){for(var t,i;t=Kt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function di(e,t){var i=mt(e,t),n=Ar(i);return i==n?t:Rt(n)}function Tn(e,t){if(t>e.lastLine())return t;var i=mt(e,t),n;if(!an(e,i))return t;for(;n=Kt(i);)i=n.find(1,!0).line;return Rt(i)+1}function an(e,t){var i=dr&&t.markedSpans;if(i)for(var n=void 0,c=0;ct.maxLineLength&&(t.maxLineLength=c,t.maxLine=n)})}var Mn=function(e,t,i){this.text=e,En(this,t),this.height=i?i(this):1};Mn.prototype.lineNo=function(){return Rt(this)},we(Mn);function ua(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ci(e),En(e,i);var c=n?n(e):1;c!=e.height&&Jt(e,c)}function vt(e){e.parent=null,ci(e)}var At={},Tt={};function kt(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Tt:At;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Bt(e,t){var i=S("span",null,null,r?"padding-right: .1px":null),n={pre:S("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var c=0;c<=(t.rest?t.rest.length:0);c++){var N=c?t.rest[c-1]:t.line,z=void 0;n.pos=0,n.addToken=Ft,yt(e.display.measure)&&(z=qe(N,e.doc.direction))&&(n.addToken=Dr(n.addToken,z)),n.map=[];var Q=t!=e.display.externalMeasured&&Rt(N);cn(N,n,Ye(e,N,Q)),N.styleClasses&&(N.styleClasses.bgClass&&(n.bgClass=_(N.styleClasses.bgClass,n.bgClass||"")),N.styleClasses.textClass&&(n.textClass=_(N.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ht(e.display.measure))),c==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(r){var q=n.content.lastChild;(/\bcm-tab\b/.test(q.className)||q.querySelector&&q.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return je(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=_(n.pre.className,n.textClass||"")),n}function Yt(e){var t=d("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ft(e,t,i,n,c,N,z){if(!t)return;var Q=e.splitSpaces?ur(t,e.trailingSpace):t,q=e.cm.state.specialChars,te=!1,pe;if(!q.test(t))e.col+=t.length,pe=document.createTextNode(Q),e.map.push(e.pos,e.pos+t.length,pe),K&&G<9&&(te=!0),e.pos+=t.length;else{pe=document.createDocumentFragment();for(var ye=0;;){q.lastIndex=ye;var Me=q.exec(t),ke=Me?Me.index-ye:t.length-ye;if(ke){var Ke=document.createTextNode(Q.slice(ye,ye+ke));K&&G<9?pe.appendChild(d("span",[Ke])):pe.appendChild(Ke),e.map.push(e.pos,e.pos+ke,Ke),e.col+=ke,e.pos+=ke}if(!Me)break;ye+=ke+1;var $e=void 0;if(Me[0]==" "){var et=e.cm.options.tabSize,nt=et-e.col%et;$e=pe.appendChild(d("span",he(nt),"cm-tab")),$e.setAttribute("role","presentation"),$e.setAttribute("cm-text"," "),e.col+=nt}else Me[0]=="\r"||Me[0]==` +`?($e=pe.appendChild(d("span",Me[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$e.setAttribute("cm-text",Me[0]),e.col+=1):($e=e.cm.options.specialCharPlaceholder(Me[0]),$e.setAttribute("cm-text",Me[0]),K&&G<9?pe.appendChild(d("span",[$e])):pe.appendChild($e),e.col+=1);e.map.push(e.pos,e.pos+1,$e),e.pos++}}if(e.trailingSpace=Q.charCodeAt(t.length-1)==32,i||n||c||te||N||z){var ut=i||"";n&&(ut+=n),c&&(ut+=c);var it=d("span",[pe],ut,N);if(z)for(var pt in z)z.hasOwnProperty(pt)&&pt!="style"&&pt!="class"&&it.setAttribute(pt,z[pt]);return e.content.appendChild(it)}e.content.appendChild(pe)}function ur(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",c=0;cte&&ye.from<=te);Me++);if(ye.to>=pe)return e(i,n,c,N,z,Q,q);e(i,n.slice(0,ye.to-te),c,N,null,Q,q),N=null,n=n.slice(ye.to-te),te=ye.to}}}function Pt(e,t,i,n){var c=!n&&i.widgetNode;c&&e.map.push(e.pos,e.pos+t,c),!n&&e.cm.display.input.needsContentAttribute&&(c||(c=e.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",i.id)),c&&(e.cm.display.input.setUneditable(c),e.content.appendChild(c)),e.pos+=t,e.trailingSpace=!1}function cn(e,t,i){var n=e.markedSpans,c=e.text,N=0;if(!n){for(var z=1;zq||Lt.collapsed&&bt.to==q&&bt.from==q)){if(bt.to!=null&&bt.to!=q&&ke>bt.to&&(ke=bt.to,$e=""),Lt.className&&(Ke+=" "+Lt.className),Lt.css&&(Me=(Me?Me+";":"")+Lt.css),Lt.startStyle&&bt.from==q&&(et+=" "+Lt.startStyle),Lt.endStyle&&bt.to==ke&&(pt||(pt=[])).push(Lt.endStyle,bt.to),Lt.title&&((ut||(ut={})).title=Lt.title),Lt.attributes)for(var Xt in Lt.attributes)(ut||(ut={}))[Xt]=Lt.attributes[Xt];Lt.collapsed&&(!nt||yr(nt.marker,Lt)<0)&&(nt=bt)}else bt.from>q&&ke>bt.from&&(ke=bt.from)}if(pt)for(var gr=0;gr=Q)break;for(var Gr=Math.min(Q,ke);;){if(pe){var Nr=q+pe.length;if(!nt){var sr=Nr>Gr?pe.slice(0,Gr-q):pe;t.addToken(t,sr,ye?ye+Ke:Ke,et,q+sr.length==ke?$e:"",Me,ut)}if(Nr>=Gr){pe=pe.slice(Gr-q),q=Gr;break}q=Nr,et=""}pe=c.slice(N,N=i[te++]),ye=kt(i[te++],t.cm.options)}}}function Wt(e,t,i){this.line=t,this.rest=xn(t),this.size=this.rest?Rt(re(this.rest))-i+1:1,this.node=this.text=null,this.hidden=an(e,t)}function kr(e,t,i){for(var n=[],c,N=t;N2&&N.push((q.bottom+te.top)/2-i.top)}}N.push(i.bottom-i.top)}}function es(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;ni)return{map:e.measure.maps[c],cache:e.measure.caches[c],before:!0}}function Bo(e,t){t=Ar(t);var i=Rt(t),n=e.display.externalMeasured=new Wt(e.doc,t,i);n.lineN=i;var c=n.built=Bt(e,n);return n.text=c.pre,T(e.display.lineMeasure,c.pre),n}function ts(e,t,i,n){return on(e,Xn(e,t),i,n)}function fa(e,t){if(t>=e.display.viewFrom&&t=i.lineN&&tt)&&(N=q-Q,c=N-1,t>=q&&(z="right")),c!=null){if(n=e[te+2],Q==q&&i==(n.insertLeft?"left":"right")&&(z=i),i=="left"&&c==0)for(;te&&e[te-2]==e[te-3]&&e[te-1].insertLeft;)n=e[(te-=3)+2],z="left";if(i=="right"&&c==q-Q)for(;te=0&&!((i=e[c]).left!=i.right);c--);return i}function Ho(e,t,i,n){var c=ns(t.map,i,n),N=c.node,z=c.start,Q=c.end,q=c.collapse,te;if(N.nodeType==3){for(var pe=0;pe<4;pe++){for(;z&&Se(t.line.text.charAt(c.coverStart+z));)--z;for(;c.coverStart+Q0&&(q=n="right");var ye;e.options.lineWrapping&&(ye=N.getClientRects()).length>1?te=ye[n=="right"?ye.length-1:0]:te=N.getBoundingClientRect()}if(K&&G<9&&!z&&(!te||!te.left&&!te.right)){var Me=N.parentNode.getClientRects()[0];Me?te={left:Me.left,right:Me.left+Jn(e.display),top:Me.top,bottom:Me.bottom}:te=rs}for(var ke=te.top-t.rect.top,Ke=te.bottom-t.rect.top,$e=(ke+Ke)/2,et=t.view.measure.heights,nt=0;nt=n.text.length?(q=n.text.length,te="before"):q<=0&&(q=0,te="after"),!Q)return z(te=="before"?q-1:q,te=="before");function pe(Ke,$e,et){var nt=Q[$e],ut=nt.level==1;return z(et?Ke-1:Ke,ut!=et)}var ye=Je(Q,q,te),Me=Qe,ke=pe(q,ye,te=="before");return Me!=null&&(ke.other=pe(q,Me,te!="before")),ke}function us(e,t){var i=0;t=x(e.doc,t),e.options.lineWrapping||(i=Jn(e.display)*t.ch);var n=mt(e.doc,t.line),c=qr(n)+Hi(e.display);return{left:i,right:i,top:c,bottom:c+n.height}}function ga(e,t,i,n,c){var N=Ze(e,t,i);return N.xRel=c,n&&(N.outside=n),N}function va(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return ga(n.first,0,null,-1,-1);var c=lr(n,i),N=n.first+n.size-1;if(c>N)return ga(n.first+n.size-1,mt(n,N).text.length,null,1,1);t<0&&(t=0);for(var z=mt(n,c);;){var Q=Go(e,z,c,t,i),q=nn(z,Q.ch+(Q.xRel>0||Q.outside>0?1:0));if(!q)return Q;var te=q.find(1);if(te.line==c)return te;z=mt(n,c=te.line)}}function hs(e,t,i,n){n-=pa(t);var c=t.text.length,N=We(function(z){return on(e,i,z-1).bottom<=n},c,0);return c=We(function(z){return on(e,i,z).top>n},N,c),{begin:N,end:c}}function cs(e,t,i,n){i||(i=Xn(e,t));var c=Wi(e,t,on(e,i,n),"line").top;return hs(e,t,i,c)}function ya(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Go(e,t,i,n,c){c-=qr(t);var N=Xn(e,t),z=pa(t),Q=0,q=t.text.length,te=!0,pe=qe(t,e.doc.direction);if(pe){var ye=(e.options.lineWrapping?zo:Ko)(e,t,i,N,pe,n,c);te=ye.level!=1,Q=te?ye.from:ye.to-1,q=te?ye.to:ye.from-1}var Me=null,ke=null,Ke=We(function(St){var bt=on(e,N,St);return bt.top+=z,bt.bottom+=z,ya(bt,n,c,!1)?(bt.top<=c&&bt.left<=n&&(Me=St,ke=bt),!0):!1},Q,q),$e,et,nt=!1;if(ke){var ut=n-ke.left=pt.bottom?1:0}return Ke=Ie(t.text,Ke,1),ga(i,Ke,et,nt,n-$e)}function Ko(e,t,i,n,c,N,z){var Q=We(function(ye){var Me=c[ye],ke=Me.level!=1;return ya(en(e,Ze(i,ke?Me.to:Me.from,ke?"before":"after"),"line",t,n),N,z,!0)},0,c.length-1),q=c[Q];if(Q>0){var te=q.level!=1,pe=en(e,Ze(i,te?q.from:q.to,te?"after":"before"),"line",t,n);ya(pe,N,z,!0)&&pe.top>z&&(q=c[Q-1])}return q}function zo(e,t,i,n,c,N,z){var Q=hs(e,t,n,z),q=Q.begin,te=Q.end;/\s/.test(t.text.charAt(te-1))&&te--;for(var pe=null,ye=null,Me=0;Me=te||ke.to<=q)continue;var Ke=ke.level!=1,$e=on(e,n,Ke?Math.min(te,ke.to)-1:Math.max(q,ke.from)).right,et=$eet)&&(pe=ke,ye=et)}return pe||(pe=c[c.length-1]),pe.fromte&&(pe={from:pe.from,to:te,level:pe.level}),pe}var Nn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Nn==null){Nn=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(d("br"));Nn.appendChild(document.createTextNode("x"))}T(e.measure,Nn);var i=Nn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),C(e.measure),i||1}function Jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),i=d("pre",[t],"CodeMirror-line-like");T(e.measure,i);var n=t.getBoundingClientRect(),c=(n.right-n.left)/10;return c>2&&(e.cachedCharWidth=c),c||10}function ba(e){for(var t=e.display,i={},n={},c=t.gutters.clientLeft,N=t.gutters.firstChild,z=0;N;N=N.nextSibling,++z){var Q=e.display.gutterSpecs[z].className;i[Q]=N.offsetLeft+N.clientLeft+c,n[Q]=N.clientWidth}return{fixedPos:_a(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function _a(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ds(e){var t=$n(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Jn(e.display)-3);return function(c){if(an(e.doc,c))return 0;var N=0;if(c.widgets)for(var z=0;z0&&(te=mt(e.doc,q.line).text).length==q.ch){var pe=H(te,te.length,e.options.tabSize)-te.length;q=Ze(q.line,Math.max(0,Math.round((N-qa(e.display).left)/Jn(e.display))-pe))}return q}function Un(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;nt)&&(c.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=c.viewTo)dr&&di(e.doc,t)c.viewFrom?Sn(e):(c.viewFrom+=n,c.viewTo+=n);else if(t<=c.viewFrom&&i>=c.viewTo)Sn(e);else if(t<=c.viewFrom){var N=Gi(e,i,i+n,1);N?(c.view=c.view.slice(N.index),c.viewFrom=N.lineN,c.viewTo+=n):Sn(e)}else if(i>=c.viewTo){var z=Gi(e,t,t,-1);z?(c.view=c.view.slice(0,z.index),c.viewTo=z.lineN):Sn(e)}else{var Q=Gi(e,t,t,-1),q=Gi(e,i,i+n,1);Q&&q?(c.view=c.view.slice(0,Q.index).concat(kr(e,Q.lineN,q.lineN)).concat(c.view.slice(q.index)),c.viewTo+=n):Sn(e)}var te=c.externalMeasured;te&&(i=c.lineN&&t=n.viewTo)return;var N=n.view[Un(e,t)];if(N.node==null)return;var z=N.changes||(N.changes=[]);ne(z,i)==-1&&z.push(i)}function Sn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gi(e,t,i,n){var c=Un(e,t),N,z=e.display.view;if(!dr||i==e.doc.first+e.doc.size)return{index:c,lineN:i};for(var Q=e.display.viewFrom,q=0;q0){if(c==z.length-1)return null;N=Q+z[c].size-t,c++}else N=Q-t;t+=N,i+=N}for(;di(e.doc,i)!=i;){if(c==(n<0?0:z.length-1))return null;i+=n*z[c-(n<0?1:0)].size,c+=n}return{index:c,lineN:i}}function Vo(e,t,i){var n=e.display,c=n.view;c.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=kr(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=kr(e,t,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Un(e,i)))),n.viewTo=i}function fs(e){for(var t=e.display.view,i=0,n=0;n=e.display.viewTo||Q.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Zn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gs(e){e.state.focused||(e.display.input.focus(),Ta(e))}function vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zn(e))},100)}function Ta(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(je(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),r&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),xa(e)}function Zn(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(je(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zi(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n.005||pe<-.005)&&(Jt(d.line,z),ys(d.line),d.rest))for(var ye=0;yee.display.sizerWidth){var Me=Math.ceil(Q/Jn(e.display));Me>e.display.maxLineLength&&(e.display.maxLineLength=Me,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}function ys(e){if(e.widgets)for(var t=0;t=z&&(N=lr(t,qr(mt(t,q))-e.wrapper.clientHeight),z=q)}return{from:N,to:Math.max(z,N+1)}}function Xo(e,t){if(Ge(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),d=null;if(t.top+n.top<0?d=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(d=!1),d!=null&&!u){var N=c("div","\u200B",null,`position: absolute; + height: `+(bt-pt)+"px"))}function ye(it,pt,St){var bt=mt(c,it),Lt=bt.text.length,Xt,gr;function er(sr,Fr){return ma(e,Ze(it,sr),"div",bt,Fr)}function Gr(sr,Fr,_r){var hr=cs(e,bt,null,sr),or=Fr=="ltr"==(_r=="after")?"left":"right",rr=_r=="after"?hr.begin:hr.end-(/\s/.test(bt.text.charAt(hr.end-1))?2:1);return er(rr,or)[or]}var Nr=qe(bt,c.direction);return Ve(Nr,pt||0,St==null?Lt:St,function(sr,Fr,_r,hr){var or=_r=="ltr",rr=er(sr,or?"left":"right"),Ur=er(Fr-1,or?"right":"left"),ui=pt==null&&sr==0,In=St==null&&Fr==Lt,Sr=hr==0,ln=!Nr||hr==Nr.length-1;if(Ur.top-rr.top<=3){var vr=(te?ui:In)&&Sr,Va=(te?In:ui)&&ln,pn=vr?Q:(or?rr:Ur).left,Gn=Va?q:(or?Ur:rr).right;pe(pn,rr.top,Gn-pn,rr.bottom)}else{var Kn,Rr,hi,Ya;or?(Kn=te&&ui&&Sr?Q:rr.left,Rr=te?q:Gr(sr,_r,"before"),hi=te?Q:Gr(Fr,_r,"after"),Ya=te&&In&&ln?q:Ur.right):(Kn=te?Gr(sr,_r,"before"):Q,Rr=!te&&ui&&Sr?q:rr.right,hi=!te&&In&&ln?Q:Ur.left,Ya=te?Gr(Fr,_r,"after"):q),pe(Kn,rr.top,Rr-Kn,rr.bottom),rr.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Zn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gs(e){e.state.focused||(e.display.input.focus(),Ta(e))}function vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zn(e))},100)}function Ta(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(je(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),r&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),xa(e)}function Zn(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(je(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zi(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n.005||pe<-.005)&&(Jt(c.line,z),ys(c.line),c.rest))for(var ye=0;yee.display.sizerWidth){var Me=Math.ceil(Q/Jn(e.display));Me>e.display.maxLineLength&&(e.display.maxLineLength=Me,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}function ys(e){if(e.widgets)for(var t=0;t=z&&(N=lr(t,qr(mt(t,q))-e.wrapper.clientHeight),z=q)}return{from:N,to:Math.max(z,N+1)}}function Xo(e,t){if(Ge(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),c=null;if(t.top+n.top<0?c=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(c=!1),c!=null&&!u){var N=d("div","\u200B",null,`position: absolute; top: `+(t.top-i.viewOffset-Hi(e.display))+`px; height: `+(t.bottom-t.top+sn(e)+i.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(N),N.scrollIntoView(d),e.display.lineSpace.removeChild(N)}}function $o(e,t,i,n){n==null&&(n=0);var d;!e.options.lineWrapping&&t==i&&(t=t.ch?Ze(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Ze(t.line,t.ch+1,"before"):t);for(var N=0;N<5;N++){var z=!1,Q=en(e,t),q=!i||i==t?Q:en(e,i);d={left:Math.min(Q.left,q.left),top:Math.min(Q.top,q.top)-n,right:Math.max(Q.left,q.left),bottom:Math.max(Q.bottom,q.bottom)+n};var te=wa(e,d),pe=e.doc.scrollTop,ye=e.doc.scrollLeft;if(te.scrollTop!=null&&(Ei(e,te.scrollTop),Math.abs(e.doc.scrollTop-pe)>1&&(z=!0)),te.scrollLeft!=null&&(Bn(e,te.scrollLeft),Math.abs(e.doc.scrollLeft-ye)>1&&(z=!0)),!z)break}return d}function Jo(e,t){var i=wa(e,t);i.scrollTop!=null&&Ei(e,i.scrollTop),i.scrollLeft!=null&&Bn(e,i.scrollLeft)}function wa(e,t){var i=e.display,n=$n(e.display);t.top<0&&(t.top=0);var d=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,N=ca(e),z={};t.bottom-t.top>N&&(t.bottom=t.top+N);var Q=e.doc.height+da(i),q=t.topQ-n;if(t.topd+N){var pe=Math.min(t.top,(te?Q:t.bottom)-N);pe!=d&&(z.scrollTop=pe)}var ye=e.options.fixedGutter?0:i.gutters.offsetWidth,Me=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-ye,ke=Pn(e)-i.gutters.offsetWidth,Ke=t.right-t.left>ke;return Ke&&(t.right=t.left+ke),t.left<10?z.scrollLeft=0:t.leftke+Me-3&&(z.scrollLeft=t.right+(Ke?0:10)-ke),z}function Sa(e,t){if(t==null)return;Yi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Qn(e){Yi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _i(e,t,i){(t!=null||i!=null)&&Yi(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zo(e,t){Yi(e),e.curOp.scrollToPos=t}function Yi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=us(e,t.from),n=us(e,t.to);bs(e,i,n,t.margin)}}function bs(e,t,i,n){var d=wa(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});_i(e,d.scrollLeft,d.scrollTop)}function Ei(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;P||Aa(e,{top:t}),_s(e,t,!0),P&&Aa(e),wi(e,100)}function _s(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Bn(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Ss(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function xi(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var jn=function(e,t,i){this.cm=i;var n=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=d.tabIndex=-1,e(n),e(d),Ue(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Ue(d,"scroll",function(){d.clientWidth&&t(d.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,K&&G<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var d=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+d)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var N=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+N)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},jn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jn.prototype.zeroWidthHack=function(){var e=s&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},jn.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var d=e.getBoundingClientRect(),N=i=="vert"?document.elementFromPoint(d.right-1,(d.top+d.bottom)/2):document.elementFromPoint((d.right+d.left)/2,d.bottom-1);N!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},jn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ti=function(){};Ti.prototype.update=function(){return{bottom:0,right:0}},Ti.prototype.setScrollLeft=function(){},Ti.prototype.setScrollTop=function(){},Ti.prototype.clear=function(){};function qn(e,t){t||(t=xi(e));var i=e.display.barWidth,n=e.display.barHeight;Es(e,t);for(var d=0;d<4&&i!=e.display.barWidth||n!=e.display.barHeight;d++)i!=e.display.barWidth&&e.options.lineWrapping&&zi(e),Es(e,xi(e)),i=e.display.barWidth,n=e.display.barHeight}function Es(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var xs={native:jn,null:Ti};function Ts(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ue(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Bn(e,t):Ei(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Qo=0;function Hn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qo},Jr(e.curOp)}function Wn(e){var t=e.curOp;t&&Io(t,function(i){for(var n=0;n=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ca(e.cm,e.update)}function rl(e){var t=e.cm,i=t.display;e.updatedDisplay&&zi(t),e.barMeasure=xi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ts(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function nl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=tt(e,t.highlightFrontier),d=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(N){if(n.line>=e.display.viewFrom){var z=N.styles,Q=N.text.length>e.options.maxHighlightLength?Ut(t.mode,n.state):null,q=Ee(e,N,n,!0);Q&&(n.state=Q),N.styles=q.styles;var te=N.styleClasses,pe=q.classes;pe?N.styleClasses=pe:te&&(N.styleClasses=null);for(var ye=!z||z.length!=N.styles.length||te!=pe&&(!te||!pe||te.bgClass!=pe.bgClass||te.textClass!=pe.textClass),Me=0;!ye&&Mei)return wi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),d.length&&Wr(e,function(){for(var N=0;N=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&fs(e)==0)return!1;Cs(e)&&(Sn(e),t.dims=ba(e));var d=n.first+n.size,N=Math.max(t.visible.from-e.options.viewportMargin,n.first),z=Math.min(d,t.visible.to+e.options.viewportMargin);i.viewFromz&&i.viewTo-z<20&&(z=Math.min(d,i.viewTo)),cr&&(N=ci(e.doc,N),z=Tn(e.doc,z));var Q=N!=i.viewFrom||z!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Vo(e,N,z),i.viewOffset=qr(mt(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var q=fs(e);if(!Q&&q==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var te=ol(e);return q>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),q>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(te),C(i.cursorDiv),C(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,Q&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,wi(e,400)),i.updateLineNumbers=null,!0}function ws(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Pn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+da(e.display)-ca(e),i.top)}),t.visible=Vi(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Vi(e.display,e.doc,i));if(!Ca(e,t))break;zi(e);var d=xi(e);bi(e),qn(e,d),Ra(e,d),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Aa(e,t){var i=new Xi(e,t);if(Ca(e,i)){zi(e),ws(e,i);var n=xi(e);bi(e),qn(e,n),Ra(e,n),i.finish()}}function ul(e,t,i){var n=e.display,d=e.options.lineNumbers,N=n.lineDiv,z=N.firstChild;function Q(Ke){var $e=Ke.nextSibling;return r&&s&&e.display.currentWheelTarget==Ke?Ke.style.display="none":Ke.parentNode.removeChild(Ke),$e}for(var q=n.view,te=n.viewFrom,pe=0;pe-1&&(ke=!1),Xa(e,ye,te,i)),ke&&(C(ye.lineNumber),ye.lineNumber.appendChild(document.createTextNode(Xr(e.options,te)))),z=ye.node.nextSibling}te+=ye.size}for(;z;)z=Q(z)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ra(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+sn(e)+"px"}function Ss(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=_a(t)-t.scroller.scrollLeft+e.doc.scrollLeft,d=t.gutters.offsetWidth,N=n+"px",z=0;zz.clientWidth,q=z.scrollHeight>z.clientHeight;if(!(n&&Q||d&&q))return;if(d&&s&&r){e:for(var te=t.target,pe=N.view;te!=z;te=te.parentNode)for(var ye=0;ye=0&&Ct(e,n.to())<=0)return i}return-1};var Gt=function(e,t){this.anchor=e,this.head=t};Gt.prototype.from=function(){return yn(this.anchor,this.head)},Gt.prototype.to=function(){return vn(this.anchor,this.head)},Gt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function tn(e,t,i){var n=e&&e.options.selectionsMayTouch,d=t[i];t.sort(function(Me,ke){return Ct(Me.from(),ke.from())}),i=ne(t,d);for(var N=1;N0:q>=0){var te=yn(Q.from(),z.from()),pe=vn(Q.to(),z.to()),ye=Q.empty()?z.from()==z.head:Q.from()==Q.head;N<=i&&--i,t.splice(--N,2,new Gt(ye?pe:te,ye?te:pe))}}return new Yr(t,i)}function Cn(e,t){return new Yr([new Gt(e,t||e)],0)}function An(e){return e.text?Ze(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(Ct(e,t.from)<0)return e;if(Ct(e,t.to)<=0)return An(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=An(t).ch-t.to.ch),Ze(i,n)}function Ia(e,t){for(var i=[],n=0;n1&&e.remove(Q.line+1,Ke-1),e.insert(Q.line+1,nt)}br(e,"change",e,t)}function On(e,t,i){function n(d,N,z){if(d.linked)for(var Q=0;Q1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Ns(e,t,i,n){var d=e.history;d.undone.length=0;var N=+new Date,z,Q;if((d.lastOp==n||d.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&d.lastModTime>N-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(z=pl(d,d.lastOp==n)))Q=re(z.changes),Ct(t.from,t.to)==0&&Ct(t.from,Q.to)==0?Q.to=An(t):z.changes.push(Ma(e,t));else{var q=re(d.done);for((!q||!q.ranges)&&Zi(e.sel,d.done),z={changes:[Ma(e,t)],generation:d.generation},d.done.push(z);d.done.length>d.undoDepth;)d.done.shift(),d.done[0].ranges||d.done.shift()}d.done.push(i),d.generation=++d.maxGeneration,d.lastModTime=d.lastSelTime=N,d.lastOp=d.lastSelOp=n,d.lastOrigin=d.lastSelOrigin=t.origin,Q||je(e,"historyAdded")}function ml(e,t,i,n){var d=t.charAt(0);return d=="*"||d=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,i,n){var d=e.history,N=n&&n.origin;i==d.lastSelOp||N&&d.lastSelOrigin==N&&(d.lastModTime==d.lastSelTime&&d.lastOrigin==N||ml(e,N,re(d.done),t))?d.done[d.done.length-1]=t:Zi(t,d.done),d.lastSelTime=+new Date,d.lastSelOrigin=N,d.lastSelOp=i,n&&n.clearRedo!==!1&&Ps(d.undone)}function Zi(e,t){var i=re(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Fs(e,t,i,n){var d=t["spans_"+e.id],N=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(z){z.markedSpans&&((d||(d=t["spans_"+e.id]={}))[N]=z.markedSpans),++N})}function vl(e){if(!e)return null;for(var t,i=0;i-1&&(re(Q)[ye]=te[ye],delete te[ye]))}}return n}function Pa(e,t,i,n){if(n){var d=e.anchor;if(i){var N=Ct(t,d)<0;N!=Ct(i,d)<0?(d=t,t=i):N!=Ct(t,i)<0&&(t=i)}return new Gt(d,t)}else return new Gt(i||t,t)}function Qi(e,t,i,n,d){d==null&&(d=e.cm&&(e.cm.display.shift||e.extend)),wr(e,new Yr([Pa(e.sel.primary(),t,i,d)],0),n)}function Bs(e,t,i){for(var n=[],d=e.cm&&(e.cm.display.shift||e.extend),N=0;N=t.ch:Q.to>t.ch))){if(d&&(je(q,"beforeCursorEnter"),q.explicitlyCleared))if(N.markedSpans){--z;continue}else break;if(!q.atomic)continue;if(i){var ye=q.find(n<0?1:-1),Me=void 0;if((n<0?pe:te)&&(ye=zs(e,ye,-n,ye&&ye.line==t.line?N:null)),ye&&ye.line==t.line&&(Me=Ct(ye,i))&&(n<0?Me<0:Me>0))return ti(e,ye,t,n,d)}var ke=q.find(n<0?-1:1);return(n<0?te:pe)&&(ke=zs(e,ke,n,ke.line==t.line?N:null)),ke?ti(e,ke,t,n,d):null}}return t}function ea(e,t,i,n,d){var N=n||1,z=ti(e,t,i,N,d)||!d&&ti(e,t,i,N,!0)||ti(e,t,i,-N,d)||!d&&ti(e,t,i,-N,!0);return z||(e.cantEdit=!0,Ze(e.first,0))}function zs(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?x(e,Ze(t.line-1)):null:i>0&&t.ch==(n||mt(e,t.line)).text.length?t.line=0;--d)Xs(e,{from:n[d].from,to:n[d].to,text:d?[""]:t.text,origin:t.origin});else Xs(e,t)}function Xs(e,t){if(t.text.length==1&&t.text[0]==""&&Ct(t.from,t.to)==0)return;var i=Ia(e,t);Ns(e,t,i,e.cm?e.cm.curOp.id:NaN),Ai(e,t,i,Qr(e,t));var n=[];On(e,function(d,N){!N&&ne(n,d.history)==-1&&(Qs(d.history,t),n.push(d.history)),Ai(d,t,null,Qr(d,t))})}function ta(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var d=e.history,N,z=e.sel,Q=t=="undo"?d.done:d.undone,q=t=="undo"?d.undone:d.done,te=0;te=0;--ke){var Ke=Me(ke);if(Ke)return Ke.v}}function $s(e,t){if(t==0)return;if(e.first+=t,e.sel=new Yr(fe(e.sel.ranges,function(d){return new Gt(Ze(d.anchor.line+t,d.anchor.ch),Ze(d.head.line+t,d.head.ch))}),e.sel.primIndex),e.cm){Mr(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;ne.lastLine())return;if(t.from.lineN&&(t={from:t.from,to:Ze(N,mt(e,N).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Br(e,t.from,t.to),i||(i=Ia(e,t)),e.cm?_l(e.cm,t,n):ka(e,t,n),qi(e,i,ge),e.cantEdit&&ea(e,Ze(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,i){var n=e.doc,d=e.display,N=t.from,z=t.to,Q=!1,q=N.line;e.options.lineWrapping||(q=Rt(Ar(mt(n,N.line))),n.iter(q,z.line+1,function(ke){if(ke==d.maxLine)return Q=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ae(e),ka(n,t,i,cs(e)),e.options.lineWrapping||(n.iter(q,N.line+t.text.length,function(ke){var Ke=pi(ke);Ke>d.maxLineLength&&(d.maxLine=ke,d.maxLineLength=Ke,d.maxLineChanged=!0,Q=!1)}),Q&&(e.curOp.updateMaxLine=!0)),Zr(n,N.line),wi(e,400);var te=t.text.length-(z.line-N.line)-1;t.full?Mr(e):N.line==z.line&&t.text.length==1&&!Ds(e.doc,t)?wn(e,N.line,"text"):Mr(e,N.line,z.line+1,te);var pe=_e(e,"changes"),ye=_e(e,"change");if(ye||pe){var Me={from:N,to:z,text:t.text,removed:t.removed,origin:t.origin};ye&&br(e,"change",e,Me),pe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Me)}e.display.selForContextMenu=null}function ni(e,t,i,n,d){var N;n||(n=i),Ct(n,i)<0&&(N=[n,i],i=N[0],n=N[1]),typeof t=="string"&&(t=e.splitLines(t)),ri(e,{from:i,to:n,text:t,origin:d})}function Js(e,t,i,n){i1||!(this.children[0]instanceof Ri))){var Q=[];this.collapse(Q),this.children=[new Ri(Q)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var z=d.lines.length%25+25,Q=z;Q10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=te,e.display.maxLineLength=pe,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Mr(e,n,d+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gs(e.doc)),e&&br(e,"markerCleared",e,this,n,d),t&&Wn(e),this.parent&&this.parent.clear()},Rn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,d=0;d0||z==0&&N.clearWhenEmpty!==!1)return N;if(N.replacedWith&&(N.collapsed=!0,N.widgetNode=S("span",[N.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||N.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(N.widgetNode.insertLeft=!0)),N.collapsed){if(fr(e,t.line,t,i,N)||t.line!=i.line&&fr(e,i.line,t,i,N))throw new Error("Inserting collapsed marker partially overlapping an existing one");un()}N.addToHistory&&Ns(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var Q=t.line,q=e.cm,te;if(e.iter(Q,i.line+1,function(ye){q&&N.collapsed&&!q.options.lineWrapping&&Ar(ye)==q.display.maxLine&&(te=!0),N.collapsed&&Q!=t.line&&Jt(ye,0),bn(ye,new hn(N,Q==t.line?t.ch:null,Q==i.line?i.ch:null)),++Q}),N.collapsed&&e.iter(t.line,i.line+1,function(ye){an(e,ye)&&Jt(ye,0)}),N.clearOnEnter&&Ue(N,"beforeCursorEnter",function(){return N.clear()}),N.readOnly&&(zr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),N.collapsed&&(N.id=++eo,N.atomic=!0),q){if(te&&(q.curOp.updateMaxLine=!0),N.collapsed)Mr(q,t.line,i.line+1);else if(N.className||N.startStyle||N.endStyle||N.css||N.attributes||N.title)for(var pe=t.line;pe<=i.line;pe++)wn(q,pe,"text");N.atomic&&Gs(q.doc),br(q,"markerAdded",q,N)}return N}var Di=function(e,t){this.markers=e,this.primary=t;for(var i=0;i=0;q--)ri(this,n[q]);Q?Hs(this,Q):this.cm&&Qn(this.cm)}),undo:mr(function(){ta(this,"undo")}),redo:mr(function(){ta(this,"redo")}),undoSelection:mr(function(){ta(this,"undo",!0)}),redoSelection:mr(function(){ta(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n=e.ch)&&t.push(d.marker.parent||d.marker)}return t},findMarks:function(e,t,i){e=x(this,e),t=x(this,t);var n=[],d=e.line;return this.iter(e.line,t.line+1,function(N){var z=N.markedSpans;if(z)for(var Q=0;Q=q.to||q.from==null&&d!=e.line||q.from!=null&&d==t.line&&q.from>=t.ch)&&(!i||i(q.marker))&&n.push(q.marker.parent||q.marker)}++d}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;ne)return t=e,!0;e-=N,++i}),x(this,Ze(i,t))},indexFromPos:function(e){e=x(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var pe=e.dataTransfer.getData("Text");if(pe){var ye;if(t.state.draggingText&&!t.state.draggingText.copy&&(ye=t.listSelections()),qi(t.doc,Cn(i,i)),ye)for(var Me=0;Me=0;Q--)ni(e.doc,"",n[Q].from,n[Q].to,"+delete");Qn(e)})}function Fa(e,t,i){var n=Ie(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Ua(e,t,i){var n=Fa(e,t.ch,i);return n==null?null:new Ze(t.line,n,i<0?"after":"before")}function Ba(e,t,i,n,d){if(e){t.doc.direction=="rtl"&&(d=-d);var N=qe(i,t.doc.direction);if(N){var z=d<0?re(N):N[0],Q=d<0==(z.level==1),q=Q?"after":"before",te;if(z.level>0||t.doc.direction=="rtl"){var pe=Xn(t,i);te=d<0?i.text.length-1:0;var ye=on(t,pe,te).top;te=We(function(Me){return on(t,pe,Me).top==ye},d<0==(z.level==1)?z.from:z.to-1,te),q=="before"&&(te=Fa(i,te,1))}else te=d<0?z.to:z.from;return new Ze(n,te,q)}}return new Ze(n,d<0?i.text.length:0,d<0?"before":"after")}function Ml(e,t,i,n){var d=qe(t,e.doc.direction);if(!d)return Ua(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var N=Je(d,i.ch,i.sticky),z=d[N];if(e.doc.direction=="ltr"&&z.level%2==0&&(n>0?z.to>i.ch:z.from=z.from&&Me>=pe.begin)){var ke=ye?"before":"after";return new Ze(i.line,Me,ke)}}var Ke=function(nt,ut,it){for(var pt=function(Xt,gr){return gr?new Ze(i.line,Q(Xt,1),"before"):new Ze(i.line,Xt,"after")};nt>=0&&nt0==(St.level!=1),Lt=bt?it.begin:Q(it.end,-1);if(St.from<=Lt&&Lt0?pe.end:Q(pe.begin,-1);return et!=null&&!(n>0&&et==t.text.length)&&($e=Ke(n>0?0:d.length-1,n,te(et)),$e)?$e:null}var Pi={selectAll:Vs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return si(e,function(t){if(t.empty()){var i=mt(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line0)d=new Ze(d.line,d.ch+1),e.replaceRange(N.charAt(d.ch-1)+N.charAt(d.ch-2),Ze(d.line,d.ch-2),d,"+transpose");else if(d.line>e.doc.first){var z=mt(e.doc,d.line-1).text;z&&(d=new Ze(d.line,1),e.replaceRange(N.charAt(0)+e.doc.lineSeparator()+z.charAt(z.length-1),Ze(d.line-1,z.length-1),d,"+transpose"))}}i.push(new Gt(d,d))}e.setSelections(i)})},newlineAndIndent:function(e){return Wr(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;ne&&Ct(t,this.pos)==0&&i==this.button};var Fi,Ui;function Hl(e,t){var i=+new Date;return Ui&&Ui.compare(i,e,t)?(Fi=Ui=null,"triple"):Fi&&Fi.compare(i,e,t)?(Ui=new Ha(i,e,t),Fi=null,"double"):(Fi=new Ha(i,e,t),Ui=null,"single")}function vo(e){var t=this,i=t.display;if(Ge(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,cn(i,e)){r||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Wa(t,e))return;var n=Fn(t,e),d=Pe(e),N=n?Hl(n,d):"single";if(window.focus(),d==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,d,n,N,e))return;d==1?n?Kl(t,n,N,e):xe(e)==i.scroller&&ae(e):d==2?(n&&Qi(t.doc,n),setTimeout(function(){return i.input.focus()},20)):d==3&&(D?t.display.input.onContextMenu(e):vs(t))}function Wl(e,t,i,n,d){var N="Click";return n=="double"?N="Double"+N:n=="triple"&&(N="Triple"+N),N=(t==1?"Left":t==2?"Middle":"Right")+N,Ni(e,oo(N,d),d,function(z){if(typeof z=="string"&&(z=Pi[z]),!z)return!1;var Q=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),Q=z(e,i)!=Oe}finally{e.state.suppressEdits=!1}return Q})}function Gl(e,t,i){var n=e.getOption("configureMouse"),d=n?n(e,t,i):{};if(d.unit==null){var N=a?i.shiftKey&&i.metaKey:i.altKey;d.unit=N?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(d.extend==null||e.doc.extend)&&(d.extend=e.doc.extend||i.shiftKey),d.addNew==null&&(d.addNew=s?i.metaKey:i.ctrlKey),d.moveOnDrag==null&&(d.moveOnDrag=!(s?i.altKey:i.ctrlKey)),d}function Kl(e,t,i,n){K?setTimeout(I(gs,e),0):e.curOp.focus=B();var d=Gl(e,i,n),N=e.doc.sel,z;e.options.dragDrop&&He&&!e.isReadOnly()&&i=="single"&&(z=N.contains(t))>-1&&(Ct((z=N.ranges[z]).from(),t)<0||t.xRel>0)&&(Ct(z.to(),t)>0||t.xRel<0)?zl(e,n,t,d):Vl(e,n,t,d)}function zl(e,t,i,n){var d=e.display,N=!1,z=pr(e,function(te){r&&(d.scroller.draggable=!1),e.state.draggingText=!1,lt(d.wrapper.ownerDocument,"mouseup",z),lt(d.wrapper.ownerDocument,"mousemove",Q),lt(d.scroller,"dragstart",q),lt(d.scroller,"drop",z),N||(ae(te),n.addNew||Qi(e.doc,i,null,null,n.extend),r&&!p||K&&G==9?setTimeout(function(){d.wrapper.ownerDocument.body.focus({preventScroll:!0}),d.input.focus()},20):d.input.focus())}),Q=function(te){N=N||Math.abs(t.clientX-te.clientX)+Math.abs(t.clientY-te.clientY)>=10},q=function(){return N=!0};r&&(d.scroller.draggable=!0),e.state.draggingText=z,z.copy=!n.moveOnDrag,d.scroller.dragDrop&&d.scroller.dragDrop(),Ue(d.wrapper.ownerDocument,"mouseup",z),Ue(d.wrapper.ownerDocument,"mousemove",Q),Ue(d.scroller,"dragstart",q),Ue(d.scroller,"drop",z),vs(e),setTimeout(function(){return d.input.focus()},20)}function yo(e,t,i){if(i=="char")return new Gt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Gt(Ze(t.line,0),x(e.doc,Ze(t.line+1,0)));var n=i(e,t);return new Gt(n.from,n.to)}function Vl(e,t,i,n){var d=e.display,N=e.doc;ae(t);var z,Q,q=N.sel,te=q.ranges;if(n.addNew&&!n.extend?(Q=N.sel.contains(i),Q>-1?z=te[Q]:z=new Gt(i,i)):(z=N.sel.primary(),Q=N.sel.primIndex),n.unit=="rectangle")n.addNew||(z=new Gt(i,i)),i=Fn(e,t,!0,!0),Q=-1;else{var pe=yo(e,i,n.unit);n.extend?z=Pa(z,pe.anchor,pe.head,n.extend):z=pe}n.addNew?Q==-1?(Q=te.length,wr(N,tn(e,te.concat([z]),Q),{scroll:!1,origin:"*mouse"})):te.length>1&&te[Q].empty()&&n.unit=="char"&&!n.extend?(wr(N,tn(e,te.slice(0,Q).concat(te.slice(Q+1)),0),{scroll:!1,origin:"*mouse"}),q=N.sel):Na(N,Q,z,Te):(Q=0,wr(N,new Yr([z],0),Te),q=N.sel);var ye=i;function Me(it){if(Ct(ye,it)==0)return;if(ye=it,n.unit=="rectangle"){for(var pt=[],St=e.options.tabSize,bt=H(mt(N,i.line).text,i.ch,St),Lt=H(mt(N,it.line).text,it.ch,St),Xt=Math.min(bt,Lt),gr=Math.max(bt,Lt),er=Math.min(i.line,it.line),Gr=Math.min(e.lastLine(),Math.max(i.line,it.line));er<=Gr;er++){var Nr=mt(N,er).text,sr=Le(Nr,Xt,St);Xt==gr?pt.push(new Gt(Ze(er,sr),Ze(er,sr))):Nr.length>sr&&pt.push(new Gt(Ze(er,sr),Ze(er,Le(Nr,gr,St))))}pt.length||pt.push(new Gt(i,i)),wr(N,tn(e,q.ranges.slice(0,Q).concat(pt),Q),{origin:"*mouse",scroll:!1}),e.scrollIntoView(it)}else{var Fr=z,_r=yo(e,it,n.unit),hr=Fr.anchor,or;Ct(_r.anchor,hr)>0?(or=_r.head,hr=yn(Fr.from(),_r.anchor)):(or=_r.anchor,hr=vn(Fr.to(),_r.head));var rr=q.ranges.slice(0);rr[Q]=Yl(e,new Gt(x(N,hr),or)),wr(N,tn(e,rr,Q),Te)}}var ke=d.wrapper.getBoundingClientRect(),Ke=0;function $e(it){var pt=++Ke,St=Fn(e,it,!0,n.unit=="rectangle");if(!St)return;if(Ct(St,ye)!=0){e.curOp.focus=B(),Me(St);var bt=Vi(d,N);(St.line>=bt.to||St.lineke.bottom?20:0;Lt&&setTimeout(pr(e,function(){if(Ke!=pt)return;d.scroller.scrollTop+=Lt,$e(it)}),50)}}function et(it){e.state.selectingText=!1,Ke=Infinity,it&&(ae(it),d.input.focus()),lt(d.wrapper.ownerDocument,"mousemove",nt),lt(d.wrapper.ownerDocument,"mouseup",ut),N.history.lastSelOrigin=null}var nt=pr(e,function(it){it.buttons===0||!Pe(it)?et(it):$e(it)}),ut=pr(e,et);e.state.selectingText=ut,Ue(d.wrapper.ownerDocument,"mousemove",nt),Ue(d.wrapper.ownerDocument,"mouseup",ut)}function Yl(e,t){var i=t.anchor,n=t.head,d=mt(e.doc,i.line);if(Ct(i,n)==0&&i.sticky==n.sticky)return t;var N=qe(d);if(!N)return t;var z=Je(N,i.ch,i.sticky),Q=N[z];if(Q.from!=i.ch&&Q.to!=i.ch)return t;var q=z+(Q.from==i.ch==(Q.level!=1)?0:1);if(q==0||q==N.length)return t;var te;if(n.line!=i.line)te=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var pe=Je(N,n.ch,n.sticky),ye=pe-z||(n.ch-i.ch)*(Q.level==1?-1:1);pe==q-1||pe==q?te=ye<0:te=ye>0}var Me=N[q+(te?-1:0)],ke=te==(Me.level==1),Ke=ke?Me.from:Me.to,$e=ke?"after":"before";return i.ch==Ke&&i.sticky==$e?t:new Gt(new Ze(i.line,Ke,$e),n)}function bo(e,t,i,n){var d,N;if(t.touches)d=t.touches[0].clientX,N=t.touches[0].clientY;else try{d=t.clientX,N=t.clientY}catch(Me){return!1}if(d>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ae(t);var z=e.display,Q=z.lineDiv.getBoundingClientRect();if(N>Q.bottom||!_e(e,i))return ce(t);N-=Q.top-z.viewOffset;for(var q=0;q=d){var pe=lr(e.doc,N),ye=e.display.gutterSpecs[q];return je(e,i,e,pe,ye.className,t),ce(t)}}}function Wa(e,t){return bo(e,t,"gutterClick",!0)}function _o(e,t){if(cn(e.display,t)||Xl(e,t))return;if(Ge(e,t,"contextmenu"))return;D||e.display.input.onContextMenu(t)}function Xl(e,t){return _e(e,"gutterContextMenu")?bo(e,t,"gutterContextMenu",!1):!1}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yi(e)}var oi={toString:function(){return"CodeMirror.Init"}},xo={},aa={};function $l(e){var t=e.optionHandlers;function i(n,d,N,z){e.defaults[n]=d,N&&(t[n]=z?function(Q,q,te){te!=oi&&N(Q,q,te)}:N)}e.defineOption=i,e.Init=oi,i("value","",function(n,d){return n.setValue(d)},!0),i("mode",null,function(n,d){n.doc.modeOption=d,Da(n)},!0),i("indentUnit",2,Da,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Ci(n),yi(n),Mr(n)},!0),i("lineSeparator",null,function(n,d){if(n.doc.lineSep=d,!d)return;var N=[],z=n.doc.first;n.doc.iter(function(q){for(var te=0;;){var pe=q.text.indexOf(d,te);if(pe==-1)break;te=pe+d.length,N.push(Ze(z,pe))}z++});for(var Q=N.length-1;Q>=0;Q--)ni(n.doc,d,N[Q],Ze(N[Q].line,N[Q].ch+d.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,d,N){n.state.specialChars=new RegExp(d.source+(d.test(" ")?"":"| "),"g"),N!=oi&&n.refresh()}),i("specialCharPlaceholder",Yt,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,d){return n.getInputField().spellcheck=d},!0),i("autocorrect",!1,function(n,d){return n.getInputField().autocorrect=d},!0),i("autocapitalize",!1,function(n,d){return n.getInputField().autocapitalize=d},!0),i("rtlMoveVisually",!O),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Eo(n),Si(n)},!0),i("keyMap","default",function(n,d,N){var z=na(d),Q=N!=oi&&na(N);Q&&Q.detach&&Q.detach(n,z),z.attach&&z.attach(n,Q||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,d){n.display.gutterSpecs=La(d,n.options.lineNumbers),Si(n)},!0),i("fixedGutter",!0,function(n,d){n.display.gutters.style.left=d?_a(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return qn(n)},!0),i("scrollbarStyle","native",function(n){Ts(n),qn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,d){n.display.gutterSpecs=La(n.options.gutters,d),Si(n)},!0),i("firstLineNumber",1,Si,!0),i("lineNumberFormatter",function(n){return n},Si,!0),i("showCursorWhenSelecting",!1,bi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,d){d=="nocursor"&&(Zn(n),n.display.input.blur()),n.display.input.readOnlyChanged(d)}),i("screenReaderLabel",null,function(n,d){d=d===""?null:d,n.display.input.screenReaderLabelChanged(d)}),i("disableInput",!1,function(n,d){d||n.display.input.reset()},!0),i("dragDrop",!0,Jl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,bi,!0),i("singleCursorHeightPerLine",!0,bi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Ci,!0),i("addModeClass",!1,Ci,!0),i("pollInterval",100),i("undoDepth",200,function(n,d){return n.doc.history.undoDepth=d}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Ci,!0),i("moveInputWithCursor",!0,function(n,d){d||n.display.input.resetPosition()}),i("tabindex",null,function(n,d){return n.display.input.getField().tabIndex=d||""}),i("autofocus",null),i("direction","ltr",function(n,d){return n.doc.setDirection(d)},!0),i("phrases",null)}function Jl(e,t,i){var n=i&&i!=oi;if(!t!=!n){var d=e.display.dragFunctions,N=t?Ue:lt;N(e.display.scroller,"dragstart",d.start),N(e.display.scroller,"dragenter",d.enter),N(e.display.scroller,"dragover",d.over),N(e.display.scroller,"dragleave",d.leave),N(e.display.scroller,"drop",d.drop)}}function Zl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),ji(e)),Ea(e),Mr(e),yi(e),setTimeout(function(){return qn(e)},100)}function Qt(e,t){var i=this;if(!(this instanceof Qt))return new Qt(e,t);this.options=t=t?g(t):{},g(xo,t,!1);var n=t.value;typeof n=="string"?n=new Pr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var d=new Qt.inputStyles[t.inputStyle](this),N=this.display=new hl(e,n,d,t);N.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},t.autofocus&&!o&&N.input.focus(),K&&G<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ql(this),Rl(),Hn(this),this.curOp.forceUpdate=!0,ks(this,n),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Ta(i)},20):Zn(this);for(var z in aa)aa.hasOwnProperty(z)&&aa[z](this,t[z],oi);Cs(this),t.finishInit&&t.finishInit(this);for(var Q=0;Q20*20}Ue(t.scroller,"touchstart",function(q){if(!Ge(e,q)&&!N(q)&&!Wa(e,q)){t.input.ensurePolled(),clearTimeout(i);var te=+new Date;t.activeTouch={start:te,moved:!1,prev:te-n.end<=300?n:null},q.touches.length==1&&(t.activeTouch.left=q.touches[0].pageX,t.activeTouch.top=q.touches[0].pageY)}}),Ue(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ue(t.scroller,"touchend",function(q){var te=t.activeTouch;if(te&&!cn(t,q)&&te.left!=null&&!te.moved&&new Date-te.start<300){var pe=e.coordsChar(t.activeTouch,"page"),ye;!te.prev||z(te,te.prev)?ye=new Gt(pe,pe):!te.prev.prev||z(te,te.prev.prev)?ye=e.findWordAt(pe):ye=new Gt(Ze(pe.line,0),x(e.doc,Ze(pe.line+1,0))),e.setSelection(ye.anchor,ye.head),e.focus(),ae(q)}d()}),Ue(t.scroller,"touchcancel",d),Ue(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ei(e,t.scroller.scrollTop),Bn(e,t.scroller.scrollLeft,!0),je(e,"scroll",e))}),Ue(t.scroller,"mousewheel",function(q){return Rs(e,q)}),Ue(t.scroller,"DOMMouseScroll",function(q){return Rs(e,q)}),Ue(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(q){Ge(e,q)||me(q)},over:function(q){Ge(e,q)||(Ol(e,q),me(q))},start:function(q){return Al(e,q)},drop:pr(e,Cl),leave:function(q){Ge(e,q)||no(e)}};var Q=t.input.getField();Ue(Q,"keyup",function(q){return mo.call(e,q)}),Ue(Q,"keydown",pr(e,po)),Ue(Q,"keypress",pr(e,go)),Ue(Q,"focus",function(q){return Ta(e,q)}),Ue(Q,"blur",function(q){return Zn(e,q)})}var Ga=[];Qt.defineInitHook=function(e){return Ga.push(e)};function Bi(e,t,i,n){var d=e.doc,N;i==null&&(i="add"),i=="smart"&&(d.mode.indent?N=tt(e,t).state:i="prev");var z=e.options.tabSize,Q=mt(d,t),q=H(Q.text,null,z);Q.stateAfter&&(Q.stateAfter=null);var te=Q.text.match(/^\s*/)[0],pe;if(!n&&!/\S/.test(Q.text))pe=0,i="not";else if(i=="smart"&&(pe=d.mode.indent(N,Q.text.slice(te.length),Q.text),pe==Oe||pe>150)){if(!n)return;i="prev"}i=="prev"?t>d.first?pe=H(mt(d,t-1).text,null,z):pe=0:i=="add"?pe=q+e.options.indentUnit:i=="subtract"?pe=q-e.options.indentUnit:typeof i=="number"&&(pe=q+i),pe=Math.max(0,pe);var ye="",Me=0;if(e.options.indentWithTabs)for(var ke=Math.floor(pe/z);ke;--ke)Me+=z,ye+=" ";if(Mez,q=dt(t),te=null;if(Q&&n.ranges.length>1)if(rn&&rn.text.join(` + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(N),N.scrollIntoView(c),e.display.lineSpace.removeChild(N)}}function $o(e,t,i,n){n==null&&(n=0);var c;!e.options.lineWrapping&&t==i&&(t=t.ch?Ze(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Ze(t.line,t.ch+1,"before"):t);for(var N=0;N<5;N++){var z=!1,Q=en(e,t),q=!i||i==t?Q:en(e,i);c={left:Math.min(Q.left,q.left),top:Math.min(Q.top,q.top)-n,right:Math.max(Q.left,q.left),bottom:Math.max(Q.bottom,q.bottom)+n};var te=wa(e,c),pe=e.doc.scrollTop,ye=e.doc.scrollLeft;if(te.scrollTop!=null&&(Ei(e,te.scrollTop),Math.abs(e.doc.scrollTop-pe)>1&&(z=!0)),te.scrollLeft!=null&&(Bn(e,te.scrollLeft),Math.abs(e.doc.scrollLeft-ye)>1&&(z=!0)),!z)break}return c}function Jo(e,t){var i=wa(e,t);i.scrollTop!=null&&Ei(e,i.scrollTop),i.scrollLeft!=null&&Bn(e,i.scrollLeft)}function wa(e,t){var i=e.display,n=$n(e.display);t.top<0&&(t.top=0);var c=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,N=da(e),z={};t.bottom-t.top>N&&(t.bottom=t.top+N);var Q=e.doc.height+ca(i),q=t.topQ-n;if(t.topc+N){var pe=Math.min(t.top,(te?Q:t.bottom)-N);pe!=c&&(z.scrollTop=pe)}var ye=e.options.fixedGutter?0:i.gutters.offsetWidth,Me=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-ye,ke=Pn(e)-i.gutters.offsetWidth,Ke=t.right-t.left>ke;return Ke&&(t.right=t.left+ke),t.left<10?z.scrollLeft=0:t.leftke+Me-3&&(z.scrollLeft=t.right+(Ke?0:10)-ke),z}function Sa(e,t){if(t==null)return;Yi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Qn(e){Yi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _i(e,t,i){(t!=null||i!=null)&&Yi(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zo(e,t){Yi(e),e.curOp.scrollToPos=t}function Yi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=us(e,t.from),n=us(e,t.to);bs(e,i,n,t.margin)}}function bs(e,t,i,n){var c=wa(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});_i(e,c.scrollLeft,c.scrollTop)}function Ei(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;P||Aa(e,{top:t}),_s(e,t,!0),P&&Aa(e),wi(e,100)}function _s(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Bn(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Ss(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function xi(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+ca(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var jn=function(e,t,i){this.cm=i;var n=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=c.tabIndex=-1,e(n),e(c),Ue(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Ue(c,"scroll",function(){c.clientWidth&&t(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,K&&G<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var c=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+c)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var N=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+N)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},jn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jn.prototype.zeroWidthHack=function(){var e=s&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},jn.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var c=e.getBoundingClientRect(),N=i=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1);N!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},jn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ti=function(){};Ti.prototype.update=function(){return{bottom:0,right:0}},Ti.prototype.setScrollLeft=function(){},Ti.prototype.setScrollTop=function(){},Ti.prototype.clear=function(){};function qn(e,t){t||(t=xi(e));var i=e.display.barWidth,n=e.display.barHeight;Es(e,t);for(var c=0;c<4&&i!=e.display.barWidth||n!=e.display.barHeight;c++)i!=e.display.barWidth&&e.options.lineWrapping&&zi(e),Es(e,xi(e)),i=e.display.barWidth,n=e.display.barHeight}function Es(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var xs={native:jn,null:Ti};function Ts(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ue(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Bn(e,t):Ei(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Qo=0;function Hn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qo},Jr(e.curOp)}function Wn(e){var t=e.curOp;t&&Io(t,function(i){for(var n=0;n=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ca(e.cm,e.update)}function rl(e){var t=e.cm,i=t.display;e.updatedDisplay&&zi(t),e.barMeasure=xi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ts(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function nl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=tt(e,t.highlightFrontier),c=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(N){if(n.line>=e.display.viewFrom){var z=N.styles,Q=N.text.length>e.options.maxHighlightLength?Ut(t.mode,n.state):null,q=Ee(e,N,n,!0);Q&&(n.state=Q),N.styles=q.styles;var te=N.styleClasses,pe=q.classes;pe?N.styleClasses=pe:te&&(N.styleClasses=null);for(var ye=!z||z.length!=N.styles.length||te!=pe&&(!te||!pe||te.bgClass!=pe.bgClass||te.textClass!=pe.textClass),Me=0;!ye&&Mei)return wi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),c.length&&Wr(e,function(){for(var N=0;N=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&fs(e)==0)return!1;Cs(e)&&(Sn(e),t.dims=ba(e));var c=n.first+n.size,N=Math.max(t.visible.from-e.options.viewportMargin,n.first),z=Math.min(c,t.visible.to+e.options.viewportMargin);i.viewFromz&&i.viewTo-z<20&&(z=Math.min(c,i.viewTo)),dr&&(N=di(e.doc,N),z=Tn(e.doc,z));var Q=N!=i.viewFrom||z!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Vo(e,N,z),i.viewOffset=qr(mt(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var q=fs(e);if(!Q&&q==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var te=ol(e);return q>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),q>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(te),C(i.cursorDiv),C(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,Q&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,wi(e,400)),i.updateLineNumbers=null,!0}function ws(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Pn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+ca(e.display)-da(e),i.top)}),t.visible=Vi(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Vi(e.display,e.doc,i));if(!Ca(e,t))break;zi(e);var c=xi(e);bi(e),qn(e,c),Ra(e,c),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Aa(e,t){var i=new Xi(e,t);if(Ca(e,i)){zi(e),ws(e,i);var n=xi(e);bi(e),qn(e,n),Ra(e,n),i.finish()}}function ul(e,t,i){var n=e.display,c=e.options.lineNumbers,N=n.lineDiv,z=N.firstChild;function Q(Ke){var $e=Ke.nextSibling;return r&&s&&e.display.currentWheelTarget==Ke?Ke.style.display="none":Ke.parentNode.removeChild(Ke),$e}for(var q=n.view,te=n.viewFrom,pe=0;pe-1&&(ke=!1),Xa(e,ye,te,i)),ke&&(C(ye.lineNumber),ye.lineNumber.appendChild(document.createTextNode(Xr(e.options,te)))),z=ye.node.nextSibling}te+=ye.size}for(;z;)z=Q(z)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ra(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+sn(e)+"px"}function Ss(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=_a(t)-t.scroller.scrollLeft+e.doc.scrollLeft,c=t.gutters.offsetWidth,N=n+"px",z=0;zz.clientWidth,q=z.scrollHeight>z.clientHeight;if(!(n&&Q||c&&q))return;if(c&&s&&r){e:for(var te=t.target,pe=N.view;te!=z;te=te.parentNode)for(var ye=0;ye=0&&Ct(e,n.to())<=0)return i}return-1};var Gt=function(e,t){this.anchor=e,this.head=t};Gt.prototype.from=function(){return yn(this.anchor,this.head)},Gt.prototype.to=function(){return vn(this.anchor,this.head)},Gt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function tn(e,t,i){var n=e&&e.options.selectionsMayTouch,c=t[i];t.sort(function(Me,ke){return Ct(Me.from(),ke.from())}),i=ne(t,c);for(var N=1;N0:q>=0){var te=yn(Q.from(),z.from()),pe=vn(Q.to(),z.to()),ye=Q.empty()?z.from()==z.head:Q.from()==Q.head;N<=i&&--i,t.splice(--N,2,new Gt(ye?pe:te,ye?te:pe))}}return new Yr(t,i)}function Cn(e,t){return new Yr([new Gt(e,t||e)],0)}function An(e){return e.text?Ze(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(Ct(e,t.from)<0)return e;if(Ct(e,t.to)<=0)return An(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=An(t).ch-t.to.ch),Ze(i,n)}function Ia(e,t){for(var i=[],n=0;n1&&e.remove(Q.line+1,Ke-1),e.insert(Q.line+1,nt)}br(e,"change",e,t)}function On(e,t,i){function n(c,N,z){if(c.linked)for(var Q=0;Q1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Ns(e,t,i,n){var c=e.history;c.undone.length=0;var N=+new Date,z,Q;if((c.lastOp==n||c.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&c.lastModTime>N-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(z=pl(c,c.lastOp==n)))Q=re(z.changes),Ct(t.from,t.to)==0&&Ct(t.from,Q.to)==0?Q.to=An(t):z.changes.push(Ma(e,t));else{var q=re(c.done);for((!q||!q.ranges)&&Zi(e.sel,c.done),z={changes:[Ma(e,t)],generation:c.generation},c.done.push(z);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift()}c.done.push(i),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=N,c.lastOp=c.lastSelOp=n,c.lastOrigin=c.lastSelOrigin=t.origin,Q||je(e,"historyAdded")}function ml(e,t,i,n){var c=t.charAt(0);return c=="*"||c=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,i,n){var c=e.history,N=n&&n.origin;i==c.lastSelOp||N&&c.lastSelOrigin==N&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==N||ml(e,N,re(c.done),t))?c.done[c.done.length-1]=t:Zi(t,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=N,c.lastSelOp=i,n&&n.clearRedo!==!1&&Ps(c.undone)}function Zi(e,t){var i=re(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Fs(e,t,i,n){var c=t["spans_"+e.id],N=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(z){z.markedSpans&&((c||(c=t["spans_"+e.id]={}))[N]=z.markedSpans),++N})}function vl(e){if(!e)return null;for(var t,i=0;i-1&&(re(Q)[ye]=te[ye],delete te[ye]))}}return n}function Pa(e,t,i,n){if(n){var c=e.anchor;if(i){var N=Ct(t,c)<0;N!=Ct(i,c)<0?(c=t,t=i):N!=Ct(t,i)<0&&(t=i)}return new Gt(c,t)}else return new Gt(i||t,t)}function Qi(e,t,i,n,c){c==null&&(c=e.cm&&(e.cm.display.shift||e.extend)),wr(e,new Yr([Pa(e.sel.primary(),t,i,c)],0),n)}function Bs(e,t,i){for(var n=[],c=e.cm&&(e.cm.display.shift||e.extend),N=0;N=t.ch:Q.to>t.ch))){if(c&&(je(q,"beforeCursorEnter"),q.explicitlyCleared))if(N.markedSpans){--z;continue}else break;if(!q.atomic)continue;if(i){var ye=q.find(n<0?1:-1),Me=void 0;if((n<0?pe:te)&&(ye=zs(e,ye,-n,ye&&ye.line==t.line?N:null)),ye&&ye.line==t.line&&(Me=Ct(ye,i))&&(n<0?Me<0:Me>0))return ti(e,ye,t,n,c)}var ke=q.find(n<0?-1:1);return(n<0?te:pe)&&(ke=zs(e,ke,n,ke.line==t.line?N:null)),ke?ti(e,ke,t,n,c):null}}return t}function ea(e,t,i,n,c){var N=n||1,z=ti(e,t,i,N,c)||!c&&ti(e,t,i,N,!0)||ti(e,t,i,-N,c)||!c&&ti(e,t,i,-N,!0);return z||(e.cantEdit=!0,Ze(e.first,0))}function zs(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?x(e,Ze(t.line-1)):null:i>0&&t.ch==(n||mt(e,t.line)).text.length?t.line=0;--c)Xs(e,{from:n[c].from,to:n[c].to,text:c?[""]:t.text,origin:t.origin});else Xs(e,t)}function Xs(e,t){if(t.text.length==1&&t.text[0]==""&&Ct(t.from,t.to)==0)return;var i=Ia(e,t);Ns(e,t,i,e.cm?e.cm.curOp.id:NaN),Ai(e,t,i,Qr(e,t));var n=[];On(e,function(c,N){!N&&ne(n,c.history)==-1&&(Qs(c.history,t),n.push(c.history)),Ai(c,t,null,Qr(c,t))})}function ta(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var c=e.history,N,z=e.sel,Q=t=="undo"?c.done:c.undone,q=t=="undo"?c.undone:c.done,te=0;te=0;--ke){var Ke=Me(ke);if(Ke)return Ke.v}}function $s(e,t){if(t==0)return;if(e.first+=t,e.sel=new Yr(fe(e.sel.ranges,function(c){return new Gt(Ze(c.anchor.line+t,c.anchor.ch),Ze(c.head.line+t,c.head.ch))}),e.sel.primIndex),e.cm){Mr(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;ne.lastLine())return;if(t.from.lineN&&(t={from:t.from,to:Ze(N,mt(e,N).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Br(e,t.from,t.to),i||(i=Ia(e,t)),e.cm?_l(e.cm,t,n):ka(e,t,n),qi(e,i,ge),e.cantEdit&&ea(e,Ze(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,i){var n=e.doc,c=e.display,N=t.from,z=t.to,Q=!1,q=N.line;e.options.lineWrapping||(q=Rt(Ar(mt(n,N.line))),n.iter(q,z.line+1,function(ke){if(ke==c.maxLine)return Q=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ae(e),ka(n,t,i,ds(e)),e.options.lineWrapping||(n.iter(q,N.line+t.text.length,function(ke){var Ke=pi(ke);Ke>c.maxLineLength&&(c.maxLine=ke,c.maxLineLength=Ke,c.maxLineChanged=!0,Q=!1)}),Q&&(e.curOp.updateMaxLine=!0)),Zr(n,N.line),wi(e,400);var te=t.text.length-(z.line-N.line)-1;t.full?Mr(e):N.line==z.line&&t.text.length==1&&!Ds(e.doc,t)?wn(e,N.line,"text"):Mr(e,N.line,z.line+1,te);var pe=_e(e,"changes"),ye=_e(e,"change");if(ye||pe){var Me={from:N,to:z,text:t.text,removed:t.removed,origin:t.origin};ye&&br(e,"change",e,Me),pe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Me)}e.display.selForContextMenu=null}function ni(e,t,i,n,c){var N;n||(n=i),Ct(n,i)<0&&(N=[n,i],i=N[0],n=N[1]),typeof t=="string"&&(t=e.splitLines(t)),ri(e,{from:i,to:n,text:t,origin:c})}function Js(e,t,i,n){i1||!(this.children[0]instanceof Ri))){var Q=[];this.collapse(Q),this.children=[new Ri(Q)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var z=c.lines.length%25+25,Q=z;Q10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=te,e.display.maxLineLength=pe,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Mr(e,n,c+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gs(e.doc)),e&&br(e,"markerCleared",e,this,n,c),t&&Wn(e),this.parent&&this.parent.clear()},Rn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,c=0;c0||z==0&&N.clearWhenEmpty!==!1)return N;if(N.replacedWith&&(N.collapsed=!0,N.widgetNode=S("span",[N.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||N.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(N.widgetNode.insertLeft=!0)),N.collapsed){if(fr(e,t.line,t,i,N)||t.line!=i.line&&fr(e,i.line,t,i,N))throw new Error("Inserting collapsed marker partially overlapping an existing one");un()}N.addToHistory&&Ns(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var Q=t.line,q=e.cm,te;if(e.iter(Q,i.line+1,function(ye){q&&N.collapsed&&!q.options.lineWrapping&&Ar(ye)==q.display.maxLine&&(te=!0),N.collapsed&&Q!=t.line&&Jt(ye,0),bn(ye,new hn(N,Q==t.line?t.ch:null,Q==i.line?i.ch:null)),++Q}),N.collapsed&&e.iter(t.line,i.line+1,function(ye){an(e,ye)&&Jt(ye,0)}),N.clearOnEnter&&Ue(N,"beforeCursorEnter",function(){return N.clear()}),N.readOnly&&(zr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),N.collapsed&&(N.id=++eo,N.atomic=!0),q){if(te&&(q.curOp.updateMaxLine=!0),N.collapsed)Mr(q,t.line,i.line+1);else if(N.className||N.startStyle||N.endStyle||N.css||N.attributes||N.title)for(var pe=t.line;pe<=i.line;pe++)wn(q,pe,"text");N.atomic&&Gs(q.doc),br(q,"markerAdded",q,N)}return N}var Di=function(e,t){this.markers=e,this.primary=t;for(var i=0;i=0;q--)ri(this,n[q]);Q?Hs(this,Q):this.cm&&Qn(this.cm)}),undo:mr(function(){ta(this,"undo")}),redo:mr(function(){ta(this,"redo")}),undoSelection:mr(function(){ta(this,"undo",!0)}),redoSelection:mr(function(){ta(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n=e.ch)&&t.push(c.marker.parent||c.marker)}return t},findMarks:function(e,t,i){e=x(this,e),t=x(this,t);var n=[],c=e.line;return this.iter(e.line,t.line+1,function(N){var z=N.markedSpans;if(z)for(var Q=0;Q=q.to||q.from==null&&c!=e.line||q.from!=null&&c==t.line&&q.from>=t.ch)&&(!i||i(q.marker))&&n.push(q.marker.parent||q.marker)}++c}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;ne)return t=e,!0;e-=N,++i}),x(this,Ze(i,t))},indexFromPos:function(e){e=x(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var pe=e.dataTransfer.getData("Text");if(pe){var ye;if(t.state.draggingText&&!t.state.draggingText.copy&&(ye=t.listSelections()),qi(t.doc,Cn(i,i)),ye)for(var Me=0;Me=0;Q--)ni(e.doc,"",n[Q].from,n[Q].to,"+delete");Qn(e)})}function Fa(e,t,i){var n=Ie(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Ua(e,t,i){var n=Fa(e,t.ch,i);return n==null?null:new Ze(t.line,n,i<0?"after":"before")}function Ba(e,t,i,n,c){if(e){t.doc.direction=="rtl"&&(c=-c);var N=qe(i,t.doc.direction);if(N){var z=c<0?re(N):N[0],Q=c<0==(z.level==1),q=Q?"after":"before",te;if(z.level>0||t.doc.direction=="rtl"){var pe=Xn(t,i);te=c<0?i.text.length-1:0;var ye=on(t,pe,te).top;te=We(function(Me){return on(t,pe,Me).top==ye},c<0==(z.level==1)?z.from:z.to-1,te),q=="before"&&(te=Fa(i,te,1))}else te=c<0?z.to:z.from;return new Ze(n,te,q)}}return new Ze(n,c<0?i.text.length:0,c<0?"before":"after")}function Ml(e,t,i,n){var c=qe(t,e.doc.direction);if(!c)return Ua(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var N=Je(c,i.ch,i.sticky),z=c[N];if(e.doc.direction=="ltr"&&z.level%2==0&&(n>0?z.to>i.ch:z.from=z.from&&Me>=pe.begin)){var ke=ye?"before":"after";return new Ze(i.line,Me,ke)}}var Ke=function(nt,ut,it){for(var pt=function(Xt,gr){return gr?new Ze(i.line,Q(Xt,1),"before"):new Ze(i.line,Xt,"after")};nt>=0&&nt0==(St.level!=1),Lt=bt?it.begin:Q(it.end,-1);if(St.from<=Lt&&Lt0?pe.end:Q(pe.begin,-1);return et!=null&&!(n>0&&et==t.text.length)&&($e=Ke(n>0?0:c.length-1,n,te(et)),$e)?$e:null}var Pi={selectAll:Vs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return si(e,function(t){if(t.empty()){var i=mt(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line0)c=new Ze(c.line,c.ch+1),e.replaceRange(N.charAt(c.ch-1)+N.charAt(c.ch-2),Ze(c.line,c.ch-2),c,"+transpose");else if(c.line>e.doc.first){var z=mt(e.doc,c.line-1).text;z&&(c=new Ze(c.line,1),e.replaceRange(N.charAt(0)+e.doc.lineSeparator()+z.charAt(z.length-1),Ze(c.line-1,z.length-1),c,"+transpose"))}}i.push(new Gt(c,c))}e.setSelections(i)})},newlineAndIndent:function(e){return Wr(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;ne&&Ct(t,this.pos)==0&&i==this.button};var Fi,Ui;function Hl(e,t){var i=+new Date;return Ui&&Ui.compare(i,e,t)?(Fi=Ui=null,"triple"):Fi&&Fi.compare(i,e,t)?(Ui=new Ha(i,e,t),Fi=null,"double"):(Fi=new Ha(i,e,t),Ui=null,"single")}function vo(e){var t=this,i=t.display;if(Ge(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,dn(i,e)){r||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Wa(t,e))return;var n=Fn(t,e),c=Pe(e),N=n?Hl(n,c):"single";if(window.focus(),c==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,c,n,N,e))return;c==1?n?Kl(t,n,N,e):xe(e)==i.scroller&&ae(e):c==2?(n&&Qi(t.doc,n),setTimeout(function(){return i.input.focus()},20)):c==3&&(D?t.display.input.onContextMenu(e):vs(t))}function Wl(e,t,i,n,c){var N="Click";return n=="double"?N="Double"+N:n=="triple"&&(N="Triple"+N),N=(t==1?"Left":t==2?"Middle":"Right")+N,Ni(e,oo(N,c),c,function(z){if(typeof z=="string"&&(z=Pi[z]),!z)return!1;var Q=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),Q=z(e,i)!=Oe}finally{e.state.suppressEdits=!1}return Q})}function Gl(e,t,i){var n=e.getOption("configureMouse"),c=n?n(e,t,i):{};if(c.unit==null){var N=a?i.shiftKey&&i.metaKey:i.altKey;c.unit=N?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(c.extend==null||e.doc.extend)&&(c.extend=e.doc.extend||i.shiftKey),c.addNew==null&&(c.addNew=s?i.metaKey:i.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(s?i.altKey:i.ctrlKey)),c}function Kl(e,t,i,n){K?setTimeout(I(gs,e),0):e.curOp.focus=B();var c=Gl(e,i,n),N=e.doc.sel,z;e.options.dragDrop&&He&&!e.isReadOnly()&&i=="single"&&(z=N.contains(t))>-1&&(Ct((z=N.ranges[z]).from(),t)<0||t.xRel>0)&&(Ct(z.to(),t)>0||t.xRel<0)?zl(e,n,t,c):Vl(e,n,t,c)}function zl(e,t,i,n){var c=e.display,N=!1,z=pr(e,function(te){r&&(c.scroller.draggable=!1),e.state.draggingText=!1,lt(c.wrapper.ownerDocument,"mouseup",z),lt(c.wrapper.ownerDocument,"mousemove",Q),lt(c.scroller,"dragstart",q),lt(c.scroller,"drop",z),N||(ae(te),n.addNew||Qi(e.doc,i,null,null,n.extend),r&&!p||K&&G==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),Q=function(te){N=N||Math.abs(t.clientX-te.clientX)+Math.abs(t.clientY-te.clientY)>=10},q=function(){return N=!0};r&&(c.scroller.draggable=!0),e.state.draggingText=z,z.copy=!n.moveOnDrag,c.scroller.dragDrop&&c.scroller.dragDrop(),Ue(c.wrapper.ownerDocument,"mouseup",z),Ue(c.wrapper.ownerDocument,"mousemove",Q),Ue(c.scroller,"dragstart",q),Ue(c.scroller,"drop",z),vs(e),setTimeout(function(){return c.input.focus()},20)}function yo(e,t,i){if(i=="char")return new Gt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Gt(Ze(t.line,0),x(e.doc,Ze(t.line+1,0)));var n=i(e,t);return new Gt(n.from,n.to)}function Vl(e,t,i,n){var c=e.display,N=e.doc;ae(t);var z,Q,q=N.sel,te=q.ranges;if(n.addNew&&!n.extend?(Q=N.sel.contains(i),Q>-1?z=te[Q]:z=new Gt(i,i)):(z=N.sel.primary(),Q=N.sel.primIndex),n.unit=="rectangle")n.addNew||(z=new Gt(i,i)),i=Fn(e,t,!0,!0),Q=-1;else{var pe=yo(e,i,n.unit);n.extend?z=Pa(z,pe.anchor,pe.head,n.extend):z=pe}n.addNew?Q==-1?(Q=te.length,wr(N,tn(e,te.concat([z]),Q),{scroll:!1,origin:"*mouse"})):te.length>1&&te[Q].empty()&&n.unit=="char"&&!n.extend?(wr(N,tn(e,te.slice(0,Q).concat(te.slice(Q+1)),0),{scroll:!1,origin:"*mouse"}),q=N.sel):Na(N,Q,z,Te):(Q=0,wr(N,new Yr([z],0),Te),q=N.sel);var ye=i;function Me(it){if(Ct(ye,it)==0)return;if(ye=it,n.unit=="rectangle"){for(var pt=[],St=e.options.tabSize,bt=H(mt(N,i.line).text,i.ch,St),Lt=H(mt(N,it.line).text,it.ch,St),Xt=Math.min(bt,Lt),gr=Math.max(bt,Lt),er=Math.min(i.line,it.line),Gr=Math.min(e.lastLine(),Math.max(i.line,it.line));er<=Gr;er++){var Nr=mt(N,er).text,sr=Le(Nr,Xt,St);Xt==gr?pt.push(new Gt(Ze(er,sr),Ze(er,sr))):Nr.length>sr&&pt.push(new Gt(Ze(er,sr),Ze(er,Le(Nr,gr,St))))}pt.length||pt.push(new Gt(i,i)),wr(N,tn(e,q.ranges.slice(0,Q).concat(pt),Q),{origin:"*mouse",scroll:!1}),e.scrollIntoView(it)}else{var Fr=z,_r=yo(e,it,n.unit),hr=Fr.anchor,or;Ct(_r.anchor,hr)>0?(or=_r.head,hr=yn(Fr.from(),_r.anchor)):(or=_r.anchor,hr=vn(Fr.to(),_r.head));var rr=q.ranges.slice(0);rr[Q]=Yl(e,new Gt(x(N,hr),or)),wr(N,tn(e,rr,Q),Te)}}var ke=c.wrapper.getBoundingClientRect(),Ke=0;function $e(it){var pt=++Ke,St=Fn(e,it,!0,n.unit=="rectangle");if(!St)return;if(Ct(St,ye)!=0){e.curOp.focus=B(),Me(St);var bt=Vi(c,N);(St.line>=bt.to||St.lineke.bottom?20:0;Lt&&setTimeout(pr(e,function(){if(Ke!=pt)return;c.scroller.scrollTop+=Lt,$e(it)}),50)}}function et(it){e.state.selectingText=!1,Ke=Infinity,it&&(ae(it),c.input.focus()),lt(c.wrapper.ownerDocument,"mousemove",nt),lt(c.wrapper.ownerDocument,"mouseup",ut),N.history.lastSelOrigin=null}var nt=pr(e,function(it){it.buttons===0||!Pe(it)?et(it):$e(it)}),ut=pr(e,et);e.state.selectingText=ut,Ue(c.wrapper.ownerDocument,"mousemove",nt),Ue(c.wrapper.ownerDocument,"mouseup",ut)}function Yl(e,t){var i=t.anchor,n=t.head,c=mt(e.doc,i.line);if(Ct(i,n)==0&&i.sticky==n.sticky)return t;var N=qe(c);if(!N)return t;var z=Je(N,i.ch,i.sticky),Q=N[z];if(Q.from!=i.ch&&Q.to!=i.ch)return t;var q=z+(Q.from==i.ch==(Q.level!=1)?0:1);if(q==0||q==N.length)return t;var te;if(n.line!=i.line)te=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var pe=Je(N,n.ch,n.sticky),ye=pe-z||(n.ch-i.ch)*(Q.level==1?-1:1);pe==q-1||pe==q?te=ye<0:te=ye>0}var Me=N[q+(te?-1:0)],ke=te==(Me.level==1),Ke=ke?Me.from:Me.to,$e=ke?"after":"before";return i.ch==Ke&&i.sticky==$e?t:new Gt(new Ze(i.line,Ke,$e),n)}function bo(e,t,i,n){var c,N;if(t.touches)c=t.touches[0].clientX,N=t.touches[0].clientY;else try{c=t.clientX,N=t.clientY}catch(Me){return!1}if(c>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ae(t);var z=e.display,Q=z.lineDiv.getBoundingClientRect();if(N>Q.bottom||!_e(e,i))return de(t);N-=Q.top-z.viewOffset;for(var q=0;q=c){var pe=lr(e.doc,N),ye=e.display.gutterSpecs[q];return je(e,i,e,pe,ye.className,t),de(t)}}}function Wa(e,t){return bo(e,t,"gutterClick",!0)}function _o(e,t){if(dn(e.display,t)||Xl(e,t))return;if(Ge(e,t,"contextmenu"))return;D||e.display.input.onContextMenu(t)}function Xl(e,t){return _e(e,"gutterContextMenu")?bo(e,t,"gutterContextMenu",!1):!1}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yi(e)}var oi={toString:function(){return"CodeMirror.Init"}},xo={},aa={};function $l(e){var t=e.optionHandlers;function i(n,c,N,z){e.defaults[n]=c,N&&(t[n]=z?function(Q,q,te){te!=oi&&N(Q,q,te)}:N)}e.defineOption=i,e.Init=oi,i("value","",function(n,c){return n.setValue(c)},!0),i("mode",null,function(n,c){n.doc.modeOption=c,Da(n)},!0),i("indentUnit",2,Da,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Ci(n),yi(n),Mr(n)},!0),i("lineSeparator",null,function(n,c){if(n.doc.lineSep=c,!c)return;var N=[],z=n.doc.first;n.doc.iter(function(q){for(var te=0;;){var pe=q.text.indexOf(c,te);if(pe==-1)break;te=pe+c.length,N.push(Ze(z,pe))}z++});for(var Q=N.length-1;Q>=0;Q--)ni(n.doc,c,N[Q],Ze(N[Q].line,N[Q].ch+c.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,c,N){n.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),N!=oi&&n.refresh()}),i("specialCharPlaceholder",Yt,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,c){return n.getInputField().spellcheck=c},!0),i("autocorrect",!1,function(n,c){return n.getInputField().autocorrect=c},!0),i("autocapitalize",!1,function(n,c){return n.getInputField().autocapitalize=c},!0),i("rtlMoveVisually",!O),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Eo(n),Si(n)},!0),i("keyMap","default",function(n,c,N){var z=na(c),Q=N!=oi&&na(N);Q&&Q.detach&&Q.detach(n,z),z.attach&&z.attach(n,Q||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,c){n.display.gutterSpecs=La(c,n.options.lineNumbers),Si(n)},!0),i("fixedGutter",!0,function(n,c){n.display.gutters.style.left=c?_a(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return qn(n)},!0),i("scrollbarStyle","native",function(n){Ts(n),qn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,c){n.display.gutterSpecs=La(n.options.gutters,c),Si(n)},!0),i("firstLineNumber",1,Si,!0),i("lineNumberFormatter",function(n){return n},Si,!0),i("showCursorWhenSelecting",!1,bi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,c){c=="nocursor"&&(Zn(n),n.display.input.blur()),n.display.input.readOnlyChanged(c)}),i("screenReaderLabel",null,function(n,c){c=c===""?null:c,n.display.input.screenReaderLabelChanged(c)}),i("disableInput",!1,function(n,c){c||n.display.input.reset()},!0),i("dragDrop",!0,Jl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,bi,!0),i("singleCursorHeightPerLine",!0,bi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Ci,!0),i("addModeClass",!1,Ci,!0),i("pollInterval",100),i("undoDepth",200,function(n,c){return n.doc.history.undoDepth=c}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Ci,!0),i("moveInputWithCursor",!0,function(n,c){c||n.display.input.resetPosition()}),i("tabindex",null,function(n,c){return n.display.input.getField().tabIndex=c||""}),i("autofocus",null),i("direction","ltr",function(n,c){return n.doc.setDirection(c)},!0),i("phrases",null)}function Jl(e,t,i){var n=i&&i!=oi;if(!t!=!n){var c=e.display.dragFunctions,N=t?Ue:lt;N(e.display.scroller,"dragstart",c.start),N(e.display.scroller,"dragenter",c.enter),N(e.display.scroller,"dragover",c.over),N(e.display.scroller,"dragleave",c.leave),N(e.display.scroller,"drop",c.drop)}}function Zl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),ji(e)),Ea(e),Mr(e),yi(e),setTimeout(function(){return qn(e)},100)}function Qt(e,t){var i=this;if(!(this instanceof Qt))return new Qt(e,t);this.options=t=t?g(t):{},g(xo,t,!1);var n=t.value;typeof n=="string"?n=new Pr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var c=new Qt.inputStyles[t.inputStyle](this),N=this.display=new hl(e,n,c,t);N.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},t.autofocus&&!o&&N.input.focus(),K&&G<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ql(this),Rl(),Hn(this),this.curOp.forceUpdate=!0,ks(this,n),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Ta(i)},20):Zn(this);for(var z in aa)aa.hasOwnProperty(z)&&aa[z](this,t[z],oi);Cs(this),t.finishInit&&t.finishInit(this);for(var Q=0;Q20*20}Ue(t.scroller,"touchstart",function(q){if(!Ge(e,q)&&!N(q)&&!Wa(e,q)){t.input.ensurePolled(),clearTimeout(i);var te=+new Date;t.activeTouch={start:te,moved:!1,prev:te-n.end<=300?n:null},q.touches.length==1&&(t.activeTouch.left=q.touches[0].pageX,t.activeTouch.top=q.touches[0].pageY)}}),Ue(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ue(t.scroller,"touchend",function(q){var te=t.activeTouch;if(te&&!dn(t,q)&&te.left!=null&&!te.moved&&new Date-te.start<300){var pe=e.coordsChar(t.activeTouch,"page"),ye;!te.prev||z(te,te.prev)?ye=new Gt(pe,pe):!te.prev.prev||z(te,te.prev.prev)?ye=e.findWordAt(pe):ye=new Gt(Ze(pe.line,0),x(e.doc,Ze(pe.line+1,0))),e.setSelection(ye.anchor,ye.head),e.focus(),ae(q)}c()}),Ue(t.scroller,"touchcancel",c),Ue(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ei(e,t.scroller.scrollTop),Bn(e,t.scroller.scrollLeft,!0),je(e,"scroll",e))}),Ue(t.scroller,"mousewheel",function(q){return Rs(e,q)}),Ue(t.scroller,"DOMMouseScroll",function(q){return Rs(e,q)}),Ue(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(q){Ge(e,q)||me(q)},over:function(q){Ge(e,q)||(Ol(e,q),me(q))},start:function(q){return Al(e,q)},drop:pr(e,Cl),leave:function(q){Ge(e,q)||no(e)}};var Q=t.input.getField();Ue(Q,"keyup",function(q){return mo.call(e,q)}),Ue(Q,"keydown",pr(e,po)),Ue(Q,"keypress",pr(e,go)),Ue(Q,"focus",function(q){return Ta(e,q)}),Ue(Q,"blur",function(q){return Zn(e,q)})}var Ga=[];Qt.defineInitHook=function(e){return Ga.push(e)};function Bi(e,t,i,n){var c=e.doc,N;i==null&&(i="add"),i=="smart"&&(c.mode.indent?N=tt(e,t).state:i="prev");var z=e.options.tabSize,Q=mt(c,t),q=H(Q.text,null,z);Q.stateAfter&&(Q.stateAfter=null);var te=Q.text.match(/^\s*/)[0],pe;if(!n&&!/\S/.test(Q.text))pe=0,i="not";else if(i=="smart"&&(pe=c.mode.indent(N,Q.text.slice(te.length),Q.text),pe==Oe||pe>150)){if(!n)return;i="prev"}i=="prev"?t>c.first?pe=H(mt(c,t-1).text,null,z):pe=0:i=="add"?pe=q+e.options.indentUnit:i=="subtract"?pe=q-e.options.indentUnit:typeof i=="number"&&(pe=q+i),pe=Math.max(0,pe);var ye="",Me=0;if(e.options.indentWithTabs)for(var ke=Math.floor(pe/z);ke;--ke)Me+=z,ye+=" ";if(Mez,q=ct(t),te=null;if(Q&&n.ranges.length>1)if(rn&&rn.text.join(` `)==t){if(n.ranges.length%rn.text.length==0){te=[];for(var pe=0;pe=0;Me--){var ke=n.ranges[Me],Ke=ke.from(),$e=ke.to();ke.empty()&&(i&&i>0?Ke=Ze(Ke.line,Ke.ch-i):e.state.overwrite&&!Q?$e=Ze($e.line,Math.min(mt(N,$e.line).text.length,$e.ch+re(q).length)):Q&&rn&&rn.lineWise&&rn.text.join(` `)==q.join(` -`)&&(Ke=$e=Ze(Ke.line,0)));var et={from:Ke,to:$e,text:te?te[Me%te.length]:q,origin:d||(Q?"paste":e.state.cutIncoming>z?"cut":"+input")};ri(e.doc,et),br(e,"inputRead",e,et)}t&&!Q&&wo(e,t),Qn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function To(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Wr(t,function(){return Ka(t,i,0,null,"paste")}),!0}function wo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var d=i.ranges[n];if(d.head.ch>100||n&&i.ranges[n-1].head.line==d.head.line)continue;var N=e.getModeAt(d.head),z=!1;if(N.electricChars){for(var Q=0;Q-1){z=Bi(e,d.head.line,"smart");break}}else N.electricInput&&(N.electricInput.test(mt(e.doc,d.head.line).text.slice(0,d.head.ch))&&(z=Bi(e,d.head.line,"smart")));z&&br(e,"electricInput",e,d.head.line)}}function So(e){for(var t=[],i=[],n=0;nN&&(Bi(this,Q.head.line,n,!0),N=Q.head.line,z==this.doc.sel.primIndex&&Qn(this));else{var q=Q.from(),te=Q.to(),pe=Math.max(N,q.line);N=Math.min(this.lastLine(),te.line-(te.ch?0:1))+1;for(var ye=pe;ye0&&Na(this.doc,z,new Gt(q,Me[z].to()),ge)}}}),getTokenAt:function(n,d){return $t(this,n,d)},getLineTokens:function(n,d){return $t(this,Ze(n),d,!0)},getTokenTypeAt:function(n){n=x(this.doc,n);var d=Ye(this,mt(this.doc,n.line)),N=0,z=(d.length-1)/2,Q=n.ch,q;if(Q==0)q=d[2];else for(;;){var te=N+z>>1;if((te?d[te*2-1]:0)>=Q)z=te;else if(d[te*2+1]q&&(n=q,z=!0),Q=mt(this.doc,n)}else Q=n;return Wi(this,Q,{top:0,left:0},d||"page",N||z).top+(z?this.doc.height-qr(Q):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,d,N,z,Q){var q=this.display;n=en(this,x(this.doc,n));var te=n.bottom,pe=n.left;if(d.style.position="absolute",d.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(d),q.sizer.appendChild(d),z=="over")te=n.top;else if(z=="above"||z=="near"){var ye=Math.max(q.wrapper.clientHeight,this.doc.height),Me=Math.max(q.sizer.clientWidth,q.lineSpace.clientWidth);(z=="above"||n.bottom+d.offsetHeight>ye)&&n.top>d.offsetHeight?te=n.top-d.offsetHeight:n.bottom+d.offsetHeight<=ye&&(te=n.bottom),pe+d.offsetWidth>Me&&(pe=Me-d.offsetWidth)}d.style.top=te+"px",d.style.left=d.style.right="",Q=="right"?(pe=q.sizer.clientWidth-d.offsetWidth,d.style.right="0px"):(Q=="left"?pe=0:Q=="middle"&&(pe=(q.sizer.clientWidth-d.offsetWidth)/2),d.style.left=pe+"px"),N&&Jo(this,{left:pe,top:te,right:pe+d.offsetWidth,bottom:te+d.offsetHeight})},triggerOnKeyDown:Or(po),triggerOnKeyPress:Or(go),triggerOnKeyUp:mo,triggerOnMouseDown:Or(vo),execCommand:function(n){if(Pi.hasOwnProperty(n))return Pi[n].call(null,this)},triggerElectric:Or(function(n){wo(this,n)}),findPosH:function(n,d,N,z){var Q=1;d<0&&(Q=-1,d=-d);for(var q=x(this.doc,n),te=0;te0&&pe(N.charAt(z-1));)--z;for(;Q.5||this.options.lineWrapping)&&Ea(this),je(this,"refresh",this)}),swapDoc:Or(function(n){var d=this.doc;return d.cm=null,this.state.selectingText&&this.state.selectingText(),ks(this,n),yi(this),this.display.input.reset(),_i(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,br(this,"swapDoc",this,d),d}),phrase:function(n){var d=this.options.phrases;return d&&Object.prototype.hasOwnProperty.call(d,n)?d[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(n,d,N){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][d]=N},e.registerGlobalHelper=function(n,d,N,z){e.registerHelper(n,d,z),i[n]._global.push({pred:N,val:z})}}function za(e,t,i,n,d){var N=t,z=i,Q=mt(e,t.line),q=d&&e.direction=="rtl"?-i:i;function te(){var ut=t.line+q;return ut=e.first+e.size?!1:(t=new Ze(ut,t.ch,t.sticky),Q=mt(e,ut))}function pe(ut){var it;if(n=="codepoint"){var pt=Q.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(pt)?it=null:it=new Ze(t.line,Math.max(0,Math.min(Q.text.length,t.ch+i*(pt>=55296&&pt<56320?2:1))),-i)}else d?it=Ml(e.cm,Q,t,i):it=Ua(Q,t,i);if(it==null)if(!ut&&te())t=Ba(d,e.cm,Q,t.line,q);else return!1;else t=it;return!0}if(n=="char"||n=="codepoint")pe();else if(n=="column")pe(!0);else if(n=="word"||n=="group")for(var ye=null,Me=n=="group",ke=e.cm&&e.cm.getHelper(t,"wordChars"),Ke=!0;!(i<0&&!pe(!Ke));Ke=!1){var $e=Q.text.charAt(t.ch)||` +`)&&(Ke=$e=Ze(Ke.line,0)));var et={from:Ke,to:$e,text:te?te[Me%te.length]:q,origin:c||(Q?"paste":e.state.cutIncoming>z?"cut":"+input")};ri(e.doc,et),br(e,"inputRead",e,et)}t&&!Q&&wo(e,t),Qn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function To(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Wr(t,function(){return Ka(t,i,0,null,"paste")}),!0}function wo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var c=i.ranges[n];if(c.head.ch>100||n&&i.ranges[n-1].head.line==c.head.line)continue;var N=e.getModeAt(c.head),z=!1;if(N.electricChars){for(var Q=0;Q-1){z=Bi(e,c.head.line,"smart");break}}else N.electricInput&&(N.electricInput.test(mt(e.doc,c.head.line).text.slice(0,c.head.ch))&&(z=Bi(e,c.head.line,"smart")));z&&br(e,"electricInput",e,c.head.line)}}function So(e){for(var t=[],i=[],n=0;nN&&(Bi(this,Q.head.line,n,!0),N=Q.head.line,z==this.doc.sel.primIndex&&Qn(this));else{var q=Q.from(),te=Q.to(),pe=Math.max(N,q.line);N=Math.min(this.lastLine(),te.line-(te.ch?0:1))+1;for(var ye=pe;ye0&&Na(this.doc,z,new Gt(q,Me[z].to()),ge)}}}),getTokenAt:function(n,c){return $t(this,n,c)},getLineTokens:function(n,c){return $t(this,Ze(n),c,!0)},getTokenTypeAt:function(n){n=x(this.doc,n);var c=Ye(this,mt(this.doc,n.line)),N=0,z=(c.length-1)/2,Q=n.ch,q;if(Q==0)q=c[2];else for(;;){var te=N+z>>1;if((te?c[te*2-1]:0)>=Q)z=te;else if(c[te*2+1]q&&(n=q,z=!0),Q=mt(this.doc,n)}else Q=n;return Wi(this,Q,{top:0,left:0},c||"page",N||z).top+(z?this.doc.height-qr(Q):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,c,N,z,Q){var q=this.display;n=en(this,x(this.doc,n));var te=n.bottom,pe=n.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),q.sizer.appendChild(c),z=="over")te=n.top;else if(z=="above"||z=="near"){var ye=Math.max(q.wrapper.clientHeight,this.doc.height),Me=Math.max(q.sizer.clientWidth,q.lineSpace.clientWidth);(z=="above"||n.bottom+c.offsetHeight>ye)&&n.top>c.offsetHeight?te=n.top-c.offsetHeight:n.bottom+c.offsetHeight<=ye&&(te=n.bottom),pe+c.offsetWidth>Me&&(pe=Me-c.offsetWidth)}c.style.top=te+"px",c.style.left=c.style.right="",Q=="right"?(pe=q.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(Q=="left"?pe=0:Q=="middle"&&(pe=(q.sizer.clientWidth-c.offsetWidth)/2),c.style.left=pe+"px"),N&&Jo(this,{left:pe,top:te,right:pe+c.offsetWidth,bottom:te+c.offsetHeight})},triggerOnKeyDown:Or(po),triggerOnKeyPress:Or(go),triggerOnKeyUp:mo,triggerOnMouseDown:Or(vo),execCommand:function(n){if(Pi.hasOwnProperty(n))return Pi[n].call(null,this)},triggerElectric:Or(function(n){wo(this,n)}),findPosH:function(n,c,N,z){var Q=1;c<0&&(Q=-1,c=-c);for(var q=x(this.doc,n),te=0;te0&&pe(N.charAt(z-1));)--z;for(;Q.5||this.options.lineWrapping)&&Ea(this),je(this,"refresh",this)}),swapDoc:Or(function(n){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),ks(this,n),yi(this),this.display.input.reset(),_i(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,br(this,"swapDoc",this,c),c}),phrase:function(n){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,n)?c[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(n,c,N){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][c]=N},e.registerGlobalHelper=function(n,c,N,z){e.registerHelper(n,c,z),i[n]._global.push({pred:N,val:z})}}function za(e,t,i,n,c){var N=t,z=i,Q=mt(e,t.line),q=c&&e.direction=="rtl"?-i:i;function te(){var ut=t.line+q;return ut=e.first+e.size?!1:(t=new Ze(ut,t.ch,t.sticky),Q=mt(e,ut))}function pe(ut){var it;if(n=="codepoint"){var pt=Q.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(pt)?it=null:it=new Ze(t.line,Math.max(0,Math.min(Q.text.length,t.ch+i*(pt>=55296&&pt<56320?2:1))),-i)}else c?it=Ml(e.cm,Q,t,i):it=Ua(Q,t,i);if(it==null)if(!ut&&te())t=Ba(c,e.cm,Q,t.line,q);else return!1;else t=it;return!0}if(n=="char"||n=="codepoint")pe();else if(n=="column")pe(!0);else if(n=="word"||n=="group")for(var ye=null,Me=n=="group",ke=e.cm&&e.cm.getHelper(t,"wordChars"),Ke=!0;!(i<0&&!pe(!Ke));Ke=!1){var $e=Q.text.charAt(t.ch)||` `,et=Be($e,ke)?"w":Me&&$e==` -`?"n":!Me||/\s/.test($e)?null:"p";if(Me&&!Ke&&!et&&(et="s"),ye&&ye!=et){i<0&&(i=1,pe(),t.sticky="after");break}if(et&&(ye=et),i>0&&!pe(!Ke))break}var nt=ea(e,t,N,z,!0);return mn(N,nt)&&(nt.hitSide=!0),nt}function Oo(e,t,i,n){var d=e.doc,N=t.left,z;if(n=="page"){var Q=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),q=Math.max(Q-.5*$n(e.display),3);z=(i>0?t.bottom:t.top)+i*q}else n=="line"&&(z=i>0?t.bottom+3:t.top-3);for(var te;!(te=va(e,N,z),!te.outside);){if(i<0?z<=0:z>=d.height){te.hitSide=!0;break}z+=i*5}return te}var zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zt.prototype.init=function(e){var t=this,i=this,n=i.cm,d=i.div=e.lineDiv;Co(d,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function N(Q){for(var q=Q.target;q;q=q.parentNode){if(q==d)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(q.className))break}return!1}Ue(d,"paste",function(Q){if(!N(Q)||Ge(n,Q)||To(Q,n))return;G<=11&&setTimeout(pr(n,function(){return t.updateFromDOM()}),20)}),Ue(d,"compositionstart",function(Q){t.composing={data:Q.data,done:!1}}),Ue(d,"compositionupdate",function(Q){t.composing||(t.composing={data:Q.data,done:!1})}),Ue(d,"compositionend",function(Q){t.composing&&(Q.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ue(d,"touchstart",function(){return i.forceCompositionEnd()}),Ue(d,"input",function(){t.composing||t.readFromDOMSoon()});function z(Q){if(!N(Q)||Ge(n,Q))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()}),Q.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var q=So(n);sa({lineWise:!0,text:q.text}),Q.type=="cut"&&n.operation(function(){n.setSelections(q.ranges,0,ge),n.replaceSelection("",null,"cut")})}else return;if(Q.clipboardData){Q.clipboardData.clearData();var te=rn.text.join(` +`?"n":!Me||/\s/.test($e)?null:"p";if(Me&&!Ke&&!et&&(et="s"),ye&&ye!=et){i<0&&(i=1,pe(),t.sticky="after");break}if(et&&(ye=et),i>0&&!pe(!Ke))break}var nt=ea(e,t,N,z,!0);return mn(N,nt)&&(nt.hitSide=!0),nt}function Oo(e,t,i,n){var c=e.doc,N=t.left,z;if(n=="page"){var Q=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),q=Math.max(Q-.5*$n(e.display),3);z=(i>0?t.bottom:t.top)+i*q}else n=="line"&&(z=i>0?t.bottom+3:t.top-3);for(var te;!(te=va(e,N,z),!te.outside);){if(i<0?z<=0:z>=c.height){te.hitSide=!0;break}z+=i*5}return te}var zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zt.prototype.init=function(e){var t=this,i=this,n=i.cm,c=i.div=e.lineDiv;Co(c,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function N(Q){for(var q=Q.target;q;q=q.parentNode){if(q==c)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(q.className))break}return!1}Ue(c,"paste",function(Q){if(!N(Q)||Ge(n,Q)||To(Q,n))return;G<=11&&setTimeout(pr(n,function(){return t.updateFromDOM()}),20)}),Ue(c,"compositionstart",function(Q){t.composing={data:Q.data,done:!1}}),Ue(c,"compositionupdate",function(Q){t.composing||(t.composing={data:Q.data,done:!1})}),Ue(c,"compositionend",function(Q){t.composing&&(Q.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ue(c,"touchstart",function(){return i.forceCompositionEnd()}),Ue(c,"input",function(){t.composing||t.readFromDOMSoon()});function z(Q){if(!N(Q)||Ge(n,Q))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()}),Q.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var q=So(n);sa({lineWise:!0,text:q.text}),Q.type=="cut"&&n.operation(function(){n.setSelections(q.ranges,0,ge),n.replaceSelection("",null,"cut")})}else return;if(Q.clipboardData){Q.clipboardData.clearData();var te=rn.text.join(` `);if(Q.clipboardData.setData("Text",te),Q.clipboardData.getData("Text")==te){Q.preventDefault();return}}var pe=Ao(),ye=pe.firstChild;n.display.lineSpace.insertBefore(pe,n.display.lineSpace.firstChild),ye.value=rn.text.join(` -`);var Me=document.activeElement;M(ye),setTimeout(function(){n.display.lineSpace.removeChild(pe),Me.focus(),Me==d&&i.showPrimarySelection()},50)}Ue(d,"copy",z),Ue(d,"cut",z)},zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var e=ps(this.cm,!1);return e.focus=document.activeElement==this.div,e},zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),d=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||d.line=t.display.viewFrom&&Ro(t,n)||{node:Q[0].measure.map[2],offset:0},te=d.linee.firstLine()&&(n=Ze(n.line-1,mt(e.doc,n.line-1).length)),d.ch==mt(e.doc,d.line).text.length&&d.linet.viewTo-1)return!1;var N,z,Q;n.line==t.viewFrom||(N=Un(e,n.line))==0?(z=Rt(t.view[0].line),Q=t.view[0].node):(z=Rt(t.view[N].line),Q=t.view[N-1].node.nextSibling);var q=Un(e,d.line),te,pe;if(q==t.view.length-1?(te=t.viewTo-1,pe=t.lineDiv.lastChild):(te=Rt(t.view[q+1].line)-1,pe=t.view[q+1].node.previousSibling),!Q)return!1;for(var ye=e.doc.splitLines(tu(e,Q,pe,z,te)),Me=Br(e.doc,Ze(z,0),Ze(te,mt(e.doc,te).text.length));ye.length>1&&Me.length>1;)if(re(ye)==re(Me))ye.pop(),Me.pop(),te--;else if(ye[0]==Me[0])ye.shift(),Me.shift(),z++;else break;for(var ke=0,Ke=0,$e=ye[0],et=Me[0],nt=Math.min($e.length,et.length);ken.ch&&ut.charCodeAt(ut.length-Ke-1)==it.charCodeAt(it.length-Ke-1);)ke--,Ke++;ye[ye.length-1]=ut.slice(0,ut.length-Ke).replace(/^\u200b+/,""),ye[0]=ye[0].slice(ke).replace(/\u200b+$/,"");var St=Ze(z,ke),bt=Ze(te,Me.length?re(Me).length-Ke:0);if(ye.length>1||ye[0]||Ct(St,bt))return ni(e.doc,ye,St,bt,"+input"),!0},zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},zt.prototype.reset=function(){this.forceCompositionEnd()},zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},zt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wr(this.cm,function(){return Mr(e.cm)})},zt.prototype.setUneditable=function(e){e.contentEditable="false"},zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pr(this.cm,Ka)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zt.prototype.onContextMenu=function(){},zt.prototype.resetPosition=function(){},zt.prototype.needsContentAttribute=!0;function Ro(e,t){var i=fa(e,t.line);if(!i||i.hidden)return null;var n=mt(e.doc,t.line),d=es(i,n,t.line),N=qe(n,e.doc.direction),z="left";if(N){var Q=Je(N,t.ch);z=Q%2?"right":"left"}var q=ns(d.map,t.ch,z);return q.offset=q.collapse=="right"?q.end:q.start,q}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function li(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,d){var N="",z=!1,Q=e.doc.lineSeparator(),q=!1;function te(ke){return function(Ke){return Ke.id==ke}}function pe(){z&&(N+=Q,q&&(N+=Q),z=q=!1)}function ye(ke){ke&&(pe(),N+=ke)}function Me(ke){if(ke.nodeType==1){var Ke=ke.getAttribute("cm-text");if(Ke){ye(Ke);return}var $e=ke.getAttribute("cm-marker"),et;if($e){var nt=e.findMarks(Ze(n,0),Ze(d+1,0),te(+$e));nt.length&&(et=nt[0].find(0))&&ye(Br(e.doc,et.from,et.to).join(Q));return}if(ke.getAttribute("contenteditable")=="false")return;var ut=/^(pre|div|p|li|table|br)$/i.test(ke.nodeName);if(!/^br$/i.test(ke.nodeName)&&ke.textContent.length==0)return;ut&&pe();for(var it=0;it=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ue(d,"paste",function(z){if(Ge(n,z)||To(z,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function N(z){if(Ge(n,z))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var Q=So(n);sa({lineWise:!0,text:Q.text}),z.type=="cut"?n.setSelections(Q.ranges,null,ge):(i.prevInput="",d.value=Q.text.join(` -`),M(d))}else return;z.type=="cut"&&(n.state.cutIncoming=+new Date)}Ue(d,"cut",N),Ue(d,"copy",N),Ue(e.scroller,"paste",function(z){if(cn(e,z)||Ge(n,z))return;if(!d.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var Q=new Event("paste");Q.clipboardData=z.clipboardData,d.dispatchEvent(Q)}),Ue(e.lineSpace,"selectstart",function(z){cn(e,z)||ae(z)}),Ue(d,"compositionstart",function(){var z=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:z,range:n.markText(z,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Ue(d,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},ir.prototype.createField=function(e){this.wrapper=Ao(),this.textarea=this.wrapper.firstChild},ir.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=ps(e);if(e.options.moveInputWithCursor){var d=en(e,i.sel.primary().head,"div"),N=t.wrapper.getBoundingClientRect(),z=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,d.top+z.top-N.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,d.left+z.left-N.left))}return n},ir.prototype.showSelection=function(e){var t=this.cm,i=t.display;T(i.cursorDiv,e.cursors),T(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ir.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&M(this.textarea),K&&G>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",K&&G>=9&&(this.hasSelection=null))},ir.prototype.getField=function(){return this.textarea},ir.prototype.supportsTouch=function(){return!1},ir.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||B()!=this.textarea))try{this.textarea.focus()}catch(e){}},ir.prototype.blur=function(){this.textarea.blur()},ir.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ir.prototype.receivedFocus=function(){this.slowPoll()},ir.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ir.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},ir.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ft(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var d=i.value;if(d==n&&!t.somethingSelected())return!1;if(K&&G>=9&&this.hasSelection===d||s&&/[\uf700-\uf7ff]/.test(d))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var N=d.charCodeAt(0);if(N==8203&&!n&&(n="\u200B"),N==8666)return this.reset(),this.cm.execCommand("undo")}for(var z=0,Q=Math.min(n.length,d.length);z1e3||d.indexOf(` -`)>-1?i.value=e.prevInput="":e.prevInput=d,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ir.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ir.prototype.onKeyPress=function(){K&&G>=9&&(this.hasSelection=null),this.fastPoll()},ir.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,d=t.textarea;t.contextMenuPending&&t.contextMenuPending();var N=Fn(i,e),z=n.scroller.scrollTop;if(!N||m)return;var Q=i.options.resetSelectionOnContextMenu;Q&&i.doc.sel.contains(N)==-1&&pr(i,wr)(i.doc,Cn(N),ge);var q=d.style.cssText,te=t.wrapper.style.cssText,pe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",d.style.cssText=`position: absolute; width: 30px; height: 30px; +`);var Me=document.activeElement;M(ye),setTimeout(function(){n.display.lineSpace.removeChild(pe),Me.focus(),Me==c&&i.showPrimarySelection()},50)}Ue(c,"copy",z),Ue(c,"cut",z)},zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var e=ps(this.cm,!1);return e.focus=document.activeElement==this.div,e},zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),c=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||c.line=t.display.viewFrom&&Ro(t,n)||{node:Q[0].measure.map[2],offset:0},te=c.linee.firstLine()&&(n=Ze(n.line-1,mt(e.doc,n.line-1).length)),c.ch==mt(e.doc,c.line).text.length&&c.linet.viewTo-1)return!1;var N,z,Q;n.line==t.viewFrom||(N=Un(e,n.line))==0?(z=Rt(t.view[0].line),Q=t.view[0].node):(z=Rt(t.view[N].line),Q=t.view[N-1].node.nextSibling);var q=Un(e,c.line),te,pe;if(q==t.view.length-1?(te=t.viewTo-1,pe=t.lineDiv.lastChild):(te=Rt(t.view[q+1].line)-1,pe=t.view[q+1].node.previousSibling),!Q)return!1;for(var ye=e.doc.splitLines(tu(e,Q,pe,z,te)),Me=Br(e.doc,Ze(z,0),Ze(te,mt(e.doc,te).text.length));ye.length>1&&Me.length>1;)if(re(ye)==re(Me))ye.pop(),Me.pop(),te--;else if(ye[0]==Me[0])ye.shift(),Me.shift(),z++;else break;for(var ke=0,Ke=0,$e=ye[0],et=Me[0],nt=Math.min($e.length,et.length);ken.ch&&ut.charCodeAt(ut.length-Ke-1)==it.charCodeAt(it.length-Ke-1);)ke--,Ke++;ye[ye.length-1]=ut.slice(0,ut.length-Ke).replace(/^\u200b+/,""),ye[0]=ye[0].slice(ke).replace(/\u200b+$/,"");var St=Ze(z,ke),bt=Ze(te,Me.length?re(Me).length-Ke:0);if(ye.length>1||ye[0]||Ct(St,bt))return ni(e.doc,ye,St,bt,"+input"),!0},zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},zt.prototype.reset=function(){this.forceCompositionEnd()},zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},zt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wr(this.cm,function(){return Mr(e.cm)})},zt.prototype.setUneditable=function(e){e.contentEditable="false"},zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pr(this.cm,Ka)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zt.prototype.onContextMenu=function(){},zt.prototype.resetPosition=function(){},zt.prototype.needsContentAttribute=!0;function Ro(e,t){var i=fa(e,t.line);if(!i||i.hidden)return null;var n=mt(e.doc,t.line),c=es(i,n,t.line),N=qe(n,e.doc.direction),z="left";if(N){var Q=Je(N,t.ch);z=Q%2?"right":"left"}var q=ns(c.map,t.ch,z);return q.offset=q.collapse=="right"?q.end:q.start,q}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function li(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,c){var N="",z=!1,Q=e.doc.lineSeparator(),q=!1;function te(ke){return function(Ke){return Ke.id==ke}}function pe(){z&&(N+=Q,q&&(N+=Q),z=q=!1)}function ye(ke){ke&&(pe(),N+=ke)}function Me(ke){if(ke.nodeType==1){var Ke=ke.getAttribute("cm-text");if(Ke){ye(Ke);return}var $e=ke.getAttribute("cm-marker"),et;if($e){var nt=e.findMarks(Ze(n,0),Ze(c+1,0),te(+$e));nt.length&&(et=nt[0].find(0))&&ye(Br(e.doc,et.from,et.to).join(Q));return}if(ke.getAttribute("contenteditable")=="false")return;var ut=/^(pre|div|p|li|table|br)$/i.test(ke.nodeName);if(!/^br$/i.test(ke.nodeName)&&ke.textContent.length==0)return;ut&&pe();for(var it=0;it=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ue(c,"paste",function(z){if(Ge(n,z)||To(z,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function N(z){if(Ge(n,z))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var Q=So(n);sa({lineWise:!0,text:Q.text}),z.type=="cut"?n.setSelections(Q.ranges,null,ge):(i.prevInput="",c.value=Q.text.join(` +`),M(c))}else return;z.type=="cut"&&(n.state.cutIncoming=+new Date)}Ue(c,"cut",N),Ue(c,"copy",N),Ue(e.scroller,"paste",function(z){if(dn(e,z)||Ge(n,z))return;if(!c.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var Q=new Event("paste");Q.clipboardData=z.clipboardData,c.dispatchEvent(Q)}),Ue(e.lineSpace,"selectstart",function(z){dn(e,z)||ae(z)}),Ue(c,"compositionstart",function(){var z=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:z,range:n.markText(z,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Ue(c,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},ir.prototype.createField=function(e){this.wrapper=Ao(),this.textarea=this.wrapper.firstChild},ir.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=ps(e);if(e.options.moveInputWithCursor){var c=en(e,i.sel.primary().head,"div"),N=t.wrapper.getBoundingClientRect(),z=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,c.top+z.top-N.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,c.left+z.left-N.left))}return n},ir.prototype.showSelection=function(e){var t=this.cm,i=t.display;T(i.cursorDiv,e.cursors),T(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ir.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&M(this.textarea),K&&G>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",K&&G>=9&&(this.hasSelection=null))},ir.prototype.getField=function(){return this.textarea},ir.prototype.supportsTouch=function(){return!1},ir.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||B()!=this.textarea))try{this.textarea.focus()}catch(e){}},ir.prototype.blur=function(){this.textarea.blur()},ir.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ir.prototype.receivedFocus=function(){this.slowPoll()},ir.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ir.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},ir.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ft(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var c=i.value;if(c==n&&!t.somethingSelected())return!1;if(K&&G>=9&&this.hasSelection===c||s&&/[\uf700-\uf7ff]/.test(c))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var N=c.charCodeAt(0);if(N==8203&&!n&&(n="\u200B"),N==8666)return this.reset(),this.cm.execCommand("undo")}for(var z=0,Q=Math.min(n.length,c.length);z1e3||c.indexOf(` +`)>-1?i.value=e.prevInput="":e.prevInput=c,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ir.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ir.prototype.onKeyPress=function(){K&&G>=9&&(this.hasSelection=null),this.fastPoll()},ir.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,c=t.textarea;t.contextMenuPending&&t.contextMenuPending();var N=Fn(i,e),z=n.scroller.scrollTop;if(!N||m)return;var Q=i.options.resetSelectionOnContextMenu;Q&&i.doc.sel.contains(N)==-1&&pr(i,wr)(i.doc,Cn(N),ge);var q=c.style.cssText,te=t.wrapper.style.cssText,pe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-pe.top-5)+"px; left: "+(e.clientX-pe.left-5)+`px; z-index: 1000; background: `+(K?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ye;r&&(ye=window.scrollY),n.input.focus(),r&&window.scrollTo(null,ye),n.input.reset(),i.somethingSelected()||(d.value=t.prevInput=" "),t.contextMenuPending=ke,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Me(){if(d.selectionStart!=null){var $e=i.somethingSelected(),et="\u200B"+($e?d.value:"");d.value="\u21DA",d.value=et,t.prevInput=$e?"":"\u200B",d.selectionStart=1,d.selectionEnd=et.length,n.selForContextMenu=i.doc.sel}}function ke(){if(t.contextMenuPending!=ke)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=te,d.style.cssText=q,K&&G<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=z),d.selectionStart!=null){(!K||K&&G<9)&&Me();var $e=0,et=function(){n.selForContextMenu==i.doc.sel&&d.selectionStart==0&&d.selectionEnd>0&&t.prevInput=="\u200B"?pr(i,Vs)(i):$e++<10?n.detectingSelectAll=setTimeout(et,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(et,200)}}if(K&&G>=9&&Me(),D){me(e);var Ke=function(){lt(window,"mouseup",Ke),setTimeout(ke,20)};Ue(window,"mouseup",Ke)}else setTimeout(ke,50)},ir.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ir.prototype.setUneditable=function(){},ir.prototype.needsContentAttribute=!1;function nu(e,t){if(t=t?g(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=B();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=Q.getValue()}var d;if(e.form&&(Ue(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var N=e.form;d=N.submit;try{var z=N.submit=function(){n(),N.submit=d,N.submit(),N.submit=z}}catch(q){}}t.finishInit=function(q){q.save=n,q.getTextArea=function(){return e},q.toTextArea=function(){q.toTextArea=isNaN,n(),e.parentNode.removeChild(q.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=d))}},e.style.display="none";var Q=Qt(function(q){return e.parentNode.insertBefore(q,e.nextSibling)},t);return Q}function iu(e){e.off=lt,e.on=Ue,e.wheelEventPixels=dl,e.Doc=Pr,e.splitLines=dt,e.countColumn=H,e.findColumn=Le,e.isWordChar=Ne,e.Pass=Oe,e.signal=je,e.Line=Mn,e.changeEnd=An,e.scrollbarModel=xs,e.Pos=Ze,e.cmpPos=Ct,e.modes=Zt,e.mimeModes=Dt,e.resolveMode=_t,e.getMode=Lr,e.modeExtensions=Et,e.extendMode=wt,e.copyState=Ut,e.startState=dr,e.innerMode=tr,e.commands=Pi,e.keyMap=fn,e.keyName=lo,e.isModifierKey=so,e.lookupKey=ai,e.normalizeKeyMap=kl,e.StringStream=Nt,e.SharedTextMarker=Di,e.TextMarker=Rn,e.LineWidget=Ii,e.e_preventDefault=ae,e.e_stopPropagation=ue,e.e_stop=me,e.addClass=F,e.contains=b,e.rmClass=A,e.keyNames=Ln}$l(Qt),ql(Qt);var au="iter insert remove copy getEditor constructor".split(" ");for(var la in Pr.prototype)Pr.prototype.hasOwnProperty(la)&&ne(au,la)<0&&(Qt.prototype[la]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pr.prototype[la]));return we(Pr),Qt.inputStyles={textarea:ir,contenteditable:zt},Qt.defineMode=function(e){!Qt.defaults.mode&&e!="null"&&(Qt.defaults.mode=e),Cr.apply(this,arguments)},Qt.defineMIME=Kr,Qt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qt.defineMIME("text/plain","null"),Qt.defineExtension=function(e,t){Qt.prototype[e]=t},Qt.defineDocExtension=function(e,t){Pr.prototype[e]=t},Qt.fromTextArea=nu,iu(Qt),Qt.version="5.58.2",Qt})},Y1PL:function(rt,be,Z){"use strict";Z.r(be),Z.d(be,"ResizableTextArea",function(){return ne});var ie=Z("wx14"),J=Z("1OyB"),P=Z("vuIU"),X=Z("Ji7U"),j=Z("LK+K"),U=Z("q1tI"),K=Z("VTBJ"),G=Z("rePB"),r=Z("Zm9Q"),L=Z("Kwbf"),v=Z("c+Xe"),m=Z("m+aA"),p=Z("bdgK"),h=new Map;function u(ge){ge.forEach(function(Te){var Re,Le=Te.target;(Re=h.get(Le))===null||Re===void 0||Re.forEach(function(de){return de(Le)})})}var f=new p.default(u),l=null,o=null;function s(ge,Te){h.has(ge)||(h.set(ge,new Set),f.observe(ge)),h.get(ge).add(Te)}function a(ge,Te){h.has(ge)&&(h.get(ge).delete(Te),h.get(ge).size||(f.unobserve(ge),h.delete(ge)))}var O=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(){return Object(J.a)(this,Re),Te.apply(this,arguments)}return Object(P.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(U.Component),E=U.createContext(null);function w(ge){var Te=ge.children,Re=ge.onBatchResize,Le=U.useRef(0),de=U.useRef([]),he=U.useContext(E),re=U.useCallback(function(fe,oe,De){Le.current+=1;var Fe=Le.current;de.current.push({size:fe,element:oe,data:De}),Promise.resolve().then(function(){Fe===Le.current&&(Re==null||Re(de.current),de.current=[])}),he==null||he(fe,oe,De)},[Re,he]);return U.createElement(E.Provider,{value:re},Te)}function D(ge){var Te=ge.children,Re=ge.disabled,Le=U.useRef(null),de=U.useRef(null),he=U.useContext(E),re=U.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=U.isValidElement(Te)&&Object(v.c)(Te),oe=fe?Te.ref:null,De=U.useMemo(function(){return Object(v.a)(oe,Le)},[oe,Le]),Fe=U.useRef(ge);Fe.current=ge;var Ce=U.useCallback(function(Ne){var Be=Fe.current,le=Be.onResize,ve=Be.data,Se=Ne.getBoundingClientRect(),Ie=Se.width,We=Se.height,Ve=Ne.offsetWidth,Qe=Ne.offsetHeight,Je=Math.floor(Ie),st=Math.floor(We);if(re.current.width!==Je||re.current.height!==st||re.current.offsetWidth!==Ve||re.current.offsetHeight!==Qe){var qe={width:Je,height:st,offsetWidth:Ve,offsetHeight:Qe};re.current=qe;var at=Ve===Math.round(Ie)?Ie:Ve,Ue=Qe===Math.round(We)?We:Qe,ct=Object(K.a)(Object(K.a)({},qe),{},{offsetWidth:at,offsetHeight:Ue});he==null||he(ct,Ne,ve),le&&Promise.resolve().then(function(){le(ct,Ne)})}},[]);return U.useEffect(function(){var Ne=Object(m.a)(Le.current)||Object(m.a)(de.current);return Ne&&!Re&&s(Ne,Ce),function(){return a(Ne,Ce)}},[Le.current,Re]),U.createElement(O,{ref:de},fe?U.cloneElement(Te,{ref:De}):Te)}var R="rc-observer-key";function A(ge){var Te=ge.children,Re=Object(r.a)(Te);return Re.map(function(Le,de){var he=(Le==null?void 0:Le.key)||"".concat(R,"-").concat(de);return U.createElement(D,Object(ie.a)({},ge,{key:he}),Le)})}A.Collection=w;var C=A,T=Z("bT9E"),c=Z("TSYQ"),S=Z.n(c),y=` + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ye;r&&(ye=window.scrollY),n.input.focus(),r&&window.scrollTo(null,ye),n.input.reset(),i.somethingSelected()||(c.value=t.prevInput=" "),t.contextMenuPending=ke,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Me(){if(c.selectionStart!=null){var $e=i.somethingSelected(),et="\u200B"+($e?c.value:"");c.value="\u21DA",c.value=et,t.prevInput=$e?"":"\u200B",c.selectionStart=1,c.selectionEnd=et.length,n.selForContextMenu=i.doc.sel}}function ke(){if(t.contextMenuPending!=ke)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=te,c.style.cssText=q,K&&G<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=z),c.selectionStart!=null){(!K||K&&G<9)&&Me();var $e=0,et=function(){n.selForContextMenu==i.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&t.prevInput=="\u200B"?pr(i,Vs)(i):$e++<10?n.detectingSelectAll=setTimeout(et,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(et,200)}}if(K&&G>=9&&Me(),D){me(e);var Ke=function(){lt(window,"mouseup",Ke),setTimeout(ke,20)};Ue(window,"mouseup",Ke)}else setTimeout(ke,50)},ir.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ir.prototype.setUneditable=function(){},ir.prototype.needsContentAttribute=!1;function nu(e,t){if(t=t?g(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=B();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=Q.getValue()}var c;if(e.form&&(Ue(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var N=e.form;c=N.submit;try{var z=N.submit=function(){n(),N.submit=c,N.submit(),N.submit=z}}catch(q){}}t.finishInit=function(q){q.save=n,q.getTextArea=function(){return e},q.toTextArea=function(){q.toTextArea=isNaN,n(),e.parentNode.removeChild(q.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=c))}},e.style.display="none";var Q=Qt(function(q){return e.parentNode.insertBefore(q,e.nextSibling)},t);return Q}function iu(e){e.off=lt,e.on=Ue,e.wheelEventPixels=cl,e.Doc=Pr,e.splitLines=ct,e.countColumn=H,e.findColumn=Le,e.isWordChar=Ne,e.Pass=Oe,e.signal=je,e.Line=Mn,e.changeEnd=An,e.scrollbarModel=xs,e.Pos=Ze,e.cmpPos=Ct,e.modes=Zt,e.mimeModes=Dt,e.resolveMode=_t,e.getMode=Lr,e.modeExtensions=Et,e.extendMode=wt,e.copyState=Ut,e.startState=cr,e.innerMode=tr,e.commands=Pi,e.keyMap=fn,e.keyName=lo,e.isModifierKey=so,e.lookupKey=ai,e.normalizeKeyMap=kl,e.StringStream=Nt,e.SharedTextMarker=Di,e.TextMarker=Rn,e.LineWidget=Ii,e.e_preventDefault=ae,e.e_stopPropagation=ue,e.e_stop=me,e.addClass=F,e.contains=b,e.rmClass=A,e.keyNames=Ln}$l(Qt),ql(Qt);var au="iter insert remove copy getEditor constructor".split(" ");for(var la in Pr.prototype)Pr.prototype.hasOwnProperty(la)&&ne(au,la)<0&&(Qt.prototype[la]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pr.prototype[la]));return we(Pr),Qt.inputStyles={textarea:ir,contenteditable:zt},Qt.defineMode=function(e){!Qt.defaults.mode&&e!="null"&&(Qt.defaults.mode=e),Cr.apply(this,arguments)},Qt.defineMIME=Kr,Qt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qt.defineMIME("text/plain","null"),Qt.defineExtension=function(e,t){Qt.prototype[e]=t},Qt.defineDocExtension=function(e,t){Pr.prototype[e]=t},Qt.fromTextArea=nu,iu(Qt),Qt.version="5.58.2",Qt})},Y1PL:function(rt,be,Z){"use strict";Z.r(be),Z.d(be,"ResizableTextArea",function(){return ne});var ie=Z("wx14"),J=Z("1OyB"),P=Z("vuIU"),X=Z("Ji7U"),j=Z("LK+K"),U=Z("q1tI"),K=Z("VTBJ"),G=Z("rePB"),r=Z("Zm9Q"),L=Z("Kwbf"),v=Z("c+Xe"),m=Z("m+aA"),p=Z("bdgK"),h=new Map;function u(ge){ge.forEach(function(Te){var Re,Le=Te.target;(Re=h.get(Le))===null||Re===void 0||Re.forEach(function(ce){return ce(Le)})})}var f=new p.default(u),l=null,o=null;function s(ge,Te){h.has(ge)||(h.set(ge,new Set),f.observe(ge)),h.get(ge).add(Te)}function a(ge,Te){h.has(ge)&&(h.get(ge).delete(Te),h.get(ge).size||(f.unobserve(ge),h.delete(ge)))}var O=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(){return Object(J.a)(this,Re),Te.apply(this,arguments)}return Object(P.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(U.Component),E=U.createContext(null);function w(ge){var Te=ge.children,Re=ge.onBatchResize,Le=U.useRef(0),ce=U.useRef([]),he=U.useContext(E),re=U.useCallback(function(fe,oe,De){Le.current+=1;var Fe=Le.current;ce.current.push({size:fe,element:oe,data:De}),Promise.resolve().then(function(){Fe===Le.current&&(Re==null||Re(ce.current),ce.current=[])}),he==null||he(fe,oe,De)},[Re,he]);return U.createElement(E.Provider,{value:re},Te)}function D(ge){var Te=ge.children,Re=ge.disabled,Le=U.useRef(null),ce=U.useRef(null),he=U.useContext(E),re=U.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=U.isValidElement(Te)&&Object(v.c)(Te),oe=fe?Te.ref:null,De=U.useMemo(function(){return Object(v.a)(oe,Le)},[oe,Le]),Fe=U.useRef(ge);Fe.current=ge;var Ce=U.useCallback(function(Ne){var Be=Fe.current,le=Be.onResize,ve=Be.data,Se=Ne.getBoundingClientRect(),Ie=Se.width,We=Se.height,Ve=Ne.offsetWidth,Qe=Ne.offsetHeight,Je=Math.floor(Ie),st=Math.floor(We);if(re.current.width!==Je||re.current.height!==st||re.current.offsetWidth!==Ve||re.current.offsetHeight!==Qe){var qe={width:Je,height:st,offsetWidth:Ve,offsetHeight:Qe};re.current=qe;var at=Ve===Math.round(Ie)?Ie:Ve,Ue=Qe===Math.round(We)?We:Qe,dt=Object(K.a)(Object(K.a)({},qe),{},{offsetWidth:at,offsetHeight:Ue});he==null||he(dt,Ne,ve),le&&Promise.resolve().then(function(){le(dt,Ne)})}},[]);return U.useEffect(function(){var Ne=Object(m.a)(Le.current)||Object(m.a)(ce.current);return Ne&&!Re&&s(Ne,Ce),function(){return a(Ne,Ce)}},[Le.current,Re]),U.createElement(O,{ref:ce},fe?U.cloneElement(Te,{ref:De}):Te)}var R="rc-observer-key";function A(ge){var Te=ge.children,Re=Object(r.a)(Te);return Re.map(function(Le,ce){var he=(Le==null?void 0:Le.key)||"".concat(R,"-").concat(ce);return U.createElement(D,Object(ie.a)({},ge,{key:he}),Le)})}A.Collection=w;var C=A,T=Z("bT9E"),d=Z("TSYQ"),S=Z.n(d),y=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -375,7 +375,7 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var d=e. z-index:-1000 !important; top:0 !important; right:0 !important -`,b=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],B={},F;function _(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(Te&&B[Re])return B[Re];var Le=window.getComputedStyle(ge),de=Le.getPropertyValue("box-sizing")||Le.getPropertyValue("-moz-box-sizing")||Le.getPropertyValue("-webkit-box-sizing"),he=parseFloat(Le.getPropertyValue("padding-bottom"))+parseFloat(Le.getPropertyValue("padding-top")),re=parseFloat(Le.getPropertyValue("border-bottom-width"))+parseFloat(Le.getPropertyValue("border-top-width")),fe=b.map(function(De){return"".concat(De,":").concat(Le.getPropertyValue(De))}).join(";"),oe={sizingStyle:fe,paddingSize:he,borderSize:re,boxSizing:de};return Te&&Re&&(B[Re]=oe),oe}function M(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),ge.getAttribute("wrap")?F.setAttribute("wrap",ge.getAttribute("wrap")):F.removeAttribute("wrap");var de=_(ge,Te),he=de.paddingSize,re=de.borderSize,fe=de.boxSizing,oe=de.sizingStyle;F.setAttribute("style","".concat(oe,";").concat(y)),F.value=ge.value||ge.placeholder||"";var De=Number.MIN_SAFE_INTEGER,Fe=Number.MAX_SAFE_INTEGER,Ce=F.scrollHeight,Ne;if(fe==="border-box"?Ce+=re:fe==="content-box"&&(Ce-=he),Re!==null||Le!==null){F.value=" ";var Be=F.scrollHeight-he;Re!==null&&(De=Be*Re,fe==="border-box"&&(De=De+he+re),Ce=Math.max(De,Ce)),Le!==null&&(Fe=Be*Le,fe==="border-box"&&(Fe=Fe+he+re),Ne=Ce>Fe?"":"hidden",Ce=Math.min(Fe,Ce))}return{height:Ce,minHeight:De,maxHeight:Fe,overflowY:Ne,resize:"none"}}var I=Z("Gytx"),g=Z.n(I),H;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(H||(H={}));var $=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(Le){var de;return Object(J.a)(this,Re),de=Te.call(this,Le),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(he){de.textArea=he},de.handleResize=function(he){var re=de.state.resizeStatus,fe=de.props,oe=fe.autoSize,De=fe.onResize;if(re!==H.NONE)return;typeof De=="function"&&De(he),oe&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var he=de.props.autoSize;if(!he||!de.textArea)return;var re=he.minRows,fe=he.maxRows,oe=M(de.textArea,!1,re,fe);de.setState({textareaStyles:oe,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:H.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:H.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var he=de.props,re=he.prefixCls,fe=re===void 0?"rc-textarea":re,oe=he.autoSize,De=he.onResize,Fe=he.className,Ce=he.disabled,Ne=de.state,Be=Ne.textareaStyles,le=Ne.resizeStatus,ve=Object(T.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Se=S()(fe,Fe,Object(G.a)({},"".concat(fe,"-disabled"),Ce));"value"in ve&&(ve.value=ve.value||"");var Ie=Object(K.a)(Object(K.a)(Object(K.a)({},de.props.style),Be),le===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return U.createElement(C,{onResize:de.handleResize,disabled:!(oe||De)},U.createElement("textarea",Object(ie.a)({},ve,{className:Se,style:Ie,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:H.NONE},de}return Object(P.a)(Re,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!g()(de.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var de=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,he)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(U.Component),ne=$,se=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(Le){var de;Object(J.a)(this,Re),de=Te.call(this,Le),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(re){de.resizableTextArea=re},de.handleChange=function(re){var fe=de.props.onChange;de.setValue(re.target.value,function(){de.resizableTextArea.resizeTextarea()}),fe&&fe(re)},de.handleKeyDown=function(re){var fe=de.props,oe=fe.onPressEnter,De=fe.onKeyDown;re.keyCode===13&&oe&&oe(re),De&&De(re)};var he=typeof Le.value=="undefined"||Le.value===null?Le.defaultValue:Le.value;return de.state={value:he},de}return Object(P.a)(Re,[{key:"setValue",value:function(de,he){"value"in this.props||this.setState({value:de},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return U.createElement(ne,Object(ie.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),Re}(U.Component),Oe=be.default=se},ZW9T:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return I});var ie=Z("k1fw"),J=Z("oBTY"),P=Z("miYZ"),X=Z("tsqr"),j=Z("rAM+"),U=Z("tJVT"),K=Z("PpiC"),G=Z("q1tI"),r=Z.n(G),L=Z("bdgK"),v=Z("9og8"),m=Z("WmNS"),p=Z.n(m),h={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},u={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` +`,b=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],B={},F;function _(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(Te&&B[Re])return B[Re];var Le=window.getComputedStyle(ge),ce=Le.getPropertyValue("box-sizing")||Le.getPropertyValue("-moz-box-sizing")||Le.getPropertyValue("-webkit-box-sizing"),he=parseFloat(Le.getPropertyValue("padding-bottom"))+parseFloat(Le.getPropertyValue("padding-top")),re=parseFloat(Le.getPropertyValue("border-bottom-width"))+parseFloat(Le.getPropertyValue("border-top-width")),fe=b.map(function(De){return"".concat(De,":").concat(Le.getPropertyValue(De))}).join(";"),oe={sizingStyle:fe,paddingSize:he,borderSize:re,boxSizing:ce};return Te&&Re&&(B[Re]=oe),oe}function M(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),ge.getAttribute("wrap")?F.setAttribute("wrap",ge.getAttribute("wrap")):F.removeAttribute("wrap");var ce=_(ge,Te),he=ce.paddingSize,re=ce.borderSize,fe=ce.boxSizing,oe=ce.sizingStyle;F.setAttribute("style","".concat(oe,";").concat(y)),F.value=ge.value||ge.placeholder||"";var De=Number.MIN_SAFE_INTEGER,Fe=Number.MAX_SAFE_INTEGER,Ce=F.scrollHeight,Ne;if(fe==="border-box"?Ce+=re:fe==="content-box"&&(Ce-=he),Re!==null||Le!==null){F.value=" ";var Be=F.scrollHeight-he;Re!==null&&(De=Be*Re,fe==="border-box"&&(De=De+he+re),Ce=Math.max(De,Ce)),Le!==null&&(Fe=Be*Le,fe==="border-box"&&(Fe=Fe+he+re),Ne=Ce>Fe?"":"hidden",Ce=Math.min(Fe,Ce))}return{height:Ce,minHeight:De,maxHeight:Fe,overflowY:Ne,resize:"none"}}var I=Z("Gytx"),g=Z.n(I),H;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(H||(H={}));var $=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(Le){var ce;return Object(J.a)(this,Re),ce=Te.call(this,Le),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(he){ce.textArea=he},ce.handleResize=function(he){var re=ce.state.resizeStatus,fe=ce.props,oe=fe.autoSize,De=fe.onResize;if(re!==H.NONE)return;typeof De=="function"&&De(he),oe&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var he=ce.props.autoSize;if(!he||!ce.textArea)return;var re=he.minRows,fe=he.maxRows,oe=M(ce.textArea,!1,re,fe);ce.setState({textareaStyles:oe,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(ce.resizeFrameId),ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:H.RESIZED},function(){ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:H.NONE}),ce.fixFirefoxAutoScroll()})})})})},ce.renderTextArea=function(){var he=ce.props,re=he.prefixCls,fe=re===void 0?"rc-textarea":re,oe=he.autoSize,De=he.onResize,Fe=he.className,Ce=he.disabled,Ne=ce.state,Be=Ne.textareaStyles,le=Ne.resizeStatus,ve=Object(T.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Se=S()(fe,Fe,Object(G.a)({},"".concat(fe,"-disabled"),Ce));"value"in ve&&(ve.value=ve.value||"");var Ie=Object(K.a)(Object(K.a)(Object(K.a)({},ce.props.style),Be),le===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return U.createElement(C,{onResize:ce.handleResize,disabled:!(oe||De)},U.createElement("textarea",Object(ie.a)({},ve,{className:Se,style:Ie,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:H.NONE},ce}return Object(P.a)(Re,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!g()(ce.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var ce=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,he)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(U.Component),ne=$,se=function(ge){Object(X.a)(Re,ge);var Te=Object(j.a)(Re);function Re(Le){var ce;Object(J.a)(this,Re),ce=Te.call(this,Le),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(re){ce.resizableTextArea=re},ce.handleChange=function(re){var fe=ce.props.onChange;ce.setValue(re.target.value,function(){ce.resizableTextArea.resizeTextarea()}),fe&&fe(re)},ce.handleKeyDown=function(re){var fe=ce.props,oe=fe.onPressEnter,De=fe.onKeyDown;re.keyCode===13&&oe&&oe(re),De&&De(re)};var he=typeof Le.value=="undefined"||Le.value===null?Le.defaultValue:Le.value;return ce.state={value:he},ce}return Object(P.a)(Re,[{key:"setValue",value:function(ce,he){"value"in this.props||this.setState({value:ce},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return U.createElement(ne,Object(ie.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ce){return"value"in ce?{value:ce.value}:null}}]),Re}(U.Component),Oe=be.default=se},ZW9T:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return I});var ie=Z("k1fw"),J=Z("oBTY"),P=Z("miYZ"),X=Z("tsqr"),j=Z("rAM+"),U=Z("tJVT"),K=Z("PpiC"),G=Z("q1tI"),r=Z.n(G),L=Z("bdgK"),v=Z("9og8"),m=Z("WmNS"),p=Z.n(m),h={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},u={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` @@ -394,12 +394,12 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var d=e. `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},l={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` -`)}]},o=Z("5VLF"),s=Z.n(o),a={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},O=function(H,$){return $.map(function(ne){return{label:ne,kind:H.languages.CompletionItemKind.Keyword,insertText:ne}})},E=function(H){return Object.keys(a.tables).map(function($){return{label:$,kind:H.languages.CompletionItemKind.Variable,insertText:$}})},w=function(H,$){var ne=a.tables[H];return ne?ne.map(function(se){return{label:se,kind:$.languages.CompletionItemKind.Field,insertText:se}}):[]};function D(g,H,$,ne,se){var Oe=H.getWordUntilPosition($),ge={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Te=ne.map(function(Re){return{label:Re,kind:g.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ge}});return se.map(function(Re){Te.push(Object(ie.a)(Object(ie.a)({},Re),{},{range:ge}))}),Te}var R=function(g){a.languages.map(function(se){return g.languages.registerDocumentFormattingEditProvider(se,{provideDocumentFormattingEdits:function(ge,Te,Re){return Object(v.a)(p.a.mark(function Le(){var de;return p.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return de=s()(ge.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),re.abrupt("return",[{range:ge.getFullModelRange(),text:de}]);case 2:case"end":return re.stop()}},Le)}))()}}),se});var H=f.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=l.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=u.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}});g.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(f.keywords.map(function(de){return{label:de,kind:g.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(f.quickKey.map(function(de){return{label:de.label,kind:g.languages.CompletionItemKind.Function,documentation:de.content,insertText:Le.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),g.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn};return{suggestions:Object(J.a)(h.keywords.map(function(Le){return{label:Le,kind:g.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),g.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(u.keywords.map(function(de){return{label:de,kind:g.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(u.quickKey.map(function(de){return{label:de.label,kind:g.languages.CompletionItemKind.Function,documentation:de.content,insertText:Le.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),g.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(l.keywords.map(function(de){return{label:de,kind:g.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(l.quickKey.map(function(de){return{label:de.label,kind:g.languages.CompletionItemKind.Function,documentation:de.content,insertText:Le.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},A="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",C=Z("fjLI"),T=Z("LvDl"),c=Z("+ua5");function S(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}function y(){}var b=!1,B={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function F(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],H=g;if(Array.isArray(g)){for(var $=0;$0||dr.target.offsetWidth>0)&&Ge.current.instance.layout()}}catch(Nt){Ut.e(Nt)}finally{Ut.f()}}),Et.observe(je.current)),Et}function He(){X.b.warn(decodeURIComponent(A))}var ze=function(){var wt=Ge.current.instance;if(Oe!=null&&wt&&me){var Ut=wt.getModel();Ut&&Oe!==Ut.getValue()&&(b=!0,Ut.setValue(Oe),wt.layout(),b=!1)}};Object(G.useEffect)(function(){_e.current&&clearTimeout(_e.current),_e.current=setTimeout(function(){ze()},500)},[Oe,me,Ge.current]),Object(G.useEffect)(function(){if(at&&Ge.current&&Ge.current.instance){var Et=Ge.current.instance;Et.changeViewZones(function(Ut){var tr=document.createElement("div");tr.style.padding="10px 20px",tr.style.width="calc(100% - 20px)",tr.className="my-error-line-wrp",tr.innerHTML=ct,Ut.addZone({afterLineNumber:at||11,heightInLines:3,domNode:tr})});var wt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Et.addOverlayWidget(wt),Et.revealPositionInCenter({lineNumber:20,column:1})}},[at,Ge.current,me]);function ht(){var Et=Ge.current.instance;if(Et){var wt=Et.getSelection(),Ut=Ge.current.pastePos||{},tr=new _.Range(Ut.startLineNumber||wt.endLineNumber,Ut.startColumn||wt.endColumn,Ut.endLineNumber||wt.endLineNumber,Ut.endColumn||wt.endColumn);setTimeout(function(){Et.executeEdits("",[{range:tr,text:""}])},300)}}function ot(Et){(window.navigator.platform.match("Mac")?Et.metaKey:Et.ctrlKey)&&Et.keyCode==83&&(Et.preventDefault(),Ce())}var yt=function(){if(Be&&Ge.current.instance){var wt=Ge.current.instance.getContentHeight();_t(wt0||We.target.offsetWidth>0)&&Be.layout()}}catch(Ve){Se.e(Ve)}finally{Se.f()}}),le.observe(de.current)),le}Object(G.useEffect)(function(){de.current&&Promise.all([Z.e(16),Z.e(28)]).then(Z.t.bind(null,"M/lh",7)).then(function(Be){_=Be;var le=_.editor.createDiffEditor(de.current,Object(ie.a)(Object(ie.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Le),{},{wordWrap:!0}));oe(le);var ve=De(le);return function(){le.dispose();var Se=le.getModel();Se&&Se.dispose(),ve.unobserve(de.current)}})},[]),Object(G.useEffect)(function(){fe&&fe.setModel({original:_.editor.createModel(Oe,Te),modified:_.editor.createModel(ge,Te)})},[Oe,ge,Te,fe]);var Fe=S($),Ce=S(se),Ne={width:Fe,height:Ce};return r.a.createElement("div",{className:"my-diff-editor",ref:de,style:Ne})}},ZpRC:function(rt,be,Z){"use strict";function ie(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function J(v,m){return(!m||v!=="hidden")&&v!=="visible"&&v!=="clip"}function P(v,m){if(v.clientHeightm||f>v&&l=m&&o>=p?f-v-h:l>m&&op?l-m+u:0}var j=function(v,m){var p=window,h=m.scrollMode,u=m.block,f=m.inline,l=m.boundary,o=m.skipOverflowHiddenElements,s=typeof l=="function"?l:function(Be){return Be!==l};if(!ie(v))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,O=[],E=v;ie(E)&&s(E);){if((E=E.parentElement)===a){O.push(E);break}E!=null&&E===document.body&&P(E)&&!P(document.documentElement)||E!=null&&P(E,o)&&O.push(E)}for(var w=p.visualViewport?p.visualViewport.width:innerWidth,D=p.visualViewport?p.visualViewport.height:innerHeight,R=window.scrollX||pageXOffset,A=window.scrollY||pageYOffset,C=v.getBoundingClientRect(),T=C.height,c=C.width,S=C.top,y=C.right,b=C.bottom,B=C.left,F=u==="start"||u==="nearest"?S:u==="end"?b:S+T/2,_=f==="center"?B+c/2:f==="end"?y:B,M=[],I=0;I=0&&B>=0&&b<=D&&y<=w&&S>=se&&b<=ge&&B>=Te&&y<=Oe)return M;var Re=getComputedStyle(g),Le=parseInt(Re.borderLeftWidth,10),de=parseInt(Re.borderTopWidth,10),he=parseInt(Re.borderRightWidth,10),re=parseInt(Re.borderBottomWidth,10),fe=0,oe=0,De="offsetWidth"in g?g.offsetWidth-g.clientWidth-Le-he:0,Fe="offsetHeight"in g?g.offsetHeight-g.clientHeight-de-re:0;if(a===g)fe=u==="start"?F:u==="end"?F-D:u==="nearest"?X(A,A+D,D,de,re,A+F,A+F+T,T):F-D/2,oe=f==="start"?_:f==="center"?_-w/2:f==="end"?_-w:X(R,R+w,w,Le,he,R+_,R+_+c,c),fe=Math.max(0,fe+A),oe=Math.max(0,oe+R);else{fe=u==="start"?F-se-de:u==="end"?F-ge+re+Fe:u==="nearest"?X(se,ge,$,de,re+Fe,F,F+T,T):F-(se+$/2)+Fe/2,oe=f==="start"?_-Te-Le:f==="center"?_-(Te+ne/2)+De/2:f==="end"?_-Oe+he+De:X(Te,Oe,ne,Le,he+De,_,_+c,c);var Ce=g.scrollLeft,Ne=g.scrollTop;F+=Ne-(fe=Math.max(0,Math.min(Ne+fe,g.scrollHeight-$+Fe))),_+=Ce-(oe=Math.max(0,Math.min(Ce+oe,g.scrollWidth-ne+De)))}M.push({el:g,top:fe,left:oe})}return M};function U(v){return v===Object(v)&&Object.keys(v).length!==0}function K(v,m){m===void 0&&(m="auto");var p="scrollBehavior"in document.body.style;v.forEach(function(h){var u=h.el,f=h.top,l=h.left;u.scroll&&p?u.scroll({top:f,left:l,behavior:m}):(u.scrollTop=f,u.scrollLeft=l)})}function G(v){return v===!1?{block:"end",inline:"nearest"}:U(v)?v:{block:"start",inline:"nearest"}}function r(v,m){var p=!v.ownerDocument.documentElement.contains(v);if(U(m)&&typeof m.behavior=="function")return m.behavior(p?[]:j(v,m));if(p)return;var h=G(m);return K(j(v,h),h.behavior)}var L=be.a=r},Zss7:function(rt,be,Z){var ie;(function(J){var P=/^\s+/,X=/\s+$/,j=0,U=J.round,K=J.min,G=J.max,r=J.random;function L(re,fe){if(re=re||"",fe=fe||{},re instanceof L)return re;if(!(this instanceof L))return new L(re,fe);var oe=v(re);this._originalInput=re,this._r=oe.r,this._g=oe.g,this._b=oe.b,this._a=oe.a,this._roundA=U(100*this._a)/100,this._format=fe.format||oe.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=U(this._r)),this._g<1&&(this._g=U(this._g)),this._b<1&&(this._b=U(this._b)),this._ok=oe.ok,this._tc_id=j++}L.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,oe,De,Fe,Ce,Ne;return fe=re.r/255,oe=re.g/255,De=re.b/255,fe<=.03928?Fe=fe/12.92:Fe=J.pow((fe+.055)/1.055,2.4),oe<=.03928?Ce=oe/12.92:Ce=J.pow((oe+.055)/1.055,2.4),De<=.03928?Ne=De/12.92:Ne=J.pow((De+.055)/1.055,2.4),.2126*Fe+.7152*Ce+.0722*Ne},setAlpha:function(re){return this._a=M(re),this._roundA=U(100*this._a)/100,this},toHsv:function(){var re=u(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=u(this._r,this._g,this._b),fe=U(re.h*360),oe=U(re.s*100),De=U(re.v*100);return this._a==1?"hsv("+fe+", "+oe+"%, "+De+"%)":"hsva("+fe+", "+oe+"%, "+De+"%, "+this._roundA+")"},toHsl:function(){var re=p(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=p(this._r,this._g,this._b),fe=U(re.h*360),oe=U(re.s*100),De=U(re.l*100);return this._a==1?"hsl("+fe+", "+oe+"%, "+De+"%)":"hsla("+fe+", "+oe+"%, "+De+"%, "+this._roundA+")"},toHex:function(re){return l(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return o(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:U(this._r),g:U(this._g),b:U(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+U(this._r)+", "+U(this._g)+", "+U(this._b)+")":"rgba("+U(this._r)+", "+U(this._g)+", "+U(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:U(I(this._r,255)*100)+"%",g:U(I(this._g,255)*100)+"%",b:U(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+U(I(this._r,255)*100)+"%, "+U(I(this._g,255)*100)+"%, "+U(I(this._b,255)*100)+"%)":"rgba("+U(I(this._r,255)*100)+"%, "+U(I(this._g,255)*100)+"%, "+U(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:F[l(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+s(this._r,this._g,this._b,this._a),oe=fe,De=this._gradientType?"GradientType = 1, ":"";if(re){var Fe=L(re);oe="#"+s(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+De+"startColorstr="+fe+",endColorstr="+oe+")"},toString:function(re){var fe=!!re;re=re||this._format;var oe=!1,De=this._a<1&&this._a>=0,Fe=!fe&&De&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Fe?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(oe=this.toRgbString()),re==="prgb"&&(oe=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(oe=this.toHexString()),re==="hex3"&&(oe=this.toHexString(!0)),re==="hex4"&&(oe=this.toHex8String(!0)),re==="hex8"&&(oe=this.toHex8String()),re==="name"&&(oe=this.toName()),re==="hsl"&&(oe=this.toHslString()),re==="hsv"&&(oe=this.toHsvString()),oe||this.toHexString())},clone:function(){return L(this.toString())},_applyModification:function(re,fe){var oe=re.apply(null,[this].concat([].slice.call(fe)));return this._r=oe._r,this._g=oe._g,this._b=oe._b,this.setAlpha(oe._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(a,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(b,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(c,arguments)}},L.fromRatio=function(re,fe){if(typeof re=="object"){var oe={};for(var De in re)re.hasOwnProperty(De)&&(De==="a"?oe[De]=re[De]:oe[De]=Oe(re[De]));re=oe}return L(re,fe)};function v(re){var fe={r:0,g:0,b:0},oe=1,De=null,Fe=null,Ce=null,Ne=!1,Be=!1;return typeof re=="string"&&(re=de(re)),typeof re=="object"&&(Le(re.r)&&Le(re.g)&&Le(re.b)?(fe=m(re.r,re.g,re.b),Ne=!0,Be=String(re.r).substr(-1)==="%"?"prgb":"rgb"):Le(re.h)&&Le(re.s)&&Le(re.v)?(De=Oe(re.s),Fe=Oe(re.v),fe=f(re.h,De,Fe),Ne=!0,Be="hsv"):Le(re.h)&&Le(re.s)&&Le(re.l)&&(De=Oe(re.s),Ce=Oe(re.l),fe=h(re.h,De,Ce),Ne=!0,Be="hsl"),re.hasOwnProperty("a")&&(oe=re.a)),oe=M(oe),{ok:Ne,format:re.format||Be,r:K(255,G(fe.r,0)),g:K(255,G(fe.g,0)),b:K(255,G(fe.b,0)),a:oe}}function m(re,fe,oe){return{r:I(re,255)*255,g:I(fe,255)*255,b:I(oe,255)*255}}function p(re,fe,oe){re=I(re,255),fe=I(fe,255),oe=I(oe,255);var De=G(re,fe,oe),Fe=K(re,fe,oe),Ce,Ne,Be=(De+Fe)/2;if(De==Fe)Ce=Ne=0;else{var le=De-Fe;Ne=Be>.5?le/(2-De-Fe):le/(De+Fe);switch(De){case re:Ce=(fe-oe)/le+(fe1&&(Ie-=1),Ie<1/6?ve+(Se-ve)*6*Ie:Ie<1/2?Se:Ie<2/3?ve+(Se-ve)*(2/3-Ie)*6:ve}if(fe===0)De=Fe=Ce=oe;else{var Be=oe<.5?oe*(1+fe):oe+fe-oe*fe,le=2*oe-Be;De=Ne(le,Be,re+1/3),Fe=Ne(le,Be,re),Ce=Ne(le,Be,re-1/3)}return{r:De*255,g:Fe*255,b:Ce*255}}function u(re,fe,oe){re=I(re,255),fe=I(fe,255),oe=I(oe,255);var De=G(re,fe,oe),Fe=K(re,fe,oe),Ce,Ne,Be=De,le=De-Fe;if(Ne=De===0?0:le/De,De==Fe)Ce=0;else{switch(De){case re:Ce=(fe-oe)/le+(fe>1)+720)%360;--fe;)De.h=(De.h+Fe)%360,Ce.push(L(De));return Ce}function b(re,fe){fe=fe||6;for(var oe=L(re).toHsv(),De=oe.h,Fe=oe.s,Ce=oe.v,Ne=[],Be=1/fe;fe--;)Ne.push(L({h:De,s:Fe,v:Ce})),Ce=(Ce+Be)%1;return Ne}L.mix=function(re,fe,oe){oe=oe===0?0:oe||50;var De=L(re).toRgb(),Fe=L(fe).toRgb(),Ce=oe/100,Ne={r:(Fe.r-De.r)*Ce+De.r,g:(Fe.g-De.g)*Ce+De.g,b:(Fe.b-De.b)*Ce+De.b,a:(Fe.a-De.a)*Ce+De.a};return L(Ne)},L.readability=function(re,fe){var oe=L(re),De=L(fe);return(J.max(oe.getLuminance(),De.getLuminance())+.05)/(J.min(oe.getLuminance(),De.getLuminance())+.05)},L.isReadable=function(re,fe,oe){var De=L.readability(re,fe),Fe,Ce;Ce=!1,Fe=he(oe);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":Ce=De>=4.5;break;case"AAlarge":Ce=De>=3;break;case"AAAsmall":Ce=De>=7;break}return Ce},L.mostReadable=function(re,fe,oe){var De=null,Fe=0,Ce,Ne,Be,le;oe=oe||{},Ne=oe.includeFallbackColors,Be=oe.level,le=oe.size;for(var ve=0;veFe&&(Fe=Ce,De=L(fe[ve]));return L.isReadable(re,De,{level:Be,size:le})||!Ne?De:(oe.includeFallbackColors=!1,L.mostReadable(re,["#fff","#000"],oe))};var B=L.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},F=L.hexNames=_(B);function _(re){var fe={};for(var oe in re)re.hasOwnProperty(oe)&&(fe[re[oe]]=oe);return fe}function M(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function I(re,fe){$(re)&&(re="100%");var oe=ne(re);return re=K(fe,G(0,parseFloat(re))),oe&&(re=parseInt(re*fe,10)/100),J.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function g(re){return K(1,G(0,re))}function H(re){return parseInt(re,16)}function $(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ne(re){return typeof re=="string"&&re.indexOf("%")!=-1}function se(re){return re.length==1?"0"+re:""+re}function Oe(re){return re<=1&&(re=re*100+"%"),re}function ge(re){return J.round(parseFloat(re)*255).toString(16)}function Te(re){return H(re)/255}var Re=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",oe="(?:"+fe+")|(?:"+re+")",De="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",Fe="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?";return{CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+De),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+De),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+De),hsva:new RegExp("hsva"+Fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Le(re){return!!Re.CSS_UNIT.exec(re)}function de(re){re=re.replace(P,"").replace(X,"").toLowerCase();var fe=!1;if(B[re])re=B[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var oe;return(oe=Re.rgb.exec(re))?{r:oe[1],g:oe[2],b:oe[3]}:(oe=Re.rgba.exec(re))?{r:oe[1],g:oe[2],b:oe[3],a:oe[4]}:(oe=Re.hsl.exec(re))?{h:oe[1],s:oe[2],l:oe[3]}:(oe=Re.hsla.exec(re))?{h:oe[1],s:oe[2],l:oe[3],a:oe[4]}:(oe=Re.hsv.exec(re))?{h:oe[1],s:oe[2],v:oe[3]}:(oe=Re.hsva.exec(re))?{h:oe[1],s:oe[2],v:oe[3],a:oe[4]}:(oe=Re.hex8.exec(re))?{r:H(oe[1]),g:H(oe[2]),b:H(oe[3]),a:Te(oe[4]),format:fe?"name":"hex8"}:(oe=Re.hex6.exec(re))?{r:H(oe[1]),g:H(oe[2]),b:H(oe[3]),format:fe?"name":"hex"}:(oe=Re.hex4.exec(re))?{r:H(oe[1]+""+oe[1]),g:H(oe[2]+""+oe[2]),b:H(oe[3]+""+oe[3]),a:Te(oe[4]+""+oe[4]),format:fe?"name":"hex8"}:(oe=Re.hex3.exec(re))?{r:H(oe[1]+""+oe[1]),g:H(oe[2]+""+oe[2]),b:H(oe[3]+""+oe[3]),format:fe?"name":"hex"}:!1}function he(re){var fe,oe;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),oe=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),oe!=="small"&&oe!=="large"&&(oe="small"),{level:fe,size:oe}}rt.exports?rt.exports=L:!(ie=function(){return L}.call(be,Z,be,rt),ie!==void 0&&(rt.exports=ie))})(Math)},bT9E:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});var ie=Z("VTBJ");function J(P,X){var j=Object(ie.a)({},P);return Array.isArray(X)&&X.forEach(function(U){delete j[U]}),j}},c5Ni:function(rt,be,Z){},dejd:function(rt,be,Z){},dmUQ:function(rt,be,Z){"use strict";var ie=Z("Ff2n"),J=Z("rePB"),P=Z("1OyB"),X=Z("vuIU"),j=Z("Ji7U"),U=Z("md7G"),K=Z("foSv"),G=Z("q1tI"),r=Z.n(G),L=Z("TSYQ"),v=Z.n(L),m=Z("4IlW");function p(T,c){var S=Object.keys(T);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(T);c&&(y=y.filter(function(b){return Object.getOwnPropertyDescriptor(T,b).enumerable})),S.push.apply(S,y)}return S}function h(T){for(var c=1;c1?ne-1:0),Oe=1;Oe1?I-1:0),H=1;H=0)return parseInt(M.slice(M.indexOf("e-")+2),10);var I=0;return M.indexOf(".")>=0&&(I=M.length-M.indexOf(".")-1),I},b.getInputDisplayValue=function(_){var M=_||b.state,I=M.focused,g=M.inputValue,H=M.value,$;I?$=g:$=b.toPrecisionAsStep(H),$==null&&($="");var ne=b.formatWrapper($);return w(b.props.decimalSeparator)&&(ne=ne.toString().replace(".",b.props.decimalSeparator)),ne},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(_){}},b.restoreByAfter=function(_){if(_===void 0)return!1;var M=b.input.value,I=M.lastIndexOf(_);if(I===-1)return!1;var g=b.cursorBefore.length;return b.lastKeyCode===m.a.DELETE&&b.cursorBefore.charAt(g-1)===_[0]?(b.fixCaret(g,g),!0):I+_.length===M.length?(b.fixCaret(I,I),!0):!1},b.partRestoreByAfter=function(_){return _===void 0?!1:Array.prototype.some.call(_,function(M,I){var g=_.substring(I);return b.restoreByAfter(g)})},b.isNotCompleteNumber=function(_){return isNaN(_)||_===""||_===null||_&&_.toString().indexOf(".")===_.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(_,M,I){b.pressingUpOrDown=!0,b.step("down",_,M,I)},b.up=function(_,M,I){b.pressingUpOrDown=!0,b.step("up",_,M,I)},b.saveInput=function(_){b.input=_};var B=y.value;B===void 0&&(B=y.defaultValue),b.state={focused:y.autoFocus};var F=b.getValidValue(b.toNumber(B));return b.state=h(h({},b.state),{},{inputValue:b.toPrecisionAsStep(F),value:F}),b}return Object(X.a)(S,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var B=this.props,F=B.value,_=B.onChange,M=B.max,I=B.min,g=this.state.focused;if(b){if(!D(b.value,F)||!D(b.max,M)||!D(b.min,I)){var H=g?F:this.getValidValue(F),$;this.pressingUpOrDown?$=H:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:$})}var ne="value"in this.props?F:this.state.value;"max"in this.props&&b.max!==M&&typeof ne=="number"&&ne>M&&_&&_(M),"min"in this.props&&b.min!==I&&typeof ne=="number"&&ne1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,_=parseFloat(b);return isNaN(_)?b:(_F&&(_=F),_)}},{key:"setValue",value:function(b,B){var F=this.props.precision,_=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),M=this.state.value,I=M===void 0?null:M,g=this.state.inputValue,H=g===void 0?null:g,$=typeof _=="number"?_.toFixed(F):"".concat(_),ne=_!==I||$!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},B)):this.setState({value:_,inputValue:this.toPrecisionAsStep(b)},B),ne&&this.props.onChange(_),_}},{key:"getMaxPrecision",value:function(b){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,_=F.precision,M=F.step;if(w(_))return _;var I=this.getPrecision(B),g=this.getPrecision(M),H=this.getPrecision(b);return b?Math.max(H,I+g):I+g}},{key:"getPrecisionFactor",value:function(b){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(b,B);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var B=Math.abs(this.getMaxPrecision(b));return isNaN(B)?b.toString():Number(b).toFixed(B)}},{key:"toNumber",value:function(b){var B=this.props.precision,F=this.state.focused,_=b&&b.length>16&&F;return this.isNotCompleteNumber(b)||_?b:w(B)?Math.round(b*Math.pow(10,B))/Math.pow(10,B):Number(b)}},{key:"upStep",value:function(b,B){var F=this.props.step,_=this.getPrecisionFactor(b,B),M=Math.abs(this.getMaxPrecision(b,B)),I=((_*b+_*F*B)/_).toFixed(M);return this.toNumber(I)}},{key:"downStep",value:function(b,B){var F=this.props.step,_=this.getPrecisionFactor(b,B),M=Math.abs(this.getMaxPrecision(b,B)),I=((_*b-_*F*B)/_).toFixed(M);return this.toNumber(I)}},{key:"step",value:function(b,B){var F=this,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=arguments.length>3?arguments[3]:void 0;this.stop(),B&&(B.persist(),B.preventDefault());var I=this.props;if(I.disabled)return;var g=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(g))return;var H=this["".concat(b,"Step")](g,_),$=H>I.max||HI.max?H=I.max:H=se),Ge=(st||st===0)&&(isNaN(st)||Number(st)<=Oe),Ae=je||_||M,_e=Ge||_||M,we=v()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(J.a)({},"".concat(F,"-handler-up-disabled"),Ae)),ae=v()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(J.a)({},"".concat(F,"-handler-down-disabled"),_e)),ue=I?{onTouchStart:Ae?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Ae?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ce=I?{onTouchStart:_e?l:this.down,onTouchEnd:this.stop}:{onMouseDown:_e?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return r.a.createElement("div",{className:at,style:ge,title:Te,onMouseEnter:Re,onMouseLeave:Le,onMouseOver:de,onMouseOut:he,onFocus:function(){return null},onBlur:function(){return null}},r.a.createElement("div",{className:"".concat(F,"-handler-wrap")},r.a.createElement("span",Object.assign({unselectable:"on"},ue,{role:"button","aria-label":"Increase Value","aria-disabled":Ae,className:we}),H||r.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:o})),r.a.createElement("span",Object.assign({unselectable:"on"},ce,{role:"button","aria-label":"Decrease Value","aria-disabled":_e,className:ae}),$||r.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:o}))),r.a.createElement("div",{className:"".concat(F,"-input-wrap")},r.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":se,"aria-valuenow":st,required:re,type:De,placeholder:Fe,onPaste:We,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:oe,autoComplete:g,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ct?this.onKeyDown:l,onKeyUp:ct?this.onKeyUp:l,autoFocus:Se,maxLength:ve,readOnly:M,disabled:_,max:se,min:Oe,step:le,name:Ie,title:Te,id:Ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:Be,inputMode:Ne,onInput:Ve},Ue))))}}]),S}(r.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var A=R,C=be.a=A},fjLI:function(rt,be,Z){"use strict";Z.d(be,"f",function(){return p}),Z.d(be,"b",function(){return h}),Z.d(be,"a",function(){return u}),Z.d(be,"d",function(){return f}),Z.d(be,"e",function(){return l}),Z.d(be,"c",function(){return o});var ie=Z("8HAY"),J=Z("Vhoy"),P=Z("MI8n"),X=Z("JYp7"),j=Z("pmY6"),U=Z("24hK"),K=Z("nnTU"),G=Z("T8No"),r=Z("Cg/j"),L=Z("t9D7"),v=function(s,a,O,E){var w=arguments.length,D=w<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,O):E,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(s,a,O,E);else for(var A=s.length-1;A>=0;A--)(R=s[A])&&(D=(w<3?R(D):w>3?R(a,O,D):R(a,O))||D);return w>3&&D&&Object.defineProperty(a,O,D),D},m=function(s,a){return function(O,E){a(O,E,s)}};function p(s){return s.command!==void 0}class h{constructor(s){this.id=h._idPool++,this._debugName=s}}h._idPool=0,h.CommandPalette=new h("CommandPalette"),h.EditorContext=new h("EditorContext"),h.SimpleEditorContext=new h("SimpleEditorContext"),h.EditorContextCopy=new h("EditorContextCopy"),h.EditorContextPeek=new h("EditorContextPeek"),h.MenubarEditMenu=new h("MenubarEditMenu"),h.MenubarCopy=new h("MenubarCopy"),h.MenubarGoMenu=new h("MenubarGoMenu"),h.MenubarSelectionMenu=new h("MenubarSelectionMenu"),h.InlineCompletionsActions=new h("InlineCompletionsActions");const u=Object(r.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new P.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===h.CommandPalette}}addCommand(s){return this.addCommands(X.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(j.i)(()=>{let a=!1;for(const O of s)a=this._commands.delete(O.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,O)=>s.set(O,a)),s}appendMenuItem(s,a){return this.appendMenuItems(X.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,O=new U.a;for(const{id:E,item:w}of s){let D=this._menuItems.get(E);D||(D=new U.a,this._menuItems.set(E,D)),O.push(D.push(w)),a.add(E)}return this._onDidChangeMenu.fire(a),Object(j.i)(()=>{if(O.size>0){for(let E of O)E();this._onDidChangeMenu.fire(a),O.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===h.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const O of s)p(O)&&(a.add(O.command.id),O.alt&&a.add(O.alt.id));this._commands.forEach((O,E)=>{a.has(E)||s.push({command:O})})}};class l extends ie.e{constructor(s,a,O,E){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=O,this._options=E}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),O=a.getActions(this._options);a.dispose();for(const[,E]of O)E.length>0&&(s.push(...E),s.push(new ie.d));return s.length&&s.pop(),s}}let o=class s{constructor(a,O,E,w,D){var R,A;if(this._commandService=D,this.id=a.id,this.label=(E==null?void 0:E.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(A=typeof a.tooltip=="string"?a.tooltip:(R=a.tooltip)===null||R===void 0?void 0:R.value)!==null&&A!==void 0?A:"",this.enabled=!a.precondition||w.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const C=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=w.contextMatchesRules(C.condition),this.checked&&C.tooltip&&(this.tooltip=typeof C.tooltip=="string"?C.tooltip:C.tooltip.value),C.title&&(this.label=typeof C.title=="string"?C.title:C.title.value)}this.item=a,this.alt=O?new s(O,void 0,E,w,D):void 0,this._options=E,L.d.isThemeIcon(a.icon)&&(this.class=J.a.asClassName(a.icon))}dispose(){}run(...a){var O,E;let w=[];return((O=this._options)===null||O===void 0?void 0:O.arg)&&(w=[...w,this._options.arg]),((E=this._options)===null||E===void 0?void 0:E.shouldForwardArgs)&&(w=[...w,...a]),this._commandService.executeCommand(this.id,...w)}};o=v([m(3,G.b),m(4,K.b)],o)},h78n:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return b});var ie=Z("q1tI"),J=Z.n(ie),P=Z("TSYQ"),X=Z.n(P),j={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},U=function(_){var M=_.map(function(){return Object(ie.useRef)()}),I=Object(ie.useRef)();return Object(ie.useEffect)(function(){var g=Date.now(),H=!1;Object.keys(M).forEach(function($){var ne=M[$].current;if(!ne)return;H=!0;var se=ne.style;se.transitionDuration=".3s, .3s, .3s, .06s",I.current&&g-I.current<100&&(se.transitionDuration="0s, 0s")}),H&&(I.current=Date.now())}),[M]};function K(){return K=Object.assign||function(F){for(var _=1;_F.length)&&(_=F.length);for(var M=0,I=new Array(_);M<_;M++)I[M]=F[M];return I}function m(F,_){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))return;var M=[],I=!0,g=!1,H=void 0;try{for(var $=F[Symbol.iterator](),ne;!(I=(ne=$.next()).done)&&!(M.push(ne.value),_&&M.length===_);I=!0);}catch(se){g=!0,H=se}finally{try{!I&&$.return!=null&&$.return()}finally{if(g)throw H}}return M}function p(F){if(Array.isArray(F))return F}function h(F,_){if(F==null)return{};var M=u(F,_),I,g;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);for(g=0;g=0)continue;if(!Object.prototype.propertyIsEnumerable.call(F,I))continue;M[I]=F[I]}}return M}function u(F,_){if(F==null)return{};var M={},I=Object.keys(F),g,H;for(H=0;H=0)continue;M[g]=F[g]}return M}var f=function(_){var M=_.className,I=_.percent,g=_.prefixCls,H=_.strokeColor,$=_.strokeLinecap,ne=_.strokeWidth,se=_.style,Oe=_.trailColor,ge=_.trailWidth,Te=_.transition,Re=h(_,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Le=Array.isArray(I)?I:[I],de=Array.isArray(H)?H:[H],he=U(Le),re=G(he,1),fe=re[0],oe=ne/2,De=100-ne/2,Fe="M ".concat($==="round"?oe:0,",").concat(oe,` - L `).concat($==="round"?De:100,",").concat(oe),Ce="0 0 100 ".concat(ne),Ne=0;return J.a.createElement("svg",K({className:X()("".concat(g,"-line"),M),viewBox:Ce,preserveAspectRatio:"none",style:se},Re),J.a.createElement("path",{className:"".concat(g,"-line-trail"),d:Fe,strokeLinecap:$,stroke:Oe,strokeWidth:ge||ne,fillOpacity:"0"}),Le.map(function(Be,le){var ve={strokeDasharray:"".concat(Be,"px, 100px"),strokeDashoffset:"-".concat(Ne,"px"),transition:Te||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Se=de[le]||de[de.length-1];return Ne+=Be,J.a.createElement("path",{key:le,className:"".concat(g,"-line-path"),d:Fe,strokeLinecap:$,stroke:Se,strokeWidth:ne,fillOpacity:"0",ref:fe[le],style:ve})}))};f.defaultProps=j;var l=f;function o(){return o=Object.assign||function(F){for(var _=1;_F.length)&&(_=F.length);for(var M=0,I=new Array(_);M<_;M++)I[M]=F[M];return I}function w(F,_){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))return;var M=[],I=!0,g=!1,H=void 0;try{for(var $=F[Symbol.iterator](),ne;!(I=(ne=$.next()).done)&&!(M.push(ne.value),_&&M.length===_);I=!0);}catch(se){g=!0,H=se}finally{try{!I&&$.return!=null&&$.return()}finally{if(g)throw H}}return M}function D(F){if(Array.isArray(F))return F}function R(F,_){if(F==null)return{};var M=A(F,_),I,g;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);for(g=0;g=0)continue;if(!Object.prototype.propertyIsEnumerable.call(F,I))continue;M[I]=F[I]}}return M}function A(F,_){if(F==null)return{};var M={},I=Object.keys(F),g,H;for(H=0;H=0)continue;M[g]=F[g]}return M}var C=0;function T(F){return+F.replace("%","")}function c(F){return Array.isArray(F)?F:[F]}function S(F,_,M,I){var g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,$=50-I/2,ne=0,se=-$,Oe=0,ge=-2*$;switch(H){case"left":ne=-$,se=0,Oe=2*$,ge=0;break;case"right":ne=$,se=0,Oe=-2*$,ge=0;break;case"bottom":se=$,ge=2*$;break;default:}var Te="M 50,50 m ".concat(ne,",").concat(se,` +`)}]},o=Z("5VLF"),s=Z.n(o),a={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},O=function(H,$){return $.map(function(ne){return{label:ne,kind:H.languages.CompletionItemKind.Keyword,insertText:ne}})},E=function(H){return Object.keys(a.tables).map(function($){return{label:$,kind:H.languages.CompletionItemKind.Variable,insertText:$}})},w=function(H,$){var ne=a.tables[H];return ne?ne.map(function(se){return{label:se,kind:$.languages.CompletionItemKind.Field,insertText:se}}):[]};function D(g,H,$,ne,se){var Oe=H.getWordUntilPosition($),ge={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Te=ne.map(function(Re){return{label:Re,kind:g.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ge}});return se.map(function(Re){Te.push(Object(ie.a)(Object(ie.a)({},Re),{},{range:ge}))}),Te}var R=function(g){a.languages.map(function(se){return g.languages.registerDocumentFormattingEditProvider(se,{provideDocumentFormattingEdits:function(ge,Te,Re){return Object(v.a)(p.a.mark(function Le(){var ce;return p.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ce=s()(ge.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),re.abrupt("return",[{range:ge.getFullModelRange(),text:ce}]);case 2:case"end":return re.stop()}},Le)}))()}}),se});var H=f.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=l.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=u.quickKey.map(function(se){return{label:se.label,kind:g.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}});g.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(f.keywords.map(function(ce){return{label:ce,kind:g.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(f.quickKey.map(function(ce){return{label:ce.label,kind:g.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Le.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),g.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn};return{suggestions:Object(J.a)(h.keywords.map(function(Le){return{label:Le,kind:g.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),g.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(u.keywords.map(function(ce){return{label:ce,kind:g.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(u.quickKey.map(function(ce){return{label:ce.label,kind:g.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Le.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),g.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,ge){var Te=Oe.getWordUntilPosition(ge),Re={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Le=Oe.getLineContent(ge.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[].concat(Object(J.a)(l.keywords.map(function(ce){return{label:ce,kind:g.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(J.a)(l.quickKey.map(function(ce){return{label:ce.label,kind:g.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Le.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},A="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",C=Z("fjLI"),T=Z("LvDl"),d=Z("+ua5");function S(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}function y(){}var b=!1,B={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function F(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],H=g;if(Array.isArray(g)){for(var $=0;$0||cr.target.offsetWidth>0)&&Ge.current.instance.layout()}}catch(Nt){Ut.e(Nt)}finally{Ut.f()}}),Et.observe(je.current)),Et}function He(){X.b.warn(decodeURIComponent(A))}var ze=function(){var wt=Ge.current.instance;if(Oe!=null&&wt&&me){var Ut=wt.getModel();Ut&&Oe!==Ut.getValue()&&(b=!0,Ut.setValue(Oe),wt.layout(),b=!1)}};Object(G.useEffect)(function(){_e.current&&clearTimeout(_e.current),_e.current=setTimeout(function(){ze()},500)},[Oe,me,Ge.current]),Object(G.useEffect)(function(){if(at&&Ge.current&&Ge.current.instance){var Et=Ge.current.instance;Et.changeViewZones(function(Ut){var tr=document.createElement("div");tr.style.padding="10px 20px",tr.style.width="calc(100% - 20px)",tr.className="my-error-line-wrp",tr.innerHTML=dt,Ut.addZone({afterLineNumber:at||11,heightInLines:3,domNode:tr})});var wt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Et.addOverlayWidget(wt),Et.revealPositionInCenter({lineNumber:20,column:1})}},[at,Ge.current,me]);function ht(){var Et=Ge.current.instance;if(Et){var wt=Et.getSelection(),Ut=Ge.current.pastePos||{},tr=new _.Range(Ut.startLineNumber||wt.endLineNumber,Ut.startColumn||wt.endColumn,Ut.endLineNumber||wt.endLineNumber,Ut.endColumn||wt.endColumn);setTimeout(function(){Et.executeEdits("",[{range:tr,text:""}])},300)}}function ot(Et){(window.navigator.platform.match("Mac")?Et.metaKey:Et.ctrlKey)&&Et.keyCode==83&&(Et.preventDefault(),Ce())}var yt=function(){if(Be&&Ge.current.instance){var wt=Ge.current.instance.getContentHeight();_t(wt0||We.target.offsetWidth>0)&&Be.layout()}}catch(Ve){Se.e(Ve)}finally{Se.f()}}),le.observe(ce.current)),le}Object(G.useEffect)(function(){ce.current&&Promise.all([Z.e(16),Z.e(28)]).then(Z.t.bind(null,"M/lh",7)).then(function(Be){_=Be;var le=_.editor.createDiffEditor(ce.current,Object(ie.a)(Object(ie.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Le),{},{wordWrap:!0}));oe(le);var ve=De(le);return function(){le.dispose();var Se=le.getModel();Se&&Se.dispose(),ve.unobserve(ce.current)}})},[]),Object(G.useEffect)(function(){fe&&fe.setModel({original:_.editor.createModel(Oe,Te),modified:_.editor.createModel(ge,Te)})},[Oe,ge,Te,fe]);var Fe=S($),Ce=S(se),Ne={width:Fe,height:Ce};return r.a.createElement("div",{className:"my-diff-editor",ref:ce,style:Ne})}},ZpRC:function(rt,be,Z){"use strict";function ie(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function J(v,m){return(!m||v!=="hidden")&&v!=="visible"&&v!=="clip"}function P(v,m){if(v.clientHeightm||f>v&&l=m&&o>=p?f-v-h:l>m&&op?l-m+u:0}var j=function(v,m){var p=window,h=m.scrollMode,u=m.block,f=m.inline,l=m.boundary,o=m.skipOverflowHiddenElements,s=typeof l=="function"?l:function(Be){return Be!==l};if(!ie(v))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,O=[],E=v;ie(E)&&s(E);){if((E=E.parentElement)===a){O.push(E);break}E!=null&&E===document.body&&P(E)&&!P(document.documentElement)||E!=null&&P(E,o)&&O.push(E)}for(var w=p.visualViewport?p.visualViewport.width:innerWidth,D=p.visualViewport?p.visualViewport.height:innerHeight,R=window.scrollX||pageXOffset,A=window.scrollY||pageYOffset,C=v.getBoundingClientRect(),T=C.height,d=C.width,S=C.top,y=C.right,b=C.bottom,B=C.left,F=u==="start"||u==="nearest"?S:u==="end"?b:S+T/2,_=f==="center"?B+d/2:f==="end"?y:B,M=[],I=0;I=0&&B>=0&&b<=D&&y<=w&&S>=se&&b<=ge&&B>=Te&&y<=Oe)return M;var Re=getComputedStyle(g),Le=parseInt(Re.borderLeftWidth,10),ce=parseInt(Re.borderTopWidth,10),he=parseInt(Re.borderRightWidth,10),re=parseInt(Re.borderBottomWidth,10),fe=0,oe=0,De="offsetWidth"in g?g.offsetWidth-g.clientWidth-Le-he:0,Fe="offsetHeight"in g?g.offsetHeight-g.clientHeight-ce-re:0;if(a===g)fe=u==="start"?F:u==="end"?F-D:u==="nearest"?X(A,A+D,D,ce,re,A+F,A+F+T,T):F-D/2,oe=f==="start"?_:f==="center"?_-w/2:f==="end"?_-w:X(R,R+w,w,Le,he,R+_,R+_+d,d),fe=Math.max(0,fe+A),oe=Math.max(0,oe+R);else{fe=u==="start"?F-se-ce:u==="end"?F-ge+re+Fe:u==="nearest"?X(se,ge,$,ce,re+Fe,F,F+T,T):F-(se+$/2)+Fe/2,oe=f==="start"?_-Te-Le:f==="center"?_-(Te+ne/2)+De/2:f==="end"?_-Oe+he+De:X(Te,Oe,ne,Le,he+De,_,_+d,d);var Ce=g.scrollLeft,Ne=g.scrollTop;F+=Ne-(fe=Math.max(0,Math.min(Ne+fe,g.scrollHeight-$+Fe))),_+=Ce-(oe=Math.max(0,Math.min(Ce+oe,g.scrollWidth-ne+De)))}M.push({el:g,top:fe,left:oe})}return M};function U(v){return v===Object(v)&&Object.keys(v).length!==0}function K(v,m){m===void 0&&(m="auto");var p="scrollBehavior"in document.body.style;v.forEach(function(h){var u=h.el,f=h.top,l=h.left;u.scroll&&p?u.scroll({top:f,left:l,behavior:m}):(u.scrollTop=f,u.scrollLeft=l)})}function G(v){return v===!1?{block:"end",inline:"nearest"}:U(v)?v:{block:"start",inline:"nearest"}}function r(v,m){var p=!v.ownerDocument.documentElement.contains(v);if(U(m)&&typeof m.behavior=="function")return m.behavior(p?[]:j(v,m));if(p)return;var h=G(m);return K(j(v,h),h.behavior)}var L=be.a=r},Zss7:function(rt,be,Z){var ie;(function(J){var P=/^\s+/,X=/\s+$/,j=0,U=J.round,K=J.min,G=J.max,r=J.random;function L(re,fe){if(re=re||"",fe=fe||{},re instanceof L)return re;if(!(this instanceof L))return new L(re,fe);var oe=v(re);this._originalInput=re,this._r=oe.r,this._g=oe.g,this._b=oe.b,this._a=oe.a,this._roundA=U(100*this._a)/100,this._format=fe.format||oe.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=U(this._r)),this._g<1&&(this._g=U(this._g)),this._b<1&&(this._b=U(this._b)),this._ok=oe.ok,this._tc_id=j++}L.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,oe,De,Fe,Ce,Ne;return fe=re.r/255,oe=re.g/255,De=re.b/255,fe<=.03928?Fe=fe/12.92:Fe=J.pow((fe+.055)/1.055,2.4),oe<=.03928?Ce=oe/12.92:Ce=J.pow((oe+.055)/1.055,2.4),De<=.03928?Ne=De/12.92:Ne=J.pow((De+.055)/1.055,2.4),.2126*Fe+.7152*Ce+.0722*Ne},setAlpha:function(re){return this._a=M(re),this._roundA=U(100*this._a)/100,this},toHsv:function(){var re=u(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=u(this._r,this._g,this._b),fe=U(re.h*360),oe=U(re.s*100),De=U(re.v*100);return this._a==1?"hsv("+fe+", "+oe+"%, "+De+"%)":"hsva("+fe+", "+oe+"%, "+De+"%, "+this._roundA+")"},toHsl:function(){var re=p(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=p(this._r,this._g,this._b),fe=U(re.h*360),oe=U(re.s*100),De=U(re.l*100);return this._a==1?"hsl("+fe+", "+oe+"%, "+De+"%)":"hsla("+fe+", "+oe+"%, "+De+"%, "+this._roundA+")"},toHex:function(re){return l(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return o(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:U(this._r),g:U(this._g),b:U(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+U(this._r)+", "+U(this._g)+", "+U(this._b)+")":"rgba("+U(this._r)+", "+U(this._g)+", "+U(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:U(I(this._r,255)*100)+"%",g:U(I(this._g,255)*100)+"%",b:U(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+U(I(this._r,255)*100)+"%, "+U(I(this._g,255)*100)+"%, "+U(I(this._b,255)*100)+"%)":"rgba("+U(I(this._r,255)*100)+"%, "+U(I(this._g,255)*100)+"%, "+U(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:F[l(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+s(this._r,this._g,this._b,this._a),oe=fe,De=this._gradientType?"GradientType = 1, ":"";if(re){var Fe=L(re);oe="#"+s(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+De+"startColorstr="+fe+",endColorstr="+oe+")"},toString:function(re){var fe=!!re;re=re||this._format;var oe=!1,De=this._a<1&&this._a>=0,Fe=!fe&&De&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Fe?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(oe=this.toRgbString()),re==="prgb"&&(oe=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(oe=this.toHexString()),re==="hex3"&&(oe=this.toHexString(!0)),re==="hex4"&&(oe=this.toHex8String(!0)),re==="hex8"&&(oe=this.toHex8String()),re==="name"&&(oe=this.toName()),re==="hsl"&&(oe=this.toHslString()),re==="hsv"&&(oe=this.toHsvString()),oe||this.toHexString())},clone:function(){return L(this.toString())},_applyModification:function(re,fe){var oe=re.apply(null,[this].concat([].slice.call(fe)));return this._r=oe._r,this._g=oe._g,this._b=oe._b,this.setAlpha(oe._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(a,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(b,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(d,arguments)}},L.fromRatio=function(re,fe){if(typeof re=="object"){var oe={};for(var De in re)re.hasOwnProperty(De)&&(De==="a"?oe[De]=re[De]:oe[De]=Oe(re[De]));re=oe}return L(re,fe)};function v(re){var fe={r:0,g:0,b:0},oe=1,De=null,Fe=null,Ce=null,Ne=!1,Be=!1;return typeof re=="string"&&(re=ce(re)),typeof re=="object"&&(Le(re.r)&&Le(re.g)&&Le(re.b)?(fe=m(re.r,re.g,re.b),Ne=!0,Be=String(re.r).substr(-1)==="%"?"prgb":"rgb"):Le(re.h)&&Le(re.s)&&Le(re.v)?(De=Oe(re.s),Fe=Oe(re.v),fe=f(re.h,De,Fe),Ne=!0,Be="hsv"):Le(re.h)&&Le(re.s)&&Le(re.l)&&(De=Oe(re.s),Ce=Oe(re.l),fe=h(re.h,De,Ce),Ne=!0,Be="hsl"),re.hasOwnProperty("a")&&(oe=re.a)),oe=M(oe),{ok:Ne,format:re.format||Be,r:K(255,G(fe.r,0)),g:K(255,G(fe.g,0)),b:K(255,G(fe.b,0)),a:oe}}function m(re,fe,oe){return{r:I(re,255)*255,g:I(fe,255)*255,b:I(oe,255)*255}}function p(re,fe,oe){re=I(re,255),fe=I(fe,255),oe=I(oe,255);var De=G(re,fe,oe),Fe=K(re,fe,oe),Ce,Ne,Be=(De+Fe)/2;if(De==Fe)Ce=Ne=0;else{var le=De-Fe;Ne=Be>.5?le/(2-De-Fe):le/(De+Fe);switch(De){case re:Ce=(fe-oe)/le+(fe1&&(Ie-=1),Ie<1/6?ve+(Se-ve)*6*Ie:Ie<1/2?Se:Ie<2/3?ve+(Se-ve)*(2/3-Ie)*6:ve}if(fe===0)De=Fe=Ce=oe;else{var Be=oe<.5?oe*(1+fe):oe+fe-oe*fe,le=2*oe-Be;De=Ne(le,Be,re+1/3),Fe=Ne(le,Be,re),Ce=Ne(le,Be,re-1/3)}return{r:De*255,g:Fe*255,b:Ce*255}}function u(re,fe,oe){re=I(re,255),fe=I(fe,255),oe=I(oe,255);var De=G(re,fe,oe),Fe=K(re,fe,oe),Ce,Ne,Be=De,le=De-Fe;if(Ne=De===0?0:le/De,De==Fe)Ce=0;else{switch(De){case re:Ce=(fe-oe)/le+(fe>1)+720)%360;--fe;)De.h=(De.h+Fe)%360,Ce.push(L(De));return Ce}function b(re,fe){fe=fe||6;for(var oe=L(re).toHsv(),De=oe.h,Fe=oe.s,Ce=oe.v,Ne=[],Be=1/fe;fe--;)Ne.push(L({h:De,s:Fe,v:Ce})),Ce=(Ce+Be)%1;return Ne}L.mix=function(re,fe,oe){oe=oe===0?0:oe||50;var De=L(re).toRgb(),Fe=L(fe).toRgb(),Ce=oe/100,Ne={r:(Fe.r-De.r)*Ce+De.r,g:(Fe.g-De.g)*Ce+De.g,b:(Fe.b-De.b)*Ce+De.b,a:(Fe.a-De.a)*Ce+De.a};return L(Ne)},L.readability=function(re,fe){var oe=L(re),De=L(fe);return(J.max(oe.getLuminance(),De.getLuminance())+.05)/(J.min(oe.getLuminance(),De.getLuminance())+.05)},L.isReadable=function(re,fe,oe){var De=L.readability(re,fe),Fe,Ce;Ce=!1,Fe=he(oe);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":Ce=De>=4.5;break;case"AAlarge":Ce=De>=3;break;case"AAAsmall":Ce=De>=7;break}return Ce},L.mostReadable=function(re,fe,oe){var De=null,Fe=0,Ce,Ne,Be,le;oe=oe||{},Ne=oe.includeFallbackColors,Be=oe.level,le=oe.size;for(var ve=0;veFe&&(Fe=Ce,De=L(fe[ve]));return L.isReadable(re,De,{level:Be,size:le})||!Ne?De:(oe.includeFallbackColors=!1,L.mostReadable(re,["#fff","#000"],oe))};var B=L.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},F=L.hexNames=_(B);function _(re){var fe={};for(var oe in re)re.hasOwnProperty(oe)&&(fe[re[oe]]=oe);return fe}function M(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function I(re,fe){$(re)&&(re="100%");var oe=ne(re);return re=K(fe,G(0,parseFloat(re))),oe&&(re=parseInt(re*fe,10)/100),J.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function g(re){return K(1,G(0,re))}function H(re){return parseInt(re,16)}function $(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ne(re){return typeof re=="string"&&re.indexOf("%")!=-1}function se(re){return re.length==1?"0"+re:""+re}function Oe(re){return re<=1&&(re=re*100+"%"),re}function ge(re){return J.round(parseFloat(re)*255).toString(16)}function Te(re){return H(re)/255}var Re=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",oe="(?:"+fe+")|(?:"+re+")",De="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",Fe="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?";return{CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+De),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+De),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+De),hsva:new RegExp("hsva"+Fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Le(re){return!!Re.CSS_UNIT.exec(re)}function ce(re){re=re.replace(P,"").replace(X,"").toLowerCase();var fe=!1;if(B[re])re=B[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var oe;return(oe=Re.rgb.exec(re))?{r:oe[1],g:oe[2],b:oe[3]}:(oe=Re.rgba.exec(re))?{r:oe[1],g:oe[2],b:oe[3],a:oe[4]}:(oe=Re.hsl.exec(re))?{h:oe[1],s:oe[2],l:oe[3]}:(oe=Re.hsla.exec(re))?{h:oe[1],s:oe[2],l:oe[3],a:oe[4]}:(oe=Re.hsv.exec(re))?{h:oe[1],s:oe[2],v:oe[3]}:(oe=Re.hsva.exec(re))?{h:oe[1],s:oe[2],v:oe[3],a:oe[4]}:(oe=Re.hex8.exec(re))?{r:H(oe[1]),g:H(oe[2]),b:H(oe[3]),a:Te(oe[4]),format:fe?"name":"hex8"}:(oe=Re.hex6.exec(re))?{r:H(oe[1]),g:H(oe[2]),b:H(oe[3]),format:fe?"name":"hex"}:(oe=Re.hex4.exec(re))?{r:H(oe[1]+""+oe[1]),g:H(oe[2]+""+oe[2]),b:H(oe[3]+""+oe[3]),a:Te(oe[4]+""+oe[4]),format:fe?"name":"hex8"}:(oe=Re.hex3.exec(re))?{r:H(oe[1]+""+oe[1]),g:H(oe[2]+""+oe[2]),b:H(oe[3]+""+oe[3]),format:fe?"name":"hex"}:!1}function he(re){var fe,oe;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),oe=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),oe!=="small"&&oe!=="large"&&(oe="small"),{level:fe,size:oe}}rt.exports?rt.exports=L:!(ie=function(){return L}.call(be,Z,be,rt),ie!==void 0&&(rt.exports=ie))})(Math)},bT9E:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});var ie=Z("VTBJ");function J(P,X){var j=Object(ie.a)({},P);return Array.isArray(X)&&X.forEach(function(U){delete j[U]}),j}},c5Ni:function(rt,be,Z){},dejd:function(rt,be,Z){},dmUQ:function(rt,be,Z){"use strict";var ie=Z("Ff2n"),J=Z("rePB"),P=Z("1OyB"),X=Z("vuIU"),j=Z("Ji7U"),U=Z("md7G"),K=Z("foSv"),G=Z("q1tI"),r=Z.n(G),L=Z("TSYQ"),v=Z.n(L),m=Z("4IlW");function p(T,d){var S=Object.keys(T);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(T);d&&(y=y.filter(function(b){return Object.getOwnPropertyDescriptor(T,b).enumerable})),S.push.apply(S,y)}return S}function h(T){for(var d=1;d1?ne-1:0),Oe=1;Oe1?I-1:0),H=1;H=0)return parseInt(M.slice(M.indexOf("e-")+2),10);var I=0;return M.indexOf(".")>=0&&(I=M.length-M.indexOf(".")-1),I},b.getInputDisplayValue=function(_){var M=_||b.state,I=M.focused,g=M.inputValue,H=M.value,$;I?$=g:$=b.toPrecisionAsStep(H),$==null&&($="");var ne=b.formatWrapper($);return w(b.props.decimalSeparator)&&(ne=ne.toString().replace(".",b.props.decimalSeparator)),ne},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(_){}},b.restoreByAfter=function(_){if(_===void 0)return!1;var M=b.input.value,I=M.lastIndexOf(_);if(I===-1)return!1;var g=b.cursorBefore.length;return b.lastKeyCode===m.a.DELETE&&b.cursorBefore.charAt(g-1)===_[0]?(b.fixCaret(g,g),!0):I+_.length===M.length?(b.fixCaret(I,I),!0):!1},b.partRestoreByAfter=function(_){return _===void 0?!1:Array.prototype.some.call(_,function(M,I){var g=_.substring(I);return b.restoreByAfter(g)})},b.isNotCompleteNumber=function(_){return isNaN(_)||_===""||_===null||_&&_.toString().indexOf(".")===_.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(_,M,I){b.pressingUpOrDown=!0,b.step("down",_,M,I)},b.up=function(_,M,I){b.pressingUpOrDown=!0,b.step("up",_,M,I)},b.saveInput=function(_){b.input=_};var B=y.value;B===void 0&&(B=y.defaultValue),b.state={focused:y.autoFocus};var F=b.getValidValue(b.toNumber(B));return b.state=h(h({},b.state),{},{inputValue:b.toPrecisionAsStep(F),value:F}),b}return Object(X.a)(S,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var B=this.props,F=B.value,_=B.onChange,M=B.max,I=B.min,g=this.state.focused;if(b){if(!D(b.value,F)||!D(b.max,M)||!D(b.min,I)){var H=g?F:this.getValidValue(F),$;this.pressingUpOrDown?$=H:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:$})}var ne="value"in this.props?F:this.state.value;"max"in this.props&&b.max!==M&&typeof ne=="number"&&ne>M&&_&&_(M),"min"in this.props&&b.min!==I&&typeof ne=="number"&&ne1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,_=parseFloat(b);return isNaN(_)?b:(_F&&(_=F),_)}},{key:"setValue",value:function(b,B){var F=this.props.precision,_=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),M=this.state.value,I=M===void 0?null:M,g=this.state.inputValue,H=g===void 0?null:g,$=typeof _=="number"?_.toFixed(F):"".concat(_),ne=_!==I||$!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},B)):this.setState({value:_,inputValue:this.toPrecisionAsStep(b)},B),ne&&this.props.onChange(_),_}},{key:"getMaxPrecision",value:function(b){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,_=F.precision,M=F.step;if(w(_))return _;var I=this.getPrecision(B),g=this.getPrecision(M),H=this.getPrecision(b);return b?Math.max(H,I+g):I+g}},{key:"getPrecisionFactor",value:function(b){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(b,B);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var B=Math.abs(this.getMaxPrecision(b));return isNaN(B)?b.toString():Number(b).toFixed(B)}},{key:"toNumber",value:function(b){var B=this.props.precision,F=this.state.focused,_=b&&b.length>16&&F;return this.isNotCompleteNumber(b)||_?b:w(B)?Math.round(b*Math.pow(10,B))/Math.pow(10,B):Number(b)}},{key:"upStep",value:function(b,B){var F=this.props.step,_=this.getPrecisionFactor(b,B),M=Math.abs(this.getMaxPrecision(b,B)),I=((_*b+_*F*B)/_).toFixed(M);return this.toNumber(I)}},{key:"downStep",value:function(b,B){var F=this.props.step,_=this.getPrecisionFactor(b,B),M=Math.abs(this.getMaxPrecision(b,B)),I=((_*b-_*F*B)/_).toFixed(M);return this.toNumber(I)}},{key:"step",value:function(b,B){var F=this,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=arguments.length>3?arguments[3]:void 0;this.stop(),B&&(B.persist(),B.preventDefault());var I=this.props;if(I.disabled)return;var g=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(g))return;var H=this["".concat(b,"Step")](g,_),$=H>I.max||HI.max?H=I.max:H=se),Ge=(st||st===0)&&(isNaN(st)||Number(st)<=Oe),Ae=je||_||M,_e=Ge||_||M,we=v()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(J.a)({},"".concat(F,"-handler-up-disabled"),Ae)),ae=v()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(J.a)({},"".concat(F,"-handler-down-disabled"),_e)),ue=I?{onTouchStart:Ae?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Ae?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},de=I?{onTouchStart:_e?l:this.down,onTouchEnd:this.stop}:{onMouseDown:_e?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return r.a.createElement("div",{className:at,style:ge,title:Te,onMouseEnter:Re,onMouseLeave:Le,onMouseOver:ce,onMouseOut:he,onFocus:function(){return null},onBlur:function(){return null}},r.a.createElement("div",{className:"".concat(F,"-handler-wrap")},r.a.createElement("span",Object.assign({unselectable:"on"},ue,{role:"button","aria-label":"Increase Value","aria-disabled":Ae,className:we}),H||r.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:o})),r.a.createElement("span",Object.assign({unselectable:"on"},de,{role:"button","aria-label":"Decrease Value","aria-disabled":_e,className:ae}),$||r.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:o}))),r.a.createElement("div",{className:"".concat(F,"-input-wrap")},r.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":se,"aria-valuenow":st,required:re,type:De,placeholder:Fe,onPaste:We,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:oe,autoComplete:g,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:dt?this.onKeyDown:l,onKeyUp:dt?this.onKeyUp:l,autoFocus:Se,maxLength:ve,readOnly:M,disabled:_,max:se,min:Oe,step:le,name:Ie,title:Te,id:Ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:Be,inputMode:Ne,onInput:Ve},Ue))))}}]),S}(r.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var A=R,C=be.a=A},fjLI:function(rt,be,Z){"use strict";Z.d(be,"f",function(){return p}),Z.d(be,"b",function(){return h}),Z.d(be,"a",function(){return u}),Z.d(be,"d",function(){return f}),Z.d(be,"e",function(){return l}),Z.d(be,"c",function(){return o});var ie=Z("8HAY"),J=Z("Vhoy"),P=Z("MI8n"),X=Z("JYp7"),j=Z("pmY6"),U=Z("24hK"),K=Z("nnTU"),G=Z("T8No"),r=Z("Cg/j"),L=Z("t9D7"),v=function(s,a,O,E){var w=arguments.length,D=w<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,O):E,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(s,a,O,E);else for(var A=s.length-1;A>=0;A--)(R=s[A])&&(D=(w<3?R(D):w>3?R(a,O,D):R(a,O))||D);return w>3&&D&&Object.defineProperty(a,O,D),D},m=function(s,a){return function(O,E){a(O,E,s)}};function p(s){return s.command!==void 0}class h{constructor(s){this.id=h._idPool++,this._debugName=s}}h._idPool=0,h.CommandPalette=new h("CommandPalette"),h.EditorContext=new h("EditorContext"),h.SimpleEditorContext=new h("SimpleEditorContext"),h.EditorContextCopy=new h("EditorContextCopy"),h.EditorContextPeek=new h("EditorContextPeek"),h.MenubarEditMenu=new h("MenubarEditMenu"),h.MenubarCopy=new h("MenubarCopy"),h.MenubarGoMenu=new h("MenubarGoMenu"),h.MenubarSelectionMenu=new h("MenubarSelectionMenu"),h.InlineCompletionsActions=new h("InlineCompletionsActions");const u=Object(r.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new P.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===h.CommandPalette}}addCommand(s){return this.addCommands(X.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(j.i)(()=>{let a=!1;for(const O of s)a=this._commands.delete(O.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,O)=>s.set(O,a)),s}appendMenuItem(s,a){return this.appendMenuItems(X.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,O=new U.a;for(const{id:E,item:w}of s){let D=this._menuItems.get(E);D||(D=new U.a,this._menuItems.set(E,D)),O.push(D.push(w)),a.add(E)}return this._onDidChangeMenu.fire(a),Object(j.i)(()=>{if(O.size>0){for(let E of O)E();this._onDidChangeMenu.fire(a),O.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===h.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const O of s)p(O)&&(a.add(O.command.id),O.alt&&a.add(O.alt.id));this._commands.forEach((O,E)=>{a.has(E)||s.push({command:O})})}};class l extends ie.e{constructor(s,a,O,E){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=O,this._options=E}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),O=a.getActions(this._options);a.dispose();for(const[,E]of O)E.length>0&&(s.push(...E),s.push(new ie.d));return s.length&&s.pop(),s}}let o=class s{constructor(a,O,E,w,D){var R,A;if(this._commandService=D,this.id=a.id,this.label=(E==null?void 0:E.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(A=typeof a.tooltip=="string"?a.tooltip:(R=a.tooltip)===null||R===void 0?void 0:R.value)!==null&&A!==void 0?A:"",this.enabled=!a.precondition||w.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const C=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=w.contextMatchesRules(C.condition),this.checked&&C.tooltip&&(this.tooltip=typeof C.tooltip=="string"?C.tooltip:C.tooltip.value),C.title&&(this.label=typeof C.title=="string"?C.title:C.title.value)}this.item=a,this.alt=O?new s(O,void 0,E,w,D):void 0,this._options=E,L.d.isThemeIcon(a.icon)&&(this.class=J.a.asClassName(a.icon))}dispose(){}run(...a){var O,E;let w=[];return((O=this._options)===null||O===void 0?void 0:O.arg)&&(w=[...w,this._options.arg]),((E=this._options)===null||E===void 0?void 0:E.shouldForwardArgs)&&(w=[...w,...a]),this._commandService.executeCommand(this.id,...w)}};o=v([m(3,G.b),m(4,K.b)],o)},h78n:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return b});var ie=Z("q1tI"),J=Z.n(ie),P=Z("TSYQ"),X=Z.n(P),j={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},U=function(_){var M=_.map(function(){return Object(ie.useRef)()}),I=Object(ie.useRef)();return Object(ie.useEffect)(function(){var g=Date.now(),H=!1;Object.keys(M).forEach(function($){var ne=M[$].current;if(!ne)return;H=!0;var se=ne.style;se.transitionDuration=".3s, .3s, .3s, .06s",I.current&&g-I.current<100&&(se.transitionDuration="0s, 0s")}),H&&(I.current=Date.now())}),[M]};function K(){return K=Object.assign||function(F){for(var _=1;_F.length)&&(_=F.length);for(var M=0,I=new Array(_);M<_;M++)I[M]=F[M];return I}function m(F,_){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))return;var M=[],I=!0,g=!1,H=void 0;try{for(var $=F[Symbol.iterator](),ne;!(I=(ne=$.next()).done)&&!(M.push(ne.value),_&&M.length===_);I=!0);}catch(se){g=!0,H=se}finally{try{!I&&$.return!=null&&$.return()}finally{if(g)throw H}}return M}function p(F){if(Array.isArray(F))return F}function h(F,_){if(F==null)return{};var M=u(F,_),I,g;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);for(g=0;g=0)continue;if(!Object.prototype.propertyIsEnumerable.call(F,I))continue;M[I]=F[I]}}return M}function u(F,_){if(F==null)return{};var M={},I=Object.keys(F),g,H;for(H=0;H=0)continue;M[g]=F[g]}return M}var f=function(_){var M=_.className,I=_.percent,g=_.prefixCls,H=_.strokeColor,$=_.strokeLinecap,ne=_.strokeWidth,se=_.style,Oe=_.trailColor,ge=_.trailWidth,Te=_.transition,Re=h(_,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Le=Array.isArray(I)?I:[I],ce=Array.isArray(H)?H:[H],he=U(Le),re=G(he,1),fe=re[0],oe=ne/2,De=100-ne/2,Fe="M ".concat($==="round"?oe:0,",").concat(oe,` + L `).concat($==="round"?De:100,",").concat(oe),Ce="0 0 100 ".concat(ne),Ne=0;return J.a.createElement("svg",K({className:X()("".concat(g,"-line"),M),viewBox:Ce,preserveAspectRatio:"none",style:se},Re),J.a.createElement("path",{className:"".concat(g,"-line-trail"),d:Fe,strokeLinecap:$,stroke:Oe,strokeWidth:ge||ne,fillOpacity:"0"}),Le.map(function(Be,le){var ve={strokeDasharray:"".concat(Be,"px, 100px"),strokeDashoffset:"-".concat(Ne,"px"),transition:Te||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Se=ce[le]||ce[ce.length-1];return Ne+=Be,J.a.createElement("path",{key:le,className:"".concat(g,"-line-path"),d:Fe,strokeLinecap:$,stroke:Se,strokeWidth:ne,fillOpacity:"0",ref:fe[le],style:ve})}))};f.defaultProps=j;var l=f;function o(){return o=Object.assign||function(F){for(var _=1;_F.length)&&(_=F.length);for(var M=0,I=new Array(_);M<_;M++)I[M]=F[M];return I}function w(F,_){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))return;var M=[],I=!0,g=!1,H=void 0;try{for(var $=F[Symbol.iterator](),ne;!(I=(ne=$.next()).done)&&!(M.push(ne.value),_&&M.length===_);I=!0);}catch(se){g=!0,H=se}finally{try{!I&&$.return!=null&&$.return()}finally{if(g)throw H}}return M}function D(F){if(Array.isArray(F))return F}function R(F,_){if(F==null)return{};var M=A(F,_),I,g;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);for(g=0;g=0)continue;if(!Object.prototype.propertyIsEnumerable.call(F,I))continue;M[I]=F[I]}}return M}function A(F,_){if(F==null)return{};var M={},I=Object.keys(F),g,H;for(H=0;H=0)continue;M[g]=F[g]}return M}var C=0;function T(F){return+F.replace("%","")}function d(F){return Array.isArray(F)?F:[F]}function S(F,_,M,I){var g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,$=50-I/2,ne=0,se=-$,Oe=0,ge=-2*$;switch(H){case"left":ne=-$,se=0,Oe=2*$,ge=0;break;case"right":ne=$,se=0,Oe=-2*$,ge=0;break;case"bottom":se=$,ge=2*$;break;default:}var Te="M 50,50 m ".concat(ne,",").concat(se,` a `).concat($,",").concat($," 0 1 1 ").concat(Oe,",").concat(-ge,` - a `).concat($,",").concat($," 0 1 1 ").concat(-Oe,",").concat(ge),Re=Math.PI*2*$,Le={stroke:M,strokeDasharray:"".concat(_/100*(Re-g),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(g/2+F/100*(Re-g),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:Te,pathStyle:Le}}var y=function(_){var M=_.prefixCls,I=_.strokeWidth,g=_.trailWidth,H=_.gapDegree,$=_.gapPosition,ne=_.trailColor,se=_.strokeLinecap,Oe=_.style,ge=_.className,Te=_.strokeColor,Re=_.percent,Le=R(_,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),de=Object(ie.useMemo)(function(){return C+=1,C},[]),he=S(0,100,ne,I,H,$),re=he.pathString,fe=he.pathStyle,oe=c(Re),De=c(Te),Fe=De.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),Ce=U(oe),Ne=s(Ce,1),Be=Ne[0],le=function(){var Se=0;return oe.map(function(Ie,We){var Ve=De[We]||De[De.length-1],Qe=Object.prototype.toString.call(Ve)==="[object Object]"?"url(#".concat(M,"-gradient-").concat(de,")"):"",Je=S(Se,Ie,Ve,I,H,$);return Se+=Ie,J.a.createElement("path",{key:We,className:"".concat(M,"-circle-path"),d:Je.pathString,stroke:Qe,strokeLinecap:se,strokeWidth:I,opacity:Ie===0?0:1,fillOpacity:"0",style:Je.pathStyle,ref:Be[We]})})};return J.a.createElement("svg",o({className:X()("".concat(M,"-circle"),ge),viewBox:"0 0 100 100",style:Oe},Le),Fe&&J.a.createElement("defs",null,J.a.createElement("linearGradient",{id:"".concat(M,"-gradient-").concat(de),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Fe).sort(function(ve,Se){return T(ve)-T(Se)}).map(function(ve,Se){return J.a.createElement("stop",{key:Se,offset:ve,stopColor:Fe[ve]})}))),J.a.createElement("path",{className:"".concat(M,"-circle-trail"),d:re,stroke:ne,strokeLinecap:se,strokeWidth:g||I,fillOpacity:"0",style:fe}),le().reverse())};y.defaultProps=j;var b=y,B={Line:l,Circle:b}},ic2d:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return X});var ie=Z("FWmy"),J=Z("746U");class P{constructor(){this.data=new Map}add(j,U){ie.a(J.l(j)),ie.a(J.k(U)),ie.a(!this.data.has(j),"There is already an extension with this id"),this.data.set(j,U)}as(j){return this.data.get(j)||null}}const X=new P},kSUc:function(rt,be,Z){},lZu9:function(rt,be,Z){(function(ie){ie(Z("VrN/"),Z("1eCo"),Z("8EBN"))})(function(ie){"use strict";ie.defineMode("markdown",function(J,P){var X=ie.getMode(J,"text/html"),j=X.name=="null";function U(I){if(ie.findModeByName){var g=ie.findModeByName(I);g&&(I=g.mime||g.mimes[0])}var H=ie.getMode(J,I);return H.name=="null"?null:H}P.highlightFormatting===void 0&&(P.highlightFormatting=!1),P.maxBlockquoteDepth===void 0&&(P.maxBlockquoteDepth=0),P.taskLists===void 0&&(P.taskLists=!1),P.strikethrough===void 0&&(P.strikethrough=!1),P.emoji===void 0&&(P.emoji=!1),P.fencedCodeBlockHighlighting===void 0&&(P.fencedCodeBlockHighlighting=!0),P.fencedCodeBlockDefaultMode===void 0&&(P.fencedCodeBlockDefaultMode="text/plain"),P.xml===void 0&&(P.xml=!0),P.tokenTypeOverrides===void 0&&(P.tokenTypeOverrides={});var K={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var G in K)K.hasOwnProperty(G)&&P.tokenTypeOverrides[G]&&(K[G]=P.tokenTypeOverrides[G]);var r=/^([*\-_])(?:\s*\1){2,}\s*$/,L=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,m=P.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,u=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,o=" ";function s(I,g,H){return g.f=g.inline=H,H(I,g)}function a(I,g,H){return g.f=g.block=H,H(I,g)}function O(I){return!I||!/\S/.test(I.string)}function E(I){if(I.linkTitle=!1,I.linkHref=!1,I.linkText=!1,I.em=!1,I.strong=!1,I.strikethrough=!1,I.quote=0,I.indentedCode=!1,I.f==D){var g=j;if(!g){var H=ie.innerMode(X,I.htmlState);g=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}g&&(I.f=T,I.block=w,I.htmlState=null)}return I.trailingSpace=0,I.trailingSpaceNewLine=!1,I.prevLine=I.thisLine,I.thisLine={stream:null},null}function w(I,g){var H=I.column()===g.indentation,$=O(g.prevLine.stream),ne=g.indentedCode,se=g.prevLine.hr,Oe=g.list!==!1,ge=(g.listStack[g.listStack.length-1]||0)+3;g.indentedCode=!1;var Te=g.indentation;if(g.indentationDiff===null&&(g.indentationDiff=g.indentation,Oe)){for(g.list=null;Te=4&&(ne||g.prevLine.fencedCodeEnd||g.prevLine.header||$))return I.skipToEnd(),g.indentedCode=!0,K.code;if(I.eatSpace())return null;if(H&&g.indentation<=ge&&(de=I.match(m))&&de[1].length<=6)return g.quote=0,g.header=de[1].length,g.thisLine.header=!0,P.highlightFormatting&&(g.formatting="header"),g.f=g.inline,A(g);if(g.indentation<=ge&&I.eat(">"))return g.quote=H?1:g.quote+1,P.highlightFormatting&&(g.formatting="quote"),I.eatSpace(),A(g);if(!Le&&!g.setext&&H&&g.indentation<=ge&&(de=I.match(L))){var he=de[1]?"ol":"ul";return g.indentation=Te+I.current().length,g.list=!0,g.quote=0,g.listStack.push(g.indentation),g.em=!1,g.strong=!1,g.code=!1,g.strikethrough=!1,P.taskLists&&I.match(v,!1)&&(g.taskList=!0),g.f=g.inline,P.highlightFormatting&&(g.formatting=["list","list-"+he]),A(g)}else{if(H&&g.indentation<=ge&&(de=I.match(u,!0)))return g.quote=0,g.fencedEndRE=new RegExp(de[1]+"+ *$"),g.localMode=P.fencedCodeBlockHighlighting&&U(de[2]||P.fencedCodeBlockDefaultMode),g.localMode&&(g.localState=ie.startState(g.localMode)),g.f=g.block=R,P.highlightFormatting&&(g.formatting="code-block"),g.code=-1,A(g);if(g.setext||(!Re||!Oe)&&!g.quote&&g.list===!1&&!g.code&&!Le&&!f.test(I.string)&&(de=I.lookAhead(1))&&(de=de.match(p)))return g.setext?(g.header=g.setext,g.setext=0,I.skipToEnd(),P.highlightFormatting&&(g.formatting="header")):(g.header=de[0].charAt(0)=="="?1:2,g.setext=g.header),g.thisLine.header=!0,g.f=g.inline,A(g);if(Le)return I.skipToEnd(),g.hr=!0,g.thisLine.hr=!0,K.hr;if(I.peek()==="[")return s(I,g,B)}return s(I,g,g.inline)}function D(I,g){var H=X.token(I,g.htmlState);if(!j){var $=ie.innerMode(X,g.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||g.md_inside&&I.current().indexOf(">")>-1)&&(g.f=T,g.block=w,g.htmlState=null)}return H}function R(I,g){var H=g.listStack[g.listStack.length-1]||0,$=g.indentation=I.quote?g.push(K.formatting+"-"+I.formatting[H]+"-"+I.quote):g.push("error"))}if(I.taskOpen)return g.push("meta"),g.length?g.join(" "):null;if(I.taskClosed)return g.push("property"),g.length?g.join(" "):null;if(I.linkHref?g.push(K.linkHref,"url"):(I.strong&&g.push(K.strong),I.em&&g.push(K.em),I.strikethrough&&g.push(K.strikethrough),I.emoji&&g.push(K.emoji),I.linkText&&g.push(K.linkText),I.code&&g.push(K.code),I.image&&g.push(K.image),I.imageAltText&&g.push(K.imageAltText,"link"),I.imageMarker&&g.push(K.imageMarker)),I.header&&g.push(K.header,K.header+"-"+I.header),I.quote&&(g.push(K.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=I.quote?g.push(K.quote+"-"+I.quote):g.push(K.quote+"-"+P.maxBlockquoteDepth)),I.list!==!1){var $=(I.listStack.length-1)%3;$?$===1?g.push(K.list2):g.push(K.list3):g.push(K.list1)}return I.trailingSpaceNewLine?g.push("trailing-space-new-line"):I.trailingSpace&&g.push("trailing-space-"+(I.trailingSpace%2?"a":"b")),g.length?g.join(" "):null}function C(I,g){return I.match(h,!0)?A(g):void 0}function T(I,g){var H=g.text(I,g);if(typeof H!="undefined")return H;if(g.list)return g.list=null,A(g);if(g.taskList){var $=I.match(v,!0)[1]===" ";return $?g.taskOpen=!0:g.taskClosed=!0,P.highlightFormatting&&(g.formatting="task"),g.taskList=!1,A(g)}if(g.taskOpen=!1,g.taskClosed=!1,g.header&&I.match(/^#+$/,!0))return P.highlightFormatting&&(g.formatting="header"),A(g);var ne=I.next();if(g.linkTitle){g.linkTitle=!1;var se=ne;ne==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(I.match(new RegExp(Oe),!0))return K.linkHref}if(ne==="`"){var ge=g.formatting;P.highlightFormatting&&(g.formatting="code"),I.eatWhile("`");var Te=I.current().length;if(g.code==0&&(!g.quote||Te==1))return g.code=Te,A(g);if(Te==g.code){var Re=A(g);return g.code=0,Re}else return g.formatting=ge,A(g)}else if(g.code)return A(g);if(ne==="\\"&&(I.next(),P.highlightFormatting)){var Le=A(g),de=K.formatting+"-escape";return Le?Le+" "+de:de}if(ne==="!"&&I.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return g.imageMarker=!0,g.image=!0,P.highlightFormatting&&(g.formatting="image"),A(g);if(ne==="["&&g.imageMarker&&I.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return g.imageMarker=!1,g.imageAltText=!0,P.highlightFormatting&&(g.formatting="image"),A(g);if(ne==="]"&&g.imageAltText){P.highlightFormatting&&(g.formatting="image");var Le=A(g);return g.imageAltText=!1,g.image=!1,g.inline=g.f=S,Le}if(ne==="["&&!g.image)return g.linkText&&I.match(/^.*?\]/)||(g.linkText=!0,P.highlightFormatting&&(g.formatting="link")),A(g);if(ne==="]"&&g.linkText){P.highlightFormatting&&(g.formatting="link");var Le=A(g);return g.linkText=!1,g.inline=g.f=I.match(/\(.*?\)| ?\[.*?\]/,!1)?S:T,Le}if(ne==="<"&&I.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){g.f=g.inline=c,P.highlightFormatting&&(g.formatting="link");var Le=A(g);return Le?Le+=" ":Le="",Le+K.linkInline}if(ne==="<"&&I.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){g.f=g.inline=c,P.highlightFormatting&&(g.formatting="link");var Le=A(g);return Le?Le+=" ":Le="",Le+K.linkEmail}if(P.xml&&ne==="<"&&I.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var he=I.string.indexOf(">",I.pos);if(he!=-1){var re=I.string.substring(I.start,he);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(g.md_inside=!0)}return I.backUp(1),g.htmlState=ie.startState(X),a(I,g,D)}if(P.xml&&ne==="<"&&I.match(/^\/\w*?>/))return g.md_inside=!1,"tag";if(ne==="*"||ne==="_"){for(var fe=1,oe=I.pos==1?" ":I.string.charAt(I.pos-2);fe<3&&I.eat(ne);)fe++;var De=I.peek()||" ",Fe=!/\s/.test(De)&&(!l.test(De)||/\s/.test(oe)||l.test(oe)),Ce=!/\s/.test(oe)&&(!l.test(oe)||/\s/.test(De)||l.test(De)),Ne=null,Be=null;if(fe%2&&(!g.em&&Fe&&(ne==="*"||!Ce||l.test(oe))?Ne=!0:g.em==ne&&Ce&&(ne==="*"||!Fe||l.test(De))&&(Ne=!1)),fe>1&&(!g.strong&&Fe&&(ne==="*"||!Ce||l.test(oe))?Be=!0:g.strong==ne&&Ce&&(ne==="*"||!Fe||l.test(De))&&(Be=!1)),Be!=null||Ne!=null){P.highlightFormatting&&(g.formatting=Ne==null?"strong":Be==null?"em":"strong em"),Ne===!0&&(g.em=ne),Be===!0&&(g.strong=ne);var Re=A(g);return Ne===!1&&(g.em=!1),Be===!1&&(g.strong=!1),Re}}else if(ne===" "&&(I.eat("*")||I.eat("_"))){if(I.peek()===" ")return A(g);I.backUp(1)}if(P.strikethrough){if(ne==="~"&&I.eatWhile(ne)){if(g.strikethrough){P.highlightFormatting&&(g.formatting="strikethrough");var Re=A(g);return g.strikethrough=!1,Re}else if(I.match(/^[^\s]/,!1))return g.strikethrough=!0,P.highlightFormatting&&(g.formatting="strikethrough"),A(g)}else if(ne===" "&&I.match(/^~~/,!0)){if(I.peek()===" ")return A(g);I.backUp(2)}}if(P.emoji&&ne===":"&&I.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){g.emoji=!0,P.highlightFormatting&&(g.formatting="emoji");var le=A(g);return g.emoji=!1,le}return ne===" "&&(I.match(/^ +$/,!1)?g.trailingSpace++:g.trailingSpace&&(g.trailingSpaceNewLine=!0)),A(g)}function c(I,g){var H=I.next();if(H===">"){g.f=g.inline=T,P.highlightFormatting&&(g.formatting="link");var $=A(g);return $?$+=" ":$="",$+K.linkInline}return I.match(/^[^>]+/,!0),K.linkInline}function S(I,g){if(I.eatSpace())return null;var H=I.next();return H==="("||H==="["?(g.f=g.inline=b(H==="("?")":"]"),P.highlightFormatting&&(g.formatting="link-string"),g.linkHref=!0,A(g)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function b(I){return function(g,H){var $=g.next();if($===I){H.f=H.inline=T,P.highlightFormatting&&(H.formatting="link-string");var ne=A(H);return H.linkHref=!1,ne}return g.match(y[I]),H.linkHref=!0,A(H)}}function B(I,g){return I.match(/^([^\]\\]|\\.)*\]:/,!1)?(g.f=F,I.next(),P.highlightFormatting&&(g.formatting="link"),g.linkText=!0,A(g)):s(I,g,T)}function F(I,g){if(I.match(/^\]:/,!0)){g.f=g.inline=_,P.highlightFormatting&&(g.formatting="link");var H=A(g);return g.linkText=!1,H}return I.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function _(I,g){return I.eatSpace()?null:(I.match(/^[^\s]+/,!0),I.peek()===void 0?g.linkTitle=!0:I.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),g.f=g.inline=T,K.linkHref+" url")}var M={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:T,text:C,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(I){return{f:I.f,prevLine:I.prevLine,thisLine:I.thisLine,block:I.block,htmlState:I.htmlState&&ie.copyState(X,I.htmlState),indentation:I.indentation,localMode:I.localMode,localState:I.localMode?ie.copyState(I.localMode,I.localState):null,inline:I.inline,text:I.text,formatting:!1,linkText:I.linkText,linkTitle:I.linkTitle,linkHref:I.linkHref,code:I.code,em:I.em,strong:I.strong,strikethrough:I.strikethrough,emoji:I.emoji,header:I.header,setext:I.setext,hr:I.hr,taskList:I.taskList,list:I.list,listStack:I.listStack.slice(0),quote:I.quote,indentedCode:I.indentedCode,trailingSpace:I.trailingSpace,trailingSpaceNewLine:I.trailingSpaceNewLine,md_inside:I.md_inside,fencedEndRE:I.fencedEndRE}},token:function(I,g){if(g.formatting=!1,I!=g.thisLine.stream){if(g.header=0,g.hr=!1,I.match(/^\s*$/,!0))return E(g),null;if(g.prevLine=g.thisLine,g.thisLine={stream:I},g.taskList=!1,g.trailingSpace=0,g.trailingSpaceNewLine=!1,!g.localState&&(g.f=g.block,g.f!=D)){var H=I.match(/^\s*/,!0)[0].replace(/\t/g,o).length;if(g.indentation=H,g.indentationDiff=null,H>0)return null}}return g.f(I,g)},innerMode:function(I){return I.block==D?{state:I.htmlState,mode:X}:I.localState?{state:I.localState,mode:I.localMode}:{state:I,mode:M}},indent:function(I,g,H){return I.block==D&&X.indent?X.indent(I.htmlState,g,H):I.localState&&I.localMode.indent?I.localMode.indent(I.localState,g,H):ie.Pass},blankLine:E,getType:A,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},nEHx:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return ie});var ie;(function(J){J.DARK="dark",J.LIGHT="light",J.HIGH_CONTRAST="hc"})(ie||(ie={}))},nnTU:function(rt,be,Z){"use strict";Z.d(be,"b",function(){return K}),Z.d(be,"a",function(){return G});var ie=Z("MI8n"),J=Z("JYp7"),P=Z("pmY6"),X=Z("24hK"),j=Z("746U"),U=Z("Cg/j");const K=Object(U.c)("commandService"),G=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ie.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(r,L){if(!r)throw new Error("invalid command");if(typeof r=="string"){if(!L)throw new Error("invalid command");return this.registerCommand({id:r,handler:L})}if(r.description){const u=[];for(let l of r.description.args)u.push(l.constraint);const f=r.handler;r.handler=function(l,...o){return Object(j.o)(o,u),f(l,...o)}}const{id:v}=r;let m=this._commands.get(v);m||(m=new X.a,this._commands.set(v,m));let p=m.unshift(r),h=Object(P.i)(()=>{p();const u=this._commands.get(v);(u==null?void 0:u.isEmpty())&&this._commands.delete(v)});return this._onDidRegisterCommand.fire(v),h}registerCommandAlias(r,L){return G.registerCommand(r,(v,...m)=>v.get(K).executeCommand(L,...m))}getCommand(r){const L=this._commands.get(r);return!L||L.isEmpty()?void 0:J.a.first(L)}getCommands(){const r=new Map;for(const L of this._commands.keys()){const v=this.getCommand(L);v&&r.set(L,v)}return r}};G.registerCommand("noop",()=>{})},osHv:function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";var J=ie.Pos;function P(l,o){return l.line-o.line||l.ch-o.ch}var X="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",j=X+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",U=new RegExp("<(/?)(["+X+"]["+j+"]*)","g");function K(l,o,s,a){this.line=o,this.ch=s,this.cm=l,this.text=l.getLine(o),this.min=a?Math.max(a.from,l.firstLine()):l.firstLine(),this.max=a?Math.min(a.to-1,l.lastLine()):l.lastLine()}function G(l,o){var s=l.cm.getTokenTypeAt(J(l.line,o));return s&&/\btag\b/.test(s)}function r(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function L(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function v(l){for(;;){var o=l.text.indexOf(">",l.ch);if(o==-1){if(r(l))continue;return}if(!G(l,o+1)){l.ch=o+1;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function m(l){for(;;){var o=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(o==-1){if(L(l))continue;return}if(!G(l,o+1)){l.ch=o;continue}U.lastIndex=o,l.ch=o;var s=U.exec(l.text);if(s&&s.index==o)return s}}function p(l){for(;;){U.lastIndex=l.ch;var o=U.exec(l.text);if(!o){if(r(l))continue;return}if(!G(l,o.index+1)){l.ch=o.index+1;continue}return l.ch=o.index+o[0].length,o}}function h(l){for(;;){var o=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(o==-1){if(L(l))continue;return}if(!G(l,o+1)){l.ch=o;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function u(l,o){for(var s=[];;){var a=p(l),O,E=l.line,w=l.ch-(a?a[0].length:0);if(!a||!(O=v(l)))return;if(O=="selfClose")continue;if(a[1]){for(var D=s.length-1;D>=0;--D)if(s[D]==a[2]){s.length=D;break}if(D<0&&(!o||o==a[2]))return{tag:a[2],from:J(E,w),to:J(l.line,l.ch)}}else s.push(a[2])}}function f(l,o){for(var s=[];;){var a=h(l);if(!a)return;if(a=="selfClose"){m(l);continue}var O=l.line,E=l.ch,w=m(l);if(!w)return;if(w[1])s.push(w[2]);else{for(var D=s.length-1;D>=0;--D)if(s[D]==w[2]){s.length=D;break}if(D<0&&(!o||o==w[2]))return{tag:w[2],from:J(l.line,l.ch),to:J(O,E)}}}}ie.registerHelper("fold","xml",function(l,o){for(var s=new K(l,o.line,0);;){var a=p(s);if(!a||s.line!=o.line)return;var O=v(s);if(!O)return;if(!a[1]&&O!="selfClose"){var E=J(s.line,s.ch),w=u(s,a[2]);return w&&P(w.from,E)>0?{from:E,to:w.from}:null}}}),ie.findMatchingTag=function(l,o,s){var a=new K(l,o.line,o.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var O=v(a),E=O&&J(a.line,a.ch),w=O&&m(a);if(!O||!w||P(a,o)>0)return;var D={from:J(a.line,a.ch),to:E,tag:w[2]};return O=="selfClose"?{open:D,close:null,at:"open"}:w[1]?{open:f(a,w[2]),close:D,at:"close"}:(a=new K(l,E.line,E.ch,s),{open:D,close:u(a,w[2]),at:"open"})},ie.findEnclosingTag=function(l,o,s,a){for(var O=new K(l,o.line,o.ch,s);;){var E=f(O,a);if(!E)break;var w=new K(l,o.line,o.ch,s),D=u(w,E.tag);if(D)return{open:E,close:D}}},ie.scanForClosingTag=function(l,o,s,a){var O=new K(l,o.line,o.ch,a?{from:0,to:a}:null);return u(O,s)}})},p5ED:function(rt,be,Z){"use strict";var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("5Dmo"),X=Z("3S7+"),j=Z("k1fw"),U=Z("9og8"),K=Z("tJVT"),G=Z("WmNS"),r=Z.n(G),L=Z("q1tI"),v=Z.n(L),m=Z("vHTk"),p=Z.n(m),h=Z("yEEn"),u=Z("ZW9T"),f=Z("1vsH"),l=Z("V0Rq"),o=Z("m3rI");be.a=function(s){var a,O,E,w,D,R,A,C=s.editOffice,T=C===void 0?"view":C,c=s.data,S=s.theme,y=s.type,b=s.filename,B=s.monacoEditor,F=s.className,_=s.style,M=s.close,I=s.onClose,g=s.hasMask,H=s.disabledDownload,$=Object(L.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ne=Object(K.a)($,2),se=ne[0],Oe=ne[1],ge=Object(L.useState)(""),Te=Object(K.a)(ge,2),Re=Te[0],Le=Te[1],de=Object(L.useState)(),he=Object(K.a)(de,2),re=he[0],fe=he[1],oe=window.ENV==="build"?"/react/build":"",De=o.a.PROXY_SERVER||location.origin,Fe,Ce=1024*1024,Ne=10*Ce,Be=Object(L.useRef)();(a=c)!==null&&a!==void 0&&a.startsWith("/api")&&y!=="txt"&&(c=o.a.API_SERVER+c),y==="office"&&(Fe=Object(f.T)(c).filesize,Fe>Ne&&(y="other")),b&&B&&(B.filename=b),Object(L.useEffect)(function(){var Ie,We,Ve=(Ie=document.cookie)===null||Ie===void 0||((We=Ie.replace(/\s/g,""))===null||We===void 0)?void 0:We.split(";");Ve==null||Ve.map(function(Qe){var Je=Qe.split("=");Je[0]==="_educoder_session"&&Le(Je[1])})},[]),Object(L.useEffect)(function(){y==="office"&&le()},[y,c]);var le=function(){var Ie=Object(U.a)(r.a.mark(function We(){var Ve,Qe,Je;return r.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",c),Ve=c,c.startsWith("http")||(Ve=location.origin+Ve),Qe=new URL(Ve).pathname.split("/").pop(),qe.next=6,Object(l.V)({attachment_id:Qe});case 6:Je=qe.sent,fe(Je);case 8:case"end":return qe.stop()}},We)}));return function(){return Ie.apply(this,arguments)}}(),ve=function(){if(c.startsWith("http")||c.startsWith("blob:")){Se();return}Object(f.z)(b||"educoder",c,b)},Se=function(){Object(f.x)(b||"educoder",decodeURIComponent(c))};return v.a.createElement("div",{style:Object(j.a)({},_||{}),className:"".concat(g&&p.a.bgBlack," ").concat(y?p.a.wrp:"hide")},M&&v.a.createElement("div",{className:p.a.close,ref:Be},!H&&v.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Be.current}},v.a.createElement("span",{onClick:Se},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Be.current}},v.a.createElement("span",{className:"",onClick:I},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(p.a[F]," ").concat(F," ").concat(p.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&v.a.createElement(u.b,B)),y==="audio"&&v.a.createElement("audio",{src:"".concat(((O=c)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((E=c)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),y==="video"&&v.a.createElement(v.a.Fragment,null,((w=c)===null||w===void 0?void 0:w.indexOf("http"))>-1?v.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),y==="office"&&re&&v.a.createElement("iframe",{src:"".concat(oe,"/office.html?key=").concat(re.key,"&url=").concat(De+re.url,"&callbackUrl=").concat(De+re.callbackUrl,"&fileType=").concat(re.fileType,"&title=").concat(re.title,"&model=").concat(T,"&officeServer=").concat(o.a.OFFICE_SERVER,"&disabledDownload=").concat(!!H)}),y==="html"&&v.a.createElement("iframe",{src:c+"&disposition=inline"}),y==="pdf"&&v.a.createElement("iframe",{src:"".concat(oe,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!H)}),y==="image"&&v.a.createElement("img",{src:"".concat(((D=c)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((R=c)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(A=c)!==null&&A!==void 0&&A.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),y==="other"&&v.a.createElement("div",null,v.a.createElement(J.a,{type:"primary",size:"large",onClick:ve},v.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&v.a.createElement(J.a,{type:"primary",size:"large",onClick:ve},v.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(rt,be,Z){},pmY6:function(rt,be,Z){"use strict";Z.d(be,"h",function(){return L}),Z.d(be,"g",function(){return m}),Z.d(be,"f",function(){return p}),Z.d(be,"e",function(){return h}),Z.d(be,"i",function(){return u}),Z.d(be,"b",function(){return f}),Z.d(be,"a",function(){return l}),Z.d(be,"d",function(){return o}),Z.d(be,"c",function(){return s});var ie=Z("C/vA"),J=Z("JYp7");const P=!1;let X=null;function j(a){X=a}if(P){const a="__is_disposable_tracked__";j(new class{trackDisposable(O){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[a]||console.log(E)},3e3)}setParent(O,E){if(O&&O!==l.None)try{O[a]=!0}catch(w){}}markAsDisposed(O){if(O&&O!==l.None)try{O[a]=!0}catch(E){}}markAsSingleton(O){}})}function U(a){return X==null||X.trackDisposable(a),a}function K(a){X==null||X.markAsDisposed(a)}function G(a,O){X==null||X.setParent(a,O)}function r(a,O){if(!X)return;for(const E of a)X.setParent(E,O)}function L(a){return X==null||X.markAsSingleton(a),a}class v extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function p(a){if(J.a.is(a)){let O=[];for(const E of a)if(E)try{E.dispose()}catch(w){O.push(w)}if(O.length===1)throw O[0];if(O.length>1)throw new v(O);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function h(...a){const O=u(()=>p(a));return r(a,O),O}function u(a){const O=U({dispose:Object(ie.a)(()=>{K(O),a()})});return O}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,U(this)}dispose(){if(this._isDisposed)return;K(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return G(a,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}f.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new f,U(this),G(this._store,this)}dispose(){K(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}l.None=Object.freeze({dispose(){}});class o{constructor(){this._isDisposed=!1,U(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var O;if(this._isDisposed||a===this._value)return;(O=this._value)===null||O===void 0||O.dispose(),a&&G(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,K(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&G(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(rt,be,Z){var ie,J;(function(){var P;(function(){"use strict";var K=[,,function(v){function m(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var u=new m(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},m.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},m.prototype.has_match=function(u){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(u))return!0;return!1},m.prototype.set_indent=function(u,f){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(u){this.__items.push(u);var f=u.lastIndexOf(` + a `).concat($,",").concat($," 0 1 1 ").concat(-Oe,",").concat(ge),Re=Math.PI*2*$,Le={stroke:M,strokeDasharray:"".concat(_/100*(Re-g),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(g/2+F/100*(Re-g),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:Te,pathStyle:Le}}var y=function(_){var M=_.prefixCls,I=_.strokeWidth,g=_.trailWidth,H=_.gapDegree,$=_.gapPosition,ne=_.trailColor,se=_.strokeLinecap,Oe=_.style,ge=_.className,Te=_.strokeColor,Re=_.percent,Le=R(_,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(ie.useMemo)(function(){return C+=1,C},[]),he=S(0,100,ne,I,H,$),re=he.pathString,fe=he.pathStyle,oe=d(Re),De=d(Te),Fe=De.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),Ce=U(oe),Ne=s(Ce,1),Be=Ne[0],le=function(){var Se=0;return oe.map(function(Ie,We){var Ve=De[We]||De[De.length-1],Qe=Object.prototype.toString.call(Ve)==="[object Object]"?"url(#".concat(M,"-gradient-").concat(ce,")"):"",Je=S(Se,Ie,Ve,I,H,$);return Se+=Ie,J.a.createElement("path",{key:We,className:"".concat(M,"-circle-path"),d:Je.pathString,stroke:Qe,strokeLinecap:se,strokeWidth:I,opacity:Ie===0?0:1,fillOpacity:"0",style:Je.pathStyle,ref:Be[We]})})};return J.a.createElement("svg",o({className:X()("".concat(M,"-circle"),ge),viewBox:"0 0 100 100",style:Oe},Le),Fe&&J.a.createElement("defs",null,J.a.createElement("linearGradient",{id:"".concat(M,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Fe).sort(function(ve,Se){return T(ve)-T(Se)}).map(function(ve,Se){return J.a.createElement("stop",{key:Se,offset:ve,stopColor:Fe[ve]})}))),J.a.createElement("path",{className:"".concat(M,"-circle-trail"),d:re,stroke:ne,strokeLinecap:se,strokeWidth:g||I,fillOpacity:"0",style:fe}),le().reverse())};y.defaultProps=j;var b=y,B={Line:l,Circle:b}},ic2d:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return X});var ie=Z("FWmy"),J=Z("746U");class P{constructor(){this.data=new Map}add(j,U){ie.a(J.l(j)),ie.a(J.k(U)),ie.a(!this.data.has(j),"There is already an extension with this id"),this.data.set(j,U)}as(j){return this.data.get(j)||null}}const X=new P},kSUc:function(rt,be,Z){},lZu9:function(rt,be,Z){(function(ie){ie(Z("VrN/"),Z("1eCo"),Z("8EBN"))})(function(ie){"use strict";ie.defineMode("markdown",function(J,P){var X=ie.getMode(J,"text/html"),j=X.name=="null";function U(I){if(ie.findModeByName){var g=ie.findModeByName(I);g&&(I=g.mime||g.mimes[0])}var H=ie.getMode(J,I);return H.name=="null"?null:H}P.highlightFormatting===void 0&&(P.highlightFormatting=!1),P.maxBlockquoteDepth===void 0&&(P.maxBlockquoteDepth=0),P.taskLists===void 0&&(P.taskLists=!1),P.strikethrough===void 0&&(P.strikethrough=!1),P.emoji===void 0&&(P.emoji=!1),P.fencedCodeBlockHighlighting===void 0&&(P.fencedCodeBlockHighlighting=!0),P.fencedCodeBlockDefaultMode===void 0&&(P.fencedCodeBlockDefaultMode="text/plain"),P.xml===void 0&&(P.xml=!0),P.tokenTypeOverrides===void 0&&(P.tokenTypeOverrides={});var K={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var G in K)K.hasOwnProperty(G)&&P.tokenTypeOverrides[G]&&(K[G]=P.tokenTypeOverrides[G]);var r=/^([*\-_])(?:\s*\1){2,}\s*$/,L=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,m=P.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,u=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,o=" ";function s(I,g,H){return g.f=g.inline=H,H(I,g)}function a(I,g,H){return g.f=g.block=H,H(I,g)}function O(I){return!I||!/\S/.test(I.string)}function E(I){if(I.linkTitle=!1,I.linkHref=!1,I.linkText=!1,I.em=!1,I.strong=!1,I.strikethrough=!1,I.quote=0,I.indentedCode=!1,I.f==D){var g=j;if(!g){var H=ie.innerMode(X,I.htmlState);g=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}g&&(I.f=T,I.block=w,I.htmlState=null)}return I.trailingSpace=0,I.trailingSpaceNewLine=!1,I.prevLine=I.thisLine,I.thisLine={stream:null},null}function w(I,g){var H=I.column()===g.indentation,$=O(g.prevLine.stream),ne=g.indentedCode,se=g.prevLine.hr,Oe=g.list!==!1,ge=(g.listStack[g.listStack.length-1]||0)+3;g.indentedCode=!1;var Te=g.indentation;if(g.indentationDiff===null&&(g.indentationDiff=g.indentation,Oe)){for(g.list=null;Te=4&&(ne||g.prevLine.fencedCodeEnd||g.prevLine.header||$))return I.skipToEnd(),g.indentedCode=!0,K.code;if(I.eatSpace())return null;if(H&&g.indentation<=ge&&(ce=I.match(m))&&ce[1].length<=6)return g.quote=0,g.header=ce[1].length,g.thisLine.header=!0,P.highlightFormatting&&(g.formatting="header"),g.f=g.inline,A(g);if(g.indentation<=ge&&I.eat(">"))return g.quote=H?1:g.quote+1,P.highlightFormatting&&(g.formatting="quote"),I.eatSpace(),A(g);if(!Le&&!g.setext&&H&&g.indentation<=ge&&(ce=I.match(L))){var he=ce[1]?"ol":"ul";return g.indentation=Te+I.current().length,g.list=!0,g.quote=0,g.listStack.push(g.indentation),g.em=!1,g.strong=!1,g.code=!1,g.strikethrough=!1,P.taskLists&&I.match(v,!1)&&(g.taskList=!0),g.f=g.inline,P.highlightFormatting&&(g.formatting=["list","list-"+he]),A(g)}else{if(H&&g.indentation<=ge&&(ce=I.match(u,!0)))return g.quote=0,g.fencedEndRE=new RegExp(ce[1]+"+ *$"),g.localMode=P.fencedCodeBlockHighlighting&&U(ce[2]||P.fencedCodeBlockDefaultMode),g.localMode&&(g.localState=ie.startState(g.localMode)),g.f=g.block=R,P.highlightFormatting&&(g.formatting="code-block"),g.code=-1,A(g);if(g.setext||(!Re||!Oe)&&!g.quote&&g.list===!1&&!g.code&&!Le&&!f.test(I.string)&&(ce=I.lookAhead(1))&&(ce=ce.match(p)))return g.setext?(g.header=g.setext,g.setext=0,I.skipToEnd(),P.highlightFormatting&&(g.formatting="header")):(g.header=ce[0].charAt(0)=="="?1:2,g.setext=g.header),g.thisLine.header=!0,g.f=g.inline,A(g);if(Le)return I.skipToEnd(),g.hr=!0,g.thisLine.hr=!0,K.hr;if(I.peek()==="[")return s(I,g,B)}return s(I,g,g.inline)}function D(I,g){var H=X.token(I,g.htmlState);if(!j){var $=ie.innerMode(X,g.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||g.md_inside&&I.current().indexOf(">")>-1)&&(g.f=T,g.block=w,g.htmlState=null)}return H}function R(I,g){var H=g.listStack[g.listStack.length-1]||0,$=g.indentation=I.quote?g.push(K.formatting+"-"+I.formatting[H]+"-"+I.quote):g.push("error"))}if(I.taskOpen)return g.push("meta"),g.length?g.join(" "):null;if(I.taskClosed)return g.push("property"),g.length?g.join(" "):null;if(I.linkHref?g.push(K.linkHref,"url"):(I.strong&&g.push(K.strong),I.em&&g.push(K.em),I.strikethrough&&g.push(K.strikethrough),I.emoji&&g.push(K.emoji),I.linkText&&g.push(K.linkText),I.code&&g.push(K.code),I.image&&g.push(K.image),I.imageAltText&&g.push(K.imageAltText,"link"),I.imageMarker&&g.push(K.imageMarker)),I.header&&g.push(K.header,K.header+"-"+I.header),I.quote&&(g.push(K.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=I.quote?g.push(K.quote+"-"+I.quote):g.push(K.quote+"-"+P.maxBlockquoteDepth)),I.list!==!1){var $=(I.listStack.length-1)%3;$?$===1?g.push(K.list2):g.push(K.list3):g.push(K.list1)}return I.trailingSpaceNewLine?g.push("trailing-space-new-line"):I.trailingSpace&&g.push("trailing-space-"+(I.trailingSpace%2?"a":"b")),g.length?g.join(" "):null}function C(I,g){return I.match(h,!0)?A(g):void 0}function T(I,g){var H=g.text(I,g);if(typeof H!="undefined")return H;if(g.list)return g.list=null,A(g);if(g.taskList){var $=I.match(v,!0)[1]===" ";return $?g.taskOpen=!0:g.taskClosed=!0,P.highlightFormatting&&(g.formatting="task"),g.taskList=!1,A(g)}if(g.taskOpen=!1,g.taskClosed=!1,g.header&&I.match(/^#+$/,!0))return P.highlightFormatting&&(g.formatting="header"),A(g);var ne=I.next();if(g.linkTitle){g.linkTitle=!1;var se=ne;ne==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(I.match(new RegExp(Oe),!0))return K.linkHref}if(ne==="`"){var ge=g.formatting;P.highlightFormatting&&(g.formatting="code"),I.eatWhile("`");var Te=I.current().length;if(g.code==0&&(!g.quote||Te==1))return g.code=Te,A(g);if(Te==g.code){var Re=A(g);return g.code=0,Re}else return g.formatting=ge,A(g)}else if(g.code)return A(g);if(ne==="\\"&&(I.next(),P.highlightFormatting)){var Le=A(g),ce=K.formatting+"-escape";return Le?Le+" "+ce:ce}if(ne==="!"&&I.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return g.imageMarker=!0,g.image=!0,P.highlightFormatting&&(g.formatting="image"),A(g);if(ne==="["&&g.imageMarker&&I.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return g.imageMarker=!1,g.imageAltText=!0,P.highlightFormatting&&(g.formatting="image"),A(g);if(ne==="]"&&g.imageAltText){P.highlightFormatting&&(g.formatting="image");var Le=A(g);return g.imageAltText=!1,g.image=!1,g.inline=g.f=S,Le}if(ne==="["&&!g.image)return g.linkText&&I.match(/^.*?\]/)||(g.linkText=!0,P.highlightFormatting&&(g.formatting="link")),A(g);if(ne==="]"&&g.linkText){P.highlightFormatting&&(g.formatting="link");var Le=A(g);return g.linkText=!1,g.inline=g.f=I.match(/\(.*?\)| ?\[.*?\]/,!1)?S:T,Le}if(ne==="<"&&I.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){g.f=g.inline=d,P.highlightFormatting&&(g.formatting="link");var Le=A(g);return Le?Le+=" ":Le="",Le+K.linkInline}if(ne==="<"&&I.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){g.f=g.inline=d,P.highlightFormatting&&(g.formatting="link");var Le=A(g);return Le?Le+=" ":Le="",Le+K.linkEmail}if(P.xml&&ne==="<"&&I.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var he=I.string.indexOf(">",I.pos);if(he!=-1){var re=I.string.substring(I.start,he);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(g.md_inside=!0)}return I.backUp(1),g.htmlState=ie.startState(X),a(I,g,D)}if(P.xml&&ne==="<"&&I.match(/^\/\w*?>/))return g.md_inside=!1,"tag";if(ne==="*"||ne==="_"){for(var fe=1,oe=I.pos==1?" ":I.string.charAt(I.pos-2);fe<3&&I.eat(ne);)fe++;var De=I.peek()||" ",Fe=!/\s/.test(De)&&(!l.test(De)||/\s/.test(oe)||l.test(oe)),Ce=!/\s/.test(oe)&&(!l.test(oe)||/\s/.test(De)||l.test(De)),Ne=null,Be=null;if(fe%2&&(!g.em&&Fe&&(ne==="*"||!Ce||l.test(oe))?Ne=!0:g.em==ne&&Ce&&(ne==="*"||!Fe||l.test(De))&&(Ne=!1)),fe>1&&(!g.strong&&Fe&&(ne==="*"||!Ce||l.test(oe))?Be=!0:g.strong==ne&&Ce&&(ne==="*"||!Fe||l.test(De))&&(Be=!1)),Be!=null||Ne!=null){P.highlightFormatting&&(g.formatting=Ne==null?"strong":Be==null?"em":"strong em"),Ne===!0&&(g.em=ne),Be===!0&&(g.strong=ne);var Re=A(g);return Ne===!1&&(g.em=!1),Be===!1&&(g.strong=!1),Re}}else if(ne===" "&&(I.eat("*")||I.eat("_"))){if(I.peek()===" ")return A(g);I.backUp(1)}if(P.strikethrough){if(ne==="~"&&I.eatWhile(ne)){if(g.strikethrough){P.highlightFormatting&&(g.formatting="strikethrough");var Re=A(g);return g.strikethrough=!1,Re}else if(I.match(/^[^\s]/,!1))return g.strikethrough=!0,P.highlightFormatting&&(g.formatting="strikethrough"),A(g)}else if(ne===" "&&I.match(/^~~/,!0)){if(I.peek()===" ")return A(g);I.backUp(2)}}if(P.emoji&&ne===":"&&I.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){g.emoji=!0,P.highlightFormatting&&(g.formatting="emoji");var le=A(g);return g.emoji=!1,le}return ne===" "&&(I.match(/^ +$/,!1)?g.trailingSpace++:g.trailingSpace&&(g.trailingSpaceNewLine=!0)),A(g)}function d(I,g){var H=I.next();if(H===">"){g.f=g.inline=T,P.highlightFormatting&&(g.formatting="link");var $=A(g);return $?$+=" ":$="",$+K.linkInline}return I.match(/^[^>]+/,!0),K.linkInline}function S(I,g){if(I.eatSpace())return null;var H=I.next();return H==="("||H==="["?(g.f=g.inline=b(H==="("?")":"]"),P.highlightFormatting&&(g.formatting="link-string"),g.linkHref=!0,A(g)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function b(I){return function(g,H){var $=g.next();if($===I){H.f=H.inline=T,P.highlightFormatting&&(H.formatting="link-string");var ne=A(H);return H.linkHref=!1,ne}return g.match(y[I]),H.linkHref=!0,A(H)}}function B(I,g){return I.match(/^([^\]\\]|\\.)*\]:/,!1)?(g.f=F,I.next(),P.highlightFormatting&&(g.formatting="link"),g.linkText=!0,A(g)):s(I,g,T)}function F(I,g){if(I.match(/^\]:/,!0)){g.f=g.inline=_,P.highlightFormatting&&(g.formatting="link");var H=A(g);return g.linkText=!1,H}return I.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function _(I,g){return I.eatSpace()?null:(I.match(/^[^\s]+/,!0),I.peek()===void 0?g.linkTitle=!0:I.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),g.f=g.inline=T,K.linkHref+" url")}var M={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:T,text:C,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(I){return{f:I.f,prevLine:I.prevLine,thisLine:I.thisLine,block:I.block,htmlState:I.htmlState&&ie.copyState(X,I.htmlState),indentation:I.indentation,localMode:I.localMode,localState:I.localMode?ie.copyState(I.localMode,I.localState):null,inline:I.inline,text:I.text,formatting:!1,linkText:I.linkText,linkTitle:I.linkTitle,linkHref:I.linkHref,code:I.code,em:I.em,strong:I.strong,strikethrough:I.strikethrough,emoji:I.emoji,header:I.header,setext:I.setext,hr:I.hr,taskList:I.taskList,list:I.list,listStack:I.listStack.slice(0),quote:I.quote,indentedCode:I.indentedCode,trailingSpace:I.trailingSpace,trailingSpaceNewLine:I.trailingSpaceNewLine,md_inside:I.md_inside,fencedEndRE:I.fencedEndRE}},token:function(I,g){if(g.formatting=!1,I!=g.thisLine.stream){if(g.header=0,g.hr=!1,I.match(/^\s*$/,!0))return E(g),null;if(g.prevLine=g.thisLine,g.thisLine={stream:I},g.taskList=!1,g.trailingSpace=0,g.trailingSpaceNewLine=!1,!g.localState&&(g.f=g.block,g.f!=D)){var H=I.match(/^\s*/,!0)[0].replace(/\t/g,o).length;if(g.indentation=H,g.indentationDiff=null,H>0)return null}}return g.f(I,g)},innerMode:function(I){return I.block==D?{state:I.htmlState,mode:X}:I.localState?{state:I.localState,mode:I.localMode}:{state:I,mode:M}},indent:function(I,g,H){return I.block==D&&X.indent?X.indent(I.htmlState,g,H):I.localState&&I.localMode.indent?I.localMode.indent(I.localState,g,H):ie.Pass},blankLine:E,getType:A,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},nEHx:function(rt,be,Z){"use strict";Z.d(be,"a",function(){return ie});var ie;(function(J){J.DARK="dark",J.LIGHT="light",J.HIGH_CONTRAST="hc"})(ie||(ie={}))},nnTU:function(rt,be,Z){"use strict";Z.d(be,"b",function(){return K}),Z.d(be,"a",function(){return G});var ie=Z("MI8n"),J=Z("JYp7"),P=Z("pmY6"),X=Z("24hK"),j=Z("746U"),U=Z("Cg/j");const K=Object(U.c)("commandService"),G=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ie.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(r,L){if(!r)throw new Error("invalid command");if(typeof r=="string"){if(!L)throw new Error("invalid command");return this.registerCommand({id:r,handler:L})}if(r.description){const u=[];for(let l of r.description.args)u.push(l.constraint);const f=r.handler;r.handler=function(l,...o){return Object(j.o)(o,u),f(l,...o)}}const{id:v}=r;let m=this._commands.get(v);m||(m=new X.a,this._commands.set(v,m));let p=m.unshift(r),h=Object(P.i)(()=>{p();const u=this._commands.get(v);(u==null?void 0:u.isEmpty())&&this._commands.delete(v)});return this._onDidRegisterCommand.fire(v),h}registerCommandAlias(r,L){return G.registerCommand(r,(v,...m)=>v.get(K).executeCommand(L,...m))}getCommand(r){const L=this._commands.get(r);return!L||L.isEmpty()?void 0:J.a.first(L)}getCommands(){const r=new Map;for(const L of this._commands.keys()){const v=this.getCommand(L);v&&r.set(L,v)}return r}};G.registerCommand("noop",()=>{})},osHv:function(rt,be,Z){(function(ie){ie(Z("VrN/"))})(function(ie){"use strict";var J=ie.Pos;function P(l,o){return l.line-o.line||l.ch-o.ch}var X="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",j=X+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",U=new RegExp("<(/?)(["+X+"]["+j+"]*)","g");function K(l,o,s,a){this.line=o,this.ch=s,this.cm=l,this.text=l.getLine(o),this.min=a?Math.max(a.from,l.firstLine()):l.firstLine(),this.max=a?Math.min(a.to-1,l.lastLine()):l.lastLine()}function G(l,o){var s=l.cm.getTokenTypeAt(J(l.line,o));return s&&/\btag\b/.test(s)}function r(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function L(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function v(l){for(;;){var o=l.text.indexOf(">",l.ch);if(o==-1){if(r(l))continue;return}if(!G(l,o+1)){l.ch=o+1;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function m(l){for(;;){var o=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(o==-1){if(L(l))continue;return}if(!G(l,o+1)){l.ch=o;continue}U.lastIndex=o,l.ch=o;var s=U.exec(l.text);if(s&&s.index==o)return s}}function p(l){for(;;){U.lastIndex=l.ch;var o=U.exec(l.text);if(!o){if(r(l))continue;return}if(!G(l,o.index+1)){l.ch=o.index+1;continue}return l.ch=o.index+o[0].length,o}}function h(l){for(;;){var o=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(o==-1){if(L(l))continue;return}if(!G(l,o+1)){l.ch=o;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function u(l,o){for(var s=[];;){var a=p(l),O,E=l.line,w=l.ch-(a?a[0].length:0);if(!a||!(O=v(l)))return;if(O=="selfClose")continue;if(a[1]){for(var D=s.length-1;D>=0;--D)if(s[D]==a[2]){s.length=D;break}if(D<0&&(!o||o==a[2]))return{tag:a[2],from:J(E,w),to:J(l.line,l.ch)}}else s.push(a[2])}}function f(l,o){for(var s=[];;){var a=h(l);if(!a)return;if(a=="selfClose"){m(l);continue}var O=l.line,E=l.ch,w=m(l);if(!w)return;if(w[1])s.push(w[2]);else{for(var D=s.length-1;D>=0;--D)if(s[D]==w[2]){s.length=D;break}if(D<0&&(!o||o==w[2]))return{tag:w[2],from:J(l.line,l.ch),to:J(O,E)}}}}ie.registerHelper("fold","xml",function(l,o){for(var s=new K(l,o.line,0);;){var a=p(s);if(!a||s.line!=o.line)return;var O=v(s);if(!O)return;if(!a[1]&&O!="selfClose"){var E=J(s.line,s.ch),w=u(s,a[2]);return w&&P(w.from,E)>0?{from:E,to:w.from}:null}}}),ie.findMatchingTag=function(l,o,s){var a=new K(l,o.line,o.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var O=v(a),E=O&&J(a.line,a.ch),w=O&&m(a);if(!O||!w||P(a,o)>0)return;var D={from:J(a.line,a.ch),to:E,tag:w[2]};return O=="selfClose"?{open:D,close:null,at:"open"}:w[1]?{open:f(a,w[2]),close:D,at:"close"}:(a=new K(l,E.line,E.ch,s),{open:D,close:u(a,w[2]),at:"open"})},ie.findEnclosingTag=function(l,o,s,a){for(var O=new K(l,o.line,o.ch,s);;){var E=f(O,a);if(!E)break;var w=new K(l,o.line,o.ch,s),D=u(w,E.tag);if(D)return{open:E,close:D}}},ie.scanForClosingTag=function(l,o,s,a){var O=new K(l,o.line,o.ch,a?{from:0,to:a}:null);return u(O,s)}})},p5ED:function(rt,be,Z){"use strict";var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("5Dmo"),X=Z("3S7+"),j=Z("k1fw"),U=Z("9og8"),K=Z("tJVT"),G=Z("WmNS"),r=Z.n(G),L=Z("q1tI"),v=Z.n(L),m=Z("vHTk"),p=Z.n(m),h=Z("yEEn"),u=Z("ZW9T"),f=Z("1vsH"),l=Z("V0Rq"),o=Z("m3rI");be.a=function(s){var a,O,E,w,D,R,A,C=s.editOffice,T=C===void 0?"view":C,d=s.data,S=s.theme,y=s.type,b=s.filename,B=s.monacoEditor,F=s.className,_=s.style,M=s.close,I=s.onClose,g=s.hasMask,H=s.disabledDownload,$=Object(L.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ne=Object(K.a)($,2),se=ne[0],Oe=ne[1],ge=Object(L.useState)(""),Te=Object(K.a)(ge,2),Re=Te[0],Le=Te[1],ce=Object(L.useState)(),he=Object(K.a)(ce,2),re=he[0],fe=he[1],oe=window.ENV==="build"?"/react/build":"",De=o.a.PROXY_SERVER||location.origin,Fe,Ce=1024*1024,Ne=10*Ce,Be=Object(L.useRef)();(a=d)!==null&&a!==void 0&&a.startsWith("/api")&&y!=="txt"&&(d=o.a.API_SERVER+d),y==="office"&&(Fe=Object(f.T)(d).filesize,Fe>Ne&&(y="other")),b&&B&&(B.filename=b),Object(L.useEffect)(function(){var Ie,We,Ve=(Ie=document.cookie)===null||Ie===void 0||((We=Ie.replace(/\s/g,""))===null||We===void 0)?void 0:We.split(";");Ve==null||Ve.map(function(Qe){var Je=Qe.split("=");Je[0]==="_educoder_session"&&Le(Je[1])})},[]),Object(L.useEffect)(function(){y==="office"&&le()},[y,d]);var le=function(){var Ie=Object(U.a)(r.a.mark(function We(){var Ve,Qe,Je;return r.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",d),Ve=d,d.startsWith("http")||(Ve=location.origin+Ve),Qe=new URL(Ve).pathname.split("/").pop(),qe.next=6,Object(l.V)({attachment_id:Qe});case 6:Je=qe.sent,fe(Je);case 8:case"end":return qe.stop()}},We)}));return function(){return Ie.apply(this,arguments)}}(),ve=function(){if(d.startsWith("http")||d.startsWith("blob:")){Se();return}Object(f.z)(b||"educoder",d,b)},Se=function(){Object(f.x)(b||"educoder",decodeURIComponent(d))};return v.a.createElement("div",{style:Object(j.a)({},_||{}),className:"".concat(g&&p.a.bgBlack," ").concat(y?p.a.wrp:"hide")},M&&v.a.createElement("div",{className:p.a.close,ref:Be},!H&&v.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Be.current}},v.a.createElement("span",{onClick:Se},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Be.current}},v.a.createElement("span",{className:"",onClick:I},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(p.a[F]," ").concat(F," ").concat(p.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&v.a.createElement(u.b,B)),y==="audio"&&v.a.createElement("audio",{src:"".concat(((O=d)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((E=d)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(d),autoPlay:!0}),y==="video"&&v.a.createElement(v.a.Fragment,null,((w=d)===null||w===void 0?void 0:w.indexOf("http"))>-1?v.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),y==="office"&&re&&v.a.createElement("iframe",{src:"".concat(oe,"/office.html?key=").concat(re.key,"&url=").concat(De+re.url,"&callbackUrl=").concat(De+re.callbackUrl,"&fileType=").concat(re.fileType,"&title=").concat(re.title,"&model=").concat(T,"&officeServer=").concat(o.a.OFFICE_SERVER,"&disabledDownload=").concat(!!H)}),y==="html"&&v.a.createElement("iframe",{src:d+"&disposition=inline"}),y==="pdf"&&v.a.createElement("iframe",{src:"".concat(oe,"/js/pdfview/index.html?url=").concat(d,"&disabledDownload=").concat(!!H)}),y==="image"&&v.a.createElement("img",{src:"".concat(((D=d)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((R=d)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(A=d)!==null&&A!==void 0&&A.startsWith("/api")?"":"data:image/png;base64,").concat(d)}),y==="other"&&v.a.createElement("div",null,v.a.createElement(J.a,{type:"primary",size:"large",onClick:ve},v.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&v.a.createElement(J.a,{type:"primary",size:"large",onClick:ve},v.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(rt,be,Z){},pmY6:function(rt,be,Z){"use strict";Z.d(be,"h",function(){return L}),Z.d(be,"g",function(){return m}),Z.d(be,"f",function(){return p}),Z.d(be,"e",function(){return h}),Z.d(be,"i",function(){return u}),Z.d(be,"b",function(){return f}),Z.d(be,"a",function(){return l}),Z.d(be,"d",function(){return o}),Z.d(be,"c",function(){return s});var ie=Z("C/vA"),J=Z("JYp7");const P=!1;let X=null;function j(a){X=a}if(P){const a="__is_disposable_tracked__";j(new class{trackDisposable(O){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[a]||console.log(E)},3e3)}setParent(O,E){if(O&&O!==l.None)try{O[a]=!0}catch(w){}}markAsDisposed(O){if(O&&O!==l.None)try{O[a]=!0}catch(E){}}markAsSingleton(O){}})}function U(a){return X==null||X.trackDisposable(a),a}function K(a){X==null||X.markAsDisposed(a)}function G(a,O){X==null||X.setParent(a,O)}function r(a,O){if(!X)return;for(const E of a)X.setParent(E,O)}function L(a){return X==null||X.markAsSingleton(a),a}class v extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function p(a){if(J.a.is(a)){let O=[];for(const E of a)if(E)try{E.dispose()}catch(w){O.push(w)}if(O.length===1)throw O[0];if(O.length>1)throw new v(O);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function h(...a){const O=u(()=>p(a));return r(a,O),O}function u(a){const O=U({dispose:Object(ie.a)(()=>{K(O),a()})});return O}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,U(this)}dispose(){if(this._isDisposed)return;K(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return G(a,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}f.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new f,U(this),G(this._store,this)}dispose(){K(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}l.None=Object.freeze({dispose(){}});class o{constructor(){this._isDisposed=!1,U(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var O;if(this._isDisposed||a===this._value)return;(O=this._value)===null||O===void 0||O.dispose(),a&&G(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,K(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&G(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(rt,be,Z){var ie,J;(function(){var P;(function(){"use strict";var K=[,,function(v){function m(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var u=new m(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},m.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},m.prototype.has_match=function(u){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(u))return!0;return!1},m.prototype.set_indent=function(u,f){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(u){this.__items.push(u);var f=u.lastIndexOf(` `);f!==-1?this.__character_count=u.length-f:this.__character_count+=u.length},m.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function p(u,f){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),f=f||"",u.indent_level>0&&(f=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}p.prototype.get_indent_size=function(u,f){var l=this.__base_string_length;return f=f||0,u<0&&(l=0),l+=u*this.__indent_size,l+=f,l},p.prototype.get_indent_string=function(u,f){var l=this.__base_string;return f=f||0,u<0&&(u=0,l=""),f+=u*this.__indent_size,this.__ensure_cache(f),l+=this.__cache[f],l},p.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var u=this.__cache.length,f=0,l="";this.__indent_size&&u>=this.__indent_size&&(f=Math.floor(u/this.__indent_size),u-=f*this.__indent_size,l=new Array(f+1).join(this.__indent_string)),u&&(l+=new Array(u+1).join(" ")),this.__cache.push(l)};function h(u,f){this.__indent_cache=new p(u,f),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(u,f){return this.__indent_cache.get_indent_string(u,f)},h.prototype.get_indent_size=function(u,f){return this.__indent_cache.get_indent_size(u,f)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(u){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===` `&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(` `);return u!==` @@ -418,21 +418,21 @@ You passed in: '`+this.raw_options[u]+"'");return o},m.prototype._is_valid_selec `)),F=H+F.replace(/\n/g,` `+H)}I&&(F?F=I+F+` `+g:F=I+g),S.print_newline(!1),F&&(y.text=F,y.whitespace_before="",y.newlines=0,S.add_raw_token(y),S.print_newline(!0))}},A.prototype._handle_tag_open=function(S,y,b,B){var F=this._get_tag_open_token(y);return(b.is_unformatted||b.is_content_unformatted)&&!b.is_empty_element&&y.type===l.TAG_OPEN&&y.text.indexOf("]*)/),this.tag_check=b?b[1]:""):(b=y.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=b?b[1]:"",(y.text.startsWith("{{#>")||y.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&y.next!==null?this.tag_check=y.next.text.split(" ")[0]:this.tag_check=y.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),y.type===l.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||y.closed&&y.closed.text==="/>";var B=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(B=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(B)))}};A.prototype._get_tag_open_token=function(S){var y=new C(this._tag_stack.get_parser_token(),S);return y.alignment_size=this._options.wrap_attributes_indent_size,y.is_end_tag=y.is_end_tag||w(y.tag_check,this._options.void_elements),y.is_empty_element=y.tag_complete||y.is_start_tag&&y.is_end_tag,y.is_unformatted=!y.tag_complete&&w(y.tag_check,this._options.unformatted),y.is_content_unformatted=!y.is_empty_element&&w(y.tag_check,this._options.content_unformatted),y.is_inline_element=w(y.tag_name,this._options.inline)||y.tag_name.includes("-")||y.tag_start_char==="{",y},A.prototype._set_tag_position=function(S,y,b,B,F){if(b.is_empty_element||(b.is_end_tag?b.start_tag_token=this._tag_stack.try_pop(b.tag_name):(this._do_optional_end_element(b)&&(b.is_inline_element||S.print_newline(!1)),this._tag_stack.record_tag(b),(b.tag_name==="script"||b.tag_name==="style")&&!(b.is_unformatted||b.is_content_unformatted)&&(b.custom_beautifier_name=E(b.tag_check,y)))),w(b.tag_check,this._options.extra_liners)&&(S.print_newline(!1),S._output.just_added_blankline()||S.print_newline(!0)),b.is_empty_element){if(b.tag_start_char==="{"&&b.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),b.indent_content=!0;var _=S.current_line_has_match(/{{#if/);_||S.print_newline(!1)}b.tag_name==="!--"&&F.type===l.TAG_CLOSE&&B.is_end_tag&&b.text.indexOf(` -`)===-1||(b.is_inline_element||b.is_unformatted||S.print_newline(!1),this._calcluate_parent_multiline(S,b))}else if(b.is_end_tag){var M=!1;M=b.start_tag_token&&b.start_tag_token.multiline_content,M=M||!b.is_inline_element&&!(B.is_inline_element||B.is_unformatted)&&!(F.type===l.TAG_CLOSE&&b.start_tag_token===B)&&F.type!=="TK_CONTENT",(b.is_content_unformatted||b.is_unformatted)&&(M=!1),M&&S.print_newline(!1)}else b.indent_content=!b.custom_beautifier_name,b.tag_start_char==="<"&&(b.tag_name==="html"?b.indent_content=this._options.indent_inner_html:b.tag_name==="head"?b.indent_content=this._options.indent_head_inner_html:b.tag_name==="body"&&(b.indent_content=this._options.indent_body_inner_html)),!(b.is_inline_element||b.is_unformatted)&&(F.type!=="TK_CONTENT"||b.is_content_unformatted)&&S.print_newline(!1),this._calcluate_parent_multiline(S,b)},A.prototype._calcluate_parent_multiline=function(S,y){y.parent&&S._output.just_added_newline()&&!((y.is_inline_element||y.is_unformatted)&&y.parent.is_inline_element)&&(y.parent.multiline_content=!0)};var T=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],c=["a","audio","del","ins","map","noscript","video"];A.prototype._do_optional_end_element=function(S){var y=null;if(S.is_empty_element||!S.is_start_tag||!S.parent)return;if(S.tag_name==="body")y=y||this._tag_stack.try_pop("head");else if(S.tag_name==="li")y=y||this._tag_stack.try_pop("li",["ol","ul"]);else if(S.tag_name==="dd"||S.tag_name==="dt")y=y||this._tag_stack.try_pop("dt",["dl"]),y=y||this._tag_stack.try_pop("dd",["dl"]);else if(S.parent.tag_name==="p"&&T.indexOf(S.tag_name)!==-1){var b=S.parent.parent;(!b||c.indexOf(b.tag_name)===-1)&&(y=y||this._tag_stack.try_pop("p"))}else S.tag_name==="rp"||S.tag_name==="rt"?(y=y||this._tag_stack.try_pop("rt",["ruby","rtc"]),y=y||this._tag_stack.try_pop("rp",["ruby","rtc"])):S.tag_name==="optgroup"?y=y||this._tag_stack.try_pop("optgroup",["select"]):S.tag_name==="option"?y=y||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):S.tag_name==="colgroup"?y=y||this._tag_stack.try_pop("caption",["table"]):S.tag_name==="thead"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"])):S.tag_name==="tbody"||S.tag_name==="tfoot"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("thead",["table"]),y=y||this._tag_stack.try_pop("tbody",["table"])):S.tag_name==="tr"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(S.tag_name==="th"||S.tag_name==="td")&&(y=y||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),y=y||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return S.parent=this._tag_stack.get_parser_token(),y},v.exports.Beautifier=A},function(v,m,p){var h=p(6).Options;function u(f){h.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}u.prototype=new h,v.exports.Options=u},function(v,m,p){var h=p(9).Tokenizer,u=p(9).TOKEN,f=p(13).Directives,l=p(14).TemplatablePattern,o=p(12).Pattern,s={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:u.START,RAW:u.RAW,EOF:u.EOF},a=new f(/<\!--/,/-->/),O=function(E,w){h.call(this,E,w),this._current_tag_name="";var D=new l(this._input).read_options(this._options),R=new o(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(//),cdata:R.starting_with(//),conditional_comment:R.starting_with(//),processing:R.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var A=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(A).until_after(A)}};O.prototype=new h,O.prototype._is_comment=function(E){return!1},O.prototype._is_opening=function(E){return E.type===s.TAG_OPEN},O.prototype._is_closing=function(E,w){return E.type===s.TAG_CLOSE&&w&&((E.text===">"||E.text==="/>")&&w.text[0]==="<"||E.text==="}}"&&w.text[0]==="{"&&w.text[1]==="{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(E,w){var D=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(s.EOF,""):(D=D||this._read_open_handlebars(R,w),D=D||this._read_attribute(R,E,w),D=D||this._read_close(R,w),D=D||this._read_raw_content(R,E,w),D=D||this._read_content_word(R),D=D||this._read_comment_or_cdata(R),D=D||this._read_processing(R),D=D||this._read_open(R,w),D=D||this._create_token(s.UNKNOWN,this._input.next()),D)},O.prototype._read_comment_or_cdata=function(E){var w=null,D=null,R=null;if(E==="<"){var A=this._input.peek(1);A==="!"&&(D=this.__patterns.comment.read(),D?(R=a.get_directives(D),R&&R.ignore==="start"&&(D+=a.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(w=this._create_token(s.COMMENT,D),w.directives=R)}return w},O.prototype._read_processing=function(E){var w=null,D=null,R=null;if(E==="<"){var A=this._input.peek(1);(A==="!"||A==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(w=this._create_token(s.COMMENT,D),w.directives=R)}return w},O.prototype._read_open=function(E,w){var D=null,R=null;return w||E==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),R=this._create_token(s.TAG_OPEN,D)),R},O.prototype._read_open_handlebars=function(E,w){var D=null,R=null;return w||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),R=this._create_token(s.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),R=this._create_token(s.TAG_OPEN,D))),R},O.prototype._read_close=function(E,w){var D=null,R=null;return w&&(w.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(D=this._input.next(),E==="/"&&(D+=this._input.next()),R=this._create_token(s.TAG_CLOSE,D)):w.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(s.TAG_CLOSE,"}}"))),R},O.prototype._read_attribute=function(E,w,D){var R=null,A="";if(D&&D.text[0]==="<")if(E==="=")R=this._create_token(s.EQUALS,this._input.next());else if(E==='"'||E==="'"){var C=this._input.next();E==='"'?C+=this.__patterns.double_quote.read():C+=this.__patterns.single_quote.read(),R=this._create_token(s.VALUE,C)}else A=this.__patterns.attribute.read(),A&&(w.type===s.EQUALS?R=this._create_token(s.VALUE,A):R=this._create_token(s.ATTRIBUTE,A));return R},O.prototype._is_content_unformatted=function(E){return this._options.void_elements.indexOf(E)===-1&&(this._options.content_unformatted.indexOf(E)!==-1||this._options.unformatted.indexOf(E)!==-1)},O.prototype._read_raw_content=function(E,w,D){var R="";if(D&&D.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(w.type===s.TAG_CLOSE&&w.opened.text[0]==="<"&&w.text[0]!=="/"){var A=w.opened.text.substr(1).toLowerCase();if(A==="script"||A==="style"){var C=this._read_comment_or_cdata(E);if(C)return C.type=s.TEXT,C;R=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(A)&&(R=this._input.readUntil(new RegExp("","ig")))}return R?this._create_token(s.TEXT,R):null},O.prototype._read_content_word=function(E){var w="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(w=this.__patterns.unformatted_content_delimiter.read())),w||(w=this.__patterns.word.read()),w)return this._create_token(s.TEXT,w)},v.exports.Tokenizer=O,v.exports.TOKEN=s}],G={};function r(v){var m=G[v];if(m!==void 0)return m.exports;var p=G[v]={exports:{}};return K[v](p,p.exports,r),p.exports}var L=r(18);P=L})();var X=P;if(!0)!(ie=[Z,Z("6UM0"),Z("TXwP")],J=function(K){var G=Z("6UM0"),r=Z("TXwP");return{html_beautify:function(L,v){return X(L,v,G.js_beautify,r.css_beautify)}}}.apply(be,ie),J!==void 0&&(rt.exports=J));else var j,U})()},qduV:function(rt,be,Z){"use strict";Z.r(be);var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("sPJy"),X=Z("bE4q"),j=Z("miYZ"),U=Z("tsqr"),K=Z("2qtc"),G=Z("kLXV"),r=Z("oBTY"),L=Z("9og8"),v=Z("k1fw"),m=Z("y8nQ"),p=Z("Vl3Y"),h=Z("tJVT"),u=Z("WmNS"),f=Z.n(u),l=Z("q1tI"),o=Z.n(l),s=Z("Ty5D"),a=Z("9kvl"),O=Z("55Ip"),E=Z("Ot1p"),w=Z("XYT7"),D=Z("zgC5"),R=Z.n(D),A=Z("500L"),C=Z("HBuW"),T=function(S){var y,b,B,F,_,M=S.shixunHomeworks,I=S.newCourse,g=S.globalSetting,H=S.loading,$=S.dispatch,ne=S.match,se=Object(s.i)(),Oe=p.a.useForm(),ge=Object(h.a)(Oe,1),Te=ge[0],Re=Object(l.useState)({}),Le=Object(h.a)(Re,2),de=Le[0],he=Le[1],re=Object(l.useState)(!0),fe=Object(h.a)(re,2),oe=fe[0],De=fe[1],Fe=Object(l.useState)(!1),Ce=Object(h.a)(Fe,2),Ne=Ce[0],Be=Ce[1],le=Object(l.useState)(),ve=Object(h.a)(le,2),Se=ve[0],Ie=ve[1],We=Object(l.useRef)(),Ve=M.studentWorkAddDefaultData,Qe=Object(l.useState)([]),Je=Object(h.a)(Qe,2),st=Je[0],qe=Je[1],at=M.replyList,Ue=M.workDetail,ct=Object(l.useRef)(null),lt=Object(l.useState)({page:1,limit:20,search:""}),je=Object(h.a)(lt,2),Ge=je[0],Ae=je[1];Object(l.useEffect)(function(){se.commonHomeworkId!==""&&(se.categoryId=se.commonHomeworkId,$({type:"shixunHomeworks/getWorkDetail",payload:Object(v.a)({},se)}))},[se.commonHomeworkId]);var _e=function(){var xe=Object(L.a)(f.a.mark(function Pe(){var He,ze;return f.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return Be(!0),ot.next=3,$({type:"shixunHomeworks/getSearchMemberList",payload:Object(v.a)(Object(v.a)({},ne.params),Ge)});case 3:ze=ot.sent,Be(!1),ze.members&&qe([].concat(Object(r.a)(st),Object(r.a)(ze.members))),((He=ze.members)===null||He===void 0?void 0:He.length)<20&&De(!1);case 7:case"end":return ot.stop()}},Pe)}));return function(){return xe.apply(this,arguments)}}(),we=function(Pe){G.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:o.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Pe,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},ae=function xe(Pe){var He;Pe=(He=Pe)!==null&&He!==void 0&&He.includes(".json")?Pe:"".concat(Pe,".json"),G.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:o.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var ze=Object(L.a)(f.a.mark(function ot(){var yt,dt;return f.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Object(C.Bb)({url:Pe});case 2:if(yt=Ot.sent,yt){Ot.next=5;break}return Ot.abrupt("return");case 5:return U.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Ot.next=8,Object(C.E)({id:yt.shixun_identifier});case 8:if(dt=Ot.sent,!(dt!=null&&dt.game_identifier)){Ot.next=12;break}return a.d===null||a.d===void 0||a.d.push("/tasks/".concat(dt.game_identifier)),Ot.abrupt("return");case 12:(dt==null?void 0:dt.status)===2?xe(dt==null?void 0:dt.message):(dt==null?void 0:dt.status)===3&&we(dt==null?void 0:dt.message);case 13:case"end":return Ot.stop()}},ot)}));function ht(){return ze.apply(this,arguments)}return ht}()})},ue=function(){var Pe,He;if(Ue!=null&&(Pe=Ue.shixun_info)!==null&&Pe!==void 0&&Pe.is_jupyter||Ue!=null&&(He=Ue.shixun_info)!==null&&He!==void 0&&He.is_jupyter_lab){$({type:"shixunsDetail/execJupyter",payload:{id:Ue==null?void 0:Ue.shixun_info.identifier}}).then(function(ze){ze!=null&&ze.identifier&&(a.d===null||a.d===void 0||a.d.push("/tasks/".concat(ze.identifier,"/jupyter")))});return}$({type:"shixunsDetail/execShixun",payload:{id:Ue==null?void 0:Ue.shixun_info.identifier}}).then(function(ze){if(ze!=null&&ze.game_identifier){a.d===null||a.d===void 0||a.d.push("/tasks/".concat(ze.game_identifier));return}(ze==null?void 0:ze.status)===2?ae(ze==null?void 0:ze.message):(ze==null?void 0:ze.status)===3&&we(ze==null?void 0:ze.message)})};Object(l.useEffect)(function(){new Promise(Object(L.a)(f.a.mark(function xe(){var Pe;return f.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ze.next=2,$({type:"shixunHomeworks/addStudentWorkDefaultData",payload:Object(v.a)(Object(v.a)({},ne.params),{},{type:3})});case 2:Pe=ze.sent;case 3:case"end":return ze.stop()}},xe)}))),_e()},[]);var ce=function(){var xe=Object(L.a)(f.a.mark(function Pe(He){var ze;return f.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Object(w.c)(Object(v.a)(Object(v.a)(Object(v.a)({},ne.params),He),{},{type:3}));case 2:ze=ot.sent,ze.status===0&&a.d.push("/classrooms/".concat(se.coursesId,"/common_homework/").concat(se.commonHomeworkId,"/review/").concat(ze.work_id));case 4:case"end":return ot.stop()}},Pe)}));return function(He){return xe.apply(this,arguments)}}(),me=function(){var xe=Object(L.a)(f.a.mark(function Pe(He){var ze,ht;return f.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:ze=Object(v.a)({},de),ze.attachment_ids&&(ze.attachment_ids=ze==null||((ht=ze.attachment_ids)===null||ht===void 0)?void 0:ht.map(function(dt){return dt.response.id})),!ze.attachment_ids||ze.attachment_ids==""?G.a.confirm({title:o.a.createElement("div",null,"\u8FD8\u672A\u4E0A\u4F20\u9644\u4EF6",o.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\u4F5C\u54C1\uFF1F"),onOk:function(){ce(ze)}}):ce(ze);case 3:case"end":return yt.stop()}},Pe)}));return function(He){return xe.apply(this,arguments)}}();return o.a.createElement("section",{className:R.a.bg},o.a.createElement("div",{ref:ct},Ve.course_name&&o.a.createElement("section",{className:"animated fadeIn"},o.a.createElement("aside",null,Ve.category&&o.a.createElement(X.a,{separator:">"},o.a.createElement(X.a.Item,null,o.a.createElement(O.a,{to:"/classrooms/".concat(Ve.course_id,"/common_homework")},Ve.course_name)),o.a.createElement(X.a.Item,null,o.a.createElement(O.a,{to:"/classrooms/".concat(Ve.course_id,"/common_homework")},Ve.category.category_name)),o.a.createElement(X.a.Item,null,Ve==null?void 0:Ve.user_name," \u63D0\u4EA4\u4F5C\u54C1")))),o.a.createElement(p.a,{form:Te,className:R.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){he(Object(v.a)({},Te.getFieldsValue())),console.log("formValue:",de)},initialValues:[{base_on_project:1}],onFinish:me},o.a.createElement("div",{className:R.a.mdWrap},o.a.createElement("div",{className:R.a.titleWrapper},o.a.createElement("div",{className:"zuoyeTitle"},M==null||((y=M.studentWorkAddDefaultData)===null||y===void 0)?void 0:y.homework_name),o.a.createElement("div",null,o.a.createElement("div",{className:"zuoyemiaosu"},o.a.createElement("span",{className:"icon"}),o.a.createElement("h4",{className:"direction"},"\u4F5C\u4E1A\u63CF\u8FF0")),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:M==null||((b=M.studentWorkAddDefaultData)===null||b===void 0)?void 0:b.homework_description}}),(Ue==null||((B=Ue.shixun_info)===null||B===void 0)?void 0:B.shixun_status)!=-1&&(Ue==null?void 0:Ue.is_shixun)&&o.a.createElement(J.a,{onClick:function(){ue()},style:{position:"absolute",bottom:"30px",left:"30px"},className:"btnWrapper",type:"primary"},o.a.createElement("i",{className:"iconfont icon-jixutiaozhan mr10 font14"}),Ue==null||((F=Ue.shixun_info)===null||F===void 0||((_=F.task_operation)===null||_===void 0))?void 0:_[0]))),o.a.createElement("div",{style:{background:"#fff",width:"954px",paddingTop:"30px",paddingLeft:"37px",paddingRight:"26px",position:"relative"}},o.a.createElement(p.a.Item,{name:"description",label:"\u5185\u5BB9:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:65535,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u523665535\u4E2A\u5B57\u7B26"}]},o.a.createElement(E.a,{height:665,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u4F5C\u4E1A\u5185\u5BB9\u6216\u4F5C\u4E1A\u9644\u4EF6\u7684\u7B80\u8981\u63CF\u8FF0\uFF0C\u6700\u5927\u9650\u5236\u4E3A65535\u4E2A\u5B57\u7B26",watch:!0,defaultValue:de.intro})),o.a.createElement("div",null,o.a.createElement(p.a.Item,{name:"attachment_ids"},o.a.createElement(A.b,null))))))),o.a.createElement("div",{className:R.a.backgroundFa},o.a.createElement("div",{style:{width:1378,display:"flex",justifyContent:"end"}},o.a.createElement(p.a.Item,null,o.a.createElement(J.a,{size:"large",type:"primary",ghost:!0,className:R.a.button,style:{width:"60px",height:"32px",background:"#F8F9FC",borderRadius:"2px",border:"1px solid #C3CFE0",marginRight:"20px"},onClick:function(){return a.d.push("/classrooms/".concat(ne.params.coursesId,"/common_homework/").concat(se.commonHomeworkId,"/detail"))}},"\u53D6\u6D88"),o.a.createElement(J.a,{size:"large",type:"primary",className:"".concat(R.a.button),htmlType:"submit",style:{height:"32px"},loading:H["newCourse/editCourse"]||H["newCourse/submitCourse"],onClick:function(){Te.submit()}},"\u63D0\u4EA4")))))};be.default=Object(a.a)(function(c){var S=c.shixunHomeworks,y=c.newCourse,b=c.loading,B=c.globalSetting;return{shixunHomeworks:S,newCourse:y,globalSetting:B,loading:b.effects}})(T)},"rAM+":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});var ie=Z("Qw5x");function J(P,X){var j;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(j=Object(ie.a)(P))||X&&P&&typeof P.length=="number"){j&&(P=j);var U=0,K=function(){};return{s:K,n:function(){return U>=P.length?{done:!0}:{done:!1,value:P[U++]}},e:function(m){throw m},f:K}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G=!0,r=!1,L;return{s:function(){j=P[Symbol.iterator]()},n:function(){var m=j.next();return G=m.done,m},e:function(m){r=!0,L=m},f:function(){try{!G&&j.return!=null&&j.return()}finally{if(r)throw L}}}}},rUJ1:function(rt,be){const Z=/[&<>"']/,ie=/[&<>"']/g,J=/[<>"']|&(?!#?\w+;)/,P=/[<>"']|&(?!#?\w+;)/g,X={"&":"&","<":"<",">":">",'"':""","'":"'"},j=R=>X[R];function U(R,A){if(A){if(Z.test(R))return R.replace(ie,j)}else if(J.test(R))return R.replace(P,j);return R}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function G(R){return R.replace(K,(A,C)=>(C=C.toLowerCase(),C==="colon"?":":C.charAt(0)==="#"?C.charAt(1)==="x"?String.fromCharCode(parseInt(C.substring(2),16)):String.fromCharCode(+C.substring(1)):""))}const r=/(^|[^\[])\^/g;function L(R,A){R=R.source||R,A=A||"";const C={replace:(T,c)=>(c=c.source||c,c=c.replace(r,"$1"),R=R.replace(T,c),C),getRegex:()=>new RegExp(R,A)};return C}const v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(R,A,C){if(R){let T;try{T=decodeURIComponent(G(C)).replace(v,"").toLowerCase()}catch(c){return null}if(T.indexOf("javascript:")===0||T.indexOf("vbscript:")===0||T.indexOf("data:")===0)return null}A&&!m.test(C)&&(C=o(A,C));try{C=encodeURI(C).replace(/%25/g,"%")}catch(T){return null}return C}const h={},u=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(R,A){h[" "+R]||(u.test(R)?h[" "+R]=R+"/":h[" "+R]=E(R,"/",!0)),R=h[" "+R];const C=R.indexOf(":")===-1;return A.substring(0,2)==="//"?C?A:R.replace(f,"$1")+A:A.charAt(0)==="/"?C?A:R.replace(l,"$1")+A:R+A}const s={exec:function(){}};function a(R){let A=1,C,T;for(;A{let B=!1,F=y;for(;--F>=0&&b[F]==="\\";)B=!B;return B?"|":" |"}),T=C.split(/ \|/);let c=0;if(T.length>A)T.splice(A);else for(;T.length{const o=this.themingParticipants.indexOf(l);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let h=new p;j.a.add(m.ThemingContribution,h);function u(l){return h.onColorThemeChange(l)}class f extends P.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},ulZh:function(rt,be,Z){typeof window!="undefined"&&function(J,P){rt.exports=P()}(this,function(){return function(ie){var J={};function P(X){if(J[X])return J[X].exports;var j=J[X]={i:X,l:!1,exports:{}};return ie[X].call(j.exports,j,j.exports,P),j.l=!0,j.exports}return P.m=ie,P.c=J,P.d=function(X,j,U){P.o(X,j)||Object.defineProperty(X,j,{enumerable:!0,get:U})},P.r=function(X){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(X,"__esModule",{value:!0})},P.t=function(X,j){if(j&1&&(X=P(X)),j&8)return X;if(j&4&&typeof X=="object"&&X&&X.__esModule)return X;var U=Object.create(null);if(P.r(U),Object.defineProperty(U,"default",{enumerable:!0,value:X}),j&2&&typeof X!="string")for(var K in X)P.d(U,K,function(G){return X[G]}.bind(null,K));return U},P.n=function(X){var j=X&&X.__esModule?function(){return X.default}:function(){return X};return P.d(j,"a",j),j},P.o=function(X,j){return Object.prototype.hasOwnProperty.call(X,j)},P.p="/dist/",P(P.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ie,J,P){"use strict";var X=Object.prototype.hasOwnProperty,j="~";function U(){}Object.create&&(U.prototype=Object.create(null),new U().__proto__||(j=!1));function K(v,m,p){this.fn=v,this.context=m,this.once=p||!1}function G(v,m,p,h,u){if(typeof p!="function")throw new TypeError("The listener must be a function");var f=new K(p,h||v,u),l=j?j+m:m;return v._events[l]?v._events[l].fn?v._events[l]=[v._events[l],f]:v._events[l].push(f):(v._events[l]=f,v._eventsCount++),v}function r(v,m){--v._eventsCount===0?v._events=new U:delete v._events[m]}function L(){this._events=new U,this._eventsCount=0}L.prototype.eventNames=function(){var m=[],p,h;if(this._eventsCount===0)return m;for(h in p=this._events)X.call(p,h)&&m.push(j?h.slice(1):h);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(p)):m},L.prototype.listeners=function(m){var p=j?j+m:m,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,f=h.length,l=new Array(f);u0},!1)}function v(m,p){for(var h={main:[p]},u={main:[]},f={main:{}};L(h);)for(var l=Object.keys(h),o=0;o=2*D/A||b<=F)return;var _=Number.POSITIVE_INFINITY,M;for(M=l.level-1;M>T;M--){var I=C[M].maxBitrate;if(_=D*I/(8*.8*y),_=b)return;var g=this.bwEstimator.getEstimate();L.logger.warn("Fragment "+l.sn+(o?" part "+o.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+` +`)===-1||(b.is_inline_element||b.is_unformatted||S.print_newline(!1),this._calcluate_parent_multiline(S,b))}else if(b.is_end_tag){var M=!1;M=b.start_tag_token&&b.start_tag_token.multiline_content,M=M||!b.is_inline_element&&!(B.is_inline_element||B.is_unformatted)&&!(F.type===l.TAG_CLOSE&&b.start_tag_token===B)&&F.type!=="TK_CONTENT",(b.is_content_unformatted||b.is_unformatted)&&(M=!1),M&&S.print_newline(!1)}else b.indent_content=!b.custom_beautifier_name,b.tag_start_char==="<"&&(b.tag_name==="html"?b.indent_content=this._options.indent_inner_html:b.tag_name==="head"?b.indent_content=this._options.indent_head_inner_html:b.tag_name==="body"&&(b.indent_content=this._options.indent_body_inner_html)),!(b.is_inline_element||b.is_unformatted)&&(F.type!=="TK_CONTENT"||b.is_content_unformatted)&&S.print_newline(!1),this._calcluate_parent_multiline(S,b)},A.prototype._calcluate_parent_multiline=function(S,y){y.parent&&S._output.just_added_newline()&&!((y.is_inline_element||y.is_unformatted)&&y.parent.is_inline_element)&&(y.parent.multiline_content=!0)};var T=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],d=["a","audio","del","ins","map","noscript","video"];A.prototype._do_optional_end_element=function(S){var y=null;if(S.is_empty_element||!S.is_start_tag||!S.parent)return;if(S.tag_name==="body")y=y||this._tag_stack.try_pop("head");else if(S.tag_name==="li")y=y||this._tag_stack.try_pop("li",["ol","ul"]);else if(S.tag_name==="dd"||S.tag_name==="dt")y=y||this._tag_stack.try_pop("dt",["dl"]),y=y||this._tag_stack.try_pop("dd",["dl"]);else if(S.parent.tag_name==="p"&&T.indexOf(S.tag_name)!==-1){var b=S.parent.parent;(!b||d.indexOf(b.tag_name)===-1)&&(y=y||this._tag_stack.try_pop("p"))}else S.tag_name==="rp"||S.tag_name==="rt"?(y=y||this._tag_stack.try_pop("rt",["ruby","rtc"]),y=y||this._tag_stack.try_pop("rp",["ruby","rtc"])):S.tag_name==="optgroup"?y=y||this._tag_stack.try_pop("optgroup",["select"]):S.tag_name==="option"?y=y||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):S.tag_name==="colgroup"?y=y||this._tag_stack.try_pop("caption",["table"]):S.tag_name==="thead"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"])):S.tag_name==="tbody"||S.tag_name==="tfoot"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("thead",["table"]),y=y||this._tag_stack.try_pop("tbody",["table"])):S.tag_name==="tr"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(S.tag_name==="th"||S.tag_name==="td")&&(y=y||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),y=y||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return S.parent=this._tag_stack.get_parser_token(),y},v.exports.Beautifier=A},function(v,m,p){var h=p(6).Options;function u(f){h.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}u.prototype=new h,v.exports.Options=u},function(v,m,p){var h=p(9).Tokenizer,u=p(9).TOKEN,f=p(13).Directives,l=p(14).TemplatablePattern,o=p(12).Pattern,s={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:u.START,RAW:u.RAW,EOF:u.EOF},a=new f(/<\!--/,/-->/),O=function(E,w){h.call(this,E,w),this._current_tag_name="";var D=new l(this._input).read_options(this._options),R=new o(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(//),cdata:R.starting_with(//),conditional_comment:R.starting_with(//),processing:R.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var A=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(A).until_after(A)}};O.prototype=new h,O.prototype._is_comment=function(E){return!1},O.prototype._is_opening=function(E){return E.type===s.TAG_OPEN},O.prototype._is_closing=function(E,w){return E.type===s.TAG_CLOSE&&w&&((E.text===">"||E.text==="/>")&&w.text[0]==="<"||E.text==="}}"&&w.text[0]==="{"&&w.text[1]==="{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(E,w){var D=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(s.EOF,""):(D=D||this._read_open_handlebars(R,w),D=D||this._read_attribute(R,E,w),D=D||this._read_close(R,w),D=D||this._read_raw_content(R,E,w),D=D||this._read_content_word(R),D=D||this._read_comment_or_cdata(R),D=D||this._read_processing(R),D=D||this._read_open(R,w),D=D||this._create_token(s.UNKNOWN,this._input.next()),D)},O.prototype._read_comment_or_cdata=function(E){var w=null,D=null,R=null;if(E==="<"){var A=this._input.peek(1);A==="!"&&(D=this.__patterns.comment.read(),D?(R=a.get_directives(D),R&&R.ignore==="start"&&(D+=a.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(w=this._create_token(s.COMMENT,D),w.directives=R)}return w},O.prototype._read_processing=function(E){var w=null,D=null,R=null;if(E==="<"){var A=this._input.peek(1);(A==="!"||A==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(w=this._create_token(s.COMMENT,D),w.directives=R)}return w},O.prototype._read_open=function(E,w){var D=null,R=null;return w||E==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),R=this._create_token(s.TAG_OPEN,D)),R},O.prototype._read_open_handlebars=function(E,w){var D=null,R=null;return w||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),R=this._create_token(s.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),R=this._create_token(s.TAG_OPEN,D))),R},O.prototype._read_close=function(E,w){var D=null,R=null;return w&&(w.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(D=this._input.next(),E==="/"&&(D+=this._input.next()),R=this._create_token(s.TAG_CLOSE,D)):w.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(s.TAG_CLOSE,"}}"))),R},O.prototype._read_attribute=function(E,w,D){var R=null,A="";if(D&&D.text[0]==="<")if(E==="=")R=this._create_token(s.EQUALS,this._input.next());else if(E==='"'||E==="'"){var C=this._input.next();E==='"'?C+=this.__patterns.double_quote.read():C+=this.__patterns.single_quote.read(),R=this._create_token(s.VALUE,C)}else A=this.__patterns.attribute.read(),A&&(w.type===s.EQUALS?R=this._create_token(s.VALUE,A):R=this._create_token(s.ATTRIBUTE,A));return R},O.prototype._is_content_unformatted=function(E){return this._options.void_elements.indexOf(E)===-1&&(this._options.content_unformatted.indexOf(E)!==-1||this._options.unformatted.indexOf(E)!==-1)},O.prototype._read_raw_content=function(E,w,D){var R="";if(D&&D.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(w.type===s.TAG_CLOSE&&w.opened.text[0]==="<"&&w.text[0]!=="/"){var A=w.opened.text.substr(1).toLowerCase();if(A==="script"||A==="style"){var C=this._read_comment_or_cdata(E);if(C)return C.type=s.TEXT,C;R=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(A)&&(R=this._input.readUntil(new RegExp("","ig")))}return R?this._create_token(s.TEXT,R):null},O.prototype._read_content_word=function(E){var w="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(w=this.__patterns.unformatted_content_delimiter.read())),w||(w=this.__patterns.word.read()),w)return this._create_token(s.TEXT,w)},v.exports.Tokenizer=O,v.exports.TOKEN=s}],G={};function r(v){var m=G[v];if(m!==void 0)return m.exports;var p=G[v]={exports:{}};return K[v](p,p.exports,r),p.exports}var L=r(18);P=L})();var X=P;if(!0)!(ie=[Z,Z("6UM0"),Z("TXwP")],J=function(K){var G=Z("6UM0"),r=Z("TXwP");return{html_beautify:function(L,v){return X(L,v,G.js_beautify,r.css_beautify)}}}.apply(be,ie),J!==void 0&&(rt.exports=J));else var j,U})()},qduV:function(rt,be,Z){"use strict";Z.r(be);var ie=Z("+L6B"),J=Z("2/Rp"),P=Z("sPJy"),X=Z("bE4q"),j=Z("miYZ"),U=Z("tsqr"),K=Z("2qtc"),G=Z("kLXV"),r=Z("oBTY"),L=Z("9og8"),v=Z("k1fw"),m=Z("y8nQ"),p=Z("Vl3Y"),h=Z("tJVT"),u=Z("WmNS"),f=Z.n(u),l=Z("q1tI"),o=Z.n(l),s=Z("Ty5D"),a=Z("9kvl"),O=Z("55Ip"),E=Z("Ot1p"),w=Z("XYT7"),D=Z("zgC5"),R=Z.n(D),A=Z("500L"),C=Z("HBuW"),T=function(S){var y,b,B,F,_,M=S.shixunHomeworks,I=S.newCourse,g=S.globalSetting,H=S.loading,$=S.dispatch,ne=S.match,se=Object(s.i)(),Oe=p.a.useForm(),ge=Object(h.a)(Oe,1),Te=ge[0],Re=Object(l.useState)({}),Le=Object(h.a)(Re,2),ce=Le[0],he=Le[1],re=Object(l.useState)(!0),fe=Object(h.a)(re,2),oe=fe[0],De=fe[1],Fe=Object(l.useState)(!1),Ce=Object(h.a)(Fe,2),Ne=Ce[0],Be=Ce[1],le=Object(l.useState)(),ve=Object(h.a)(le,2),Se=ve[0],Ie=ve[1],We=Object(l.useRef)(),Ve=M.studentWorkAddDefaultData,Qe=Object(l.useState)([]),Je=Object(h.a)(Qe,2),st=Je[0],qe=Je[1],at=M.replyList,Ue=M.workDetail,dt=Object(l.useRef)(null),lt=Object(l.useState)({page:1,limit:20,search:""}),je=Object(h.a)(lt,2),Ge=je[0],Ae=je[1];Object(l.useEffect)(function(){se.commonHomeworkId!==""&&(se.categoryId=se.commonHomeworkId,$({type:"shixunHomeworks/getWorkDetail",payload:Object(v.a)({},se)}))},[se.commonHomeworkId]);var _e=function(){var xe=Object(L.a)(f.a.mark(function Pe(){var He,ze;return f.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return Be(!0),ot.next=3,$({type:"shixunHomeworks/getSearchMemberList",payload:Object(v.a)(Object(v.a)({},ne.params),Ge)});case 3:ze=ot.sent,Be(!1),ze.members&&qe([].concat(Object(r.a)(st),Object(r.a)(ze.members))),((He=ze.members)===null||He===void 0?void 0:He.length)<20&&De(!1);case 7:case"end":return ot.stop()}},Pe)}));return function(){return xe.apply(this,arguments)}}(),we=function(Pe){G.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:o.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Pe,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},ae=function xe(Pe){var He;Pe=(He=Pe)!==null&&He!==void 0&&He.includes(".json")?Pe:"".concat(Pe,".json"),G.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:o.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var ze=Object(L.a)(f.a.mark(function ot(){var yt,ct;return f.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Object(C.Bb)({url:Pe});case 2:if(yt=Ot.sent,yt){Ot.next=5;break}return Ot.abrupt("return");case 5:return U.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Ot.next=8,Object(C.E)({id:yt.shixun_identifier});case 8:if(ct=Ot.sent,!(ct!=null&&ct.game_identifier)){Ot.next=12;break}return a.d===null||a.d===void 0||a.d.push("/tasks/".concat(ct.game_identifier)),Ot.abrupt("return");case 12:(ct==null?void 0:ct.status)===2?xe(ct==null?void 0:ct.message):(ct==null?void 0:ct.status)===3&&we(ct==null?void 0:ct.message);case 13:case"end":return Ot.stop()}},ot)}));function ht(){return ze.apply(this,arguments)}return ht}()})},ue=function(){var Pe,He;if(Ue!=null&&(Pe=Ue.shixun_info)!==null&&Pe!==void 0&&Pe.is_jupyter||Ue!=null&&(He=Ue.shixun_info)!==null&&He!==void 0&&He.is_jupyter_lab){$({type:"shixunsDetail/execJupyter",payload:{id:Ue==null?void 0:Ue.shixun_info.identifier}}).then(function(ze){ze!=null&&ze.identifier&&(a.d===null||a.d===void 0||a.d.push("/tasks/".concat(ze.identifier,"/jupyter")))});return}$({type:"shixunsDetail/execShixun",payload:{id:Ue==null?void 0:Ue.shixun_info.identifier}}).then(function(ze){if(ze!=null&&ze.game_identifier){a.d===null||a.d===void 0||a.d.push("/tasks/".concat(ze.game_identifier));return}(ze==null?void 0:ze.status)===2?ae(ze==null?void 0:ze.message):(ze==null?void 0:ze.status)===3&&we(ze==null?void 0:ze.message)})};Object(l.useEffect)(function(){new Promise(Object(L.a)(f.a.mark(function xe(){var Pe;return f.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ze.next=2,$({type:"shixunHomeworks/addStudentWorkDefaultData",payload:Object(v.a)(Object(v.a)({},ne.params),{},{type:3})});case 2:Pe=ze.sent;case 3:case"end":return ze.stop()}},xe)}))),_e()},[]);var de=function(){var xe=Object(L.a)(f.a.mark(function Pe(He){var ze;return f.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Object(w.c)(Object(v.a)(Object(v.a)(Object(v.a)({},ne.params),He),{},{type:3}));case 2:ze=ot.sent,ze.status===0&&a.d.push("/classrooms/".concat(se.coursesId,"/common_homework/").concat(se.commonHomeworkId,"/review/").concat(ze.work_id));case 4:case"end":return ot.stop()}},Pe)}));return function(He){return xe.apply(this,arguments)}}(),me=function(){var xe=Object(L.a)(f.a.mark(function Pe(He){var ze,ht;return f.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:ze=Object(v.a)({},ce),ze.attachment_ids&&(ze.attachment_ids=ze==null||((ht=ze.attachment_ids)===null||ht===void 0)?void 0:ht.map(function(ct){return ct.response.id})),!ze.attachment_ids||ze.attachment_ids==""?G.a.confirm({title:o.a.createElement("div",null,"\u8FD8\u672A\u4E0A\u4F20\u9644\u4EF6",o.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\u4F5C\u54C1\uFF1F"),onOk:function(){de(ze)}}):de(ze);case 3:case"end":return yt.stop()}},Pe)}));return function(He){return xe.apply(this,arguments)}}();return o.a.createElement("section",{className:R.a.bg},o.a.createElement("div",{ref:dt},Ve.course_name&&o.a.createElement("section",{className:"animated fadeIn"},o.a.createElement("aside",null,Ve.category&&o.a.createElement(X.a,{separator:">"},o.a.createElement(X.a.Item,null,o.a.createElement(O.a,{to:"/classrooms/".concat(Ve.course_id,"/common_homework")},Ve.course_name)),o.a.createElement(X.a.Item,null,o.a.createElement(O.a,{to:"/classrooms/".concat(Ve.course_id,"/common_homework")},Ve.category.category_name)),o.a.createElement(X.a.Item,null,Ve==null?void 0:Ve.user_name," \u63D0\u4EA4\u4F5C\u54C1")))),o.a.createElement(p.a,{form:Te,className:R.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){he(Object(v.a)({},Te.getFieldsValue())),console.log("formValue:",ce)},initialValues:[{base_on_project:1}],onFinish:me},o.a.createElement("div",{className:R.a.mdWrap},o.a.createElement("div",{className:R.a.titleWrapper},o.a.createElement("div",{className:"zuoyeTitle"},M==null||((y=M.studentWorkAddDefaultData)===null||y===void 0)?void 0:y.homework_name),o.a.createElement("div",null,o.a.createElement("div",{className:"zuoyemiaosu"},o.a.createElement("span",{className:"icon"}),o.a.createElement("h4",{className:"direction"},"\u4F5C\u4E1A\u63CF\u8FF0")),o.a.createElement("div",{dangerouslySetInnerHTML:{__html:M==null||((b=M.studentWorkAddDefaultData)===null||b===void 0)?void 0:b.homework_description}}),(Ue==null||((B=Ue.shixun_info)===null||B===void 0)?void 0:B.shixun_status)!=-1&&(Ue==null?void 0:Ue.is_shixun)&&o.a.createElement(J.a,{onClick:function(){ue()},style:{position:"absolute",bottom:"30px",left:"30px"},className:"btnWrapper",type:"primary"},o.a.createElement("i",{className:"iconfont icon-jixutiaozhan mr10 font14"}),Ue==null||((F=Ue.shixun_info)===null||F===void 0||((_=F.task_operation)===null||_===void 0))?void 0:_[0]))),o.a.createElement("div",{style:{background:"#fff",width:"954px",paddingTop:"30px",paddingLeft:"37px",paddingRight:"26px",position:"relative"}},o.a.createElement(p.a.Item,{name:"description",label:"\u5185\u5BB9:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:65535,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u523665535\u4E2A\u5B57\u7B26"}]},o.a.createElement(E.a,{height:665,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u4F5C\u4E1A\u5185\u5BB9\u6216\u4F5C\u4E1A\u9644\u4EF6\u7684\u7B80\u8981\u63CF\u8FF0\uFF0C\u6700\u5927\u9650\u5236\u4E3A65535\u4E2A\u5B57\u7B26",watch:!0,defaultValue:ce.intro})),o.a.createElement("div",null,o.a.createElement(p.a.Item,{name:"attachment_ids"},o.a.createElement(A.b,null))))))),o.a.createElement("div",{className:R.a.backgroundFa},o.a.createElement("div",{style:{width:1378,display:"flex",justifyContent:"end"}},o.a.createElement(p.a.Item,null,o.a.createElement(J.a,{size:"large",type:"primary",ghost:!0,className:R.a.button,style:{width:"60px",height:"32px",background:"#F8F9FC",borderRadius:"2px",border:"1px solid #C3CFE0",marginRight:"20px"},onClick:function(){return a.d.push("/classrooms/".concat(ne.params.coursesId,"/common_homework/").concat(se.commonHomeworkId,"/detail"))}},"\u53D6\u6D88"),o.a.createElement(J.a,{size:"large",type:"primary",className:"".concat(R.a.button),htmlType:"submit",style:{height:"32px"},loading:H["newCourse/editCourse"]||H["newCourse/submitCourse"],onClick:function(){Te.submit()}},"\u63D0\u4EA4")))))};be.default=Object(a.a)(function(d){var S=d.shixunHomeworks,y=d.newCourse,b=d.loading,B=d.globalSetting;return{shixunHomeworks:S,newCourse:y,globalSetting:B,loading:b.effects}})(T)},"rAM+":function(rt,be,Z){"use strict";Z.d(be,"a",function(){return J});var ie=Z("Qw5x");function J(P,X){var j;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(j=Object(ie.a)(P))||X&&P&&typeof P.length=="number"){j&&(P=j);var U=0,K=function(){};return{s:K,n:function(){return U>=P.length?{done:!0}:{done:!1,value:P[U++]}},e:function(m){throw m},f:K}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G=!0,r=!1,L;return{s:function(){j=P[Symbol.iterator]()},n:function(){var m=j.next();return G=m.done,m},e:function(m){r=!0,L=m},f:function(){try{!G&&j.return!=null&&j.return()}finally{if(r)throw L}}}}},rUJ1:function(rt,be){const Z=/[&<>"']/,ie=/[&<>"']/g,J=/[<>"']|&(?!#?\w+;)/,P=/[<>"']|&(?!#?\w+;)/g,X={"&":"&","<":"<",">":">",'"':""","'":"'"},j=R=>X[R];function U(R,A){if(A){if(Z.test(R))return R.replace(ie,j)}else if(J.test(R))return R.replace(P,j);return R}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function G(R){return R.replace(K,(A,C)=>(C=C.toLowerCase(),C==="colon"?":":C.charAt(0)==="#"?C.charAt(1)==="x"?String.fromCharCode(parseInt(C.substring(2),16)):String.fromCharCode(+C.substring(1)):""))}const r=/(^|[^\[])\^/g;function L(R,A){R=R.source||R,A=A||"";const C={replace:(T,d)=>(d=d.source||d,d=d.replace(r,"$1"),R=R.replace(T,d),C),getRegex:()=>new RegExp(R,A)};return C}const v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(R,A,C){if(R){let T;try{T=decodeURIComponent(G(C)).replace(v,"").toLowerCase()}catch(d){return null}if(T.indexOf("javascript:")===0||T.indexOf("vbscript:")===0||T.indexOf("data:")===0)return null}A&&!m.test(C)&&(C=o(A,C));try{C=encodeURI(C).replace(/%25/g,"%")}catch(T){return null}return C}const h={},u=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(R,A){h[" "+R]||(u.test(R)?h[" "+R]=R+"/":h[" "+R]=E(R,"/",!0)),R=h[" "+R];const C=R.indexOf(":")===-1;return A.substring(0,2)==="//"?C?A:R.replace(f,"$1")+A:A.charAt(0)==="/"?C?A:R.replace(l,"$1")+A:R+A}const s={exec:function(){}};function a(R){let A=1,C,T;for(;A{let B=!1,F=y;for(;--F>=0&&b[F]==="\\";)B=!B;return B?"|":" |"}),T=C.split(/ \|/);let d=0;if(T.length>A)T.splice(A);else for(;T.length{const o=this.themingParticipants.indexOf(l);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let h=new p;j.a.add(m.ThemingContribution,h);function u(l){return h.onColorThemeChange(l)}class f extends P.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},ulZh:function(rt,be,Z){typeof window!="undefined"&&function(J,P){rt.exports=P()}(this,function(){return function(ie){var J={};function P(X){if(J[X])return J[X].exports;var j=J[X]={i:X,l:!1,exports:{}};return ie[X].call(j.exports,j,j.exports,P),j.l=!0,j.exports}return P.m=ie,P.c=J,P.d=function(X,j,U){P.o(X,j)||Object.defineProperty(X,j,{enumerable:!0,get:U})},P.r=function(X){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(X,"__esModule",{value:!0})},P.t=function(X,j){if(j&1&&(X=P(X)),j&8)return X;if(j&4&&typeof X=="object"&&X&&X.__esModule)return X;var U=Object.create(null);if(P.r(U),Object.defineProperty(U,"default",{enumerable:!0,value:X}),j&2&&typeof X!="string")for(var K in X)P.d(U,K,function(G){return X[G]}.bind(null,K));return U},P.n=function(X){var j=X&&X.__esModule?function(){return X.default}:function(){return X};return P.d(j,"a",j),j},P.o=function(X,j){return Object.prototype.hasOwnProperty.call(X,j)},P.p="/dist/",P(P.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ie,J,P){"use strict";var X=Object.prototype.hasOwnProperty,j="~";function U(){}Object.create&&(U.prototype=Object.create(null),new U().__proto__||(j=!1));function K(v,m,p){this.fn=v,this.context=m,this.once=p||!1}function G(v,m,p,h,u){if(typeof p!="function")throw new TypeError("The listener must be a function");var f=new K(p,h||v,u),l=j?j+m:m;return v._events[l]?v._events[l].fn?v._events[l]=[v._events[l],f]:v._events[l].push(f):(v._events[l]=f,v._eventsCount++),v}function r(v,m){--v._eventsCount===0?v._events=new U:delete v._events[m]}function L(){this._events=new U,this._eventsCount=0}L.prototype.eventNames=function(){var m=[],p,h;if(this._eventsCount===0)return m;for(h in p=this._events)X.call(p,h)&&m.push(j?h.slice(1):h);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(p)):m},L.prototype.listeners=function(m){var p=j?j+m:m,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,f=h.length,l=new Array(f);u0},!1)}function v(m,p){for(var h={main:[p]},u={main:[]},f={main:{}};L(h);)for(var l=Object.keys(h),o=0;o=2*D/A||b<=F)return;var _=Number.POSITIVE_INFINITY,M;for(M=l.level-1;M>T;M--){var I=C[M].maxBitrate;if(_=D*I/(8*.8*y),_=b)return;var g=this.bwEstimator.getEstimate();L.logger.warn("Fragment "+l.sn+(o?" part "+o.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+` Current BW estimate: `+(Object(X.isFiniteNumber)(g)?(g/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+b.toFixed(3)+` s Estimated load time for the next fragment: `+_.toFixed(3)+` s - Time to underbuffer: `+F.toFixed(3)+" s"),s.nextLoadLevel=M,this.bwEstimator.sample(R,w.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:o,stats:w})},u.onFragLoaded=function(l,o){var s=o.frag,a=o.part;if(s.type===r.PlaylistLevelType.MAIN&&Object(X.isFiniteNumber)(s.sn)){var O=a?a.stats:s.stats,E=a?a.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var w=this.hls.levels[s.level],D=(w.loaded?w.loaded.bytes:0)+O.loaded,R=(w.loaded?w.loaded.duration:0)+E;w.loaded={bytes:D,duration:R},w.realBitrate=Math.round(8*D/R)}if(s.bitrateTest){var A={stats:O,frag:s,part:a,id:s.type};this.onFragBuffered(U.Events.FRAG_BUFFERED,A),s.bitrateTest=!1}}},u.onFragBuffered=function(l,o){var s=o.frag,a=o.part,O=a?a.stats:s.stats;if(O.aborted)return;if(s.type!==r.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var E=O.parsing.end-O.loading.start;this.bwEstimator.sample(E,O.loaded),O.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},u.onError=function(l,o){switch(o.details){case G.ErrorDetails.FRAG_LOAD_ERROR:case G.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},u.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},u.getNextABRAutoLevel=function(){var l=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.maxAutoLevel,O=s.config,E=s.minAutoLevel,w=s.media,D=o?o.duration:l?l.duration:0,R=w?w.currentTime:0,A=w&&w.playbackRate!==0?Math.abs(w.playbackRate):1,C=this.bwEstimator?this.bwEstimator.getEstimate():O.abrEwmaDefaultEstimate,T=(K.BufferHelper.bufferInfo(w,R,O.maxBufferHole).end-R)/A,c=this.findBestLevel(C,E,a,T,O.abrBandWidthFactor,O.abrBandWidthUpFactor);if(c>=0)return c;L.logger.trace((T?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var S=D?Math.min(D,O.maxStarvationDelay):O.maxStarvationDelay,y=O.abrBandWidthFactor,b=O.abrBandWidthUpFactor;if(!T){var B=this.bitrateTestDelay;if(B){var F=D?Math.min(D,O.maxLoadingDelay):O.maxLoadingDelay;S=F-B,L.logger.trace("bitrate test took "+Math.round(1e3*B)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*S)+" ms"),y=b=1}}return c=this.findBestLevel(C,E,a,T+S,y,b),Math.max(c,0)},u.findBestLevel=function(l,o,s,a,O,E){for(var w,D=this.fragCurrent,R=this.partCurrent,A=this.lastLoadedFragLevel,C=this.hls.levels,T=C[A],c=!!(T!=null&&(w=T.details)!==null&&w!==void 0&&w.live),S=T==null?void 0:T.codecSet,y=R?R.duration:D?D.duration:0,b=s;b>=o;b--){var B=C[b];if(!B||S&&B.codecSet!==S)continue;var F=B.details,_=(R?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||y,M=void 0;b<=A?M=O*l:M=E*l;var I=C[b].maxBitrate,g=I*_/M;if(L.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+b+"/"+Math.round(M)+"/"+I+"/"+_+"/"+a+"/"+g),M>I&&(!g||c&&!this.bitrateTestDelay||g0&&T===-1?(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=j.State.IDLE):(this.loadedmetadata=!1,this.state=j.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=T,this.tick()},A.doTick=function(){switch(this.state){case j.State.IDLE:this.doTickIdle();break;case j.State.WAITING_TRACK:{var T,c=this.levels,S=this.trackId,y=c==null||((T=c[S])===null||T===void 0)?void 0:T.details;if(y){if(this.waitForCdnTuneIn(y))break;this.state=j.State.WAITING_INIT_PTS}break}case j.State.FRAG_LOADING_WAITING_RETRY:{var b,B=performance.now(),F=this.retryDate;(!F||B>=F||(b=this.media)!==null&&b!==void 0&&b.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=j.State.IDLE);break}case j.State.WAITING_INIT_PTS:{var _=this.waitingData;if(_){var M=_.frag,I=_.part,g=_.cache,H=_.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=j.State.FRAG_LOADING;var $=g.flush(),ne={frag:M,part:I,payload:$,networkDetails:null};this._handleFragmentLoadProgress(ne),H&&D.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)o.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),Oe=K.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),ge=Object(u.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,M);ge<0&&(o.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=j.State.IDLE}}this.onTickEnd()},A.clearWaitingFragment=function(){var T=this.waitingData;T&&(this.fragmentTracker.removeFragment(T.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=j.State.IDLE)},A.onTickEnd=function(){var T=this.media;if(!T||!T.readyState)return;var c=this.mediaBuffer?this.mediaBuffer:T,S=c.buffered;!this.loadedmetadata&&S.length&&(this.loadedmetadata=!0),this.lastCurrentTime=T.currentTime},A.doTickIdle=function(){var T,c,S=this.hls,y=this.levels,b=this.media,B=this.trackId,F=S.config;if(!y||!y[B])return;if(!b&&(this.startFragRequested||!F.startFragPrefetch))return;var _=y[B],M=_.details;if(!M||M.live&&this.levelLastLoaded!==B||this.waitForCdnTuneIn(M)){this.state=j.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,L.PlaylistLevelType.AUDIO));var I=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,L.PlaylistLevelType.AUDIO);if(I===null)return;var g=I.len,H=this.getMaxBufferLength(),$=this.audioSwitch;if(g>=H&&!$)return;if(!$&&this._streamEnded(I,M)){S.trigger(U.Events.BUFFER_EOS,{type:"audio"}),this.state=j.State.ENDED;return}var ne=M.fragments,se=ne[0].start,Oe=I.end;if($){var ge=this.getLoadPosition();Oe=ge,M.PTSKnown&&gese||I.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),b.currentTime=se+.05))}var Te=this.getNextFragment(Oe,M);if(!Te){this.bufferFlushed=!0;return}((T=Te.decryptdata)===null||T===void 0?void 0:T.keyFormat)==="identity"&&!((c=Te.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(Te,M):this.loadFragment(Te,M,Oe)},A.getMaxBufferLength=function(){var T=D.prototype.getMaxBufferLength.call(this),c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,L.PlaylistLevelType.MAIN);return c===null?T:Math.max(T,c.len)},A.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},A.onAudioTracksUpdated=function(T,c){var S=c.audioTracks;this.resetTransmuxer(),this.levels=S.map(function(y){return new r.Level(y)})},A.onAudioTrackSwitching=function(T,c){var S=!!c.url;this.trackId=c.id;var y=this.fragCurrent;y!=null&&y.loader&&y.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),S?this.setInterval(E):this.resetTransmuxer(),S?(this.audioSwitch=!0,this.state=j.State.IDLE):this.state=j.State.STOPPED,this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},A.onLevelLoaded=function(T,c){this.mainDetails=c.details},A.onAudioTrackLoaded=function(T,c){var S,y=this.levels,b=c.details,B=c.id;if(!y){this.warn("Audio tracks were reset while loading level "+B);return}this.log("Track "+B+" loaded ["+b.startSN+","+b.endSN+"],duration:"+b.totalduration);var F=y[B],_=0;if(b.live||(S=F.details)!==null&&S!==void 0&&S.live){var M=this.mainDetails;if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed||!M)return;!F.details&&b.hasProgramDateTime&&M.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(b,M),_=b.fragments[0].start):_=this.alignPlaylists(b,F.details)}F.details=b,this.levelLastLoaded=B,!this.startFragRequested&&(this.mainDetails||!b.live)&&this.setStartPosition(F.details,_),this.state===j.State.WAITING_TRACK&&!this.waitForCdnTuneIn(b)&&(this.state=j.State.IDLE),this.tick()},A._handleFragmentLoadProgress=function(T){var c,S=T.frag,y=T.part,b=T.payload,B=this.config,F=this.trackId,_=this.levels;if(!_){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+S.sn+" of level "+S.level+" will not be buffered");return}var M=_[F];console.assert(M,"Audio track is defined on fragment load progress");var I=M.details;console.assert(I,"Audio track details are defined on fragment load progress");var g=B.defaultAudioCodec||M.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new p.default(this.hls,L.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[S.cc],ne=(c=S.initSegment)===null||c===void 0?void 0:c.data;if($!==void 0){var se=!1,Oe=y?y.index:-1,ge=Oe!==-1,Te=new h.ChunkMetadata(S.level,S.sn,S.stats.chunkCount,b.byteLength,Oe,ge);H.push(b,ne,g,"",S,y,I.totalduration,se,Te,$)}else{o.logger.log("Unknown video PTS for cc "+S.cc+", waiting for video PTS before demuxing audio frag "+S.sn+" of ["+I.startSN+" ,"+I.endSN+"],track "+F);var Re=this.waitingData=this.waitingData||{frag:S,part:y,cache:new m.default,complete:!1},Le=Re.cache;Le.push(new Uint8Array(b)),this.waitingVideoCC=this.videoTrackCC,this.state=j.State.WAITING_INIT_PTS}},A._handleFragmentLoadComplete=function(T){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,T)},A.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},A.onBufferCreated=function(T,c){var S=c.tracks.audio;S&&(this.mediaBuffer=S.buffer),c.tracks.video&&(this.videoBuffer=c.tracks.video.buffer)},A.onFragBuffered=function(T,c){var S=c.frag,y=c.part;if(S.type!==L.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(S)){this.warn("Fragment "+S.sn+(y?" p: "+y.index:"")+" of level "+S.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}S.sn!=="initSegment"&&(this.fragPrevious=S,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(S,y)},A.onError=function(T,c){switch(c.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(L.PlaylistLevelType.AUDIO,c);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==j.State.ERROR&&this.state!==j.State.STOPPED&&(this.state=c.fatal?j.State.ERROR:j.State.IDLE,this.warn(c.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="audio"&&(this.state===j.State.PARSING||this.state===j.State.PARSED)){var S=!0,y=this.getFwdBufferInfo(this.mediaBuffer,L.PlaylistLevelType.AUDIO);y&&y.len>.5&&(S=!this.reduceMaxBufferLength(y.len)),S&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},A.onBufferFlushed=function(T,c){var S=c.type;S===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},A._handleTransmuxComplete=function(T){var c,S="audio",y=this.hls,b=T.remuxResult,B=T.chunkMeta,F=this.getCurrentContext(B);if(!F){this.warn("The loading context changed while buffering fragment "+B.sn+" of level "+B.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(B.level);return}var _=F.frag,M=F.part,I=b.audio,g=b.text,H=b.id3,$=b.initSegment;if(this.fragContextChanged(_))return;if(this.state=j.State.PARSING,this.audioSwitch&&I&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,_,B),y.trigger(U.Events.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:S,tracks:$.tracks})),I){var ne=I.startPTS,se=I.endPTS,Oe=I.startDTS,ge=I.endDTS;M&&(M.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:ne,endPTS:se,startDTS:Oe,endDTS:ge}),_.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,ne,se,Oe,ge),this.bufferFragmentData(I,_,M,B)}if(H!=null&&(c=H.samples)!==null&&c!==void 0&&c.length){var Te=s({frag:_,id:S},H);y.trigger(U.Events.FRAG_PARSING_METADATA,Te)}if(g){var Re=s({frag:_,id:S},g);y.trigger(U.Events.FRAG_PARSING_USERDATA,Re)}},A._bufferInitSegment=function(T,c,S){if(this.state!==j.State.PARSING)return;T.video&&delete T.video;var y=T.audio;if(!y)return;y.levelCodec=y.codec,y.id="audio",this.log("Init audio buffer, container:"+y.container+", codecs[parsed]=["+y.codec+"]"),this.hls.trigger(U.Events.BUFFER_CODECS,T);var b=y.initSegment;if(b!=null&&b.byteLength){var B={type:"audio",frag:c,part:null,chunkMeta:S,parent:c.type,data:b};this.hls.trigger(U.Events.BUFFER_APPENDING,B)}this.tick()},A.loadFragment=function(T,c,S){var y=this.fragmentTracker.getState(T);this.fragCurrent=T,(this.audioSwitch||y===G.FragmentState.NOT_LOADED||y===G.FragmentState.PARTIAL)&&(T.sn==="initSegment"?this._loadInitSegment(T):c.live&&!Object(X.isFiniteNumber)(this.initPTS[T.cc])?(this.log("Waiting for video PTS in continuity counter "+T.cc+" of live stream before loading audio fragment "+T.sn+" of level "+this.trackId),this.state=j.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,T,c,S)))},A.completeAudioSwitch=function(){var T=this.hls,c=this.media,S=this.trackId;c&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,T.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:S})},R}(j.default);J.default=w},"./src/controller/audio-track-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/controller/base-playlist-controller.ts"),K=P("./src/types/loader.ts");function G(p,h){for(var u=0;u=o.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=o[this.trackId];this.log("Now switching to audio-track index "+l);var a=o[l],O=a.id,E=a.groupId,w=E===void 0?"":E,D=a.name,R=a.type,A=a.url;if(this.trackId=l,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(X.Events.AUDIO_TRACK_SWITCHING,{id:O,groupId:w,name:D,type:R,url:A}),a.details&&!a.details.live)return;var C=this.switchParams(a.url,s==null?void 0:s.details);this.loadPlaylist(C)},u.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var o=this.trackName,s=this.findTrackId(o)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},u.findTrackId=function(l){for(var o=this.tracksInGroup,s=0;sh.partTarget&&(a+=1)}if(Object(X.isFiniteNumber)(s))return new j.HlsUrlParameters(s,Object(X.isFiniteNumber)(a)?a:void 0,j.HlsSkip.No)}}},v.loadPlaylist=function(p){},v.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},v.playlistLoaded=function(p,h,u){var f=this,l=h.details,o=h.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||u!=null&&u.live){if(l.reloaded(u),u&&this.log("live playlist "+p+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),u&&l.fragments.length>0&&Object(U.mergeDetails)(u,l),!this.canLoad||!l.live)return;var a,O=void 0,E=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var w=this.hls.config.lowLatencyMode,D=l.lastPartSn,R=l.endSN,A=l.lastPartIndex,C=A!==-1,T=D===R,c=w?0:A;C?(O=T?R+1:D,E=T?c:A+1):O=R+1;var S=l.age,y=S+l.ageHeader,b=Math.min(y-l.partTarget,l.targetduration*1.5);if(b>0){if(u&&b>u.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+u.tuneInGoal+" to: "+b+" with playlist age: "+l.age),b=0;else{var B=Math.floor(b/l.targetduration);if(O+=B,E!==void 0){var F=Math.round(b%l.targetduration/l.partTarget);E+=F}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+S.toFixed(2)+"s goal: "+b+" skip sn "+B+" to part "+E)}l.tuneInGoal=b}if(a=this.getDeliveryDirectives(l,h.deliveryDirectives,O,E),w||!T){this.loadPlaylist(a);return}}else a=this.getDeliveryDirectives(l,h.deliveryDirectives,O,E);var _=Object(U.computeReloadInterval)(l,o);O!==void 0&&l.canBlockReload&&(_-=l.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(_)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(a)},_)}else this.clearTimer()},v.getDeliveryDirectives=function(p,h,u,f){var l=Object(j.getSkipValue)(p,u);return h!=null&&h.skip&&p.deltaUpdateFailed&&(u=h.msn,f=h.part,l=j.HlsSkip.No),new j.HlsUrlParameters(u,f,l)},v.retryLoadingOrFail=function(p){var h=this,u=this.hls.config,f=this.retryCount-1&&(l=p.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return h.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return f},L}()},"./src/controller/base-stream-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"State",function(){return R}),P.d(J,"default",function(){return A});var X=P("./src/polyfills/number.ts"),j=P("./src/task-loop.ts"),U=P("./src/controller/fragment-tracker.ts"),K=P("./src/utils/buffer-helper.ts"),G=P("./src/utils/logger.ts"),r=P("./src/events.ts"),L=P("./src/errors.ts"),v=P("./src/types/transmuxer.ts"),m=P("./src/utils/mp4-tools.ts"),p=P("./src/utils/discontinuities.ts"),h=P("./src/controller/fragment-finders.ts"),u=P("./src/controller/level-helper.ts"),f=P("./src/loader/fragment-loader.ts"),l=P("./src/crypt/decrypter.ts"),o=P("./src/utils/time-ranges.ts"),s=P("./src/types/loader.ts");function a(C,T){for(var c=0;c$;(M0&&M&&M.key&&M.iv&&M.method==="AES-128"){var I=self.performance.now();return b.decrypter.webCryptoDecrypt(new Uint8Array(_),M.key.buffer,M.iv.buffer).then(function(g){var H=self.performance.now();return F.trigger(r.Events.FRAG_DECRYPTED,{frag:y,payload:g,stats:{tstart:I,tdecrypt:H}}),B.payload=g,B})}return B}).then(function(B){var F=b.fragCurrent,_=b.hls,M=b.levels;if(!M)throw new Error("init load aborted, missing levels");var I=M[y.level].details;console.assert(I,"Level details are defined when init segment is loaded");var g=y.stats;b.state=R.IDLE,b.fragLoadError=0,y.data=new Uint8Array(B.payload),g.parsing.start=g.buffering.start=self.performance.now(),g.parsing.end=g.buffering.end=self.performance.now(),B.frag===F&&_.trigger(r.Events.FRAG_BUFFERED,{stats:g,frag:F,part:null,id:y.type}),b.tick()}).catch(function(B){b.warn(B),b.resetFragmentLoading(y)})},c.fragContextChanged=function(y){var b=this.fragCurrent;return!y||!b||y.level!==b.level||y.sn!==b.sn||y.urlId!==b.urlId},c.fragBufferedComplete=function(y,b){var B=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(b?" part: "+b.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" "+o.default.toString(K.BufferHelper.getBuffered(B))),this.state=R.IDLE,this.tick()},c._handleFragmentLoadComplete=function(y){var b=this.transmuxer;if(!b)return;var B=y.frag,F=y.part,_=y.partsLoaded,M=!_||_.length===0||_.some(function(g){return!g}),I=new v.ChunkMetadata(B.level,B.sn,B.stats.chunkCount+1,0,F?F.index:-1,!M);b.flush(I)},c._handleFragmentLoadProgress=function(y){},c._doFragLoad=function(y,b,B,F){var _=this;if(B===void 0&&(B=null),!this.levels)throw new Error("frag load aborted, missing levels");if(B=Math.max(y.start,B||0),this.config.lowLatencyMode&&b){var M=b.partList;if(M&&F){B>y.end&&b.fragmentHint&&(y=b.fragmentHint);var I=this.getNextPart(M,y,B);if(I>-1){var g=M[I];return this.log("Loading part sn: "+y.sn+" p: "+g.index+" cc: "+y.cc+" of playlist ["+b.startSN+"-"+b.endSN+"] parts [0-"+I+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(B.toFixed(3))),this.nextLoadPosition=g.start+g.duration,this.state=R.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:y,part:M[I],targetBufferTime:B}),this.doFragPartsLoad(y,M,I,F).catch(function(H){return _.handleFragLoadError(H)})}else if(!y.url||this.loadedEndOfParts(M,B))return Promise.resolve(null)}}return this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(b?"of ["+b.startSN+"-"+b.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(B.toFixed(3))),Object(X.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=R.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:y,targetBufferTime:B}),this.fragmentLoader.load(y,F).catch(function(H){return _.handleFragLoadError(H)})},c.doFragPartsLoad=function(y,b,B,F){var _=this;return new Promise(function(M,I){var g=[],H=function $(ne){var se=b[ne];_.fragmentLoader.loadPart(y,se,F).then(function(Oe){g[se.index]=Oe;var ge=Oe.part;_.hls.trigger(r.Events.FRAG_LOADED,Oe);var Te=b[ne+1];if(Te&&Te.fragment===y)$(ne+1);else return M({frag:y,part:ge,partsLoaded:g})}).catch(I)};H(B)})},c.handleFragLoadError=function(y){var b=y.data;return b&&b.details===L.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(b.frag,b.part):this.hls.trigger(r.Events.ERROR,b),null},c._handleTransmuxerFlush=function(y){var b=this.getCurrentContext(y);if(!b||this.state!==R.PARSING){this.fragCurrent||(this.state=R.IDLE);return}var B=b.frag,F=b.part,_=b.level,M=self.performance.now();B.stats.parsing.end=M,F&&(F.stats.parsing.end=M),this.updateLevelTiming(B,F,_,y.partial)},c.getCurrentContext=function(y){var b=this.levels,B=y.level,F=y.sn,_=y.part;if(!b||!b[B])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+B+". The current chunk will not be buffered."),null;var M=b[B],I=_>-1?Object(u.getPartWith)(M,F,_):null,g=I?I.fragment:Object(u.getFragmentWithSN)(M,F,this.fragCurrent);return g?{frag:g,part:I,level:M}:null},c.bufferFragmentData=function(y,b,B,F){if(!y||this.state!==R.PARSING)return;var _=y.data1,M=y.data2,I=_;if(_&&M&&(I=Object(m.appendUint8Array)(_,M)),!I||!I.length)return;var g={type:y.type,frag:b,part:B,chunkMeta:F,parent:b.type,data:I};this.hls.trigger(r.Events.BUFFER_APPENDING,g),y.dropped&&y.independent&&!B&&this.flushBufferGap(b)},c.flushBufferGap=function(y){var b=this.media;if(!b)return;if(!K.BufferHelper.isBuffered(b,b.currentTime)){this.flushMainBuffer(0,y.start);return}var B=b.currentTime,F=K.BufferHelper.bufferInfo(b,B,0),_=y.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,_*.25),I=Math.max(Math.min(y.start-M,F.end-M),B+M);y.start-I>M&&this.flushMainBuffer(I,y.start)},c.getFwdBufferInfo=function(y,b){var B=this.config,F=this.getLoadPosition();if(!Object(X.isFiniteNumber)(F))return null;var _=K.BufferHelper.bufferInfo(y,F,B.maxBufferHole);if(_.len===0&&_.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(F,b);if(M&&_.nextStart=B?(b.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+b.maxMaxBufferLength+"s"),!0):!1},c.getNextFragment=function(y,b){var B,F,_=b.fragments,M=_.length;if(!M)return null;var I=this.config,g=_[0].start,H;if(b.live){var $=I.initialLiveManifestSize;if(M<$)return this.warn("Not enough fragments to start playback (have: "+M+", need: "+$+")"),null;!b.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(H=this.getInitialLiveFragment(b,_),this.startPosition=H?this.hls.liveSyncPosition||H.start:y)}else y<=g&&(H=_[0]);if(!H){var ne=I.lowLatencyMode?b.partEnd:b.fragmentEnd;H=this.getFragmentAtPosition(y,ne,b)}return(B=H)!==null&&B!==void 0&&B.initSegment&&!((F=H)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(H=H.initSegment),H},c.getNextPart=function(y,b,B){for(var F=-1,_=!1,M=!0,I=0,g=y.length;I-1&&BB.start&&B.loaded},c.getInitialLiveFragment=function(y,b){var B=this.fragPrevious,F=null;if(B){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+B.programDateTime),F=Object(h.findFragmentByPDT)(b,B.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var _=B.sn+1;if(_>=y.startSN&&_<=y.endSN){var M=b[_-y.startSN];B.cc===M.cc&&(F=M,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(h.findFragWithCC)(b,B.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var I=this.hls.liveSyncPosition;I!==null&&(F=this.getFragmentAtPosition(I,this.bitrateTest?y.fragmentEnd:y.edge,y))}return F},c.getFragmentAtPosition=function(y,b,B){var F=this.config,_=this.fragPrevious,M=B.fragments,I=B.endSN,g=B.fragmentHint,H=F.maxFragLookUpTolerance,$=!!(F.lowLatencyMode&&B.partList&&g);$&&g&&!this.bitrateTest&&(M=M.concat(g),I=g.sn);var ne;if(yb-H?0:H;ne=Object(h.findFragmentByPTS)(_,M,y,se)}else ne=M[M.length-1];if(ne){var Oe=ne.sn-B.startSN,ge=_&&ne.level===_.level,Te=M[Oe+1],Re=this.fragmentTracker.getState(ne);if(Re===U.FragmentState.BACKTRACKED){ne=null;for(var Le=Oe;M[Le]&&this.fragmentTracker.getState(M[Le])===U.FragmentState.BACKTRACKED;)_?ne=M[Le--]:ne=M[--Le];ne||(ne=Te)}else _&&ne.sn===_.sn&&!$&&(ge&&(ne.sn=M-b.maxFragLookUpTolerance&&_<=I;if(F!==null&&B.duration>F&&(_"+y.startSN+" prev-sn: "+(_?_.sn:"na")+" fragments: "+I),ne}return g},c.waitForCdnTuneIn=function(y){var b=3;return y.live&&y.canBlockReload&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*b)},c.setStartPosition=function(y,b){var B=this.startPosition;if(B"+y))}}]),T}(j.default)},"./src/controller/buffer-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./src/polyfills/number.ts"),j=P("./src/events.ts"),U=P("./src/utils/logger.ts"),K=P("./src/errors.ts"),G=P("./src/utils/buffer-helper.ts"),r=P("./src/utils/mediasource-helper.ts"),L=P("./src/loader/fragment.ts"),v=P("./src/controller/buffer-operation-queue.ts"),m=Object(r.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function u(l){var o=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=o.hls,a=o.media,O=o.mediaSource;U.logger.log("[buffer-controller]: Media source opened"),a&&(o.updateMediaElementDuration(),s.trigger(j.Events.MEDIA_ATTACHED,{media:a})),O&&O.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},this._onMediaSourceClose=function(){U.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){U.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var f=u.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var o=this.hls;o.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(j.Events.BUFFER_RESET,this.onBufferReset,this),o.on(j.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.on(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(j.Events.BUFFER_EOS,this.onBufferEos,this),o.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.on(j.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.on(j.Events.FRAG_PARSED,this.onFragParsed,this),o.on(j.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var o=this.hls;o.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(j.Events.BUFFER_RESET,this.onBufferReset,this),o.off(j.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.off(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(j.Events.BUFFER_EOS,this.onBufferEos,this),o.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.off(j.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.off(j.Events.FRAG_PARSED,this.onFragParsed,this),o.off(j.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(o,s){var a=2;(s.audio&&!s.video||!s.altAudio)&&(a=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=a,this.details=null,U.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o,s){var a=this.media=s.media;if(a&&m){var O=this.mediaSource=new m;O.addEventListener("sourceopen",this._onMediaSourceOpen),O.addEventListener("sourceended",this._onMediaSourceEnded),O.addEventListener("sourceclose",this._onMediaSourceClose),a.src=self.URL.createObjectURL(O),this._objectUrl=a.src}},f.onMediaDetaching=function(){var o=this.media,s=this.mediaSource,a=this._objectUrl;if(s){if(U.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(O){U.logger.warn("[buffer-controller]: onMediaDetaching: "+O.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),o&&(a&&self.URL.revokeObjectURL(a),o.src===a?(o.removeAttribute("src"),o.load()):U.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(j.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var o=this;this.getSourceBufferTypes().forEach(function(s){var a=o.sourceBuffer[s];try{a&&(o.removeBufferListeners(s),o.mediaSource&&o.mediaSource.removeSourceBuffer(a),o.sourceBuffer[s]=void 0)}catch(O){U.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",O)}}),this._initSourceBuffer()},f.onBufferCodecs=function(o,s){var a=this,O=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(E){if(O){var w=a.tracks[E];if(w&&typeof w.buffer.changeType=="function"){var D=s[E],R=D.codec,A=D.levelCodec,C=D.container,T=(w.levelCodec||w.codec).replace(p,"$1"),c=(A||R).replace(p,"$1");if(T!==c){var S=C+";codecs="+(A||R);a.appendChangeType(E,S)}}}else a.pendingTracks[E]=s[E]}),O)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(o,s){var a=this,O=this.operationQueue,E={execute:function(){var D=a.sourceBuffer[o];D&&(U.logger.log("[buffer-controller]: changing "+o+" sourceBuffer type to "+s),D.changeType(s)),O.shiftAndExecuteNext(o)},onStart:function(){},onComplete:function(){},onError:function(D){U.logger.warn("[buffer-controller]: Failed to change "+o+" SourceBuffer type",D)}};O.append(E,o)},f.onBufferAppending=function(o,s){var a=this,O=this.hls,E=this.operationQueue,w=this.tracks,D=s.data,R=s.type,A=s.frag,C=s.part,T=s.chunkMeta,c=T.buffering[R],S=self.performance.now();c.start=S;var y=A.stats.buffering,b=C?C.stats.buffering:null;y.start===0&&(y.start=S),b&&b.start===0&&(b.start=S);var B=w.audio,F=R==="audio"&&T.id===1&&(B==null?void 0:B.container)==="audio/mpeg",_={execute:function(){if(c.executeStart=self.performance.now(),F){var I=a.sourceBuffer[R];if(I){var g=A.start-I.timestampOffset;Math.abs(g)>=.1&&(U.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+A.start+" (delta: "+g+") sn: "+A.sn+")"),I.timestampOffset=A.start)}}a.appendExecutor(D,R)},onStart:function(){},onComplete:function(){var I=self.performance.now();c.executeEnd=c.end=I,y.first===0&&(y.first=I),b&&b.first===0&&(b.first=I);var g=a.sourceBuffer,H={};for(var $ in g)H[$]=G.BufferHelper.getBuffered(g[$]);a.appendError=0,a.hls.trigger(j.Events.BUFFER_APPENDED,{type:R,frag:A,part:C,chunkMeta:T,parent:A.type,timeRanges:H})},onError:function(I){U.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",I);var g={type:K.ErrorTypes.MEDIA_ERROR,parent:A.type,details:K.ErrorDetails.BUFFER_APPEND_ERROR,err:I,fatal:!1};I.code===DOMException.QUOTA_EXCEEDED_ERR?g.details=K.ErrorDetails.BUFFER_FULL_ERROR:(a.appendError++,g.details=K.ErrorDetails.BUFFER_APPEND_ERROR,a.appendError>O.config.appendErrorMaxRetry&&(U.logger.error("[buffer-controller]: Failed "+O.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),g.fatal=!0)),O.trigger(j.Events.ERROR,g)}};E.append(_,R)},f.onBufferFlushing=function(o,s){var a=this,O=this.operationQueue,E=function(D){return{execute:a.removeExecutor.bind(a,D,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){a.hls.trigger(j.Events.BUFFER_FLUSHED,{type:D})},onError:function(A){U.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",A)}}};s.type?O.append(E(s.type),s.type):this.getSourceBufferTypes().forEach(function(w){O.append(E(w),w)})},f.onFragParsed=function(o,s){var a=this,O=s.frag,E=s.part,w=[],D=E?E.elementaryStreams:O.elementaryStreams;D[L.ElementaryStreamTypes.AUDIOVIDEO]?w.push("audiovideo"):(D[L.ElementaryStreamTypes.AUDIO]&&w.push("audio"),D[L.ElementaryStreamTypes.VIDEO]&&w.push("video"));var R=function(){var C=self.performance.now();O.stats.buffering.end=C,E&&(E.stats.buffering.end=C);var T=E?E.stats:O.stats;a.hls.trigger(j.Events.FRAG_BUFFERED,{frag:O,part:E,stats:T,id:O.type})};w.length===0&&U.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+O.type+" level: "+O.level+" sn: "+O.sn),this.blockBuffers(R,w)},f.onFragChanged=function(o,s){this.flushBackBuffer()},f.onBufferEos=function(o,s){var a=this,O=this.getSourceBufferTypes().reduce(function(E,w){var D=a.sourceBuffer[w];return(!s.type||s.type===w)&&(D&&!D.ended&&(D.ended=!0,U.logger.log("[buffer-controller]: "+w+" sourceBuffer now EOS"))),E&&!!(!D||D.ended)},!0);O&&this.blockBuffers(function(){var E=a.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},f.onLevelUpdated=function(o,s){var a=s.details;if(!a.fragments.length)return;this.details=a,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var o=this.hls,s=this.details,a=this.media,O=this.sourceBuffer;if(!a||s===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var w=s.live&&o.config.liveBackBufferLength!==null?o.config.liveBackBufferLength:o.config.backBufferLength;if(!Object(X.isFiniteNumber)(w)||w<0)return;var D=a.currentTime,R=s.levelTargetDuration,A=Math.max(w,R),C=Math.floor(D/R)*R-A;E.forEach(function(T){var c=O[T];if(c){var S=G.BufferHelper.getBuffered(c);S.length>0&&C>S.start(0)&&(o.trigger(j.Events.BACK_BUFFER_REACHED,{bufferEnd:C}),s.live&&o.trigger(j.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C}),o.trigger(j.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:C,type:T}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var o=this.details,s=this.hls,a=this.media,O=this.mediaSource,E=o.fragments[0].start+o.totalduration,w=a.duration,D=Object(X.isFiniteNumber)(O.duration)?O.duration:0;o.live&&s.config.liveDurationInfinity?(U.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),O.duration=Infinity,this.updateSeekableRange(o)):(E>D&&E>w||!Object(X.isFiniteNumber)(w))&&(U.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),O.duration=E)},f.updateSeekableRange=function(o){var s=this.mediaSource,a=o.fragments,O=a.length;if(O&&o.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var E=Math.max(0,a[0].start),w=Math.max(E,E+o.totalduration);s.setLiveSeekableRange(E,w)}},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,s=this.operationQueue,a=this.pendingTracks,O=Object.keys(a).length;if(O&&!o||O===2){this.createSourceBuffers(a),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(w){s.executeNext(w)})}},f.createSourceBuffers=function(o){var s=this.sourceBuffer,a=this.mediaSource;if(!a)throw Error("createSourceBuffers called when mediaSource was null");var O=0;for(var E in o)if(!s[E]){var w=o[E];if(!w)throw Error("source buffer exists for track "+E+", however track does not");var D=w.levelCodec||w.codec,R=w.container+";codecs="+D;U.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var A=s[E]=a.addSourceBuffer(R),C=E;this.addBufferListener(C,"updatestart",this._onSBUpdateStart),this.addBufferListener(C,"updateend",this._onSBUpdateEnd),this.addBufferListener(C,"error",this._onSBUpdateError),this.tracks[E]={buffer:A,codec:D,container:w.container,levelCodec:w.levelCodec,id:w.id},O++}catch(T){U.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+T.message),this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:T,mimeType:R})}}O&&this.hls.trigger(j.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(o){var s=this.operationQueue,a=s.current(o);a.onStart()},f._onSBUpdateEnd=function(o){var s=this.operationQueue,a=s.current(o);a.onComplete(),s.shiftAndExecuteNext(o)},f._onSBUpdateError=function(o,s){U.logger.error("[buffer-controller]: "+o+" SourceBuffer error",s),this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var a=this.operationQueue.current(o);a&&a.onError(s)},f.removeExecutor=function(o,s,a){var O=this.media,E=this.mediaSource,w=this.operationQueue,D=this.sourceBuffer,R=D[o];if(!O||!E||!R){U.logger.warn("[buffer-controller]: Attempting to remove from the "+o+" SourceBuffer, but it does not exist"),w.shiftAndExecuteNext(o);return}var A=Object(X.isFiniteNumber)(O.duration)?O.duration:Infinity,C=Object(X.isFiniteNumber)(E.duration)?E.duration:Infinity,T=Math.max(0,s),c=Math.min(a,A,C);c>T?(U.logger.log("[buffer-controller]: Removing ["+T+","+c+"] from the "+o+" SourceBuffer"),console.assert(!R.updating,o+" sourceBuffer must not be updating"),R.remove(T,c)):w.shiftAndExecuteNext(o)},f.appendExecutor=function(o,s){var a=this.operationQueue,O=this.sourceBuffer,E=O[s];if(!E){U.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(s);return}E.ended=!1,console.assert(!E.updating,s+" sourceBuffer must not be updating"),E.appendBuffer(o)},f.blockBuffers=function(o,s){var a=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){U.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(o);return}var O=this.operationQueue,E=s.map(function(w){return O.appendBlocker(w)});Promise.all(E).then(function(){o(),s.forEach(function(w){var D=a.sourceBuffer[w];(!D||!D.updating)&&O.shiftAndExecuteNext(w)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(o,s,a){var O=this.sourceBuffer[o];if(!O)return;var E=a.bind(this,o);this.listeners[o].push({event:s,listener:E}),O.addEventListener(s,E)},f.removeBufferListeners=function(o){var s=this.sourceBuffer[o];if(!s)return;this.listeners[o].forEach(function(a){s.removeEventListener(a.event,a.listener)})},u}()},"./src/controller/buffer-operation-queue.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return j});var X=P("./src/utils/logger.ts"),j=function(){function U(G){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=G}var K=U.prototype;return K.append=function(r,L){var v=this.queues[L];v.push(r),v.length===1&&this.buffers[L]&&this.executeNext(L)},K.insertAbort=function(r,L){var v=this.queues[L];v.unshift(r),this.executeNext(L)},K.appendBlocker=function(r){var L,v=new Promise(function(p){L=p}),m={execute:L,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,r),v},K.executeNext=function(r){var L=this.buffers,v=this.queues,m=L[r],p=v[r];if(p.length){var h=p[0];try{h.execute()}catch(u){X.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),h.onError(u),(!m||!m.updating)&&(p.shift(),this.executeNext(r))}}},K.shiftAndExecuteNext=function(r){this.queues[r].shift(),this.executeNext(r)},K.current=function(r){return this.queues[r][0]},U}()},"./src/controller/cap-level-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts");function j(G,r){for(var L=0;L0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(v.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},r.getMaxLevel=function(v){var m=this,p=this.hls.levels;if(!p.length)return-1;var h=p.filter(function(u,f){return G.isLevelAllowed(f,m.restrictedLevels)&&f<=v});return this.clientRect=null,G.getMaxLevelByMediaSize(h,this.mediaWidth,this.mediaHeight)},r.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},r.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},r.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,m={width:0,height:0};if(v){var p=v.getBoundingClientRect();m.width=p.width,m.height=p.height,!m.width&&!m.height&&(m.width=p.right-p.left||v.width||0,m.height=p.bottom-p.top||v.height||0)}return this.clientRect=m,m},G.isLevelAllowed=function(v,m){return m===void 0&&(m=[]),m.indexOf(v)===-1},G.getMaxLevelByMediaSize=function(v,m,p){if(!v||!v.length)return-1;for(var h=function(s,a){return a?s.width!==a.width||s.height!==a.height:!0},u=v.length-1,f=0;f=m||l.height>=p)&&h(l,v[f+1])){u=f;break}}return u},U(G,[{key:"mediaWidth",get:function(){return this.getDimensions().width*G.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*G.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(m){}return v}}]),G}();J.default=K},"./src/controller/cmcd-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./src/events.ts"),j=P("./src/types/cmcd.ts"),U=P("./src/utils/buffer-helper.ts"),K=P("./src/utils/logger.ts");function G(u,f){for(var l=0;l=u.length?{done:!0}:{done:!1,value:u[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(u,f){if(!u)return;if(typeof u=="string")return m(u,f);var l=Object.prototype.toString.call(u).slice(8,-1);if(l==="Object"&&u.constructor&&(l=u.constructor.name),l==="Map"||l==="Set")return Array.from(u);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return m(u,f)}function m(u,f){(f==null||f>u.length)&&(f=u.length);for(var l=0,o=new Array(f);ls&&(s=w.bitrate)}return s>0?s:NaN},f.getBufferLength=function(o){var s=this.hls.media,a=o===j.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!a||!s)return NaN;var O=U.BufferHelper.bufferInfo(a,s.currentTime,this.config.maxBufferHole);return O.len*1e3},f.createPlaylistLoader=function(){var o=this.config.pLoader,s=this.applyPlaylistData,a=o||this.config.loader;return function(){function O(w){this.loader=void 0,this.loader=new a(w)}var E=O.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,R,A){s(D),this.loader.load(D,R,A)},r(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},f.createFragmentLoader=function(){var o=this.config.fLoader,s=this.applyFragmentData,a=o||this.config.loader;return function(){function O(w){this.loader=void 0,this.loader=new a(w)}var E=O.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,R,A){s(D),this.loader.load(D,R,A)},r(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},u.uuid=function(){var o=URL.createObjectURL(new Blob),s=o.toString();return URL.revokeObjectURL(o),s.substr(s.lastIndexOf("/")+1)},u.serialize=function(o){for(var s=[],a=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},O=function(F){return Math.round(F)},E=function(F){return O(F/100)*100},w=function(F){return encodeURIComponent(F)},D={br:O,d:O,bl:E,dl:E,mtp:E,nor:w,rtp:E,tb:O},R=Object.keys(o||{}).sort(),A=L(R),C;!(C=A()).done;){var T=C.value,c=o[T];if(!a(c))continue;if(T==="v"&&c===1)continue;if(T=="pr"&&c===1)continue;var S=D[T];S&&(c=S(c));var y=typeof c,b=void 0;T==="ot"||T==="sf"||T==="st"?b=T+"="+c:y==="boolean"?b=T:y==="number"?b=T+"="+c:b=T+"="+JSON.stringify(c),s.push(b)}return s.join(",")},u.toHeaders=function(o){for(var s=Object.keys(o),a={},O=["Object","Request","Session","Status"],E=[{},{},{},{}],w={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},D=0,R=s;DL){this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var w=L-this._requestLicenseFailureCount+1;U.logger.warn("Retrying license request, "+w+" attempts left"),this._requestLicense(s,a)}break}},u._generateLicenseRequestChallenge=function(l,o){switch(l.mediaKeySystemDomain){case K.KeySystems.WIDEVINE:return o}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},u._requestLicense=function(l,o){U.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){U.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var a=this.getLicenseServerUrl(s.mediaKeySystemDomain),O=this._createLicenseXhr(a,l,o);U.logger.log("Sending license request to URL: "+a);var E=this._generateLicenseRequestChallenge(s,l);O.send(E)}catch(w){U.logger.error("Failure requesting DRM license: "+w),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},u.onMediaAttached=function(l,o){if(!this._emeEnabled)return;var s=o.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},u.onMediaDetached=function(){var l=this._media,o=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(o.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},u.onManifestParsed=function(l,o){if(!this._emeEnabled)return;var s=o.levels.map(function(O){return O.audioCodec}).filter(function(O){return!!O}),a=o.levels.map(function(O){return O.videoCodec}).filter(function(O){return!!O});this._attemptKeySystemAccess(K.KeySystems.WIDEVINE,s,a)},r(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}();J.default=p},"./src/controller/fps-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts"),j=P("./src/utils/logger.ts"),U=function(){function K(r){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=r,this.registerListeners()}var G=K.prototype;return G.setStreamController=function(L){this.streamController=L},G.registerListeners=function(){this.hls.on(X.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},G.unregisterListeners=function(){this.hls.off(X.Events.MEDIA_ATTACHING,this.onMediaAttaching)},G.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},G.onMediaAttaching=function(L,v){var m=this.hls.config;if(m.capLevelOnFPSDrop){var p=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},G.checkFPS=function(L,v,m){var p=performance.now();if(v){if(this.lastTime){var h=p-this.lastTime,u=m-this.lastDroppedFrames,f=v-this.lastDecodedFrames,l=1e3*u/h,o=this.hls;if(o.trigger(X.Events.FPS_DROP,{currentDropped:u,currentDecoded:f,totalDroppedFrames:m}),l>0&&u>o.config.fpsDroppedMonitoringThreshold*f){var s=o.currentLevel;j.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=s)&&(s=s-1,o.trigger(X.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:o.currentLevel}),o.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=m,this.lastDecodedFrames=v}},G.checkFPSInterval=function(){var L=this.media;if(L)if(this.isVideoPlaybackQualityAvailable){var v=L.getVideoPlaybackQuality();this.checkFPS(L,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(L,L.webkitDecodedFrameCount,L.webkitDroppedFrameCount)},K}();J.default=U},"./src/controller/fragment-finders.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"findFragmentByPDT",function(){return U}),P.d(J,"findFragmentByPTS",function(){return K}),P.d(J,"fragmentWithinToleranceTest",function(){return G}),P.d(J,"pdtWithinToleranceTest",function(){return r}),P.d(J,"findFragWithCC",function(){return L});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/binary-search.ts");function U(v,m,p){if(m===null||!Array.isArray(v)||!v.length||!Object(X.isFiniteNumber)(m))return null;var h=v[0].programDateTime;if(m<(h||0))return null;var u=v[v.length-1].endProgramDateTime;if(m>=(u||0))return null;p=p||0;for(var f=0;fv&&p.start?-1:0}function r(v,m,p){var h=Math.min(m,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,u=p.endProgramDateTime||0;return u-h>v}function L(v,m){return j.default.search(v,function(p){return p.ccm?-1:0})}},"./src/controller/fragment-tracker.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"FragmentState",function(){return U}),P.d(J,"FragmentTracker",function(){return K});var X=P("./src/events.ts"),j=P("./src/types/loader.ts"),U;(function(L){L.NOT_LOADED="NOT_LOADED",L.BACKTRACKED="BACKTRACKED",L.APPENDING="APPENDING",L.PARTIAL="PARTIAL",L.OK="OK"})(U||(U={}));var K=function(){function L(m){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=m,this._registerListeners()}var v=L.prototype;return v._registerListeners=function(){var p=this.hls;p.on(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(X.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var p=this.hls;p.off(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(X.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(p,h){if(h===j.PlaylistLevelType.MAIN){var u=this.activeFragment,f=this.activeParts;if(!u)return null;if(f)for(var l=f.length;l--;){var o=f[l],s=o?o.end:u.appendedPTS;if(o.start<=p&&s!==void 0&&p<=s)return l>9&&(this.activeParts=f.slice(l-9)),o}else if(u.start<=p&&u.appendedPTS!==void 0&&p<=u.appendedPTS)return u}return this.getBufferedFrag(p,h)},v.getBufferedFrag=function(p,h){for(var u=this.fragments,f=Object.keys(u),l=f.length;l--;){var o=u[f[l]];if((o==null?void 0:o.body.type)===h&&o.buffered){var s=o.body;if(s.start<=p&&p<=s.end)return s}}return null},v.detectEvictedFragments=function(p,h,u){var f=this;Object.keys(this.fragments).forEach(function(l){var o=f.fragments[l];if(!o)return;if(!o.buffered){o.body.type===u&&f.removeFragment(o.body);return}var s=o.range[p];if(!s)return;s.time.some(function(a){var O=!f.isTimeBuffered(a.startPTS,a.endPTS,h);return O&&f.removeFragment(o.body),O})})},v.detectPartialFragments=function(p){var h=this,u=this.timeRanges,f=p.frag,l=p.part;if(!u||f.sn==="initSegment")return;var o=r(f),s=this.fragments[o];if(!s)return;Object.keys(u).forEach(function(a){var O=f.elementaryStreams[a];if(!O)return;var E=u[a],w=l!==null||O.partial===!0;s.range[a]=h.getBufferedTimes(f,l,w,E)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},v.fragBuffered=function(p){var h=r(p),u=this.fragments[h];u&&(u.backtrack=u.loaded=null,u.buffered=!0)},v.getBufferedTimes=function(p,h,u,f){for(var l={time:[],partial:u},o=h?h.start:p.start,s=h?h.end:p.end,a=p.minEndPTS||s,O=p.maxStartPTS||o,E=0;E=w&&a<=D){l.time.push({startPTS:Math.max(o,f.start(E)),endPTS:Math.min(s,f.end(E))});break}else if(ow)l.partial=!0,l.time.push({startPTS:Math.max(o,f.start(E)),endPTS:Math.min(s,f.end(E))});else if(s<=w)break}return l},v.getPartialFragment=function(p){var h=null,u,f,l,o=0,s=this.bufferPadding,a=this.fragments;return Object.keys(a).forEach(function(O){var E=a[O];if(!E)return;G(E)&&(f=E.body.start-s,l=E.body.end+s,p>=f&&p<=l&&(u=Math.min(p-f,l-p),o<=u&&(h=E.body,o=u)))}),h},v.getState=function(p){var h=r(p),u=this.fragments[h];return u?u.buffered?G(u)?U.PARTIAL:U.OK:u.backtrack?U.BACKTRACKED:U.APPENDING:U.NOT_LOADED},v.backtrack=function(p,h){var u=r(p),f=this.fragments[u];if(!f||f.backtrack)return null;var l=f.backtrack=h||f.loaded;return f.loaded=null,l},v.getBacktrackData=function(p){var h=r(p),u=this.fragments[h];if(u){var f,l=u.backtrack;if(l!=null&&(f=l.payload)!==null&&f!==void 0&&f.byteLength)return l;this.removeFragment(p)}return null},v.isTimeBuffered=function(p,h,u){for(var f,l,o=0;o=f&&h<=l)return!0;if(h<=f)return!1}return!1},v.onFragLoaded=function(p,h){var u=h.frag,f=h.part;if(u.sn==="initSegment"||u.bitrateTest||f)return;var l=r(u);this.fragments[l]={body:u,loaded:h,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(p,h){var u=this,f=h.frag,l=h.part,o=h.timeRanges;if(f.type===j.PlaylistLevelType.MAIN)if(this.activeFragment=f,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach(function(a){var O=o[a];if(u.detectEvictedFragments(a,O),!l)for(var E=0;Ep&&f.removeFragment(s)}})},v.removeFragment=function(p){var h=r(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[h]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},L}();function G(L){var v,m;return L.buffered&&(((v=L.range.video)===null||v===void 0?void 0:v.partial)||((m=L.range.audio)===null||m===void 0?void 0:m.partial))}function r(L){return L.type+"_"+L.level+"_"+L.urlId+"_"+L.sn}},"./src/controller/gap-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"STALL_MINIMUM_DURATION_MS",function(){return G}),P.d(J,"MAX_START_GAP_JUMP",function(){return r}),P.d(J,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return L}),P.d(J,"SKIP_BUFFER_RANGE_START",function(){return v}),P.d(J,"default",function(){return m});var X=P("./src/utils/buffer-helper.ts"),j=P("./src/errors.ts"),U=P("./src/events.ts"),K=P("./src/utils/logger.ts"),G=250,r=2,L=.1,v=.05,m=function(){function p(u,f,l,o){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=u,this.media=f,this.fragmentTracker=l,this.hls=o}var h=p.prototype;return h.destroy=function(){this.hls=this.fragmentTracker=this.media=null},h.poll=function(f){var l=this.config,o=this.media,s=this.stalled,a=o.currentTime,O=o.seeking,E=this.seeking&&!O,w=!this.seeking&&O;if(this.seeking=O,a!==f){if(this.moved=!0,s!==null){if(this.stallReported){var D=self.performance.now()-s;K.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((w||E)&&(this.stalled=null),o.paused||o.ended||o.playbackRate===0||!X.BufferHelper.getBuffered(o).length)return;var R=X.BufferHelper.bufferInfo(o,a,0),A=R.len>0,C=R.nextStart||0;if(!A&&!C)return;if(O){var T=R.len>r,c=!C||C-a>r&&!this.fragmentTracker.getPartialFragment(a);if(T||c)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var S,y=Math.max(C,R.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,B=b==null||((S=b.details)===null||S===void 0)?void 0:S.live,F=B?b.details.targetduration*2:r;if(y>0&&y<=F){this._trySkipBufferHole(null);return}}var _=self.performance.now();if(s===null){this.stalled=_;return}var M=_-s;!O&&M>=G&&this._reportStall(R.len);var I=X.BufferHelper.bufferInfo(o,a,l.maxBufferHole);this._tryFixBufferStall(I,M)},h._tryFixBufferStall=function(f,l){var o=this.config,s=this.fragmentTracker,a=this.media,O=a.currentTime,E=s.getPartialFragment(O);if(E){var w=this._trySkipBufferHole(E);if(w)return}f.len>o.maxBufferHole&&l>o.highBufferWatchdogPeriod*1e3&&(K.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(f){var l=this.hls,o=this.media,s=this.stallReported;s||(this.stallReported=!0,K.logger.warn("Playback stalling at @"+o.currentTime+" due to low buffer (buffer="+f+")"),l.trigger(U.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},h._trySkipBufferHole=function(f){for(var l=this.config,o=this.hls,s=this.media,a=s.currentTime,O=0,E=X.BufferHelper.getBuffered(s),w=0;w=O&&a.05&&this.forwardBufferLength>1){var w=Math.min(2,Math.max(1,o)),D=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;p.playbackRate=Math.min(w,Math.max(1,D))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},v.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},v.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},G(L,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,h=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:h?p.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var h=p.holdBack,u=p.partHoldBack,f=p.targetduration,l=this.config,o=l.liveSyncDuration,s=l.liveSyncDurationCount,a=l.lowLatencyMode,O=this.hls.userConfig,E=a&&u||h;(O.liveSyncDuration||O.liveSyncDurationCount||E===0)&&(E=o!==void 0?o:s*f);var w=f,D=1;return E+Math.min(this.stallCount*D,w)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),h=this.targetLatency,u=this.levelDetails;if(p===null||h===null||u===null)return null;var f=u.edge,l=p-h-this.edgeStalled,o=f-u.totalduration,s=f-(this.config.lowLatencyMode&&u.partTarget||u.targetduration);return Math.min(Math.max(o,l),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var h=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-h,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,h=this.levelDetails;if(!p||!h)return 0;var u=p.buffered.length;return u?p.buffered.end(u-1):h.edge-this.currentTime}}]),L}()},"./src/controller/level-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return l});var X=P("./src/types/level.ts"),j=P("./src/events.ts"),U=P("./src/errors.ts"),K=P("./src/utils/codecs.ts"),G=P("./src/controller/level-helper.ts"),r=P("./src/controller/base-playlist-controller.ts"),L=P("./src/types/loader.ts");function v(){return v=Object.assign||function(o){for(var s=1;s0){C=D[0].bitrate,D.sort(function(M,I){return M.bitrate-I.bitrate}),this._levels=D;for(var B=0;Bthis.hls.config.fragLoadingMaxRetry&&(T=w.frag.level)):T=w.frag.level}break;case U.ErrorDetails.LEVEL_LOAD_ERROR:case U.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(C=!1),T=D.level),A=!0;break;case U.ErrorDetails.REMUX_ALLOC_ERROR:T=w.level,A=!0;break}T!==void 0&&this.recoverLevel(w,T,A,C)},a.recoverLevel=function(E,w,D,R){var A=E.details,C=this._levels[w];if(C.loadError++,D){var T=this.retryLoadingOrFail(E);if(T)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(R){var c=C.url.length;if(c>1&&C.loadError1){var R=(w.urlId+1)%D;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(A){A.urlId=R}),this.level=E}},a.onFragLoaded=function(E,w){var D=w.frag;if(D!==void 0&&D.type===L.PlaylistLevelType.MAIN){var R=this._levels[D.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},a.onLevelLoaded=function(E,w){var D,R=w.level,A=w.details,C=this._levels[R];if(!C){var T;this.warn("Invalid level index "+R),(T=w.deliveryDirectives)!==null&&T!==void 0&&T.skip&&(A.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(C.fragmentError===0&&(C.loadError=0,this.retryCount=0),this.playlistLoaded(R,w,C.details)):(D=w.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(A.deltaUpdateFailed=!0)},a.onAudioTrackSwitched=function(E,w){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var R=-1,A=this.hls.audioTracks[w.id].groupId,C=0;C0){var R=D.urlId,A=D.url[R];if(E)try{A=E.addDirectives(A)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("Attempt loading level index "+w+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+R+" "+A),this.clearTimer(),this.hls.trigger(j.Events.LEVEL_LOADING,{url:A,level:w,id:R,deliveryDirectives:E||null})}},a.removeLevel=function(E,w){var D=function(C,T){return T!==w},R=this._levels.filter(function(A,C){return C!==E?!0:A.url.length>1&&w!==void 0?(A.url=A.url.filter(D),A.audioGroupIds&&(A.audioGroupIds=A.audioGroupIds.filter(D)),A.textGroupIds&&(A.textGroupIds=A.textGroupIds.filter(D)),A.urlId=0,!0):!1}).map(function(A,C){var T=A.details;return T!=null&&T.fragments&&T.fragments.forEach(function(c){c.level=C}),A});this._levels=R,this.hls.trigger(j.Events.LEVELS_UPDATED,{levels:R})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var w,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===E&&(w=D[E])!==null&&w!==void 0&&w.details)return;if(E<0||E>=D.length){var R=E<0;if(this.hls.trigger(j.Events.ERROR,{type:U.ErrorTypes.OTHER_ERROR,details:U.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:R,reason:"invalid level idx"}),R)return;E=Math.min(E,D.length-1)}this.clearTimer();var A=this.currentLevelIndex,C=D[A],T=D[E];this.log("switching to level "+E+" from "+A),this.currentLevelIndex=E;var c=v({},T,{level:E,maxBitrate:T.maxBitrate,uri:T.uri,urlId:T.urlId});delete c._urlId,this.hls.trigger(j.Events.LEVEL_SWITCHING,c);var S=T.details;if(!S||S.live){var y=this.switchParams(T.uri,C==null?void 0:C.details);this.loadPlaylist(y)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),s}(r.default)},"./src/controller/level-helper.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"addGroupId",function(){return U}),P.d(J,"assignTrackIdsByGroup",function(){return K}),P.d(J,"updatePTS",function(){return G}),P.d(J,"updateFragPTSDTS",function(){return L}),P.d(J,"mergeDetails",function(){return v}),P.d(J,"mapPartIntersection",function(){return m}),P.d(J,"mapFragmentIntersection",function(){return p}),P.d(J,"adjustSliding",function(){return h}),P.d(J,"addSliding",function(){return u}),P.d(J,"computeReloadInterval",function(){return f}),P.d(J,"getFragmentWithSN",function(){return l}),P.d(J,"getPartWith",function(){return o});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/logger.ts");function U(s,a,O){switch(a){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(O);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(O);break}}function K(s){var a={};s.forEach(function(O){var E=O.groupId||"";O.id=a[E]=a[E]||0,a[E]++})}function G(s,a,O){var E=s[a],w=s[O];r(E,w)}function r(s,a){var O=a.startPTS;if(Object(X.isFiniteNumber)(O)){var E=0,w;a.sn>s.sn?(E=O-s.start,w=s):(E=s.start-O,w=a),w.duration!==E&&(w.duration=E)}else if(a.sn>s.sn){var D=s.cc===a.cc;D&&s.minEndPTS?a.start=s.start+(s.minEndPTS-s.start):a.start=s.start+s.duration}else a.start=Math.max(s.start-a.duration,0)}function L(s,a,O,E,w,D){var R=E-O;R<=0&&(j.logger.warn("Fragment should have a positive duration",a),E=O+a.duration,D=w+a.duration);var A=O,C=E,T=a.startPTS,c=a.endPTS;if(Object(X.isFiniteNumber)(T)){var S=Math.abs(T-O);Object(X.isFiniteNumber)(a.deltaPTS)?a.deltaPTS=Math.max(S,a.deltaPTS):a.deltaPTS=S,A=Math.max(O,T),O=Math.min(O,T),w=Math.min(w,a.startDTS),C=Math.min(E,c),E=Math.max(E,c),D=Math.max(D,a.endDTS)}a.duration=E-O;var y=O-a.start;a.appendedPTS=E,a.start=a.startPTS=O,a.maxStartPTS=A,a.startDTS=w,a.endPTS=E,a.minEndPTS=C,a.endDTS=D;var b=a.sn;if(!s||bs.endSN)return 0;var B,F=b-s.startSN,_=s.fragments;for(_[F]=a,B=F;B>0;B--)r(_[B],_[B-1]);for(B=F;B<_.length-1;B++)r(_[B],_[B+1]);return s.fragmentHint&&r(_[_.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,y}function v(s,a){for(var O=null,E=s.fragments,w=E.length-1;w>=0;w--){var D=E[w].initSegment;if(D){O=D;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var R=0,A;if(p(s,a,function(B,F){B.relurl&&(R=B.cc-F.cc),Object(X.isFiniteNumber)(B.startPTS)&&Object(X.isFiniteNumber)(B.endPTS)&&(F.start=F.startPTS=B.startPTS,F.startDTS=B.startDTS,F.appendedPTS=B.appendedPTS,F.maxStartPTS=B.maxStartPTS,F.endPTS=B.endPTS,F.endDTS=B.endDTS,F.minEndPTS=B.minEndPTS,F.duration=B.endPTS-B.startPTS,F.duration&&(A=F),a.PTSKnown=a.alignedSliding=!0),F.elementaryStreams=B.elementaryStreams,F.loader=B.loader,F.stats=B.stats,F.urlId=B.urlId,B.initSegment&&(F.initSegment=B.initSegment,O=B.initSegment)}),O){var C=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;C.forEach(function(B){var F;(!B.initSegment||B.initSegment.relurl===((F=O)===null||F===void 0?void 0:F.relurl))&&(B.initSegment=O)})}if(a.skippedSegments&&(a.deltaUpdateFailed=a.fragments.some(function(B){return!B}),a.deltaUpdateFailed)){j.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var T=a.skippedSegments;T--;)a.fragments.shift();a.startSN=a.fragments[0].sn,a.startCC=a.fragments[0].cc}var c=a.fragments;if(R){j.logger.warn("discontinuity sliding from playlist, take drift into account");for(var S=0;S=E.length)return;u(a,E[O].start)}function u(s,a){if(a){for(var O=s.fragments,E=s.skippedSegments;E0&&w0&&C===-1&&(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),C=T),this.state=j.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=C,this.tick()}else this._forceStartLoad=!0,this.state=j.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,w.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case j.State.IDLE:this.doTickIdle();break;case j.State.WAITING_LEVEL:{var C,T=this.levels,c=this.level,S=T==null||((C=T[c])===null||C===void 0)?void 0:C.details;if(S&&(!S.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(S))break;this.state=j.State.IDLE;break}break}case j.State.FRAG_LOADING_WAITING_RETRY:{var y,b=self.performance.now(),B=this.retryDate;(!B||b>=B||(y=this.media)!==null&&y!==void 0&&y.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=j.State.IDLE)}break;default:break}this.onTickEnd()},R.onTickEnd=function(){w.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},R.doTickIdle=function(){var C,T,c=this.hls,S=this.levelLastLoaded,y=this.levels,b=this.media,B=c.config,F=c.nextLoadLevel;if(S===null||!b&&(this.startFragRequested||!B.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!y||!y[F])return;var _=y[F];this.level=c.nextLoadLevel=F;var M=_.details;if(!M||this.state===j.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==F){this.state=j.State.WAITING_LEVEL;return}var I=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:b,L.PlaylistLevelType.MAIN);if(I===null)return;var g=I.len,H=this.getMaxBufferLength(_.maxBitrate);if(g>=H)return;if(this._streamEnded(I,M)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(K.Events.BUFFER_EOS,$),this.state=j.State.ENDED;return}var ne=I.end,se=this.getNextFragment(ne,M);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var Oe=se.sn-M.startSN;Oe>1&&(se=M.fragments[Oe-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===r.FragmentState.OK&&this.nextLoadPosition>ne){var ge=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(b,ge,L.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,M)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((C=se.decryptdata)===null||C===void 0?void 0:C.keyFormat)==="identity"&&!((T=se.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(se,M):this.loadFragment(se,M,ne)},R.loadFragment=function(C,T,c){var S,y=this.fragmentTracker.getState(C);if(this.fragCurrent=C,y===r.FragmentState.BACKTRACKED){var b=this.fragmentTracker.getBacktrackData(C);if(b){this._handleFragmentLoadProgress(b),this._handleFragmentLoadComplete(b);return}else y=r.FragmentState.NOT_LOADED}y===r.FragmentState.NOT_LOADED||y===r.FragmentState.PARTIAL?C.sn==="initSegment"?this._loadInitSegment(C):this.bitrateTest?(C.bitrateTest=!0,this.log("Fragment "+C.sn+" of level "+C.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(C)):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,C,T,c)):y===r.FragmentState.APPENDING?this.reduceMaxBufferLength(C.duration)&&this.fragmentTracker.removeFragment(C):((S=this.media)===null||S===void 0?void 0:S.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},R.getAppendedFrag=function(C){var T=this.fragmentTracker.getAppendedFrag(C,L.PlaylistLevelType.MAIN);return T&&"fragment"in T?T.fragment:T},R.getBufferedFrag=function(C){return this.fragmentTracker.getBufferedFrag(C,L.PlaylistLevelType.MAIN)},R.followingBufferedFrag=function(C){return C?this.getBufferedFrag(C.end+.5):null},R.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},R.nextLevelSwitch=function(){var C=this.levels,T=this.media;if(T!=null&&T.readyState){var c,S=this.getAppendedFrag(T.currentTime);if(S&&S.start>1&&this.flushMainBuffer(0,S.start-1),!T.paused&&C){var y=this.hls.nextLoadLevel,b=C[y],B=this.fragLastKbps;B&&this.fragCurrent?c=this.fragCurrent.duration*b.maxBitrate/(1e3*B)+1:c=0}else c=0;var F=this.getBufferedFrag(T.currentTime+c);if(F){var _=this.followingBufferedFrag(F);if(_){this.abortCurrentFrag();var M=_.maxStartPTS?_.maxStartPTS:_.start,I=_.duration,g=Math.max(F.end,M+Math.min(Math.max(I-this.config.maxFragLookUpTolerance,I*.5),I*.75));this.flushMainBuffer(g,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var C=this.fragCurrent;this.fragCurrent=null,C!=null&&C.loader&&C.loader.abort(),this.state===j.State.KEY_LOADING&&(this.state=j.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},R.flushMainBuffer=function(C,T){w.prototype.flushMainBuffer.call(this,C,T,this.altAudio?"video":null)},R.onMediaAttached=function(C,T){w.prototype.onMediaAttached.call(this,C,T);var c=T.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),c.addEventListener("playing",this.onvplaying),c.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,c,this.fragmentTracker,this.hls)},R.onMediaDetaching=function(){var C=this.media;C&&(C.removeEventListener("playing",this.onvplaying),C.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),w.prototype.onMediaDetaching.call(this)},R.onMediaPlaying=function(){this.tick()},R.onMediaSeeked=function(){var C=this.media,T=C?C.currentTime:null;Object(X.isFiniteNumber)(T)&&this.log("Media seeked to "+T.toFixed(3)),this.tick()},R.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(K.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},R.onManifestParsed=function(C,T){var c=!1,S=!1,y;T.levels.forEach(function(b){y=b.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(c=!0),y.indexOf("mp4a.40.5")!==-1&&(S=!0))}),this.audioCodecSwitch=c&&S&&!Object(U.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=T.levels,this.startFragRequested=!1},R.onLevelLoading=function(C,T){var c=this.levels;if(!c||this.state!==j.State.IDLE)return;var S=c[T.level];(!S.details||S.details.live&&this.levelLastLoaded!==T.level||this.waitForCdnTuneIn(S.details))&&(this.state=j.State.WAITING_LEVEL)},R.onLevelLoaded=function(C,T){var c,S=this.levels,y=T.level,b=T.details,B=b.totalduration;if(!S){this.warn("Levels were reset while loading level "+y);return}this.log("Level "+y+" loaded ["+b.startSN+","+b.endSN+"], cc ["+b.startCC+", "+b.endCC+"] duration:"+B);var F=this.fragCurrent;F&&(this.state===j.State.FRAG_LOADING||this.state===j.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==T.level&&F.loader&&(this.state=j.State.IDLE,F.loader.abort()));var _=S[y],M=0;if(b.live||(c=_.details)!==null&&c!==void 0&&c.live){if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed)return;M=this.alignPlaylists(b,_.details)}if(_.details=b,this.levelLastLoaded=y,this.hls.trigger(K.Events.LEVEL_UPDATED,{details:b,level:y}),this.state===j.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(b))return;this.state=j.State.IDLE}this.startFragRequested?b.live&&this.synchronizeToLiveEdge(b):this.setStartPosition(b,M),this.tick()},R._handleFragmentLoadProgress=function(C){var T,c=C.frag,S=C.part,y=C.payload,b=this.levels;if(!b){this.warn("Levels were reset while fragment load was in progress. Fragment "+c.sn+" of level "+c.level+" will not be buffered");return}var B=b[c.level],F=B.details;if(!F){this.warn("Dropping fragment "+c.sn+" of level "+c.level+" after level details were reset");return}var _=B.videoCodec,M=F.PTSKnown||!F.live,I=(T=c.initSegment)===null||T===void 0?void 0:T.data,g=this._getAudioCodec(B),H=this.transmuxer=this.transmuxer||new m.default(this.hls,L.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=S?S.index:-1,ne=$!==-1,se=new p.ChunkMetadata(c.level,c.sn,c.stats.chunkCount,y.byteLength,$,ne),Oe=this.initPTS[c.cc];H.push(y,I,g,_,c,S,F.totalduration,M,se,Oe)},R.onAudioTrackSwitching=function(C,T){var c=this.altAudio,S=!!T.url,y=T.id;if(!S){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var b=this.fragCurrent;b!=null&&b.loader&&(this.log("Switching to main audio track, cancel main fragment load"),b.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var B=this.hls;c&&B.trigger(K.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),B.trigger(K.Events.AUDIO_TRACK_SWITCHED,{id:y})}},R.onAudioTrackSwitched=function(C,T){var c=T.id,S=!!this.hls.audioTracks[c].url;if(S){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=S,this.tick()},R.onBufferCreated=function(C,T){var c=T.tracks,S,y,b=!1;for(var B in c){var F=c[B];if(F.id==="main"){if(y=B,S=F,B==="video"){var _=c[B];_&&(this.videoBuffer=_.buffer)}}else b=!0}b&&S?(this.log("Alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=S.buffer):this.mediaBuffer=this.media},R.onFragBuffered=function(C,T){var c=T.frag,S=T.part;if(c&&c.type!==L.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(c)){this.warn("Fragment "+c.sn+(S?" p: "+S.index:"")+" of level "+c.level+" finished buffering, but was aborted. state: "+this.state),this.state===j.State.PARSED&&(this.state=j.State.IDLE);return}var y=S?S.stats:c.stats;this.fragLastKbps=Math.round(8*y.total/(y.buffering.end-y.loading.first)),c.sn!=="initSegment"&&(this.fragPrevious=c),this.fragBufferedComplete(c,S)},R.onError=function(C,T){switch(T.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(L.PlaylistLevelType.MAIN,T);break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==j.State.ERROR&&(T.fatal?(this.warn(""+T.details),this.state=j.State.ERROR):!T.levelRetry&&this.state===j.State.WAITING_LEVEL&&(this.state=j.State.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="main"&&(this.state===j.State.PARSING||this.state===j.State.PARSED)){var c=!0,S=this.getFwdBufferInfo(this.media,L.PlaylistLevelType.MAIN);S&&S.len>.5&&(c=!this.reduceMaxBufferLength(S.len)),c&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},R.checkBuffer=function(){var C=this.media,T=this.gapController;if(!C||!T||!C.readyState)return;var c=G.BufferHelper.getBuffered(C);!this.loadedmetadata&&c.length?(this.loadedmetadata=!0,this.seekToStartPos()):T.poll(this.lastCurrentTime),this.lastCurrentTime=C.currentTime},R.onFragLoadEmergencyAborted=function(){this.state=j.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},R.onBufferFlushed=function(C,T){var c=T.type;if(c!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var S=(c===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(S,c,L.PlaylistLevelType.MAIN)}},R.onLevelsUpdated=function(C,T){this.levels=T.levels},R.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},R.seekToStartPos=function(){var C=this.media,T=C.currentTime,c=this.startPosition;if(c>=0&&T0&&(b1&&C.seeking===!1){var c=C.currentTime;if(G.BufferHelper.isBuffered(C,c)?T=this.getAppendedFrag(c):G.BufferHelper.isBuffered(C,c+.1)&&(T=this.getAppendedFrag(c+.1)),T){var S=this.fragPlaying,y=T.level;(!S||T.sn!==S.sn||S.level!==y||T.urlId!==S.urlId)&&(this.hls.trigger(K.Events.FRAG_CHANGED,{frag:T}),(!S||S.level!==y)&&this.hls.trigger(K.Events.LEVEL_SWITCHED,{level:y}),this.fragPlaying=T)}}},o(D,[{key:"nextLevel",get:function(){var C=this.nextBufferedFrag;return C?C.level:-1}},{key:"currentLevel",get:function(){var C=this.media;if(C){var T=this.getAppendedFrag(C.currentTime);if(T)return T.level}return-1}},{key:"nextBufferedFrag",get:function(){var C=this.media;if(C){var T=this.getAppendedFrag(C.currentTime);return this.followingBufferedFrag(T)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(j.default)},"./src/controller/subtitle-stream-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"SubtitleStreamController",function(){return s});var X=P("./src/events.ts"),j=P("./src/utils/logger.ts"),U=P("./src/utils/buffer-helper.ts"),K=P("./src/controller/fragment-finders.ts"),G=P("./src/utils/discontinuities.ts"),r=P("./src/controller/level-helper.ts"),L=P("./src/controller/fragment-tracker.ts"),v=P("./src/controller/base-stream-controller.ts"),m=P("./src/types/loader.ts"),p=P("./src/types/level.ts");function h(a,O){for(var E=0;E=T[y].start&&S<=T[y].end){c=T[y];break}var b=A.start+A.duration;c?c.end=b:(c={start:S,end:b},T.push(c)),this.fragmentTracker.fragBuffered(A)},E.onBufferFlushing=function(D,R){var A=R.startOffset,C=R.endOffset;if(A===0&&C!==Number.POSITIVE_INFINITY){var T=this.currentTrackId,c=this.levels;if(!c.length||!c[T]||!c[T].details)return;var S=c[T].details,y=S.targetduration,b=C-y;if(b<=0)return;R.endOffsetSubtitles=Math.max(0,b),this.tracksBuffered.forEach(function(B){for(var F=0;F=S.length||T!==c||!y)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,C.live||(A=y.details)!==null&&A!==void 0&&A.live){var b=this.mainDetails;if(C.deltaUpdateFailed||!b)return;var B=b.fragments[0];if(!y.details)C.hasProgramDateTime&&b.hasProgramDateTime?Object(G.alignMediaPlaylistByPDT)(C,b):B&&Object(r.addSliding)(C,B.start);else{var F=this.alignPlaylists(C,y.details);F===0&&B&&Object(r.addSliding)(C,B.start)}}if(y.details=C,this.levelLastLoaded=T,this.tick(),C.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var _=Object(K.findFragmentByPTS)(null,C.fragments,this.media.currentTime,0);_||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}},E._handleFragmentLoadComplete=function(D){var R=D.frag,A=D.payload,C=R.decryptdata,T=this.hls;if(this.fragContextChanged(R))return;if(A&&A.byteLength>0&&C&&C.key&&C.iv&&C.method==="AES-128"){var c=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(A),C.key.buffer,C.iv.buffer).then(function(S){var y=performance.now();T.trigger(X.Events.FRAG_DECRYPTED,{frag:R,payload:S,stats:{tstart:c,tdecrypt:y}})})}},E.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var D,R=this.currentTrackId,A=this.levels;if(!A.length||!A[R]||!A[R].details)return;var C=A[R].details,T=C.targetduration,c=this.config,S=this.media,y=U.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,S.currentTime-T,c.maxBufferHole),b=y.end,B=y.len,F=this.getMaxBufferLength()+T;if(B>F)return;console.assert(C,"Subtitle track details are defined on idle subtitle stream controller tick");var _=C.fragments,M=_.length,I=C.edge,g,H=this.fragPrevious;if(b-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},f.pollTrackChange=function(o){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,o)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var o=p(this.media.textTracks);o.forEach(function(s){Object(j.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(o,s){this.tracks=s.subtitleTracks},f.onSubtitleTrackLoaded=function(o,s){var a=s.id,O=s.details,E=this.trackId,w=this.tracksInGroup[E];if(!w){this.warn("Invalid subtitle track id "+a);return}var D=w.details;w.details=s.details,this.log("subtitle track "+a+" loaded ["+O.startSN+"-"+O.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,s,D))},f.onLevelLoading=function(o,s){this.switchLevel(s.level)},f.onLevelSwitching=function(o,s){this.switchLevel(s.level)},f.switchLevel=function(o){var s=this.hls.levels[o];if(!(s!=null&&s.textGroupIds))return;var a=s.textGroupIds[s.urlId];if(this.groupId!==a){var O=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(R){return!a||R.groupId===a});this.tracksInGroup=E;var w=this.findTrackId(O==null?void 0:O.name)||this.findTrackId();this.groupId=a;var D={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(X.Events.SUBTITLE_TRACKS_UPDATED,D),w!==-1&&this.setSubtitleTrack(w,O)}},f.findTrackId=function(o){for(var s=this.tracksInGroup,a=0;a=O.length)return;this.clearTimer();var E=O[o];if(this.log("Switching to subtitle track "+o),this.trackId=o,E){var w=E.id,D=E.groupId,R=D===void 0?"":D,A=E.name,C=E.type,T=E.url;this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:w,groupId:R,name:A,type:C,url:T});var c=this.switchParams(E.url,s==null?void 0:s.details);this.loadPlaylist(c)}else this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:o})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var o=-1,s=p(this.media.textTracks),a=0;a=0&&(C[0]=Math.min(C[0],O),C[1]=Math.max(C[1],E),R=!0,T/(E-O)>.5))return}if(R||D.push([O,E]),this.config.renderTextTracksNatively){var c=this.captionsTracks[a];this.Cues.newCue(c,O,E,w)}else{var S=this.Cues.newCue(null,O,E,w);this.hls.trigger(j.Events.CUES_PARSED,{type:"captions",cues:S,track:a})}},o.onInitPtsFound=function(a,O){var E=this,w=O.frag,D=O.id,R=O.initPTS,A=O.timescale,C=this.unparsedVttFrags;D==="main"&&(this.initPTS[w.cc]=R,this.timescale[w.cc]=A),C.length&&(this.unparsedVttFrags=[],C.forEach(function(T){E.onFragLoaded(j.Events.FRAG_LOADED,T)}))},o.getExistingTrack=function(a){var O=this.media;if(O)for(var E=0;E>>8^A&255^99,L[w]=A,v[A]=w;var C=E[w],T=E[C],c=E[T],S=E[A]*257^A*16843008;p[w]=S<<24|S>>>8,h[w]=S<<16|S>>>16,u[w]=S<<8|S>>>24,f[w]=S,S=c*16843009^T*65537^C*257^w*16843008,o[A]=S<<24|S>>>8,s[A]=S<<16|S>>>16,a[A]=S<<8|S>>>24,O[A]=S,w?(w=C^E[E[E[c^C]]],D^=E[E[D]]):w=D=1}},G.expandKey=function(L){for(var v=this.uint8ArrayToUint32Array_(L),m=!0,p=0;p>>6)+1;var S=(a[O+2]&60)>>>2;if(S>c.length-1){s.trigger(U.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+S});return}return R=(a[O+2]&1)<<2,R|=(a[O+3]&192)>>>6,X.logger.log("manifest codec:"+E+", ADTS type:"+w+", samplingIndex:"+S),/firefox/i.test(C)?S>=6?(w=5,A=new Array(4),D=S-3):(w=2,A=new Array(2),D=S):C.indexOf("android")!==-1?(w=2,A=new Array(2),D=S):(w=5,A=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&S>=6?D=S-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(S>=6&&R===1||/vivaldi/i.test(C))||!E&&R===1)&&(w=2,A=new Array(2)),D=S)),A[0]=w<<3,A[0]|=(S&14)>>1,A[1]|=(S&1)<<7,A[1]|=R<<3,w===5&&(A[1]|=(D&14)>>1,A[2]=(D&1)<<7,A[2]|=2<<2,A[3]=0),{config:A,samplerate:c[S],channelCount:R,codec:"mp4a.40."+w,manifestCodec:T}}function G(s,a){return s[a]===255&&(s[a+1]&246)===240}function r(s,a){return s[a+1]&1?7:9}function L(s,a){return(s[a+3]&3)<<11|s[a+4]<<3|(s[a+5]&224)>>>5}function v(s,a){return a+5=s.length)return!1;var E=L(s,a);if(E<=O)return!1;var w=a+E;return w===s.length||m(s,w)}return!1}function u(s,a,O,E,w){if(!s.samplerate){var D=K(a,O,E,w);if(!D)return;s.config=D.config,s.samplerate=D.samplerate,s.channelCount=D.channelCount,s.codec=D.codec,s.manifestCodec=D.manifestCodec,X.logger.log("parsed codec:"+s.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function f(s){return 1024*9e4/s}function l(s,a,O,E,w){var D=r(s,a),R=L(s,a);if(R-=D,R>0){var A=O+E*w;return{headerLength:D,frameLength:R,stamp:A}}}function o(s,a,O,E,w){var D=f(s.samplerate),R=l(a,O,E,w,D);if(R){var A=R.frameLength,C=R.headerLength,T=R.stamp,c=C+A,S=Math.max(0,O+c-a.length),y;S?(y=new Uint8Array(c-C),y.set(a.subarray(O+C,a.length),0)):y=a.subarray(O+C,O+c);var b={unit:y,pts:T};return S||s.samples.push(b),{sample:b,length:c,missing:S}}}},"./src/demux/base-audio-demuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"initPTSFn",function(){return L});var X=P("./src/polyfills/number.ts"),j=P("./src/demux/id3.ts"),U=P("./src/demux/dummy-demuxed-track.ts"),K=P("./src/utils/mp4-tools.ts"),G=P("./src/utils/typed-array.ts"),r=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=v.prototype;return m.resetInitSegment=function(h,u,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(h,u){return!1},m.appendFrame=function(h,u,f){},m.demux=function(h,u){this.cachedData&&(h=Object(K.appendUint8Array)(this.cachedData,h),this.cachedData=null);var f=j.getID3Data(h,0),l=f?f.length:0,o,s,a=this._audioTrack,O=this._id3Track,E=f?j.getTimeStamp(f):void 0,w=h.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=L(E,u)),f&&f.length>0&&O.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),s=this.initPTS;lr?(this.word<<=r,this.bitsAvailable-=r):(r-=this.bitsAvailable,L=r>>3,r-=L>>3,this.bytesAvailable-=L,this.loadWord(),this.word<<=r,this.bitsAvailable-=r)},K.readBits=function(r){var L=Math.min(this.bitsAvailable,r),v=this.word>>>32-L;return r>32&&X.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=L,this.bitsAvailable>0?this.word<<=L:this.bytesAvailable>0&&this.loadWord(),L=r-L,L>0&&this.bitsAvailable?v<>>r)!==0)return this.word<<=r,this.bitsAvailable-=r,r;return this.loadWord(),r+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var r=this.skipLZ();return this.readBits(r+1)-1},K.readEG=function(){var r=this.readUEG();return 1&r?1+r>>>1:-1*(r>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(r){for(var L=8,v=8,m,p=0;p0?w.subarray(R,R+A):void 0},K=function(w,D){var R=0;return R=(w[D]&127)<<21,R|=(w[D+1]&127)<<14,R|=(w[D+2]&127)<<7,R|=w[D+3]&127,R},G=function(w,D){return X(w,D)&&K(w,D+6)+10<=w.length-D},r=function(w){for(var D=m(w),R=0;R>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:b+=String.fromCharCode(c);break;case 12:case 13:S=w[B++],b+=String.fromCharCode((c&31)<<6|S&63);break;case 14:S=w[B++],y=w[B++],b+=String.fromCharCode((c&15)<<12|(S&63)<<6|(y&63)<<0);break;default:}}return b},s={decodeTextFrame:u},a;function O(){return!a&&typeof self.TextDecoder!="undefined"&&(a=new self.TextDecoder("utf-8")),a}},"./src/demux/mp3demuxer.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/demux/base-audio-demuxer.ts"),j=P("./src/demux/id3.ts"),U=P("./src/utils/logger.ts"),K=P("./src/demux/mpegaudio.ts");function G(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,r(v,m)}function r(v,m){return r=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},r(v,m)}var L=function(v){G(m,v);function m(){return v.apply(this,arguments)||this}var p=m.prototype;return p.resetInitSegment=function(u,f,l){v.prototype.resetInitSegment.call(this,u,f,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:u,duration:l,inputTimeScale:9e4,dropped:0}},m.probe=function(u){if(!u)return!1;for(var f=j.getID3Data(u,0)||[],l=f.length,o=u.length;l0},G.demux=function(L){var v=L,m=Object(j.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(X.appendUint8Array)(this.remainderData,L));var p=Object(X.segmentValidRange)(v);this.remainderData=p.remainder,m.samples=p.valid||new Uint8Array}else m.samples=v;return{audioTrack:Object(j.dummyTrack)(),avcTrack:m,id3Track:Object(j.dummyTrack)(),textTrack:Object(j.dummyTrack)()}},G.flush=function(){var L=Object(j.dummyTrack)();return L.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(j.dummyTrack)(),avcTrack:L,id3Track:Object(j.dummyTrack)(),textTrack:Object(j.dummyTrack)()}},G.demuxSampleAes=function(L,v,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},G.destroy=function(){},K}();U.minProbeByteLength=1024,J.default=U},"./src/demux/mpegaudio.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"appendFrame",function(){return r}),P.d(J,"parseHeader",function(){return L}),P.d(J,"isHeaderPattern",function(){return v}),P.d(J,"isHeader",function(){return m}),P.d(J,"canParse",function(){return p}),P.d(J,"probe",function(){return h});var X=null,j=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],U=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],K=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],G=[0,1,1,4];function r(u,f,l,o,s){if(l+24>f.length)return;var a=L(f,l);if(a&&l+a.frameLength<=f.length){var O=a.samplesPerFrame*9e4/a.sampleRate,E=o+s*O,w={unit:f.subarray(l,l+a.frameLength),pts:E,dts:E};return u.config=[],u.channelCount=a.channelCount,u.samplerate=a.sampleRate,u.samples.push(w),{sample:w,length:a.frameLength,missing:0}}}function L(u,f){var l=u[f+1]>>3&3,o=u[f+1]>>1&3,s=u[f+2]>>4&15,a=u[f+2]>>2&3;if(l!==1&&s!==0&&s!==15&&a!==3){var O=u[f+2]>>1&1,E=u[f+3]>>6,w=l===3?3-o:o===3?3:4,D=j[w*14+s-1]*1e3,R=l===3?0:l===2?1:2,A=U[R*3+a],C=E===3?1:2,T=K[l][o],c=G[o],S=T*8*c,y=Math.floor(T*D/A+O)*c;if(X===null){var b=navigator.userAgent||"",B=b.match(/Chrome\/(\d+)/i);X=B?parseInt(B[1]):0}var F=!!X&&X<=87;return F&&o===2&&D>=224e3&&E===0&&(u[f+3]=u[f+3]|128),{sampleRate:A,channelCount:C,frameLength:y,samplesPerFrame:S}}}function v(u,f){return u[f]===255&&(u[f+1]&224)===224&&(u[f+1]&6)!==0}function m(u,f){return f+1=L.length){m();return}if(L[v].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(L,v,m,p),!p)return}},G.getAvcEncryptedData=function(L){for(var v=Math.floor((L.length-48)/160)*16+16,m=new Int8Array(v),p=0,h=32;h<=L.length-16;h+=160,p+=16)m.set(L.subarray(h,h+16),p);return m},G.getAvcDecryptedUnit=function(L,v){for(var m=new Uint8Array(v),p=0,h=32;h<=L.length-16;h+=160,p+=16)L.set(m.subarray(p,p+16),h);return L},G.decryptAvcSample=function(L,v,m,p,h,u){var f=Object(j.discardEPB)(h.data),l=this.getAvcEncryptedData(f),o=this;this.decryptBuffer(l.buffer,function(s){h.data=o.getAvcDecryptedUnit(f,s),u||o.decryptAvcSamples(L,v,m+1,p)})},G.decryptAvcSamples=function(L,v,m,p){if(L instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,m=0){if(v>=L.length){p();return}for(var h=L[v].units;!(m>=h.length);m++){var u=h[m];if(u.data.length<=48||u.type!==1&&u.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(L,v,m,p,u,f),!f)return}}},K}();J.default=U},"./src/demux/transmuxer-interface.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./node_modules/webworkify-webpack/index.js"),j=P.n(X),U=P("./src/events.ts"),K=P("./src/demux/transmuxer.ts"),G=P("./src/utils/logger.ts"),r=P("./src/errors.ts"),L=P("./src/utils/mediasource-helper.ts"),v=P("./node_modules/eventemitter3/index.js"),m=P.n(v),p=Object(L.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function u(l,o,s,a){var O=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=l,this.id=o,this.onTransmuxComplete=s,this.onFlush=a;var E=l.config,w=function(T,c){c=c||{},c.frag=O.frag,c.id=O.id,l.trigger(T,c)};this.observer=new v.EventEmitter,this.observer.on(U.Events.FRAG_DECRYPTED,w),this.observer.on(U.Events.ERROR,w);var D={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},R=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){G.logger.log("demuxing in webworker");var A;try{A=this.worker=X("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),A.addEventListener("message",this.onwmsg),A.onerror=function(C){l.trigger(U.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(C.message+" ("+C.filename+":"+C.lineno+")")})},A.postMessage({cmd:"init",typeSupported:D,vendor:R,id:o,config:JSON.stringify(E)})}catch(C){G.logger.warn("Error in worker:",C),G.logger.error("Error while initializing DemuxerWorker, fallback to inline"),A&&self.URL.revokeObjectURL(A.objectURL),this.transmuxer=new K.default(this.observer,D,E,R,o),this.worker=null}}else this.transmuxer=new K.default(this.observer,D,E,R,o)}var f=u.prototype;return f.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var a=this.observer;a&&a.removeAllListeners(),this.observer=null},f.push=function(o,s,a,O,E,w,D,R,A,C){var T=this;A.transmuxing.start=self.performance.now();var c=this.transmuxer,S=this.worker,y=w?w.start:E.start,b=E.decryptdata,B=this.frag,F=!(B&&E.cc===B.cc),_=!(B&&A.level===B.level),M=B?A.sn-B.sn:-1,I=this.part?A.part-this.part.index:1,g=!_&&(M===1||M===0&&I===1),H=self.performance.now();(_||M||E.stats.parsing.start===0)&&(E.stats.parsing.start=H),w&&(I||!g)&&(w.stats.parsing.start=H);var $=new K.TransmuxState(F,g,R,_,y);if(!g||F){G.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+A.sn+" p: "+A.part+" level: "+A.level+" id: "+A.id+` + Time to underbuffer: `+F.toFixed(3)+" s"),s.nextLoadLevel=M,this.bwEstimator.sample(R,w.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:o,stats:w})},u.onFragLoaded=function(l,o){var s=o.frag,a=o.part;if(s.type===r.PlaylistLevelType.MAIN&&Object(X.isFiniteNumber)(s.sn)){var O=a?a.stats:s.stats,E=a?a.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var w=this.hls.levels[s.level],D=(w.loaded?w.loaded.bytes:0)+O.loaded,R=(w.loaded?w.loaded.duration:0)+E;w.loaded={bytes:D,duration:R},w.realBitrate=Math.round(8*D/R)}if(s.bitrateTest){var A={stats:O,frag:s,part:a,id:s.type};this.onFragBuffered(U.Events.FRAG_BUFFERED,A),s.bitrateTest=!1}}},u.onFragBuffered=function(l,o){var s=o.frag,a=o.part,O=a?a.stats:s.stats;if(O.aborted)return;if(s.type!==r.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var E=O.parsing.end-O.loading.start;this.bwEstimator.sample(E,O.loaded),O.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},u.onError=function(l,o){switch(o.details){case G.ErrorDetails.FRAG_LOAD_ERROR:case G.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},u.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},u.getNextABRAutoLevel=function(){var l=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.maxAutoLevel,O=s.config,E=s.minAutoLevel,w=s.media,D=o?o.duration:l?l.duration:0,R=w?w.currentTime:0,A=w&&w.playbackRate!==0?Math.abs(w.playbackRate):1,C=this.bwEstimator?this.bwEstimator.getEstimate():O.abrEwmaDefaultEstimate,T=(K.BufferHelper.bufferInfo(w,R,O.maxBufferHole).end-R)/A,d=this.findBestLevel(C,E,a,T,O.abrBandWidthFactor,O.abrBandWidthUpFactor);if(d>=0)return d;L.logger.trace((T?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var S=D?Math.min(D,O.maxStarvationDelay):O.maxStarvationDelay,y=O.abrBandWidthFactor,b=O.abrBandWidthUpFactor;if(!T){var B=this.bitrateTestDelay;if(B){var F=D?Math.min(D,O.maxLoadingDelay):O.maxLoadingDelay;S=F-B,L.logger.trace("bitrate test took "+Math.round(1e3*B)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*S)+" ms"),y=b=1}}return d=this.findBestLevel(C,E,a,T+S,y,b),Math.max(d,0)},u.findBestLevel=function(l,o,s,a,O,E){for(var w,D=this.fragCurrent,R=this.partCurrent,A=this.lastLoadedFragLevel,C=this.hls.levels,T=C[A],d=!!(T!=null&&(w=T.details)!==null&&w!==void 0&&w.live),S=T==null?void 0:T.codecSet,y=R?R.duration:D?D.duration:0,b=s;b>=o;b--){var B=C[b];if(!B||S&&B.codecSet!==S)continue;var F=B.details,_=(R?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||y,M=void 0;b<=A?M=O*l:M=E*l;var I=C[b].maxBitrate,g=I*_/M;if(L.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+b+"/"+Math.round(M)+"/"+I+"/"+_+"/"+a+"/"+g),M>I&&(!g||d&&!this.bitrateTestDelay||g0&&T===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=j.State.IDLE):(this.loadedmetadata=!1,this.state=j.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=T,this.tick()},A.doTick=function(){switch(this.state){case j.State.IDLE:this.doTickIdle();break;case j.State.WAITING_TRACK:{var T,d=this.levels,S=this.trackId,y=d==null||((T=d[S])===null||T===void 0)?void 0:T.details;if(y){if(this.waitForCdnTuneIn(y))break;this.state=j.State.WAITING_INIT_PTS}break}case j.State.FRAG_LOADING_WAITING_RETRY:{var b,B=performance.now(),F=this.retryDate;(!F||B>=F||(b=this.media)!==null&&b!==void 0&&b.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=j.State.IDLE);break}case j.State.WAITING_INIT_PTS:{var _=this.waitingData;if(_){var M=_.frag,I=_.part,g=_.cache,H=_.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=j.State.FRAG_LOADING;var $=g.flush(),ne={frag:M,part:I,payload:$,networkDetails:null};this._handleFragmentLoadProgress(ne),H&&D.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)o.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),Oe=K.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),ge=Object(u.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,M);ge<0&&(o.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=j.State.IDLE}}this.onTickEnd()},A.clearWaitingFragment=function(){var T=this.waitingData;T&&(this.fragmentTracker.removeFragment(T.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=j.State.IDLE)},A.onTickEnd=function(){var T=this.media;if(!T||!T.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:T,S=d.buffered;!this.loadedmetadata&&S.length&&(this.loadedmetadata=!0),this.lastCurrentTime=T.currentTime},A.doTickIdle=function(){var T,d,S=this.hls,y=this.levels,b=this.media,B=this.trackId,F=S.config;if(!y||!y[B])return;if(!b&&(this.startFragRequested||!F.startFragPrefetch))return;var _=y[B],M=_.details;if(!M||M.live&&this.levelLastLoaded!==B||this.waitForCdnTuneIn(M)){this.state=j.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,L.PlaylistLevelType.AUDIO));var I=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,L.PlaylistLevelType.AUDIO);if(I===null)return;var g=I.len,H=this.getMaxBufferLength(),$=this.audioSwitch;if(g>=H&&!$)return;if(!$&&this._streamEnded(I,M)){S.trigger(U.Events.BUFFER_EOS,{type:"audio"}),this.state=j.State.ENDED;return}var ne=M.fragments,se=ne[0].start,Oe=I.end;if($){var ge=this.getLoadPosition();Oe=ge,M.PTSKnown&&gese||I.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),b.currentTime=se+.05))}var Te=this.getNextFragment(Oe,M);if(!Te){this.bufferFlushed=!0;return}((T=Te.decryptdata)===null||T===void 0?void 0:T.keyFormat)==="identity"&&!((d=Te.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(Te,M):this.loadFragment(Te,M,Oe)},A.getMaxBufferLength=function(){var T=D.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,L.PlaylistLevelType.MAIN);return d===null?T:Math.max(T,d.len)},A.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},A.onAudioTracksUpdated=function(T,d){var S=d.audioTracks;this.resetTransmuxer(),this.levels=S.map(function(y){return new r.Level(y)})},A.onAudioTrackSwitching=function(T,d){var S=!!d.url;this.trackId=d.id;var y=this.fragCurrent;y!=null&&y.loader&&y.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),S?this.setInterval(E):this.resetTransmuxer(),S?(this.audioSwitch=!0,this.state=j.State.IDLE):this.state=j.State.STOPPED,this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},A.onLevelLoaded=function(T,d){this.mainDetails=d.details},A.onAudioTrackLoaded=function(T,d){var S,y=this.levels,b=d.details,B=d.id;if(!y){this.warn("Audio tracks were reset while loading level "+B);return}this.log("Track "+B+" loaded ["+b.startSN+","+b.endSN+"],duration:"+b.totalduration);var F=y[B],_=0;if(b.live||(S=F.details)!==null&&S!==void 0&&S.live){var M=this.mainDetails;if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed||!M)return;!F.details&&b.hasProgramDateTime&&M.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(b,M),_=b.fragments[0].start):_=this.alignPlaylists(b,F.details)}F.details=b,this.levelLastLoaded=B,!this.startFragRequested&&(this.mainDetails||!b.live)&&this.setStartPosition(F.details,_),this.state===j.State.WAITING_TRACK&&!this.waitForCdnTuneIn(b)&&(this.state=j.State.IDLE),this.tick()},A._handleFragmentLoadProgress=function(T){var d,S=T.frag,y=T.part,b=T.payload,B=this.config,F=this.trackId,_=this.levels;if(!_){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+S.sn+" of level "+S.level+" will not be buffered");return}var M=_[F];console.assert(M,"Audio track is defined on fragment load progress");var I=M.details;console.assert(I,"Audio track details are defined on fragment load progress");var g=B.defaultAudioCodec||M.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new p.default(this.hls,L.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[S.cc],ne=(d=S.initSegment)===null||d===void 0?void 0:d.data;if($!==void 0){var se=!1,Oe=y?y.index:-1,ge=Oe!==-1,Te=new h.ChunkMetadata(S.level,S.sn,S.stats.chunkCount,b.byteLength,Oe,ge);H.push(b,ne,g,"",S,y,I.totalduration,se,Te,$)}else{o.logger.log("Unknown video PTS for cc "+S.cc+", waiting for video PTS before demuxing audio frag "+S.sn+" of ["+I.startSN+" ,"+I.endSN+"],track "+F);var Re=this.waitingData=this.waitingData||{frag:S,part:y,cache:new m.default,complete:!1},Le=Re.cache;Le.push(new Uint8Array(b)),this.waitingVideoCC=this.videoTrackCC,this.state=j.State.WAITING_INIT_PTS}},A._handleFragmentLoadComplete=function(T){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,T)},A.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},A.onBufferCreated=function(T,d){var S=d.tracks.audio;S&&(this.mediaBuffer=S.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},A.onFragBuffered=function(T,d){var S=d.frag,y=d.part;if(S.type!==L.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(S)){this.warn("Fragment "+S.sn+(y?" p: "+y.index:"")+" of level "+S.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}S.sn!=="initSegment"&&(this.fragPrevious=S,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(S,y)},A.onError=function(T,d){switch(d.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(L.PlaylistLevelType.AUDIO,d);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==j.State.ERROR&&this.state!==j.State.STOPPED&&(this.state=d.fatal?j.State.ERROR:j.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===j.State.PARSING||this.state===j.State.PARSED)){var S=!0,y=this.getFwdBufferInfo(this.mediaBuffer,L.PlaylistLevelType.AUDIO);y&&y.len>.5&&(S=!this.reduceMaxBufferLength(y.len)),S&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},A.onBufferFlushed=function(T,d){var S=d.type;S===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},A._handleTransmuxComplete=function(T){var d,S="audio",y=this.hls,b=T.remuxResult,B=T.chunkMeta,F=this.getCurrentContext(B);if(!F){this.warn("The loading context changed while buffering fragment "+B.sn+" of level "+B.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(B.level);return}var _=F.frag,M=F.part,I=b.audio,g=b.text,H=b.id3,$=b.initSegment;if(this.fragContextChanged(_))return;if(this.state=j.State.PARSING,this.audioSwitch&&I&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,_,B),y.trigger(U.Events.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:S,tracks:$.tracks})),I){var ne=I.startPTS,se=I.endPTS,Oe=I.startDTS,ge=I.endDTS;M&&(M.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:ne,endPTS:se,startDTS:Oe,endDTS:ge}),_.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,ne,se,Oe,ge),this.bufferFragmentData(I,_,M,B)}if(H!=null&&(d=H.samples)!==null&&d!==void 0&&d.length){var Te=s({frag:_,id:S},H);y.trigger(U.Events.FRAG_PARSING_METADATA,Te)}if(g){var Re=s({frag:_,id:S},g);y.trigger(U.Events.FRAG_PARSING_USERDATA,Re)}},A._bufferInitSegment=function(T,d,S){if(this.state!==j.State.PARSING)return;T.video&&delete T.video;var y=T.audio;if(!y)return;y.levelCodec=y.codec,y.id="audio",this.log("Init audio buffer, container:"+y.container+", codecs[parsed]=["+y.codec+"]"),this.hls.trigger(U.Events.BUFFER_CODECS,T);var b=y.initSegment;if(b!=null&&b.byteLength){var B={type:"audio",frag:d,part:null,chunkMeta:S,parent:d.type,data:b};this.hls.trigger(U.Events.BUFFER_APPENDING,B)}this.tick()},A.loadFragment=function(T,d,S){var y=this.fragmentTracker.getState(T);this.fragCurrent=T,(this.audioSwitch||y===G.FragmentState.NOT_LOADED||y===G.FragmentState.PARTIAL)&&(T.sn==="initSegment"?this._loadInitSegment(T):d.live&&!Object(X.isFiniteNumber)(this.initPTS[T.cc])?(this.log("Waiting for video PTS in continuity counter "+T.cc+" of live stream before loading audio fragment "+T.sn+" of level "+this.trackId),this.state=j.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,T,d,S)))},A.completeAudioSwitch=function(){var T=this.hls,d=this.media,S=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,T.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:S})},R}(j.default);J.default=w},"./src/controller/audio-track-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/controller/base-playlist-controller.ts"),K=P("./src/types/loader.ts");function G(p,h){for(var u=0;u=o.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=o[this.trackId];this.log("Now switching to audio-track index "+l);var a=o[l],O=a.id,E=a.groupId,w=E===void 0?"":E,D=a.name,R=a.type,A=a.url;if(this.trackId=l,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(X.Events.AUDIO_TRACK_SWITCHING,{id:O,groupId:w,name:D,type:R,url:A}),a.details&&!a.details.live)return;var C=this.switchParams(a.url,s==null?void 0:s.details);this.loadPlaylist(C)},u.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var o=this.trackName,s=this.findTrackId(o)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},u.findTrackId=function(l){for(var o=this.tracksInGroup,s=0;sh.partTarget&&(a+=1)}if(Object(X.isFiniteNumber)(s))return new j.HlsUrlParameters(s,Object(X.isFiniteNumber)(a)?a:void 0,j.HlsSkip.No)}}},v.loadPlaylist=function(p){},v.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},v.playlistLoaded=function(p,h,u){var f=this,l=h.details,o=h.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||u!=null&&u.live){if(l.reloaded(u),u&&this.log("live playlist "+p+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),u&&l.fragments.length>0&&Object(U.mergeDetails)(u,l),!this.canLoad||!l.live)return;var a,O=void 0,E=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var w=this.hls.config.lowLatencyMode,D=l.lastPartSn,R=l.endSN,A=l.lastPartIndex,C=A!==-1,T=D===R,d=w?0:A;C?(O=T?R+1:D,E=T?d:A+1):O=R+1;var S=l.age,y=S+l.ageHeader,b=Math.min(y-l.partTarget,l.targetduration*1.5);if(b>0){if(u&&b>u.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+u.tuneInGoal+" to: "+b+" with playlist age: "+l.age),b=0;else{var B=Math.floor(b/l.targetduration);if(O+=B,E!==void 0){var F=Math.round(b%l.targetduration/l.partTarget);E+=F}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+S.toFixed(2)+"s goal: "+b+" skip sn "+B+" to part "+E)}l.tuneInGoal=b}if(a=this.getDeliveryDirectives(l,h.deliveryDirectives,O,E),w||!T){this.loadPlaylist(a);return}}else a=this.getDeliveryDirectives(l,h.deliveryDirectives,O,E);var _=Object(U.computeReloadInterval)(l,o);O!==void 0&&l.canBlockReload&&(_-=l.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(_)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(a)},_)}else this.clearTimer()},v.getDeliveryDirectives=function(p,h,u,f){var l=Object(j.getSkipValue)(p,u);return h!=null&&h.skip&&p.deltaUpdateFailed&&(u=h.msn,f=h.part,l=j.HlsSkip.No),new j.HlsUrlParameters(u,f,l)},v.retryLoadingOrFail=function(p){var h=this,u=this.hls.config,f=this.retryCount-1&&(l=p.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return h.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return f},L}()},"./src/controller/base-stream-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"State",function(){return R}),P.d(J,"default",function(){return A});var X=P("./src/polyfills/number.ts"),j=P("./src/task-loop.ts"),U=P("./src/controller/fragment-tracker.ts"),K=P("./src/utils/buffer-helper.ts"),G=P("./src/utils/logger.ts"),r=P("./src/events.ts"),L=P("./src/errors.ts"),v=P("./src/types/transmuxer.ts"),m=P("./src/utils/mp4-tools.ts"),p=P("./src/utils/discontinuities.ts"),h=P("./src/controller/fragment-finders.ts"),u=P("./src/controller/level-helper.ts"),f=P("./src/loader/fragment-loader.ts"),l=P("./src/crypt/decrypter.ts"),o=P("./src/utils/time-ranges.ts"),s=P("./src/types/loader.ts");function a(C,T){for(var d=0;d$;(M0&&M&&M.key&&M.iv&&M.method==="AES-128"){var I=self.performance.now();return b.decrypter.webCryptoDecrypt(new Uint8Array(_),M.key.buffer,M.iv.buffer).then(function(g){var H=self.performance.now();return F.trigger(r.Events.FRAG_DECRYPTED,{frag:y,payload:g,stats:{tstart:I,tdecrypt:H}}),B.payload=g,B})}return B}).then(function(B){var F=b.fragCurrent,_=b.hls,M=b.levels;if(!M)throw new Error("init load aborted, missing levels");var I=M[y.level].details;console.assert(I,"Level details are defined when init segment is loaded");var g=y.stats;b.state=R.IDLE,b.fragLoadError=0,y.data=new Uint8Array(B.payload),g.parsing.start=g.buffering.start=self.performance.now(),g.parsing.end=g.buffering.end=self.performance.now(),B.frag===F&&_.trigger(r.Events.FRAG_BUFFERED,{stats:g,frag:F,part:null,id:y.type}),b.tick()}).catch(function(B){b.warn(B),b.resetFragmentLoading(y)})},d.fragContextChanged=function(y){var b=this.fragCurrent;return!y||!b||y.level!==b.level||y.sn!==b.sn||y.urlId!==b.urlId},d.fragBufferedComplete=function(y,b){var B=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(b?" part: "+b.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" "+o.default.toString(K.BufferHelper.getBuffered(B))),this.state=R.IDLE,this.tick()},d._handleFragmentLoadComplete=function(y){var b=this.transmuxer;if(!b)return;var B=y.frag,F=y.part,_=y.partsLoaded,M=!_||_.length===0||_.some(function(g){return!g}),I=new v.ChunkMetadata(B.level,B.sn,B.stats.chunkCount+1,0,F?F.index:-1,!M);b.flush(I)},d._handleFragmentLoadProgress=function(y){},d._doFragLoad=function(y,b,B,F){var _=this;if(B===void 0&&(B=null),!this.levels)throw new Error("frag load aborted, missing levels");if(B=Math.max(y.start,B||0),this.config.lowLatencyMode&&b){var M=b.partList;if(M&&F){B>y.end&&b.fragmentHint&&(y=b.fragmentHint);var I=this.getNextPart(M,y,B);if(I>-1){var g=M[I];return this.log("Loading part sn: "+y.sn+" p: "+g.index+" cc: "+y.cc+" of playlist ["+b.startSN+"-"+b.endSN+"] parts [0-"+I+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(B.toFixed(3))),this.nextLoadPosition=g.start+g.duration,this.state=R.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:y,part:M[I],targetBufferTime:B}),this.doFragPartsLoad(y,M,I,F).catch(function(H){return _.handleFragLoadError(H)})}else if(!y.url||this.loadedEndOfParts(M,B))return Promise.resolve(null)}}return this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(b?"of ["+b.startSN+"-"+b.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(B.toFixed(3))),Object(X.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=R.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:y,targetBufferTime:B}),this.fragmentLoader.load(y,F).catch(function(H){return _.handleFragLoadError(H)})},d.doFragPartsLoad=function(y,b,B,F){var _=this;return new Promise(function(M,I){var g=[],H=function $(ne){var se=b[ne];_.fragmentLoader.loadPart(y,se,F).then(function(Oe){g[se.index]=Oe;var ge=Oe.part;_.hls.trigger(r.Events.FRAG_LOADED,Oe);var Te=b[ne+1];if(Te&&Te.fragment===y)$(ne+1);else return M({frag:y,part:ge,partsLoaded:g})}).catch(I)};H(B)})},d.handleFragLoadError=function(y){var b=y.data;return b&&b.details===L.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(b.frag,b.part):this.hls.trigger(r.Events.ERROR,b),null},d._handleTransmuxerFlush=function(y){var b=this.getCurrentContext(y);if(!b||this.state!==R.PARSING){this.fragCurrent||(this.state=R.IDLE);return}var B=b.frag,F=b.part,_=b.level,M=self.performance.now();B.stats.parsing.end=M,F&&(F.stats.parsing.end=M),this.updateLevelTiming(B,F,_,y.partial)},d.getCurrentContext=function(y){var b=this.levels,B=y.level,F=y.sn,_=y.part;if(!b||!b[B])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+B+". The current chunk will not be buffered."),null;var M=b[B],I=_>-1?Object(u.getPartWith)(M,F,_):null,g=I?I.fragment:Object(u.getFragmentWithSN)(M,F,this.fragCurrent);return g?{frag:g,part:I,level:M}:null},d.bufferFragmentData=function(y,b,B,F){if(!y||this.state!==R.PARSING)return;var _=y.data1,M=y.data2,I=_;if(_&&M&&(I=Object(m.appendUint8Array)(_,M)),!I||!I.length)return;var g={type:y.type,frag:b,part:B,chunkMeta:F,parent:b.type,data:I};this.hls.trigger(r.Events.BUFFER_APPENDING,g),y.dropped&&y.independent&&!B&&this.flushBufferGap(b)},d.flushBufferGap=function(y){var b=this.media;if(!b)return;if(!K.BufferHelper.isBuffered(b,b.currentTime)){this.flushMainBuffer(0,y.start);return}var B=b.currentTime,F=K.BufferHelper.bufferInfo(b,B,0),_=y.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,_*.25),I=Math.max(Math.min(y.start-M,F.end-M),B+M);y.start-I>M&&this.flushMainBuffer(I,y.start)},d.getFwdBufferInfo=function(y,b){var B=this.config,F=this.getLoadPosition();if(!Object(X.isFiniteNumber)(F))return null;var _=K.BufferHelper.bufferInfo(y,F,B.maxBufferHole);if(_.len===0&&_.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(F,b);if(M&&_.nextStart=B?(b.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+b.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(y,b){var B,F,_=b.fragments,M=_.length;if(!M)return null;var I=this.config,g=_[0].start,H;if(b.live){var $=I.initialLiveManifestSize;if(M<$)return this.warn("Not enough fragments to start playback (have: "+M+", need: "+$+")"),null;!b.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(H=this.getInitialLiveFragment(b,_),this.startPosition=H?this.hls.liveSyncPosition||H.start:y)}else y<=g&&(H=_[0]);if(!H){var ne=I.lowLatencyMode?b.partEnd:b.fragmentEnd;H=this.getFragmentAtPosition(y,ne,b)}return(B=H)!==null&&B!==void 0&&B.initSegment&&!((F=H)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(H=H.initSegment),H},d.getNextPart=function(y,b,B){for(var F=-1,_=!1,M=!0,I=0,g=y.length;I-1&&BB.start&&B.loaded},d.getInitialLiveFragment=function(y,b){var B=this.fragPrevious,F=null;if(B){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+B.programDateTime),F=Object(h.findFragmentByPDT)(b,B.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var _=B.sn+1;if(_>=y.startSN&&_<=y.endSN){var M=b[_-y.startSN];B.cc===M.cc&&(F=M,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(h.findFragWithCC)(b,B.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var I=this.hls.liveSyncPosition;I!==null&&(F=this.getFragmentAtPosition(I,this.bitrateTest?y.fragmentEnd:y.edge,y))}return F},d.getFragmentAtPosition=function(y,b,B){var F=this.config,_=this.fragPrevious,M=B.fragments,I=B.endSN,g=B.fragmentHint,H=F.maxFragLookUpTolerance,$=!!(F.lowLatencyMode&&B.partList&&g);$&&g&&!this.bitrateTest&&(M=M.concat(g),I=g.sn);var ne;if(yb-H?0:H;ne=Object(h.findFragmentByPTS)(_,M,y,se)}else ne=M[M.length-1];if(ne){var Oe=ne.sn-B.startSN,ge=_&&ne.level===_.level,Te=M[Oe+1],Re=this.fragmentTracker.getState(ne);if(Re===U.FragmentState.BACKTRACKED){ne=null;for(var Le=Oe;M[Le]&&this.fragmentTracker.getState(M[Le])===U.FragmentState.BACKTRACKED;)_?ne=M[Le--]:ne=M[--Le];ne||(ne=Te)}else _&&ne.sn===_.sn&&!$&&(ge&&(ne.sn=M-b.maxFragLookUpTolerance&&_<=I;if(F!==null&&B.duration>F&&(_"+y.startSN+" prev-sn: "+(_?_.sn:"na")+" fragments: "+I),ne}return g},d.waitForCdnTuneIn=function(y){var b=3;return y.live&&y.canBlockReload&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*b)},d.setStartPosition=function(y,b){var B=this.startPosition;if(B"+y))}}]),T}(j.default)},"./src/controller/buffer-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./src/polyfills/number.ts"),j=P("./src/events.ts"),U=P("./src/utils/logger.ts"),K=P("./src/errors.ts"),G=P("./src/utils/buffer-helper.ts"),r=P("./src/utils/mediasource-helper.ts"),L=P("./src/loader/fragment.ts"),v=P("./src/controller/buffer-operation-queue.ts"),m=Object(r.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function u(l){var o=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=o.hls,a=o.media,O=o.mediaSource;U.logger.log("[buffer-controller]: Media source opened"),a&&(o.updateMediaElementDuration(),s.trigger(j.Events.MEDIA_ATTACHED,{media:a})),O&&O.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},this._onMediaSourceClose=function(){U.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){U.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var f=u.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var o=this.hls;o.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(j.Events.BUFFER_RESET,this.onBufferReset,this),o.on(j.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.on(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(j.Events.BUFFER_EOS,this.onBufferEos,this),o.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.on(j.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.on(j.Events.FRAG_PARSED,this.onFragParsed,this),o.on(j.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var o=this.hls;o.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(j.Events.BUFFER_RESET,this.onBufferReset,this),o.off(j.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.off(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(j.Events.BUFFER_EOS,this.onBufferEos,this),o.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.off(j.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.off(j.Events.FRAG_PARSED,this.onFragParsed,this),o.off(j.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(o,s){var a=2;(s.audio&&!s.video||!s.altAudio)&&(a=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=a,this.details=null,U.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o,s){var a=this.media=s.media;if(a&&m){var O=this.mediaSource=new m;O.addEventListener("sourceopen",this._onMediaSourceOpen),O.addEventListener("sourceended",this._onMediaSourceEnded),O.addEventListener("sourceclose",this._onMediaSourceClose),a.src=self.URL.createObjectURL(O),this._objectUrl=a.src}},f.onMediaDetaching=function(){var o=this.media,s=this.mediaSource,a=this._objectUrl;if(s){if(U.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(O){U.logger.warn("[buffer-controller]: onMediaDetaching: "+O.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),o&&(a&&self.URL.revokeObjectURL(a),o.src===a?(o.removeAttribute("src"),o.load()):U.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(j.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var o=this;this.getSourceBufferTypes().forEach(function(s){var a=o.sourceBuffer[s];try{a&&(o.removeBufferListeners(s),o.mediaSource&&o.mediaSource.removeSourceBuffer(a),o.sourceBuffer[s]=void 0)}catch(O){U.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",O)}}),this._initSourceBuffer()},f.onBufferCodecs=function(o,s){var a=this,O=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(E){if(O){var w=a.tracks[E];if(w&&typeof w.buffer.changeType=="function"){var D=s[E],R=D.codec,A=D.levelCodec,C=D.container,T=(w.levelCodec||w.codec).replace(p,"$1"),d=(A||R).replace(p,"$1");if(T!==d){var S=C+";codecs="+(A||R);a.appendChangeType(E,S)}}}else a.pendingTracks[E]=s[E]}),O)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(o,s){var a=this,O=this.operationQueue,E={execute:function(){var D=a.sourceBuffer[o];D&&(U.logger.log("[buffer-controller]: changing "+o+" sourceBuffer type to "+s),D.changeType(s)),O.shiftAndExecuteNext(o)},onStart:function(){},onComplete:function(){},onError:function(D){U.logger.warn("[buffer-controller]: Failed to change "+o+" SourceBuffer type",D)}};O.append(E,o)},f.onBufferAppending=function(o,s){var a=this,O=this.hls,E=this.operationQueue,w=this.tracks,D=s.data,R=s.type,A=s.frag,C=s.part,T=s.chunkMeta,d=T.buffering[R],S=self.performance.now();d.start=S;var y=A.stats.buffering,b=C?C.stats.buffering:null;y.start===0&&(y.start=S),b&&b.start===0&&(b.start=S);var B=w.audio,F=R==="audio"&&T.id===1&&(B==null?void 0:B.container)==="audio/mpeg",_={execute:function(){if(d.executeStart=self.performance.now(),F){var I=a.sourceBuffer[R];if(I){var g=A.start-I.timestampOffset;Math.abs(g)>=.1&&(U.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+A.start+" (delta: "+g+") sn: "+A.sn+")"),I.timestampOffset=A.start)}}a.appendExecutor(D,R)},onStart:function(){},onComplete:function(){var I=self.performance.now();d.executeEnd=d.end=I,y.first===0&&(y.first=I),b&&b.first===0&&(b.first=I);var g=a.sourceBuffer,H={};for(var $ in g)H[$]=G.BufferHelper.getBuffered(g[$]);a.appendError=0,a.hls.trigger(j.Events.BUFFER_APPENDED,{type:R,frag:A,part:C,chunkMeta:T,parent:A.type,timeRanges:H})},onError:function(I){U.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",I);var g={type:K.ErrorTypes.MEDIA_ERROR,parent:A.type,details:K.ErrorDetails.BUFFER_APPEND_ERROR,err:I,fatal:!1};I.code===DOMException.QUOTA_EXCEEDED_ERR?g.details=K.ErrorDetails.BUFFER_FULL_ERROR:(a.appendError++,g.details=K.ErrorDetails.BUFFER_APPEND_ERROR,a.appendError>O.config.appendErrorMaxRetry&&(U.logger.error("[buffer-controller]: Failed "+O.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),g.fatal=!0)),O.trigger(j.Events.ERROR,g)}};E.append(_,R)},f.onBufferFlushing=function(o,s){var a=this,O=this.operationQueue,E=function(D){return{execute:a.removeExecutor.bind(a,D,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){a.hls.trigger(j.Events.BUFFER_FLUSHED,{type:D})},onError:function(A){U.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",A)}}};s.type?O.append(E(s.type),s.type):this.getSourceBufferTypes().forEach(function(w){O.append(E(w),w)})},f.onFragParsed=function(o,s){var a=this,O=s.frag,E=s.part,w=[],D=E?E.elementaryStreams:O.elementaryStreams;D[L.ElementaryStreamTypes.AUDIOVIDEO]?w.push("audiovideo"):(D[L.ElementaryStreamTypes.AUDIO]&&w.push("audio"),D[L.ElementaryStreamTypes.VIDEO]&&w.push("video"));var R=function(){var C=self.performance.now();O.stats.buffering.end=C,E&&(E.stats.buffering.end=C);var T=E?E.stats:O.stats;a.hls.trigger(j.Events.FRAG_BUFFERED,{frag:O,part:E,stats:T,id:O.type})};w.length===0&&U.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+O.type+" level: "+O.level+" sn: "+O.sn),this.blockBuffers(R,w)},f.onFragChanged=function(o,s){this.flushBackBuffer()},f.onBufferEos=function(o,s){var a=this,O=this.getSourceBufferTypes().reduce(function(E,w){var D=a.sourceBuffer[w];return(!s.type||s.type===w)&&(D&&!D.ended&&(D.ended=!0,U.logger.log("[buffer-controller]: "+w+" sourceBuffer now EOS"))),E&&!!(!D||D.ended)},!0);O&&this.blockBuffers(function(){var E=a.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},f.onLevelUpdated=function(o,s){var a=s.details;if(!a.fragments.length)return;this.details=a,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var o=this.hls,s=this.details,a=this.media,O=this.sourceBuffer;if(!a||s===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var w=s.live&&o.config.liveBackBufferLength!==null?o.config.liveBackBufferLength:o.config.backBufferLength;if(!Object(X.isFiniteNumber)(w)||w<0)return;var D=a.currentTime,R=s.levelTargetDuration,A=Math.max(w,R),C=Math.floor(D/R)*R-A;E.forEach(function(T){var d=O[T];if(d){var S=G.BufferHelper.getBuffered(d);S.length>0&&C>S.start(0)&&(o.trigger(j.Events.BACK_BUFFER_REACHED,{bufferEnd:C}),s.live&&o.trigger(j.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C}),o.trigger(j.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:C,type:T}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var o=this.details,s=this.hls,a=this.media,O=this.mediaSource,E=o.fragments[0].start+o.totalduration,w=a.duration,D=Object(X.isFiniteNumber)(O.duration)?O.duration:0;o.live&&s.config.liveDurationInfinity?(U.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),O.duration=Infinity,this.updateSeekableRange(o)):(E>D&&E>w||!Object(X.isFiniteNumber)(w))&&(U.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),O.duration=E)},f.updateSeekableRange=function(o){var s=this.mediaSource,a=o.fragments,O=a.length;if(O&&o.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var E=Math.max(0,a[0].start),w=Math.max(E,E+o.totalduration);s.setLiveSeekableRange(E,w)}},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,s=this.operationQueue,a=this.pendingTracks,O=Object.keys(a).length;if(O&&!o||O===2){this.createSourceBuffers(a),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(w){s.executeNext(w)})}},f.createSourceBuffers=function(o){var s=this.sourceBuffer,a=this.mediaSource;if(!a)throw Error("createSourceBuffers called when mediaSource was null");var O=0;for(var E in o)if(!s[E]){var w=o[E];if(!w)throw Error("source buffer exists for track "+E+", however track does not");var D=w.levelCodec||w.codec,R=w.container+";codecs="+D;U.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var A=s[E]=a.addSourceBuffer(R),C=E;this.addBufferListener(C,"updatestart",this._onSBUpdateStart),this.addBufferListener(C,"updateend",this._onSBUpdateEnd),this.addBufferListener(C,"error",this._onSBUpdateError),this.tracks[E]={buffer:A,codec:D,container:w.container,levelCodec:w.levelCodec,id:w.id},O++}catch(T){U.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+T.message),this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:T,mimeType:R})}}O&&this.hls.trigger(j.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(o){var s=this.operationQueue,a=s.current(o);a.onStart()},f._onSBUpdateEnd=function(o){var s=this.operationQueue,a=s.current(o);a.onComplete(),s.shiftAndExecuteNext(o)},f._onSBUpdateError=function(o,s){U.logger.error("[buffer-controller]: "+o+" SourceBuffer error",s),this.hls.trigger(j.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var a=this.operationQueue.current(o);a&&a.onError(s)},f.removeExecutor=function(o,s,a){var O=this.media,E=this.mediaSource,w=this.operationQueue,D=this.sourceBuffer,R=D[o];if(!O||!E||!R){U.logger.warn("[buffer-controller]: Attempting to remove from the "+o+" SourceBuffer, but it does not exist"),w.shiftAndExecuteNext(o);return}var A=Object(X.isFiniteNumber)(O.duration)?O.duration:Infinity,C=Object(X.isFiniteNumber)(E.duration)?E.duration:Infinity,T=Math.max(0,s),d=Math.min(a,A,C);d>T?(U.logger.log("[buffer-controller]: Removing ["+T+","+d+"] from the "+o+" SourceBuffer"),console.assert(!R.updating,o+" sourceBuffer must not be updating"),R.remove(T,d)):w.shiftAndExecuteNext(o)},f.appendExecutor=function(o,s){var a=this.operationQueue,O=this.sourceBuffer,E=O[s];if(!E){U.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(s);return}E.ended=!1,console.assert(!E.updating,s+" sourceBuffer must not be updating"),E.appendBuffer(o)},f.blockBuffers=function(o,s){var a=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){U.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(o);return}var O=this.operationQueue,E=s.map(function(w){return O.appendBlocker(w)});Promise.all(E).then(function(){o(),s.forEach(function(w){var D=a.sourceBuffer[w];(!D||!D.updating)&&O.shiftAndExecuteNext(w)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(o,s,a){var O=this.sourceBuffer[o];if(!O)return;var E=a.bind(this,o);this.listeners[o].push({event:s,listener:E}),O.addEventListener(s,E)},f.removeBufferListeners=function(o){var s=this.sourceBuffer[o];if(!s)return;this.listeners[o].forEach(function(a){s.removeEventListener(a.event,a.listener)})},u}()},"./src/controller/buffer-operation-queue.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return j});var X=P("./src/utils/logger.ts"),j=function(){function U(G){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=G}var K=U.prototype;return K.append=function(r,L){var v=this.queues[L];v.push(r),v.length===1&&this.buffers[L]&&this.executeNext(L)},K.insertAbort=function(r,L){var v=this.queues[L];v.unshift(r),this.executeNext(L)},K.appendBlocker=function(r){var L,v=new Promise(function(p){L=p}),m={execute:L,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,r),v},K.executeNext=function(r){var L=this.buffers,v=this.queues,m=L[r],p=v[r];if(p.length){var h=p[0];try{h.execute()}catch(u){X.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),h.onError(u),(!m||!m.updating)&&(p.shift(),this.executeNext(r))}}},K.shiftAndExecuteNext=function(r){this.queues[r].shift(),this.executeNext(r)},K.current=function(r){return this.queues[r][0]},U}()},"./src/controller/cap-level-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts");function j(G,r){for(var L=0;L0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(v.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},r.getMaxLevel=function(v){var m=this,p=this.hls.levels;if(!p.length)return-1;var h=p.filter(function(u,f){return G.isLevelAllowed(f,m.restrictedLevels)&&f<=v});return this.clientRect=null,G.getMaxLevelByMediaSize(h,this.mediaWidth,this.mediaHeight)},r.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},r.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},r.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,m={width:0,height:0};if(v){var p=v.getBoundingClientRect();m.width=p.width,m.height=p.height,!m.width&&!m.height&&(m.width=p.right-p.left||v.width||0,m.height=p.bottom-p.top||v.height||0)}return this.clientRect=m,m},G.isLevelAllowed=function(v,m){return m===void 0&&(m=[]),m.indexOf(v)===-1},G.getMaxLevelByMediaSize=function(v,m,p){if(!v||!v.length)return-1;for(var h=function(s,a){return a?s.width!==a.width||s.height!==a.height:!0},u=v.length-1,f=0;f=m||l.height>=p)&&h(l,v[f+1])){u=f;break}}return u},U(G,[{key:"mediaWidth",get:function(){return this.getDimensions().width*G.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*G.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(m){}return v}}]),G}();J.default=K},"./src/controller/cmcd-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./src/events.ts"),j=P("./src/types/cmcd.ts"),U=P("./src/utils/buffer-helper.ts"),K=P("./src/utils/logger.ts");function G(u,f){for(var l=0;l=u.length?{done:!0}:{done:!1,value:u[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(u,f){if(!u)return;if(typeof u=="string")return m(u,f);var l=Object.prototype.toString.call(u).slice(8,-1);if(l==="Object"&&u.constructor&&(l=u.constructor.name),l==="Map"||l==="Set")return Array.from(u);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return m(u,f)}function m(u,f){(f==null||f>u.length)&&(f=u.length);for(var l=0,o=new Array(f);ls&&(s=w.bitrate)}return s>0?s:NaN},f.getBufferLength=function(o){var s=this.hls.media,a=o===j.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!a||!s)return NaN;var O=U.BufferHelper.bufferInfo(a,s.currentTime,this.config.maxBufferHole);return O.len*1e3},f.createPlaylistLoader=function(){var o=this.config.pLoader,s=this.applyPlaylistData,a=o||this.config.loader;return function(){function O(w){this.loader=void 0,this.loader=new a(w)}var E=O.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,R,A){s(D),this.loader.load(D,R,A)},r(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},f.createFragmentLoader=function(){var o=this.config.fLoader,s=this.applyFragmentData,a=o||this.config.loader;return function(){function O(w){this.loader=void 0,this.loader=new a(w)}var E=O.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,R,A){s(D),this.loader.load(D,R,A)},r(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},u.uuid=function(){var o=URL.createObjectURL(new Blob),s=o.toString();return URL.revokeObjectURL(o),s.substr(s.lastIndexOf("/")+1)},u.serialize=function(o){for(var s=[],a=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},O=function(F){return Math.round(F)},E=function(F){return O(F/100)*100},w=function(F){return encodeURIComponent(F)},D={br:O,d:O,bl:E,dl:E,mtp:E,nor:w,rtp:E,tb:O},R=Object.keys(o||{}).sort(),A=L(R),C;!(C=A()).done;){var T=C.value,d=o[T];if(!a(d))continue;if(T==="v"&&d===1)continue;if(T=="pr"&&d===1)continue;var S=D[T];S&&(d=S(d));var y=typeof d,b=void 0;T==="ot"||T==="sf"||T==="st"?b=T+"="+d:y==="boolean"?b=T:y==="number"?b=T+"="+d:b=T+"="+JSON.stringify(d),s.push(b)}return s.join(",")},u.toHeaders=function(o){for(var s=Object.keys(o),a={},O=["Object","Request","Session","Status"],E=[{},{},{},{}],w={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},D=0,R=s;DL){this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var w=L-this._requestLicenseFailureCount+1;U.logger.warn("Retrying license request, "+w+" attempts left"),this._requestLicense(s,a)}break}},u._generateLicenseRequestChallenge=function(l,o){switch(l.mediaKeySystemDomain){case K.KeySystems.WIDEVINE:return o}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},u._requestLicense=function(l,o){U.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){U.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var a=this.getLicenseServerUrl(s.mediaKeySystemDomain),O=this._createLicenseXhr(a,l,o);U.logger.log("Sending license request to URL: "+a);var E=this._generateLicenseRequestChallenge(s,l);O.send(E)}catch(w){U.logger.error("Failure requesting DRM license: "+w),this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.KEY_SYSTEM_ERROR,details:j.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},u.onMediaAttached=function(l,o){if(!this._emeEnabled)return;var s=o.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},u.onMediaDetached=function(){var l=this._media,o=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(o.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},u.onManifestParsed=function(l,o){if(!this._emeEnabled)return;var s=o.levels.map(function(O){return O.audioCodec}).filter(function(O){return!!O}),a=o.levels.map(function(O){return O.videoCodec}).filter(function(O){return!!O});this._attemptKeySystemAccess(K.KeySystems.WIDEVINE,s,a)},r(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}();J.default=p},"./src/controller/fps-controller.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/events.ts"),j=P("./src/utils/logger.ts"),U=function(){function K(r){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=r,this.registerListeners()}var G=K.prototype;return G.setStreamController=function(L){this.streamController=L},G.registerListeners=function(){this.hls.on(X.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},G.unregisterListeners=function(){this.hls.off(X.Events.MEDIA_ATTACHING,this.onMediaAttaching)},G.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},G.onMediaAttaching=function(L,v){var m=this.hls.config;if(m.capLevelOnFPSDrop){var p=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},G.checkFPS=function(L,v,m){var p=performance.now();if(v){if(this.lastTime){var h=p-this.lastTime,u=m-this.lastDroppedFrames,f=v-this.lastDecodedFrames,l=1e3*u/h,o=this.hls;if(o.trigger(X.Events.FPS_DROP,{currentDropped:u,currentDecoded:f,totalDroppedFrames:m}),l>0&&u>o.config.fpsDroppedMonitoringThreshold*f){var s=o.currentLevel;j.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=s)&&(s=s-1,o.trigger(X.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:o.currentLevel}),o.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=m,this.lastDecodedFrames=v}},G.checkFPSInterval=function(){var L=this.media;if(L)if(this.isVideoPlaybackQualityAvailable){var v=L.getVideoPlaybackQuality();this.checkFPS(L,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(L,L.webkitDecodedFrameCount,L.webkitDroppedFrameCount)},K}();J.default=U},"./src/controller/fragment-finders.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"findFragmentByPDT",function(){return U}),P.d(J,"findFragmentByPTS",function(){return K}),P.d(J,"fragmentWithinToleranceTest",function(){return G}),P.d(J,"pdtWithinToleranceTest",function(){return r}),P.d(J,"findFragWithCC",function(){return L});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/binary-search.ts");function U(v,m,p){if(m===null||!Array.isArray(v)||!v.length||!Object(X.isFiniteNumber)(m))return null;var h=v[0].programDateTime;if(m<(h||0))return null;var u=v[v.length-1].endProgramDateTime;if(m>=(u||0))return null;p=p||0;for(var f=0;fv&&p.start?-1:0}function r(v,m,p){var h=Math.min(m,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,u=p.endProgramDateTime||0;return u-h>v}function L(v,m){return j.default.search(v,function(p){return p.ccm?-1:0})}},"./src/controller/fragment-tracker.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"FragmentState",function(){return U}),P.d(J,"FragmentTracker",function(){return K});var X=P("./src/events.ts"),j=P("./src/types/loader.ts"),U;(function(L){L.NOT_LOADED="NOT_LOADED",L.BACKTRACKED="BACKTRACKED",L.APPENDING="APPENDING",L.PARTIAL="PARTIAL",L.OK="OK"})(U||(U={}));var K=function(){function L(m){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=m,this._registerListeners()}var v=L.prototype;return v._registerListeners=function(){var p=this.hls;p.on(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(X.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var p=this.hls;p.off(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(X.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(p,h){if(h===j.PlaylistLevelType.MAIN){var u=this.activeFragment,f=this.activeParts;if(!u)return null;if(f)for(var l=f.length;l--;){var o=f[l],s=o?o.end:u.appendedPTS;if(o.start<=p&&s!==void 0&&p<=s)return l>9&&(this.activeParts=f.slice(l-9)),o}else if(u.start<=p&&u.appendedPTS!==void 0&&p<=u.appendedPTS)return u}return this.getBufferedFrag(p,h)},v.getBufferedFrag=function(p,h){for(var u=this.fragments,f=Object.keys(u),l=f.length;l--;){var o=u[f[l]];if((o==null?void 0:o.body.type)===h&&o.buffered){var s=o.body;if(s.start<=p&&p<=s.end)return s}}return null},v.detectEvictedFragments=function(p,h,u){var f=this;Object.keys(this.fragments).forEach(function(l){var o=f.fragments[l];if(!o)return;if(!o.buffered){o.body.type===u&&f.removeFragment(o.body);return}var s=o.range[p];if(!s)return;s.time.some(function(a){var O=!f.isTimeBuffered(a.startPTS,a.endPTS,h);return O&&f.removeFragment(o.body),O})})},v.detectPartialFragments=function(p){var h=this,u=this.timeRanges,f=p.frag,l=p.part;if(!u||f.sn==="initSegment")return;var o=r(f),s=this.fragments[o];if(!s)return;Object.keys(u).forEach(function(a){var O=f.elementaryStreams[a];if(!O)return;var E=u[a],w=l!==null||O.partial===!0;s.range[a]=h.getBufferedTimes(f,l,w,E)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},v.fragBuffered=function(p){var h=r(p),u=this.fragments[h];u&&(u.backtrack=u.loaded=null,u.buffered=!0)},v.getBufferedTimes=function(p,h,u,f){for(var l={time:[],partial:u},o=h?h.start:p.start,s=h?h.end:p.end,a=p.minEndPTS||s,O=p.maxStartPTS||o,E=0;E=w&&a<=D){l.time.push({startPTS:Math.max(o,f.start(E)),endPTS:Math.min(s,f.end(E))});break}else if(ow)l.partial=!0,l.time.push({startPTS:Math.max(o,f.start(E)),endPTS:Math.min(s,f.end(E))});else if(s<=w)break}return l},v.getPartialFragment=function(p){var h=null,u,f,l,o=0,s=this.bufferPadding,a=this.fragments;return Object.keys(a).forEach(function(O){var E=a[O];if(!E)return;G(E)&&(f=E.body.start-s,l=E.body.end+s,p>=f&&p<=l&&(u=Math.min(p-f,l-p),o<=u&&(h=E.body,o=u)))}),h},v.getState=function(p){var h=r(p),u=this.fragments[h];return u?u.buffered?G(u)?U.PARTIAL:U.OK:u.backtrack?U.BACKTRACKED:U.APPENDING:U.NOT_LOADED},v.backtrack=function(p,h){var u=r(p),f=this.fragments[u];if(!f||f.backtrack)return null;var l=f.backtrack=h||f.loaded;return f.loaded=null,l},v.getBacktrackData=function(p){var h=r(p),u=this.fragments[h];if(u){var f,l=u.backtrack;if(l!=null&&(f=l.payload)!==null&&f!==void 0&&f.byteLength)return l;this.removeFragment(p)}return null},v.isTimeBuffered=function(p,h,u){for(var f,l,o=0;o=f&&h<=l)return!0;if(h<=f)return!1}return!1},v.onFragLoaded=function(p,h){var u=h.frag,f=h.part;if(u.sn==="initSegment"||u.bitrateTest||f)return;var l=r(u);this.fragments[l]={body:u,loaded:h,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(p,h){var u=this,f=h.frag,l=h.part,o=h.timeRanges;if(f.type===j.PlaylistLevelType.MAIN)if(this.activeFragment=f,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach(function(a){var O=o[a];if(u.detectEvictedFragments(a,O),!l)for(var E=0;Ep&&f.removeFragment(s)}})},v.removeFragment=function(p){var h=r(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[h]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},L}();function G(L){var v,m;return L.buffered&&(((v=L.range.video)===null||v===void 0?void 0:v.partial)||((m=L.range.audio)===null||m===void 0?void 0:m.partial))}function r(L){return L.type+"_"+L.level+"_"+L.urlId+"_"+L.sn}},"./src/controller/gap-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"STALL_MINIMUM_DURATION_MS",function(){return G}),P.d(J,"MAX_START_GAP_JUMP",function(){return r}),P.d(J,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return L}),P.d(J,"SKIP_BUFFER_RANGE_START",function(){return v}),P.d(J,"default",function(){return m});var X=P("./src/utils/buffer-helper.ts"),j=P("./src/errors.ts"),U=P("./src/events.ts"),K=P("./src/utils/logger.ts"),G=250,r=2,L=.1,v=.05,m=function(){function p(u,f,l,o){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=u,this.media=f,this.fragmentTracker=l,this.hls=o}var h=p.prototype;return h.destroy=function(){this.hls=this.fragmentTracker=this.media=null},h.poll=function(f){var l=this.config,o=this.media,s=this.stalled,a=o.currentTime,O=o.seeking,E=this.seeking&&!O,w=!this.seeking&&O;if(this.seeking=O,a!==f){if(this.moved=!0,s!==null){if(this.stallReported){var D=self.performance.now()-s;K.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((w||E)&&(this.stalled=null),o.paused||o.ended||o.playbackRate===0||!X.BufferHelper.getBuffered(o).length)return;var R=X.BufferHelper.bufferInfo(o,a,0),A=R.len>0,C=R.nextStart||0;if(!A&&!C)return;if(O){var T=R.len>r,d=!C||C-a>r&&!this.fragmentTracker.getPartialFragment(a);if(T||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var S,y=Math.max(C,R.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,B=b==null||((S=b.details)===null||S===void 0)?void 0:S.live,F=B?b.details.targetduration*2:r;if(y>0&&y<=F){this._trySkipBufferHole(null);return}}var _=self.performance.now();if(s===null){this.stalled=_;return}var M=_-s;!O&&M>=G&&this._reportStall(R.len);var I=X.BufferHelper.bufferInfo(o,a,l.maxBufferHole);this._tryFixBufferStall(I,M)},h._tryFixBufferStall=function(f,l){var o=this.config,s=this.fragmentTracker,a=this.media,O=a.currentTime,E=s.getPartialFragment(O);if(E){var w=this._trySkipBufferHole(E);if(w)return}f.len>o.maxBufferHole&&l>o.highBufferWatchdogPeriod*1e3&&(K.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(f){var l=this.hls,o=this.media,s=this.stallReported;s||(this.stallReported=!0,K.logger.warn("Playback stalling at @"+o.currentTime+" due to low buffer (buffer="+f+")"),l.trigger(U.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},h._trySkipBufferHole=function(f){for(var l=this.config,o=this.hls,s=this.media,a=s.currentTime,O=0,E=X.BufferHelper.getBuffered(s),w=0;w=O&&a.05&&this.forwardBufferLength>1){var w=Math.min(2,Math.max(1,o)),D=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;p.playbackRate=Math.min(w,Math.max(1,D))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},v.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},v.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},G(L,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,h=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:h?p.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var h=p.holdBack,u=p.partHoldBack,f=p.targetduration,l=this.config,o=l.liveSyncDuration,s=l.liveSyncDurationCount,a=l.lowLatencyMode,O=this.hls.userConfig,E=a&&u||h;(O.liveSyncDuration||O.liveSyncDurationCount||E===0)&&(E=o!==void 0?o:s*f);var w=f,D=1;return E+Math.min(this.stallCount*D,w)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),h=this.targetLatency,u=this.levelDetails;if(p===null||h===null||u===null)return null;var f=u.edge,l=p-h-this.edgeStalled,o=f-u.totalduration,s=f-(this.config.lowLatencyMode&&u.partTarget||u.targetduration);return Math.min(Math.max(o,l),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var h=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-h,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,h=this.levelDetails;if(!p||!h)return 0;var u=p.buffered.length;return u?p.buffered.end(u-1):h.edge-this.currentTime}}]),L}()},"./src/controller/level-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return l});var X=P("./src/types/level.ts"),j=P("./src/events.ts"),U=P("./src/errors.ts"),K=P("./src/utils/codecs.ts"),G=P("./src/controller/level-helper.ts"),r=P("./src/controller/base-playlist-controller.ts"),L=P("./src/types/loader.ts");function v(){return v=Object.assign||function(o){for(var s=1;s0){C=D[0].bitrate,D.sort(function(M,I){return M.bitrate-I.bitrate}),this._levels=D;for(var B=0;Bthis.hls.config.fragLoadingMaxRetry&&(T=w.frag.level)):T=w.frag.level}break;case U.ErrorDetails.LEVEL_LOAD_ERROR:case U.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(C=!1),T=D.level),A=!0;break;case U.ErrorDetails.REMUX_ALLOC_ERROR:T=w.level,A=!0;break}T!==void 0&&this.recoverLevel(w,T,A,C)},a.recoverLevel=function(E,w,D,R){var A=E.details,C=this._levels[w];if(C.loadError++,D){var T=this.retryLoadingOrFail(E);if(T)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(R){var d=C.url.length;if(d>1&&C.loadError1){var R=(w.urlId+1)%D;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(A){A.urlId=R}),this.level=E}},a.onFragLoaded=function(E,w){var D=w.frag;if(D!==void 0&&D.type===L.PlaylistLevelType.MAIN){var R=this._levels[D.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},a.onLevelLoaded=function(E,w){var D,R=w.level,A=w.details,C=this._levels[R];if(!C){var T;this.warn("Invalid level index "+R),(T=w.deliveryDirectives)!==null&&T!==void 0&&T.skip&&(A.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(C.fragmentError===0&&(C.loadError=0,this.retryCount=0),this.playlistLoaded(R,w,C.details)):(D=w.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(A.deltaUpdateFailed=!0)},a.onAudioTrackSwitched=function(E,w){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var R=-1,A=this.hls.audioTracks[w.id].groupId,C=0;C0){var R=D.urlId,A=D.url[R];if(E)try{A=E.addDirectives(A)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("Attempt loading level index "+w+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+R+" "+A),this.clearTimer(),this.hls.trigger(j.Events.LEVEL_LOADING,{url:A,level:w,id:R,deliveryDirectives:E||null})}},a.removeLevel=function(E,w){var D=function(C,T){return T!==w},R=this._levels.filter(function(A,C){return C!==E?!0:A.url.length>1&&w!==void 0?(A.url=A.url.filter(D),A.audioGroupIds&&(A.audioGroupIds=A.audioGroupIds.filter(D)),A.textGroupIds&&(A.textGroupIds=A.textGroupIds.filter(D)),A.urlId=0,!0):!1}).map(function(A,C){var T=A.details;return T!=null&&T.fragments&&T.fragments.forEach(function(d){d.level=C}),A});this._levels=R,this.hls.trigger(j.Events.LEVELS_UPDATED,{levels:R})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var w,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===E&&(w=D[E])!==null&&w!==void 0&&w.details)return;if(E<0||E>=D.length){var R=E<0;if(this.hls.trigger(j.Events.ERROR,{type:U.ErrorTypes.OTHER_ERROR,details:U.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:R,reason:"invalid level idx"}),R)return;E=Math.min(E,D.length-1)}this.clearTimer();var A=this.currentLevelIndex,C=D[A],T=D[E];this.log("switching to level "+E+" from "+A),this.currentLevelIndex=E;var d=v({},T,{level:E,maxBitrate:T.maxBitrate,uri:T.uri,urlId:T.urlId});delete d._urlId,this.hls.trigger(j.Events.LEVEL_SWITCHING,d);var S=T.details;if(!S||S.live){var y=this.switchParams(T.uri,C==null?void 0:C.details);this.loadPlaylist(y)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),s}(r.default)},"./src/controller/level-helper.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"addGroupId",function(){return U}),P.d(J,"assignTrackIdsByGroup",function(){return K}),P.d(J,"updatePTS",function(){return G}),P.d(J,"updateFragPTSDTS",function(){return L}),P.d(J,"mergeDetails",function(){return v}),P.d(J,"mapPartIntersection",function(){return m}),P.d(J,"mapFragmentIntersection",function(){return p}),P.d(J,"adjustSliding",function(){return h}),P.d(J,"addSliding",function(){return u}),P.d(J,"computeReloadInterval",function(){return f}),P.d(J,"getFragmentWithSN",function(){return l}),P.d(J,"getPartWith",function(){return o});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/logger.ts");function U(s,a,O){switch(a){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(O);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(O);break}}function K(s){var a={};s.forEach(function(O){var E=O.groupId||"";O.id=a[E]=a[E]||0,a[E]++})}function G(s,a,O){var E=s[a],w=s[O];r(E,w)}function r(s,a){var O=a.startPTS;if(Object(X.isFiniteNumber)(O)){var E=0,w;a.sn>s.sn?(E=O-s.start,w=s):(E=s.start-O,w=a),w.duration!==E&&(w.duration=E)}else if(a.sn>s.sn){var D=s.cc===a.cc;D&&s.minEndPTS?a.start=s.start+(s.minEndPTS-s.start):a.start=s.start+s.duration}else a.start=Math.max(s.start-a.duration,0)}function L(s,a,O,E,w,D){var R=E-O;R<=0&&(j.logger.warn("Fragment should have a positive duration",a),E=O+a.duration,D=w+a.duration);var A=O,C=E,T=a.startPTS,d=a.endPTS;if(Object(X.isFiniteNumber)(T)){var S=Math.abs(T-O);Object(X.isFiniteNumber)(a.deltaPTS)?a.deltaPTS=Math.max(S,a.deltaPTS):a.deltaPTS=S,A=Math.max(O,T),O=Math.min(O,T),w=Math.min(w,a.startDTS),C=Math.min(E,d),E=Math.max(E,d),D=Math.max(D,a.endDTS)}a.duration=E-O;var y=O-a.start;a.appendedPTS=E,a.start=a.startPTS=O,a.maxStartPTS=A,a.startDTS=w,a.endPTS=E,a.minEndPTS=C,a.endDTS=D;var b=a.sn;if(!s||bs.endSN)return 0;var B,F=b-s.startSN,_=s.fragments;for(_[F]=a,B=F;B>0;B--)r(_[B],_[B-1]);for(B=F;B<_.length-1;B++)r(_[B],_[B+1]);return s.fragmentHint&&r(_[_.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,y}function v(s,a){for(var O=null,E=s.fragments,w=E.length-1;w>=0;w--){var D=E[w].initSegment;if(D){O=D;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var R=0,A;if(p(s,a,function(B,F){B.relurl&&(R=B.cc-F.cc),Object(X.isFiniteNumber)(B.startPTS)&&Object(X.isFiniteNumber)(B.endPTS)&&(F.start=F.startPTS=B.startPTS,F.startDTS=B.startDTS,F.appendedPTS=B.appendedPTS,F.maxStartPTS=B.maxStartPTS,F.endPTS=B.endPTS,F.endDTS=B.endDTS,F.minEndPTS=B.minEndPTS,F.duration=B.endPTS-B.startPTS,F.duration&&(A=F),a.PTSKnown=a.alignedSliding=!0),F.elementaryStreams=B.elementaryStreams,F.loader=B.loader,F.stats=B.stats,F.urlId=B.urlId,B.initSegment&&(F.initSegment=B.initSegment,O=B.initSegment)}),O){var C=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;C.forEach(function(B){var F;(!B.initSegment||B.initSegment.relurl===((F=O)===null||F===void 0?void 0:F.relurl))&&(B.initSegment=O)})}if(a.skippedSegments&&(a.deltaUpdateFailed=a.fragments.some(function(B){return!B}),a.deltaUpdateFailed)){j.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var T=a.skippedSegments;T--;)a.fragments.shift();a.startSN=a.fragments[0].sn,a.startCC=a.fragments[0].cc}var d=a.fragments;if(R){j.logger.warn("discontinuity sliding from playlist, take drift into account");for(var S=0;S=E.length)return;u(a,E[O].start)}function u(s,a){if(a){for(var O=s.fragments,E=s.skippedSegments;E0&&w0&&C===-1&&(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),C=T),this.state=j.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=C,this.tick()}else this._forceStartLoad=!0,this.state=j.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,w.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case j.State.IDLE:this.doTickIdle();break;case j.State.WAITING_LEVEL:{var C,T=this.levels,d=this.level,S=T==null||((C=T[d])===null||C===void 0)?void 0:C.details;if(S&&(!S.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(S))break;this.state=j.State.IDLE;break}break}case j.State.FRAG_LOADING_WAITING_RETRY:{var y,b=self.performance.now(),B=this.retryDate;(!B||b>=B||(y=this.media)!==null&&y!==void 0&&y.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=j.State.IDLE)}break;default:break}this.onTickEnd()},R.onTickEnd=function(){w.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},R.doTickIdle=function(){var C,T,d=this.hls,S=this.levelLastLoaded,y=this.levels,b=this.media,B=d.config,F=d.nextLoadLevel;if(S===null||!b&&(this.startFragRequested||!B.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!y||!y[F])return;var _=y[F];this.level=d.nextLoadLevel=F;var M=_.details;if(!M||this.state===j.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==F){this.state=j.State.WAITING_LEVEL;return}var I=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:b,L.PlaylistLevelType.MAIN);if(I===null)return;var g=I.len,H=this.getMaxBufferLength(_.maxBitrate);if(g>=H)return;if(this._streamEnded(I,M)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(K.Events.BUFFER_EOS,$),this.state=j.State.ENDED;return}var ne=I.end,se=this.getNextFragment(ne,M);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var Oe=se.sn-M.startSN;Oe>1&&(se=M.fragments[Oe-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===r.FragmentState.OK&&this.nextLoadPosition>ne){var ge=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(b,ge,L.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,M)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((C=se.decryptdata)===null||C===void 0?void 0:C.keyFormat)==="identity"&&!((T=se.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(se,M):this.loadFragment(se,M,ne)},R.loadFragment=function(C,T,d){var S,y=this.fragmentTracker.getState(C);if(this.fragCurrent=C,y===r.FragmentState.BACKTRACKED){var b=this.fragmentTracker.getBacktrackData(C);if(b){this._handleFragmentLoadProgress(b),this._handleFragmentLoadComplete(b);return}else y=r.FragmentState.NOT_LOADED}y===r.FragmentState.NOT_LOADED||y===r.FragmentState.PARTIAL?C.sn==="initSegment"?this._loadInitSegment(C):this.bitrateTest?(C.bitrateTest=!0,this.log("Fragment "+C.sn+" of level "+C.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(C)):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,C,T,d)):y===r.FragmentState.APPENDING?this.reduceMaxBufferLength(C.duration)&&this.fragmentTracker.removeFragment(C):((S=this.media)===null||S===void 0?void 0:S.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},R.getAppendedFrag=function(C){var T=this.fragmentTracker.getAppendedFrag(C,L.PlaylistLevelType.MAIN);return T&&"fragment"in T?T.fragment:T},R.getBufferedFrag=function(C){return this.fragmentTracker.getBufferedFrag(C,L.PlaylistLevelType.MAIN)},R.followingBufferedFrag=function(C){return C?this.getBufferedFrag(C.end+.5):null},R.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},R.nextLevelSwitch=function(){var C=this.levels,T=this.media;if(T!=null&&T.readyState){var d,S=this.getAppendedFrag(T.currentTime);if(S&&S.start>1&&this.flushMainBuffer(0,S.start-1),!T.paused&&C){var y=this.hls.nextLoadLevel,b=C[y],B=this.fragLastKbps;B&&this.fragCurrent?d=this.fragCurrent.duration*b.maxBitrate/(1e3*B)+1:d=0}else d=0;var F=this.getBufferedFrag(T.currentTime+d);if(F){var _=this.followingBufferedFrag(F);if(_){this.abortCurrentFrag();var M=_.maxStartPTS?_.maxStartPTS:_.start,I=_.duration,g=Math.max(F.end,M+Math.min(Math.max(I-this.config.maxFragLookUpTolerance,I*.5),I*.75));this.flushMainBuffer(g,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var C=this.fragCurrent;this.fragCurrent=null,C!=null&&C.loader&&C.loader.abort(),this.state===j.State.KEY_LOADING&&(this.state=j.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},R.flushMainBuffer=function(C,T){w.prototype.flushMainBuffer.call(this,C,T,this.altAudio?"video":null)},R.onMediaAttached=function(C,T){w.prototype.onMediaAttached.call(this,C,T);var d=T.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,d,this.fragmentTracker,this.hls)},R.onMediaDetaching=function(){var C=this.media;C&&(C.removeEventListener("playing",this.onvplaying),C.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),w.prototype.onMediaDetaching.call(this)},R.onMediaPlaying=function(){this.tick()},R.onMediaSeeked=function(){var C=this.media,T=C?C.currentTime:null;Object(X.isFiniteNumber)(T)&&this.log("Media seeked to "+T.toFixed(3)),this.tick()},R.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(K.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},R.onManifestParsed=function(C,T){var d=!1,S=!1,y;T.levels.forEach(function(b){y=b.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(d=!0),y.indexOf("mp4a.40.5")!==-1&&(S=!0))}),this.audioCodecSwitch=d&&S&&!Object(U.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=T.levels,this.startFragRequested=!1},R.onLevelLoading=function(C,T){var d=this.levels;if(!d||this.state!==j.State.IDLE)return;var S=d[T.level];(!S.details||S.details.live&&this.levelLastLoaded!==T.level||this.waitForCdnTuneIn(S.details))&&(this.state=j.State.WAITING_LEVEL)},R.onLevelLoaded=function(C,T){var d,S=this.levels,y=T.level,b=T.details,B=b.totalduration;if(!S){this.warn("Levels were reset while loading level "+y);return}this.log("Level "+y+" loaded ["+b.startSN+","+b.endSN+"], cc ["+b.startCC+", "+b.endCC+"] duration:"+B);var F=this.fragCurrent;F&&(this.state===j.State.FRAG_LOADING||this.state===j.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==T.level&&F.loader&&(this.state=j.State.IDLE,F.loader.abort()));var _=S[y],M=0;if(b.live||(d=_.details)!==null&&d!==void 0&&d.live){if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed)return;M=this.alignPlaylists(b,_.details)}if(_.details=b,this.levelLastLoaded=y,this.hls.trigger(K.Events.LEVEL_UPDATED,{details:b,level:y}),this.state===j.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(b))return;this.state=j.State.IDLE}this.startFragRequested?b.live&&this.synchronizeToLiveEdge(b):this.setStartPosition(b,M),this.tick()},R._handleFragmentLoadProgress=function(C){var T,d=C.frag,S=C.part,y=C.payload,b=this.levels;if(!b){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var B=b[d.level],F=B.details;if(!F){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var _=B.videoCodec,M=F.PTSKnown||!F.live,I=(T=d.initSegment)===null||T===void 0?void 0:T.data,g=this._getAudioCodec(B),H=this.transmuxer=this.transmuxer||new m.default(this.hls,L.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=S?S.index:-1,ne=$!==-1,se=new p.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,y.byteLength,$,ne),Oe=this.initPTS[d.cc];H.push(y,I,g,_,d,S,F.totalduration,M,se,Oe)},R.onAudioTrackSwitching=function(C,T){var d=this.altAudio,S=!!T.url,y=T.id;if(!S){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var b=this.fragCurrent;b!=null&&b.loader&&(this.log("Switching to main audio track, cancel main fragment load"),b.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var B=this.hls;d&&B.trigger(K.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),B.trigger(K.Events.AUDIO_TRACK_SWITCHED,{id:y})}},R.onAudioTrackSwitched=function(C,T){var d=T.id,S=!!this.hls.audioTracks[d].url;if(S){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=S,this.tick()},R.onBufferCreated=function(C,T){var d=T.tracks,S,y,b=!1;for(var B in d){var F=d[B];if(F.id==="main"){if(y=B,S=F,B==="video"){var _=d[B];_&&(this.videoBuffer=_.buffer)}}else b=!0}b&&S?(this.log("Alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=S.buffer):this.mediaBuffer=this.media},R.onFragBuffered=function(C,T){var d=T.frag,S=T.part;if(d&&d.type!==L.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(S?" p: "+S.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===j.State.PARSED&&(this.state=j.State.IDLE);return}var y=S?S.stats:d.stats;this.fragLastKbps=Math.round(8*y.total/(y.buffering.end-y.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,S)},R.onError=function(C,T){switch(T.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(L.PlaylistLevelType.MAIN,T);break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==j.State.ERROR&&(T.fatal?(this.warn(""+T.details),this.state=j.State.ERROR):!T.levelRetry&&this.state===j.State.WAITING_LEVEL&&(this.state=j.State.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="main"&&(this.state===j.State.PARSING||this.state===j.State.PARSED)){var d=!0,S=this.getFwdBufferInfo(this.media,L.PlaylistLevelType.MAIN);S&&S.len>.5&&(d=!this.reduceMaxBufferLength(S.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},R.checkBuffer=function(){var C=this.media,T=this.gapController;if(!C||!T||!C.readyState)return;var d=G.BufferHelper.getBuffered(C);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):T.poll(this.lastCurrentTime),this.lastCurrentTime=C.currentTime},R.onFragLoadEmergencyAborted=function(){this.state=j.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},R.onBufferFlushed=function(C,T){var d=T.type;if(d!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var S=(d===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(S,d,L.PlaylistLevelType.MAIN)}},R.onLevelsUpdated=function(C,T){this.levels=T.levels},R.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},R.seekToStartPos=function(){var C=this.media,T=C.currentTime,d=this.startPosition;if(d>=0&&T0&&(b1&&C.seeking===!1){var d=C.currentTime;if(G.BufferHelper.isBuffered(C,d)?T=this.getAppendedFrag(d):G.BufferHelper.isBuffered(C,d+.1)&&(T=this.getAppendedFrag(d+.1)),T){var S=this.fragPlaying,y=T.level;(!S||T.sn!==S.sn||S.level!==y||T.urlId!==S.urlId)&&(this.hls.trigger(K.Events.FRAG_CHANGED,{frag:T}),(!S||S.level!==y)&&this.hls.trigger(K.Events.LEVEL_SWITCHED,{level:y}),this.fragPlaying=T)}}},o(D,[{key:"nextLevel",get:function(){var C=this.nextBufferedFrag;return C?C.level:-1}},{key:"currentLevel",get:function(){var C=this.media;if(C){var T=this.getAppendedFrag(C.currentTime);if(T)return T.level}return-1}},{key:"nextBufferedFrag",get:function(){var C=this.media;if(C){var T=this.getAppendedFrag(C.currentTime);return this.followingBufferedFrag(T)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(j.default)},"./src/controller/subtitle-stream-controller.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"SubtitleStreamController",function(){return s});var X=P("./src/events.ts"),j=P("./src/utils/logger.ts"),U=P("./src/utils/buffer-helper.ts"),K=P("./src/controller/fragment-finders.ts"),G=P("./src/utils/discontinuities.ts"),r=P("./src/controller/level-helper.ts"),L=P("./src/controller/fragment-tracker.ts"),v=P("./src/controller/base-stream-controller.ts"),m=P("./src/types/loader.ts"),p=P("./src/types/level.ts");function h(a,O){for(var E=0;E=T[y].start&&S<=T[y].end){d=T[y];break}var b=A.start+A.duration;d?d.end=b:(d={start:S,end:b},T.push(d)),this.fragmentTracker.fragBuffered(A)},E.onBufferFlushing=function(D,R){var A=R.startOffset,C=R.endOffset;if(A===0&&C!==Number.POSITIVE_INFINITY){var T=this.currentTrackId,d=this.levels;if(!d.length||!d[T]||!d[T].details)return;var S=d[T].details,y=S.targetduration,b=C-y;if(b<=0)return;R.endOffsetSubtitles=Math.max(0,b),this.tracksBuffered.forEach(function(B){for(var F=0;F=S.length||T!==d||!y)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,C.live||(A=y.details)!==null&&A!==void 0&&A.live){var b=this.mainDetails;if(C.deltaUpdateFailed||!b)return;var B=b.fragments[0];if(!y.details)C.hasProgramDateTime&&b.hasProgramDateTime?Object(G.alignMediaPlaylistByPDT)(C,b):B&&Object(r.addSliding)(C,B.start);else{var F=this.alignPlaylists(C,y.details);F===0&&B&&Object(r.addSliding)(C,B.start)}}if(y.details=C,this.levelLastLoaded=T,this.tick(),C.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var _=Object(K.findFragmentByPTS)(null,C.fragments,this.media.currentTime,0);_||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}},E._handleFragmentLoadComplete=function(D){var R=D.frag,A=D.payload,C=R.decryptdata,T=this.hls;if(this.fragContextChanged(R))return;if(A&&A.byteLength>0&&C&&C.key&&C.iv&&C.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(A),C.key.buffer,C.iv.buffer).then(function(S){var y=performance.now();T.trigger(X.Events.FRAG_DECRYPTED,{frag:R,payload:S,stats:{tstart:d,tdecrypt:y}})})}},E.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var D,R=this.currentTrackId,A=this.levels;if(!A.length||!A[R]||!A[R].details)return;var C=A[R].details,T=C.targetduration,d=this.config,S=this.media,y=U.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,S.currentTime-T,d.maxBufferHole),b=y.end,B=y.len,F=this.getMaxBufferLength()+T;if(B>F)return;console.assert(C,"Subtitle track details are defined on idle subtitle stream controller tick");var _=C.fragments,M=_.length,I=C.edge,g,H=this.fragPrevious;if(b-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},f.pollTrackChange=function(o){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,o)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var o=p(this.media.textTracks);o.forEach(function(s){Object(j.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(o,s){this.tracks=s.subtitleTracks},f.onSubtitleTrackLoaded=function(o,s){var a=s.id,O=s.details,E=this.trackId,w=this.tracksInGroup[E];if(!w){this.warn("Invalid subtitle track id "+a);return}var D=w.details;w.details=s.details,this.log("subtitle track "+a+" loaded ["+O.startSN+"-"+O.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,s,D))},f.onLevelLoading=function(o,s){this.switchLevel(s.level)},f.onLevelSwitching=function(o,s){this.switchLevel(s.level)},f.switchLevel=function(o){var s=this.hls.levels[o];if(!(s!=null&&s.textGroupIds))return;var a=s.textGroupIds[s.urlId];if(this.groupId!==a){var O=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(R){return!a||R.groupId===a});this.tracksInGroup=E;var w=this.findTrackId(O==null?void 0:O.name)||this.findTrackId();this.groupId=a;var D={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(X.Events.SUBTITLE_TRACKS_UPDATED,D),w!==-1&&this.setSubtitleTrack(w,O)}},f.findTrackId=function(o){for(var s=this.tracksInGroup,a=0;a=O.length)return;this.clearTimer();var E=O[o];if(this.log("Switching to subtitle track "+o),this.trackId=o,E){var w=E.id,D=E.groupId,R=D===void 0?"":D,A=E.name,C=E.type,T=E.url;this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:w,groupId:R,name:A,type:C,url:T});var d=this.switchParams(E.url,s==null?void 0:s.details);this.loadPlaylist(d)}else this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:o})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var o=-1,s=p(this.media.textTracks),a=0;a=0&&(C[0]=Math.min(C[0],O),C[1]=Math.max(C[1],E),R=!0,T/(E-O)>.5))return}if(R||D.push([O,E]),this.config.renderTextTracksNatively){var d=this.captionsTracks[a];this.Cues.newCue(d,O,E,w)}else{var S=this.Cues.newCue(null,O,E,w);this.hls.trigger(j.Events.CUES_PARSED,{type:"captions",cues:S,track:a})}},o.onInitPtsFound=function(a,O){var E=this,w=O.frag,D=O.id,R=O.initPTS,A=O.timescale,C=this.unparsedVttFrags;D==="main"&&(this.initPTS[w.cc]=R,this.timescale[w.cc]=A),C.length&&(this.unparsedVttFrags=[],C.forEach(function(T){E.onFragLoaded(j.Events.FRAG_LOADED,T)}))},o.getExistingTrack=function(a){var O=this.media;if(O)for(var E=0;E>>8^A&255^99,L[w]=A,v[A]=w;var C=E[w],T=E[C],d=E[T],S=E[A]*257^A*16843008;p[w]=S<<24|S>>>8,h[w]=S<<16|S>>>16,u[w]=S<<8|S>>>24,f[w]=S,S=d*16843009^T*65537^C*257^w*16843008,o[A]=S<<24|S>>>8,s[A]=S<<16|S>>>16,a[A]=S<<8|S>>>24,O[A]=S,w?(w=C^E[E[E[d^C]]],D^=E[E[D]]):w=D=1}},G.expandKey=function(L){for(var v=this.uint8ArrayToUint32Array_(L),m=!0,p=0;p>>6)+1;var S=(a[O+2]&60)>>>2;if(S>d.length-1){s.trigger(U.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+S});return}return R=(a[O+2]&1)<<2,R|=(a[O+3]&192)>>>6,X.logger.log("manifest codec:"+E+", ADTS type:"+w+", samplingIndex:"+S),/firefox/i.test(C)?S>=6?(w=5,A=new Array(4),D=S-3):(w=2,A=new Array(2),D=S):C.indexOf("android")!==-1?(w=2,A=new Array(2),D=S):(w=5,A=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&S>=6?D=S-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(S>=6&&R===1||/vivaldi/i.test(C))||!E&&R===1)&&(w=2,A=new Array(2)),D=S)),A[0]=w<<3,A[0]|=(S&14)>>1,A[1]|=(S&1)<<7,A[1]|=R<<3,w===5&&(A[1]|=(D&14)>>1,A[2]=(D&1)<<7,A[2]|=2<<2,A[3]=0),{config:A,samplerate:d[S],channelCount:R,codec:"mp4a.40."+w,manifestCodec:T}}function G(s,a){return s[a]===255&&(s[a+1]&246)===240}function r(s,a){return s[a+1]&1?7:9}function L(s,a){return(s[a+3]&3)<<11|s[a+4]<<3|(s[a+5]&224)>>>5}function v(s,a){return a+5=s.length)return!1;var E=L(s,a);if(E<=O)return!1;var w=a+E;return w===s.length||m(s,w)}return!1}function u(s,a,O,E,w){if(!s.samplerate){var D=K(a,O,E,w);if(!D)return;s.config=D.config,s.samplerate=D.samplerate,s.channelCount=D.channelCount,s.codec=D.codec,s.manifestCodec=D.manifestCodec,X.logger.log("parsed codec:"+s.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function f(s){return 1024*9e4/s}function l(s,a,O,E,w){var D=r(s,a),R=L(s,a);if(R-=D,R>0){var A=O+E*w;return{headerLength:D,frameLength:R,stamp:A}}}function o(s,a,O,E,w){var D=f(s.samplerate),R=l(a,O,E,w,D);if(R){var A=R.frameLength,C=R.headerLength,T=R.stamp,d=C+A,S=Math.max(0,O+d-a.length),y;S?(y=new Uint8Array(d-C),y.set(a.subarray(O+C,a.length),0)):y=a.subarray(O+C,O+d);var b={unit:y,pts:T};return S||s.samples.push(b),{sample:b,length:d,missing:S}}}},"./src/demux/base-audio-demuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"initPTSFn",function(){return L});var X=P("./src/polyfills/number.ts"),j=P("./src/demux/id3.ts"),U=P("./src/demux/dummy-demuxed-track.ts"),K=P("./src/utils/mp4-tools.ts"),G=P("./src/utils/typed-array.ts"),r=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=v.prototype;return m.resetInitSegment=function(h,u,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(h,u){return!1},m.appendFrame=function(h,u,f){},m.demux=function(h,u){this.cachedData&&(h=Object(K.appendUint8Array)(this.cachedData,h),this.cachedData=null);var f=j.getID3Data(h,0),l=f?f.length:0,o,s,a=this._audioTrack,O=this._id3Track,E=f?j.getTimeStamp(f):void 0,w=h.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=L(E,u)),f&&f.length>0&&O.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),s=this.initPTS;lr?(this.word<<=r,this.bitsAvailable-=r):(r-=this.bitsAvailable,L=r>>3,r-=L>>3,this.bytesAvailable-=L,this.loadWord(),this.word<<=r,this.bitsAvailable-=r)},K.readBits=function(r){var L=Math.min(this.bitsAvailable,r),v=this.word>>>32-L;return r>32&&X.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=L,this.bitsAvailable>0?this.word<<=L:this.bytesAvailable>0&&this.loadWord(),L=r-L,L>0&&this.bitsAvailable?v<>>r)!==0)return this.word<<=r,this.bitsAvailable-=r,r;return this.loadWord(),r+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var r=this.skipLZ();return this.readBits(r+1)-1},K.readEG=function(){var r=this.readUEG();return 1&r?1+r>>>1:-1*(r>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(r){for(var L=8,v=8,m,p=0;p0?w.subarray(R,R+A):void 0},K=function(w,D){var R=0;return R=(w[D]&127)<<21,R|=(w[D+1]&127)<<14,R|=(w[D+2]&127)<<7,R|=w[D+3]&127,R},G=function(w,D){return X(w,D)&&K(w,D+6)+10<=w.length-D},r=function(w){for(var D=m(w),R=0;R>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:b+=String.fromCharCode(d);break;case 12:case 13:S=w[B++],b+=String.fromCharCode((d&31)<<6|S&63);break;case 14:S=w[B++],y=w[B++],b+=String.fromCharCode((d&15)<<12|(S&63)<<6|(y&63)<<0);break;default:}}return b},s={decodeTextFrame:u},a;function O(){return!a&&typeof self.TextDecoder!="undefined"&&(a=new self.TextDecoder("utf-8")),a}},"./src/demux/mp3demuxer.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/demux/base-audio-demuxer.ts"),j=P("./src/demux/id3.ts"),U=P("./src/utils/logger.ts"),K=P("./src/demux/mpegaudio.ts");function G(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,r(v,m)}function r(v,m){return r=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},r(v,m)}var L=function(v){G(m,v);function m(){return v.apply(this,arguments)||this}var p=m.prototype;return p.resetInitSegment=function(u,f,l){v.prototype.resetInitSegment.call(this,u,f,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:u,duration:l,inputTimeScale:9e4,dropped:0}},m.probe=function(u){if(!u)return!1;for(var f=j.getID3Data(u,0)||[],l=f.length,o=u.length;l0},G.demux=function(L){var v=L,m=Object(j.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(X.appendUint8Array)(this.remainderData,L));var p=Object(X.segmentValidRange)(v);this.remainderData=p.remainder,m.samples=p.valid||new Uint8Array}else m.samples=v;return{audioTrack:Object(j.dummyTrack)(),avcTrack:m,id3Track:Object(j.dummyTrack)(),textTrack:Object(j.dummyTrack)()}},G.flush=function(){var L=Object(j.dummyTrack)();return L.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(j.dummyTrack)(),avcTrack:L,id3Track:Object(j.dummyTrack)(),textTrack:Object(j.dummyTrack)()}},G.demuxSampleAes=function(L,v,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},G.destroy=function(){},K}();U.minProbeByteLength=1024,J.default=U},"./src/demux/mpegaudio.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"appendFrame",function(){return r}),P.d(J,"parseHeader",function(){return L}),P.d(J,"isHeaderPattern",function(){return v}),P.d(J,"isHeader",function(){return m}),P.d(J,"canParse",function(){return p}),P.d(J,"probe",function(){return h});var X=null,j=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],U=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],K=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],G=[0,1,1,4];function r(u,f,l,o,s){if(l+24>f.length)return;var a=L(f,l);if(a&&l+a.frameLength<=f.length){var O=a.samplesPerFrame*9e4/a.sampleRate,E=o+s*O,w={unit:f.subarray(l,l+a.frameLength),pts:E,dts:E};return u.config=[],u.channelCount=a.channelCount,u.samplerate=a.sampleRate,u.samples.push(w),{sample:w,length:a.frameLength,missing:0}}}function L(u,f){var l=u[f+1]>>3&3,o=u[f+1]>>1&3,s=u[f+2]>>4&15,a=u[f+2]>>2&3;if(l!==1&&s!==0&&s!==15&&a!==3){var O=u[f+2]>>1&1,E=u[f+3]>>6,w=l===3?3-o:o===3?3:4,D=j[w*14+s-1]*1e3,R=l===3?0:l===2?1:2,A=U[R*3+a],C=E===3?1:2,T=K[l][o],d=G[o],S=T*8*d,y=Math.floor(T*D/A+O)*d;if(X===null){var b=navigator.userAgent||"",B=b.match(/Chrome\/(\d+)/i);X=B?parseInt(B[1]):0}var F=!!X&&X<=87;return F&&o===2&&D>=224e3&&E===0&&(u[f+3]=u[f+3]|128),{sampleRate:A,channelCount:C,frameLength:y,samplesPerFrame:S}}}function v(u,f){return u[f]===255&&(u[f+1]&224)===224&&(u[f+1]&6)!==0}function m(u,f){return f+1=L.length){m();return}if(L[v].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(L,v,m,p),!p)return}},G.getAvcEncryptedData=function(L){for(var v=Math.floor((L.length-48)/160)*16+16,m=new Int8Array(v),p=0,h=32;h<=L.length-16;h+=160,p+=16)m.set(L.subarray(h,h+16),p);return m},G.getAvcDecryptedUnit=function(L,v){for(var m=new Uint8Array(v),p=0,h=32;h<=L.length-16;h+=160,p+=16)L.set(m.subarray(p,p+16),h);return L},G.decryptAvcSample=function(L,v,m,p,h,u){var f=Object(j.discardEPB)(h.data),l=this.getAvcEncryptedData(f),o=this;this.decryptBuffer(l.buffer,function(s){h.data=o.getAvcDecryptedUnit(f,s),u||o.decryptAvcSamples(L,v,m+1,p)})},G.decryptAvcSamples=function(L,v,m,p){if(L instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,m=0){if(v>=L.length){p();return}for(var h=L[v].units;!(m>=h.length);m++){var u=h[m];if(u.data.length<=48||u.type!==1&&u.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(L,v,m,p,u,f),!f)return}}},K}();J.default=U},"./src/demux/transmuxer-interface.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h});var X=P("./node_modules/webworkify-webpack/index.js"),j=P.n(X),U=P("./src/events.ts"),K=P("./src/demux/transmuxer.ts"),G=P("./src/utils/logger.ts"),r=P("./src/errors.ts"),L=P("./src/utils/mediasource-helper.ts"),v=P("./node_modules/eventemitter3/index.js"),m=P.n(v),p=Object(L.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function u(l,o,s,a){var O=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=l,this.id=o,this.onTransmuxComplete=s,this.onFlush=a;var E=l.config,w=function(T,d){d=d||{},d.frag=O.frag,d.id=O.id,l.trigger(T,d)};this.observer=new v.EventEmitter,this.observer.on(U.Events.FRAG_DECRYPTED,w),this.observer.on(U.Events.ERROR,w);var D={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},R=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){G.logger.log("demuxing in webworker");var A;try{A=this.worker=X("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),A.addEventListener("message",this.onwmsg),A.onerror=function(C){l.trigger(U.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(C.message+" ("+C.filename+":"+C.lineno+")")})},A.postMessage({cmd:"init",typeSupported:D,vendor:R,id:o,config:JSON.stringify(E)})}catch(C){G.logger.warn("Error in worker:",C),G.logger.error("Error while initializing DemuxerWorker, fallback to inline"),A&&self.URL.revokeObjectURL(A.objectURL),this.transmuxer=new K.default(this.observer,D,E,R,o),this.worker=null}}else this.transmuxer=new K.default(this.observer,D,E,R,o)}var f=u.prototype;return f.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var a=this.observer;a&&a.removeAllListeners(),this.observer=null},f.push=function(o,s,a,O,E,w,D,R,A,C){var T=this;A.transmuxing.start=self.performance.now();var d=this.transmuxer,S=this.worker,y=w?w.start:E.start,b=E.decryptdata,B=this.frag,F=!(B&&E.cc===B.cc),_=!(B&&A.level===B.level),M=B?A.sn-B.sn:-1,I=this.part?A.part-this.part.index:1,g=!_&&(M===1||M===0&&I===1),H=self.performance.now();(_||M||E.stats.parsing.start===0)&&(E.stats.parsing.start=H),w&&(I||!g)&&(w.stats.parsing.start=H);var $=new K.TransmuxState(F,g,R,_,y);if(!g||F){G.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+A.sn+" p: "+A.part+" level: "+A.level+" id: "+A.id+` discontinuity: `+F+` trackSwitch: `+_+` contiguous: `+g+` accurateTimeOffset: `+R+` - timeOffset: `+y);var ne=new K.TransmuxConfig(a,O,s,D,C);this.configureTransmuxer(ne)}if(this.frag=E,this.part=w,S)S.postMessage({cmd:"demux",data:o,decryptdata:b,chunkMeta:A,state:$},o instanceof ArrayBuffer?[o]:[]);else if(c){var se=c.push(o,b,A,$);Object(K.isPromise)(se)?se.then(function(Oe){T.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(se)}},f.flush=function(o){var s=this;o.transmuxing.start=self.performance.now();var a=this.transmuxer,O=this.worker;if(O)O.postMessage({cmd:"flush",chunkMeta:o});else if(a){var E=a.flush(o);Object(K.isPromise)(E)?E.then(function(w){s.handleFlushResult(w,o)}):this.handleFlushResult(E,o)}},f.handleFlushResult=function(o,s){var a=this;o.forEach(function(O){a.handleTransmuxComplete(O)}),this.onFlush(s)},f.onWorkerMessage=function(o){var s=o.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},f.configureTransmuxer=function(o){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:o}):a&&a.configure(o)},f.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},u}()},"./src/demux/transmuxer-worker.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return r});var X=P("./src/demux/transmuxer.ts"),j=P("./src/events.ts"),U=P("./src/utils/logger.ts"),K=P("./node_modules/eventemitter3/index.js"),G=P.n(K);function r(h){var u=new K.EventEmitter,f=function(o,s){h.postMessage({event:o,data:s})};u.on(j.Events.FRAG_DECRYPTED,f),u.on(j.Events.ERROR,f),h.addEventListener("message",function(l){var o=l.data;switch(o.cmd){case"init":{var s=JSON.parse(o.config);h.transmuxer=new X.default(u,o.typeSupported,s,o.vendor,o.id),Object(U.enableLogs)(s.debug),f("init",null);break}case"configure":{h.transmuxer.configure(o.config);break}case"demux":{var a=h.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(X.isPromise)(a)?a.then(function(w){L(h,w)}):L(h,a);break}case"flush":{var O=o.chunkMeta,E=h.transmuxer.flush(O);Object(X.isPromise)(E)?E.then(function(w){m(h,w,O)}):m(h,E,O);break}default:break}})}function L(h,u){if(p(u.remuxResult))return;var f=[],l=u.remuxResult,o=l.audio,s=l.video;o&&v(f,o),s&&v(f,s),h.postMessage({event:"transmuxComplete",data:u},f)}function v(h,u){u.data1&&h.push(u.data1.buffer),u.data2&&h.push(u.data2.buffer)}function m(h,u,f){u.forEach(function(l){L(h,l)}),h.postMessage({event:"flush",data:f})}function p(h){return!h.audio&&!h.video&&!h.text&&!h.id3&&!h.initSegment}},"./src/demux/transmuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return s}),P.d(J,"isPromise",function(){return E}),P.d(J,"TransmuxConfig",function(){return w}),P.d(J,"TransmuxState",function(){return D});var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/crypt/decrypter.ts"),K=P("./src/demux/aacdemuxer.ts"),G=P("./src/demux/mp4demuxer.ts"),r=P("./src/demux/tsdemuxer.ts"),L=P("./src/demux/mp3demuxer.ts"),v=P("./src/remux/mp4-remuxer.ts"),m=P("./src/remux/passthrough-remuxer.ts"),p=P("./src/demux/chunk-cache.ts"),h=P("./src/utils/mp4-tools.ts"),u=P("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){u.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var l=[{demux:r.default,remux:v.default},{demux:G.default,remux:m.default},{demux:K.default,remux:v.default},{demux:L.default,remux:v.default}],o=1024;l.forEach(function(R){var A=R.demux;o=Math.max(o,A.minProbeByteLength)});var s=function(){function R(C,T,c,S,y){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=C,this.typeSupported=T,this.config=c,this.vendor=S,this.id=y}var A=R.prototype;return A.configure=function(T){this.transmuxConfig=T,this.decrypter&&this.decrypter.reset()},A.push=function(T,c,S,y){var b=this,B=S.transmuxing;B.executeStart=f();var F=new Uint8Array(T),_=this.cache,M=this.config,I=this.currentTransmuxState,g=this.transmuxConfig;y&&(this.currentTransmuxState=y);var H=a(F,c);if(H&&H.method==="AES-128"){var $=this.getDecrypter();if(M.enableSoftwareAES){var ne=$.softwareDecrypt(F,H.key.buffer,H.iv.buffer);if(!ne)return B.executeEnd=f(),O(S);F=new Uint8Array(ne)}else return this.decryptionPromise=$.webCryptoDecrypt(F,H.key.buffer,H.iv.buffer).then(function(Ne){var Be=b.push(Ne,null,S);return b.decryptionPromise=null,Be}),this.decryptionPromise}var se=y||I,Oe=se.contiguous,ge=se.discontinuity,Te=se.trackSwitch,Re=se.accurateTimeOffset,Le=se.timeOffset,de=g.audioCodec,he=g.videoCodec,re=g.defaultInitPts,fe=g.duration,oe=g.initSegmentData;if((ge||Te)&&this.resetInitSegment(oe,de,he,fe),ge&&this.resetInitialTimestamp(re),Oe||this.resetContiguity(),this.needsProbing(F,ge,Te)){if(_.dataLength){var De=_.flush();F=Object(h.appendUint8Array)(De,F)}this.configureTransmuxer(F,g)}var Fe=this.transmux(F,H,Le,Re,S),Ce=this.currentTransmuxState;return Ce.contiguous=!0,Ce.discontinuity=!1,Ce.trackSwitch=!1,B.executeEnd=f(),Fe},A.flush=function(T){var c=this,S=T.transmuxing;S.executeStart=f();var y=this.decrypter,b=this.cache,B=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return c.flush(T)});var _=[],M=B.timeOffset;if(y){var I=y.flush();I&&_.push(this.push(I,null,T))}var g=b.dataLength;b.reset();var H=this.demuxer,$=this.remuxer;if(!H||!$)return g>=o&&this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),S.executeEnd=f(),[O(T)];var ne=H.flush(M);return E(ne)?ne.then(function(se){return c.flushRemux(_,se,T),_}):(this.flushRemux(_,ne,T),_)},A.flushRemux=function(T,c,S){var y=c.audioTrack,b=c.avcTrack,B=c.id3Track,F=c.textTrack,_=this.currentTransmuxState,M=_.accurateTimeOffset,I=_.timeOffset;u.logger.log("[transmuxer.ts]: Flushed fragment "+S.sn+(S.part>-1?" p: "+S.part:"")+" of level "+S.level);var g=this.remuxer.remux(y,b,B,F,I,M,!0,this.id);T.push({remuxResult:g,chunkMeta:S}),S.transmuxing.executeEnd=f()},A.resetInitialTimestamp=function(T){var c=this.demuxer,S=this.remuxer;if(!c||!S)return;c.resetTimeStamp(T),S.resetTimeStamp(T)},A.resetContiguity=function(){var T=this.demuxer,c=this.remuxer;if(!T||!c)return;T.resetContiguity(),c.resetNextTimestamp()},A.resetInitSegment=function(T,c,S,y){var b=this.demuxer,B=this.remuxer;if(!b||!B)return;b.resetInitSegment(c,S,y),B.resetInitSegment(T,c,S)},A.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},A.transmux=function(T,c,S,y,b){var B;return c&&c.method==="SAMPLE-AES"?B=this.transmuxSampleAes(T,c,S,y,b):B=this.transmuxUnencrypted(T,S,y,b),B},A.transmuxUnencrypted=function(T,c,S,y){var b=this.demuxer.demux(T,c,!1,!this.config.progressive),B=b.audioTrack,F=b.avcTrack,_=b.id3Track,M=b.textTrack,I=this.remuxer.remux(B,F,_,M,c,S,!1,this.id);return{remuxResult:I,chunkMeta:y}},A.transmuxSampleAes=function(T,c,S,y,b){var B=this;return this.demuxer.demuxSampleAes(T,c,S).then(function(F){var _=B.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,S,y,!1,B.id);return{remuxResult:_,chunkMeta:b}})},A.configureTransmuxer=function(T,c){for(var S=this.config,y=this.observer,b=this.typeSupported,B=this.vendor,F=c.audioCodec,_=c.defaultInitPts,M=c.duration,I=c.initSegmentData,g=c.videoCodec,H,$=0,ne=l.length;$0&&A!=null&&A.key!=null&&A.iv!==null&&A.method!=null&&(C=A),C}var O=function(A){return{remuxResult:{},chunkMeta:A}};function E(R){return"then"in R&&R.then instanceof Function}var w=function(A,C,T,c,S){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=A,this.videoCodec=C,this.initSegmentData=T,this.duration=c,this.defaultInitPts=S},D=function(A,C,T,c,S){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=A,this.contiguous=C,this.accurateTimeOffset=T,this.trackSwitch=c,this.timeOffset=S}},"./src/demux/tsdemuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"discardEPB",function(){return O});var X=P("./src/demux/adts.ts"),j=P("./src/demux/mpegaudio.ts"),U=P("./src/demux/exp-golomb.ts"),K=P("./src/demux/id3.ts"),G=P("./src/demux/sample-aes.ts"),r=P("./src/events.ts"),L=P("./src/utils/mp4-tools.ts"),v=P("./src/utils/logger.ts"),m=P("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},h=function(){function E(D,R,A){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=R,this.typeSupported=A}E.probe=function(R){var A=E.syncOffset(R);return A<0?!1:(A&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+A+", junk ahead ?"),!0)},E.syncOffset=function(R){for(var A=Math.min(1e3,R.length-3*188),C=0;C>4,de=void 0;if(Le>1){if(de=ge+5+R[ge+4],de===ge+188)continue}else de=ge+4;switch(Re){case B:Te&&(F&&(c=o(F))&&this.parseAVCPES(c,!1),F={data:[],size:0}),F&&(F.data.push(R.subarray(de,ge+188)),F.size+=ge+188-de);break;case _:Te&&(I&&(c=o(I))&&(y.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),I={data:[],size:0}),I&&(I.data.push(R.subarray(de,ge+188)),I.size+=ge+188-de);break;case M:Te&&(g&&(c=o(g))&&this.parseID3PES(c),g={data:[],size:0}),g&&(g.data.push(R.subarray(de,ge+188)),g.size+=ge+188-de);break;case 0:Te&&(de+=R[de]+1),ne=this._pmtId=f(R,de);break;case ne:{Te&&(de+=R[de]+1);var he=l(R,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,C);B=he.avc,B>0&&(S.pid=B),_=he.audio,_>0&&(y.pid=_,y.isAAC=he.isAAC),M=he.id3,M>0&&(b.pid=M),H&&!$&&(v.logger.log("reparse from beginning"),H=!1,ge=Oe-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});S.pesData=F,y.pesData=I,b.pesData=g;var re={audioTrack:y,avcTrack:S,id3Track:b,textTrack:this._txtTrack};return T&&this.extractRemainingSamples(re),re},w.flush=function(){var R=this.remainderData;this.remainderData=null;var A;return R?A=this.demux(R,-1,!1,!0):A={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(A),this.sampleAes?this.decrypt(A,this.sampleAes):A},w.extractRemainingSamples=function(R){var A=R.audioTrack,C=R.avcTrack,T=R.id3Track,c=C.pesData,S=A.pesData,y=T.pesData,b;c&&(b=o(c))?(this.parseAVCPES(b,!0),C.pesData=null):C.pesData=c,S&&(b=o(S))?(A.isAAC?this.parseAACPES(b):this.parseMPEGPES(b),A.pesData=null):(S!=null&&S.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),A.pesData=S),y&&(b=o(y))?(this.parseID3PES(b),T.pesData=null):T.pesData=y},w.demuxSampleAes=function(R,A,C){var T=this.demux(R,C,!0,!this.config.progressive),c=this.sampleAes=new G.default(this.observer,this.config,A);return this.decrypt(T,c)},w.decrypt=function(R,A){return new Promise(function(C){var T=R.audioTrack,c=R.avcTrack;T.samples&&T.isAAC?A.decryptAacSamples(T.samples,0,function(){c.samples?A.decryptAvcSamples(c.samples,0,0,function(){C(R)}):C(R)}):c.samples&&A.decryptAvcSamples(c.samples,0,0,function(){C(R)})})},w.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},w.parseAVCPES=function(R,A){var C=this,T=this._avcTrack,c=this.parseAVCNALu(R.data),S=!1,y=this.avcSample,b,B=!1;R.data=null,y&&c.length&&!T.audFound&&(s(y,T),y=this.avcSample=u(!1,R.pts,R.dts,"")),c.forEach(function(F){switch(F.type){case 1:{b=!0,y||(y=C.avcSample=u(!0,R.pts,R.dts,"")),S&&(y.debug+="NDR "),y.frame=!0;var _=F.data;if(B&&_.length>4){var M=new U.default(_).readSliceType();(M===2||M===4||M===7||M===9)&&(y.key=!0)}break}case 5:b=!0,y||(y=C.avcSample=u(!0,R.pts,R.dts,"")),S&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{b=!0,S&&y&&(y.debug+="SEI ");var I=new U.default(O(F.data));I.readUByte();for(var g=0,H=0,$=!1,ne=0;!$&&I.bytesAvailable>1;){g=0;do ne=I.readUByte(),g+=ne;while(ne===255);H=0;do ne=I.readUByte(),H+=ne;while(ne===255);if(g===4&&I.bytesAvailable!==0){$=!0;var se=I.readUByte();if(se===181){var Oe=I.readUShort();if(Oe===49){var ge=I.readUInt();if(ge===1195456820){var Te=I.readUByte();if(Te===3){for(var Re=I.readUByte(),Le=I.readUByte(),de=31&Re,he=[Re,Le],re=0;re16){for(var fe=[],oe=0;oe<16;oe++)fe.push(I.readUByte().toString(16)),(oe===3||oe===5||oe===7||oe===9)&&fe.push("-");for(var De=H-16,Fe=new Uint8Array(De),Ce=0;Ce=0){var I={data:R.subarray(_,y-T-1),type:M};S.push(I)}else{var g=this.getLastNalUnit();if(g&&(c&&y<=4-c&&(g.state&&(g.data=g.data.subarray(0,g.data.byteLength-c))),B=y-T-1,B>0)){var H=new Uint8Array(g.data.byteLength+B);H.set(g.data,0),H.set(R.subarray(0,B),g.data.byteLength),g.data=H,g.state=0}}y=0&&T>=0){var $={data:R.subarray(_,A),type:M,state:T};S.push($)}if(S.length===0){var ne=this.getLastNalUnit();if(ne){var se=new Uint8Array(ne.data.byteLength+R.byteLength);se.set(ne.data,0),se.set(R,ne.data.byteLength),ne.data=se}}return C.naluState=T,S},w.parseAACPES=function(R){var A=0,C=this._audioTrack,T=this.aacOverFlow,c=R.data;if(T){this.aacOverFlow=null;var S=T.sample.unit.byteLength,y=Math.min(T.missing,S),b=S-y;T.sample.unit.set(c.subarray(0,y),b),C.samples.push(T.sample),A=T.missing}var B,F;for(B=A,F=c.length;B1;){var S=new Uint8Array(c[0].length+c[1].length);S.set(c[0]),S.set(c[1],c[0].length),c[0]=S,c.splice(1,1)}D=c[0];var y=(D[0]<<16)+(D[1]<<8)+D[2];if(y===1){if(R=(D[4]<<8)+D[5],R&&R>E.size-6)return null;var b=D[7];b&192&&(C=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,b&64?(T=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,C-T>60*9e4&&(v.logger.warn(Math.round((C-T)/9e4)+"s delta between PTS and DTS, align them"),C=T)):T=C),A=D[8];var B=A+9;if(E.size<=B)return null;E.size-=B;for(var F=new Uint8Array(E.size),_=0,M=c.length;_I){B-=I;continue}else D=D.subarray(B),I-=B,B=0;F.set(D,w),w+=I}return R&&(R-=A+3),{data:F,pts:C,dts:T,len:R}}return null}function s(E,w){if(E.units.length&&E.frame){if(E.pts===void 0){var D=w.samples,R=D.length;if(R){var A=D[R-1];E.pts=A.pts,E.dts=A.dts}else{w.dropped++;return}}w.samples.push(E)}E.debug.length&&v.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function a(E,w){var D=E.length;if(D>0){if(w.pts>=E[D-1].pts)E.push(w);else for(var R=D-1;R>=0;R--)if(w.ptsC)return c;return 0}},{key:"maxAutoLevel",get:function(){var A=this.levels,C=this.autoLevelCapping,T;return C===-1&&A&&A.length?T=A.length-1:T=C,T}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(A){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,A)}},{key:"audioTracks",get:function(){var A=this.audioTrackController;return A?A.audioTracks:[]}},{key:"audioTrack",get:function(){var A=this.audioTrackController;return A?A.audioTrack:-1},set:function(A){var C=this.audioTrackController;C&&(C.audioTrack=A)}},{key:"subtitleTracks",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTrack:-1},set:function(A){var C=this.subtitleTrackController;C&&(C.subtitleTrack=A)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var A=this.subtitleTrackController;return A?A.subtitleDisplay:!1},set:function(A){var C=this.subtitleTrackController;C&&(C.subtitleDisplay=A)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(A){this.config.lowLatencyMode=A}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return w.defaultConfig?w.defaultConfig:u.hlsDefaultConfig},set:function(A){w.defaultConfig=A}}]),w}();E.defaultConfig=void 0},"./src/is-supported.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"isSupported",function(){return U}),P.d(J,"changeTypeSupported",function(){return K});var X=P("./src/utils/mediasource-helper.ts");function j(){return self.SourceBuffer||self.WebKitSourceBuffer}function U(){var G=Object(X.getMediaSource)();if(!G)return!1;var r=j(),L=G&&typeof G.isTypeSupported=="function"&&G.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!r||r.prototype&&typeof r.prototype.appendBuffer=="function"&&typeof r.prototype.remove=="function";return!!L&&!!v}function K(){var G,r=j();return typeof(r==null||((G=r.prototype)===null||G===void 0)?void 0:G.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h}),P.d(J,"LoadError",function(){return f});var X=P("./src/polyfills/number.ts"),j=P("./src/errors.ts");function U(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,v(l,o)}function K(l){var o=typeof Map=="function"?new Map:void 0;return K=function(a){if(a===null||!L(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(a))return o.get(a);o.set(a,O)}function O(){return G(a,arguments,m(this).constructor)}return O.prototype=Object.create(a.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v(O,a)},K(l)}function G(l,o,s){return r()?G=Reflect.construct:G=function(O,E,w){var D=[null];D.push.apply(D,E);var R=Function.bind.apply(O,D),A=new R;return w&&v(A,w.prototype),A},G.apply(null,arguments)}function r(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function L(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function v(l,o){return v=Object.setPrototypeOf||function(a,O){return a.__proto__=O,a},v(l,o)}function m(l){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(l)}var p=Math.pow(2,17),h=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var o=l.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(a,O){var E=this,w=a.url;if(!w)return Promise.reject(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(w?"part list":"url")));this.abort();var D=this.config,R=D.fLoader,A=D.loader;return new Promise(function(C,T){E.loader&&E.loader.destroy();var c=E.loader=a.loader=R?new R(D):new A(D),S=u(a),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};a.stats=c.stats,c.load(S,y,{onSuccess:function(B,F,_,M){E.resetLoader(a,c),C({frag:a,part:null,payload:B.data,networkDetails:M})},onError:function(B,F,_){E.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:B,networkDetails:_}))},onAbort:function(B,F,_){E.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:_}))},onTimeout:function(B,F,_){E.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:_}))},onProgress:function(B,F,_,M){O&&O({frag:a,part:null,payload:_,networkDetails:M})}})})},o.loadPart=function(a,O,E){var w=this;this.abort();var D=this.config,R=D.fLoader,A=D.loader;return new Promise(function(C,T){w.loader&&w.loader.destroy();var c=w.loader=a.loader=R?new R(D):new A(D),S=u(a,O),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};O.stats=c.stats,c.load(S,y,{onSuccess:function(B,F,_,M){w.resetLoader(a,c),w.updateStatsFromPart(a,O);var I={frag:a,part:O,payload:B.data,networkDetails:M};E(I),C(I)},onError:function(B,F,_){w.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:O,response:B,networkDetails:_}))},onAbort:function(B,F,_){a.stats.aborted=O.stats.aborted,w.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:O,networkDetails:_}))},onTimeout:function(B,F,_){w.resetLoader(a,c),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:O,networkDetails:_}))}})})},o.updateStatsFromPart=function(a,O){var E=a.stats,w=O.stats,D=w.total;if(E.loaded+=w.loaded,D){var R=Math.round(a.duration/O.duration),A=Math.min(Math.round(E.loaded/D),R),C=R-A,T=C*Math.round(E.loaded/A);E.total=E.loaded+T}else E.total=Math.max(E.loaded,E.total);var c=E.loading,S=w.loading;c.start?c.first+=S.first-S.start:(c.start=S.start,c.first=S.first),c.end=S.end},o.resetLoader=function(a,O){a.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},l}();function u(l,o){o===void 0&&(o=null);var s=o||l,a={frag:l,part:o,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},O=s.byteRangeStartOffset,E=s.byteRangeEndOffset;return Object(X.isFiniteNumber)(O)&&Object(X.isFiniteNumber)(E)&&(a.rangeStart=O,a.rangeEnd=E),a}var f=function(l){U(o,l);function o(s){for(var a,O=arguments.length,E=new Array(O>1?O-1:0),w=1;w>8*(15-D)&255;return w},a.setDecryptDataFromLevelKey=function(E,w){var D=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(D=G.LevelKey.fromURI(E.uri),D.method=E.method,D.iv=this.createInitializationVector(w),D.keyFormat="identity"),D},a.setElementaryStreamInfo=function(E,w,D,R,A,C){C===void 0&&(C=!1);var T=this.elementaryStreams,c=T[E];if(!c){T[E]={startPTS:w,endPTS:D,startDTS:R,endDTS:A,partial:C};return}c.startPTS=Math.min(c.startPTS,w),c.endPTS=Math.max(c.endPTS,D),c.startDTS=Math.min(c.startDTS,R),c.endDTS=Math.max(c.endDTS,A)},a.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[h.AUDIO]=null,E[h.VIDEO]=null,E[h.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&K.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(X.isFiniteNumber)(this.programDateTime))return null;var E=Object(X.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),s}(u),l=function(o){L(s,o);function s(a,O,E,w,D){var R;R=o.call(this,E)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new r.LoadStats,R.duration=a.decimalFloatingPoint("DURATION"),R.gap=a.bool("GAP"),R.independent=a.bool("INDEPENDENT"),R.relurl=a.enumeratedString("URI"),R.fragment=O,R.index=w;var A=a.enumeratedString("BYTERANGE");return A&&R.setByteRange(A,D),D&&(R.fragOffset=D.fragOffset+D.duration),R}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),s}(u)},"./src/loader/key-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return K});var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/utils/logger.ts"),K=function(){function G(L){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=L,this._registerListeners()}var r=G.prototype;return r._registerListeners=function(){this.hls.on(X.Events.KEY_LOADING,this.onKeyLoading,this)},r._unregisterListeners=function(){this.hls.off(X.Events.KEY_LOADING,this.onKeyLoading)},r.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var m=this.loaders[v];m&&m.destroy()}this.loaders={}},r.onKeyLoading=function(v,m){var p=m.frag,h=p.type,u=this.loaders[h];if(!p.decryptdata){U.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=p.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(u&&(U.logger.warn("abort previous key loader for type:"+h),u.abort()),!f){U.logger.warn("key uri is falsy");return}var o=l.loader,s=p.loader=this.loaders[h]=new o(l);this.decrypturl=f,this.decryptkey=null;var a={url:f,frag:p,responseType:"arraybuffer"},O={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,O,E)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(X.Events.KEY_LOADED,{frag:p}))},r.loadsuccess=function(v,m,p){var h=p.frag;if(!h.decryptdata){U.logger.error("after key load, decryptdata unset");return}this.decryptkey=h.decryptdata.key=new Uint8Array(v.data),h.loader=null,delete this.loaders[h.type],this.hls.trigger(X.Events.KEY_LOADED,{frag:h})},r.loaderror=function(v,m){var p=m.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:v})},r.loadtimeout=function(v,m){var p=m.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},G}()},"./src/loader/level-details.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"LevelDetails",function(){return G});var X=P("./src/polyfills/number.ts");function j(r,L){for(var v=0;vm.endSN||p>0||p===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},U(r,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(X.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||K}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var p=this.driftEnd-this.driftStart;return p*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),r}()},"./src/loader/level-key.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"LevelKey",function(){return G});var X=P("./node_modules/url-toolkit/src/url-toolkit.js"),j=P.n(X);function U(r,L){for(var v=0;v2){var T=C.shift()+".";return T+=parseInt(C.shift()).toString(16),T+=("000"+parseInt(C.shift()).toString(16)).substr(-4),T}return A},D.resolve=function(A,C){return j.buildAbsoluteURL(C,A,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(A,C){var T=[],c={},S=!1;p.lastIndex=0;for(var y;(y=p.exec(A))!=null;)if(y[1]){var b=new L.AttrList(y[1]),B={attrs:b,bitrate:b.decimalInteger("AVERAGE-BANDWIDTH")||b.decimalInteger("BANDWIDTH"),name:b.NAME,url:D.resolve(y[2],C)},F=b.decimalResolution("RESOLUTION");F&&(B.width=F.width,B.height=F.height),a((b.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),B),B.videoCodec&&B.videoCodec.indexOf("avc1")!==-1&&(B.videoCodec=D.convertAVC1ToAVCOTI(B.videoCodec)),T.push(B)}else if(y[3]){var _=new L.AttrList(y[3]);_["DATA-ID"]&&(S=!0,c[_["DATA-ID"]]=_)}return{levels:T,sessionData:S?c:null}},D.parseMasterPlaylistMedia=function(A,C,T,c){c===void 0&&(c=[]);var S,y=[],b=0;for(h.lastIndex=0;(S=h.exec(A))!==null;){var B=new L.AttrList(S[1]);if(B.TYPE===T){var F={attrs:B,bitrate:0,id:b++,groupId:B["GROUP-ID"],instreamId:B["INSTREAM-ID"],name:B.NAME||B.LANGUAGE||"",type:T,default:B.bool("DEFAULT"),autoselect:B.bool("AUTOSELECT"),forced:B.bool("FORCED"),lang:B.LANGUAGE,url:B.URI?D.resolve(B.URI,C):""};if(c.length){var _=D.findGroup(c,F.groupId)||c[0];O(F,_,"audioCodec"),O(F,_,"textCodec")}y.push(F)}}return y},D.parseLevelPlaylist=function(A,C,T,c,S){var y=new G.LevelDetails(C),b=y.fragments,B=null,F=0,_=0,M=0,I=0,g=null,H=new K.Fragment(c,C),$,ne,se,Oe=-1,ge=!1;for(u.lastIndex=0,y.m3u8=A;($=u.exec(A))!==null;){ge&&(ge=!1,H=new K.Fragment(c,C),H.start=M,H.sn=F,H.cc=I,H.level=T,B&&(H.initSegment=B,H.rawProgramDateTime=B.rawProgramDateTime));var Te=$[1];if(Te){H.duration=parseFloat(Te);var Re=(" "+$[2]).slice(1);H.title=Re||null,H.tagList.push(Re?["INF",Te,Re]:["INF",Te])}else if($[3])Object(X.isFiniteNumber)(H.duration)&&(H.start=M,se&&(H.levelkey=se),H.sn=F,H.level=T,H.cc=I,H.urlId=S,b.push(H),H.relurl=(" "+$[3]).slice(1),w(H,g),g=H,M+=H.duration,F++,_=0,ge=!0);else if($[4]){var Le=(" "+$[4]).slice(1);g?H.setByteRange(Le,g):H.setByteRange(Le)}else if($[5])H.rawProgramDateTime=(" "+$[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),Oe===-1&&(Oe=b.length);else{if($=$[0].match(f),!$){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(ne=1;ne<$.length&&!(typeof $[ne]!="undefined");ne++);var de=(" "+$[ne]).slice(1),he=(" "+$[ne+1]).slice(1),re=$[ne+2]?(" "+$[ne+2]).slice(1):"";switch(de){case"PLAYLIST-TYPE":y.type=he.toUpperCase();break;case"MEDIA-SEQUENCE":F=y.startSN=parseInt(he);break;case"SKIP":{var fe=new L.AttrList(he),oe=fe.decimalInteger("SKIPPED-SEGMENTS");if(Object(X.isFiniteNumber)(oe)){y.skippedSegments=oe;for(var De=oe;De--;)b.unshift(null);F+=oe}var Fe=fe.enumeratedString("RECENTLY-REMOVED-DATERANGES");Fe&&(y.recentlyRemovedDateranges=Fe.split(" "));break}case"TARGETDURATION":y.targetduration=parseFloat(he);break;case"VERSION":y.version=parseInt(he);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(he||re)&&H.tagList.push(re?[he,re]:[he]);break;case"DIS":I++;case"GAP":H.tagList.push([de]);break;case"BITRATE":H.tagList.push([de,he]);break;case"DISCONTINUITY-SEQ":I=parseInt(he);break;case"KEY":{var Ce,Ne=new L.AttrList(he),Be=Ne.enumeratedString("METHOD"),le=Ne.URI,ve=Ne.hexadecimalInteger("IV"),Se=Ne.enumeratedString("KEYFORMATVERSIONS"),Ie=Ne.enumeratedString("KEYID"),We=(Ce=Ne.enumeratedString("KEYFORMAT"))!=null?Ce:"identity",Ve=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ve.indexOf(We)>-1){v.logger.warn("Keyformat "+We+" is not supported from the manifest");continue}else if(We!=="identity")continue;Be&&(se=r.LevelKey.fromURL(C,le),le&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Be)>=0&&(se.method=Be,se.keyFormat=We,Ie&&(se.keyID=Ie),Se&&(se.keyFormatVersions=Se),se.iv=ve));break}case"START":{var Qe=new L.AttrList(he),Je=Qe.decimalFloatingPoint("TIME-OFFSET");Object(X.isFiniteNumber)(Je)&&(y.startTimeOffset=Je);break}case"MAP":{var st=new L.AttrList(he);H.relurl=st.URI,st.BYTERANGE&&H.setByteRange(st.BYTERANGE),H.level=T,H.sn="initSegment",se&&(H.levelkey=se),H.initSegment=null,B=H,ge=!0;break}case"SERVER-CONTROL":{var qe=new L.AttrList(he);y.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),y.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var at=new L.AttrList(he);y.partTarget=at.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ue=y.partList;Ue||(Ue=y.partList=[]);var ct=_>0?Ue[Ue.length-1]:void 0,lt=_++,je=new K.Part(new L.AttrList(he),H,C,lt,ct);Ue.push(je),H.duration+=je.duration;break}case"PRELOAD-HINT":{var Ge=new L.AttrList(he);y.preloadHint=Ge;break}case"RENDITION-REPORT":{var Ae=new L.AttrList(he);y.renditionReports=y.renditionReports||[],y.renditionReports.push(Ae);break}default:v.logger.warn("line parsed but not handled: "+$);break}}}g&&!g.relurl?(b.pop(),M-=g.duration,y.partList&&(y.fragmentHint=g)):y.partList&&(w(H,g),H.cc=I,y.fragmentHint=H);var _e=b.length,we=b[0],ae=b[_e-1];if(M+=y.skippedSegments*y.targetduration,M>0&&_e&&ae){y.averagetargetduration=M/_e;var ue=ae.sn;y.endSN=ue!=="initSegment"?ue:0,we&&(y.startCC=we.cc,we.initSegment||y.fragments.every(function(ce){return ce.relurl&&o(ce.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new K.Fragment(c,C),H.relurl=ae.relurl,H.level=T,H.sn="initSegment",we.initSegment=H,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(M+=y.fragmentHint.duration),y.totalduration=M,y.endCC=I,Oe>0&&E(b,Oe),y},D}();function a(D,R){["video","audio","text"].forEach(function(A){var C=D.filter(function(c){return Object(m.isCodecType)(c,A)});if(C.length){var T=C.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});R[A+"Codec"]=T.length>0?T[0]:C[0],D=D.filter(function(c){return C.indexOf(c)===-1})}}),R.unknownCodecs=D}function O(D,R,A){var C=R[A];C&&(D[A]=C)}function E(D,R){for(var A=D[R],C=R;C--;){var T=D[C];if(!T)return;T.programDateTime=A.programDateTime-T.duration*1e3,A=T}}function w(D,R){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):R!=null&&R.programDateTime&&(D.programDateTime=R.endProgramDateTime),Object(X.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/polyfills/number.ts"),j=P("./src/events.ts"),U=P("./src/errors.ts"),K=P("./src/utils/logger.ts"),G=P("./src/utils/mp4-tools.ts"),r=P("./src/loader/m3u8-parser.ts"),L=P("./src/types/loader.ts"),v=P("./src/utils/attr-list.ts");function m(u){var f=u.type;switch(f){case L.PlaylistContextType.AUDIO_TRACK:return L.PlaylistLevelType.AUDIO;case L.PlaylistContextType.SUBTITLE_TRACK:return L.PlaylistLevelType.SUBTITLE;default:return L.PlaylistLevelType.MAIN}}function p(u,f){var l=u.url;return(l===void 0||l.indexOf("data:")===0)&&(l=f.url),l}var h=function(){function u(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var f=u.prototype;return f.registerListeners=function(){var o=this.hls;o.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(j.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(j.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var o=this.hls;o.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(j.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(j.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(o){var s=this.hls.config,a=s.pLoader,O=s.loader,E=a||O,w=new E(s);return o.loader=w,this.loaders[o.type]=w,w},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var s=this.loaders[o];s&&s.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(o,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:L.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},f.onLevelLoading=function(o,s){var a=s.id,O=s.level,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:null,level:O,responseType:"text",type:L.PlaylistContextType.LEVEL,url:E,deliveryDirectives:w})},f.onAudioTrackLoading=function(o,s){var a=s.id,O=s.groupId,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:L.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:w})},f.onSubtitleTrackLoading=function(o,s){var a=s.id,O=s.groupId,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:L.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:w})},f.load=function(o){var s,a=this.hls.config,O=this.getInternalLoader(o);if(O){var E=O.context;if(E&&E.url===o.url){K.logger.trace("[playlist-loader]: playlist request ongoing");return}K.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),O.abort()}var w,D,R,A;switch(o.type){case L.PlaylistContextType.MANIFEST:w=a.manifestLoadingMaxRetry,D=a.manifestLoadingTimeOut,R=a.manifestLoadingRetryDelay,A=a.manifestLoadingMaxRetryTimeout;break;case L.PlaylistContextType.LEVEL:case L.PlaylistContextType.AUDIO_TRACK:case L.PlaylistContextType.SUBTITLE_TRACK:w=0,D=a.levelLoadingTimeOut;break;default:w=a.levelLoadingMaxRetry,D=a.levelLoadingTimeOut,R=a.levelLoadingRetryDelay,A=a.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(o),(s=o.deliveryDirectives)!==null&&s!==void 0&&s.part){var C;if(o.type===L.PlaylistContextType.LEVEL&&o.level!==null?C=this.hls.levels[o.level].details:o.type===L.PlaylistContextType.AUDIO_TRACK&&o.id!==null?C=this.hls.audioTracks[o.id].details:o.type===L.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(C=this.hls.subtitleTracks[o.id].details),C){var T=C.partTarget,c=C.targetduration;T&&c&&(D=Math.min(Math.max(T*3,c*.8)*1e3,D))}}var S={timeout:D,maxRetry:w,retryDelay:R,maxRetryDelay:A,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(o,S,y)},f.loadsuccess=function(o,s,a,O){if(O===void 0&&(O=null),a.isSidxRequest){this.handleSidxRequest(o,a),this.handlePlaylistLoaded(o,s,a,O);return}this.resetInternalLoader(a.type);var E=o.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,a,"no EXTM3U delimiter",O);return}s.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,s,a,O):this.handleMasterPlaylist(o,s,a,O)},f.loaderror=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,o)},f.loadtimeout=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},f.handleMasterPlaylist=function(o,s,a,O){var E=this.hls,w=o.data,D=p(o,a),R=r.default.parseMasterPlaylist(w,D),A=R.levels,C=R.sessionData;if(!A.length){this.handleManifestParsingError(o,a,"no level found in manifest",O);return}var T=A.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),c=A.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),S=r.default.parseMasterPlaylistMedia(w,D,"AUDIO",T),y=r.default.parseMasterPlaylistMedia(w,D,"SUBTITLES",c),b=r.default.parseMasterPlaylistMedia(w,D,"CLOSED-CAPTIONS");if(S.length){var B=S.some(function(F){return!F.url});!B&&A[0].audioCodec&&!A[0].attrs.AUDIO&&(K.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),S.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}E.trigger(j.Events.MANIFEST_LOADED,{levels:A,audioTracks:S,subtitles:y,captions:b,url:D,stats:s,networkDetails:O,sessionData:C})},f.handleTrackOrLevelPlaylist=function(o,s,a,O){var E=this.hls,w=a.id,D=a.level,R=a.type,A=p(o,a),C=Object(X.isFiniteNumber)(w)?w:0,T=Object(X.isFiniteNumber)(D)?D:C,c=m(a),S=r.default.parseLevelPlaylist(o.data,A,T,c,C);if(!S.fragments.length){E.trigger(j.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:A,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(R===L.PlaylistContextType.MANIFEST){var y={attrs:new v.AttrList({}),bitrate:0,details:S,name:"",url:A};E.trigger(j.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:A,stats:s,networkDetails:O,sessionData:null})}if(s.parsing.end=performance.now(),S.needSidxRanges){var b,B=(b=S.fragments[0].initSegment)===null||b===void 0?void 0:b.url;this.load({url:B,isSidxRequest:!0,type:R,level:D,levelDetails:S,id:w,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=S,this.handlePlaylistLoaded(o,s,a,O)},f.handleSidxRequest=function(o,s){var a=Object(G.parseSegmentIndex)(new Uint8Array(o.data));if(!a)return;var O=a.references,E=s.levelDetails;O.forEach(function(w,D){var R=w.info,A=E.fragments[D];A.byteRange.length===0&&A.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),A.initSegment&&A.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(o,s,a,O){this.hls.trigger(j.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===L.PlaylistContextType.MANIFEST,url:o.url,reason:a,response:o,context:s,networkDetails:O})},f.handleNetworkError=function(o,s,a,O){a===void 0&&(a=!1),K.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var E=U.ErrorDetails.UNKNOWN,w=!1,D=this.getInternalLoader(o);switch(o.type){case L.PlaylistContextType.MANIFEST:E=a?U.ErrorDetails.MANIFEST_LOAD_TIMEOUT:U.ErrorDetails.MANIFEST_LOAD_ERROR,w=!0;break;case L.PlaylistContextType.LEVEL:E=a?U.ErrorDetails.LEVEL_LOAD_TIMEOUT:U.ErrorDetails.LEVEL_LOAD_ERROR,w=!1;break;case L.PlaylistContextType.AUDIO_TRACK:E=a?U.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,w=!1;break;case L.PlaylistContextType.SUBTITLE_TRACK:E=a?U.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:U.ErrorDetails.SUBTITLE_LOAD_ERROR,w=!1;break}D&&this.resetInternalLoader(o.type);var R={type:U.ErrorTypes.NETWORK_ERROR,details:E,fatal:w,url:o.url,loader:D,context:o,networkDetails:s};O&&(R.response=O),this.hls.trigger(j.Events.ERROR,R)},f.handlePlaylistLoaded=function(o,s,a,O){var E=a.type,w=a.level,D=a.id,R=a.groupId,A=a.loader,C=a.levelDetails,T=a.deliveryDirectives;if(!(C!=null&&C.targetduration)){this.handleManifestParsingError(o,a,"invalid target duration",O);return}if(!A)return;C.live&&(A.getCacheAge&&(C.ageHeader=A.getCacheAge()||0),(!A.getCacheAge||isNaN(C.ageHeader))&&(C.ageHeader=0));switch(E){case L.PlaylistContextType.MANIFEST:case L.PlaylistContextType.LEVEL:this.hls.trigger(j.Events.LEVEL_LOADED,{details:C,level:w||0,id:D||0,stats:s,networkDetails:O,deliveryDirectives:T});break;case L.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(j.Events.AUDIO_TRACK_LOADED,{details:C,id:D||0,groupId:R||"",stats:s,networkDetails:O,deliveryDirectives:T});break;case L.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(j.Events.SUBTITLE_TRACK_LOADED,{details:C,id:D||0,groupId:R||"",stats:s,networkDetails:O,deliveryDirectives:T});break}},u}();J.default=h},"./src/polyfills/number.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"isFiniteNumber",function(){return X}),P.d(J,"MAX_SAFE_INTEGER",function(){return j});var X=Number.isFinite||function(U){return typeof U=="number"&&isFinite(U)},j=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,J,P){"use strict";P.r(J);var X=function(){function j(){}return j.getSilentFrame=function(K,G){switch(K){case"mp4a.40.2":if(G===1)return new Uint8Array([0,200,0,128,35,128]);if(G===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(G===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(G===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(G===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(G===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(G===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(G===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(G===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},j}();J.default=X},"./src/remux/mp4-generator.ts":function(ie,J,P){"use strict";P.r(J);var X=Math.pow(2,32)-1,j=function(){function U(){}return U.init=function(){U.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var G;for(G in U.types)U.types.hasOwnProperty(G)&&(U.types[G]=[G.charCodeAt(0),G.charCodeAt(1),G.charCodeAt(2),G.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),L=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);U.HDLR_TYPES={video:r,audio:L};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);U.STTS=U.STSC=U.STCO=m,U.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),U.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),U.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),h=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);U.FTYP=U.box(U.types.ftyp,p,u,p,h),U.DINF=U.box(U.types.dinf,U.box(U.types.dref,v))},U.box=function(G){for(var r=8,L=arguments.length,v=new Array(L>1?L-1:0),m=1;m>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,u.set(G,4),p=0,r=8;p>24&255,G>>16&255,G>>8&255,G&255,L>>24,L>>16&255,L>>8&255,L&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},U.mdia=function(G){return U.box(U.types.mdia,U.mdhd(G.timescale,G.duration),U.hdlr(G.type),U.minf(G))},U.mfhd=function(G){return U.box(U.types.mfhd,new Uint8Array([0,0,0,0,G>>24,G>>16&255,G>>8&255,G&255]))},U.minf=function(G){return G.type==="audio"?U.box(U.types.minf,U.box(U.types.smhd,U.SMHD),U.DINF,U.stbl(G)):U.box(U.types.minf,U.box(U.types.vmhd,U.VMHD),U.DINF,U.stbl(G))},U.moof=function(G,r,L){return U.box(U.types.moof,U.mfhd(G),U.traf(L,r))},U.moov=function(G){for(var r=G.length,L=[];r--;)L[r]=U.trak(G[r]);return U.box.apply(null,[U.types.moov,U.mvhd(G[0].timescale,G[0].duration)].concat(L).concat(U.mvex(G)))},U.mvex=function(G){for(var r=G.length,L=[];r--;)L[r]=U.trex(G[r]);return U.box.apply(null,[U.types.mvex].concat(L))},U.mvhd=function(G,r){r*=G;var L=Math.floor(r/(X+1)),v=Math.floor(r%(X+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,G>>24&255,G>>16&255,G>>8&255,G&255,L>>24,L>>16&255,L>>8&255,L&255,v>>24,v>>16&255,v>>8&255,v&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return U.box(U.types.mvhd,m)},U.sdtp=function(G){var r=G.samples||[],L=new Uint8Array(4+r.length),v,m;for(v=0;v>>8&255),r.push(p&255),r=r.concat(Array.prototype.slice.call(m));for(v=0;v>>8&255),L.push(p&255),L=L.concat(Array.prototype.slice.call(m));var h=U.box(U.types.avcC,new Uint8Array([1,r[3],r[4],r[5],252|3,224|G.sps.length].concat(r).concat([G.pps.length]).concat(L))),u=G.width,f=G.height,l=G.pixelRatio[0],o=G.pixelRatio[1];return U.box(U.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),h,U.box(U.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),U.box(U.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,o>>24,o>>16&255,o>>8&255,o&255])))},U.esds=function(G){var r=G.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(G.config).concat([6,1,2]))},U.mp4a=function(G){var r=G.samplerate;return U.box(U.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,G.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),U.box(U.types.esds,U.esds(G)))},U.mp3=function(G){var r=G.samplerate;return U.box(U.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,G.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))},U.stsd=function(G){return G.type==="audio"?!G.isAAC&&G.codec==="mp3"?U.box(U.types.stsd,U.STSD,U.mp3(G)):U.box(U.types.stsd,U.STSD,U.mp4a(G)):U.box(U.types.stsd,U.STSD,U.avc1(G))},U.tkhd=function(G){var r=G.id,L=G.duration*G.timescale,v=G.width,m=G.height,p=Math.floor(L/(X+1)),h=Math.floor(L%(X+1));return U.box(U.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,v>>8&255,v&255,0,0,m>>8&255,m&255,0,0]))},U.traf=function(G,r){var L=U.sdtp(G),v=G.id,m=Math.floor(r/(X+1)),p=Math.floor(r%(X+1));return U.box(U.types.traf,U.box(U.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),U.box(U.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,p>>24,p>>16&255,p>>8&255,p&255])),U.trun(G,L.length+16+20+8+16+8+8),L)},U.trak=function(G){return G.duration=G.duration||4294967295,U.box(U.types.trak,U.tkhd(G),U.mdia(G))},U.trex=function(G){var r=G.id;return U.box(U.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},U.trun=function(G,r){var L=G.samples||[],v=L.length,m=12+16*v,p=new Uint8Array(m),h,u,f,l,o,s;for(r+=8+m,p.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),h=0;h>>24&255,f>>>16&255,f>>>8&255,f&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*h);return U.box(U.types.trun,p)},U.initSegment=function(G){U.types||U.init();var r=U.moov(G),L=new Uint8Array(U.FTYP.byteLength+r.byteLength);return L.set(U.FTYP),L.set(r,U.FTYP.byteLength),L},U}();j.types=void 0,j.HDLR_TYPES=void 0,j.STTS=void 0,j.STSC=void 0,j.STCO=void 0,j.STSZ=void 0,j.VMHD=void 0,j.SMHD=void 0,j.STSD=void 0,j.FTYP=void 0,j.DINF=void 0,J.default=j},"./src/remux/mp4-remuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return s}),P.d(J,"normalizePts",function(){return a});var X=P("./src/polyfills/number.ts"),j=P("./src/remux/aac-helper.ts"),U=P("./src/remux/mp4-generator.ts"),K=P("./src/events.ts"),G=P("./src/errors.ts"),r=P("./src/utils/logger.ts"),L=P("./src/types/loader.ts"),v=P("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(D){for(var R=1;R0?S:y.pts},C[0].pts);return T&&r.logger.debug("PTS rollover detected"),c},R.remux=function(C,T,c,S,y,b,B,F){var _,M,I,g,H,$,ne=y,se=y,Oe=C.pid>-1,ge=T.pid>-1,Te=T.samples.length,Re=C.samples.length>0,Le=Te>1,de=(!Oe||Re)&&(!ge||Le)||this.ISGenerated||B;if(de){this.ISGenerated||(I=this.generateIS(C,T,y));var he=this.isVideoContiguous,re=-1;if(Le&&(re=O(T.samples),!he&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,re>0){r.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+Te+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(T.samples);T.samples=T.samples.slice(re),T.dropped+=re,se+=(T.samples[0].pts-fe)/(T.timescale||9e4)}else re===-1&&(r.logger.warn("[mp4-remuxer]: No keyframe found out of "+Te+" video samples"),$=!1);if(this.ISGenerated){if(Re&&Le){var oe=this.getVideoStartPts(T.samples),De=a(C.samples[0].pts,oe)-oe,Fe=De/T.inputTimeScale;ne+=Math.max(0,Fe),se+=Math.max(0,-Fe)}if(Re){if(C.samplerate||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),I=this.generateIS(C,T,y)),M=this.remuxAudio(C,ne,this.isAudioContiguous,b,ge||Le||F===L.PlaylistLevelType.AUDIO?se:void 0),Le){var Ce=M?M.endPTS-M.startPTS:0;T.inputTimeScale||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),I=this.generateIS(C,T,y)),_=this.remuxVideo(T,se,he,Ce)}}else Le&&(_=this.remuxVideo(T,se,he,0));_&&(_.firstKeyFrame=re,_.independent=re!==-1)}}return this.ISGenerated&&(c.samples.length&&(H=this.remuxID3(c,y)),S.samples.length&&(g=this.remuxText(S,y))),{audio:M,video:_,initSegment:I,independent:$,text:g,id3:H}},R.generateIS=function(C,T,c){var S=C.samples,y=T.samples,b=this.typeSupported,B={},F=!Object(X.isFiniteNumber)(this._initPTS),_="audio/mp4",M,I,g;if(F&&(M=I=Infinity),C.config&&S.length&&(C.timescale=C.samplerate,C.isAAC||(b.mpeg?(_="audio/mpeg",C.codec=""):b.mp3&&(C.codec="mp3")),B.audio={id:"audio",container:_,codec:C.codec,initSegment:!C.isAAC&&b.mpeg?new Uint8Array(0):U.default.initSegment([C]),metadata:{channelCount:C.channelCount}},F&&(g=C.inputTimeScale,M=I=S[0].pts-Math.round(g*c))),T.sps&&T.pps&&y.length&&(T.timescale=T.inputTimeScale,B.video={id:"main",container:"video/mp4",codec:T.codec,initSegment:U.default.initSegment([T]),metadata:{width:T.width,height:T.height}},F)){g=T.inputTimeScale;var H=this.getVideoStartPts(y),$=Math.round(g*c);I=Math.min(I,a(y[0].dts,H)-$),M=Math.min(M,H-$)}if(Object.keys(B).length)return this.ISGenerated=!0,F&&(this._initPTS=M,this._initDTS=I),{tracks:B,initPTS:M,timescale:g}},R.remuxVideo=function(C,T,c,S){var y=C.inputTimeScale,b=C.samples,B=[],F=b.length,_=this._initPTS,M=this.nextAvcDts,I=8,g,H,$,ne=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,Oe=0,ge=!1;if(!c||M===null){var Te=T*y,Re=b[0].pts-a(b[0].dts,b[0].pts);M=Te-Re}for(var Le=0;Lede.pts){var he=9e4*.2;Oe=Math.max(Math.min(Oe,de.pts-de.dts),-1*he)}de.dts0?Le-1:Le].dts&&(ge=!0)}ge&&b.sort(function(yt,dt){var ft=yt.dts-dt.dts,Ot=yt.pts-dt.pts;return ft||Ot}),H=b[0].dts,$=b[b.length-1].dts;var re=Math.round(($-H)/(F-1));if(Oe<0){if(Oere,Ne=Fe<-1;if(Ce||Ne){Ce?r.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):r.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),H=M;var Be=b[0].pts-Fe;b[0].dts=H,b[0].pts=Be,r.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Be,!0)+"/"+Object(v.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(Fe,!0)+" ms")}}o&&(H=Math.max(0,H));for(var le=0,ve=0,Se=0;Se0?Ue-1:Ue].dts;if(ue.stretchShortVideoTrack&&this.nextAudioPts!==null){var me=Math.floor(ue.maxBufferHole*y),xe=(S?ne+S*y:this.nextAudioPts)-ct.pts;xe>me?(g=xe-ce,g<0&&(g=ce),r.logger.log("[mp4-remuxer]: It is approximately "+xe/90+" ms to the next segment; using duration "+g/90+" ms for the last video frame.")):g=ce}else g=ce}var Pe=Math.round(ct.pts-ct.dts);B.push(new E(ct.key,g,je,Pe))}if(B.length&&f&&f<70){var He=B[0].flags;He.dependsOn=2,He.isNonSync=0}console.assert(g!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=$+g,this.isVideoContiguous=!0;var ze=U.default.moof(C.sequenceNumber++,H,m({},C,{samples:B})),ht="video",ot={data1:ze,data2:qe,startPTS:ne/y,endPTS:(se+g)/y,startDTS:H/y,endDTS:M/y,type:ht,hasAudio:!1,hasVideo:!0,nb:B.length,dropped:C.dropped};return C.samples=[],C.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),ot},R.remuxAudio=function(C,T,c,S,y){var b=C.inputTimeScale,B=C.samplerate?C.samplerate:b,F=b/B,_=C.isAAC?h:u,M=_*F,I=this._initPTS,g=!C.isAAC&&this.typeSupported.mpeg,H=[],$=C.samples,ne=g?0:8,se=this.nextAudioPts||-1,Oe=T*b;if(this.isAudioContiguous=c=c||$.length&&se>0&&(S&&Math.abs(Oe-se)<9e3||Math.abs(a($[0].pts-I,Oe)-se)<20*M),$.forEach(function(we){we.pts=a(we.pts-I,Oe)}),!c||se<0){if($=$.filter(function(we){return we.pts>=0}),!$.length)return;y===0?se=0:S?se=Math.max(0,Oe):se=$[0].pts}if(C.isAAC)for(var ge=y!==void 0,Te=this.config.maxAudioFramesDrift,Re=0,Le=se;Re<$.length;Re++){var de=$[Re],he=de.pts,re=he-Le,fe=Math.abs(1e3*re/b);if(re<=-Te*M&&ge)Re===0&&(r.logger.warn("Audio frame @ "+(he/b).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/b)+" ms."),this.nextAudioPts=se=Le=he);else if(re>=Te*M&&fe0){ve+=ne;try{le=new Uint8Array(ve)}catch(we){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:G.ErrorTypes.MUX_ERROR,details:G.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!g){var qe=new DataView(le.buffer);qe.setUint32(0,ve),le.set(U.default.types.mdat,4)}}else return;le.set(Qe,ne);var at=Qe.byteLength;ne+=at,H.push(new E(!0,_,at,0)),Be=Je}var Ue=H.length;if(!Ue)return;var ct=H[H.length-1];this.nextAudioPts=se=Be+F*ct.duration;var lt=g?new Uint8Array(0):U.default.moof(C.sequenceNumber++,Ne/F,m({},C,{samples:H}));C.samples=[];var je=Ne/b,Ge=se/b,Ae="audio",_e={data1:lt,data2:le,startPTS:je,endPTS:Ge,startDTS:je,endDTS:Ge,type:Ae,hasAudio:!0,hasVideo:!1,nb:Ue};return this.isAudioContiguous=!0,console.assert(le.length,"MDAT length must not be zero"),_e},R.remuxEmptyAudio=function(C,T,c,S){var y=C.inputTimeScale,b=C.samplerate?C.samplerate:y,B=y/b,F=this.nextAudioPts,_=(F!==null?F:S.startDTS*y)+this._initDTS,M=S.endDTS*y+this._initDTS,I=B*h,g=Math.ceil((M-_)/I),H=j.default.getSilentFrame(C.manifestCodec||C.codec,C.channelCount);if(r.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){r.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],ne=0;ne4294967296;)D+=A;return D}function O(D){for(var R=0;R0?this.lastEndDTS=C:(K.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var T=!!D.audio,c=!!D.video,S="";T&&(S+="audio"),c&&(S+="video");var y={data1:E,startPTS:A,startDTS:A,endPTS:C,endDTS:C,type:S,hasAudio:T,hasVideo:c,nb:1,dropped:0};return O.audio=y.type==="audio"?y:void 0,O.video=y.type!=="audio"?y:void 0,O.text=l,O.id3=f,O.initSegment=w,O},v}(),r=function(m,p,h){return Object(j.getStartDTS)(m,p)-h};function L(v,m){var p=v==null?void 0:v.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||m===U.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}J.default=G},"./src/task-loop.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return X});var X=function(){function j(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var U=j.prototype;return U.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},U.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},U.onHandlerDestroyed=function(){},U.hasInterval=function(){return!!this._tickInterval},U.hasNextTick=function(){return!!this._tickTimer},U.setInterval=function(G){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,G),!0)},U.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},U.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},U.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},U.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},U.doTick=function(){},j}()},"./src/types/cmcd.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"CMCDVersion",function(){return X}),P.d(J,"CMCDObjectType",function(){return j}),P.d(J,"CMCDStreamingFormat",function(){return U}),P.d(J,"CMCDStreamType",function(){return K});var X=1,j;(function(G){G.MANIFEST="m",G.AUDIO="a",G.VIDEO="v",G.MUXED="av",G.INIT="i",G.CAPTION="c",G.TIMED_TEXT="tt",G.KEY="k",G.OTHER="o"})(j||(j={}));var U;(function(G){G.DASH="d",G.HLS="h",G.SMOOTH="s",G.OTHER="o"})(U||(U={}));var K;(function(G){G.VOD="v",G.LIVE="l"})(K||(K={}))},"./src/types/level.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"HlsSkip",function(){return U}),P.d(J,"getSkipValue",function(){return K}),P.d(J,"HlsUrlParameters",function(){return G}),P.d(J,"Level",function(){return r});function X(L,v){for(var m=0;mNumber.MAX_SAFE_INTEGER?Infinity:v},G.hexadecimalInteger=function(L){if(this[L]){var v=(this[L]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var m=new Uint8Array(v.length/2),p=0;pNumber.MAX_SAFE_INTEGER?Infinity:v},G.decimalFloatingPoint=function(L){return parseFloat(this[L])},G.optionalFloat=function(L,v){var m=this[L];return m?parseFloat(m):v},G.enumeratedString=function(L){return this[L]},G.bool=function(L){return this[L]==="YES"},G.decimalResolution=function(L){var v=X.exec(this[L]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},K.parseAttrList=function(L){var v,m={},p='"';for(j.lastIndex=0;(v=j.exec(L))!==null;){var h=v[2];h.indexOf(p)===0&&h.lastIndexOf(p)===h.length-1&&(h=h.slice(1,-1)),m[v[1]]=h}return m},K}()},"./src/utils/binary-search.ts":function(ie,J,P){"use strict";P.r(J);var X={search:function(U,K){for(var G=0,r=U.length-1,L=null,v=null;G<=r;){L=(G+r)/2|0,v=U[L];var m=K(v);if(m>0)G=L+1;else if(m<0)r=L-1;else return v}return null}};J.default=X},"./src/utils/buffer-helper.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"BufferHelper",function(){return U});var X=P("./src/utils/logger.ts"),j={length:0,start:function(){return 0},end:function(){return 0}},U=function(){function K(){}return K.isBuffered=function(r,L){try{if(r){for(var v=K.getBuffered(r),m=0;m=v.start(m)&&L<=v.end(m))return!0}}catch(p){}return!1},K.bufferInfo=function(r,L,v){try{if(r){var m=K.getBuffered(r),p=[],h;for(h=0;hu&&(m[h-1].end=r[p].end):m.push(r[p])}else m.push(r[p])}else m=r;for(var f=0,l,o=L,s=L,a=0;a=O&&L=c&&X.logger.log(this.time+" ["+c+"] "+S)},A}(),f=function(C){for(var T=[],c=0;cG&&(this.logger.log(h.DEBUG,"Too large cursor position "+this.pos),this.pos=G)},C.moveCursor=function(c){var S=this.pos+c;if(c>1)for(var y=this.pos+1;y=144&&this.backSpace();var S=U(c);if(this.pos>=G){this.logger.log(h.ERROR,"Cannot insert "+c.toString(16)+" ("+S+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(S,this.currPenState),this.moveCursor(1)},C.clearFromPos=function(c){var S;for(S=c;S0&&(c?y="["+S.join(" | ")+"]":y=S.join(` -`)),y},C.getTextAndFormat=function(){return this.rows},A}(),O=function(){function A(T,c,S){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=T,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new a(S),this.nonDisplayedMemory=new a(S),this.lastOutputScreen=new a(S),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=S}var C=A.prototype;return C.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},C.getHandler=function(){return this.outputFilter},C.setHandler=function(c){this.outputFilter=c},C.setPAC=function(c){this.writeScreen.setPAC(c)},C.setBkgData=function(c){this.writeScreen.setBkgData(c)},C.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(h.INFO,"MODE="+c),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=c},C.insertChars=function(c){for(var S=0;S=46,S.italics)S.foreground="white";else{var y=Math.floor(c/2)-16,b=["white","green","blue","cyan","red","yellow","magenta"];S.foreground=b[y]}this.logger.log(h.INFO,"MIDROW: "+JSON.stringify(S)),this.writeScreen.setPen(S)},C.outputDataUpdate=function(c){c===void 0&&(c=!1);var S=this.logger.time;if(S===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=S:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,S,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:S),this.lastOutputScreen.copy(this.displayedMemory))},C.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},A}(),E=function(){function A(T,c,S){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new u;this.channels=[null,new O(T,c,y),new O(T+1,S,y)],this.cmdHistory=R(),this.logger=y}var C=A.prototype;return C.getHandler=function(c){return this.channels[c].getHandler()},C.setHandler=function(c,S){this.channels[c].setHandler(S)},C.addData=function(c,S){var y,b,B,F=!1;this.logger.time=c;for(var _=0;_ ("+f([b,B])+")"),y=this.parseCmd(b,B),y||(y=this.parseMidrow(b,B)),y||(y=this.parsePAC(b,B)),y||(y=this.parseBackgroundAttributes(b,B)),!y&&(F=this.parseChars(b,B),F)){var M=this.currentChannel;if(M&&M>0){var I=this.channels[M];I.insertChars(F)}else this.logger.log(h.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!F&&this.logger.log(h.WARNING,"Couldn't parse cleaned data "+f([b,B])+" orig: "+f([S[_],S[_+1]]))}},C.parseCmd=function(c,S){var y=this.cmdHistory,b=(c===20||c===28||c===21||c===29)&&S>=32&&S<=47,B=(c===23||c===31)&&S>=33&&S<=35;if(!(b||B))return!1;if(D(c,S,y))return w(null,null,y),this.logger.log(h.DEBUG,"Repeated command ("+f([c,S])+") is dropped"),!0;var F=c===20||c===21||c===23?1:2,_=this.channels[F];return c===20||c===21||c===28||c===29?S===32?_.ccRCL():S===33?_.ccBS():S===34?_.ccAOF():S===35?_.ccAON():S===36?_.ccDER():S===37?_.ccRU(2):S===38?_.ccRU(3):S===39?_.ccRU(4):S===40?_.ccFON():S===41?_.ccRDC():S===42?_.ccTR():S===43?_.ccRTD():S===44?_.ccEDM():S===45?_.ccCR():S===46?_.ccENM():S===47&&_.ccEOC():_.ccTO(S-32),w(c,S,y),this.currentChannel=F,!0},C.parseMidrow=function(c,S){var y=0;if((c===17||c===25)&&S>=32&&S<=47){if(c===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(h.ERROR,"Mismatch channel in midrow parsing"),!1;var b=this.channels[y];return b?(b.ccMIDROW(S),this.logger.log(h.DEBUG,"MIDROW ("+f([c,S])+")"),!0):!1}return!1},C.parsePAC=function(c,S){var y,b=this.cmdHistory,B=(c>=17&&c<=23||c>=25&&c<=31)&&S>=64&&S<=127,F=(c===16||c===24)&&S>=64&&S<=95;if(!(B||F))return!1;if(D(c,S,b))return w(null,null,b),!0;var _=c<=23?1:2;S>=64&&S<=95?y=_===1?r[c]:v[c]:y=_===1?L[c]:m[c];var M=this.channels[_];return M?(M.setPAC(this.interpretPAC(y,S)),w(c,S,b),this.currentChannel=_,!0):!1},C.interpretPAC=function(c,S){var y,b={color:null,italics:!1,indent:null,underline:!1,row:c};return S>95?y=S-96:y=S-64,b.underline=(y&1)===1,y<=13?b.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(b.italics=!0,b.color="white"):b.indent=Math.floor((y-16)/2)*4,b},C.parseChars=function(c,S){var y,b=null,B=null;if(c>=25?(y=2,B=c-8):(y=1,B=c),B>=17&&B<=19){var F;B===17?F=S+80:B===18?F=S+112:F=S+144,this.logger.log(h.INFO,"Special char '"+U(F)+"' in channel "+y),b=[F]}else c>=32&&c<=127&&(b=S===0?[c]:[c,S]);if(b){var _=f(b);this.logger.log(h.DEBUG,"Char codes = "+_.join(",")),w(c,S,this.cmdHistory)}return b},C.parseBackgroundAttributes=function(c,S){var y=(c===16||c===24)&&S>=32&&S<=47,b=(c===23||c===31)&&S>=45&&S<=47;if(!(y||b))return!1;var B,F={};c===16||c===24?(B=Math.floor((S-32)/2),F.background=p[B],S%2===1&&(F.background=F.background+"_semi")):S===45?F.background="transparent":(F.foreground="black",S===47&&(F.underline=!0));var _=c<=23?1:2,M=this.channels[_];return M.setBkgData(F),w(c,S,this.cmdHistory),!0},C.reset=function(){for(var c=0;c=16?o--:o++;var w=Object(X.fixLineBreaks)(s.trim()),D=Object(j.generateCueId)(v,m,w);(!L||!L.cues||!L.cues.getCueById(D))&&(f=new a(v,m,w),f.id=D,f.line=O+1,f.align="left",f.position=10+Math.min(80,Math.floor(o*8/32)*10),h.push(f))}return L&&h.length&&(h.sort(function(R,A){return R.line==="auto"||A.line==="auto"?0:R.line>8&&A.line>8?A.line-R.line:R.line-A.line}),h.forEach(function(R){return Object(U.addCueToTrack)(L,R)})),h}};J.default=G},"./src/utils/discontinuities.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"findFirstFragWithCC",function(){return K}),P.d(J,"shouldAlignOnDiscontinuities",function(){return G}),P.d(J,"findDiscontinuousReferenceFrag",function(){return r}),P.d(J,"adjustSlidingStart",function(){return v}),P.d(J,"alignStream",function(){return m}),P.d(J,"alignPDT",function(){return h}),P.d(J,"alignFragmentByPDTDelta",function(){return u}),P.d(J,"alignMediaPlaylistByPDT",function(){return f});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/logger.ts"),U=P("./src/controller/level-helper.ts");function K(l,o){for(var s=null,a=0,O=l.length;as.startCC||l&&l.cc=this.minWeight_},K.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},K.destroy=function(){},U}();J.default=j},"./src/utils/ewma.ts":function(ie,J,P){"use strict";P.r(J);var X=function(){function j(K,G,r){G===void 0&&(G=0),r===void 0&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=K,this.alpha_=K?Math.exp(Math.log(.5)/K):0,this.estimate_=G,this.totalWeight_=r}var U=j.prototype;return U.sample=function(G,r){var L=Math.pow(this.alpha_,G);this.estimate_=r*(1-L)+L*this.estimate_,this.totalWeight_+=G},U.getTotalWeight=function(){return this.totalWeight_},U.getEstimate=function(){if(this.alpha_){var G=1-Math.pow(this.alpha_,this.totalWeight_);if(G)return this.estimate_/G}return this.estimate_},j}();J.default=X},"./src/utils/fetch-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"fetchSupported",function(){return u});var X=P("./src/polyfills/number.ts"),j=P("./src/loader/load-stats.ts"),U=P("./src/demux/chunk-cache.ts");function K(a,O){a.prototype=Object.create(O.prototype),a.prototype.constructor=a,m(a,O)}function G(a){var O=typeof Map=="function"?new Map:void 0;return G=function(w){if(w===null||!v(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(w))return O.get(w);O.set(w,D)}function D(){return r(w,arguments,p(this).constructor)}return D.prototype=Object.create(w.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),m(D,w)},G(a)}function r(a,O,E){return L()?r=Reflect.construct:r=function(D,R,A){var C=[null];C.push.apply(C,R);var T=Function.bind.apply(D,C),c=new T;return A&&m(c,A.prototype),c},r.apply(null,arguments)}function L(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function v(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function m(a,O){return m=Object.setPrototypeOf||function(w,D){return w.__proto__=D,w},m(a,O)}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},p(a)}function h(){return h=Object.assign||function(a){for(var O=1;O=A&&C(D,R,T.flush(),w)):C(D,R,B,w),y()}).catch(function(){return Promise.reject()})};return S()},a}();function l(a,O){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(h({},a.headers))};return a.rangeEnd&&E.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),E}function o(a,O){return new self.Request(a.url,O)}var s=function(a){K(O,a);function O(E,w,D){var R;return R=a.call(this,E)||this,R.code=void 0,R.details=void 0,R.code=w,R.details=D,R}return O}(G(Error));J.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"IMSC1_CODEC",function(){return v}),P.d(J,"parseIMSC1",function(){return u});var X=P("./src/utils/mp4-tools.ts"),j=P("./src/utils/vttparser.ts"),U=P("./src/utils/vttcue.ts"),K=P("./src/demux/id3.ts"),G=P("./src/utils/timescale-conversion.ts"),r=P("./src/utils/webvtt-parser.ts");function L(){return L=Object.assign||function(A){for(var C=1;C"):X}function G(v){for(var m=arguments.length,p=new Array(m>1?m-1:0),h=1;h>24,O[E+1]=w>>16&255,O[E+2]=w>>8&255,O[E+3]=w&255}function m(O,E){var w=[];if(!E.length)return w;var D,R,A;"data"in O?(D=O.data,R=O.start,A=O.end):(D=O,R=0,A=D.byteLength);for(var C=R;C1?C+T:A;if(c===E[0])if(E.length===1)w.push({data:D,start:C+8,end:S});else{var y=m({data:D,start:C+8,end:S},E.slice(1));y.length&&K.apply(w,y)}C=S}return w}function p(O){var E=m(O,["moov"]),w=E[0],D=w?w.end:null,R=m(O,["sidx"]);if(!R||!R[0])return null;var A=[],C=R[0],T=C.data[0],c=T===0?8:16,S=L(C,c);c+=4;var y=0,b=0;T===0?c+=8:c+=16,c+=2;var B=C.end+b,F=r(C,c);c+=2;for(var _=0;_>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=L(C,M);M+=4,A.push({referenceSize:g,subsegmentDuration:$,info:{duration:$/S,start:B,end:B+g-1}}),B+=g,M+=4,c=M}return{earliestPresentationTime:y,timescale:S,version:T,referencesCount:F,references:A,moovEndOffset:D}}function h(O){for(var E=[],w=m(O,["moov","trak"]),D=0;DG)&&(this.startTime=G),this.endTime=r,this.screen=L,this.timelineController.createCaptionsTrack(this.trackName)},U.reset=function(){this.cueRanges=[]},j}()},"./src/utils/texttrack-utils.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"sendAddTrackEvent",function(){return j}),P.d(J,"addCueToTrack",function(){return U}),P.d(J,"clearCurrentCues",function(){return K}),P.d(J,"removeCuesInRange",function(){return G}),P.d(J,"getCuesInRange",function(){return L});var X=P("./src/utils/logger.ts");function j(v,m){var p;try{p=new Event("addtrack")}catch(h){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=v,m.dispatchEvent(p)}function U(v,m){var p=v.mode;if(p==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(m.id))try{if(v.addCue(m),!v.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(u){X.logger.debug("[texttrack-utils]: "+u);var h=new self.TextTrackCue(m.startTime,m.endTime,m.text);h.id=m.id,v.addCue(h)}p==="disabled"&&(v.mode=p)}function K(v){var m=v.mode;if(m==="disabled"&&(v.mode="hidden"),v.cues)for(var p=v.cues.length;p--;)v.removeCue(v.cues[p]);m==="disabled"&&(v.mode=m)}function G(v,m,p){var h=v.mode;if(h==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var u=L(v.cues,m,p),f=0;fv[p].endTime)return-1;for(var h=0,u=p;h<=u;){var f=Math.floor((u+h)/2);if(mv[f].startTime&&h-1)for(var f=u,l=v.length;f=m&&o.endTime<=p)h.push(o);else if(o.startTime>p)return h}return h}},"./src/utils/time-ranges.ts":function(ie,J,P){"use strict";P.r(J);var X={toString:function(U){for(var K="",G=U.length,r=0;r1?m-1:0),h=1;h100)throw new Error("Position must be between 0 and 100.");A=y,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",r({},u,{get:function(){return C},set:function(y){var b=G(y);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");C=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",r({},u,{get:function(){return T},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");T=y,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",r({},u,{get:function(){return c},set:function(y){var b=G(y);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");c=b,this.hasBeenReset=!0}})),h.displayState=void 0}return L.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},L}()},"./src/utils/vttparser.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"parseTimeStamp",function(){return U}),P.d(J,"fixLineBreaks",function(){return m}),P.d(J,"VTTParser",function(){return p});var X=P("./src/utils/vttcue.ts"),j=function(){function h(){}var u=h.prototype;return u.decode=function(l,o){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},h}();function U(h){function u(l,o,s,a){return(l|0)*3600+(o|0)*60+(s|0)+parseFloat(a||0)}var f=h.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?u(f[2],f[3],0,f[4]):u(f[1],f[2],f[3],f[4]):null}var K=function(){function h(){this.values=Object.create(null)}var u=h.prototype;return u.set=function(l,o){!this.get(l)&&o!==""&&(this.values[l]=o)},u.get=function(l,o,s){return s?this.has(l)?this.values[l]:o[s]:this.has(l)?this.values[l]:o},u.has=function(l){return l in this.values},u.alt=function(l,o,s){for(var a=0;a=0&&s<=100)return this.set(l,s),!0}return!1},h}();function G(h,u,f,l){var o=l?h.split(l):[h];for(var s in o){if(typeof o[s]!="string")continue;var a=o[s].split(f);if(a.length!==2)continue;var O=a[0],E=a[1];u(O,E)}}var r=new X.default(0,0,""),L=r.align==="middle"?"middle":"center";function v(h,u,f){var l=h;function o(){var O=U(h);if(O===null)throw new Error("Malformed timestamp: "+l);return h=h.replace(/^[^\sa-zA-Z-]+/,""),O}function s(O,E){var w=new K;G(O,function(A,C){var T;switch(A){case"region":for(var c=f.length-1;c>=0;c--)if(f[c].id===C){w.set(A,f[c].region);break}break;case"vertical":w.alt(A,C,["rl","lr"]);break;case"line":T=C.split(","),w.integer(A,T[0]),w.percent(A,T[0])&&w.set("snapToLines",!1),w.alt(A,T[0],["auto"]),T.length===2&&w.alt("lineAlign",T[1],["start",L,"end"]);break;case"position":T=C.split(","),w.percent(A,T[0]),T.length===2&&w.alt("positionAlign",T[1],["start",L,"end","line-left","line-right","auto"]);break;case"size":w.percent(A,C);break;case"align":w.alt(A,C,["start",L,"end","left","right"]);break}},/:/,/\s/),E.region=w.get("region",null),E.vertical=w.get("vertical","");var D=w.get("line","auto");D==="auto"&&r.line===-1&&(D=-1),E.line=D,E.lineAlign=w.get("lineAlign","start"),E.snapToLines=w.get("snapToLines",!0),E.size=w.get("size",100),E.align=w.get("align",L);var R=w.get("position","auto");R==="auto"&&r.position===50&&(R=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=R}function a(){h=h.replace(/^\s+/,"")}if(a(),u.startTime=o(),a(),h.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);h=h.substr(3),a(),u.endTime=o(),a(),s(h,u)}function m(h){return h.replace(//gi,` + timeOffset: `+y);var ne=new K.TransmuxConfig(a,O,s,D,C);this.configureTransmuxer(ne)}if(this.frag=E,this.part=w,S)S.postMessage({cmd:"demux",data:o,decryptdata:b,chunkMeta:A,state:$},o instanceof ArrayBuffer?[o]:[]);else if(d){var se=d.push(o,b,A,$);Object(K.isPromise)(se)?se.then(function(Oe){T.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(se)}},f.flush=function(o){var s=this;o.transmuxing.start=self.performance.now();var a=this.transmuxer,O=this.worker;if(O)O.postMessage({cmd:"flush",chunkMeta:o});else if(a){var E=a.flush(o);Object(K.isPromise)(E)?E.then(function(w){s.handleFlushResult(w,o)}):this.handleFlushResult(E,o)}},f.handleFlushResult=function(o,s){var a=this;o.forEach(function(O){a.handleTransmuxComplete(O)}),this.onFlush(s)},f.onWorkerMessage=function(o){var s=o.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},f.configureTransmuxer=function(o){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:o}):a&&a.configure(o)},f.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},u}()},"./src/demux/transmuxer-worker.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return r});var X=P("./src/demux/transmuxer.ts"),j=P("./src/events.ts"),U=P("./src/utils/logger.ts"),K=P("./node_modules/eventemitter3/index.js"),G=P.n(K);function r(h){var u=new K.EventEmitter,f=function(o,s){h.postMessage({event:o,data:s})};u.on(j.Events.FRAG_DECRYPTED,f),u.on(j.Events.ERROR,f),h.addEventListener("message",function(l){var o=l.data;switch(o.cmd){case"init":{var s=JSON.parse(o.config);h.transmuxer=new X.default(u,o.typeSupported,s,o.vendor,o.id),Object(U.enableLogs)(s.debug),f("init",null);break}case"configure":{h.transmuxer.configure(o.config);break}case"demux":{var a=h.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(X.isPromise)(a)?a.then(function(w){L(h,w)}):L(h,a);break}case"flush":{var O=o.chunkMeta,E=h.transmuxer.flush(O);Object(X.isPromise)(E)?E.then(function(w){m(h,w,O)}):m(h,E,O);break}default:break}})}function L(h,u){if(p(u.remuxResult))return;var f=[],l=u.remuxResult,o=l.audio,s=l.video;o&&v(f,o),s&&v(f,s),h.postMessage({event:"transmuxComplete",data:u},f)}function v(h,u){u.data1&&h.push(u.data1.buffer),u.data2&&h.push(u.data2.buffer)}function m(h,u,f){u.forEach(function(l){L(h,l)}),h.postMessage({event:"flush",data:f})}function p(h){return!h.audio&&!h.video&&!h.text&&!h.id3&&!h.initSegment}},"./src/demux/transmuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return s}),P.d(J,"isPromise",function(){return E}),P.d(J,"TransmuxConfig",function(){return w}),P.d(J,"TransmuxState",function(){return D});var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/crypt/decrypter.ts"),K=P("./src/demux/aacdemuxer.ts"),G=P("./src/demux/mp4demuxer.ts"),r=P("./src/demux/tsdemuxer.ts"),L=P("./src/demux/mp3demuxer.ts"),v=P("./src/remux/mp4-remuxer.ts"),m=P("./src/remux/passthrough-remuxer.ts"),p=P("./src/demux/chunk-cache.ts"),h=P("./src/utils/mp4-tools.ts"),u=P("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){u.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var l=[{demux:r.default,remux:v.default},{demux:G.default,remux:m.default},{demux:K.default,remux:v.default},{demux:L.default,remux:v.default}],o=1024;l.forEach(function(R){var A=R.demux;o=Math.max(o,A.minProbeByteLength)});var s=function(){function R(C,T,d,S,y){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=C,this.typeSupported=T,this.config=d,this.vendor=S,this.id=y}var A=R.prototype;return A.configure=function(T){this.transmuxConfig=T,this.decrypter&&this.decrypter.reset()},A.push=function(T,d,S,y){var b=this,B=S.transmuxing;B.executeStart=f();var F=new Uint8Array(T),_=this.cache,M=this.config,I=this.currentTransmuxState,g=this.transmuxConfig;y&&(this.currentTransmuxState=y);var H=a(F,d);if(H&&H.method==="AES-128"){var $=this.getDecrypter();if(M.enableSoftwareAES){var ne=$.softwareDecrypt(F,H.key.buffer,H.iv.buffer);if(!ne)return B.executeEnd=f(),O(S);F=new Uint8Array(ne)}else return this.decryptionPromise=$.webCryptoDecrypt(F,H.key.buffer,H.iv.buffer).then(function(Ne){var Be=b.push(Ne,null,S);return b.decryptionPromise=null,Be}),this.decryptionPromise}var se=y||I,Oe=se.contiguous,ge=se.discontinuity,Te=se.trackSwitch,Re=se.accurateTimeOffset,Le=se.timeOffset,ce=g.audioCodec,he=g.videoCodec,re=g.defaultInitPts,fe=g.duration,oe=g.initSegmentData;if((ge||Te)&&this.resetInitSegment(oe,ce,he,fe),ge&&this.resetInitialTimestamp(re),Oe||this.resetContiguity(),this.needsProbing(F,ge,Te)){if(_.dataLength){var De=_.flush();F=Object(h.appendUint8Array)(De,F)}this.configureTransmuxer(F,g)}var Fe=this.transmux(F,H,Le,Re,S),Ce=this.currentTransmuxState;return Ce.contiguous=!0,Ce.discontinuity=!1,Ce.trackSwitch=!1,B.executeEnd=f(),Fe},A.flush=function(T){var d=this,S=T.transmuxing;S.executeStart=f();var y=this.decrypter,b=this.cache,B=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return d.flush(T)});var _=[],M=B.timeOffset;if(y){var I=y.flush();I&&_.push(this.push(I,null,T))}var g=b.dataLength;b.reset();var H=this.demuxer,$=this.remuxer;if(!H||!$)return g>=o&&this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),S.executeEnd=f(),[O(T)];var ne=H.flush(M);return E(ne)?ne.then(function(se){return d.flushRemux(_,se,T),_}):(this.flushRemux(_,ne,T),_)},A.flushRemux=function(T,d,S){var y=d.audioTrack,b=d.avcTrack,B=d.id3Track,F=d.textTrack,_=this.currentTransmuxState,M=_.accurateTimeOffset,I=_.timeOffset;u.logger.log("[transmuxer.ts]: Flushed fragment "+S.sn+(S.part>-1?" p: "+S.part:"")+" of level "+S.level);var g=this.remuxer.remux(y,b,B,F,I,M,!0,this.id);T.push({remuxResult:g,chunkMeta:S}),S.transmuxing.executeEnd=f()},A.resetInitialTimestamp=function(T){var d=this.demuxer,S=this.remuxer;if(!d||!S)return;d.resetTimeStamp(T),S.resetTimeStamp(T)},A.resetContiguity=function(){var T=this.demuxer,d=this.remuxer;if(!T||!d)return;T.resetContiguity(),d.resetNextTimestamp()},A.resetInitSegment=function(T,d,S,y){var b=this.demuxer,B=this.remuxer;if(!b||!B)return;b.resetInitSegment(d,S,y),B.resetInitSegment(T,d,S)},A.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},A.transmux=function(T,d,S,y,b){var B;return d&&d.method==="SAMPLE-AES"?B=this.transmuxSampleAes(T,d,S,y,b):B=this.transmuxUnencrypted(T,S,y,b),B},A.transmuxUnencrypted=function(T,d,S,y){var b=this.demuxer.demux(T,d,!1,!this.config.progressive),B=b.audioTrack,F=b.avcTrack,_=b.id3Track,M=b.textTrack,I=this.remuxer.remux(B,F,_,M,d,S,!1,this.id);return{remuxResult:I,chunkMeta:y}},A.transmuxSampleAes=function(T,d,S,y,b){var B=this;return this.demuxer.demuxSampleAes(T,d,S).then(function(F){var _=B.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,S,y,!1,B.id);return{remuxResult:_,chunkMeta:b}})},A.configureTransmuxer=function(T,d){for(var S=this.config,y=this.observer,b=this.typeSupported,B=this.vendor,F=d.audioCodec,_=d.defaultInitPts,M=d.duration,I=d.initSegmentData,g=d.videoCodec,H,$=0,ne=l.length;$0&&A!=null&&A.key!=null&&A.iv!==null&&A.method!=null&&(C=A),C}var O=function(A){return{remuxResult:{},chunkMeta:A}};function E(R){return"then"in R&&R.then instanceof Function}var w=function(A,C,T,d,S){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=A,this.videoCodec=C,this.initSegmentData=T,this.duration=d,this.defaultInitPts=S},D=function(A,C,T,d,S){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=A,this.contiguous=C,this.accurateTimeOffset=T,this.trackSwitch=d,this.timeOffset=S}},"./src/demux/tsdemuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"discardEPB",function(){return O});var X=P("./src/demux/adts.ts"),j=P("./src/demux/mpegaudio.ts"),U=P("./src/demux/exp-golomb.ts"),K=P("./src/demux/id3.ts"),G=P("./src/demux/sample-aes.ts"),r=P("./src/events.ts"),L=P("./src/utils/mp4-tools.ts"),v=P("./src/utils/logger.ts"),m=P("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},h=function(){function E(D,R,A){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=R,this.typeSupported=A}E.probe=function(R){var A=E.syncOffset(R);return A<0?!1:(A&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+A+", junk ahead ?"),!0)},E.syncOffset=function(R){for(var A=Math.min(1e3,R.length-3*188),C=0;C>4,ce=void 0;if(Le>1){if(ce=ge+5+R[ge+4],ce===ge+188)continue}else ce=ge+4;switch(Re){case B:Te&&(F&&(d=o(F))&&this.parseAVCPES(d,!1),F={data:[],size:0}),F&&(F.data.push(R.subarray(ce,ge+188)),F.size+=ge+188-ce);break;case _:Te&&(I&&(d=o(I))&&(y.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),I={data:[],size:0}),I&&(I.data.push(R.subarray(ce,ge+188)),I.size+=ge+188-ce);break;case M:Te&&(g&&(d=o(g))&&this.parseID3PES(d),g={data:[],size:0}),g&&(g.data.push(R.subarray(ce,ge+188)),g.size+=ge+188-ce);break;case 0:Te&&(ce+=R[ce]+1),ne=this._pmtId=f(R,ce);break;case ne:{Te&&(ce+=R[ce]+1);var he=l(R,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,C);B=he.avc,B>0&&(S.pid=B),_=he.audio,_>0&&(y.pid=_,y.isAAC=he.isAAC),M=he.id3,M>0&&(b.pid=M),H&&!$&&(v.logger.log("reparse from beginning"),H=!1,ge=Oe-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});S.pesData=F,y.pesData=I,b.pesData=g;var re={audioTrack:y,avcTrack:S,id3Track:b,textTrack:this._txtTrack};return T&&this.extractRemainingSamples(re),re},w.flush=function(){var R=this.remainderData;this.remainderData=null;var A;return R?A=this.demux(R,-1,!1,!0):A={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(A),this.sampleAes?this.decrypt(A,this.sampleAes):A},w.extractRemainingSamples=function(R){var A=R.audioTrack,C=R.avcTrack,T=R.id3Track,d=C.pesData,S=A.pesData,y=T.pesData,b;d&&(b=o(d))?(this.parseAVCPES(b,!0),C.pesData=null):C.pesData=d,S&&(b=o(S))?(A.isAAC?this.parseAACPES(b):this.parseMPEGPES(b),A.pesData=null):(S!=null&&S.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),A.pesData=S),y&&(b=o(y))?(this.parseID3PES(b),T.pesData=null):T.pesData=y},w.demuxSampleAes=function(R,A,C){var T=this.demux(R,C,!0,!this.config.progressive),d=this.sampleAes=new G.default(this.observer,this.config,A);return this.decrypt(T,d)},w.decrypt=function(R,A){return new Promise(function(C){var T=R.audioTrack,d=R.avcTrack;T.samples&&T.isAAC?A.decryptAacSamples(T.samples,0,function(){d.samples?A.decryptAvcSamples(d.samples,0,0,function(){C(R)}):C(R)}):d.samples&&A.decryptAvcSamples(d.samples,0,0,function(){C(R)})})},w.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},w.parseAVCPES=function(R,A){var C=this,T=this._avcTrack,d=this.parseAVCNALu(R.data),S=!1,y=this.avcSample,b,B=!1;R.data=null,y&&d.length&&!T.audFound&&(s(y,T),y=this.avcSample=u(!1,R.pts,R.dts,"")),d.forEach(function(F){switch(F.type){case 1:{b=!0,y||(y=C.avcSample=u(!0,R.pts,R.dts,"")),S&&(y.debug+="NDR "),y.frame=!0;var _=F.data;if(B&&_.length>4){var M=new U.default(_).readSliceType();(M===2||M===4||M===7||M===9)&&(y.key=!0)}break}case 5:b=!0,y||(y=C.avcSample=u(!0,R.pts,R.dts,"")),S&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{b=!0,S&&y&&(y.debug+="SEI ");var I=new U.default(O(F.data));I.readUByte();for(var g=0,H=0,$=!1,ne=0;!$&&I.bytesAvailable>1;){g=0;do ne=I.readUByte(),g+=ne;while(ne===255);H=0;do ne=I.readUByte(),H+=ne;while(ne===255);if(g===4&&I.bytesAvailable!==0){$=!0;var se=I.readUByte();if(se===181){var Oe=I.readUShort();if(Oe===49){var ge=I.readUInt();if(ge===1195456820){var Te=I.readUByte();if(Te===3){for(var Re=I.readUByte(),Le=I.readUByte(),ce=31&Re,he=[Re,Le],re=0;re16){for(var fe=[],oe=0;oe<16;oe++)fe.push(I.readUByte().toString(16)),(oe===3||oe===5||oe===7||oe===9)&&fe.push("-");for(var De=H-16,Fe=new Uint8Array(De),Ce=0;Ce=0){var I={data:R.subarray(_,y-T-1),type:M};S.push(I)}else{var g=this.getLastNalUnit();if(g&&(d&&y<=4-d&&(g.state&&(g.data=g.data.subarray(0,g.data.byteLength-d))),B=y-T-1,B>0)){var H=new Uint8Array(g.data.byteLength+B);H.set(g.data,0),H.set(R.subarray(0,B),g.data.byteLength),g.data=H,g.state=0}}y=0&&T>=0){var $={data:R.subarray(_,A),type:M,state:T};S.push($)}if(S.length===0){var ne=this.getLastNalUnit();if(ne){var se=new Uint8Array(ne.data.byteLength+R.byteLength);se.set(ne.data,0),se.set(R,ne.data.byteLength),ne.data=se}}return C.naluState=T,S},w.parseAACPES=function(R){var A=0,C=this._audioTrack,T=this.aacOverFlow,d=R.data;if(T){this.aacOverFlow=null;var S=T.sample.unit.byteLength,y=Math.min(T.missing,S),b=S-y;T.sample.unit.set(d.subarray(0,y),b),C.samples.push(T.sample),A=T.missing}var B,F;for(B=A,F=d.length;B1;){var S=new Uint8Array(d[0].length+d[1].length);S.set(d[0]),S.set(d[1],d[0].length),d[0]=S,d.splice(1,1)}D=d[0];var y=(D[0]<<16)+(D[1]<<8)+D[2];if(y===1){if(R=(D[4]<<8)+D[5],R&&R>E.size-6)return null;var b=D[7];b&192&&(C=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,b&64?(T=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,C-T>60*9e4&&(v.logger.warn(Math.round((C-T)/9e4)+"s delta between PTS and DTS, align them"),C=T)):T=C),A=D[8];var B=A+9;if(E.size<=B)return null;E.size-=B;for(var F=new Uint8Array(E.size),_=0,M=d.length;_I){B-=I;continue}else D=D.subarray(B),I-=B,B=0;F.set(D,w),w+=I}return R&&(R-=A+3),{data:F,pts:C,dts:T,len:R}}return null}function s(E,w){if(E.units.length&&E.frame){if(E.pts===void 0){var D=w.samples,R=D.length;if(R){var A=D[R-1];E.pts=A.pts,E.dts=A.dts}else{w.dropped++;return}}w.samples.push(E)}E.debug.length&&v.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function a(E,w){var D=E.length;if(D>0){if(w.pts>=E[D-1].pts)E.push(w);else for(var R=D-1;R>=0;R--)if(w.ptsC)return d;return 0}},{key:"maxAutoLevel",get:function(){var A=this.levels,C=this.autoLevelCapping,T;return C===-1&&A&&A.length?T=A.length-1:T=C,T}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(A){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,A)}},{key:"audioTracks",get:function(){var A=this.audioTrackController;return A?A.audioTracks:[]}},{key:"audioTrack",get:function(){var A=this.audioTrackController;return A?A.audioTrack:-1},set:function(A){var C=this.audioTrackController;C&&(C.audioTrack=A)}},{key:"subtitleTracks",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTrack:-1},set:function(A){var C=this.subtitleTrackController;C&&(C.subtitleTrack=A)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var A=this.subtitleTrackController;return A?A.subtitleDisplay:!1},set:function(A){var C=this.subtitleTrackController;C&&(C.subtitleDisplay=A)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(A){this.config.lowLatencyMode=A}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return w.defaultConfig?w.defaultConfig:u.hlsDefaultConfig},set:function(A){w.defaultConfig=A}}]),w}();E.defaultConfig=void 0},"./src/is-supported.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"isSupported",function(){return U}),P.d(J,"changeTypeSupported",function(){return K});var X=P("./src/utils/mediasource-helper.ts");function j(){return self.SourceBuffer||self.WebKitSourceBuffer}function U(){var G=Object(X.getMediaSource)();if(!G)return!1;var r=j(),L=G&&typeof G.isTypeSupported=="function"&&G.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!r||r.prototype&&typeof r.prototype.appendBuffer=="function"&&typeof r.prototype.remove=="function";return!!L&&!!v}function K(){var G,r=j();return typeof(r==null||((G=r.prototype)===null||G===void 0)?void 0:G.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return h}),P.d(J,"LoadError",function(){return f});var X=P("./src/polyfills/number.ts"),j=P("./src/errors.ts");function U(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,v(l,o)}function K(l){var o=typeof Map=="function"?new Map:void 0;return K=function(a){if(a===null||!L(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(a))return o.get(a);o.set(a,O)}function O(){return G(a,arguments,m(this).constructor)}return O.prototype=Object.create(a.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v(O,a)},K(l)}function G(l,o,s){return r()?G=Reflect.construct:G=function(O,E,w){var D=[null];D.push.apply(D,E);var R=Function.bind.apply(O,D),A=new R;return w&&v(A,w.prototype),A},G.apply(null,arguments)}function r(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function L(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function v(l,o){return v=Object.setPrototypeOf||function(a,O){return a.__proto__=O,a},v(l,o)}function m(l){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(l)}var p=Math.pow(2,17),h=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var o=l.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(a,O){var E=this,w=a.url;if(!w)return Promise.reject(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(w?"part list":"url")));this.abort();var D=this.config,R=D.fLoader,A=D.loader;return new Promise(function(C,T){E.loader&&E.loader.destroy();var d=E.loader=a.loader=R?new R(D):new A(D),S=u(a),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};a.stats=d.stats,d.load(S,y,{onSuccess:function(B,F,_,M){E.resetLoader(a,d),C({frag:a,part:null,payload:B.data,networkDetails:M})},onError:function(B,F,_){E.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:B,networkDetails:_}))},onAbort:function(B,F,_){E.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:_}))},onTimeout:function(B,F,_){E.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:_}))},onProgress:function(B,F,_,M){O&&O({frag:a,part:null,payload:_,networkDetails:M})}})})},o.loadPart=function(a,O,E){var w=this;this.abort();var D=this.config,R=D.fLoader,A=D.loader;return new Promise(function(C,T){w.loader&&w.loader.destroy();var d=w.loader=a.loader=R?new R(D):new A(D),S=u(a,O),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};O.stats=d.stats,d.load(S,y,{onSuccess:function(B,F,_,M){w.resetLoader(a,d),w.updateStatsFromPart(a,O);var I={frag:a,part:O,payload:B.data,networkDetails:M};E(I),C(I)},onError:function(B,F,_){w.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:O,response:B,networkDetails:_}))},onAbort:function(B,F,_){a.stats.aborted=O.stats.aborted,w.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:O,networkDetails:_}))},onTimeout:function(B,F,_){w.resetLoader(a,d),T(new f({type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:O,networkDetails:_}))}})})},o.updateStatsFromPart=function(a,O){var E=a.stats,w=O.stats,D=w.total;if(E.loaded+=w.loaded,D){var R=Math.round(a.duration/O.duration),A=Math.min(Math.round(E.loaded/D),R),C=R-A,T=C*Math.round(E.loaded/A);E.total=E.loaded+T}else E.total=Math.max(E.loaded,E.total);var d=E.loading,S=w.loading;d.start?d.first+=S.first-S.start:(d.start=S.start,d.first=S.first),d.end=S.end},o.resetLoader=function(a,O){a.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},l}();function u(l,o){o===void 0&&(o=null);var s=o||l,a={frag:l,part:o,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},O=s.byteRangeStartOffset,E=s.byteRangeEndOffset;return Object(X.isFiniteNumber)(O)&&Object(X.isFiniteNumber)(E)&&(a.rangeStart=O,a.rangeEnd=E),a}var f=function(l){U(o,l);function o(s){for(var a,O=arguments.length,E=new Array(O>1?O-1:0),w=1;w>8*(15-D)&255;return w},a.setDecryptDataFromLevelKey=function(E,w){var D=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(D=G.LevelKey.fromURI(E.uri),D.method=E.method,D.iv=this.createInitializationVector(w),D.keyFormat="identity"),D},a.setElementaryStreamInfo=function(E,w,D,R,A,C){C===void 0&&(C=!1);var T=this.elementaryStreams,d=T[E];if(!d){T[E]={startPTS:w,endPTS:D,startDTS:R,endDTS:A,partial:C};return}d.startPTS=Math.min(d.startPTS,w),d.endPTS=Math.max(d.endPTS,D),d.startDTS=Math.min(d.startDTS,R),d.endDTS=Math.max(d.endDTS,A)},a.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[h.AUDIO]=null,E[h.VIDEO]=null,E[h.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&K.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(X.isFiniteNumber)(this.programDateTime))return null;var E=Object(X.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),s}(u),l=function(o){L(s,o);function s(a,O,E,w,D){var R;R=o.call(this,E)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new r.LoadStats,R.duration=a.decimalFloatingPoint("DURATION"),R.gap=a.bool("GAP"),R.independent=a.bool("INDEPENDENT"),R.relurl=a.enumeratedString("URI"),R.fragment=O,R.index=w;var A=a.enumeratedString("BYTERANGE");return A&&R.setByteRange(A,D),D&&(R.fragOffset=D.fragOffset+D.duration),R}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),s}(u)},"./src/loader/key-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return K});var X=P("./src/events.ts"),j=P("./src/errors.ts"),U=P("./src/utils/logger.ts"),K=function(){function G(L){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=L,this._registerListeners()}var r=G.prototype;return r._registerListeners=function(){this.hls.on(X.Events.KEY_LOADING,this.onKeyLoading,this)},r._unregisterListeners=function(){this.hls.off(X.Events.KEY_LOADING,this.onKeyLoading)},r.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var m=this.loaders[v];m&&m.destroy()}this.loaders={}},r.onKeyLoading=function(v,m){var p=m.frag,h=p.type,u=this.loaders[h];if(!p.decryptdata){U.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=p.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(u&&(U.logger.warn("abort previous key loader for type:"+h),u.abort()),!f){U.logger.warn("key uri is falsy");return}var o=l.loader,s=p.loader=this.loaders[h]=new o(l);this.decrypturl=f,this.decryptkey=null;var a={url:f,frag:p,responseType:"arraybuffer"},O={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,O,E)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(X.Events.KEY_LOADED,{frag:p}))},r.loadsuccess=function(v,m,p){var h=p.frag;if(!h.decryptdata){U.logger.error("after key load, decryptdata unset");return}this.decryptkey=h.decryptdata.key=new Uint8Array(v.data),h.loader=null,delete this.loaders[h.type],this.hls.trigger(X.Events.KEY_LOADED,{frag:h})},r.loaderror=function(v,m){var p=m.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:v})},r.loadtimeout=function(v,m){var p=m.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:j.ErrorTypes.NETWORK_ERROR,details:j.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},G}()},"./src/loader/level-details.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"LevelDetails",function(){return G});var X=P("./src/polyfills/number.ts");function j(r,L){for(var v=0;vm.endSN||p>0||p===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},U(r,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(X.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||K}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var p=this.driftEnd-this.driftStart;return p*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),r}()},"./src/loader/level-key.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"LevelKey",function(){return G});var X=P("./node_modules/url-toolkit/src/url-toolkit.js"),j=P.n(X);function U(r,L){for(var v=0;v2){var T=C.shift()+".";return T+=parseInt(C.shift()).toString(16),T+=("000"+parseInt(C.shift()).toString(16)).substr(-4),T}return A},D.resolve=function(A,C){return j.buildAbsoluteURL(C,A,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(A,C){var T=[],d={},S=!1;p.lastIndex=0;for(var y;(y=p.exec(A))!=null;)if(y[1]){var b=new L.AttrList(y[1]),B={attrs:b,bitrate:b.decimalInteger("AVERAGE-BANDWIDTH")||b.decimalInteger("BANDWIDTH"),name:b.NAME,url:D.resolve(y[2],C)},F=b.decimalResolution("RESOLUTION");F&&(B.width=F.width,B.height=F.height),a((b.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),B),B.videoCodec&&B.videoCodec.indexOf("avc1")!==-1&&(B.videoCodec=D.convertAVC1ToAVCOTI(B.videoCodec)),T.push(B)}else if(y[3]){var _=new L.AttrList(y[3]);_["DATA-ID"]&&(S=!0,d[_["DATA-ID"]]=_)}return{levels:T,sessionData:S?d:null}},D.parseMasterPlaylistMedia=function(A,C,T,d){d===void 0&&(d=[]);var S,y=[],b=0;for(h.lastIndex=0;(S=h.exec(A))!==null;){var B=new L.AttrList(S[1]);if(B.TYPE===T){var F={attrs:B,bitrate:0,id:b++,groupId:B["GROUP-ID"],instreamId:B["INSTREAM-ID"],name:B.NAME||B.LANGUAGE||"",type:T,default:B.bool("DEFAULT"),autoselect:B.bool("AUTOSELECT"),forced:B.bool("FORCED"),lang:B.LANGUAGE,url:B.URI?D.resolve(B.URI,C):""};if(d.length){var _=D.findGroup(d,F.groupId)||d[0];O(F,_,"audioCodec"),O(F,_,"textCodec")}y.push(F)}}return y},D.parseLevelPlaylist=function(A,C,T,d,S){var y=new G.LevelDetails(C),b=y.fragments,B=null,F=0,_=0,M=0,I=0,g=null,H=new K.Fragment(d,C),$,ne,se,Oe=-1,ge=!1;for(u.lastIndex=0,y.m3u8=A;($=u.exec(A))!==null;){ge&&(ge=!1,H=new K.Fragment(d,C),H.start=M,H.sn=F,H.cc=I,H.level=T,B&&(H.initSegment=B,H.rawProgramDateTime=B.rawProgramDateTime));var Te=$[1];if(Te){H.duration=parseFloat(Te);var Re=(" "+$[2]).slice(1);H.title=Re||null,H.tagList.push(Re?["INF",Te,Re]:["INF",Te])}else if($[3])Object(X.isFiniteNumber)(H.duration)&&(H.start=M,se&&(H.levelkey=se),H.sn=F,H.level=T,H.cc=I,H.urlId=S,b.push(H),H.relurl=(" "+$[3]).slice(1),w(H,g),g=H,M+=H.duration,F++,_=0,ge=!0);else if($[4]){var Le=(" "+$[4]).slice(1);g?H.setByteRange(Le,g):H.setByteRange(Le)}else if($[5])H.rawProgramDateTime=(" "+$[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),Oe===-1&&(Oe=b.length);else{if($=$[0].match(f),!$){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(ne=1;ne<$.length&&!(typeof $[ne]!="undefined");ne++);var ce=(" "+$[ne]).slice(1),he=(" "+$[ne+1]).slice(1),re=$[ne+2]?(" "+$[ne+2]).slice(1):"";switch(ce){case"PLAYLIST-TYPE":y.type=he.toUpperCase();break;case"MEDIA-SEQUENCE":F=y.startSN=parseInt(he);break;case"SKIP":{var fe=new L.AttrList(he),oe=fe.decimalInteger("SKIPPED-SEGMENTS");if(Object(X.isFiniteNumber)(oe)){y.skippedSegments=oe;for(var De=oe;De--;)b.unshift(null);F+=oe}var Fe=fe.enumeratedString("RECENTLY-REMOVED-DATERANGES");Fe&&(y.recentlyRemovedDateranges=Fe.split(" "));break}case"TARGETDURATION":y.targetduration=parseFloat(he);break;case"VERSION":y.version=parseInt(he);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(he||re)&&H.tagList.push(re?[he,re]:[he]);break;case"DIS":I++;case"GAP":H.tagList.push([ce]);break;case"BITRATE":H.tagList.push([ce,he]);break;case"DISCONTINUITY-SEQ":I=parseInt(he);break;case"KEY":{var Ce,Ne=new L.AttrList(he),Be=Ne.enumeratedString("METHOD"),le=Ne.URI,ve=Ne.hexadecimalInteger("IV"),Se=Ne.enumeratedString("KEYFORMATVERSIONS"),Ie=Ne.enumeratedString("KEYID"),We=(Ce=Ne.enumeratedString("KEYFORMAT"))!=null?Ce:"identity",Ve=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ve.indexOf(We)>-1){v.logger.warn("Keyformat "+We+" is not supported from the manifest");continue}else if(We!=="identity")continue;Be&&(se=r.LevelKey.fromURL(C,le),le&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Be)>=0&&(se.method=Be,se.keyFormat=We,Ie&&(se.keyID=Ie),Se&&(se.keyFormatVersions=Se),se.iv=ve));break}case"START":{var Qe=new L.AttrList(he),Je=Qe.decimalFloatingPoint("TIME-OFFSET");Object(X.isFiniteNumber)(Je)&&(y.startTimeOffset=Je);break}case"MAP":{var st=new L.AttrList(he);H.relurl=st.URI,st.BYTERANGE&&H.setByteRange(st.BYTERANGE),H.level=T,H.sn="initSegment",se&&(H.levelkey=se),H.initSegment=null,B=H,ge=!0;break}case"SERVER-CONTROL":{var qe=new L.AttrList(he);y.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),y.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var at=new L.AttrList(he);y.partTarget=at.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ue=y.partList;Ue||(Ue=y.partList=[]);var dt=_>0?Ue[Ue.length-1]:void 0,lt=_++,je=new K.Part(new L.AttrList(he),H,C,lt,dt);Ue.push(je),H.duration+=je.duration;break}case"PRELOAD-HINT":{var Ge=new L.AttrList(he);y.preloadHint=Ge;break}case"RENDITION-REPORT":{var Ae=new L.AttrList(he);y.renditionReports=y.renditionReports||[],y.renditionReports.push(Ae);break}default:v.logger.warn("line parsed but not handled: "+$);break}}}g&&!g.relurl?(b.pop(),M-=g.duration,y.partList&&(y.fragmentHint=g)):y.partList&&(w(H,g),H.cc=I,y.fragmentHint=H);var _e=b.length,we=b[0],ae=b[_e-1];if(M+=y.skippedSegments*y.targetduration,M>0&&_e&&ae){y.averagetargetduration=M/_e;var ue=ae.sn;y.endSN=ue!=="initSegment"?ue:0,we&&(y.startCC=we.cc,we.initSegment||y.fragments.every(function(de){return de.relurl&&o(de.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new K.Fragment(d,C),H.relurl=ae.relurl,H.level=T,H.sn="initSegment",we.initSegment=H,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(M+=y.fragmentHint.duration),y.totalduration=M,y.endCC=I,Oe>0&&E(b,Oe),y},D}();function a(D,R){["video","audio","text"].forEach(function(A){var C=D.filter(function(d){return Object(m.isCodecType)(d,A)});if(C.length){var T=C.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});R[A+"Codec"]=T.length>0?T[0]:C[0],D=D.filter(function(d){return C.indexOf(d)===-1})}}),R.unknownCodecs=D}function O(D,R,A){var C=R[A];C&&(D[A]=C)}function E(D,R){for(var A=D[R],C=R;C--;){var T=D[C];if(!T)return;T.programDateTime=A.programDateTime-T.duration*1e3,A=T}}function w(D,R){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):R!=null&&R.programDateTime&&(D.programDateTime=R.endProgramDateTime),Object(X.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/polyfills/number.ts"),j=P("./src/events.ts"),U=P("./src/errors.ts"),K=P("./src/utils/logger.ts"),G=P("./src/utils/mp4-tools.ts"),r=P("./src/loader/m3u8-parser.ts"),L=P("./src/types/loader.ts"),v=P("./src/utils/attr-list.ts");function m(u){var f=u.type;switch(f){case L.PlaylistContextType.AUDIO_TRACK:return L.PlaylistLevelType.AUDIO;case L.PlaylistContextType.SUBTITLE_TRACK:return L.PlaylistLevelType.SUBTITLE;default:return L.PlaylistLevelType.MAIN}}function p(u,f){var l=u.url;return(l===void 0||l.indexOf("data:")===0)&&(l=f.url),l}var h=function(){function u(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var f=u.prototype;return f.registerListeners=function(){var o=this.hls;o.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(j.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(j.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var o=this.hls;o.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(j.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(j.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(o){var s=this.hls.config,a=s.pLoader,O=s.loader,E=a||O,w=new E(s);return o.loader=w,this.loaders[o.type]=w,w},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var s=this.loaders[o];s&&s.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(o,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:L.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},f.onLevelLoading=function(o,s){var a=s.id,O=s.level,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:null,level:O,responseType:"text",type:L.PlaylistContextType.LEVEL,url:E,deliveryDirectives:w})},f.onAudioTrackLoading=function(o,s){var a=s.id,O=s.groupId,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:L.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:w})},f.onSubtitleTrackLoading=function(o,s){var a=s.id,O=s.groupId,E=s.url,w=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:L.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:w})},f.load=function(o){var s,a=this.hls.config,O=this.getInternalLoader(o);if(O){var E=O.context;if(E&&E.url===o.url){K.logger.trace("[playlist-loader]: playlist request ongoing");return}K.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),O.abort()}var w,D,R,A;switch(o.type){case L.PlaylistContextType.MANIFEST:w=a.manifestLoadingMaxRetry,D=a.manifestLoadingTimeOut,R=a.manifestLoadingRetryDelay,A=a.manifestLoadingMaxRetryTimeout;break;case L.PlaylistContextType.LEVEL:case L.PlaylistContextType.AUDIO_TRACK:case L.PlaylistContextType.SUBTITLE_TRACK:w=0,D=a.levelLoadingTimeOut;break;default:w=a.levelLoadingMaxRetry,D=a.levelLoadingTimeOut,R=a.levelLoadingRetryDelay,A=a.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(o),(s=o.deliveryDirectives)!==null&&s!==void 0&&s.part){var C;if(o.type===L.PlaylistContextType.LEVEL&&o.level!==null?C=this.hls.levels[o.level].details:o.type===L.PlaylistContextType.AUDIO_TRACK&&o.id!==null?C=this.hls.audioTracks[o.id].details:o.type===L.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(C=this.hls.subtitleTracks[o.id].details),C){var T=C.partTarget,d=C.targetduration;T&&d&&(D=Math.min(Math.max(T*3,d*.8)*1e3,D))}}var S={timeout:D,maxRetry:w,retryDelay:R,maxRetryDelay:A,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(o,S,y)},f.loadsuccess=function(o,s,a,O){if(O===void 0&&(O=null),a.isSidxRequest){this.handleSidxRequest(o,a),this.handlePlaylistLoaded(o,s,a,O);return}this.resetInternalLoader(a.type);var E=o.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,a,"no EXTM3U delimiter",O);return}s.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,s,a,O):this.handleMasterPlaylist(o,s,a,O)},f.loaderror=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,o)},f.loadtimeout=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},f.handleMasterPlaylist=function(o,s,a,O){var E=this.hls,w=o.data,D=p(o,a),R=r.default.parseMasterPlaylist(w,D),A=R.levels,C=R.sessionData;if(!A.length){this.handleManifestParsingError(o,a,"no level found in manifest",O);return}var T=A.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),d=A.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),S=r.default.parseMasterPlaylistMedia(w,D,"AUDIO",T),y=r.default.parseMasterPlaylistMedia(w,D,"SUBTITLES",d),b=r.default.parseMasterPlaylistMedia(w,D,"CLOSED-CAPTIONS");if(S.length){var B=S.some(function(F){return!F.url});!B&&A[0].audioCodec&&!A[0].attrs.AUDIO&&(K.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),S.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}E.trigger(j.Events.MANIFEST_LOADED,{levels:A,audioTracks:S,subtitles:y,captions:b,url:D,stats:s,networkDetails:O,sessionData:C})},f.handleTrackOrLevelPlaylist=function(o,s,a,O){var E=this.hls,w=a.id,D=a.level,R=a.type,A=p(o,a),C=Object(X.isFiniteNumber)(w)?w:0,T=Object(X.isFiniteNumber)(D)?D:C,d=m(a),S=r.default.parseLevelPlaylist(o.data,A,T,d,C);if(!S.fragments.length){E.trigger(j.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:A,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(R===L.PlaylistContextType.MANIFEST){var y={attrs:new v.AttrList({}),bitrate:0,details:S,name:"",url:A};E.trigger(j.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:A,stats:s,networkDetails:O,sessionData:null})}if(s.parsing.end=performance.now(),S.needSidxRanges){var b,B=(b=S.fragments[0].initSegment)===null||b===void 0?void 0:b.url;this.load({url:B,isSidxRequest:!0,type:R,level:D,levelDetails:S,id:w,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=S,this.handlePlaylistLoaded(o,s,a,O)},f.handleSidxRequest=function(o,s){var a=Object(G.parseSegmentIndex)(new Uint8Array(o.data));if(!a)return;var O=a.references,E=s.levelDetails;O.forEach(function(w,D){var R=w.info,A=E.fragments[D];A.byteRange.length===0&&A.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),A.initSegment&&A.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(o,s,a,O){this.hls.trigger(j.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===L.PlaylistContextType.MANIFEST,url:o.url,reason:a,response:o,context:s,networkDetails:O})},f.handleNetworkError=function(o,s,a,O){a===void 0&&(a=!1),K.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var E=U.ErrorDetails.UNKNOWN,w=!1,D=this.getInternalLoader(o);switch(o.type){case L.PlaylistContextType.MANIFEST:E=a?U.ErrorDetails.MANIFEST_LOAD_TIMEOUT:U.ErrorDetails.MANIFEST_LOAD_ERROR,w=!0;break;case L.PlaylistContextType.LEVEL:E=a?U.ErrorDetails.LEVEL_LOAD_TIMEOUT:U.ErrorDetails.LEVEL_LOAD_ERROR,w=!1;break;case L.PlaylistContextType.AUDIO_TRACK:E=a?U.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,w=!1;break;case L.PlaylistContextType.SUBTITLE_TRACK:E=a?U.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:U.ErrorDetails.SUBTITLE_LOAD_ERROR,w=!1;break}D&&this.resetInternalLoader(o.type);var R={type:U.ErrorTypes.NETWORK_ERROR,details:E,fatal:w,url:o.url,loader:D,context:o,networkDetails:s};O&&(R.response=O),this.hls.trigger(j.Events.ERROR,R)},f.handlePlaylistLoaded=function(o,s,a,O){var E=a.type,w=a.level,D=a.id,R=a.groupId,A=a.loader,C=a.levelDetails,T=a.deliveryDirectives;if(!(C!=null&&C.targetduration)){this.handleManifestParsingError(o,a,"invalid target duration",O);return}if(!A)return;C.live&&(A.getCacheAge&&(C.ageHeader=A.getCacheAge()||0),(!A.getCacheAge||isNaN(C.ageHeader))&&(C.ageHeader=0));switch(E){case L.PlaylistContextType.MANIFEST:case L.PlaylistContextType.LEVEL:this.hls.trigger(j.Events.LEVEL_LOADED,{details:C,level:w||0,id:D||0,stats:s,networkDetails:O,deliveryDirectives:T});break;case L.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(j.Events.AUDIO_TRACK_LOADED,{details:C,id:D||0,groupId:R||"",stats:s,networkDetails:O,deliveryDirectives:T});break;case L.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(j.Events.SUBTITLE_TRACK_LOADED,{details:C,id:D||0,groupId:R||"",stats:s,networkDetails:O,deliveryDirectives:T});break}},u}();J.default=h},"./src/polyfills/number.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"isFiniteNumber",function(){return X}),P.d(J,"MAX_SAFE_INTEGER",function(){return j});var X=Number.isFinite||function(U){return typeof U=="number"&&isFinite(U)},j=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,J,P){"use strict";P.r(J);var X=function(){function j(){}return j.getSilentFrame=function(K,G){switch(K){case"mp4a.40.2":if(G===1)return new Uint8Array([0,200,0,128,35,128]);if(G===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(G===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(G===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(G===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(G===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(G===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(G===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(G===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},j}();J.default=X},"./src/remux/mp4-generator.ts":function(ie,J,P){"use strict";P.r(J);var X=Math.pow(2,32)-1,j=function(){function U(){}return U.init=function(){U.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var G;for(G in U.types)U.types.hasOwnProperty(G)&&(U.types[G]=[G.charCodeAt(0),G.charCodeAt(1),G.charCodeAt(2),G.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),L=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);U.HDLR_TYPES={video:r,audio:L};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);U.STTS=U.STSC=U.STCO=m,U.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),U.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),U.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),h=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);U.FTYP=U.box(U.types.ftyp,p,u,p,h),U.DINF=U.box(U.types.dinf,U.box(U.types.dref,v))},U.box=function(G){for(var r=8,L=arguments.length,v=new Array(L>1?L-1:0),m=1;m>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,u.set(G,4),p=0,r=8;p>24&255,G>>16&255,G>>8&255,G&255,L>>24,L>>16&255,L>>8&255,L&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},U.mdia=function(G){return U.box(U.types.mdia,U.mdhd(G.timescale,G.duration),U.hdlr(G.type),U.minf(G))},U.mfhd=function(G){return U.box(U.types.mfhd,new Uint8Array([0,0,0,0,G>>24,G>>16&255,G>>8&255,G&255]))},U.minf=function(G){return G.type==="audio"?U.box(U.types.minf,U.box(U.types.smhd,U.SMHD),U.DINF,U.stbl(G)):U.box(U.types.minf,U.box(U.types.vmhd,U.VMHD),U.DINF,U.stbl(G))},U.moof=function(G,r,L){return U.box(U.types.moof,U.mfhd(G),U.traf(L,r))},U.moov=function(G){for(var r=G.length,L=[];r--;)L[r]=U.trak(G[r]);return U.box.apply(null,[U.types.moov,U.mvhd(G[0].timescale,G[0].duration)].concat(L).concat(U.mvex(G)))},U.mvex=function(G){for(var r=G.length,L=[];r--;)L[r]=U.trex(G[r]);return U.box.apply(null,[U.types.mvex].concat(L))},U.mvhd=function(G,r){r*=G;var L=Math.floor(r/(X+1)),v=Math.floor(r%(X+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,G>>24&255,G>>16&255,G>>8&255,G&255,L>>24,L>>16&255,L>>8&255,L&255,v>>24,v>>16&255,v>>8&255,v&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return U.box(U.types.mvhd,m)},U.sdtp=function(G){var r=G.samples||[],L=new Uint8Array(4+r.length),v,m;for(v=0;v>>8&255),r.push(p&255),r=r.concat(Array.prototype.slice.call(m));for(v=0;v>>8&255),L.push(p&255),L=L.concat(Array.prototype.slice.call(m));var h=U.box(U.types.avcC,new Uint8Array([1,r[3],r[4],r[5],252|3,224|G.sps.length].concat(r).concat([G.pps.length]).concat(L))),u=G.width,f=G.height,l=G.pixelRatio[0],o=G.pixelRatio[1];return U.box(U.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),h,U.box(U.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),U.box(U.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,o>>24,o>>16&255,o>>8&255,o&255])))},U.esds=function(G){var r=G.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(G.config).concat([6,1,2]))},U.mp4a=function(G){var r=G.samplerate;return U.box(U.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,G.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),U.box(U.types.esds,U.esds(G)))},U.mp3=function(G){var r=G.samplerate;return U.box(U.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,G.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))},U.stsd=function(G){return G.type==="audio"?!G.isAAC&&G.codec==="mp3"?U.box(U.types.stsd,U.STSD,U.mp3(G)):U.box(U.types.stsd,U.STSD,U.mp4a(G)):U.box(U.types.stsd,U.STSD,U.avc1(G))},U.tkhd=function(G){var r=G.id,L=G.duration*G.timescale,v=G.width,m=G.height,p=Math.floor(L/(X+1)),h=Math.floor(L%(X+1));return U.box(U.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,v>>8&255,v&255,0,0,m>>8&255,m&255,0,0]))},U.traf=function(G,r){var L=U.sdtp(G),v=G.id,m=Math.floor(r/(X+1)),p=Math.floor(r%(X+1));return U.box(U.types.traf,U.box(U.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),U.box(U.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,p>>24,p>>16&255,p>>8&255,p&255])),U.trun(G,L.length+16+20+8+16+8+8),L)},U.trak=function(G){return G.duration=G.duration||4294967295,U.box(U.types.trak,U.tkhd(G),U.mdia(G))},U.trex=function(G){var r=G.id;return U.box(U.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},U.trun=function(G,r){var L=G.samples||[],v=L.length,m=12+16*v,p=new Uint8Array(m),h,u,f,l,o,s;for(r+=8+m,p.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),h=0;h>>24&255,f>>>16&255,f>>>8&255,f&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*h);return U.box(U.types.trun,p)},U.initSegment=function(G){U.types||U.init();var r=U.moov(G),L=new Uint8Array(U.FTYP.byteLength+r.byteLength);return L.set(U.FTYP),L.set(r,U.FTYP.byteLength),L},U}();j.types=void 0,j.HDLR_TYPES=void 0,j.STTS=void 0,j.STSC=void 0,j.STCO=void 0,j.STSZ=void 0,j.VMHD=void 0,j.SMHD=void 0,j.STSD=void 0,j.FTYP=void 0,j.DINF=void 0,J.default=j},"./src/remux/mp4-remuxer.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return s}),P.d(J,"normalizePts",function(){return a});var X=P("./src/polyfills/number.ts"),j=P("./src/remux/aac-helper.ts"),U=P("./src/remux/mp4-generator.ts"),K=P("./src/events.ts"),G=P("./src/errors.ts"),r=P("./src/utils/logger.ts"),L=P("./src/types/loader.ts"),v=P("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(D){for(var R=1;R0?S:y.pts},C[0].pts);return T&&r.logger.debug("PTS rollover detected"),d},R.remux=function(C,T,d,S,y,b,B,F){var _,M,I,g,H,$,ne=y,se=y,Oe=C.pid>-1,ge=T.pid>-1,Te=T.samples.length,Re=C.samples.length>0,Le=Te>1,ce=(!Oe||Re)&&(!ge||Le)||this.ISGenerated||B;if(ce){this.ISGenerated||(I=this.generateIS(C,T,y));var he=this.isVideoContiguous,re=-1;if(Le&&(re=O(T.samples),!he&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,re>0){r.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+Te+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(T.samples);T.samples=T.samples.slice(re),T.dropped+=re,se+=(T.samples[0].pts-fe)/(T.timescale||9e4)}else re===-1&&(r.logger.warn("[mp4-remuxer]: No keyframe found out of "+Te+" video samples"),$=!1);if(this.ISGenerated){if(Re&&Le){var oe=this.getVideoStartPts(T.samples),De=a(C.samples[0].pts,oe)-oe,Fe=De/T.inputTimeScale;ne+=Math.max(0,Fe),se+=Math.max(0,-Fe)}if(Re){if(C.samplerate||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),I=this.generateIS(C,T,y)),M=this.remuxAudio(C,ne,this.isAudioContiguous,b,ge||Le||F===L.PlaylistLevelType.AUDIO?se:void 0),Le){var Ce=M?M.endPTS-M.startPTS:0;T.inputTimeScale||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),I=this.generateIS(C,T,y)),_=this.remuxVideo(T,se,he,Ce)}}else Le&&(_=this.remuxVideo(T,se,he,0));_&&(_.firstKeyFrame=re,_.independent=re!==-1)}}return this.ISGenerated&&(d.samples.length&&(H=this.remuxID3(d,y)),S.samples.length&&(g=this.remuxText(S,y))),{audio:M,video:_,initSegment:I,independent:$,text:g,id3:H}},R.generateIS=function(C,T,d){var S=C.samples,y=T.samples,b=this.typeSupported,B={},F=!Object(X.isFiniteNumber)(this._initPTS),_="audio/mp4",M,I,g;if(F&&(M=I=Infinity),C.config&&S.length&&(C.timescale=C.samplerate,C.isAAC||(b.mpeg?(_="audio/mpeg",C.codec=""):b.mp3&&(C.codec="mp3")),B.audio={id:"audio",container:_,codec:C.codec,initSegment:!C.isAAC&&b.mpeg?new Uint8Array(0):U.default.initSegment([C]),metadata:{channelCount:C.channelCount}},F&&(g=C.inputTimeScale,M=I=S[0].pts-Math.round(g*d))),T.sps&&T.pps&&y.length&&(T.timescale=T.inputTimeScale,B.video={id:"main",container:"video/mp4",codec:T.codec,initSegment:U.default.initSegment([T]),metadata:{width:T.width,height:T.height}},F)){g=T.inputTimeScale;var H=this.getVideoStartPts(y),$=Math.round(g*d);I=Math.min(I,a(y[0].dts,H)-$),M=Math.min(M,H-$)}if(Object.keys(B).length)return this.ISGenerated=!0,F&&(this._initPTS=M,this._initDTS=I),{tracks:B,initPTS:M,timescale:g}},R.remuxVideo=function(C,T,d,S){var y=C.inputTimeScale,b=C.samples,B=[],F=b.length,_=this._initPTS,M=this.nextAvcDts,I=8,g,H,$,ne=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,Oe=0,ge=!1;if(!d||M===null){var Te=T*y,Re=b[0].pts-a(b[0].dts,b[0].pts);M=Te-Re}for(var Le=0;Lece.pts){var he=9e4*.2;Oe=Math.max(Math.min(Oe,ce.pts-ce.dts),-1*he)}ce.dts0?Le-1:Le].dts&&(ge=!0)}ge&&b.sort(function(yt,ct){var ft=yt.dts-ct.dts,Ot=yt.pts-ct.pts;return ft||Ot}),H=b[0].dts,$=b[b.length-1].dts;var re=Math.round(($-H)/(F-1));if(Oe<0){if(Oere,Ne=Fe<-1;if(Ce||Ne){Ce?r.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):r.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),H=M;var Be=b[0].pts-Fe;b[0].dts=H,b[0].pts=Be,r.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Be,!0)+"/"+Object(v.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(Fe,!0)+" ms")}}o&&(H=Math.max(0,H));for(var le=0,ve=0,Se=0;Se0?Ue-1:Ue].dts;if(ue.stretchShortVideoTrack&&this.nextAudioPts!==null){var me=Math.floor(ue.maxBufferHole*y),xe=(S?ne+S*y:this.nextAudioPts)-dt.pts;xe>me?(g=xe-de,g<0&&(g=de),r.logger.log("[mp4-remuxer]: It is approximately "+xe/90+" ms to the next segment; using duration "+g/90+" ms for the last video frame.")):g=de}else g=de}var Pe=Math.round(dt.pts-dt.dts);B.push(new E(dt.key,g,je,Pe))}if(B.length&&f&&f<70){var He=B[0].flags;He.dependsOn=2,He.isNonSync=0}console.assert(g!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=$+g,this.isVideoContiguous=!0;var ze=U.default.moof(C.sequenceNumber++,H,m({},C,{samples:B})),ht="video",ot={data1:ze,data2:qe,startPTS:ne/y,endPTS:(se+g)/y,startDTS:H/y,endDTS:M/y,type:ht,hasAudio:!1,hasVideo:!0,nb:B.length,dropped:C.dropped};return C.samples=[],C.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),ot},R.remuxAudio=function(C,T,d,S,y){var b=C.inputTimeScale,B=C.samplerate?C.samplerate:b,F=b/B,_=C.isAAC?h:u,M=_*F,I=this._initPTS,g=!C.isAAC&&this.typeSupported.mpeg,H=[],$=C.samples,ne=g?0:8,se=this.nextAudioPts||-1,Oe=T*b;if(this.isAudioContiguous=d=d||$.length&&se>0&&(S&&Math.abs(Oe-se)<9e3||Math.abs(a($[0].pts-I,Oe)-se)<20*M),$.forEach(function(we){we.pts=a(we.pts-I,Oe)}),!d||se<0){if($=$.filter(function(we){return we.pts>=0}),!$.length)return;y===0?se=0:S?se=Math.max(0,Oe):se=$[0].pts}if(C.isAAC)for(var ge=y!==void 0,Te=this.config.maxAudioFramesDrift,Re=0,Le=se;Re<$.length;Re++){var ce=$[Re],he=ce.pts,re=he-Le,fe=Math.abs(1e3*re/b);if(re<=-Te*M&&ge)Re===0&&(r.logger.warn("Audio frame @ "+(he/b).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/b)+" ms."),this.nextAudioPts=se=Le=he);else if(re>=Te*M&&fe0){ve+=ne;try{le=new Uint8Array(ve)}catch(we){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:G.ErrorTypes.MUX_ERROR,details:G.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!g){var qe=new DataView(le.buffer);qe.setUint32(0,ve),le.set(U.default.types.mdat,4)}}else return;le.set(Qe,ne);var at=Qe.byteLength;ne+=at,H.push(new E(!0,_,at,0)),Be=Je}var Ue=H.length;if(!Ue)return;var dt=H[H.length-1];this.nextAudioPts=se=Be+F*dt.duration;var lt=g?new Uint8Array(0):U.default.moof(C.sequenceNumber++,Ne/F,m({},C,{samples:H}));C.samples=[];var je=Ne/b,Ge=se/b,Ae="audio",_e={data1:lt,data2:le,startPTS:je,endPTS:Ge,startDTS:je,endDTS:Ge,type:Ae,hasAudio:!0,hasVideo:!1,nb:Ue};return this.isAudioContiguous=!0,console.assert(le.length,"MDAT length must not be zero"),_e},R.remuxEmptyAudio=function(C,T,d,S){var y=C.inputTimeScale,b=C.samplerate?C.samplerate:y,B=y/b,F=this.nextAudioPts,_=(F!==null?F:S.startDTS*y)+this._initDTS,M=S.endDTS*y+this._initDTS,I=B*h,g=Math.ceil((M-_)/I),H=j.default.getSilentFrame(C.manifestCodec||C.codec,C.channelCount);if(r.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){r.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],ne=0;ne4294967296;)D+=A;return D}function O(D){for(var R=0;R0?this.lastEndDTS=C:(K.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var T=!!D.audio,d=!!D.video,S="";T&&(S+="audio"),d&&(S+="video");var y={data1:E,startPTS:A,startDTS:A,endPTS:C,endDTS:C,type:S,hasAudio:T,hasVideo:d,nb:1,dropped:0};return O.audio=y.type==="audio"?y:void 0,O.video=y.type!=="audio"?y:void 0,O.text=l,O.id3=f,O.initSegment=w,O},v}(),r=function(m,p,h){return Object(j.getStartDTS)(m,p)-h};function L(v,m){var p=v==null?void 0:v.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||m===U.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}J.default=G},"./src/task-loop.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"default",function(){return X});var X=function(){function j(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var U=j.prototype;return U.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},U.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},U.onHandlerDestroyed=function(){},U.hasInterval=function(){return!!this._tickInterval},U.hasNextTick=function(){return!!this._tickTimer},U.setInterval=function(G){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,G),!0)},U.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},U.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},U.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},U.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},U.doTick=function(){},j}()},"./src/types/cmcd.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"CMCDVersion",function(){return X}),P.d(J,"CMCDObjectType",function(){return j}),P.d(J,"CMCDStreamingFormat",function(){return U}),P.d(J,"CMCDStreamType",function(){return K});var X=1,j;(function(G){G.MANIFEST="m",G.AUDIO="a",G.VIDEO="v",G.MUXED="av",G.INIT="i",G.CAPTION="c",G.TIMED_TEXT="tt",G.KEY="k",G.OTHER="o"})(j||(j={}));var U;(function(G){G.DASH="d",G.HLS="h",G.SMOOTH="s",G.OTHER="o"})(U||(U={}));var K;(function(G){G.VOD="v",G.LIVE="l"})(K||(K={}))},"./src/types/level.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"HlsSkip",function(){return U}),P.d(J,"getSkipValue",function(){return K}),P.d(J,"HlsUrlParameters",function(){return G}),P.d(J,"Level",function(){return r});function X(L,v){for(var m=0;mNumber.MAX_SAFE_INTEGER?Infinity:v},G.hexadecimalInteger=function(L){if(this[L]){var v=(this[L]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var m=new Uint8Array(v.length/2),p=0;pNumber.MAX_SAFE_INTEGER?Infinity:v},G.decimalFloatingPoint=function(L){return parseFloat(this[L])},G.optionalFloat=function(L,v){var m=this[L];return m?parseFloat(m):v},G.enumeratedString=function(L){return this[L]},G.bool=function(L){return this[L]==="YES"},G.decimalResolution=function(L){var v=X.exec(this[L]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},K.parseAttrList=function(L){var v,m={},p='"';for(j.lastIndex=0;(v=j.exec(L))!==null;){var h=v[2];h.indexOf(p)===0&&h.lastIndexOf(p)===h.length-1&&(h=h.slice(1,-1)),m[v[1]]=h}return m},K}()},"./src/utils/binary-search.ts":function(ie,J,P){"use strict";P.r(J);var X={search:function(U,K){for(var G=0,r=U.length-1,L=null,v=null;G<=r;){L=(G+r)/2|0,v=U[L];var m=K(v);if(m>0)G=L+1;else if(m<0)r=L-1;else return v}return null}};J.default=X},"./src/utils/buffer-helper.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"BufferHelper",function(){return U});var X=P("./src/utils/logger.ts"),j={length:0,start:function(){return 0},end:function(){return 0}},U=function(){function K(){}return K.isBuffered=function(r,L){try{if(r){for(var v=K.getBuffered(r),m=0;m=v.start(m)&&L<=v.end(m))return!0}}catch(p){}return!1},K.bufferInfo=function(r,L,v){try{if(r){var m=K.getBuffered(r),p=[],h;for(h=0;hu&&(m[h-1].end=r[p].end):m.push(r[p])}else m.push(r[p])}else m=r;for(var f=0,l,o=L,s=L,a=0;a=O&&L=d&&X.logger.log(this.time+" ["+d+"] "+S)},A}(),f=function(C){for(var T=[],d=0;dG&&(this.logger.log(h.DEBUG,"Too large cursor position "+this.pos),this.pos=G)},C.moveCursor=function(d){var S=this.pos+d;if(d>1)for(var y=this.pos+1;y=144&&this.backSpace();var S=U(d);if(this.pos>=G){this.logger.log(h.ERROR,"Cannot insert "+d.toString(16)+" ("+S+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(S,this.currPenState),this.moveCursor(1)},C.clearFromPos=function(d){var S;for(S=d;S0&&(d?y="["+S.join(" | ")+"]":y=S.join(` +`)),y},C.getTextAndFormat=function(){return this.rows},A}(),O=function(){function A(T,d,S){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=T,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new a(S),this.nonDisplayedMemory=new a(S),this.lastOutputScreen=new a(S),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=S}var C=A.prototype;return C.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},C.getHandler=function(){return this.outputFilter},C.setHandler=function(d){this.outputFilter=d},C.setPAC=function(d){this.writeScreen.setPAC(d)},C.setBkgData=function(d){this.writeScreen.setBkgData(d)},C.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(h.INFO,"MODE="+d),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=d},C.insertChars=function(d){for(var S=0;S=46,S.italics)S.foreground="white";else{var y=Math.floor(d/2)-16,b=["white","green","blue","cyan","red","yellow","magenta"];S.foreground=b[y]}this.logger.log(h.INFO,"MIDROW: "+JSON.stringify(S)),this.writeScreen.setPen(S)},C.outputDataUpdate=function(d){d===void 0&&(d=!1);var S=this.logger.time;if(S===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=S:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,S,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:S),this.lastOutputScreen.copy(this.displayedMemory))},C.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},A}(),E=function(){function A(T,d,S){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new u;this.channels=[null,new O(T,d,y),new O(T+1,S,y)],this.cmdHistory=R(),this.logger=y}var C=A.prototype;return C.getHandler=function(d){return this.channels[d].getHandler()},C.setHandler=function(d,S){this.channels[d].setHandler(S)},C.addData=function(d,S){var y,b,B,F=!1;this.logger.time=d;for(var _=0;_ ("+f([b,B])+")"),y=this.parseCmd(b,B),y||(y=this.parseMidrow(b,B)),y||(y=this.parsePAC(b,B)),y||(y=this.parseBackgroundAttributes(b,B)),!y&&(F=this.parseChars(b,B),F)){var M=this.currentChannel;if(M&&M>0){var I=this.channels[M];I.insertChars(F)}else this.logger.log(h.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!F&&this.logger.log(h.WARNING,"Couldn't parse cleaned data "+f([b,B])+" orig: "+f([S[_],S[_+1]]))}},C.parseCmd=function(d,S){var y=this.cmdHistory,b=(d===20||d===28||d===21||d===29)&&S>=32&&S<=47,B=(d===23||d===31)&&S>=33&&S<=35;if(!(b||B))return!1;if(D(d,S,y))return w(null,null,y),this.logger.log(h.DEBUG,"Repeated command ("+f([d,S])+") is dropped"),!0;var F=d===20||d===21||d===23?1:2,_=this.channels[F];return d===20||d===21||d===28||d===29?S===32?_.ccRCL():S===33?_.ccBS():S===34?_.ccAOF():S===35?_.ccAON():S===36?_.ccDER():S===37?_.ccRU(2):S===38?_.ccRU(3):S===39?_.ccRU(4):S===40?_.ccFON():S===41?_.ccRDC():S===42?_.ccTR():S===43?_.ccRTD():S===44?_.ccEDM():S===45?_.ccCR():S===46?_.ccENM():S===47&&_.ccEOC():_.ccTO(S-32),w(d,S,y),this.currentChannel=F,!0},C.parseMidrow=function(d,S){var y=0;if((d===17||d===25)&&S>=32&&S<=47){if(d===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(h.ERROR,"Mismatch channel in midrow parsing"),!1;var b=this.channels[y];return b?(b.ccMIDROW(S),this.logger.log(h.DEBUG,"MIDROW ("+f([d,S])+")"),!0):!1}return!1},C.parsePAC=function(d,S){var y,b=this.cmdHistory,B=(d>=17&&d<=23||d>=25&&d<=31)&&S>=64&&S<=127,F=(d===16||d===24)&&S>=64&&S<=95;if(!(B||F))return!1;if(D(d,S,b))return w(null,null,b),!0;var _=d<=23?1:2;S>=64&&S<=95?y=_===1?r[d]:v[d]:y=_===1?L[d]:m[d];var M=this.channels[_];return M?(M.setPAC(this.interpretPAC(y,S)),w(d,S,b),this.currentChannel=_,!0):!1},C.interpretPAC=function(d,S){var y,b={color:null,italics:!1,indent:null,underline:!1,row:d};return S>95?y=S-96:y=S-64,b.underline=(y&1)===1,y<=13?b.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(b.italics=!0,b.color="white"):b.indent=Math.floor((y-16)/2)*4,b},C.parseChars=function(d,S){var y,b=null,B=null;if(d>=25?(y=2,B=d-8):(y=1,B=d),B>=17&&B<=19){var F;B===17?F=S+80:B===18?F=S+112:F=S+144,this.logger.log(h.INFO,"Special char '"+U(F)+"' in channel "+y),b=[F]}else d>=32&&d<=127&&(b=S===0?[d]:[d,S]);if(b){var _=f(b);this.logger.log(h.DEBUG,"Char codes = "+_.join(",")),w(d,S,this.cmdHistory)}return b},C.parseBackgroundAttributes=function(d,S){var y=(d===16||d===24)&&S>=32&&S<=47,b=(d===23||d===31)&&S>=45&&S<=47;if(!(y||b))return!1;var B,F={};d===16||d===24?(B=Math.floor((S-32)/2),F.background=p[B],S%2===1&&(F.background=F.background+"_semi")):S===45?F.background="transparent":(F.foreground="black",S===47&&(F.underline=!0));var _=d<=23?1:2,M=this.channels[_];return M.setBkgData(F),w(d,S,this.cmdHistory),!0},C.reset=function(){for(var d=0;d=16?o--:o++;var w=Object(X.fixLineBreaks)(s.trim()),D=Object(j.generateCueId)(v,m,w);(!L||!L.cues||!L.cues.getCueById(D))&&(f=new a(v,m,w),f.id=D,f.line=O+1,f.align="left",f.position=10+Math.min(80,Math.floor(o*8/32)*10),h.push(f))}return L&&h.length&&(h.sort(function(R,A){return R.line==="auto"||A.line==="auto"?0:R.line>8&&A.line>8?A.line-R.line:R.line-A.line}),h.forEach(function(R){return Object(U.addCueToTrack)(L,R)})),h}};J.default=G},"./src/utils/discontinuities.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"findFirstFragWithCC",function(){return K}),P.d(J,"shouldAlignOnDiscontinuities",function(){return G}),P.d(J,"findDiscontinuousReferenceFrag",function(){return r}),P.d(J,"adjustSlidingStart",function(){return v}),P.d(J,"alignStream",function(){return m}),P.d(J,"alignPDT",function(){return h}),P.d(J,"alignFragmentByPDTDelta",function(){return u}),P.d(J,"alignMediaPlaylistByPDT",function(){return f});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/logger.ts"),U=P("./src/controller/level-helper.ts");function K(l,o){for(var s=null,a=0,O=l.length;as.startCC||l&&l.cc=this.minWeight_},K.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},K.destroy=function(){},U}();J.default=j},"./src/utils/ewma.ts":function(ie,J,P){"use strict";P.r(J);var X=function(){function j(K,G,r){G===void 0&&(G=0),r===void 0&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=K,this.alpha_=K?Math.exp(Math.log(.5)/K):0,this.estimate_=G,this.totalWeight_=r}var U=j.prototype;return U.sample=function(G,r){var L=Math.pow(this.alpha_,G);this.estimate_=r*(1-L)+L*this.estimate_,this.totalWeight_+=G},U.getTotalWeight=function(){return this.totalWeight_},U.getEstimate=function(){if(this.alpha_){var G=1-Math.pow(this.alpha_,this.totalWeight_);if(G)return this.estimate_/G}return this.estimate_},j}();J.default=X},"./src/utils/fetch-loader.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"fetchSupported",function(){return u});var X=P("./src/polyfills/number.ts"),j=P("./src/loader/load-stats.ts"),U=P("./src/demux/chunk-cache.ts");function K(a,O){a.prototype=Object.create(O.prototype),a.prototype.constructor=a,m(a,O)}function G(a){var O=typeof Map=="function"?new Map:void 0;return G=function(w){if(w===null||!v(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(w))return O.get(w);O.set(w,D)}function D(){return r(w,arguments,p(this).constructor)}return D.prototype=Object.create(w.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),m(D,w)},G(a)}function r(a,O,E){return L()?r=Reflect.construct:r=function(D,R,A){var C=[null];C.push.apply(C,R);var T=Function.bind.apply(D,C),d=new T;return A&&m(d,A.prototype),d},r.apply(null,arguments)}function L(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function v(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function m(a,O){return m=Object.setPrototypeOf||function(w,D){return w.__proto__=D,w},m(a,O)}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},p(a)}function h(){return h=Object.assign||function(a){for(var O=1;O=A&&C(D,R,T.flush(),w)):C(D,R,B,w),y()}).catch(function(){return Promise.reject()})};return S()},a}();function l(a,O){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(h({},a.headers))};return a.rangeEnd&&E.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),E}function o(a,O){return new self.Request(a.url,O)}var s=function(a){K(O,a);function O(E,w,D){var R;return R=a.call(this,E)||this,R.code=void 0,R.details=void 0,R.code=w,R.details=D,R}return O}(G(Error));J.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"IMSC1_CODEC",function(){return v}),P.d(J,"parseIMSC1",function(){return u});var X=P("./src/utils/mp4-tools.ts"),j=P("./src/utils/vttparser.ts"),U=P("./src/utils/vttcue.ts"),K=P("./src/demux/id3.ts"),G=P("./src/utils/timescale-conversion.ts"),r=P("./src/utils/webvtt-parser.ts");function L(){return L=Object.assign||function(A){for(var C=1;C"):X}function G(v){for(var m=arguments.length,p=new Array(m>1?m-1:0),h=1;h>24,O[E+1]=w>>16&255,O[E+2]=w>>8&255,O[E+3]=w&255}function m(O,E){var w=[];if(!E.length)return w;var D,R,A;"data"in O?(D=O.data,R=O.start,A=O.end):(D=O,R=0,A=D.byteLength);for(var C=R;C1?C+T:A;if(d===E[0])if(E.length===1)w.push({data:D,start:C+8,end:S});else{var y=m({data:D,start:C+8,end:S},E.slice(1));y.length&&K.apply(w,y)}C=S}return w}function p(O){var E=m(O,["moov"]),w=E[0],D=w?w.end:null,R=m(O,["sidx"]);if(!R||!R[0])return null;var A=[],C=R[0],T=C.data[0],d=T===0?8:16,S=L(C,d);d+=4;var y=0,b=0;T===0?d+=8:d+=16,d+=2;var B=C.end+b,F=r(C,d);d+=2;for(var _=0;_>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=L(C,M);M+=4,A.push({referenceSize:g,subsegmentDuration:$,info:{duration:$/S,start:B,end:B+g-1}}),B+=g,M+=4,d=M}return{earliestPresentationTime:y,timescale:S,version:T,referencesCount:F,references:A,moovEndOffset:D}}function h(O){for(var E=[],w=m(O,["moov","trak"]),D=0;DG)&&(this.startTime=G),this.endTime=r,this.screen=L,this.timelineController.createCaptionsTrack(this.trackName)},U.reset=function(){this.cueRanges=[]},j}()},"./src/utils/texttrack-utils.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"sendAddTrackEvent",function(){return j}),P.d(J,"addCueToTrack",function(){return U}),P.d(J,"clearCurrentCues",function(){return K}),P.d(J,"removeCuesInRange",function(){return G}),P.d(J,"getCuesInRange",function(){return L});var X=P("./src/utils/logger.ts");function j(v,m){var p;try{p=new Event("addtrack")}catch(h){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=v,m.dispatchEvent(p)}function U(v,m){var p=v.mode;if(p==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(m.id))try{if(v.addCue(m),!v.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(u){X.logger.debug("[texttrack-utils]: "+u);var h=new self.TextTrackCue(m.startTime,m.endTime,m.text);h.id=m.id,v.addCue(h)}p==="disabled"&&(v.mode=p)}function K(v){var m=v.mode;if(m==="disabled"&&(v.mode="hidden"),v.cues)for(var p=v.cues.length;p--;)v.removeCue(v.cues[p]);m==="disabled"&&(v.mode=m)}function G(v,m,p){var h=v.mode;if(h==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var u=L(v.cues,m,p),f=0;fv[p].endTime)return-1;for(var h=0,u=p;h<=u;){var f=Math.floor((u+h)/2);if(mv[f].startTime&&h-1)for(var f=u,l=v.length;f=m&&o.endTime<=p)h.push(o);else if(o.startTime>p)return h}return h}},"./src/utils/time-ranges.ts":function(ie,J,P){"use strict";P.r(J);var X={toString:function(U){for(var K="",G=U.length,r=0;r1?m-1:0),h=1;h100)throw new Error("Position must be between 0 and 100.");A=y,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",r({},u,{get:function(){return C},set:function(y){var b=G(y);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");C=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",r({},u,{get:function(){return T},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");T=y,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",r({},u,{get:function(){return d},set:function(y){var b=G(y);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");d=b,this.hasBeenReset=!0}})),h.displayState=void 0}return L.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},L}()},"./src/utils/vttparser.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"parseTimeStamp",function(){return U}),P.d(J,"fixLineBreaks",function(){return m}),P.d(J,"VTTParser",function(){return p});var X=P("./src/utils/vttcue.ts"),j=function(){function h(){}var u=h.prototype;return u.decode=function(l,o){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},h}();function U(h){function u(l,o,s,a){return(l|0)*3600+(o|0)*60+(s|0)+parseFloat(a||0)}var f=h.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?u(f[2],f[3],0,f[4]):u(f[1],f[2],f[3],f[4]):null}var K=function(){function h(){this.values=Object.create(null)}var u=h.prototype;return u.set=function(l,o){!this.get(l)&&o!==""&&(this.values[l]=o)},u.get=function(l,o,s){return s?this.has(l)?this.values[l]:o[s]:this.has(l)?this.values[l]:o},u.has=function(l){return l in this.values},u.alt=function(l,o,s){for(var a=0;a=0&&s<=100)return this.set(l,s),!0}return!1},h}();function G(h,u,f,l){var o=l?h.split(l):[h];for(var s in o){if(typeof o[s]!="string")continue;var a=o[s].split(f);if(a.length!==2)continue;var O=a[0],E=a[1];u(O,E)}}var r=new X.default(0,0,""),L=r.align==="middle"?"middle":"center";function v(h,u,f){var l=h;function o(){var O=U(h);if(O===null)throw new Error("Malformed timestamp: "+l);return h=h.replace(/^[^\sa-zA-Z-]+/,""),O}function s(O,E){var w=new K;G(O,function(A,C){var T;switch(A){case"region":for(var d=f.length-1;d>=0;d--)if(f[d].id===C){w.set(A,f[d].region);break}break;case"vertical":w.alt(A,C,["rl","lr"]);break;case"line":T=C.split(","),w.integer(A,T[0]),w.percent(A,T[0])&&w.set("snapToLines",!1),w.alt(A,T[0],["auto"]),T.length===2&&w.alt("lineAlign",T[1],["start",L,"end"]);break;case"position":T=C.split(","),w.percent(A,T[0]),T.length===2&&w.alt("positionAlign",T[1],["start",L,"end","line-left","line-right","auto"]);break;case"size":w.percent(A,C);break;case"align":w.alt(A,C,["start",L,"end","left","right"]);break}},/:/,/\s/),E.region=w.get("region",null),E.vertical=w.get("vertical","");var D=w.get("line","auto");D==="auto"&&r.line===-1&&(D=-1),E.line=D,E.lineAlign=w.get("lineAlign","start"),E.snapToLines=w.get("snapToLines",!0),E.size=w.get("size",100),E.align=w.get("align",L);var R=w.get("position","auto");R==="auto"&&r.position===50&&(R=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=R}function a(){h=h.replace(/^\s+/,"")}if(a(),u.startTime=o(),a(),h.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);h=h.substr(3),a(),u.endTime=o(),a(),s(h,u)}function m(h){return h.replace(//gi,` `)}var p=function(){function h(){this.state="INITIAL",this.buffer="",this.decoder=new j,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var u=h.prototype;return u.parse=function(l){var o=this;l&&(o.buffer+=o.decoder.decode(l,{stream:!0}));function s(){var R=o.buffer,A=0;for(R=m(R);A")===-1){o.cue.id=O;continue}case"CUE":if(!o.cue){o.state="BADCUE";continue}try{v(O,o.cue,o.regionList)}catch(R){o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":{var D=O.indexOf("-->")!==-1;if(!O||D&&(w=!0)){o.oncue&&o.cue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}if(o.cue===null)continue;o.cue.text&&(o.cue.text+=` @@ -440,5 +440,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(o){l.onparsingerror&&l.onparsingerror(o)}return l.onflush&&l.onflush(),this},h}()},"./src/utils/webvtt-parser.ts":function(ie,J,P){"use strict";P.r(J),P.d(J,"generateCueId",function(){return p}),P.d(J,"parseWebVTT",function(){return u});var X=P("./src/polyfills/number.ts"),j=P("./src/utils/vttparser.ts"),U=P("./src/demux/id3.ts"),K=P("./src/utils/timescale-conversion.ts"),G=P("./src/remux/mp4-remuxer.ts"),r=/\r\n|\n\r|\n|\r/g,L=function(l,o,s){return s===void 0&&(s=0),l.substr(s,o.length)===o},v=function(l){var o=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),a=parseInt(l.substr(-9,2)),O=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(X.isFiniteNumber)(o)||!Object(X.isFiniteNumber)(s)||!Object(X.isFiniteNumber)(a)||!Object(X.isFiniteNumber)(O))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return o+=1e3*s,o+=60*1e3*a,o+=60*60*1e3*O,o},m=function(l){for(var o=5381,s=l.length;s;)o=o*33^l.charCodeAt(--s);return(o>>>0).toString()};function p(f,l,o){return m(f.toString())+m(l.toString())+m(o)}var h=function(l,o,s){var a=l[o],O=l[a.prevCC];if(!O||!O.new&&a.new){l.ccOffset=l.presentationOffset=a.start,a.new=!1;return}for(;(E=O)!==null&&E!==void 0&&E.new;){var E;l.ccOffset+=a.start-O.start,a.new=!1,a=O,O=l[a.prevCC]}l.presentationOffset=s};function u(f,l,o,s,a,O,E,w){var D=new j.VTTParser,R=Object(U.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(r,` `).split(` -`),A=[],C=Object(K.toMpegTsClockFromTimescale)(l,o),T="00:00.000",c=0,S=0,y,b=!0,B=!1;D.oncue=function(F){var _=s[a],M=s.ccOffset,I=(c-C)/9e4;if(_!=null&&_.new&&(S!==void 0?M=s.ccOffset=_.start:h(s,a,I)),I&&(M=I-s.presentationOffset),B){var g=F.endTime-F.startTime,H=Object(G.normalizePts)((F.startTime+M-S)*9e4,O*9e4)/9e4;F.startTime=H,F.endTime=H+g}var $=F.text.trim();F.text=decodeURIComponent(encodeURIComponent($)),F.id||(F.id=p(F.startTime,F.endTime,$)),F.endTime>0&&A.push(F)},D.onparsingerror=function(F){y=F},D.onflush=function(){if(y){w(y);return}E(A)},R.forEach(function(F){if(b)if(L(F,"X-TIMESTAMP-MAP=")){b=!1,B=!0,F.substr(16).split(",").forEach(function(_){L(_,"LOCAL:")?T=_.substr(6):L(_,"MPEGTS:")&&(c=parseInt(_.substr(7)))});try{S=v(T)/1e3}catch(_){B=!1,y=_}return}else F===""&&(b=!1);D.parse(F+` -`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/utils/logger.ts"),j=P("./src/loader/load-stats.ts"),U=/^age:\s*[\d.]+\s*$/m,K=function(){function G(L){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=L?L.xhrSetup:null,this.stats=new j.LoadStats,this.retryDelay=0}var r=G.prototype;return r.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},r.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},r.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},r.load=function(v,m,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=m,this.callbacks=p,this.retryDelay=m.retryDelay,this.loadInternal()},r.loadInternal=function(){var v=this.config,m=this.context;if(!v)return;var p=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0;var u=this.xhrSetup;try{if(u)try{u(p,m.url)}catch(o){p.open("GET",m.url,!0),u(p,m.url)}p.readyState||p.open("GET",m.url,!0);var f=this.context.headers;if(f)for(var l in f)p.setRequestHeader(l,f[l])}catch(o){this.callbacks.onError({code:p.status,text:o.message},m,p);return}m.rangeEnd&&p.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),p.send()},r.readystatechange=function(){var v=this.context,m=this.loader,p=this.stats;if(!v||!m)return;var h=m.readyState,u=this.config;if(p.aborted)return;if(h>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),h===4){m.onreadystatechange=null,m.onprogress=null;var f=m.status;if(f>=200&&f<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var l,o;if(v.responseType==="arraybuffer"?(l=m.response,o=l.byteLength):(l=m.responseText,o=l.length),p.loaded=p.total=o,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,v,l,m),!this.callbacks)return;var a={url:m.responseURL,data:l};this.callbacks.onSuccess(a,p,v,m)}else p.retry>=u.maxRetry||f>=400&&f<499?(X.logger.error(f+" while loading "+v.url),this.callbacks.onError({code:f,text:m.statusText},v,m)):(X.logger.warn(f+" while loading "+v.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout)},r.loadtimeout=function(){X.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},r.loadprogress=function(v){var m=this.stats;m.loaded=v.loaded,v.lengthComputable&&(m.total=v.total)},r.getCacheAge=function(){var v=null;if(this.loader&&U.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");v=m?parseFloat(m):null}return v},G}();J.default=K}}).default})},vHTk:function(rt,be,Z){rt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return j}),Z.d(be,"b",function(){return U}),Z.d(be,"d",function(){return K}),Z.d(be,"a",function(){return r}),Z.d(be,"e",function(){return L});var ie=Z("9og8"),J=Z("WmNS"),P=Z.n(J),X=Z("ErOA");function j(v){return Object(X.c)("libraries/".concat(v,".json"))}function U(){return Object(X.c)("library_tags.json")}function K(v){return G.apply(this,arguments)}function G(){return G=Object(ie.a)(P.a.mark(function v(m){var p;return P.a.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(X.b)("attachments/".concat(m,".json"));case 2:return p=u.sent,u.abrupt("return",p.status===0);case 4:case"end":return u.stop()}},v)})),G.apply(this,arguments)}function r(v){return Object(X.f)("libraries.json",v)}function L(v,m){return Object(X.g)("libraries/".concat(v,".json"),m)}},y5JW:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return f}),Z.d(be,"a",function(){return l});var ie=Z("DZo9"),J=Z("8z0m"),P=Z("+L6B"),X=Z("2/Rp"),j=Z("9og8"),U=Z("miYZ"),K=Z("tsqr"),G=Z("k1fw"),r=Z("oBTY"),L=Z("WmNS"),v=Z.n(L),m=Z("q1tI"),p=Z.n(m),h=Z("m3rI"),u=Z("wzkS"),f="\u3000\u3000";function l(o){var s=["Bytes","KB","MB","GB","TB"];if(o==0)return"0 Byte";var a=parseInt(""+Math.floor(Math.log(o)/Math.log(1024)),10);return(o/Math.pow(1024,a)).toFixed(1)+" "+s[a]}be.b=function(o){var s=o.value,a=s===void 0?[]:s,O=o.action,E=o.onChange,w=o.className,D=o.maxSize,R=D===void 0?150:D,A=o.title,C=A===void 0?"\u6587\u4EF6\u4E0A\u4F20":A,T=o.accept,c=T===void 0?null:T,S={multiple:!1,fileList:a,accept:c,withCredentials:!0,beforeUpload:function(B){var F=B.size/1024/1024;return!0},action:"".concat(h.a.API_SERVER,"/api/attachments.json"),onChange:function(B){var F,_,M=Object(r.a)(B.fileList);if(M=M.map(function(H){return H.name.indexOf(f)===-1&&(H.name="".concat(H.name).concat(f).concat(l(H.size))),Object(G.a)({},H)}),B.file.status==="done"&&((F=B.file)===null||F===void 0||((_=F.response)===null||_===void 0)?void 0:_.status)===-1){var I,g;K.b.error((I=B.file)===null||I===void 0||((g=I.response)===null||g===void 0)?void 0:g.message),E([]);return}E(M)},onRemove:function(){var b=Object(j.a)(v.a.mark(function F(_){var M,I,g;return v.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(M=_.size/1024/1024,!(_.status==="uploading")){$.next=3;break}return $.abrupt("return",!0);case 3:if(M0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:a.length>0,ghost:!0},C),p.a.createElement("span",{onClick:y,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",R,"M)"," ")))}},zgC5:function(rt,be,Z){rt.exports={flex_box_center:"flex_box_center___BgH5i",flex_space_between:"flex_space_between___wIrN2",flex_box_vertical_center:"flex_box_vertical_center___3s8_f",flex_box_center_end:"flex_box_center_end___25L_b",flex_box_column:"flex_box_column___3Ya3F",bg:"bg___OpMlc",flexRow:"flexRow___3MRDT",flexJustifyCenter:"flexJustifyCenter___2VqIU",flexAlignEnd:"flexAlignEnd___1zWKJ",flexAlignCenter:"flexAlignCenter___46F8K",flexColumn:"flexColumn___2WIH4",formWrap:"formWrap___1eB5i",titleWrap:"titleWrap___1Db7T",fieldWrap:"fieldWrap___2HdAq",mdWrap:"mdWrap___27bNI",titleWrapper:"titleWrapper___2YeUd",backgroundFa:"backgroundFa___2EWsW",button:"button___1PabV",searchMember:"searchMember___2aVSB"}}}]); +`),A=[],C=Object(K.toMpegTsClockFromTimescale)(l,o),T="00:00.000",d=0,S=0,y,b=!0,B=!1;D.oncue=function(F){var _=s[a],M=s.ccOffset,I=(d-C)/9e4;if(_!=null&&_.new&&(S!==void 0?M=s.ccOffset=_.start:h(s,a,I)),I&&(M=I-s.presentationOffset),B){var g=F.endTime-F.startTime,H=Object(G.normalizePts)((F.startTime+M-S)*9e4,O*9e4)/9e4;F.startTime=H,F.endTime=H+g}var $=F.text.trim();F.text=decodeURIComponent(encodeURIComponent($)),F.id||(F.id=p(F.startTime,F.endTime,$)),F.endTime>0&&A.push(F)},D.onparsingerror=function(F){y=F},D.onflush=function(){if(y){w(y);return}E(A)},R.forEach(function(F){if(b)if(L(F,"X-TIMESTAMP-MAP=")){b=!1,B=!0,F.substr(16).split(",").forEach(function(_){L(_,"LOCAL:")?T=_.substr(6):L(_,"MPEGTS:")&&(d=parseInt(_.substr(7)))});try{S=v(T)/1e3}catch(_){B=!1,y=_}return}else F===""&&(b=!1);D.parse(F+` +`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(ie,J,P){"use strict";P.r(J);var X=P("./src/utils/logger.ts"),j=P("./src/loader/load-stats.ts"),U=/^age:\s*[\d.]+\s*$/m,K=function(){function G(L){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=L?L.xhrSetup:null,this.stats=new j.LoadStats,this.retryDelay=0}var r=G.prototype;return r.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},r.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},r.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},r.load=function(v,m,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=m,this.callbacks=p,this.retryDelay=m.retryDelay,this.loadInternal()},r.loadInternal=function(){var v=this.config,m=this.context;if(!v)return;var p=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0;var u=this.xhrSetup;try{if(u)try{u(p,m.url)}catch(o){p.open("GET",m.url,!0),u(p,m.url)}p.readyState||p.open("GET",m.url,!0);var f=this.context.headers;if(f)for(var l in f)p.setRequestHeader(l,f[l])}catch(o){this.callbacks.onError({code:p.status,text:o.message},m,p);return}m.rangeEnd&&p.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),p.send()},r.readystatechange=function(){var v=this.context,m=this.loader,p=this.stats;if(!v||!m)return;var h=m.readyState,u=this.config;if(p.aborted)return;if(h>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),h===4){m.onreadystatechange=null,m.onprogress=null;var f=m.status;if(f>=200&&f<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var l,o;if(v.responseType==="arraybuffer"?(l=m.response,o=l.byteLength):(l=m.responseText,o=l.length),p.loaded=p.total=o,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,v,l,m),!this.callbacks)return;var a={url:m.responseURL,data:l};this.callbacks.onSuccess(a,p,v,m)}else p.retry>=u.maxRetry||f>=400&&f<499?(X.logger.error(f+" while loading "+v.url),this.callbacks.onError({code:f,text:m.statusText},v,m)):(X.logger.warn(f+" while loading "+v.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout)},r.loadtimeout=function(){X.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},r.loadprogress=function(v){var m=this.stats;m.loaded=v.loaded,v.lengthComputable&&(m.total=v.total)},r.getCacheAge=function(){var v=null;if(this.loader&&U.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");v=m?parseFloat(m):null}return v},G}();J.default=K}}).default})},vHTk:function(rt,be,Z){rt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return j}),Z.d(be,"b",function(){return U}),Z.d(be,"d",function(){return K}),Z.d(be,"a",function(){return r}),Z.d(be,"e",function(){return L});var ie=Z("9og8"),J=Z("WmNS"),P=Z.n(J),X=Z("ErOA");function j(v){return Object(X.c)("libraries/".concat(v,".json"))}function U(){return Object(X.c)("library_tags.json")}function K(v){return G.apply(this,arguments)}function G(){return G=Object(ie.a)(P.a.mark(function v(m){var p;return P.a.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(X.b)("attachments/".concat(m,".json"));case 2:return p=u.sent,u.abrupt("return",p.status===0);case 4:case"end":return u.stop()}},v)})),G.apply(this,arguments)}function r(v){return Object(X.f)("libraries.json",v)}function L(v,m){return Object(X.g)("libraries/".concat(v,".json"),m)}},y5JW:function(rt,be,Z){"use strict";Z.d(be,"c",function(){return f}),Z.d(be,"a",function(){return l});var ie=Z("DZo9"),J=Z("8z0m"),P=Z("+L6B"),X=Z("2/Rp"),j=Z("9og8"),U=Z("miYZ"),K=Z("tsqr"),G=Z("k1fw"),r=Z("oBTY"),L=Z("WmNS"),v=Z.n(L),m=Z("q1tI"),p=Z.n(m),h=Z("m3rI"),u=Z("wzkS"),f="\u3000\u3000";function l(o){var s=["Bytes","KB","MB","GB","TB"];if(o==0)return"0 Byte";var a=parseInt(""+Math.floor(Math.log(o)/Math.log(1024)),10);return(o/Math.pow(1024,a)).toFixed(1)+" "+s[a]}be.b=function(o){var s=o.value,a=s===void 0?[]:s,O=o.action,E=o.onChange,w=o.className,D=o.maxSize,R=D===void 0?150:D,A=o.title,C=A===void 0?"\u6587\u4EF6\u4E0A\u4F20":A,T=o.accept,d=T===void 0?null:T,S={multiple:!1,fileList:a,accept:d,withCredentials:!0,beforeUpload:function(B){var F=B.size/1024/1024;return!0},action:"".concat(h.a.API_SERVER,"/api/attachments.json"),onChange:function(B){var F,_,M=Object(r.a)(B.fileList);if(M=M.map(function(H){return H.name.indexOf(f)===-1&&(H.name="".concat(H.name).concat(f).concat(l(H.size))),Object(G.a)({},H)}),B.file.status==="done"&&((F=B.file)===null||F===void 0||((_=F.response)===null||_===void 0)?void 0:_.status)===-1){var I,g;K.b.error((I=B.file)===null||I===void 0||((g=I.response)===null||g===void 0)?void 0:g.message),E([]);return}E(M)},onRemove:function(){var b=Object(j.a)(v.a.mark(function F(_){var M,I,g;return v.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(M=_.size/1024/1024,!(_.status==="uploading")){$.next=3;break}return $.abrupt("return",!0);case 3:if(M0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:a.length>0,ghost:!0},C),p.a.createElement("span",{onClick:y,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",R,"M)"," ")))}},zgC5:function(rt,be,Z){rt.exports={flex_box_center:"flex_box_center___BgH5i",flex_space_between:"flex_space_between___wIrN2",flex_box_vertical_center:"flex_box_vertical_center___3s8_f",flex_box_center_end:"flex_box_center_end___25L_b",flex_box_column:"flex_box_column___3Ya3F",bg:"bg___OpMlc",flexRow:"flexRow___3MRDT",flexJustifyCenter:"flexJustifyCenter___2VqIU",flexAlignEnd:"flexAlignEnd___1zWKJ",flexAlignCenter:"flexAlignCenter___46F8K",flexColumn:"flexColumn___2WIH4",formWrap:"formWrap___1eB5i",titleWrap:"titleWrap___1Db7T",fieldWrap:"fieldWrap___2HdAq",mdWrap:"mdWrap___27bNI",titleWrapper:"titleWrapper___2YeUd",backgroundFa:"backgroundFa___2EWsW",button:"button___1PabV",searchMember:"searchMember___2aVSB"}}}]); diff --git a/p__Classrooms__Lists__Graduation__Topics__Edit__index.64038857.async.js b/p__Classrooms__Lists__Graduation__Topics__Edit__index.64038857.async.js index cd21e59657..8d4eb7d1b6 100644 --- a/p__Classrooms__Lists__Graduation__Topics__Edit__index.64038857.async.js +++ b/p__Classrooms__Lists__Graduation__Topics__Edit__index.64038857.async.js @@ -147,11 +147,11 @@ PERFORMANCE OF THIS SOFTWARE. `),ve.appendChild(Ke),ve},E.prototype.setCurrentColor=function(I,H){var q=this;this.currentColor=I,this.colorBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(I)},E}(oe),we=function(){function V(E,I,H){this._state="new",this._isSelected=!1,this._container=E,this._overlayContainer=I,this.globalSettings=H,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(V.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(E){return!1},Object.defineProperty(V.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},V.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},V.prototype.pointerDown=function(E,I){},V.prototype.dblClick=function(E,I){},V.prototype.manipulate=function(E){},V.prototype.pointerUp=function(E){this.stateChanged()},V.prototype.dispose=function(){},V.prototype.addMarkerVisualToContainer=function(E){this.container.childNodes.length>0?this.container.insertBefore(E,this.container.childNodes[0]):this.container.appendChild(E)},V.prototype.getState=function(){return{typeName:V.typeName,state:this.state,notes:this.notes}},V.prototype.restoreState=function(E){this._state=E.state,this.notes=E.notes},V.prototype.scale=function(E,I){},V.prototype.colorChanged=function(E){this.onColorChanged&&this.onColorChanged(E),this.stateChanged()},V.prototype.fillColorChanged=function(E){this.onFillColorChanged&&this.onFillColorChanged(E),this.stateChanged()},V.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var E=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),E.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(E)&&this.onStateChanged(this)}},V.typeName="MarkerBase",V}(),Ae=function(){function V(){this.findGripByVisual=this.findGripByVisual.bind(this)}return V.prototype.findGripByVisual=function(E){return this.topLeft.ownsTarget(E)?this.topLeft:this.topCenter.ownsTarget(E)?this.topCenter:this.topRight.ownsTarget(E)?this.topRight:this.centerLeft.ownsTarget(E)?this.centerLeft:this.centerRight.ownsTarget(E)?this.centerRight:this.bottomLeft.ownsTarget(E)?this.bottomLeft:this.bottomCenter.ownsTarget(E)?this.bottomCenter:this.bottomRight.ownsTarget(E)?this.bottomRight:void 0},V}(),Ue=function(){function V(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return V.prototype.ownsTarget=function(E){return E===this.visual||E===this.visual.childNodes[0]||E===this.visual.childNodes[1]},V}(),Ve=function(){function V(){}return V.toITransformMatrix=function(E){return{a:E.a,b:E.b,c:E.c,d:E.d,e:E.e,f:E.f}},V.toSVGMatrix=function(E,I){return E.a=I.a,E.b=I.b,E.c=I.c,E.d=I.d,E.e=I.e,E.f=I.f,E},V}(),Ze=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.left=0,z.top=0,z.width=0,z.height=0,z.defaultSize={x:50,y:20},z.offsetX=0,z.offsetY=0,z.rotationAngle=0,z.CB_DISTANCE=10,z._suppressMarkerCreateEvent=!1,z.container.transform.baseVal.appendItem(ae.createTransform()),z.setupControlBox(),z}return Ce(E,V),Object.defineProperty(E.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"visual",{get:function(){return this._visual},set:function(I){this._visual=I;var H=ae.createTransform();this._visual.transform.baseVal.appendItem(H)},enumerable:!1,configurable:!0}),E.prototype.ownsTarget=function(I){return!!V.prototype.ownsTarget.call(this,I)||!!(this.controlGrips.findGripByVisual(I)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(I))},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.left=I.x,this.top=I.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var q=this.unrotatePoint(I);if(this.manipulationStartX=q.x,this.manipulationStartY=q.y,this.offsetX=q.x-this.left,this.offsetY=q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(H),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(H)){this.activeGrip=this.rotatorGrip;var z=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=z.x-this.width/2,this.top=z.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ve=this.container.transform.baseVal.getItem(0);ve.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ve,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},E.prototype.pointerUp=function(I){var H=this.state;V.prototype.pointerUp.call(this,I),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(I),this._state="select",H==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},E.prototype.moveVisual=function(I){this.visual.style.transform="translate("+I.x+"px, "+I.y+"px)"},E.prototype.manipulate=function(I){var H=this.unrotatePoint(I);this.state==="creating"?this.resize(I):this.state==="move"?(this.left=this.manipulationStartLeft+(H.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(H.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(H):this.state==="rotate"&&this.rotate(I)},E.prototype.resize=function(I){var H=this.manipulationStartLeft,q=this.manipulationStartWidth,z=this.manipulationStartTop,ve=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:H=this.manipulationStartLeft+I.x-this.manipulationStartX,q=this.manipulationStartWidth+this.manipulationStartLeft-H;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:q=this.manipulationStartWidth+I.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:z=this.manipulationStartTop+I.y-this.manipulationStartY,ve=this.manipulationStartHeight+this.manipulationStartTop-z;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ve=this.manipulationStartHeight+I.y-this.manipulationStartY}q>=0?(this.left=H,this.width=q):(this.left=H+q,this.width=-q),ve>=0?(this.top=z,this.height=ve):(this.top=z+ve,this.height=-ve),this.setSize()},E.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},E.prototype.rotate=function(I){if(Math.abs(I.x-this.centerX)>.1){var H=Math.sign(I.x-this.centerX);this.rotationAngle=180*Math.atan((I.y-this.centerY)/(I.x-this.centerX))/Math.PI+90*H,this.applyRotation()}},E.prototype.applyRotation=function(){var I=this.container.transform.baseVal.getItem(0);I.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(I,0)},E.prototype.rotatePoint=function(I){if(this.rotationAngle===0)return I;var H=this.container.getCTM(),q=ae.createPoint(I.x,I.y);return{x:(q=q.matrixTransform(H)).x,y:q.y}},E.prototype.unrotatePoint=function(I){if(this.rotationAngle===0)return I;var H=this.container.getCTM();H=H.inverse();var q=ae.createPoint(I.x,I.y);return{x:(q=q.matrixTransform(H)).x,y:q.y}},E.prototype.select=function(){V.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},E.prototype.deselect=function(){V.prototype.deselect.call(this),this.controlBox.style.display="none"},E.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var I=ae.createTransform();I.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(I),this.container.appendChild(this.controlBox),this.controlRect=ae.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ae.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ae,this.addControlGrips(),this.controlBox.style.display="none"},E.prototype.adjustControlBox=function(){var I=this.controlBox.transform.baseVal.getItem(0);I.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(I,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},E.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},E.prototype.createGrip=function(){var I=new Ue;return I.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(I.visual),I},E.prototype.positionGrips=function(){var I=this.controlGrips.topLeft.GRIP_SIZE,H=-I/2,q=H,z=(this.width+this.CB_DISTANCE)/2-I/2,ve=(this.height+this.CB_DISTANCE)/2-I/2,Ke=this.height+this.CB_DISTANCE-I/2,it=this.width+this.CB_DISTANCE-I/2;this.positionGrip(this.controlGrips.topLeft.visual,H,q),this.positionGrip(this.controlGrips.topCenter.visual,z,q),this.positionGrip(this.controlGrips.topRight.visual,it,q),this.positionGrip(this.controlGrips.centerLeft.visual,H,ve),this.positionGrip(this.controlGrips.centerRight.visual,it,ve),this.positionGrip(this.controlGrips.bottomLeft.visual,H,Ke),this.positionGrip(this.controlGrips.bottomCenter.visual,z,Ke),this.positionGrip(this.controlGrips.bottomRight.visual,it,Ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,z,q-3*this.CB_DISTANCE)},E.prototype.positionGrip=function(I,H,q){var z=I.transform.baseVal.getItem(0);z.setTranslate(H,q),I.transform.baseVal.replaceItem(z,0)},E.prototype.hideControlBox=function(){this.controlBox.style.display="none"},E.prototype.showControlBox=function(){this.controlBox.style.display=""},E.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},V.prototype.getState.call(this))},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.left=H.left,this.top=H.top,this.width=H.width,this.height=H.height,this.rotationAngle=H.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,H.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,H.containerTransformMatrix))},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H);var q=this.rotatePoint({x:this.left,y:this.top}),z=this.unrotatePoint({x:q.x*I,y:q.y*H});this.left=z.x,this.top=z.y,this.width=this.width*I,this.height=this.height*H,this.adjustControlBox()},E}(we),$e=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.fillColor="transparent",z.strokeColor="transparent",z.strokeWidth=0,z.strokeDasharray="",z.opacity=1,z.setStrokeColor=z.setStrokeColor.bind(z),z.setFillColor=z.setFillColor.bind(z),z.setStrokeWidth=z.setStrokeWidth.bind(z),z.setStrokeDasharray=z.setStrokeDasharray.bind(z),z.createVisual=z.createVisual.bind(z),z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual)},E.prototype.createVisual=function(){this.visual=ae.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},E.prototype.manipulate=function(I){V.prototype.manipulate.call(this,I)},E.prototype.resize=function(I){V.prototype.resize.call(this,I),this.setSize()},E.prototype.setSize=function(){V.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},E.prototype.pointerUp=function(I){V.prototype.pointerUp.call(this,I),this.setSize()},E.prototype.setStrokeColor=function(I){this.strokeColor=I,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(I),this.stateChanged()},E.prototype.setFillColor=function(I){this.fillColor=I,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},E.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},E.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},E.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},V.prototype.getState.call(this))},E.prototype.restoreState=function(I){var H=I;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),V.prototype.restoreState.call(this,I),this.setSize()},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.setSize()},E.title="Rectangle marker",E}(Ze),tt=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.widths=[],ve.widthBoxes=[],ve.widths=H,ve.currentWidth=q,ve.setCurrentWidth=ve.setCurrentWidth.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.widths.forEach(function(q){var z=document.createElement("div");z.style.display="flex",z.style.flexGrow="2",z.style.alignItems="center",z.style.justifyContent="space-between",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.borderColor=q===I.currentWidth?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentWidth(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.innerText=q.toString(),ve.style.marginRight="5px",z.appendChild(ve);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.display="flex",Ke.style.alignItems="center";var it=document.createElement("hr");it.style.minWidth="20px",it.style.border="0px",it.style.borderTop=q+"px solid "+I.uiStyleSettings.toolboxColor,it.style.flexGrow="2",Ke.appendChild(it),z.appendChild(Ke),I.widthBoxes.push(z)}),H},E.prototype.setCurrentWidth=function(I,H){var q=this;this.currentWidth=I,this.widthBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},E}(oe),et=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.styles=[],ve.styleBoxes=[],ve.styles=H,ve.currentStyle=q,ve.setCurrentStyle=ve.setCurrentStyle.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.styles.forEach(function(q){var z=document.createElement("div");z.style.display="flex",z.style.alignItems="center",z.style.justifyContent="space-between",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.overflow="hidden",z.style.maxWidth=100/I.styles.length-5+"%",z.style.borderColor=q===I.currentStyle?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentStyle(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.style.minHeight="20px",ve.style.flexGrow="2",ve.style.overflow="hidden";var Ke=` - `;ve.innerHTML=Ke,z.appendChild(ve),I.styleBoxes.push(z)}),H},E.prototype.setCurrentStyle=function(I,H){var q=this;this.currentStyle=I,this.styleBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},E}(oe),Je=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="FrameMarker",E.title="Frame marker",E.icon='',E}($e),Me=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ut=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.x1=0,z.y1=0,z.x2=0,z.y2=0,z.defaultLength=50,z.manipulationStartX=0,z.manipulationStartY=0,z.manipulationStartX1=0,z.manipulationStartY1=0,z.manipulationStartX2=0,z.manipulationStartY2=0,z.setupControlBox(),z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!!V.prototype.ownsTarget.call(this,I)||!(!this.grip1.ownsTarget(I)&&!this.grip2.ownsTarget(I))},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.manipulationStartX=I.x,this.manipulationStartY=I.y,this.state==="new"&&(this.x1=I.x,this.y1=I.y,this.x2=I.x,this.y2=I.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(H)?this.activeGrip=this.grip1:this.grip2.ownsTarget(H)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},E.prototype.pointerUp=function(I){var H=this.state;V.prototype.pointerUp.call(this,I),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(I),this._state="select",H==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},E.prototype.adjustVisual=function(){},E.prototype.manipulate=function(I){this.state==="creating"?this.resize(I):this.state==="move"?(this.x1=this.manipulationStartX1+I.x-this.manipulationStartX,this.y1=this.manipulationStartY1+I.y-this.manipulationStartY,this.x2=this.manipulationStartX2+I.x-this.manipulationStartX,this.y2=this.manipulationStartY2+I.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(I)},E.prototype.resize=function(I){switch(this.activeGrip){case this.grip1:this.x1=I.x,this.y1=I.y;break;case this.grip2:case void 0:this.x2=I.x,this.y2=I.y}this.adjustVisual(),this.adjustControlBox()},E.prototype.select=function(){V.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},E.prototype.deselect=function(){V.prototype.deselect.call(this),this.controlBox.style.display="none"},E.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},E.prototype.adjustControlBox=function(){this.positionGrips()},E.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},E.prototype.createGrip=function(){var I=new Ue;return I.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(I.visual),I},E.prototype.positionGrips=function(){var I=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-I/2,this.y1-I/2),this.positionGrip(this.grip2.visual,this.x2-I/2,this.y2-I/2)},E.prototype.positionGrip=function(I,H,q){var z=I.transform.baseVal.getItem(0);z.setTranslate(H,q),I.transform.baseVal.replaceItem(z,0)},E.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},V.prototype.getState.call(this))},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.x1=H.x1,this.y1=H.y1,this.x2=H.x2,this.y2=H.y2},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.x1=this.x1*I,this.y1=this.y1*H,this.x2=this.x2*I,this.y2=this.y2*H,this.adjustVisual(),this.adjustControlBox()},E}(we),nt=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor="transparent",z.strokeWidth=0,z.strokeDasharray="",z.setStrokeColor=z.setStrokeColor.bind(z),z.setStrokeWidth=z.setStrokeWidth.bind(z),z.setStrokeDasharray=z.setStrokeDasharray.bind(z),z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorLine&&I!==this.visibleLine)},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},E.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},E.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},E.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},E.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.createVisual(),this.adjustVisual()},E.typeName="LineMarker",E.title="Line marker",E.icon='',E}(ut),Fe=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.fonts=[],ve.fontBoxes=[],ve.fonts=H,ve.currentFont=q,ve.setCurrentFont=ve.setCurrentFont.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.flexGrow="2",this.fonts.forEach(function(q){var z=document.createElement("div");z.style.display="inline-block",z.style.alignItems="center",z.style.justifyContent="space-between",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.overflow="hidden",z.style.maxWidth=100/I.fonts.length-5+"%",z.style.borderColor=q===I.currentFont?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentFont(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.style.display="flex",ve.style.minHeight="20px",ve.style.flexGrow="2",ve.style.fontFamily=q,ve.style.overflow="hidden";var Ke=document.createElement("div");Ke.style.whiteSpace="nowrap",Ke.style.overflow="hidden",Ke.style.textOverflow="ellipsis",Ke.innerHTML="The quick brown fox jumps over the lazy dog",ve.appendChild(Ke),z.appendChild(ve),I.fontBoxes.push(z)}),H},E.prototype.setCurrentFont=function(I,H){var q=this;this.currentFont=I,this.fontBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},E}(oe),je=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.color="transparent",z.padding=5,z.DEFAULT_TEXT="your text here",z.text=z.DEFAULT_TEXT,z.isMoved=!1,z.color=q.defaultColor,z.fontFamily=q.defaultFontFamily,z.defaultSize={x:100,y:30},z.setColor=z.setColor.bind(z),z.setFont=z.setFont.bind(z),z.renderText=z.renderText.bind(z),z.sizeText=z.sizeText.bind(z),z.textEditDivClicked=z.textEditDivClicked.bind(z),z.showTextEditor=z.showTextEditor.bind(z),z.setSize=z.setSize.bind(z),z.positionTextEditor=z.positionTextEditor.bind(z),z.colorPanel=new ye("Color",q.defaultColorSet,q.defaultColor),z.colorPanel.onColorChanged=z.setColor,z.fontFamilyPanel=new Fe("Font",q.defaultFontFamilies,q.defaultFontFamily),z.fontFamilyPanel.onFontChanged=z.setFont,z}return Ce(E,V),E.prototype.ownsTarget=function(I){if(V.prototype.ownsTarget.call(this,I)||I===this.visual||I===this.textElement||I===this.bgRectangle)return!0;var H=!1;return this.textElement.childNodes.forEach(function(q){q===I&&(H=!0)}),H},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.isMoved=!1,this.pointerDownPoint=I,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},E.prototype.renderText=function(){var I=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(H){I.textElement.appendChild(ae.createTSpan(H.trim()===""?" ":H.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},E.prototype.getTextScale=function(){var I=this.textElement.getBBox(),H=1;if(I.width>0&&I.height>0){var q=(1*this.width-this.width*this.padding*2/100)/I.width,z=(1*this.height-this.height*this.padding*2/100)/I.height;H=Math.min(q,z)}return H},E.prototype.getTextPosition=function(I){var H=this.textElement.getBBox(),q=0,z=0;return H.width>0&&H.height>0&&(q=(this.width-H.width*I)/2,z=this.height/2-H.height*I/2),{x:q,y:z}},E.prototype.sizeText=function(){var I=this.textElement.getBBox(),H=this.getTextScale(),q=this.getTextPosition(H);q.y-=I.y*H,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+q.x+"px, "+q.y+"px) scale("+H+", "+H+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(q.x,q.y),this.textElement.transform.baseVal.getItem(1).setScale(H,H))},E.prototype.manipulate=function(I){V.prototype.manipulate.call(this,I),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(I.x-this.pointerDownPoint.x)>5||Math.abs(I.y-this.pointerDownPoint.y)>5)},E.prototype.resize=function(I){V.prototype.resize.call(this,I),this.isMoved=!0,this.setSize(),this.sizeText()},E.prototype.setSize=function(){V.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},E.prototype.pointerUp=function(I){var H=this.state;H==="creating"&&(this._suppressMarkerCreateEvent=!0),V.prototype.pointerUp.call(this,I),this.setSize(),(H==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},E.prototype.showTextEditor=function(){var I=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(H){H.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var H=Number.parseFloat(I.textEditor.style.fontSize);I.textEditor.clientWidth>=Number.parseInt(I.textEditor.style.maxWidth)&&H>.9;)H-=.1,I.textEditor.style.fontSize=Math.max(H,.9)+"em"}),this.textEditor.addEventListener("keyup",function(H){H.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(H){if(H.clipboardData){var q=H.clipboardData.getData("text"),z=window.getSelection();if(!z.rangeCount)return!1;z.deleteFromDocument(),z.getRangeAt(0).insertNode(document.createTextNode(q)),H.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){I.textEditDivClicked(I.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},E.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var I=this.getTextScale(),H=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),q=this.textElement.getBBox(),z={x:q.width*I,y:q.height*I};H.x-=z.x/2,H.y-=z.y/2,this.textEditor.style.top=H.y+"px",this.textEditor.style.left=H.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-H.x+"px",this.textEditor.style.fontSize=Math.max(16*I,12)+"px",this.textElement.style.display="none"}},E.prototype.textEditDivClicked=function(I){this.text=I.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},E.prototype.select=function(){V.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},E.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),V.prototype.deselect.call(this)},E.prototype.dblClick=function(I,H){V.prototype.dblClick.call(this,I,H),this.showTextEditor()},E.prototype.setColor=function(I){this.textElement&&ae.setAttributes(this.textElement,[["fill",I]]),this.color=I,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(I)},E.prototype.setFont=function(I){this.textElement&&ae.setAttributes(this.textElement,[["font-family",I]]),this.fontFamily=I,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},E.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},E.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){var H=I;this.color=H.color,this.fontFamily=H.fontFamily,this.padding=H.padding,this.text=H.text,this.createVisual(),V.prototype.restoreState.call(this,I),this.setSize()},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.setSize(),this.sizeText(),this.positionTextEditor()},E.typeName="TextMarker",E.title="Text marker",E.icon='',E}(Ze),Ee=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.color="transparent",z.lineWidth=3,z.drawing=!1,z.pixelRatio=1,z.color=q.defaultColor,z.lineWidth=q.defaultStrokeWidth,z.pixelRatio=q.freehandPixelRatio,z.setColor=z.setColor.bind(z),z.addCanvas=z.addCanvas.bind(z),z.finishCreation=z.finishCreation.bind(z),z.setLineWidth=z.setLineWidth.bind(z),z.colorPanel=new ye("Color",q.defaultColorSet,q.defaultColor),z.colorPanel.onColorChanged=z.setColor,z.lineWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.lineWidthPanel.onWidthChanged=z.setLineWidth,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.drawingImage)},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var I=ae.createTransform();this.visual.transform.baseVal.appendItem(I),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(I.x,I.y),this.drawing=!0):V.prototype.pointerDown.call(this,I,H)},E.prototype.manipulate=function(I){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(I.x,I.y),this.canvasContext.stroke()):V.prototype.manipulate.call(this,I)},E.prototype.resize=function(I){V.prototype.resize.call(this,I),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},E.prototype.pointerUp=function(I){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):V.prototype.pointerUp.call(this,I)},E.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},E.prototype.select=function(){this.state==="creating"&&this.finishCreation(),V.prototype.select.call(this)},E.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),V.prototype.deselect.call(this)},E.prototype.finishCreation=function(){for(var I=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),H=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],q=H[0],z=H[1],ve=H[2],Ke=H[3],it=!1,pt=0;pt0&&(it=!0,ptKe&&(Ke=pt),Ye>ve&&(ve=Ye));if(it){this.left=q/this.pixelRatio,this.top=z/this.pixelRatio,this.width=(ve-q)/this.pixelRatio,this.height=(Ke-z)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ve-q,_t.height=Ke-z,_t.getContext("2d").putImageData(this.canvasContext.getImageData(q,z,ve-q,Ke-z),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},E.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},E.prototype.setColor=function(I){this.color=I,this.colorChanged(I)},E.prototype.setLineWidth=function(I){this.lineWidth=I},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({drawingImgUrl:this.drawingImgUrl},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){this.createVisual(),V.prototype.restoreState.call(this,I),this.drawingImgUrl=I.drawingImgUrl,this.setDrawingImage()},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.setDrawingImage()},E.typeName="FreehandMarker",E.title="Freehand marker",E.icon='',E}(Ze),ge=function(V){function E(I,H,q){var z=V.call(this,I,q||'')||this;return z.typeBoxes=[],z.currentType=H,z.setCurrentType=z.setCurrentType.bind(z),z}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2";for(var q=function(Ke){var it="both";switch(Ke){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var pt=document.createElement("div");if(pt.style.display="flex",pt.style.flexGrow="2",pt.style.alignItems="center",pt.style.justifyContent="space-between",pt.style.padding="5px",pt.style.borderWidth="2px",pt.style.borderStyle="solid",pt.style.borderColor=it===z.currentType?z.uiStyleSettings.toolboxAccentColor:"transparent",pt.addEventListener("click",function(){I.setCurrentType(it,pt)}),H.appendChild(pt),it==="both"||it==="start"){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.innerHTML=` + `;ve.innerHTML=Ke,z.appendChild(ve),I.styleBoxes.push(z)}),H},E.prototype.setCurrentStyle=function(I,H){var q=this;this.currentStyle=I,this.styleBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},E}(oe),Je=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="FrameMarker",E.title="Frame marker",E.icon='',E}($e),Me=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ut=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.x1=0,z.y1=0,z.x2=0,z.y2=0,z.defaultLength=50,z.manipulationStartX=0,z.manipulationStartY=0,z.manipulationStartX1=0,z.manipulationStartY1=0,z.manipulationStartX2=0,z.manipulationStartY2=0,z.setupControlBox(),z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!!V.prototype.ownsTarget.call(this,I)||!(!this.grip1.ownsTarget(I)&&!this.grip2.ownsTarget(I))},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.manipulationStartX=I.x,this.manipulationStartY=I.y,this.state==="new"&&(this.x1=I.x,this.y1=I.y,this.x2=I.x,this.y2=I.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(H)?this.activeGrip=this.grip1:this.grip2.ownsTarget(H)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},E.prototype.pointerUp=function(I){var H=this.state;V.prototype.pointerUp.call(this,I),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(I),this._state="select",H==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},E.prototype.adjustVisual=function(){},E.prototype.manipulate=function(I){this.state==="creating"?this.resize(I):this.state==="move"?(this.x1=this.manipulationStartX1+I.x-this.manipulationStartX,this.y1=this.manipulationStartY1+I.y-this.manipulationStartY,this.x2=this.manipulationStartX2+I.x-this.manipulationStartX,this.y2=this.manipulationStartY2+I.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(I)},E.prototype.resize=function(I){switch(this.activeGrip){case this.grip1:this.x1=I.x,this.y1=I.y;break;case this.grip2:case void 0:this.x2=I.x,this.y2=I.y}this.adjustVisual(),this.adjustControlBox()},E.prototype.select=function(){V.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},E.prototype.deselect=function(){V.prototype.deselect.call(this),this.controlBox.style.display="none"},E.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},E.prototype.adjustControlBox=function(){this.positionGrips()},E.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},E.prototype.createGrip=function(){var I=new Ue;return I.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(I.visual),I},E.prototype.positionGrips=function(){var I=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-I/2,this.y1-I/2),this.positionGrip(this.grip2.visual,this.x2-I/2,this.y2-I/2)},E.prototype.positionGrip=function(I,H,q){var z=I.transform.baseVal.getItem(0);z.setTranslate(H,q),I.transform.baseVal.replaceItem(z,0)},E.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},V.prototype.getState.call(this))},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.x1=H.x1,this.y1=H.y1,this.x2=H.x2,this.y2=H.y2},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.x1=this.x1*I,this.y1=this.y1*H,this.x2=this.x2*I,this.y2=this.y2*H,this.adjustVisual(),this.adjustControlBox()},E}(we),rt=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor="transparent",z.strokeWidth=0,z.strokeDasharray="",z.setStrokeColor=z.setStrokeColor.bind(z),z.setStrokeWidth=z.setStrokeWidth.bind(z),z.setStrokeDasharray=z.setStrokeDasharray.bind(z),z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorLine&&I!==this.visibleLine)},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},E.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},E.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},E.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},E.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.createVisual(),this.adjustVisual()},E.typeName="LineMarker",E.title="Line marker",E.icon='',E}(ut),Fe=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.fonts=[],ve.fontBoxes=[],ve.fonts=H,ve.currentFont=q,ve.setCurrentFont=ve.setCurrentFont.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.flexGrow="2",this.fonts.forEach(function(q){var z=document.createElement("div");z.style.display="inline-block",z.style.alignItems="center",z.style.justifyContent="space-between",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.overflow="hidden",z.style.maxWidth=100/I.fonts.length-5+"%",z.style.borderColor=q===I.currentFont?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentFont(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.style.display="flex",ve.style.minHeight="20px",ve.style.flexGrow="2",ve.style.fontFamily=q,ve.style.overflow="hidden";var Ke=document.createElement("div");Ke.style.whiteSpace="nowrap",Ke.style.overflow="hidden",Ke.style.textOverflow="ellipsis",Ke.innerHTML="The quick brown fox jumps over the lazy dog",ve.appendChild(Ke),z.appendChild(ve),I.fontBoxes.push(z)}),H},E.prototype.setCurrentFont=function(I,H){var q=this;this.currentFont=I,this.fontBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},E}(oe),je=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.color="transparent",z.padding=5,z.DEFAULT_TEXT="your text here",z.text=z.DEFAULT_TEXT,z.isMoved=!1,z.color=q.defaultColor,z.fontFamily=q.defaultFontFamily,z.defaultSize={x:100,y:30},z.setColor=z.setColor.bind(z),z.setFont=z.setFont.bind(z),z.renderText=z.renderText.bind(z),z.sizeText=z.sizeText.bind(z),z.textEditDivClicked=z.textEditDivClicked.bind(z),z.showTextEditor=z.showTextEditor.bind(z),z.setSize=z.setSize.bind(z),z.positionTextEditor=z.positionTextEditor.bind(z),z.colorPanel=new ye("Color",q.defaultColorSet,q.defaultColor),z.colorPanel.onColorChanged=z.setColor,z.fontFamilyPanel=new Fe("Font",q.defaultFontFamilies,q.defaultFontFamily),z.fontFamilyPanel.onFontChanged=z.setFont,z}return Ce(E,V),E.prototype.ownsTarget=function(I){if(V.prototype.ownsTarget.call(this,I)||I===this.visual||I===this.textElement||I===this.bgRectangle)return!0;var H=!1;return this.textElement.childNodes.forEach(function(q){q===I&&(H=!0)}),H},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.isMoved=!1,this.pointerDownPoint=I,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},E.prototype.renderText=function(){var I=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(H){I.textElement.appendChild(ae.createTSpan(H.trim()===""?" ":H.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},E.prototype.getTextScale=function(){var I=this.textElement.getBBox(),H=1;if(I.width>0&&I.height>0){var q=(1*this.width-this.width*this.padding*2/100)/I.width,z=(1*this.height-this.height*this.padding*2/100)/I.height;H=Math.min(q,z)}return H},E.prototype.getTextPosition=function(I){var H=this.textElement.getBBox(),q=0,z=0;return H.width>0&&H.height>0&&(q=(this.width-H.width*I)/2,z=this.height/2-H.height*I/2),{x:q,y:z}},E.prototype.sizeText=function(){var I=this.textElement.getBBox(),H=this.getTextScale(),q=this.getTextPosition(H);q.y-=I.y*H,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+q.x+"px, "+q.y+"px) scale("+H+", "+H+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(q.x,q.y),this.textElement.transform.baseVal.getItem(1).setScale(H,H))},E.prototype.manipulate=function(I){V.prototype.manipulate.call(this,I),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(I.x-this.pointerDownPoint.x)>5||Math.abs(I.y-this.pointerDownPoint.y)>5)},E.prototype.resize=function(I){V.prototype.resize.call(this,I),this.isMoved=!0,this.setSize(),this.sizeText()},E.prototype.setSize=function(){V.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},E.prototype.pointerUp=function(I){var H=this.state;H==="creating"&&(this._suppressMarkerCreateEvent=!0),V.prototype.pointerUp.call(this,I),this.setSize(),(H==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},E.prototype.showTextEditor=function(){var I=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(H){H.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var H=Number.parseFloat(I.textEditor.style.fontSize);I.textEditor.clientWidth>=Number.parseInt(I.textEditor.style.maxWidth)&&H>.9;)H-=.1,I.textEditor.style.fontSize=Math.max(H,.9)+"em"}),this.textEditor.addEventListener("keyup",function(H){H.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(H){if(H.clipboardData){var q=H.clipboardData.getData("text"),z=window.getSelection();if(!z.rangeCount)return!1;z.deleteFromDocument(),z.getRangeAt(0).insertNode(document.createTextNode(q)),H.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){I.textEditDivClicked(I.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},E.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var I=this.getTextScale(),H=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),q=this.textElement.getBBox(),z={x:q.width*I,y:q.height*I};H.x-=z.x/2,H.y-=z.y/2,this.textEditor.style.top=H.y+"px",this.textEditor.style.left=H.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-H.x+"px",this.textEditor.style.fontSize=Math.max(16*I,12)+"px",this.textElement.style.display="none"}},E.prototype.textEditDivClicked=function(I){this.text=I.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},E.prototype.select=function(){V.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},E.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),V.prototype.deselect.call(this)},E.prototype.dblClick=function(I,H){V.prototype.dblClick.call(this,I,H),this.showTextEditor()},E.prototype.setColor=function(I){this.textElement&&ae.setAttributes(this.textElement,[["fill",I]]),this.color=I,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(I)},E.prototype.setFont=function(I){this.textElement&&ae.setAttributes(this.textElement,[["font-family",I]]),this.fontFamily=I,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},E.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},E.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){var H=I;this.color=H.color,this.fontFamily=H.fontFamily,this.padding=H.padding,this.text=H.text,this.createVisual(),V.prototype.restoreState.call(this,I),this.setSize()},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.setSize(),this.sizeText(),this.positionTextEditor()},E.typeName="TextMarker",E.title="Text marker",E.icon='',E}(Ze),Ee=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.color="transparent",z.lineWidth=3,z.drawing=!1,z.pixelRatio=1,z.color=q.defaultColor,z.lineWidth=q.defaultStrokeWidth,z.pixelRatio=q.freehandPixelRatio,z.setColor=z.setColor.bind(z),z.addCanvas=z.addCanvas.bind(z),z.finishCreation=z.finishCreation.bind(z),z.setLineWidth=z.setLineWidth.bind(z),z.colorPanel=new ye("Color",q.defaultColorSet,q.defaultColor),z.colorPanel.onColorChanged=z.setColor,z.lineWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.lineWidthPanel.onWidthChanged=z.setLineWidth,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.drawingImage)},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var I=ae.createTransform();this.visual.transform.baseVal.appendItem(I),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(I.x,I.y),this.drawing=!0):V.prototype.pointerDown.call(this,I,H)},E.prototype.manipulate=function(I){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(I.x,I.y),this.canvasContext.stroke()):V.prototype.manipulate.call(this,I)},E.prototype.resize=function(I){V.prototype.resize.call(this,I),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},E.prototype.pointerUp=function(I){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):V.prototype.pointerUp.call(this,I)},E.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},E.prototype.select=function(){this.state==="creating"&&this.finishCreation(),V.prototype.select.call(this)},E.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),V.prototype.deselect.call(this)},E.prototype.finishCreation=function(){for(var I=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),H=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],q=H[0],z=H[1],ve=H[2],Ke=H[3],it=!1,pt=0;pt0&&(it=!0,ptKe&&(Ke=pt),Ye>ve&&(ve=Ye));if(it){this.left=q/this.pixelRatio,this.top=z/this.pixelRatio,this.width=(ve-q)/this.pixelRatio,this.height=(Ke-z)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ve-q,_t.height=Ke-z,_t.getContext("2d").putImageData(this.canvasContext.getImageData(q,z,ve-q,Ke-z),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},E.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},E.prototype.setColor=function(I){this.color=I,this.colorChanged(I)},E.prototype.setLineWidth=function(I){this.lineWidth=I},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({drawingImgUrl:this.drawingImgUrl},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){this.createVisual(),V.prototype.restoreState.call(this,I),this.drawingImgUrl=I.drawingImgUrl,this.setDrawingImage()},E.prototype.scale=function(I,H){V.prototype.scale.call(this,I,H),this.setDrawingImage()},E.typeName="FreehandMarker",E.title="Freehand marker",E.icon='',E}(Ze),ge=function(V){function E(I,H,q){var z=V.call(this,I,q||'')||this;return z.typeBoxes=[],z.currentType=H,z.setCurrentType=z.setCurrentType.bind(z),z}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2";for(var q=function(Ke){var it="both";switch(Ke){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var pt=document.createElement("div");if(pt.style.display="flex",pt.style.flexGrow="2",pt.style.alignItems="center",pt.style.justifyContent="space-between",pt.style.padding="5px",pt.style.borderWidth="2px",pt.style.borderStyle="solid",pt.style.borderColor=it===z.currentType?z.uiStyleSettings.toolboxAccentColor:"transparent",pt.addEventListener("click",function(){I.setCurrentType(it,pt)}),H.appendChild(pt),it==="both"||it==="start"){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.innerHTML=` `,Ye.style.marginLeft="5px",pt.appendChild(Ye)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(z.uiStyleSettings!==void 0?z.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",_t.appendChild(jt),pt.appendChild(_t),it==="both"||it==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.innerHTML=` - `,$t.style.marginRight="5px",pt.appendChild($t)}z.typeBoxes.push(pt)},z=this,ve=0;ve<4;ve++)q(ve);return H},E.prototype.setCurrentType=function(I,H){var q=this;this.currentType=I,this.typeBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},E}(oe),_e=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.arrowType="end",z.arrowBaseHeight=10,z.arrowBaseWidth=10,z.getArrowPoints=z.getArrowPoints.bind(z),z.setArrowType=z.setArrowType.bind(z),z.arrowTypePanel=new ge("Arrow type","end"),z.arrowTypePanel.onArrowTypeChanged=z.setArrowType,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.arrow1&&I!==this.arrow2)},E.prototype.getArrowPoints=function(I,H){var q=this.arrowBaseWidth+2*this.strokeWidth,z=this.arrowBaseHeight+2*this.strokeWidth;return I-q/2+","+(H+z/2)+" "+I+","+(H-z/2)+" "+(I+q/2)+","+(H+z/2)},E.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="creating"&&this.createTips()},E.prototype.adjustVisual=function(){if(V.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.arrow1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(H,0);var q=this.arrow2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(q,0)}},E.prototype.setArrowType=function(I){this.arrowType=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({arrowType:this.arrowType},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.arrowType=H.arrowType,this.createTips(),this.adjustVisual()},E.typeName="ArrowMarker",E.title="Arrow marker",E.icon='',E}(nt),ne=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.fillColor=q.defaultFillColor,z.strokeWidth=0,z.fillPanel=new ye("Color",q.defaultColorSet,q.defaultFillColor),z.fillPanel.onColorChanged=z.setFillColor,z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="CoverMarker",E.title="Cover marker",E.icon='',E}($e),re=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.opacities=[],ve.opacityBoxes=[],ve.opacities=H,ve.currentOpacity=q,ve.setCurrentOpacity=ve.setCurrentOpacity.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",H.style.justifyContent="space-between",this.opacities.forEach(function(q){var z=document.createElement("div");z.style.display="flex",z.style.alignItems="center",z.style.justifyContent="center",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.borderColor=q===I.currentOpacity?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentOpacity(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.innerText=100*q+"%",z.appendChild(ve),I.opacityBoxes.push(z)}),H},E.prototype.setCurrentOpacity=function(I,H){var q=this;this.currentOpacity=I,this.opacityBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},E}(oe),he=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.setOpacity=z.setOpacity.bind(z),z.fillColor=q.defaultHighlightColor,z.strokeWidth=0,z.opacity=q.defaultHighlightOpacity,z.fillPanel=new ye("Color",q.defaultColorSet,z.fillColor),z.fillPanel.onColorChanged=z.setFillColor,z.opacityPanel=new re("Opacity",q.defaultOpacitySteps,z.opacity),z.opacityPanel.onOpacityChanged=z.setOpacity,z}return Ce(E,V),E.prototype.setOpacity=function(I){this.opacity=I,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="HighlightMarker",E.title="Highlight marker",E.icon='',E}(ne),fe='',xe=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.bgColor="transparent",z.tipPosition={x:0,y:0},z.tipBase1Position={x:0,y:0},z.tipBase2Position={x:0,y:0},z.tipMoving=!1,z.color=q.defaultStrokeColor,z.bgColor=q.defaultFillColor,z.fontFamily=q.defaultFontFamily,z.defaultSize={x:100,y:30},z.setBgColor=z.setBgColor.bind(z),z.getTipPoints=z.getTipPoints.bind(z),z.positionTip=z.positionTip.bind(z),z.setTipPoints=z.setTipPoints.bind(z),z.colorPanel=new ye("Text color",q.defaultColorSet,z.color,''),z.colorPanel.onColorChanged=z.setColor,z.bgColorPanel=new ye("Fill color",q.defaultColorSet,z.bgColor,fe),z.bgColorPanel.onColorChanged=z.setBgColor,z.fontFamilyPanel=new Fe("Font",q.defaultFontFamilies,q.defaultFontFamily),z.fontFamilyPanel.onFontChanged=z.setFont,z.tipGrip=new Ue,z.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),z.controlBox.appendChild(z.tipGrip.visual),z}return Ce(E,V),E.prototype.ownsTarget=function(I){return V.prototype.ownsTarget.call(this,I)||this.tipGrip.ownsTarget(I)||this.tip===I},E.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},E.prototype.pointerDown=function(I,H){this.state==="new"&&V.prototype.pointerDown.call(this,I,H),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(H)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):V.prototype.pointerDown.call(this,I,H)},E.prototype.pointerUp=function(I){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,V.prototype.pointerUp.call(this,I);else{var H=this.state==="creating";V.prototype.pointerUp.call(this,I),this.setTipPoints(H),this.positionTip()}},E.prototype.manipulate=function(I){if(this.tipMoving){var H=this.unrotatePoint(I);this.tipPosition={x:H.x-this.manipulationStartLeft,y:H.y-this.manipulationStartTop},this.positionTip()}else V.prototype.manipulate.call(this,I)},E.prototype.setBgColor=function(I){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",I]]),ae.setAttributes(this.tip,[["fill",I]])),this.bgColor=I,this.fillColorChanged(I)},E.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},E.prototype.setTipPoints=function(I){I===void 0&&(I=!1);var H=Math.min(this.height/2,15),q=this.height/5;I&&(this.tipPosition={x:H+q/2,y:this.height+20});var z=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?z.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.tip1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(H,0);var q=this.tip2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(q,0)}},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I),this.createTips(),this.adjustVisual()},E.typeName="MeasurementMarker",E.title="Measurement marker",E.icon='',E}(nt),ot=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokePanel.colors=q.defaultColorSet,z.fillColor="transparent",z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="EllipseFrameMarker",E.title="Ellipse frame marker",E.icon='',E}(Pe),mt=function(){function V(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(V.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),V.prototype.addUndoStep=function(E){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(E)||(this.undoStack.push(E),JSON.stringify(this.lastRedoStep)!==JSON.stringify(E)&&this.redoStack.splice(0,this.redoStack.length))},V.prototype.replaceLastUndoStep=function(E){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=E)},V.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},V.prototype.undo=function(){if(this.undoStack.length>1){var E=this.undoStack.pop();return E!==void 0&&this.redoStack.push(E),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},V.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},V}(),ft=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor="transparent",z.strokeWidth=0,z.strokeDasharray="",z.curveX=0,z.curveY=0,z.manipulationStartCurveX=0,z.manipulationStartCurveY=0,z.setStrokeColor=z.setStrokeColor.bind(z),z.setStrokeWidth=z.setStrokeWidth.bind(z),z.setStrokeDasharray=z.setStrokeDasharray.bind(z),z.positionGrips=z.positionGrips.bind(z),z.addControlGrips=z.addControlGrips.bind(z),z.adjustVisual=z.adjustVisual.bind(z),z.setupControlBox=z.setupControlBox.bind(z),z.resize=z.resize.bind(z),z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorCurve&&I!==this.visibleCurve&&!this.curveGrip.ownsTarget(I))},E.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=I.x,this.curveY=I.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(H)&&(this.activeGrip=this.curveGrip,this._state="resize")},E.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},E.prototype.setupControlBox=function(){V.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},E.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,V.prototype.addControlGrips.call(this)},E.prototype.positionGrips=function(){V.prototype.positionGrips.call(this);var I=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-I/2,this.curveY-I/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},E.prototype.manipulate=function(I){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+I.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+I.y-this.manipulationStartY),V.prototype.manipulate.call(this,I)},E.prototype.resize=function(I){this.activeGrip===this.curveGrip&&(this.curveX=I.x,this.curveY=I.y),V.prototype.resize.call(this,I),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},E.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},E.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},E.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual()},E.prototype.scale=function(I,H){this.curveX=this.curveX*I,this.curveY=this.curveY*H,V.prototype.scale.call(this,I,H)},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.curveX=H.curveX,this.curveY=H.curveY,this.createVisual(),this.adjustVisual()},E.typeName="CurveMarker",E.title="Curve marker",E.icon='',E}(ut),wt=function(){function V(E,I){I===void 0&&(I=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=E,this.cancelable=I}return Object.defineProperty(V.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),V.prototype.preventDefault=function(){this._defaultPrevented=!0},V}(),St=function(V){function E(I,H,q){var z=V.call(this,I,!1)||this;return z.dataUrl=H,z.state=q,z}return Ce(E,V),E}(wt),dt=function(V){function E(I,H,q){q===void 0&&(q=!1);var z=V.call(this,I,q)||this;return z.marker=H,z}return Ce(E,V),E}(wt),Ut=function(){function V(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return V.prototype.addEventListener=function(E,I){this[E].push(I)},V.prototype.removeEventListener=function(E,I){var H=this[E].indexOf(I);H>-1&&this[E].splice(H,1)},V}(),Lt=function(){function V(E){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Me,this._isOpen=!1,this.undoRedoManager=new mt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=V.instanceCounter++,this.styles=new De(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=E,this.targetRoot=document.body,this.width=E.clientWidth,this.height=E.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(V.prototype,"ALL_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,ot,Pe,he,xe,ze,ne,nt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,Pe,he,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,he]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(E){var I=this;this._availableMarkerTypes.splice(0),E.forEach(function(H){if(typeof H=="string"){var q=I.ALL_MARKER_TYPES.find(function(z){return z.typeName===H});q!==void 0&&I._availableMarkerTypes.push(q)}else I._availableMarkerTypes.push(H)})},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(E){this._zoomLevel=E,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),V.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Oe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},V.prototype.show=function(){var E=this;this.styles.styleSheetRoot===void 0&&Ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(I){return I(new wt(E))})},V.prototype.render=function(){return ce(this,void 0,void 0,function(){var E;return pe(this,function(I){switch(I.label){case 0:return this.setCurrentMarker(),(E=new Te).naturalSize=this.renderAtNaturalSize,E.imageType=this.renderImageType,E.imageQuality=this.renderImageQuality,E.markersOnly=this.renderMarkersOnly,E.width=this.renderWidth,E.height=this.renderHeight,[4,E.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return I.sent(),[4,E.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,I.sent()]}})})},V.prototype.close=function(E){var I=this;if(E===void 0&&(E=!1),this.isOpen){var H=!1;E||this.eventListeners.beforeclose.forEach(function(q){var z=new wt(I,!0);q(z),z.defaultPrevented&&(H=!0)}),H||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(q){return q(new wt(I))}),this.detachEvents(),this._isOpen=!1)}},V.prototype.addMarkersToToolbar=function(){for(var E,I=[],H=0;Hthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*E:this.editorCanvas.clientWidth,H=I',E.title="Powered by marker.js",E.style.display="grid",E.style.alignItems="center",E.style.justifyItems="center",E.style.padding="3px",E.style.width="20px",E.style.height="20px",this.logoUI.appendChild(E),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},V.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},V.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},V.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},V.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var E=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=E+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Be(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(E),1),E.dispose()},V.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},V.prototype.toolbarButtonClicked=function(E,I){if(E==="marker"&&I!==void 0)this.createNewMarker(I);else if(E==="action")switch(I){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},V.prototype.deleteSelectedMarker=function(){var E=this;if(this._currentMarker!==void 0){var I=!1;if(this.eventListeners.markerbeforedelete.forEach(function(q){var z=new dt(E,E._currentMarker,!0);q(z),z.defaultPrevented&&(I=!0)}),!I){var H=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(q){return q(new dt(E,H))})}}},V.prototype.clear=function(){var E=this,I=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ve){var Ke=new dt(E,void 0,!0);ve(Ke),Ke.defaultPrevented&&(I=!0)}),!I)){this.setCurrentMarker();for(var H=function(ve){var Ke=q.markers[ve];q.setCurrentMarker(q.markers[ve]),q._currentMarker.dispose(),q.markerImage.removeChild(q._currentMarker.container),q.markers.splice(q.markers.indexOf(q._currentMarker),1),q.eventListeners.markerdelete.forEach(function(it){return it(new dt(E,Ke))})},q=this,z=this.markers.length-1;z>=0;z--)H(z);this.addUndoStep()}},Object.defineProperty(V.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),V.prototype.showNotesEditor=function(){var E;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(E=this._currentMarker.notes)!==null&&E!==void 0?E:"",this.overlayContainer.appendChild(this.notesArea))},V.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},V.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},V.prototype.addUndoStep=function(){var E=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var I=this.getState(),H=this.undoRedoManager.getLastUndoStep();if(!H||H.width===I.width&&H.height===I.height){var q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(I),q1&&this.panTo({x:E.clientX,y:E.clientY}))},V.prototype.onPointerUp=function(E){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(E.clientX,E.clientY)),this.isDragging=!1,this.addUndoStep()},V.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},V.prototype.onKeyUp=function(E){this._currentMarker===void 0||this.notesArea!==void 0||E.key!=="Delete"&&E.key!=="Backspace"||this.deleteSelectedMarker()},V.prototype.clientToLocalCoordinates=function(E,I){var H=this.markerImage.getBoundingClientRect();return{x:(E-H.left)/this.zoomLevel,y:(I-H.top)/this.zoomLevel}},V.prototype.onWindowResize=function(){this.positionUI()},V.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var E=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=E+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},V.prototype.addLicenseKey=function(E){Oe.addKey(E)},V.prototype.addEventListener=function(E,I){this.eventListeners.addEventListener(E,I)},V.prototype.removeEventListener=function(E,I){this.eventListeners.removeEventListener(E,I)},V.prototype.renderState=function(E){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(E),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(V.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),V.prototype.focus=function(){var E=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(I){return I(new wt(E))}))},V.prototype.blur=function(){var E=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(I){return I(new wt(E))}))},V.instanceCounter=0,V}();/* ********************************** + `,$t.style.marginRight="5px",pt.appendChild($t)}z.typeBoxes.push(pt)},z=this,ve=0;ve<4;ve++)q(ve);return H},E.prototype.setCurrentType=function(I,H){var q=this;this.currentType=I,this.typeBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},E}(oe),_e=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.arrowType="end",z.arrowBaseHeight=10,z.arrowBaseWidth=10,z.getArrowPoints=z.getArrowPoints.bind(z),z.setArrowType=z.setArrowType.bind(z),z.arrowTypePanel=new ge("Arrow type","end"),z.arrowTypePanel.onArrowTypeChanged=z.setArrowType,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.arrow1&&I!==this.arrow2)},E.prototype.getArrowPoints=function(I,H){var q=this.arrowBaseWidth+2*this.strokeWidth,z=this.arrowBaseHeight+2*this.strokeWidth;return I-q/2+","+(H+z/2)+" "+I+","+(H-z/2)+" "+(I+q/2)+","+(H+z/2)},E.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.state==="creating"&&this.createTips()},E.prototype.adjustVisual=function(){if(V.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.arrow1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(H,0);var q=this.arrow2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(q,0)}},E.prototype.setArrowType=function(I){this.arrowType=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({arrowType:this.arrowType},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.arrowType=H.arrowType,this.createTips(),this.adjustVisual()},E.typeName="ArrowMarker",E.title="Arrow marker",E.icon='',E}(rt),re=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.fillColor=q.defaultFillColor,z.strokeWidth=0,z.fillPanel=new ye("Color",q.defaultColorSet,q.defaultFillColor),z.fillPanel.onColorChanged=z.setFillColor,z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="CoverMarker",E.title="Cover marker",E.icon='',E}($e),ne=function(V){function E(I,H,q,z){var ve=V.call(this,I,z||'')||this;return ve.opacities=[],ve.opacityBoxes=[],ve.opacities=H,ve.currentOpacity=q,ve.setCurrentOpacity=ve.setCurrentOpacity.bind(ve),ve}return Ce(E,V),E.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",H.style.justifyContent="space-between",this.opacities.forEach(function(q){var z=document.createElement("div");z.style.display="flex",z.style.alignItems="center",z.style.justifyContent="center",z.style.padding="5px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.borderColor=q===I.currentOpacity?I.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){I.setCurrentOpacity(q,z)}),H.appendChild(z);var ve=document.createElement("div");ve.innerText=100*q+"%",z.appendChild(ve),I.opacityBoxes.push(z)}),H},E.prototype.setCurrentOpacity=function(I,H){var q=this;this.currentOpacity=I,this.opacityBoxes.forEach(function(z){z.style.borderColor=z===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},E}(oe),he=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.setOpacity=z.setOpacity.bind(z),z.fillColor=q.defaultHighlightColor,z.strokeWidth=0,z.opacity=q.defaultHighlightOpacity,z.fillPanel=new ye("Color",q.defaultColorSet,z.fillColor),z.fillPanel.onColorChanged=z.setFillColor,z.opacityPanel=new ne("Opacity",q.defaultOpacitySteps,z.opacity),z.opacityPanel.onOpacityChanged=z.setOpacity,z}return Ce(E,V),E.prototype.setOpacity=function(I){this.opacity=I,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="HighlightMarker",E.title="Highlight marker",E.icon='',E}(re),fe='',xe=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.bgColor="transparent",z.tipPosition={x:0,y:0},z.tipBase1Position={x:0,y:0},z.tipBase2Position={x:0,y:0},z.tipMoving=!1,z.color=q.defaultStrokeColor,z.bgColor=q.defaultFillColor,z.fontFamily=q.defaultFontFamily,z.defaultSize={x:100,y:30},z.setBgColor=z.setBgColor.bind(z),z.getTipPoints=z.getTipPoints.bind(z),z.positionTip=z.positionTip.bind(z),z.setTipPoints=z.setTipPoints.bind(z),z.colorPanel=new ye("Text color",q.defaultColorSet,z.color,''),z.colorPanel.onColorChanged=z.setColor,z.bgColorPanel=new ye("Fill color",q.defaultColorSet,z.bgColor,fe),z.bgColorPanel.onColorChanged=z.setBgColor,z.fontFamilyPanel=new Fe("Font",q.defaultFontFamilies,q.defaultFontFamily),z.fontFamilyPanel.onFontChanged=z.setFont,z.tipGrip=new Ue,z.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),z.controlBox.appendChild(z.tipGrip.visual),z}return Ce(E,V),E.prototype.ownsTarget=function(I){return V.prototype.ownsTarget.call(this,I)||this.tipGrip.ownsTarget(I)||this.tip===I},E.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},E.prototype.pointerDown=function(I,H){this.state==="new"&&V.prototype.pointerDown.call(this,I,H),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(H)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):V.prototype.pointerDown.call(this,I,H)},E.prototype.pointerUp=function(I){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,V.prototype.pointerUp.call(this,I);else{var H=this.state==="creating";V.prototype.pointerUp.call(this,I),this.setTipPoints(H),this.positionTip()}},E.prototype.manipulate=function(I){if(this.tipMoving){var H=this.unrotatePoint(I);this.tipPosition={x:H.x-this.manipulationStartLeft,y:H.y-this.manipulationStartTop},this.positionTip()}else V.prototype.manipulate.call(this,I)},E.prototype.setBgColor=function(I){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",I]]),ae.setAttributes(this.tip,[["fill",I]])),this.bgColor=I,this.fillColorChanged(I)},E.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},E.prototype.setTipPoints=function(I){I===void 0&&(I=!1);var H=Math.min(this.height/2,15),q=this.height/5;I&&(this.tipPosition={x:H+q/2,y:this.height+20});var z=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?z.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.tip1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(H,0);var q=this.tip2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(q,0)}},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I),this.createTips(),this.adjustVisual()},E.typeName="MeasurementMarker",E.title="Measurement marker",E.icon='',E}(rt),ot=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokePanel.colors=q.defaultColorSet,z.fillColor="transparent",z}return Ce(E,V),Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=V.prototype.getState.call(this);return I.typeName=E.typeName,I},E.typeName="EllipseFrameMarker",E.title="Ellipse frame marker",E.icon='',E}(Pe),mt=function(){function V(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(V.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),V.prototype.addUndoStep=function(E){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(E)||(this.undoStack.push(E),JSON.stringify(this.lastRedoStep)!==JSON.stringify(E)&&this.redoStack.splice(0,this.redoStack.length))},V.prototype.replaceLastUndoStep=function(E){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=E)},V.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},V.prototype.undo=function(){if(this.undoStack.length>1){var E=this.undoStack.pop();return E!==void 0&&this.redoStack.push(E),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},V.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},V}(),ft=function(V){function E(I,H,q){var z=V.call(this,I,H,q)||this;return z.strokeColor="transparent",z.strokeWidth=0,z.strokeDasharray="",z.curveX=0,z.curveY=0,z.manipulationStartCurveX=0,z.manipulationStartCurveY=0,z.setStrokeColor=z.setStrokeColor.bind(z),z.setStrokeWidth=z.setStrokeWidth.bind(z),z.setStrokeDasharray=z.setStrokeDasharray.bind(z),z.positionGrips=z.positionGrips.bind(z),z.addControlGrips=z.addControlGrips.bind(z),z.adjustVisual=z.adjustVisual.bind(z),z.setupControlBox=z.setupControlBox.bind(z),z.resize=z.resize.bind(z),z.strokeColor=q.defaultColor,z.strokeWidth=q.defaultStrokeWidth,z.strokeDasharray=q.defaultStrokeDasharray,z.strokePanel=new ye("Line color",q.defaultColorSet,q.defaultColor),z.strokePanel.onColorChanged=z.setStrokeColor,z.strokeWidthPanel=new tt("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),z.strokeWidthPanel.onWidthChanged=z.setStrokeWidth,z.strokeStylePanel=new et("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),z.strokeStylePanel.onStyleChanged=z.setStrokeDasharray,z}return Ce(E,V),E.prototype.ownsTarget=function(I){return!(!V.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorCurve&&I!==this.visibleCurve&&!this.curveGrip.ownsTarget(I))},E.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},E.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},E.prototype.pointerDown=function(I,H){V.prototype.pointerDown.call(this,I,H),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=I.x,this.curveY=I.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(H)&&(this.activeGrip=this.curveGrip,this._state="resize")},E.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},E.prototype.setupControlBox=function(){V.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},E.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,V.prototype.addControlGrips.call(this)},E.prototype.positionGrips=function(){V.prototype.positionGrips.call(this);var I=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-I/2,this.curveY-I/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},E.prototype.manipulate=function(I){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+I.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+I.y-this.manipulationStartY),V.prototype.manipulate.call(this,I)},E.prototype.resize=function(I){this.activeGrip===this.curveGrip&&(this.curveX=I.x,this.curveY=I.y),V.prototype.resize.call(this,I),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},E.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},E.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},E.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual()},E.prototype.scale=function(I,H){this.curveX=this.curveX*I,this.curveY=this.curveY*H,V.prototype.scale.call(this,I,H)},Object.defineProperty(E.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),E.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},V.prototype.getState.call(this));return I.typeName=E.typeName,I},E.prototype.restoreState=function(I){V.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.curveX=H.curveX,this.curveY=H.curveY,this.createVisual(),this.adjustVisual()},E.typeName="CurveMarker",E.title="Curve marker",E.icon='',E}(ut),wt=function(){function V(E,I){I===void 0&&(I=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=E,this.cancelable=I}return Object.defineProperty(V.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),V.prototype.preventDefault=function(){this._defaultPrevented=!0},V}(),St=function(V){function E(I,H,q){var z=V.call(this,I,!1)||this;return z.dataUrl=H,z.state=q,z}return Ce(E,V),E}(wt),dt=function(V){function E(I,H,q){q===void 0&&(q=!1);var z=V.call(this,I,q)||this;return z.marker=H,z}return Ce(E,V),E}(wt),Ut=function(){function V(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return V.prototype.addEventListener=function(E,I){this[E].push(I)},V.prototype.removeEventListener=function(E,I){var H=this[E].indexOf(I);H>-1&&this[E].splice(H,1)},V}(),Lt=function(){function V(E){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Me,this._isOpen=!1,this.undoRedoManager=new mt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=V.instanceCounter++,this.styles=new De(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=E,this.targetRoot=document.body,this.width=E.clientWidth,this.height=E.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(V.prototype,"ALL_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,ot,Pe,he,xe,ze,re,rt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,Pe,he,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Je,Ee,_e,je,he]},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(E){var I=this;this._availableMarkerTypes.splice(0),E.forEach(function(H){if(typeof H=="string"){var q=I.ALL_MARKER_TYPES.find(function(z){return z.typeName===H});q!==void 0&&I._availableMarkerTypes.push(q)}else I._availableMarkerTypes.push(H)})},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(E){this._zoomLevel=E,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),V.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Oe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},V.prototype.show=function(){var E=this;this.styles.styleSheetRoot===void 0&&Ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(I){return I(new wt(E))})},V.prototype.render=function(){return ce(this,void 0,void 0,function(){var E;return pe(this,function(I){switch(I.label){case 0:return this.setCurrentMarker(),(E=new Te).naturalSize=this.renderAtNaturalSize,E.imageType=this.renderImageType,E.imageQuality=this.renderImageQuality,E.markersOnly=this.renderMarkersOnly,E.width=this.renderWidth,E.height=this.renderHeight,[4,E.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return I.sent(),[4,E.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,I.sent()]}})})},V.prototype.close=function(E){var I=this;if(E===void 0&&(E=!1),this.isOpen){var H=!1;E||this.eventListeners.beforeclose.forEach(function(q){var z=new wt(I,!0);q(z),z.defaultPrevented&&(H=!0)}),H||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(q){return q(new wt(I))}),this.detachEvents(),this._isOpen=!1)}},V.prototype.addMarkersToToolbar=function(){for(var E,I=[],H=0;Hthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*E:this.editorCanvas.clientWidth,H=I',E.title="Powered by marker.js",E.style.display="grid",E.style.alignItems="center",E.style.justifyItems="center",E.style.padding="3px",E.style.width="20px",E.style.height="20px",this.logoUI.appendChild(E),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},V.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},V.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},V.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},V.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var E=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=E+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Be(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(E),1),E.dispose()},V.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},V.prototype.toolbarButtonClicked=function(E,I){if(E==="marker"&&I!==void 0)this.createNewMarker(I);else if(E==="action")switch(I){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},V.prototype.deleteSelectedMarker=function(){var E=this;if(this._currentMarker!==void 0){var I=!1;if(this.eventListeners.markerbeforedelete.forEach(function(q){var z=new dt(E,E._currentMarker,!0);q(z),z.defaultPrevented&&(I=!0)}),!I){var H=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(q){return q(new dt(E,H))})}}},V.prototype.clear=function(){var E=this,I=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ve){var Ke=new dt(E,void 0,!0);ve(Ke),Ke.defaultPrevented&&(I=!0)}),!I)){this.setCurrentMarker();for(var H=function(ve){var Ke=q.markers[ve];q.setCurrentMarker(q.markers[ve]),q._currentMarker.dispose(),q.markerImage.removeChild(q._currentMarker.container),q.markers.splice(q.markers.indexOf(q._currentMarker),1),q.eventListeners.markerdelete.forEach(function(it){return it(new dt(E,Ke))})},q=this,z=this.markers.length-1;z>=0;z--)H(z);this.addUndoStep()}},Object.defineProperty(V.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),V.prototype.showNotesEditor=function(){var E;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(E=this._currentMarker.notes)!==null&&E!==void 0?E:"",this.overlayContainer.appendChild(this.notesArea))},V.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},V.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},V.prototype.addUndoStep=function(){var E=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var I=this.getState(),H=this.undoRedoManager.getLastUndoStep();if(!H||H.width===I.width&&H.height===I.height){var q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(I),q1&&this.panTo({x:E.clientX,y:E.clientY}))},V.prototype.onPointerUp=function(E){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(E.clientX,E.clientY)),this.isDragging=!1,this.addUndoStep()},V.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},V.prototype.onKeyUp=function(E){this._currentMarker===void 0||this.notesArea!==void 0||E.key!=="Delete"&&E.key!=="Backspace"||this.deleteSelectedMarker()},V.prototype.clientToLocalCoordinates=function(E,I){var H=this.markerImage.getBoundingClientRect();return{x:(E-H.left)/this.zoomLevel,y:(I-H.top)/this.zoomLevel}},V.prototype.onWindowResize=function(){this.positionUI()},V.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var E=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=E+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},V.prototype.addLicenseKey=function(E){Oe.addKey(E)},V.prototype.addEventListener=function(E,I){this.eventListeners.addEventListener(E,I)},V.prototype.removeEventListener=function(E,I){this.eventListeners.removeEventListener(E,I)},V.prototype.renderState=function(E){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(E),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(V.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),V.prototype.focus=function(){var E=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(I){return I(new wt(E))}))},V.prototype.blur=function(){var E=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(I){return I(new wt(E))}))},V.instanceCounter=0,V}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE @@ -253,62 +253,62 @@ PERFORMANCE OF THIS SOFTWARE. `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new xt("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; - `))},V.instanceCounter=0,V}(),Ct=Q("8hTe"),mn=Q.n(Ct),gn=/]*>/g;function vn(V){var E=document.createElement("div");return E.innerHTML=V,E.childNodes.length===0?"":E.childNodes[0].nodeValue}var yn=be.a=function(V){var E=V.value,I=E===void 0?"":E,H=V.edit,q=H===void 0?!1:H,z=V.className,ve=V.showTextOnly,Ke=V.showLines,it=V.replaces,pt=V.zoomImg,Ye=V.hasMask,_t=V.style,jt=_t===void 0?{}:_t,$t=V.stylesPrev,ji=$t===void 0?{}:$t,Ei=String(I),xi=Object(D.useRef)(),Qi=Object(D.useRef)(),Dn=Object(D.useState)(""),ci=Object(G.a)(Dn,2),zi=ci[0],un=ci[1],hn=Object(D.useState)("office"),Hi=Object(G.a)(hn,2),kn=Hi[0],bn=Hi[1],zn=function(){var Ht=new Qe(Qi.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var yi=Object(U.a)(i.a.mark(function kt(ai){var Kt;return i.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return xi.current.style.display="none",fi.next=3,Object(ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ai}});case 3:Kt=fi.sent,Kt!=null&&Kt.id&&it(Qi.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return fi.stop()}},kt)}));return function(kt){return yi.apply(this,arguments)}}()),Ht.show()},Vn=function(){var Ht=new Lt(Qi.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var yi=Object(U.a)(i.a.mark(function kt(ai){var Kt;return i.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(xi.current.style.display="none",!Qi.current){fi.next=6;break}return fi.next=4,Object(ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ai.dataUrl}});case 4:Kt=fi.sent,Kt!=null&&Kt.id&&it(Qi.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return fi.stop()}},kt)}));return function(kt){return yi.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Zi=Object(D.useMemo)(function(){xi.current&&(xi.current.style.zIndex=-1);try{var ni=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ei=Ei.replace(ni,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+ee.a.API_SERVER+"/api/attachments/").replace(yi,'"'+ee.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` -`)}catch(rn){}var kt=j(Ei),ai=T();if(Ei.match(/\[TOC\]/)&&(kt=kt.replace("

      [TOC]

      ",L()),A()),kt=kt.replace(/(__special_katext_id_\d+__)/g,function(rn,fi){var Ai=ai[fi],Yn=Ai.type,xn=Ai.expression;return Object(le.renderToString)(vn(xn)||"",{displayMode:Yn==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581"),y(),ve){var Kt=document.createElement("div");return Kt.innerHTML=kt,Kt.innerText}return setTimeout(function(){return dr()},500),kt},[Ei]),$i=Object(D.useRef)();_.WebkitLineClamp=Ke,Ke&&(jt=Object(F.a)(Object(F.a)({},jt),_));function _n(ni){var Ht=ni.target;if(Ht.tagName.toUpperCase()==="IMG"){if(pt){var yi=Ht.getAttribute("src");un(yi),bn("image")}}else if(Ht.tagName.toUpperCase()==="A"){var kt=Ht.getAttribute("href");if(kt.indexOf("office")>-1)ni.preventDefault(),un(kt),bn("office");else if(kt.indexOf("application/pdf")>-1)ni.preventDefault(),un(kt),bn("pdf");else if(kt.indexOf("text/html")>-1)ni.preventDefault(),un(kt),bn("html");else if(kt.startsWith("#")){ni.preventDefault();var ai=document.getElementById(kt.replace("#",""));ai&&ai.scrollIntoView(!0)}}}var dr=function(){var Ht,yi=(Ht=$i.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");yi==null||yi.forEach(function(kt){if(kt.oncontextmenu=function(){return!1},kt.src.indexOf(".m3u8")>-1&&!kt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var ai=new Y.a;ai.loadSource(kt.src),ai.attachMedia(kt)}}})};Object(D.useEffect)(function(){if($i.current&&Zi&&(Zi.match(gn)&&window.PR.prettyPrint()),$i.current)return $i.current.addEventListener("click",_n),function(){$i.current.removeEventListener("click",_n),y(),A()}},[Zi,$i.current,_n]);var En=function(Ht){if(!q)return;Ht.target.nodeName==="IMG"?(xi.current.style.zIndex=1,xi.current.style.display="flex",xi.current.style.width=Ht.target.clientWidth+"px",xi.current.style.height=Ht.target.clientHeight+"px",xi.current.style.top=Ht.target.offsetTop+"px",xi.current.style.left=Ht.target.offsetLeft+"px",Qi.current.src=Ht.target.getAttribute("src")):xi.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:$i,style:Object(F.a)({},jt),className:"".concat(z||""," markdown-body ").concat(mn.a.mdBody),onMouseOver:En,dangerouslySetInnerHTML:{__html:Zi}}),g.a.createElement("div",{ref:xi,className:mn.a.button},g.a.createElement($.a,null,g.a.createElement(X.a,{onClick:function(){return zn()}},"\u88C1\u526A"),g.a.createElement(X.a,{onClick:function(){return Vn()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:Qi,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(ue.a,{close:!0,data:zi,type:zi!=null&&zi.length?kn:"",style:Object(F.a)({},ji),onClose:function(){return un("")}}))}},"9VGf":function(st,be,Q){"use strict";Q.d(be,"a",function(){return M});var ie=Q("q1tI"),$=Q.n(ie);function M(X,F){var U=Object(ie.useRef)();Object(ie.useEffect)(function(){U.current=X}),Object(ie.useEffect)(function(){function G(){U.current()}if(F!==null){var W=setInterval(G,F);return function(){return clearInterval(W)}}},[F])}},BU3w:function(st,be,Q){"use strict";Q.d(be,"a",function(){return U});var ie=Q("MNnm"),$="rc-util-key";function M(G){if(G.attachTo)return G.attachTo;var W=document.querySelector("head");return W||document.body}function X(G){var W,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var D=document.createElement("style");if((W=i.csp)===null||W===void 0?void 0:W.nonce){var g;D.nonce=(g=i.csp)===null||g===void 0?void 0:g.nonce}D.innerHTML=G;var m=M(i),p=m.firstChild;return i.prepend&&m.prepend?m.prepend(D):i.prepend&&p?m.insertBefore(D,p):m.appendChild(D),D}var F=new Map;function U(G,W){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=M(i);if(!F.has(D)){var g=X("",i),m=g.parentNode;F.set(D,m),m.removeChild(g)}var p=Array.from(F.get(D).children).find(function(h){return h.tagName==="STYLE"&&h[$]===W});if(p){var l,u;if(((l=i.csp)===null||l===void 0?void 0:l.nonce)&&p.nonce!==((u=i.csp)===null||u===void 0?void 0:u.nonce)){var f;p.nonce=(f=i.csp)===null||f===void 0?void 0:f.nonce}return p.innerHTML!==G&&(p.innerHTML=G),p}var o=X(G,i);return o[$]=W,o}},Bd2K:function(st,be,Q){(function(ie){ie(Q("VrN/"),Q("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(i,D,g){if(g!=ie.Init&&g&&i.removeKeyMap("autoCloseTags"),!D)return;var m={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(m["'/'"]=function(p){return U(p)}),(typeof D!="object"||D.whenOpening!==!1)&&(m["'>'"]=function(p){return X(p)}),i.addKeyMap(m)});var $=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function X(i){if(i.getOption("disableInput"))return ie.Pass;for(var D=i.listSelections(),g=[],m=i.getOption("autoCloseTags"),p=0;pl.ch&&(s=s.slice(0,s.length-u.end+l.ch));var S=s.toLowerCase();if(!s||u.type=="string"&&(u.end!=l.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&h.close||u.string.indexOf("/")==l.ch-u.start-1||A&&G(A,S)>-1||W(i,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(o)||[],s,l,!0))return ie.Pass;var L=typeof m=="object"&&m.emptyTags;if(L&&G(L,s)>-1){g[p]={text:"/>",newPos:ie.Pos(l.line,l.ch+2)};continue}var R=_&&G(_,S)>-1;g[p]={indent:R,text:">"+(R?` + `))},V.instanceCounter=0,V}(),Ct=Q("8hTe"),pr=Q.n(Ct),mr=/]*>/g;function gr(V){var E=document.createElement("div");return E.innerHTML=V,E.childNodes.length===0?"":E.childNodes[0].nodeValue}var vr=be.a=function(V){var E=V.value,I=E===void 0?"":E,H=V.edit,q=H===void 0?!1:H,z=V.className,ve=V.showTextOnly,Ke=V.showLines,it=V.replaces,pt=V.zoomImg,Ye=V.hasMask,_t=V.style,jt=_t===void 0?{}:_t,$t=V.stylesPrev,ji=$t===void 0?{}:$t,Ei=String(I),xi=Object(D.useRef)(),Qi=Object(D.useRef)(),Ir=Object(D.useState)(""),ci=Object(G.a)(Ir,2),zi=ci[0],lr=ci[1],ur=Object(D.useState)("office"),Hi=Object(G.a)(ur,2),Dr=Hi[0],yr=Hi[1],Kr=function(){var Ht=new Qe(Qi.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var yi=Object(U.a)(i.a.mark(function kt(ai){var Kt;return i.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return xi.current.style.display="none",fi.next=3,Object(ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ai}});case 3:Kt=fi.sent,Kt!=null&&Kt.id&&it(Qi.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return fi.stop()}},kt)}));return function(kt){return yi.apply(this,arguments)}}()),Ht.show()},zr=function(){var Ht=new Lt(Qi.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var yi=Object(U.a)(i.a.mark(function kt(ai){var Kt;return i.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(xi.current.style.display="none",!Qi.current){fi.next=6;break}return fi.next=4,Object(ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ai.dataUrl}});case 4:Kt=fi.sent,Kt!=null&&Kt.id&&it(Qi.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return fi.stop()}},kt)}));return function(kt){return yi.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Zi=Object(D.useMemo)(function(){xi.current&&(xi.current.style.zIndex=-1);try{var ri=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ei=Ei.replace(ri,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+ee.a.API_SERVER+"/api/attachments/").replace(yi,'"'+ee.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` +`)}catch(rr){}var kt=j(Ei),ai=T();if(Ei.match(/\[TOC\]/)&&(kt=kt.replace("

      [TOC]

      ",L()),A()),kt=kt.replace(/(__special_katext_id_\d+__)/g,function(rr,fi){var Ai=ai[fi],Vr=Ai.type,Er=Ai.expression;return Object(le.renderToString)(gr(Er)||"",{displayMode:Vr==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581"),y(),ve){var Kt=document.createElement("div");return Kt.innerHTML=kt,Kt.innerText}return setTimeout(function(){return dn()},500),kt},[Ei]),$i=Object(D.useRef)();_.WebkitLineClamp=Ke,Ke&&(jt=Object(F.a)(Object(F.a)({},jt),_));function br(ri){var Ht=ri.target;if(Ht.tagName.toUpperCase()==="IMG"){if(pt){var yi=Ht.getAttribute("src");lr(yi),yr("image")}}else if(Ht.tagName.toUpperCase()==="A"){var kt=Ht.getAttribute("href");if(kt.indexOf("office")>-1)ri.preventDefault(),lr(kt),yr("office");else if(kt.indexOf("application/pdf")>-1)ri.preventDefault(),lr(kt),yr("pdf");else if(kt.indexOf("text/html")>-1)ri.preventDefault(),lr(kt),yr("html");else if(kt.startsWith("#")){ri.preventDefault();var ai=document.getElementById(kt.replace("#",""));ai&&ai.scrollIntoView(!0)}}}var dn=function(){var Ht,yi=(Ht=$i.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");yi==null||yi.forEach(function(kt){if(kt.oncontextmenu=function(){return!1},kt.src.indexOf(".m3u8")>-1&&!kt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var ai=new Y.a;ai.loadSource(kt.src),ai.attachMedia(kt)}}})};Object(D.useEffect)(function(){if($i.current&&Zi&&(Zi.match(mr)&&window.PR.prettyPrint()),$i.current)return $i.current.addEventListener("click",br),function(){$i.current.removeEventListener("click",br),y(),A()}},[Zi,$i.current,br]);var _r=function(Ht){if(!q)return;Ht.target.nodeName==="IMG"?(xi.current.style.zIndex=1,xi.current.style.display="flex",xi.current.style.width=Ht.target.clientWidth+"px",xi.current.style.height=Ht.target.clientHeight+"px",xi.current.style.top=Ht.target.offsetTop+"px",xi.current.style.left=Ht.target.offsetLeft+"px",Qi.current.src=Ht.target.getAttribute("src")):xi.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:$i,style:Object(F.a)({},jt),className:"".concat(z||""," markdown-body ").concat(pr.a.mdBody),onMouseOver:_r,dangerouslySetInnerHTML:{__html:Zi}}),g.a.createElement("div",{ref:xi,className:pr.a.button},g.a.createElement($.a,null,g.a.createElement(X.a,{onClick:function(){return Kr()}},"\u88C1\u526A"),g.a.createElement(X.a,{onClick:function(){return zr()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:Qi,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(ue.a,{close:!0,data:zi,type:zi!=null&&zi.length?Dr:"",style:Object(F.a)({},ji),onClose:function(){return lr("")}}))}},"9VGf":function(st,be,Q){"use strict";Q.d(be,"a",function(){return M});var ie=Q("q1tI"),$=Q.n(ie);function M(X,F){var U=Object(ie.useRef)();Object(ie.useEffect)(function(){U.current=X}),Object(ie.useEffect)(function(){function G(){U.current()}if(F!==null){var W=setInterval(G,F);return function(){return clearInterval(W)}}},[F])}},BU3w:function(st,be,Q){"use strict";Q.d(be,"a",function(){return U});var ie=Q("MNnm"),$="rc-util-key";function M(G){if(G.attachTo)return G.attachTo;var W=document.querySelector("head");return W||document.body}function X(G){var W,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var D=document.createElement("style");if((W=i.csp)===null||W===void 0?void 0:W.nonce){var g;D.nonce=(g=i.csp)===null||g===void 0?void 0:g.nonce}D.innerHTML=G;var m=M(i),p=m.firstChild;return i.prepend&&m.prepend?m.prepend(D):i.prepend&&p?m.insertBefore(D,p):m.appendChild(D),D}var F=new Map;function U(G,W){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=M(i);if(!F.has(D)){var g=X("",i),m=g.parentNode;F.set(D,m),m.removeChild(g)}var p=Array.from(F.get(D).children).find(function(h){return h.tagName==="STYLE"&&h[$]===W});if(p){var l,u;if(((l=i.csp)===null||l===void 0?void 0:l.nonce)&&p.nonce!==((u=i.csp)===null||u===void 0?void 0:u.nonce)){var f;p.nonce=(f=i.csp)===null||f===void 0?void 0:f.nonce}return p.innerHTML!==G&&(p.innerHTML=G),p}var o=X(G,i);return o[$]=W,o}},Bd2K:function(st,be,Q){(function(ie){ie(Q("VrN/"),Q("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(i,D,g){if(g!=ie.Init&&g&&i.removeKeyMap("autoCloseTags"),!D)return;var m={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(m["'/'"]=function(p){return U(p)}),(typeof D!="object"||D.whenOpening!==!1)&&(m["'>'"]=function(p){return X(p)}),i.addKeyMap(m)});var $=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function X(i){if(i.getOption("disableInput"))return ie.Pass;for(var D=i.listSelections(),g=[],m=i.getOption("autoCloseTags"),p=0;pl.ch&&(s=s.slice(0,s.length-u.end+l.ch));var S=s.toLowerCase();if(!s||u.type=="string"&&(u.end!=l.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&h.close||u.string.indexOf("/")==l.ch-u.start-1||A&&G(A,S)>-1||W(i,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(o)||[],s,l,!0))return ie.Pass;var L=typeof m=="object"&&m.emptyTags;if(L&&G(L,s)>-1){g[p]={text:"/>",newPos:ie.Pos(l.line,l.ch+2)};continue}var R=_&&G(_,S)>-1;g[p]={indent:R,text:">"+(R?` -`:"")+"",newPos:R?ie.Pos(l.line+1,0):ie.Pos(l.line,l.ch+1)}}for(var C=typeof m=="object"&&m.dontIndentOnAutoClose,p=D.length-1;p>=0;p--){var w=g[p];i.replaceRange(w.text,D[p].head,D[p].anchor,"+insert");var x=i.listSelections().slice(0);x[p]={head:w.newPos,anchor:w.newPos},i.setSelections(x),!C&&w.indent&&(i.indentLine(w.newPos.line,null,!0),i.indentLine(w.newPos.line+1,null,!0))}}function F(i,D){for(var g=i.listSelections(),m=[],p=D?"/":""&&(A+=">"),m[f]=A}if(i.replaceSelections(m),g=i.listSelections(),!u)for(var f=0;f=0&&D[o]==g;o--)++f;m=u.to;for(var o=1;o0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],g=0;gU,ie.serviceIds.set(U,G),G}function F(U){return function(G,W,i){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");M(U,G,i,!0)}}},DlQD:function(st,be,Q){(function(ie,$){st.exports=$()})(this,function(){"use strict";function ie(Ee,ge){for(var _e=0;_eEe.length)&&(ge=Ee.length);for(var _e=0,ne=new Array(ge);_e=Ee.length?{done:!0}:{done:!1,value:Ee[ne++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return _e=Ee[Symbol.iterator](),_e.next.bind(_e)}function U(Ee,ge){return ge={exports:{}},Ee(ge,ge.exports),ge.exports}var G=U(function(Ee){function ge(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function _e(ne){Ee.exports.defaults=ne}Ee.exports={defaults:ge(),getDefaults:ge,changeDefaults:_e}}),W=G.defaults,i=G.getDefaults,D=G.changeDefaults,g=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(ge){return u[ge]};function o(Ee,ge){if(ge){if(g.test(Ee))return Ee.replace(m,f)}else if(p.test(Ee))return Ee.replace(l,f);return Ee}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ee){return Ee.replace(h,function(ge,_e){return _e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""})}var a=/(^|[^\[])\^/g;function A(Ee,ge){Ee=Ee.source||Ee,ge=ge||"";var _e={replace:function(re,he){return he=he.source||he,he=he.replace(a,"$1"),Ee=Ee.replace(re,he),_e},getRegex:function(){return new RegExp(Ee,ge)}};return _e}var _=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Ee,ge,_e){if(Ee){var ne;try{ne=decodeURIComponent(s(_e)).replace(_,"").toLowerCase()}catch(re){return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}ge&&!S.test(_e)&&(_e=c(ge,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(re){return null}return _e}var R={},C=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(Ee,ge){R[" "+Ee]||(C.test(Ee)?R[" "+Ee]=Ee+"/":R[" "+Ee]=N(Ee,"/",!0)),Ee=R[" "+Ee];var _e=Ee.indexOf(":")===-1;return ge.substring(0,2)==="//"?_e?ge:Ee.replace(w,"$1")+ge:ge.charAt(0)==="/"?_e?ge:Ee.replace(x,"$1")+ge:Ee+ge}var T={exec:function(){}};function y(Ee){for(var ge=1,_e,ne;ge=0&&xe[ze]==="\\";)Pe=!Pe;return Pe?"|":" |"}),ne=_e.split(/ \|/),re=0;if(ne.length>ge)ne.splice(ge);else for(;ne.length=ne.length?re.slice(ne.length):re}).join(` -`)}var Se=function(){function Ee(_e){this.options=_e||P}var ge=Ee.prototype;return ge.space=function(ne){var re=this.rules.block.newline.exec(ne);if(re)return re[0].length>1?{type:"space",raw:re[0]}:{raw:` -`}},ge.code=function(ne,re){var he=this.rules.block.code.exec(ne);if(he){var fe=re[re.length-1];if(fe&&fe.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var xe=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:b(xe,` -`)}}},ge.fences=function(ne){var re=this.rules.block.fences.exec(ne);if(re){var he=re[0],fe=ke(he,re[3]||"");return{type:"code",raw:he,lang:re[2]?re[2].trim():re[2],text:fe}}},ge.heading=function(ne){var re=this.rules.block.heading.exec(ne);if(re)return{type:"heading",raw:re[0],depth:re[1].length,text:re[2]}},ge.nptable=function(ne){var re=this.rules.block.nptable.exec(ne);if(re){var he={type:"table",header:Y(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(` -`):[],raw:re[0]};if(he.header.length===he.align.length){var fe=he.align.length,xe;for(xe=0;xe ?/gm,"");return{type:"blockquote",raw:re[0],text:he}}},ge.list=function(ne){var re=this.rules.block.list.exec(ne);if(re){for(var he=re[0],fe=re[2],xe=fe.length>1,Pe=fe[fe.length-1]===")",ze={type:"list",raw:he,ordered:xe,start:xe?+fe.slice(0,-1):"",loose:!1,items:[]},ot=re[0].match(this.rules.block.item),mt=!1,ft,wt,St,dt,Ut,Lt,qt,Qt=ot.length,It=0;It",newPos:R?ie.Pos(l.line+1,0):ie.Pos(l.line,l.ch+1)}}for(var C=typeof m=="object"&&m.dontIndentOnAutoClose,p=D.length-1;p>=0;p--){var w=g[p];i.replaceRange(w.text,D[p].head,D[p].anchor,"+insert");var x=i.listSelections().slice(0);x[p]={head:w.newPos,anchor:w.newPos},i.setSelections(x),!C&&w.indent&&(i.indentLine(w.newPos.line,null,!0),i.indentLine(w.newPos.line+1,null,!0))}}function F(i,D){for(var g=i.listSelections(),m=[],p=D?"/":""&&(A+=">"),m[f]=A}if(i.replaceSelections(m),g=i.listSelections(),!u)for(var f=0;f=0&&D[o]==g;o--)++f;m=u.to;for(var o=1;o0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],g=0;gU,ie.serviceIds.set(U,G),G}function F(U){return function(G,W,i){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");M(U,G,i,!0)}}},DlQD:function(st,be,Q){(function(ie,$){st.exports=$()})(this,function(){"use strict";function ie(Ee,ge){for(var _e=0;_eEe.length)&&(ge=Ee.length);for(var _e=0,re=new Array(ge);_e=Ee.length?{done:!0}:{done:!1,value:Ee[re++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return _e=Ee[Symbol.iterator](),_e.next.bind(_e)}function U(Ee,ge){return ge={exports:{}},Ee(ge,ge.exports),ge.exports}var G=U(function(Ee){function ge(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function _e(re){Ee.exports.defaults=re}Ee.exports={defaults:ge(),getDefaults:ge,changeDefaults:_e}}),W=G.defaults,i=G.getDefaults,D=G.changeDefaults,g=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(ge){return u[ge]};function o(Ee,ge){if(ge){if(g.test(Ee))return Ee.replace(m,f)}else if(p.test(Ee))return Ee.replace(l,f);return Ee}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ee){return Ee.replace(h,function(ge,_e){return _e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""})}var a=/(^|[^\[])\^/g;function A(Ee,ge){Ee=Ee.source||Ee,ge=ge||"";var _e={replace:function(ne,he){return he=he.source||he,he=he.replace(a,"$1"),Ee=Ee.replace(ne,he),_e},getRegex:function(){return new RegExp(Ee,ge)}};return _e}var _=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Ee,ge,_e){if(Ee){var re;try{re=decodeURIComponent(s(_e)).replace(_,"").toLowerCase()}catch(ne){return null}if(re.indexOf("javascript:")===0||re.indexOf("vbscript:")===0||re.indexOf("data:")===0)return null}ge&&!S.test(_e)&&(_e=c(ge,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(ne){return null}return _e}var R={},C=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(Ee,ge){R[" "+Ee]||(C.test(Ee)?R[" "+Ee]=Ee+"/":R[" "+Ee]=N(Ee,"/",!0)),Ee=R[" "+Ee];var _e=Ee.indexOf(":")===-1;return ge.substring(0,2)==="//"?_e?ge:Ee.replace(w,"$1")+ge:ge.charAt(0)==="/"?_e?ge:Ee.replace(x,"$1")+ge:Ee+ge}var T={exec:function(){}};function y(Ee){for(var ge=1,_e,re;ge=0&&xe[ze]==="\\";)Pe=!Pe;return Pe?"|":" |"}),re=_e.split(/ \|/),ne=0;if(re.length>ge)re.splice(ge);else for(;re.length=re.length?ne.slice(re.length):ne}).join(` +`)}var Se=function(){function Ee(_e){this.options=_e||P}var ge=Ee.prototype;return ge.space=function(re){var ne=this.rules.block.newline.exec(re);if(ne)return ne[0].length>1?{type:"space",raw:ne[0]}:{raw:` +`}},ge.code=function(re,ne){var he=this.rules.block.code.exec(re);if(he){var fe=ne[ne.length-1];if(fe&&fe.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var xe=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:b(xe,` +`)}}},ge.fences=function(re){var ne=this.rules.block.fences.exec(re);if(ne){var he=ne[0],fe=ke(he,ne[3]||"");return{type:"code",raw:he,lang:ne[2]?ne[2].trim():ne[2],text:fe}}},ge.heading=function(re){var ne=this.rules.block.heading.exec(re);if(ne)return{type:"heading",raw:ne[0],depth:ne[1].length,text:ne[2]}},ge.nptable=function(re){var ne=this.rules.block.nptable.exec(re);if(ne){var he={type:"table",header:Y(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(` +`):[],raw:ne[0]};if(he.header.length===he.align.length){var fe=he.align.length,xe;for(xe=0;xe ?/gm,"");return{type:"blockquote",raw:ne[0],text:he}}},ge.list=function(re){var ne=this.rules.block.list.exec(re);if(ne){for(var he=ne[0],fe=ne[2],xe=fe.length>1,Pe=fe[fe.length-1]===")",ze={type:"list",raw:he,ordered:xe,start:xe?+fe.slice(0,-1):"",loose:!1,items:[]},ot=ne[0].match(this.rules.block.item),mt=!1,ft,wt,St,dt,Ut,Lt,qt,Qt=ot.length,It=0;It1||this.options.smartLists&&St!==fe)&&(dt=ot.slice(It+1).join(` `),ze.raw=ze.raw.substring(0,ze.raw.length-dt.length),It=Qt-1)),Ut=mt||/\n\n(?!\s*$)/.test(ft),It!==Qt-1&&(mt=ft.charAt(ft.length-1)===` -`,Ut||(Ut=mt)),Ut&&(ze.loose=!0),Lt=/^\[[ xX]\] /.test(ft),qt=void 0,Lt&&(qt=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),ze.items.push({type:"list_item",raw:he,task:Lt,checked:qt,loose:Ut,text:ft});return ze}},ge.html=function(ne){var re=this.rules.block.html.exec(ne);if(re)return{type:this.options.sanitize?"paragraph":"html",raw:re[0],pre:!this.options.sanitizer&&(re[1]==="pre"||re[1]==="script"||re[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):ee(re[0]):re[0]}},ge.def=function(ne){var re=this.rules.block.def.exec(ne);if(re){re[3]&&(re[3]=re[3].substring(1,re[3].length-1));var he=re[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:re[0],href:re[2],title:re[3]}}},ge.table=function(ne){var re=this.rules.block.table.exec(ne);if(re){var he={type:"table",header:Y(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(` -`):[]};if(he.header.length===he.align.length){he.raw=re[0];var fe=he.align.length,xe;for(xe=0;xe/i.test(fe[0])&&(re=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(fe[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(fe[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:fe[0],inLink:re,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ee(fe[0]):fe[0]}},ge.link=function(ne){var re=this.rules.inline.link.exec(ne);if(re){var he=le(re[2],"()");if(he>-1){var fe=re[0].indexOf("!")===0?5:4,xe=fe+re[1].length+he;re[2]=re[2].substring(0,he),re[0]=re[0].substring(0,xe).trim(),re[3]=""}var Pe=re[2],ze="";if(this.options.pedantic){var ot=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);ot?(Pe=ot[1],ze=ot[3]):ze=""}else ze=re[3]?re[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var mt=ue(re,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:ze&&ze.replace(this.rules.inline._escapes,"$1")},re[0]);return mt}},ge.reflink=function(ne,re){var he;if((he=this.rules.inline.reflink.exec(ne))||(he=this.rules.inline.nolink.exec(ne))){var fe=(he[2]||he[1]).replace(/\s+/g," ");if(fe=re[fe.toLowerCase()],!fe||!fe.href){var xe=he[0].charAt(0);return{type:"text",raw:xe,text:xe}}var Pe=ue(he,fe,he[0]);return Pe}},ge.strong=function(ne,re,he){he===void 0&&(he="");var fe=this.rules.inline.strong.start.exec(ne);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){re=re.slice(-1*ne.length);var xe=fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;xe.lastIndex=0;for(var Pe;(fe=xe.exec(re))!=null;)if(Pe=this.rules.inline.strong.middle.exec(re.slice(0,fe.index+3)),Pe)return{type:"strong",raw:ne.slice(0,Pe[0].length),text:ne.slice(2,Pe[0].length-2)}}},ge.em=function(ne,re,he){he===void 0&&(he="");var fe=this.rules.inline.em.start.exec(ne);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){re=re.slice(-1*ne.length);var xe=fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;xe.lastIndex=0;for(var Pe;(fe=xe.exec(re))!=null;)if(Pe=this.rules.inline.em.middle.exec(re.slice(0,fe.index+2)),Pe)return{type:"em",raw:ne.slice(0,Pe[0].length),text:ne.slice(1,Pe[0].length-1)}}},ge.codespan=function(ne){var re=this.rules.inline.code.exec(ne);if(re){var he=re[2].replace(/\n/g," "),fe=/[^ ]/.test(he),xe=he.startsWith(" ")&&he.endsWith(" ");return fe&&xe&&(he=he.substring(1,he.length-1)),he=ee(he,!0),{type:"codespan",raw:re[0],text:he}}},ge.br=function(ne){var re=this.rules.inline.br.exec(ne);if(re)return{type:"br",raw:re[0]}},ge.del=function(ne){var re=this.rules.inline.del.exec(ne);if(re)return{type:"del",raw:re[0],text:re[1]}},ge.autolink=function(ne,re){var he=this.rules.inline.autolink.exec(ne);if(he){var fe,xe;return he[2]==="@"?(fe=ee(this.options.mangle?re(he[1]):he[1]),xe="mailto:"+fe):(fe=ee(he[1]),xe=fe),{type:"link",raw:he[0],text:fe,href:xe,tokens:[{type:"text",raw:fe,text:fe}]}}},ge.url=function(ne,re){var he;if(he=this.rules.inline.url.exec(ne)){var fe,xe;if(he[2]==="@")fe=ee(this.options.mangle?re(he[0]):he[0]),xe="mailto:"+fe;else{var Pe;do Pe=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Pe!==he[0]);fe=ee(he[0]),he[1]==="www."?xe="http://"+fe:xe=fe}return{type:"link",raw:he[0],text:fe,href:xe,tokens:[{type:"text",raw:fe,text:fe}]}}},ge.inlineText=function(ne,re,he){var fe=this.rules.inline.text.exec(ne);if(fe){var xe;return re?xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ee(fe[0]):fe[0]:xe=ee(this.options.smartypants?he(fe[0]):fe[0]),{type:"text",raw:fe[0],text:xe}}},Ee}(),Ce=j.noopTest,ce=j.edit,pe=j.merge,se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Ce,table:Ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=ce(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,se.item=ce(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.list=ce(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",se._comment=//,se.html=ce(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=ce(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.blockquote=ce(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=pe({},se),se.gfm=pe({},se.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),se.gfm.nptable=ce(se.gfm.nptable).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.gfm.table=ce(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.pedantic=pe({},se.normal,{html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Ce,paragraph:ce(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=ce(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=ce(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=ce(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=ce(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=ce(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=ce(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=ce(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=ce(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=ce(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=ce(ae._blockSkip,"g").getRegex(),ae.overlapSkip=ce(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ae.autolink=ce(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=ce(ae.tag).replace("comment",se._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=ce(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=ce(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=ce(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=pe({},ae),ae.pedantic=pe({},ae.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=pe({},ae.normal,{escape:ce(ae.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ne="x"+ne.toString(16)),ge+="&#"+ne+";";return ge}var Be=function(){function Ee(_e){this.tokens=[],this.tokens.links=Object.create(null),this.options=_e||Te,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ne={block:Ne.normal,inline:De.normal};this.options.pedantic?(ne.block=Ne.pedantic,ne.inline=De.pedantic):this.options.gfm&&(ne.block=Ne.gfm,this.options.breaks?ne.inline=De.breaks:ne.inline=De.gfm),this.tokenizer.rules=ne}Ee.lex=function(ne,re){var he=new Ee(re);return he.lex(ne)};var ge=Ee.prototype;return ge.lex=function(ne){return ne=ne.replace(/\r\n|\r/g,` -`).replace(/\t/g," "),this.blockTokens(ne,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(ne,re,he){re===void 0&&(re=[]),he===void 0&&(he=!0),ne=ne.replace(/^ +$/gm,"");for(var fe,xe,Pe,ze;ne;){if(fe=this.tokenizer.space(ne)){ne=ne.substring(fe.raw.length),fe.type&&re.push(fe);continue}if(fe=this.tokenizer.code(ne,re)){ne=ne.substring(fe.raw.length),fe.type?re.push(fe):(ze=re[re.length-1],ze.raw+=` +`,Ut||(Ut=mt)),Ut&&(ze.loose=!0),Lt=/^\[[ xX]\] /.test(ft),qt=void 0,Lt&&(qt=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),ze.items.push({type:"list_item",raw:he,task:Lt,checked:qt,loose:Ut,text:ft});return ze}},ge.html=function(re){var ne=this.rules.block.html.exec(re);if(ne)return{type:this.options.sanitize?"paragraph":"html",raw:ne[0],pre:!this.options.sanitizer&&(ne[1]==="pre"||ne[1]==="script"||ne[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ne[0]):ee(ne[0]):ne[0]}},ge.def=function(re){var ne=this.rules.block.def.exec(re);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var he=ne[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:ne[0],href:ne[2],title:ne[3]}}},ge.table=function(re){var ne=this.rules.block.table.exec(re);if(ne){var he={type:"table",header:Y(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(` +`):[]};if(he.header.length===he.align.length){he.raw=ne[0];var fe=he.align.length,xe;for(xe=0;xe/i.test(fe[0])&&(ne=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(fe[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(fe[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:fe[0],inLink:ne,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ee(fe[0]):fe[0]}},ge.link=function(re){var ne=this.rules.inline.link.exec(re);if(ne){var he=le(ne[2],"()");if(he>-1){var fe=ne[0].indexOf("!")===0?5:4,xe=fe+ne[1].length+he;ne[2]=ne[2].substring(0,he),ne[0]=ne[0].substring(0,xe).trim(),ne[3]=""}var Pe=ne[2],ze="";if(this.options.pedantic){var ot=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);ot?(Pe=ot[1],ze=ot[3]):ze=""}else ze=ne[3]?ne[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var mt=ue(ne,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:ze&&ze.replace(this.rules.inline._escapes,"$1")},ne[0]);return mt}},ge.reflink=function(re,ne){var he;if((he=this.rules.inline.reflink.exec(re))||(he=this.rules.inline.nolink.exec(re))){var fe=(he[2]||he[1]).replace(/\s+/g," ");if(fe=ne[fe.toLowerCase()],!fe||!fe.href){var xe=he[0].charAt(0);return{type:"text",raw:xe,text:xe}}var Pe=ue(he,fe,he[0]);return Pe}},ge.strong=function(re,ne,he){he===void 0&&(he="");var fe=this.rules.inline.strong.start.exec(re);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ne=ne.slice(-1*re.length);var xe=fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;xe.lastIndex=0;for(var Pe;(fe=xe.exec(ne))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ne.slice(0,fe.index+3)),Pe)return{type:"strong",raw:re.slice(0,Pe[0].length),text:re.slice(2,Pe[0].length-2)}}},ge.em=function(re,ne,he){he===void 0&&(he="");var fe=this.rules.inline.em.start.exec(re);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ne=ne.slice(-1*re.length);var xe=fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;xe.lastIndex=0;for(var Pe;(fe=xe.exec(ne))!=null;)if(Pe=this.rules.inline.em.middle.exec(ne.slice(0,fe.index+2)),Pe)return{type:"em",raw:re.slice(0,Pe[0].length),text:re.slice(1,Pe[0].length-1)}}},ge.codespan=function(re){var ne=this.rules.inline.code.exec(re);if(ne){var he=ne[2].replace(/\n/g," "),fe=/[^ ]/.test(he),xe=he.startsWith(" ")&&he.endsWith(" ");return fe&&xe&&(he=he.substring(1,he.length-1)),he=ee(he,!0),{type:"codespan",raw:ne[0],text:he}}},ge.br=function(re){var ne=this.rules.inline.br.exec(re);if(ne)return{type:"br",raw:ne[0]}},ge.del=function(re){var ne=this.rules.inline.del.exec(re);if(ne)return{type:"del",raw:ne[0],text:ne[1]}},ge.autolink=function(re,ne){var he=this.rules.inline.autolink.exec(re);if(he){var fe,xe;return he[2]==="@"?(fe=ee(this.options.mangle?ne(he[1]):he[1]),xe="mailto:"+fe):(fe=ee(he[1]),xe=fe),{type:"link",raw:he[0],text:fe,href:xe,tokens:[{type:"text",raw:fe,text:fe}]}}},ge.url=function(re,ne){var he;if(he=this.rules.inline.url.exec(re)){var fe,xe;if(he[2]==="@")fe=ee(this.options.mangle?ne(he[0]):he[0]),xe="mailto:"+fe;else{var Pe;do Pe=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Pe!==he[0]);fe=ee(he[0]),he[1]==="www."?xe="http://"+fe:xe=fe}return{type:"link",raw:he[0],text:fe,href:xe,tokens:[{type:"text",raw:fe,text:fe}]}}},ge.inlineText=function(re,ne,he){var fe=this.rules.inline.text.exec(re);if(fe){var xe;return ne?xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ee(fe[0]):fe[0]:xe=ee(this.options.smartypants?he(fe[0]):fe[0]),{type:"text",raw:fe[0],text:xe}}},Ee}(),Ce=j.noopTest,ce=j.edit,pe=j.merge,se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Ce,table:Ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=ce(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,se.item=ce(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.list=ce(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",se._comment=//,se.html=ce(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=ce(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.blockquote=ce(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=pe({},se),se.gfm=pe({},se.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),se.gfm.nptable=ce(se.gfm.nptable).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.gfm.table=ce(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.pedantic=pe({},se.normal,{html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Ce,paragraph:ce(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=ce(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=ce(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=ce(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=ce(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=ce(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=ce(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=ce(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=ce(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=ce(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=ce(ae._blockSkip,"g").getRegex(),ae.overlapSkip=ce(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ae.autolink=ce(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=ce(ae.tag).replace("comment",se._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=ce(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=ce(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=ce(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=pe({},ae),ae.pedantic=pe({},ae.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=pe({},ae.normal,{escape:ce(ae.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(re="x"+re.toString(16)),ge+="&#"+re+";";return ge}var Be=function(){function Ee(_e){this.tokens=[],this.tokens.links=Object.create(null),this.options=_e||Te,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var re={block:Ne.normal,inline:De.normal};this.options.pedantic?(re.block=Ne.pedantic,re.inline=De.pedantic):this.options.gfm&&(re.block=Ne.gfm,this.options.breaks?re.inline=De.breaks:re.inline=De.gfm),this.tokenizer.rules=re}Ee.lex=function(re,ne){var he=new Ee(ne);return he.lex(re)};var ge=Ee.prototype;return ge.lex=function(re){return re=re.replace(/\r\n|\r/g,` +`).replace(/\t/g," "),this.blockTokens(re,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(re,ne,he){ne===void 0&&(ne=[]),he===void 0&&(he=!0),re=re.replace(/^ +$/gm,"");for(var fe,xe,Pe,ze;re;){if(fe=this.tokenizer.space(re)){re=re.substring(fe.raw.length),fe.type&&ne.push(fe);continue}if(fe=this.tokenizer.code(re,ne)){re=re.substring(fe.raw.length),fe.type?ne.push(fe):(ze=ne[ne.length-1],ze.raw+=` `+fe.raw,ze.text+=` -`+fe.text);continue}if(fe=this.tokenizer.fences(ne)){ne=ne.substring(fe.raw.length),re.push(fe);continue}if(fe=this.tokenizer.heading(ne)){ne=ne.substring(fe.raw.length),re.push(fe);continue}if(fe=this.tokenizer.nptable(ne)){ne=ne.substring(fe.raw.length),re.push(fe);continue}if(fe=this.tokenizer.hr(ne)){ne=ne.substring(fe.raw.length),re.push(fe);continue}if(fe=this.tokenizer.blockquote(ne)){ne=ne.substring(fe.raw.length),fe.tokens=this.blockTokens(fe.text,[],he),re.push(fe);continue}if(fe=this.tokenizer.list(ne)){for(ne=ne.substring(fe.raw.length),Pe=fe.items.length,xe=0;xe0)for(;(ot=this.tokenizer.rules.inline.reflinkSearch.exec(ze))!=null;)mt.includes(ot[0].slice(ot[0].lastIndexOf("[")+1,-1))&&(ze=ze.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ot=this.tokenizer.rules.inline.blockSkip.exec(ze))!=null;)ze=ze.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ne;){if(Pe=this.tokenizer.escape(ne)){ne=ne.substring(Pe.raw.length),re.push(Pe);continue}if(Pe=this.tokenizer.tag(ne,he,fe)){ne=ne.substring(Pe.raw.length),he=Pe.inLink,fe=Pe.inRawBlock,re.push(Pe);continue}if(Pe=this.tokenizer.link(ne)){ne=ne.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),re.push(Pe);continue}if(Pe=this.tokenizer.reflink(ne,this.tokens.links)){ne=ne.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),re.push(Pe);continue}if(Pe=this.tokenizer.strong(ne,ze,xe)){ne=ne.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),re.push(Pe);continue}if(Pe=this.tokenizer.em(ne,ze,xe)){ne=ne.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),re.push(Pe);continue}if(Pe=this.tokenizer.codespan(ne)){ne=ne.substring(Pe.raw.length),re.push(Pe);continue}if(Pe=this.tokenizer.br(ne)){ne=ne.substring(Pe.raw.length),re.push(Pe);continue}if(Pe=this.tokenizer.del(ne)){ne=ne.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),re.push(Pe);continue}if(Pe=this.tokenizer.autolink(ne,Le)){ne=ne.substring(Pe.raw.length),re.push(Pe);continue}if(!he&&(Pe=this.tokenizer.url(ne,Le))){ne=ne.substring(Pe.raw.length),re.push(Pe);continue}if(Pe=this.tokenizer.inlineText(ne,fe,We)){ne=ne.substring(Pe.raw.length),xe=Pe.raw.slice(-1),re.push(Pe);continue}if(ne){var ft="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return re},$(Ee,null,[{key:"rules",get:function(){return{block:Ne,inline:De}}}]),Ee}(),Ge=G.defaults,oe=j.cleanUrl,ye=j.escape,we=function(){function Ee(_e){this.options=_e||Ge}var ge=Ee.prototype;return ge.code=function(ne,re,he){var fe=(re||"").match(/\S*/)[0];if(this.options.highlight){var xe=this.options.highlight(ne,fe);xe!=null&&xe!==ne&&(he=!0,ne=xe)}return fe?'
      '+(he?ne:ye(ne,!0))+`
      -`:"
      "+(he?ne:ye(ne,!0))+`
      -`},ge.blockquote=function(ne){return`
      -`+ne+`
      -`},ge.html=function(ne){return ne},ge.heading=function(ne,re,he,fe){return this.options.headerIds?"'+ne+" -`:""+ne+" +`+fe.text);continue}if(re){var ot="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return ne},ge.inline=function(re){var ne,he,fe,xe,Pe,ze,ot=re.length;for(ne=0;ne0)for(;(ot=this.tokenizer.rules.inline.reflinkSearch.exec(ze))!=null;)mt.includes(ot[0].slice(ot[0].lastIndexOf("[")+1,-1))&&(ze=ze.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ot=this.tokenizer.rules.inline.blockSkip.exec(ze))!=null;)ze=ze.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;re;){if(Pe=this.tokenizer.escape(re)){re=re.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.tag(re,he,fe)){re=re.substring(Pe.raw.length),he=Pe.inLink,fe=Pe.inRawBlock,ne.push(Pe);continue}if(Pe=this.tokenizer.link(re)){re=re.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),ne.push(Pe);continue}if(Pe=this.tokenizer.reflink(re,this.tokens.links)){re=re.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),ne.push(Pe);continue}if(Pe=this.tokenizer.strong(re,ze,xe)){re=re.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),ne.push(Pe);continue}if(Pe=this.tokenizer.em(re,ze,xe)){re=re.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),ne.push(Pe);continue}if(Pe=this.tokenizer.codespan(re)){re=re.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.br(re)){re=re.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.del(re)){re=re.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],he,fe),ne.push(Pe);continue}if(Pe=this.tokenizer.autolink(re,Le)){re=re.substring(Pe.raw.length),ne.push(Pe);continue}if(!he&&(Pe=this.tokenizer.url(re,Le))){re=re.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.inlineText(re,fe,We)){re=re.substring(Pe.raw.length),xe=Pe.raw.slice(-1),ne.push(Pe);continue}if(re){var ft="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return ne},$(Ee,null,[{key:"rules",get:function(){return{block:Ne,inline:De}}}]),Ee}(),Ge=G.defaults,oe=j.cleanUrl,ye=j.escape,we=function(){function Ee(_e){this.options=_e||Ge}var ge=Ee.prototype;return ge.code=function(re,ne,he){var fe=(ne||"").match(/\S*/)[0];if(this.options.highlight){var xe=this.options.highlight(re,fe);xe!=null&&xe!==re&&(he=!0,re=xe)}return fe?'
      '+(he?re:ye(re,!0))+`
      +`:"
      "+(he?re:ye(re,!0))+`
      +`},ge.blockquote=function(re){return`
      +`+re+`
      +`},ge.html=function(re){return re},ge.heading=function(re,ne,he,fe){return this.options.headerIds?"'+re+" +`:""+re+" `},ge.hr=function(){return this.options.xhtml?`
      `:`
      -`},ge.list=function(ne,re,he){var fe=re?"ol":"ul",xe=re&&he!==1?' start="'+he+'"':"";return"<"+fe+xe+`> -`+ne+" -`},ge.listitem=function(ne){return"
    • "+ne+`
    • -`},ge.checkbox=function(ne){return" "},ge.paragraph=function(ne){return"

      "+ne+`

      -`},ge.table=function(ne,re){return re&&(re=""+re+""),` +`},ge.list=function(re,ne,he){var fe=ne?"ol":"ul",xe=ne&&he!==1?' start="'+he+'"':"";return"<"+fe+xe+`> +`+re+" +`},ge.listitem=function(re){return"
    • "+re+`
    • +`},ge.checkbox=function(re){return" "},ge.paragraph=function(re){return"

      "+re+`

      +`},ge.table=function(re,ne){return ne&&(ne=""+ne+""),`
      -`+ne+` -`+re+`
      -`},ge.tablerow=function(ne){return` -`+ne+` -`},ge.tablecell=function(ne,re){var he=re.header?"th":"td",fe=re.align?"<"+he+' align="'+re.align+'">':"<"+he+">";return fe+ne+" -`},ge.strong=function(ne){return""+ne+""},ge.em=function(ne){return""+ne+""},ge.codespan=function(ne){return""+ne+""},ge.br=function(){return this.options.xhtml?"
      ":"
      "},ge.del=function(ne){return""+ne+""},ge.link=function(ne,re,he){if(ne=oe(this.options.sanitize,this.options.baseUrl,ne),ne===null)return he;var fe='",fe},ge.image=function(ne,re,he){if(ne=oe(this.options.sanitize,this.options.baseUrl,ne),ne===null)return he;var fe=''+he+'":">",fe},ge.text=function(ne){return ne},Ee}(),Ae=function(){function Ee(){}var ge=Ee.prototype;return ge.strong=function(ne){return ne},ge.em=function(ne){return ne},ge.codespan=function(ne){return ne},ge.del=function(ne){return ne},ge.html=function(ne){return ne},ge.text=function(ne){return ne},ge.link=function(ne,re,he){return""+he},ge.image=function(ne,re,he){return""+he},ge.br=function(){return""},Ee}(),Ue=function(){function Ee(){this.seen={}}var ge=Ee.prototype;return ge.slug=function(ne){var re=ne.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(re)){var he=re;do this.seen[he]++,re=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(re))}return this.seen[re]=0,re},Ee}(),Ve=G.defaults,Ze=j.unescape,$e=function(){function Ee(_e){this.options=_e||Ve,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new Ue}Ee.parse=function(ne,re){var he=new Ee(re);return he.parse(ne)};var ge=Ee.prototype;return ge.parse=function(ne,re){re===void 0&&(re=!0);var he="",fe,xe,Pe,ze,ot,mt,ft,wt,St,dt,Ut,Lt,qt,Qt,It,Ci,Ki,yt,Li=ne.length;for(fe=0;fe0&&It.tokens[0].type==="text"?(It.tokens[0].text=yt+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=yt+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:yt}):Qt+=yt),Qt+=this.parse(It.tokens,qt),St+=this.renderer.listitem(Qt,Ki,Ci);he+=this.renderer.list(St,Ut,Lt);continue}case"html":{he+=this.renderer.html(dt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(dt.tokens));continue}case"text":{for(St=dt.tokens?this.parseInline(dt.tokens):dt.text;fe+1An error occurred:

      "+Je(Pe.message+"",!0)+"
      ";throw Pe}}Fe.options=Fe.setOptions=function(Ee){return tt(Fe.defaults,Ee),ut(Fe.defaults),Fe},Fe.getDefaults=Me,Fe.defaults=nt,Fe.use=function(Ee){var ge=tt({},Ee);if(Ee.renderer&&function(){var ne=Fe.defaults.renderer||new we,re=function(xe){var Pe=ne[xe];ne[xe]=function(){for(var ze=arguments.length,ot=new Array(ze),mt=0;mt`,triples:"",explode:"[]{}"},M=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(u,f,o){o&&o!=ie.Init&&(u.removeKeyMap(F),u.state.closeBrackets=null),f&&(U(X(f,"pairs")),u.state.closeBrackets=f,u.addKeyMap(F))});function X(u,f){return f=="pairs"&&typeof u=="string"?u:typeof u=="object"&&u[f]!=null?u[f]:$[f]}var F={Backspace:i,Enter:D};function U(u){for(var f=0;f=0;s--){var A=h[s].head;u.replaceRange("",M(A.line,A.ch-1),M(A.line,A.ch+1),"+delete")}}function D(u){var f=W(u),o=f&&X(f,"explode");if(!o||u.getOption("disableInput"))return ie.Pass;for(var h=u.listSelections(),s=0;s0;return{anchor:new M(u.anchor.line,u.anchor.ch+(f?-1:1)),head:new M(u.head.line,u.head.ch+(f?1:-1))}}function m(u,f){var o=W(u);if(!o||u.getOption("disableInput"))return ie.Pass;var h=X(o,"pairs"),s=h.indexOf(f);if(s==-1)return ie.Pass;for(var a=X(o,"closeBefore"),A=X(o,"triples"),_=h.charAt(s+1)==f,S=u.listSelections(),L=s%2==0,R,C=0;C=0&&u.getRange(x,M(x.line,x.ch+3))==f+f+f?c="skipThree":c="skip";else if(_&&x.ch>1&&A.indexOf(f)>=0&&u.getRange(M(x.line,x.ch-2),x)==f+f){if(x.ch>2&&/\bstring/.test(u.getTokenTypeAt(M(x.line,x.ch-2))))return ie.Pass;c="addFour"}else if(_){var y=x.ch==0?" ":u.getRange(M(x.line,x.ch-1),x);if(!ie.isWordChar(T)&&y!=f&&!ie.isWordChar(y))c="both";else return ie.Pass}else if(L&&(T.length===0||/\s/.test(T)||a.indexOf(T)>-1))c="both";else return ie.Pass;if(!R)R=c;else if(R!=c)return ie.Pass}var v=s%2?h.charAt(s-1):f,N=s%2?f:h.charAt(s+1);u.operation(function(){if(R=="skip")u.execCommand("goCharRight");else if(R=="skipThree")for(var B=0;B<3;B++)u.execCommand("goCharRight");else if(R=="surround"){for(var O=u.getSelections(),B=0;Ba.length&&(_=a.length);A<_;A++)yield a[A]}$.slice=o;function h(a,A=Number.POSITIVE_INFINITY){const _=[];if(A===0)return[_,a];const S=a[Symbol.iterator]();for(let L=0;LS===L){const S=a[Symbol.iterator](),L=A[Symbol.iterator]();for(;;){const R=S.next(),C=L.next();if(R.done!==C.done)return!1;if(R.done)return!0;if(!_(R.value,C.value))return!1}}$.equals=s})(ie||(ie={}))},LdHM:function(st,be,Q){"use strict";Q.d(be,"b",function(){return a}),Q.d(be,"a",function(){return _});var ie=Q("1OyB"),$=Q("vuIU"),M=Q("Ji7U"),X=Q("LK+K"),F=Q("q1tI"),U=Q("rePB"),G=Q("Ff2n"),W=Q("ODXe"),i=Q("4IlW"),D=Q("bX4T"),g=Q("YrtM"),m=Q("TSYQ"),p=Q.n(m),l=Q("+nKL"),u=Q("8OUc"),f=function(Y,ee){var le=Y.prefixCls,ue=Y.id,ke=Y.flattenOptions,Se=Y.childrenAsData,Ce=Y.values,ce=Y.searchValue,pe=Y.multiple,se=Y.defaultActiveFirstOption,ae=Y.height,Oe=Y.itemHeight,Te=Y.notFoundContent,Ne=Y.open,De=Y.menuItemSelectedIcon,We=Y.virtual,Le=Y.onSelect,Be=Y.onToggleOpen,Ge=Y.onActiveValue,oe=Y.onScroll,ye=Y.onMouseEnter,we="".concat(le,"-item"),Ae=Object(g.a)(function(){return ke},[Ne,ke],function(je,Ee){return Ee[0]&&je[1]!==Ee[1]}),Ue=F.useRef(null),Ve=function(Ee){Ee.preventDefault()},Ze=function(Ee){Ue.current&&Ue.current.scrollTo({index:Ee})},$e=function(Ee){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_e=Ae.length,ne=0;ne<_e;ne+=1){var re=(Ee+ne*ge+_e)%_e,he=Ae[re],fe=he.group,xe=he.data;if(!fe&&!xe.disabled)return re}return-1},tt=F.useState(function(){return $e(0)}),et=Object(W.a)(tt,2),Je=et[0],Me=et[1],ut=function(Ee){Me(Ee);var ge=Ae[Ee];if(!ge){Ge(null,-1);return}Ge(ge.data.value,Ee)};F.useEffect(function(){ut(se!==!1?$e(0):-1)},[Ae.length,ce]),F.useEffect(function(){var je=setTimeout(function(){if(!pe&&Ne&&Ce.size===1){var Ee=Array.from(Ce)[0],ge=Ae.findIndex(function(_e){var ne=_e.data;return ne.value===Ee});ut(ge),Ze(ge)}});return function(){return clearTimeout(je)}},[Ne]);var nt=function(Ee){Ee!==void 0&&Le(Ee,{selected:!Ce.has(Ee)}),pe||Be(!1)};if(F.useImperativeHandle(ee,function(){return{onKeyDown:function(Ee){var ge=Ee.which;switch(ge){case i.a.UP:case i.a.DOWN:{var _e=0;if(ge===i.a.UP?_e=-1:ge===i.a.DOWN&&(_e=1),_e!==0){var ne=$e(Je+_e,_e);Ze(ne),ut(ne)}break}case i.a.ENTER:{var re=Ae[Je];re&&!re.data.disabled?nt(re.data.value):nt(void 0),Ne&&Ee.preventDefault();break}case i.a.ESC:Be(!1)}},onKeyUp:function(){},scrollTo:function(Ee){Ze(Ee)}}}),Ae.length===0)return F.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),className:"".concat(we,"-empty"),onMouseDown:Ve},Te);function Fe(je){var Ee=Ae[je];if(!Ee)return null;var ge=Ee.data||{},_e=ge.value,ne=ge.label,re=ge.children,he=Object(D.a)(ge,!0),fe=Se?re:ne;return Ee?F.createElement("div",Object.assign({"aria-label":typeof fe=="string"?fe:null},he,{key:je,role:"option",id:"".concat(ue,"_list_").concat(je),"aria-selected":Ce.has(_e)}),_e):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),style:{height:0,width:0,overflow:"hidden"}},Fe(Je-1),Fe(Je),Fe(Je+1)),F.createElement(l.a,{itemKey:"key",ref:Ue,data:Ae,height:ae,itemHeight:Oe,fullHeight:!1,onMouseDown:Ve,onScroll:oe,virtual:We,onMouseEnter:ye},function(je,Ee){var ge,_e=je.group,ne=je.groupOption,re=je.data,he=re.label,fe=re.key;if(_e)return F.createElement("div",{className:p()(we,"".concat(we,"-group"))},he!==void 0?he:fe);var xe=re.disabled,Pe=re.value,ze=re.title,ot=re.children,mt=re.style,ft=re.className,wt=Object(G.a)(re,["disabled","value","title","children","style","className"]),St=Ce.has(Pe),dt="".concat(we,"-option"),Ut=p()(we,dt,ft,(ge={},Object(U.a)(ge,"".concat(dt,"-grouped"),ne),Object(U.a)(ge,"".concat(dt,"-active"),Je===Ee&&!xe),Object(U.a)(ge,"".concat(dt,"-disabled"),xe),Object(U.a)(ge,"".concat(dt,"-selected"),St),ge)),Lt=Se?ot:he,qt=!De||typeof De=="function"||St;return F.createElement("div",Object.assign({},wt,{"aria-selected":St,className:Ut,title:ze,onMouseMove:function(){if(Je===Ee||xe)return;ut(Ee)},onClick:function(){xe||nt(Pe)},style:mt}),F.createElement("div",{className:"".concat(dt,"-content")},Lt||Pe),F.isValidElement(De)||St,qt&&F.createElement(u.a,{className:"".concat(we,"-option-state"),customizeIcon:De,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},o=F.forwardRef(f);o.displayName="OptionList";var h=o,s=function(){return null};s.isSelectOption=!0;var a=s,A=function(){return null};A.isSelectOptGroup=!0;var _=A,S=Q("VTBJ"),L=Q("Zm9Q");function R(b){var Y=b.key,ee=b.props,le=ee.children,ue=ee.value,ke=Object(G.a)(ee,["children","value"]);return Object(S.a)({key:Y,value:ue!==void 0?ue:Y,children:le},ke)}function C(b){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(b).map(function(ee,le){if(!F.isValidElement(ee)||!ee.type)return null;var ue=ee.type.isSelectOptGroup,ke=ee.key,Se=ee.props,Ce=Se.children,ce=Object(G.a)(Se,["children"]);return Y||!ue?R(ee):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(ke===null?le:ke,"__"),label:ke},ce),{},{options:C(Ce)})}).filter(function(ee){return ee})}var w=Q("2Qr1"),x=Q("qNPg"),c=Q("U8pU"),T=Q("Kwbf"),y=Q("WKfj");function v(b){var Y=b.mode,ee=b.options,le=b.children,ue=b.backfill,ke=b.allowClear,Se=b.placeholder,Ce=b.getInputElement,ce=b.showSearch,pe=b.onSearch,se=b.defaultOpen,ae=b.autoFocus,Oe=b.labelInValue,Te=b.value,Ne=b.inputValue,De=b.optionLabelProp,We=Y==="multiple"||Y==="tags",Le=ce!==void 0?ce:We||Y==="combobox",Be=ee||C(le);if(Object(T.a)(Y!=="tags"||Be.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var Ge=Be.some(function(we){return we.options?we.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(T.a)(!Ge,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(T.a)(Y!=="combobox"||!De,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(T.a)(Y==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(T.a)(Y==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),Object(T.b)(Y!=="combobox"||!Ce||!ke||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pe&&!Le&&Y!=="combobox"&&Y!=="tags"&&Object(T.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(T.b)(!se||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Te!=null){var oe=Object(y.d)(Te);Object(T.a)(!Oe||oe.every(function(we){return Object(c.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(T.a)(!We||Array.isArray(Te),"`value` should be array when `mode` is `multiple` or `tags`")}if(le){var ye=null;Object(L.a)(le).some(function(we){if(!F.isValidElement(we)||!we.type)return!1;var Ae=we.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var Ue=Object(L.a)(we.props.children).every(function(Ve){return!F.isValidElement(Ve)||!we.type||Ve.type.isSelectOption?!0:(ye=Ve.type,!1)});return!Ue}return ye=Ae,!0}),ye&&Object(T.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ye.displayName||ye.name||ye,"`.")),Object(T.a)(Ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=v,B=Object(x.a)({prefixCls:"rc-select",components:{optionList:h},convertChildrenToData:C,flattenOptions:w.d,getLabeledValue:w.e,filterOptions:w.b,isValueDisabled:w.g,findValueOption:w.c,warningProps:N,fillOptionsWithMissingValue:w.a}),O=function(b){Object(M.a)(ee,b);var Y=Object(X.a)(ee);function ee(){var le;return Object(ie.a)(this,ee),le=Y.apply(this,arguments),le.selectRef=F.createRef(),le.focus=function(){le.selectRef.current.focus()},le.blur=function(){le.selectRef.current.blur()},le}return Object($.a)(ee,[{key:"render",value:function(){return F.createElement(B,Object.assign({ref:this.selectRef},this.props))}}]),ee}(F.Component);O.Option=a,O.OptGroup=_;var j=O,P=be.c=j},M8RZ:function(st,be,Q){"use strict";Q.d(be,"a",function(){return i});var ie=Q("fWQN"),$=Q("mtLc"),M=Q("yKVA"),X=Q("879j"),F=Q("q1tI"),U=Q.n(F),G=Q("i8i4"),W=Q.n(G),i=function(D){Object(M.a)(m,D);var g=Object(X.a)(m);function m(p){var l;Object(ie.a)(this,m),l=g.call(this,p);var u=window.document;return l.node=u.createElement("div"),u.body.appendChild(l.node),l}return Object($.a)(m,[{key:"render",value:function(){var l=this.props.children;return Object(G.createPortal)(l,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(U.a.Component)},MI8n:function(st,be,Q){"use strict";Q.d(be,"c",function(){return F}),Q.d(be,"b",function(){return i}),Q.d(be,"e",function(){return D}),Q.d(be,"a",function(){return g}),Q.d(be,"d",function(){return m}),Q.d(be,"f",function(){return p});var ie=Q("/cxE"),$=Q("pmY6"),M=Q("24hK"),X=Q("5Y4S"),F;(function(l){l.None=()=>$.a.None;function u(v){return(N,B=null,O)=>{let j=!1,P;return P=v(b=>j?void 0:(P?P.dispose():j=!0,N.call(B,b)),null,O),j&&P.dispose(),P}}l.once=u;function f(v,N){return _((B,O=null,j)=>v(P=>B.call(O,N(P)),null,j))}l.map=f;function o(v,N){return _((B,O=null,j)=>v(P=>{N(P),B.call(O,P)},null,j))}l.forEach=o;function h(v,N){return _((B,O=null,j)=>v(P=>N(P)&&B.call(O,P),null,j))}l.filter=h;function s(v){return v}l.signal=s;function a(...v){return(N,B=null,O)=>Object($.e)(...v.map(j=>j(P=>N.call(B,P),null,O)))}l.any=a;function A(v,N,B){let O=B;return f(v,j=>(O=N(O,j),O))}l.reduce=A;function _(v){let N;const B=new i({onFirstListenerAdd(){N=v(B.fire,B)},onLastListenerRemove(){N.dispose()}});return B.event}function S(v,N,B=100,O=!1,j){let P,b,Y,ee=0;const le=new i({leakWarningThreshold:j,onFirstListenerAdd(){P=v(ue=>{ee++,b=N(b,ue),O&&!Y&&(le.fire(b),b=void 0),clearTimeout(Y),Y=setTimeout(()=>{const ke=b;b=void 0,Y=void 0,(!O||ee>1)&&le.fire(ke),ee=0},B)})},onLastListenerRemove(){P.dispose()}});return le.event}l.debounce=S;function L(v,N=(B,O)=>B===O){let B=!0,O;return h(v,j=>{const P=B||!N(j,O);return B=!1,O=j,P})}l.latch=L;function R(v,N){return[l.filter(v,N),l.filter(v,B=>!N(B))]}l.split=R;function C(v,N=!1,B=[]){let O=B.slice(),j=v(Y=>{O?O.push(Y):b.fire(Y)});const P=()=>{O&&O.forEach(Y=>b.fire(Y)),O=null},b=new i({onFirstListenerAdd(){j||(j=v(Y=>b.fire(Y)))},onFirstListenerDidAdd(){O&&(N?setTimeout(P):P())},onLastListenerRemove(){j&&j.dispose(),j=null}});return b.event}l.buffer=C;class w{constructor(v){this.event=v}map(v){return new w(f(this.event,v))}forEach(v){return new w(o(this.event,v))}filter(v){return new w(h(this.event,v))}reduce(v,N){return new w(A(this.event,v,N))}latch(){return new w(L(this.event))}debounce(v,N=100,B=!1,O){return new w(S(this.event,v,N,B,O))}on(v,N,B){return this.event(v,N,B)}once(v,N,B){return u(this.event)(v,N,B)}}function x(v){return new w(v)}l.chain=x;function c(v,N,B=O=>O){const O=(...Y)=>b.fire(B(...Y)),j=()=>v.on(N,O),P=()=>v.removeListener(N,O),b=new i({onFirstListenerAdd:j,onLastListenerRemove:P});return b.event}l.fromNodeEventEmitter=c;function T(v,N,B=O=>O){const O=(...Y)=>b.fire(B(...Y)),j=()=>v.addEventListener(N,O),P=()=>v.removeEventListener(N,O),b=new i({onFirstListenerAdd:j,onLastListenerRemove:P});return b.event}l.fromDOMEventEmitter=T;function y(v){return new Promise(N=>u(v)(N))}l.toPromise=y})(F||(F={}));class U{constructor(l){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${l}_${U._idPool++}`}start(l){this._stopWatch=new X.a(!0),this._listenerCount=l}stop(){if(this._stopWatch){const l=this._stopWatch.elapsed();this._elapsedOverall+=l,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${l.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}U._idPool=0;let G=-1;class W{constructor(l,u=Math.random().toString(18).slice(2,5)){this.customThreshold=l,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(l){let u=G;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||l +`+ne+` +`},ge.tablerow=function(re){return` +`+re+` +`},ge.tablecell=function(re,ne){var he=ne.header?"th":"td",fe=ne.align?"<"+he+' align="'+ne.align+'">':"<"+he+">";return fe+re+" +`},ge.strong=function(re){return""+re+""},ge.em=function(re){return""+re+""},ge.codespan=function(re){return""+re+""},ge.br=function(){return this.options.xhtml?"
      ":"
      "},ge.del=function(re){return""+re+""},ge.link=function(re,ne,he){if(re=oe(this.options.sanitize,this.options.baseUrl,re),re===null)return he;var fe='
      ",fe},ge.image=function(re,ne,he){if(re=oe(this.options.sanitize,this.options.baseUrl,re),re===null)return he;var fe=''+he+'":">",fe},ge.text=function(re){return re},Ee}(),Ae=function(){function Ee(){}var ge=Ee.prototype;return ge.strong=function(re){return re},ge.em=function(re){return re},ge.codespan=function(re){return re},ge.del=function(re){return re},ge.html=function(re){return re},ge.text=function(re){return re},ge.link=function(re,ne,he){return""+he},ge.image=function(re,ne,he){return""+he},ge.br=function(){return""},Ee}(),Ue=function(){function Ee(){this.seen={}}var ge=Ee.prototype;return ge.slug=function(re){var ne=re.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ne)){var he=ne;do this.seen[he]++,ne=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(ne))}return this.seen[ne]=0,ne},Ee}(),Ve=G.defaults,Ze=j.unescape,$e=function(){function Ee(_e){this.options=_e||Ve,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new Ue}Ee.parse=function(re,ne){var he=new Ee(ne);return he.parse(re)};var ge=Ee.prototype;return ge.parse=function(re,ne){ne===void 0&&(ne=!0);var he="",fe,xe,Pe,ze,ot,mt,ft,wt,St,dt,Ut,Lt,qt,Qt,It,Ci,Ki,yt,Li=re.length;for(fe=0;fe0&&It.tokens[0].type==="text"?(It.tokens[0].text=yt+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=yt+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:yt}):Qt+=yt),Qt+=this.parse(It.tokens,qt),St+=this.renderer.listitem(Qt,Ki,Ci);he+=this.renderer.list(St,Ut,Lt);continue}case"html":{he+=this.renderer.html(dt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(dt.tokens));continue}case"text":{for(St=dt.tokens?this.parseInline(dt.tokens):dt.text;fe+1An error occurred:

      "+Je(Pe.message+"",!0)+"
      ";throw Pe}}Fe.options=Fe.setOptions=function(Ee){return tt(Fe.defaults,Ee),ut(Fe.defaults),Fe},Fe.getDefaults=Me,Fe.defaults=rt,Fe.use=function(Ee){var ge=tt({},Ee);if(Ee.renderer&&function(){var re=Fe.defaults.renderer||new we,ne=function(xe){var Pe=re[xe];re[xe]=function(){for(var ze=arguments.length,ot=new Array(ze),mt=0;mt`,triples:"",explode:"[]{}"},M=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(u,f,o){o&&o!=ie.Init&&(u.removeKeyMap(F),u.state.closeBrackets=null),f&&(U(X(f,"pairs")),u.state.closeBrackets=f,u.addKeyMap(F))});function X(u,f){return f=="pairs"&&typeof u=="string"?u:typeof u=="object"&&u[f]!=null?u[f]:$[f]}var F={Backspace:i,Enter:D};function U(u){for(var f=0;f=0;s--){var A=h[s].head;u.replaceRange("",M(A.line,A.ch-1),M(A.line,A.ch+1),"+delete")}}function D(u){var f=W(u),o=f&&X(f,"explode");if(!o||u.getOption("disableInput"))return ie.Pass;for(var h=u.listSelections(),s=0;s0;return{anchor:new M(u.anchor.line,u.anchor.ch+(f?-1:1)),head:new M(u.head.line,u.head.ch+(f?1:-1))}}function m(u,f){var o=W(u);if(!o||u.getOption("disableInput"))return ie.Pass;var h=X(o,"pairs"),s=h.indexOf(f);if(s==-1)return ie.Pass;for(var a=X(o,"closeBefore"),A=X(o,"triples"),_=h.charAt(s+1)==f,S=u.listSelections(),L=s%2==0,R,C=0;C=0&&u.getRange(x,M(x.line,x.ch+3))==f+f+f?c="skipThree":c="skip";else if(_&&x.ch>1&&A.indexOf(f)>=0&&u.getRange(M(x.line,x.ch-2),x)==f+f){if(x.ch>2&&/\bstring/.test(u.getTokenTypeAt(M(x.line,x.ch-2))))return ie.Pass;c="addFour"}else if(_){var y=x.ch==0?" ":u.getRange(M(x.line,x.ch-1),x);if(!ie.isWordChar(T)&&y!=f&&!ie.isWordChar(y))c="both";else return ie.Pass}else if(L&&(T.length===0||/\s/.test(T)||a.indexOf(T)>-1))c="both";else return ie.Pass;if(!R)R=c;else if(R!=c)return ie.Pass}var v=s%2?h.charAt(s-1):f,N=s%2?f:h.charAt(s+1);u.operation(function(){if(R=="skip")u.execCommand("goCharRight");else if(R=="skipThree")for(var B=0;B<3;B++)u.execCommand("goCharRight");else if(R=="surround"){for(var O=u.getSelections(),B=0;Ba.length&&(_=a.length);A<_;A++)yield a[A]}$.slice=o;function h(a,A=Number.POSITIVE_INFINITY){const _=[];if(A===0)return[_,a];const S=a[Symbol.iterator]();for(let L=0;LS===L){const S=a[Symbol.iterator](),L=A[Symbol.iterator]();for(;;){const R=S.next(),C=L.next();if(R.done!==C.done)return!1;if(R.done)return!0;if(!_(R.value,C.value))return!1}}$.equals=s})(ie||(ie={}))},LdHM:function(st,be,Q){"use strict";Q.d(be,"b",function(){return a}),Q.d(be,"a",function(){return _});var ie=Q("1OyB"),$=Q("vuIU"),M=Q("Ji7U"),X=Q("LK+K"),F=Q("q1tI"),U=Q("rePB"),G=Q("Ff2n"),W=Q("ODXe"),i=Q("4IlW"),D=Q("bX4T"),g=Q("YrtM"),m=Q("TSYQ"),p=Q.n(m),l=Q("+nKL"),u=Q("8OUc"),f=function(Y,ee){var le=Y.prefixCls,ue=Y.id,ke=Y.flattenOptions,Se=Y.childrenAsData,Ce=Y.values,ce=Y.searchValue,pe=Y.multiple,se=Y.defaultActiveFirstOption,ae=Y.height,Oe=Y.itemHeight,Te=Y.notFoundContent,Ne=Y.open,De=Y.menuItemSelectedIcon,We=Y.virtual,Le=Y.onSelect,Be=Y.onToggleOpen,Ge=Y.onActiveValue,oe=Y.onScroll,ye=Y.onMouseEnter,we="".concat(le,"-item"),Ae=Object(g.a)(function(){return ke},[Ne,ke],function(je,Ee){return Ee[0]&&je[1]!==Ee[1]}),Ue=F.useRef(null),Ve=function(Ee){Ee.preventDefault()},Ze=function(Ee){Ue.current&&Ue.current.scrollTo({index:Ee})},$e=function(Ee){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_e=Ae.length,re=0;re<_e;re+=1){var ne=(Ee+re*ge+_e)%_e,he=Ae[ne],fe=he.group,xe=he.data;if(!fe&&!xe.disabled)return ne}return-1},tt=F.useState(function(){return $e(0)}),et=Object(W.a)(tt,2),Je=et[0],Me=et[1],ut=function(Ee){Me(Ee);var ge=Ae[Ee];if(!ge){Ge(null,-1);return}Ge(ge.data.value,Ee)};F.useEffect(function(){ut(se!==!1?$e(0):-1)},[Ae.length,ce]),F.useEffect(function(){var je=setTimeout(function(){if(!pe&&Ne&&Ce.size===1){var Ee=Array.from(Ce)[0],ge=Ae.findIndex(function(_e){var re=_e.data;return re.value===Ee});ut(ge),Ze(ge)}});return function(){return clearTimeout(je)}},[Ne]);var rt=function(Ee){Ee!==void 0&&Le(Ee,{selected:!Ce.has(Ee)}),pe||Be(!1)};if(F.useImperativeHandle(ee,function(){return{onKeyDown:function(Ee){var ge=Ee.which;switch(ge){case i.a.UP:case i.a.DOWN:{var _e=0;if(ge===i.a.UP?_e=-1:ge===i.a.DOWN&&(_e=1),_e!==0){var re=$e(Je+_e,_e);Ze(re),ut(re)}break}case i.a.ENTER:{var ne=Ae[Je];ne&&!ne.data.disabled?rt(ne.data.value):rt(void 0),Ne&&Ee.preventDefault();break}case i.a.ESC:Be(!1)}},onKeyUp:function(){},scrollTo:function(Ee){Ze(Ee)}}}),Ae.length===0)return F.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),className:"".concat(we,"-empty"),onMouseDown:Ve},Te);function Fe(je){var Ee=Ae[je];if(!Ee)return null;var ge=Ee.data||{},_e=ge.value,re=ge.label,ne=ge.children,he=Object(D.a)(ge,!0),fe=Se?ne:re;return Ee?F.createElement("div",Object.assign({"aria-label":typeof fe=="string"?fe:null},he,{key:je,role:"option",id:"".concat(ue,"_list_").concat(je),"aria-selected":Ce.has(_e)}),_e):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),style:{height:0,width:0,overflow:"hidden"}},Fe(Je-1),Fe(Je),Fe(Je+1)),F.createElement(l.a,{itemKey:"key",ref:Ue,data:Ae,height:ae,itemHeight:Oe,fullHeight:!1,onMouseDown:Ve,onScroll:oe,virtual:We,onMouseEnter:ye},function(je,Ee){var ge,_e=je.group,re=je.groupOption,ne=je.data,he=ne.label,fe=ne.key;if(_e)return F.createElement("div",{className:p()(we,"".concat(we,"-group"))},he!==void 0?he:fe);var xe=ne.disabled,Pe=ne.value,ze=ne.title,ot=ne.children,mt=ne.style,ft=ne.className,wt=Object(G.a)(ne,["disabled","value","title","children","style","className"]),St=Ce.has(Pe),dt="".concat(we,"-option"),Ut=p()(we,dt,ft,(ge={},Object(U.a)(ge,"".concat(dt,"-grouped"),re),Object(U.a)(ge,"".concat(dt,"-active"),Je===Ee&&!xe),Object(U.a)(ge,"".concat(dt,"-disabled"),xe),Object(U.a)(ge,"".concat(dt,"-selected"),St),ge)),Lt=Se?ot:he,qt=!De||typeof De=="function"||St;return F.createElement("div",Object.assign({},wt,{"aria-selected":St,className:Ut,title:ze,onMouseMove:function(){if(Je===Ee||xe)return;ut(Ee)},onClick:function(){xe||rt(Pe)},style:mt}),F.createElement("div",{className:"".concat(dt,"-content")},Lt||Pe),F.isValidElement(De)||St,qt&&F.createElement(u.a,{className:"".concat(we,"-option-state"),customizeIcon:De,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},o=F.forwardRef(f);o.displayName="OptionList";var h=o,s=function(){return null};s.isSelectOption=!0;var a=s,A=function(){return null};A.isSelectOptGroup=!0;var _=A,S=Q("VTBJ"),L=Q("Zm9Q");function R(b){var Y=b.key,ee=b.props,le=ee.children,ue=ee.value,ke=Object(G.a)(ee,["children","value"]);return Object(S.a)({key:Y,value:ue!==void 0?ue:Y,children:le},ke)}function C(b){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(b).map(function(ee,le){if(!F.isValidElement(ee)||!ee.type)return null;var ue=ee.type.isSelectOptGroup,ke=ee.key,Se=ee.props,Ce=Se.children,ce=Object(G.a)(Se,["children"]);return Y||!ue?R(ee):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(ke===null?le:ke,"__"),label:ke},ce),{},{options:C(Ce)})}).filter(function(ee){return ee})}var w=Q("2Qr1"),x=Q("qNPg"),c=Q("U8pU"),T=Q("Kwbf"),y=Q("WKfj");function v(b){var Y=b.mode,ee=b.options,le=b.children,ue=b.backfill,ke=b.allowClear,Se=b.placeholder,Ce=b.getInputElement,ce=b.showSearch,pe=b.onSearch,se=b.defaultOpen,ae=b.autoFocus,Oe=b.labelInValue,Te=b.value,Ne=b.inputValue,De=b.optionLabelProp,We=Y==="multiple"||Y==="tags",Le=ce!==void 0?ce:We||Y==="combobox",Be=ee||C(le);if(Object(T.a)(Y!=="tags"||Be.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var Ge=Be.some(function(we){return we.options?we.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(T.a)(!Ge,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(T.a)(Y!=="combobox"||!De,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(T.a)(Y==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(T.a)(Y==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),Object(T.b)(Y!=="combobox"||!Ce||!ke||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pe&&!Le&&Y!=="combobox"&&Y!=="tags"&&Object(T.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(T.b)(!se||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Te!=null){var oe=Object(y.d)(Te);Object(T.a)(!Oe||oe.every(function(we){return Object(c.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(T.a)(!We||Array.isArray(Te),"`value` should be array when `mode` is `multiple` or `tags`")}if(le){var ye=null;Object(L.a)(le).some(function(we){if(!F.isValidElement(we)||!we.type)return!1;var Ae=we.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var Ue=Object(L.a)(we.props.children).every(function(Ve){return!F.isValidElement(Ve)||!we.type||Ve.type.isSelectOption?!0:(ye=Ve.type,!1)});return!Ue}return ye=Ae,!0}),ye&&Object(T.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ye.displayName||ye.name||ye,"`.")),Object(T.a)(Ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=v,B=Object(x.a)({prefixCls:"rc-select",components:{optionList:h},convertChildrenToData:C,flattenOptions:w.d,getLabeledValue:w.e,filterOptions:w.b,isValueDisabled:w.g,findValueOption:w.c,warningProps:N,fillOptionsWithMissingValue:w.a}),O=function(b){Object(M.a)(ee,b);var Y=Object(X.a)(ee);function ee(){var le;return Object(ie.a)(this,ee),le=Y.apply(this,arguments),le.selectRef=F.createRef(),le.focus=function(){le.selectRef.current.focus()},le.blur=function(){le.selectRef.current.blur()},le}return Object($.a)(ee,[{key:"render",value:function(){return F.createElement(B,Object.assign({ref:this.selectRef},this.props))}}]),ee}(F.Component);O.Option=a,O.OptGroup=_;var j=O,P=be.c=j},M8RZ:function(st,be,Q){"use strict";Q.d(be,"a",function(){return i});var ie=Q("fWQN"),$=Q("mtLc"),M=Q("yKVA"),X=Q("879j"),F=Q("q1tI"),U=Q.n(F),G=Q("i8i4"),W=Q.n(G),i=function(D){Object(M.a)(m,D);var g=Object(X.a)(m);function m(p){var l;Object(ie.a)(this,m),l=g.call(this,p);var u=window.document;return l.node=u.createElement("div"),u.body.appendChild(l.node),l}return Object($.a)(m,[{key:"render",value:function(){var l=this.props.children;return Object(G.createPortal)(l,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(U.a.Component)},MI8n:function(st,be,Q){"use strict";Q.d(be,"c",function(){return F}),Q.d(be,"b",function(){return i}),Q.d(be,"e",function(){return D}),Q.d(be,"a",function(){return g}),Q.d(be,"d",function(){return m}),Q.d(be,"f",function(){return p});var ie=Q("/cxE"),$=Q("pmY6"),M=Q("24hK"),X=Q("5Y4S"),F;(function(l){l.None=()=>$.a.None;function u(v){return(N,B=null,O)=>{let j=!1,P;return P=v(b=>j?void 0:(P?P.dispose():j=!0,N.call(B,b)),null,O),j&&P.dispose(),P}}l.once=u;function f(v,N){return _((B,O=null,j)=>v(P=>B.call(O,N(P)),null,j))}l.map=f;function o(v,N){return _((B,O=null,j)=>v(P=>{N(P),B.call(O,P)},null,j))}l.forEach=o;function h(v,N){return _((B,O=null,j)=>v(P=>N(P)&&B.call(O,P),null,j))}l.filter=h;function s(v){return v}l.signal=s;function a(...v){return(N,B=null,O)=>Object($.e)(...v.map(j=>j(P=>N.call(B,P),null,O)))}l.any=a;function A(v,N,B){let O=B;return f(v,j=>(O=N(O,j),O))}l.reduce=A;function _(v){let N;const B=new i({onFirstListenerAdd(){N=v(B.fire,B)},onLastListenerRemove(){N.dispose()}});return B.event}function S(v,N,B=100,O=!1,j){let P,b,Y,ee=0;const le=new i({leakWarningThreshold:j,onFirstListenerAdd(){P=v(ue=>{ee++,b=N(b,ue),O&&!Y&&(le.fire(b),b=void 0),clearTimeout(Y),Y=setTimeout(()=>{const ke=b;b=void 0,Y=void 0,(!O||ee>1)&&le.fire(ke),ee=0},B)})},onLastListenerRemove(){P.dispose()}});return le.event}l.debounce=S;function L(v,N=(B,O)=>B===O){let B=!0,O;return h(v,j=>{const P=B||!N(j,O);return B=!1,O=j,P})}l.latch=L;function R(v,N){return[l.filter(v,N),l.filter(v,B=>!N(B))]}l.split=R;function C(v,N=!1,B=[]){let O=B.slice(),j=v(Y=>{O?O.push(Y):b.fire(Y)});const P=()=>{O&&O.forEach(Y=>b.fire(Y)),O=null},b=new i({onFirstListenerAdd(){j||(j=v(Y=>b.fire(Y)))},onFirstListenerDidAdd(){O&&(N?setTimeout(P):P())},onLastListenerRemove(){j&&j.dispose(),j=null}});return b.event}l.buffer=C;class w{constructor(v){this.event=v}map(v){return new w(f(this.event,v))}forEach(v){return new w(o(this.event,v))}filter(v){return new w(h(this.event,v))}reduce(v,N){return new w(A(this.event,v,N))}latch(){return new w(L(this.event))}debounce(v,N=100,B=!1,O){return new w(S(this.event,v,N,B,O))}on(v,N,B){return this.event(v,N,B)}once(v,N,B){return u(this.event)(v,N,B)}}function x(v){return new w(v)}l.chain=x;function c(v,N,B=O=>O){const O=(...Y)=>b.fire(B(...Y)),j=()=>v.on(N,O),P=()=>v.removeListener(N,O),b=new i({onFirstListenerAdd:j,onLastListenerRemove:P});return b.event}l.fromNodeEventEmitter=c;function T(v,N,B=O=>O){const O=(...Y)=>b.fire(B(...Y)),j=()=>v.addEventListener(N,O),P=()=>v.removeEventListener(N,O),b=new i({onFirstListenerAdd:j,onLastListenerRemove:P});return b.event}l.fromDOMEventEmitter=T;function y(v){return new Promise(N=>u(v)(N))}l.toPromise=y})(F||(F={}));class U{constructor(l){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${l}_${U._idPool++}`}start(l){this._stopWatch=new X.a(!0),this._listenerCount=l}stop(){if(this._stopWatch){const l=this._stopWatch.elapsed();this._elapsedOverall+=l,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${l.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}U._idPool=0;let G=-1;class W{constructor(l,u=Math.random().toString(18).slice(2,5)){this.customThreshold=l,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(l){let u=G;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||l{const h=this._stacks.get(f)||0;this._stacks.set(f,h-1)}}}class i{constructor(l){var u;this._disposed=!1,this._options=l,this._leakageMon=G>0?new W(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((u=this._options)===null||u===void 0?void 0:u._profName)?new U(this._options._profName):void 0}get event(){return this._event||(this._event=(l,u,f)=>{var o;this._listeners||(this._listeners=new M.a);const h=this._listeners.isEmpty();h&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(u?[l,u]:l);h&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,l,u);const a=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),A=Object($.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const _=this._listeners&&!this._listeners.isEmpty();_||this._options.onLastListenerRemove(this)}});return f instanceof $.b?f.add(A):Array.isArray(f)&&f.push(A),A}),this._event}fire(l){var u,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.a);for(let o of this._listeners)this._deliveryQueue.push([o,l]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,h]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,h):o[0].call(o[1],h)}catch(s){Object(ie.f)(s)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var l,u,f,o,h;this._disposed||(this._disposed=!0,(l=this._listeners)===null||l===void 0||l.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(o=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||o===void 0||o.call(f),(h=this._leakageMon)===null||h===void 0||h.dispose())}}class D extends i{constructor(l){super(l);this._isPaused=0,this._eventQueue=new M.a,this._mergeFn=l==null?void 0:l.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const l=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(l))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(l){this._listeners&&(this._isPaused!==0?this._eventQueue.push(l):super.fire(l))}}class g extends D{constructor(l){var u;super(l);this._delay=(u=l.delay)!==null&&u!==void 0?u:100}fire(l){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(l)}}class m{constructor(){this.buffers=[]}wrapEvent(l){return(u,f,o)=>l(h=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>u.call(f,h)):u.call(f,h)},void 0,o)}bufferEvents(l){const u=[];this.buffers.push(u);const f=l();return this.buffers.pop(),u.forEach(o=>o()),f}}class p{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=$.a.None,this.emitter=new i({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(l){this.inputEvent=l,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=l(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(st,be,Q){"use strict";(function(ie,$){Q.d(be,"b",function(){return f}),Q.d(be,"i",function(){return a}),Q.d(be,"f",function(){return A}),Q.d(be,"d",function(){return _}),Q.d(be,"g",function(){return S}),Q.d(be,"h",function(){return L}),Q.d(be,"c",function(){return R}),Q.d(be,"k",function(){return C}),Q.d(be,"j",function(){return w}),Q.d(be,"a",function(){return x}),Q.d(be,"e",function(){return y});var M;const X="en";let F=!1,U=!1,G=!1,W=!1,i=!1,D=!1,g=!1,m,p=X,l,u;const f=typeof self=="object"?self:typeof ie=="object"?ie:{};let o;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?o=f.vscode.process:typeof $!="undefined"&&(o=$);const h=typeof((M=o==null?void 0:o.versions)===null||M===void 0?void 0:M.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!h)u=navigator.userAgent,F=u.indexOf("Windows")>=0,U=u.indexOf("Macintosh")>=0,g=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=u.indexOf("Linux")>=0,D=!0,m=navigator.language,p=m;else if(typeof o=="object"){F=o.platform==="win32",U=o.platform==="darwin",G=o.platform==="linux",W=G&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,m=X,p=X;const v=o.env.VSCODE_NLS_CONFIG;if(v)try{const N=JSON.parse(v),B=N.availableLanguages["*"];m=N.locale,p=B||X,l=N._translationsConfigFile}catch(N){}i=!0}else console.error("Unable to resolve platform.");let s=0;U?s=1:F?s=3:G&&(s=2);const a=F,A=U,_=G,S=i,L=D,R=g,C=u,w=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let B=[];f.addEventListener("message",j=>{if(j.data&&j.data.vscodeSetImmediateId)for(let P=0,b=B.length;P{const P=++O;B.push({id:P,callback:j}),f.postMessage({vscodeSetImmediateId:P},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const N=Promise.resolve();return B=>N.then(B)}(),x=U||g?2:F?1:3;let c=!0,T=!1;function y(){if(!T){T=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const N=new Uint16Array(v.buffer);c=N[0]===(2<<8)+1}return c}}).call(this,Q("IyRk"),Q("Q2Ig"))},N0LK:function(st,be,Q){"use strict";Q.d(be,"C",function(){return ie}),Q.d(be,"v",function(){return M}),Q.d(be,"s",function(){return X}),Q.d(be,"t",function(){return F}),Q.d(be,"U",function(){return U}),Q.d(be,"J",function(){return G}),Q.d(be,"O",function(){return W}),Q.d(be,"p",function(){return i}),Q.d(be,"T",function(){return D}),Q.d(be,"q",function(){return g}),Q.d(be,"N",function(){return m}),Q.d(be,"M",function(){return p}),Q.d(be,"Q",function(){return l}),Q.d(be,"u",function(){return u}),Q.d(be,"x",function(){return f}),Q.d(be,"I",function(){return o}),Q.d(be,"f",function(){return h}),Q.d(be,"h",function(){return s}),Q.d(be,"g",function(){return a}),Q.d(be,"i",function(){return A}),Q.d(be,"G",function(){return _}),Q.d(be,"H",function(){return S}),Q.d(be,"r",function(){return L}),Q.d(be,"R",function(){return R}),Q.d(be,"d",function(){return C}),Q.d(be,"e",function(){return w}),Q.d(be,"E",function(){return x}),Q.d(be,"F",function(){return c}),Q.d(be,"j",function(){return T}),Q.d(be,"z",function(){return y}),Q.d(be,"K",function(){return N}),Q.d(be,"L",function(){return B}),Q.d(be,"m",function(){return j}),Q.d(be,"k",function(){return b}),Q.d(be,"A",function(){return ee}),Q.d(be,"a",function(){return le}),Q.d(be,"n",function(){return ue}),Q.d(be,"l",function(){return ke}),Q.d(be,"D",function(){return Se}),Q.d(be,"B",function(){return Ce}),Q.d(be,"b",function(){return ce}),Q.d(be,"S",function(){return pe}),Q.d(be,"o",function(){return se}),Q.d(be,"P",function(){return ae}),Q.d(be,"w",function(){return Oe}),Q.d(be,"c",function(){return Te}),Q.d(be,"y",function(){return We});function ie(oe){return!oe||typeof oe!="string"?!0:oe.trim().length===0}const $=/{(\d+)}/g;function M(oe,...ye){return ye.length===0?oe:oe.replace($,function(we,Ae){const Ue=parseInt(Ae,10);return isNaN(Ue)||Ue<0||Ue>=ye.length?we:ye[Ue]})}function X(oe){return oe.replace(/[<>&]/g,function(ye){switch(ye){case"<":return"<";case">":return">";case"&":return"&";default:return ye}})}function F(oe){return oe.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function U(oe,ye=" "){const we=G(oe,ye);return W(we,ye)}function G(oe,ye){if(!oe||!ye)return oe;const we=ye.length;if(we===0||oe.length===0)return oe;let Ae=0;for(;oe.indexOf(ye,Ae)===Ae;)Ae=Ae+we;return oe.substring(Ae)}function W(oe,ye){if(!oe||!ye)return oe;const we=ye.length,Ae=oe.length;if(we===0||Ae===0)return oe;let Ue=Ae,Ve=-1;for(;!(Ve=oe.lastIndexOf(ye,Ue-1),Ve===-1||Ve+we!==Ue);){if(Ve===0)return"";Ue=Ve}return oe.substring(0,Ue)}function i(oe){return oe.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(oe){return oe.replace(/\*/g,"")}function g(oe,ye,we={}){if(!oe)throw new Error("Cannot create regex from empty string");ye||(oe=F(oe)),we.wholeWord&&(/\B/.test(oe.charAt(0))||(oe="\\b"+oe),/\B/.test(oe.charAt(oe.length-1))||(oe=oe+"\\b"));let Ae="";return we.global&&(Ae+="g"),we.matchCase||(Ae+="i"),we.multiline&&(Ae+="m"),we.unicode&&(Ae+="u"),new RegExp(oe,Ae)}function m(oe){if(oe.source==="^"||oe.source==="^$"||oe.source==="$"||oe.source==="^\\s*$")return!1;const ye=oe.exec("");return!!(ye&&oe.lastIndex===0)}function p(oe){return(oe.global?"g":"")+(oe.ignoreCase?"i":"")+(oe.multiline?"m":"")+(oe.unicode?"u":"")}function l(oe){return oe.split(/\r\n|\r|\n/)}function u(oe){for(let ye=0,we=oe.length;ye=0;we--){const Ae=oe.charCodeAt(we);if(Ae!==32&&Ae!==9)return we}return-1}function h(oe,ye){return oeye?1:0}function s(oe,ye,we=0,Ae=oe.length,Ue=0,Ve=ye.length){for(;weet)return 1}const Ze=Ae-we,$e=Ve-Ue;return Ze<$e?-1:Ze>$e?1:0}function a(oe,ye){return A(oe,ye,0,oe.length,0,ye.length)}function A(oe,ye,we=0,Ae=oe.length,Ue=0,Ve=ye.length){for(;we=128||et>=128)return s(oe.toLowerCase(),ye.toLowerCase(),we,Ae,Ue,Ve);_(tt)&&(tt-=32),_(et)&&(et-=32);const Je=tt-et;if(Je===0)continue;return Je}const Ze=Ae-we,$e=Ve-Ue;return Ze<$e?-1:Ze>$e?1:0}function _(oe){return oe>=97&&oe<=122}function S(oe){return oe>=65&&oe<=90}function L(oe,ye){return oe.length===ye.length&&A(oe,ye)===0}function R(oe,ye){const we=ye.length;return ye.length>oe.length?!1:A(oe,ye,0,we)===0}function C(oe,ye){let we,Ae=Math.min(oe.length,ye.length);for(we=0;we1){const Ae=oe.charCodeAt(ye-2);if(x(Ae))return T(Ae,we)}return we}function N(oe,ye){const we=Ne.getInstance(),Ae=ye,Ue=oe.length,Ve=y(oe,Ue,ye);ye+=Ve>=65536?2:1;let Ze=we.getGraphemeBreakType(Ve);for(;ye=65536?2:1,Ze=tt}return ye-Ae}function B(oe,ye){const we=Ne.getInstance(),Ae=ye,Ue=v(oe,ye);ye-=Ue>=65536?2:1;let Ve=we.getGraphemeBreakType(Ue);for(;ye>0;){const Ze=v(oe,ye),$e=we.getGraphemeBreakType(Ze);if(Te($e,Ve))break;ye-=Ze>=65536?2:1,Ve=$e}return Ae-ye}const O=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function j(oe){return O.test(oe)}const P=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function b(oe){return P.test(oe)}const Y=/^[\t\n\r\x20-\x7E]*$/;function ee(oe){return Y.test(oe)}const le=/[\u2028\u2029]/;function ue(oe){return le.test(oe)}function ke(oe){for(let ye=0,we=oe.length;ye=11904&&oe<=55215||oe>=63744&&oe<=64255||oe>=65281&&oe<=65374}function Ce(oe){return oe>=127462&&oe<=127487||oe===8986||oe===8987||oe===9200||oe===9203||oe>=9728&&oe<=10175||oe===11088||oe===11093||oe>=127744&&oe<=128591||oe>=128640&&oe<=128764||oe>=128992&&oe<=129003||oe>=129280&&oe<=129535||oe>=129648&&oe<=129750}const ce=String.fromCharCode(65279);function pe(oe){return!!(oe&&oe.length>0&&oe.charCodeAt(0)===65279)}function se(oe,ye=!1){return oe?(ye&&(oe=oe.replace(/\\./g,"")),oe.toLowerCase()!==oe):!1}function ae(oe){const ye=90-65+1;return oe=oe%(2*ye),oeye[3*Ae+1])Ae=2*Ae+1;else return ye[3*Ae+2];return 0}}Ne._INSTANCE=null;function De(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function We(oe,ye){if(oe===0)return 0;const we=Le(oe,ye);if(we!==void 0)return we;const Ae=v(ye,oe);return oe-=Be(Ae),oe}function Le(oe,ye){let we=v(ye,oe);for(oe-=Be(we);Ge(we)||we===65039||we===8419;){if(oe===0)return;we=v(ye,oe),oe-=Be(we)}if(!Ce(we))return;if(oe>=0){const Ae=v(ye,oe);Ae===8205&&(oe-=Be(Ae))}return oe}function Be(oe){return oe>=65536?2:1}function Ge(oe){return 127995<=oe&&oe<=127999}},Ot1p:function(st,be,Q){"use strict";var ie=Q("2qtc"),$=Q("kLXV"),M=Q("rAM+"),X=Q("miYZ"),F=Q("tsqr"),U=Q("9og8"),G=Q("tJVT"),W=Q("jrin"),i=Q("WmNS"),D=Q.n(i),g=Q("q1tI"),m=Q.n(g),p=Q("VrN/"),l=Q.n(p),u=Q("bdgK"),f=Q("p77/"),o=Q("Bd2K"),h=Q("ELLl"),s=Q("19Vz"),a=Q("lZu9"),A=Q("+NIl"),_=Q("kSUc"),S=Q("9Bee"),L=function(xe){var Pe=xe.value,ze=Pe===void 0?"":Pe,ot=xe.className,mt=xe.showTextOnly,ft=xe.showLines,wt=xe.style,St=wt===void 0?{}:wt,dt=Object(g.useMemo)(function(){return""},[ze]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:dt}}))},R=Q("0Owb"),C=Q("dejd"),w=Q("C+DQ"),x=Q("1vsH"),c=Q("m3rI"),T=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function y(xe){var Pe=xe.onActionCallback,ze=xe.title,ot=xe.icon,mt=xe.actionName,ft=xe.className,wt=ft===void 0?"":ft,St=xe.children;function dt(){Pe(mt)}return m.a.createElement("a",{title:ze,className:wt,onClick:dt},m.a.createElement("i",{className:"md-iconfont ".concat(ot)}),St)}var v=function(xe){var Pe=xe.watch,ze=xe.showNullButton,ot=xe.onActionCallback,mt=xe.fullScreen,ft=xe.insertTemp,wt=xe.hidetoolBar,St=xe.uuid,dt=xe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.F)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var Ut=[].concat(T,[{title:"".concat(Pe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Pe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!wt&&Ut.map(function(Lt,qt){return m.a.createElement("li",{key:qt},Lt.actionName?m.a.createElement(y,Object(R.a)({},Lt,{onActionCallback:ot})):m.a.createElement("span",{className:"v-line"}))}),ze?m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ot},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ft&&m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ft),onActionCallback:ot},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(y,{icon:"".concat(mt?"icon-shrink":"icon-enlarge"),title:mt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ot})))},N=Q("M8RZ"),B=Q("+L6B"),O=Q("2/Rp"),j=Q("y8nQ"),P=Q("Vl3Y"),b=Q("5NDa"),Y=Q("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},le=function(xe){var Pe=xe.callback,ze=xe.onCancel;function ot(mt){Pe(mt)}return m.a.createElement(P.a,Object(R.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ot}),m.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(Y.a,null)),m.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(Y.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},ue=Q("7ahc"),ke=Q("HmJG"),Se=Q("BjJ7"),Ce=P.a.useForm,ce={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}},se=function(xe){var Pe=xe.callback,ze=xe.onCancel,ot=Ce(),mt=Object(G.a)(ot,1),ft=mt[0];function wt(Ut){Pe(Ut)}function St(Ut,Lt){if(Ut.status===-1){F.b.error(Ut.message);return}ft.setFieldsValue({src:"/api/attachments/".concat(Ut.id),type:Lt.type})}function dt(Ut){var Lt=Ut.target.files[0];Oe(Lt,St)}return m.a.createElement(P.a,Object(R.a)({form:ft},pe,{className:"upload-image-panel",onFinish:wt}),m.a.createElement(P.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(P.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(Y.a,{style:ce})),m.a.createElement(ae,{onFileChange:dt}))),m.a.createElement(P.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(Y.a,{style:{width:264}})),m.a.createElement(P.a.Item,{style:{textAlign:"right"}},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))};function ae(xe){var Pe=xe.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Pe}))}function Oe(xe,Pe){if(!xe)throw new String("\u6CA1\u6709\u6587\u4EF6");var ze=new FormData;ze.append("editormd-image-file",xe),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var ot=new window.XMLHttpRequest;ot.withCredentials=!0,ot.addEventListener("load",function(mt){Pe(JSON.parse(mt.target.responseText),xe)},!1),ot.addEventListener("error",function(mt){console.error(mt)},!1),ot.open("POST","".concat(Se.a,"/api/attachments.json")),ot.send(ze)}var Te=Q("giR+"),Ne=Q("fyUT"),De=Q("7Kak"),We=Q("9yH6"),Le=We.a.Group,Be={margin:"0 8px"},Ge=function(xe){var Pe=xe.callback,ze=xe.onCancel;function ot(mt){Pe(mt)}return m.a.createElement(P.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ot},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Be},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Be},"\u884C\u6570"),m.a.createElement(P.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(Ne.a,null)),m.a.createElement("span",{style:Be},"\u5217\u6570"),m.a.createElement(P.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(Ne.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(P.a.Item,{name:"align"},m.a.createElement(Le,null,m.a.createElement(We.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(We.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(We.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(We.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},oe=Q("ErOA"),ye=Q("7Cbv"),we="link",Ae="upload-image",Ue="code-block",Ve="add-table",Ze="------------",$e={default:Ze,left:":".concat(Ze),center:":".concat(Ze,":"),right:"".concat(Ze,":")},tt=Q("9VGf"),et,Je;function Me(){}var ut=0,nt=1e4,Fe="\u2581",je=` +`),o=this._stacks.get(f)||0;if(this._stacks.set(f,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=u*.5;let h,s=0;for(const[a,A]of this._stacks)(!h||s{const h=this._stacks.get(f)||0;this._stacks.set(f,h-1)}}}class i{constructor(l){var u;this._disposed=!1,this._options=l,this._leakageMon=G>0?new W(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((u=this._options)===null||u===void 0?void 0:u._profName)?new U(this._options._profName):void 0}get event(){return this._event||(this._event=(l,u,f)=>{var o;this._listeners||(this._listeners=new M.a);const h=this._listeners.isEmpty();h&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(u?[l,u]:l);h&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,l,u);const a=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),A=Object($.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const _=this._listeners&&!this._listeners.isEmpty();_||this._options.onLastListenerRemove(this)}});return f instanceof $.b?f.add(A):Array.isArray(f)&&f.push(A),A}),this._event}fire(l){var u,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.a);for(let o of this._listeners)this._deliveryQueue.push([o,l]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,h]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,h):o[0].call(o[1],h)}catch(s){Object(ie.f)(s)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var l,u,f,o,h;this._disposed||(this._disposed=!0,(l=this._listeners)===null||l===void 0||l.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(o=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||o===void 0||o.call(f),(h=this._leakageMon)===null||h===void 0||h.dispose())}}class D extends i{constructor(l){super(l);this._isPaused=0,this._eventQueue=new M.a,this._mergeFn=l==null?void 0:l.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const l=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(l))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(l){this._listeners&&(this._isPaused!==0?this._eventQueue.push(l):super.fire(l))}}class g extends D{constructor(l){var u;super(l);this._delay=(u=l.delay)!==null&&u!==void 0?u:100}fire(l){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(l)}}class m{constructor(){this.buffers=[]}wrapEvent(l){return(u,f,o)=>l(h=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>u.call(f,h)):u.call(f,h)},void 0,o)}bufferEvents(l){const u=[];this.buffers.push(u);const f=l();return this.buffers.pop(),u.forEach(o=>o()),f}}class p{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=$.a.None,this.emitter=new i({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(l){this.inputEvent=l,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=l(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(st,be,Q){"use strict";(function(ie,$){Q.d(be,"b",function(){return f}),Q.d(be,"i",function(){return a}),Q.d(be,"f",function(){return A}),Q.d(be,"d",function(){return _}),Q.d(be,"g",function(){return S}),Q.d(be,"h",function(){return L}),Q.d(be,"c",function(){return R}),Q.d(be,"k",function(){return C}),Q.d(be,"j",function(){return w}),Q.d(be,"a",function(){return x}),Q.d(be,"e",function(){return y});var M;const X="en";let F=!1,U=!1,G=!1,W=!1,i=!1,D=!1,g=!1,m,p=X,l,u;const f=typeof self=="object"?self:typeof ie=="object"?ie:{};let o;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?o=f.vscode.process:typeof $!="undefined"&&(o=$);const h=typeof((M=o==null?void 0:o.versions)===null||M===void 0?void 0:M.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!h)u=navigator.userAgent,F=u.indexOf("Windows")>=0,U=u.indexOf("Macintosh")>=0,g=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=u.indexOf("Linux")>=0,D=!0,m=navigator.language,p=m;else if(typeof o=="object"){F=o.platform==="win32",U=o.platform==="darwin",G=o.platform==="linux",W=G&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,m=X,p=X;const v=o.env.VSCODE_NLS_CONFIG;if(v)try{const N=JSON.parse(v),B=N.availableLanguages["*"];m=N.locale,p=B||X,l=N._translationsConfigFile}catch(N){}i=!0}else console.error("Unable to resolve platform.");let s=0;U?s=1:F?s=3:G&&(s=2);const a=F,A=U,_=G,S=i,L=D,R=g,C=u,w=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let B=[];f.addEventListener("message",j=>{if(j.data&&j.data.vscodeSetImmediateId)for(let P=0,b=B.length;P{const P=++O;B.push({id:P,callback:j}),f.postMessage({vscodeSetImmediateId:P},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const N=Promise.resolve();return B=>N.then(B)}(),x=U||g?2:F?1:3;let c=!0,T=!1;function y(){if(!T){T=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const N=new Uint16Array(v.buffer);c=N[0]===(2<<8)+1}return c}}).call(this,Q("IyRk"),Q("Q2Ig"))},N0LK:function(st,be,Q){"use strict";Q.d(be,"C",function(){return ie}),Q.d(be,"v",function(){return M}),Q.d(be,"s",function(){return X}),Q.d(be,"t",function(){return F}),Q.d(be,"U",function(){return U}),Q.d(be,"J",function(){return G}),Q.d(be,"O",function(){return W}),Q.d(be,"p",function(){return i}),Q.d(be,"T",function(){return D}),Q.d(be,"q",function(){return g}),Q.d(be,"N",function(){return m}),Q.d(be,"M",function(){return p}),Q.d(be,"Q",function(){return l}),Q.d(be,"u",function(){return u}),Q.d(be,"x",function(){return f}),Q.d(be,"I",function(){return o}),Q.d(be,"f",function(){return h}),Q.d(be,"h",function(){return s}),Q.d(be,"g",function(){return a}),Q.d(be,"i",function(){return A}),Q.d(be,"G",function(){return _}),Q.d(be,"H",function(){return S}),Q.d(be,"r",function(){return L}),Q.d(be,"R",function(){return R}),Q.d(be,"d",function(){return C}),Q.d(be,"e",function(){return w}),Q.d(be,"E",function(){return x}),Q.d(be,"F",function(){return c}),Q.d(be,"j",function(){return T}),Q.d(be,"z",function(){return y}),Q.d(be,"K",function(){return N}),Q.d(be,"L",function(){return B}),Q.d(be,"m",function(){return j}),Q.d(be,"k",function(){return b}),Q.d(be,"A",function(){return ee}),Q.d(be,"a",function(){return le}),Q.d(be,"n",function(){return ue}),Q.d(be,"l",function(){return ke}),Q.d(be,"D",function(){return Se}),Q.d(be,"B",function(){return Ce}),Q.d(be,"b",function(){return ce}),Q.d(be,"S",function(){return pe}),Q.d(be,"o",function(){return se}),Q.d(be,"P",function(){return ae}),Q.d(be,"w",function(){return Oe}),Q.d(be,"c",function(){return Te}),Q.d(be,"y",function(){return We});function ie(oe){return!oe||typeof oe!="string"?!0:oe.trim().length===0}const $=/{(\d+)}/g;function M(oe,...ye){return ye.length===0?oe:oe.replace($,function(we,Ae){const Ue=parseInt(Ae,10);return isNaN(Ue)||Ue<0||Ue>=ye.length?we:ye[Ue]})}function X(oe){return oe.replace(/[<>&]/g,function(ye){switch(ye){case"<":return"<";case">":return">";case"&":return"&";default:return ye}})}function F(oe){return oe.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function U(oe,ye=" "){const we=G(oe,ye);return W(we,ye)}function G(oe,ye){if(!oe||!ye)return oe;const we=ye.length;if(we===0||oe.length===0)return oe;let Ae=0;for(;oe.indexOf(ye,Ae)===Ae;)Ae=Ae+we;return oe.substring(Ae)}function W(oe,ye){if(!oe||!ye)return oe;const we=ye.length,Ae=oe.length;if(we===0||Ae===0)return oe;let Ue=Ae,Ve=-1;for(;!(Ve=oe.lastIndexOf(ye,Ue-1),Ve===-1||Ve+we!==Ue);){if(Ve===0)return"";Ue=Ve}return oe.substring(0,Ue)}function i(oe){return oe.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(oe){return oe.replace(/\*/g,"")}function g(oe,ye,we={}){if(!oe)throw new Error("Cannot create regex from empty string");ye||(oe=F(oe)),we.wholeWord&&(/\B/.test(oe.charAt(0))||(oe="\\b"+oe),/\B/.test(oe.charAt(oe.length-1))||(oe=oe+"\\b"));let Ae="";return we.global&&(Ae+="g"),we.matchCase||(Ae+="i"),we.multiline&&(Ae+="m"),we.unicode&&(Ae+="u"),new RegExp(oe,Ae)}function m(oe){if(oe.source==="^"||oe.source==="^$"||oe.source==="$"||oe.source==="^\\s*$")return!1;const ye=oe.exec("");return!!(ye&&oe.lastIndex===0)}function p(oe){return(oe.global?"g":"")+(oe.ignoreCase?"i":"")+(oe.multiline?"m":"")+(oe.unicode?"u":"")}function l(oe){return oe.split(/\r\n|\r|\n/)}function u(oe){for(let ye=0,we=oe.length;ye=0;we--){const Ae=oe.charCodeAt(we);if(Ae!==32&&Ae!==9)return we}return-1}function h(oe,ye){return oeye?1:0}function s(oe,ye,we=0,Ae=oe.length,Ue=0,Ve=ye.length){for(;weet)return 1}const Ze=Ae-we,$e=Ve-Ue;return Ze<$e?-1:Ze>$e?1:0}function a(oe,ye){return A(oe,ye,0,oe.length,0,ye.length)}function A(oe,ye,we=0,Ae=oe.length,Ue=0,Ve=ye.length){for(;we=128||et>=128)return s(oe.toLowerCase(),ye.toLowerCase(),we,Ae,Ue,Ve);_(tt)&&(tt-=32),_(et)&&(et-=32);const Je=tt-et;if(Je===0)continue;return Je}const Ze=Ae-we,$e=Ve-Ue;return Ze<$e?-1:Ze>$e?1:0}function _(oe){return oe>=97&&oe<=122}function S(oe){return oe>=65&&oe<=90}function L(oe,ye){return oe.length===ye.length&&A(oe,ye)===0}function R(oe,ye){const we=ye.length;return ye.length>oe.length?!1:A(oe,ye,0,we)===0}function C(oe,ye){let we,Ae=Math.min(oe.length,ye.length);for(we=0;we1){const Ae=oe.charCodeAt(ye-2);if(x(Ae))return T(Ae,we)}return we}function N(oe,ye){const we=Ne.getInstance(),Ae=ye,Ue=oe.length,Ve=y(oe,Ue,ye);ye+=Ve>=65536?2:1;let Ze=we.getGraphemeBreakType(Ve);for(;ye=65536?2:1,Ze=tt}return ye-Ae}function B(oe,ye){const we=Ne.getInstance(),Ae=ye,Ue=v(oe,ye);ye-=Ue>=65536?2:1;let Ve=we.getGraphemeBreakType(Ue);for(;ye>0;){const Ze=v(oe,ye),$e=we.getGraphemeBreakType(Ze);if(Te($e,Ve))break;ye-=Ze>=65536?2:1,Ve=$e}return Ae-ye}const O=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function j(oe){return O.test(oe)}const P=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function b(oe){return P.test(oe)}const Y=/^[\t\n\r\x20-\x7E]*$/;function ee(oe){return Y.test(oe)}const le=/[\u2028\u2029]/;function ue(oe){return le.test(oe)}function ke(oe){for(let ye=0,we=oe.length;ye=11904&&oe<=55215||oe>=63744&&oe<=64255||oe>=65281&&oe<=65374}function Ce(oe){return oe>=127462&&oe<=127487||oe===8986||oe===8987||oe===9200||oe===9203||oe>=9728&&oe<=10175||oe===11088||oe===11093||oe>=127744&&oe<=128591||oe>=128640&&oe<=128764||oe>=128992&&oe<=129003||oe>=129280&&oe<=129535||oe>=129648&&oe<=129750}const ce=String.fromCharCode(65279);function pe(oe){return!!(oe&&oe.length>0&&oe.charCodeAt(0)===65279)}function se(oe,ye=!1){return oe?(ye&&(oe=oe.replace(/\\./g,"")),oe.toLowerCase()!==oe):!1}function ae(oe){const ye=90-65+1;return oe=oe%(2*ye),oeye[3*Ae+1])Ae=2*Ae+1;else return ye[3*Ae+2];return 0}}Ne._INSTANCE=null;function De(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function We(oe,ye){if(oe===0)return 0;const we=Le(oe,ye);if(we!==void 0)return we;const Ae=v(ye,oe);return oe-=Be(Ae),oe}function Le(oe,ye){let we=v(ye,oe);for(oe-=Be(we);Ge(we)||we===65039||we===8419;){if(oe===0)return;we=v(ye,oe),oe-=Be(we)}if(!Ce(we))return;if(oe>=0){const Ae=v(ye,oe);Ae===8205&&(oe-=Be(Ae))}return oe}function Be(oe){return oe>=65536?2:1}function Ge(oe){return 127995<=oe&&oe<=127999}},Ot1p:function(st,be,Q){"use strict";var ie=Q("2qtc"),$=Q("kLXV"),M=Q("rAM+"),X=Q("miYZ"),F=Q("tsqr"),U=Q("9og8"),G=Q("tJVT"),W=Q("jrin"),i=Q("WmNS"),D=Q.n(i),g=Q("q1tI"),m=Q.n(g),p=Q("VrN/"),l=Q.n(p),u=Q("bdgK"),f=Q("p77/"),o=Q("Bd2K"),h=Q("ELLl"),s=Q("19Vz"),a=Q("lZu9"),A=Q("+NIl"),_=Q("kSUc"),S=Q("9Bee"),L=function(xe){var Pe=xe.value,ze=Pe===void 0?"":Pe,ot=xe.className,mt=xe.showTextOnly,ft=xe.showLines,wt=xe.style,St=wt===void 0?{}:wt,dt=Object(g.useMemo)(function(){return""},[ze]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:dt}}))},R=Q("0Owb"),C=Q("dejd"),w=Q("C+DQ"),x=Q("1vsH"),c=Q("m3rI"),T=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function y(xe){var Pe=xe.onActionCallback,ze=xe.title,ot=xe.icon,mt=xe.actionName,ft=xe.className,wt=ft===void 0?"":ft,St=xe.children;function dt(){Pe(mt)}return m.a.createElement("a",{title:ze,className:wt,onClick:dt},m.a.createElement("i",{className:"md-iconfont ".concat(ot)}),St)}var v=function(xe){var Pe=xe.watch,ze=xe.showNullButton,ot=xe.onActionCallback,mt=xe.fullScreen,ft=xe.insertTemp,wt=xe.hidetoolBar,St=xe.uuid,dt=xe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.F)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var Ut=[].concat(T,[{title:"".concat(Pe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Pe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!wt&&Ut.map(function(Lt,qt){return m.a.createElement("li",{key:qt},Lt.actionName?m.a.createElement(y,Object(R.a)({},Lt,{onActionCallback:ot})):m.a.createElement("span",{className:"v-line"}))}),ze?m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ot},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ft&&m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ft),onActionCallback:ot},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(y,{icon:"".concat(mt?"icon-shrink":"icon-enlarge"),title:mt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ot})))},N=Q("M8RZ"),B=Q("+L6B"),O=Q("2/Rp"),j=Q("y8nQ"),P=Q("Vl3Y"),b=Q("5NDa"),Y=Q("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},le=function(xe){var Pe=xe.callback,ze=xe.onCancel;function ot(mt){Pe(mt)}return m.a.createElement(P.a,Object(R.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ot}),m.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(Y.a,null)),m.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(Y.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},ue=Q("7ahc"),ke=Q("HmJG"),Se=Q("BjJ7"),Ce=P.a.useForm,ce={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}},se=function(xe){var Pe=xe.callback,ze=xe.onCancel,ot=Ce(),mt=Object(G.a)(ot,1),ft=mt[0];function wt(Ut){Pe(Ut)}function St(Ut,Lt){if(Ut.status===-1){F.b.error(Ut.message);return}ft.setFieldsValue({src:"/api/attachments/".concat(Ut.id),type:Lt.type})}function dt(Ut){var Lt=Ut.target.files[0];Oe(Lt,St)}return m.a.createElement(P.a,Object(R.a)({form:ft},pe,{className:"upload-image-panel",onFinish:wt}),m.a.createElement(P.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(P.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(Y.a,{style:ce})),m.a.createElement(ae,{onFileChange:dt}))),m.a.createElement(P.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(Y.a,{style:{width:264}})),m.a.createElement(P.a.Item,{style:{textAlign:"right"}},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))};function ae(xe){var Pe=xe.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Pe}))}function Oe(xe,Pe){if(!xe)throw new String("\u6CA1\u6709\u6587\u4EF6");var ze=new FormData;ze.append("editormd-image-file",xe),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var ot=new window.XMLHttpRequest;ot.withCredentials=!0,ot.addEventListener("load",function(mt){Pe(JSON.parse(mt.target.responseText),xe)},!1),ot.addEventListener("error",function(mt){console.error(mt)},!1),ot.open("POST","".concat(Se.a,"/api/attachments.json")),ot.send(ze)}var Te=Q("giR+"),Ne=Q("fyUT"),De=Q("7Kak"),We=Q("9yH6"),Le=We.a.Group,Be={margin:"0 8px"},Ge=function(xe){var Pe=xe.callback,ze=xe.onCancel;function ot(mt){Pe(mt)}return m.a.createElement(P.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ot},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Be},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Be},"\u884C\u6570"),m.a.createElement(P.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(Ne.a,null)),m.a.createElement("span",{style:Be},"\u5217\u6570"),m.a.createElement(P.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(Ne.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(P.a.Item,{name:"align"},m.a.createElement(Le,null,m.a.createElement(We.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(We.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(We.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(We.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(O.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},oe=Q("ErOA"),ye=Q("7Cbv"),we="link",Ae="upload-image",Ue="code-block",Ve="add-table",Ze="------------",$e={default:Ze,left:":".concat(Ze),center:":".concat(Ze,":"),right:"".concat(Ze,":")},tt=Q("9VGf"),et,Je;function Me(){}var ut=0,rt=1e4,Fe="\u2581",je=` **\u6A21\u677F\u6807\u9898** -\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ee(xe){return/^\d+$/.test(xe)?"".concat(xe,"px"):xe}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,_e=ge?"Cmd":"Ctrl",ne=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],re=(et={},Object(W.a)(et,_e+"-B","bold"),Object(W.a)(et,_e+"-I","italic"),et),he=(Je={},Object(W.a)(Je,we,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Je,Ue,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Je,Ae,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Je,Ve,"\u6DFB\u52A0\u8868\u683C"),Je),fe=be.a=function(xe){var Pe=xe.defaultValue,ze=Pe===void 0?"":Pe,ot=xe.onChange,mt=xe.width,ft=mt===void 0?"100%":mt,wt=xe.height,St=wt===void 0?400:wt,dt=xe.miniToolbar,Ut=dt===void 0?!1:dt,Lt=xe.isFocus,qt=Lt===void 0?!1:Lt,Qt=xe.watch,It=xe.insertTemp,Ci=xe.mode,Ki=Ci===void 0?"markdown":Ci,yt=xe.id,Li=yt===void 0?"markdown-editor-id":yt,bt=xe.showResizeBar,xt=bt===void 0?!1:bt,Ft=xe.noStorage,ti=Ft===void 0?!1:Ft,di=xe.showNullButton,Pt=di===void 0?!1:di,ct=xe.hidetoolBar,Ui=ct===void 0?!1:ct,Vt=xe.fullScreen,Jt=Vt===void 0?!1:Vt,Ot=xe.onBlur,li=xe.onCMBeforeChange,Ii=xe.onFullScreen,Xi=xe.className,Qe=Xi===void 0?"":Xi,Ct=xe.disablePaste,mn=Ct===void 0?!1:Ct,gn=xe.placeholder,vn=gn===void 0?"":gn,yn=xe.values,V=yn===void 0?"":yn,E=Object(g.useState)(null),I=Object(G.a)(E,2),H=I[0],q=I[1],z=Object(g.useState)(ze),ve=Object(G.a)(z,2),Ke=ve[0],it=ve[1],pt=Object(g.useState)(Qt),Ye=Object(G.a)(pt,2),_t=Ye[0],jt=Ye[1],$t=Object(g.useState)(Jt),ji=Object(G.a)($t,2),Ei=ji[0],xi=ji[1],Qi=Object(g.useState)(""),Dn=Object(G.a)(Qi,2),ci=Dn[0],zi=Dn[1],un=Object(g.useState)(0),hn=Object(G.a)(un,2),Hi=hn[0],kn=hn[1],bn=Object(g.useState)(St),zn=Object(G.a)(bn,2),Vn=zn[0],Zi=zn[1],$i=Object(g.useState)(!1),_n=Object(G.a)($i,2),dr=_n[0],En=_n[1],ni=Object(g.useRef)(Object(ye.a)()),Ht=Object(g.useRef)(!1),yi=Object(g.useRef)(),kt=Object(g.useRef)(),ai=Object(g.useRef)(),Kt=Object(g.useRef)(),rn=Object(g.useRef)(),fi=function(){var gt=Object(U.a)(D.a.mark(function At(){var Et,Dt;return D.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Object(oe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ni.current}});case 2:Dt=Yt.sent,Dt!=null&&(Et=Dt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",H,kt),Dt.attachments.map(function(Nt){Nt.content_type.indexOf("image")>-1?H.replaceSelection("![,](/api/attachments/".concat(Nt.id,"?type=").concat(Nt.content_type,")")):Nt.content_type.indexOf("video")>-1?H.replaceSelection('')):Nt.content_type.indexOf("pdf")>-1?H.replaceSelection('
      ').concat(Nt.name,"")):H.replaceSelection("[".concat(Nt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}));case 4:case"end":return Yt.stop()}},At)}));return function(){return gt.apply(this,arguments)}}();Object(g.useEffect)(function(){it(V),H==null||H.setValue(V)},[V]),Object(g.useEffect)(function(){Ii==null||Ii(Ei)},[Ei]),Object(g.useEffect)(function(){if(kt.current){var gt=l.a.fromTextArea(kt.current,{mode:Ki,lineNumbers:!Ut,lineWrapping:!0,value:ze,autoCloseTags:!0,autoCloseBrackets:!0});qt&>.focus();function At(Et,Dt){if(mn){Dt.preventDefault();return}var Bt=Dt.clipboardData;if(Bt){var Yt=Bt.types.toString(),Nt=Bt.items;if(Yt==="Files"||Bt.types.indexOf("Files")>-1){if(Dt.preventDefault(),Ki=="stex")return;try{var ui,Di=Nt[1];((ui=Nt[0])===null||ui===void 0?void 0:ui.kind)==="file"&&(Di=Nt[0]);var Mt=Di.getAsFile(),dn=Mt.name.split(".").pop();Oe(Mt,function(Wt){if(Wt.id){var ki,Ti,Ji;(Mt==null||((ki=Mt.type)===null||ki===void 0)?void 0:ki.indexOf("image"))>-1?gt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Mt==null||((Ti=Mt.type)===null||Ti===void 0)?void 0:Ti.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Ji=Mt.type)===null||Ji===void 0)?void 0:Ji.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):ne.includes(dn)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})}catch(Wt){F.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return gt.on("paste",At),gt.on("dragleave",function(Et,Dt){ai.current.classList.remove("mouse-hover-md")}),gt.on("dragover",function(Et,Dt){ai.current.classList.add("mouse-hover-md")}),gt.on("drop",function(Et,Dt){ai.current.classList.add("mouse-hover-md");var Bt;if(Bt=Dt.dataTransfer.files,Bt.length>0){Dt.preventDefault(),Dt.stopPropagation();for(var Yt=function(Di){var Mt=Bt[Di],dn=Mt.name.split(".").pop();Oe(Mt,function(Wt){if(Wt.id){var ki,Ti,Ji;(Mt==null||((ki=Mt.type)===null||ki===void 0)?void 0:ki.indexOf("image"))>-1?gt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Mt==null||((Ti=Mt.type)===null||Ti===void 0)?void 0:Ti.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Ji=Mt.type)===null||Ji===void 0)?void 0:Ji.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):ne.includes(dn)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})},Nt=0;Nt0||Nt.target.offsetWidth>0)&&(Ai(),H.setSize("100%","100%"),H.refresh())}}catch(ui){Bt.e(ui)}finally{Bt.f()}});return Et.observe(kt.current.parentElement),Et}if(H){var At=gt();return function(){At.unobserve(kt.current.parentElement)}}},[H,Ai]),Object(g.useEffect)(function(){if(H){for(var gt=[],At=function(){var Nt=Dt[Et];Bt=Object(G.a)(Nt,2);var ui=Bt[0],Di=Bt[1],Mt=Object(W.a)({},ui,function(){Yn(Di)});gt.push(Mt),H.addKeyMap(Mt)},Et=0,Dt=Object.entries(re);Et0){var gt=new Date().getTime(),At=window.sessionStorage.getItem(Li);gt>=Hi+nt&&(!At||At!==Ke)&&(window.sessionStorage.setItem(Li,Ke),En(!0))}},nt),Object(g.useEffect)(function(){jt(Qt)},[H,Qt]),Object(g.useEffect)(function(){H&&(qt&&H.focus())},[H,qt]),Object(g.useEffect)(function(){if(_t&&H){var gt=H.getScrollerElement();function At(Et){var Dt=Et.target;if(rn.current){var Bt=Dt.scrollTop/Dt.scrollHeight;rn.current.scrollTop=rn.current.scrollHeight*Bt}}return gt.addEventListener("scroll",At),function(){gt.removeEventListener("scroll",At)}}},[H,_t]),Object(g.useEffect)(function(){if(H&&li){function gt(At,Et){li(At,Et)}return H.on("beforeChange",gt),function(){H.off("beforeChange",gt)}}},[H,li]),Object(g.useEffect)(function(){if(H&&Ot){function gt(){Ot(H.getValue())}return H.on("blur",gt),function(){H.off("blur",gt)}}},[H,Ot]),Object(g.useEffect)(function(){if(H){function gt(At){var Et=At.getValue();it(Et),kn(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ot&&ot(Et)}return H.on("change",gt),function(){H.off("change",gt)}}},[H,ot]),Object(g.useEffect)(function(){H&&(ze==null?(H.setValue(""),it("")):ze!==H.getValue()&&(H.setValue(ze),it(ze),H.setCursor(H.lineCount(),0)))},[H,ze]);var Yn=Object(g.useCallback)(function(gt){var At=H.getCursor(),Et=H.getSelection(),Dt=Et.split(` +\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ee(xe){return/^\d+$/.test(xe)?"".concat(xe,"px"):xe}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,_e=ge?"Cmd":"Ctrl",re=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ne=(et={},Object(W.a)(et,_e+"-B","bold"),Object(W.a)(et,_e+"-I","italic"),et),he=(Je={},Object(W.a)(Je,we,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Je,Ue,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Je,Ae,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Je,Ve,"\u6DFB\u52A0\u8868\u683C"),Je),fe=be.a=function(xe){var Pe=xe.defaultValue,ze=Pe===void 0?"":Pe,ot=xe.onChange,mt=xe.width,ft=mt===void 0?"100%":mt,wt=xe.height,St=wt===void 0?400:wt,dt=xe.miniToolbar,Ut=dt===void 0?!1:dt,Lt=xe.isFocus,qt=Lt===void 0?!1:Lt,Qt=xe.watch,It=xe.insertTemp,Ci=xe.mode,Ki=Ci===void 0?"markdown":Ci,yt=xe.id,Li=yt===void 0?"markdown-editor-id":yt,bt=xe.showResizeBar,xt=bt===void 0?!1:bt,Ft=xe.noStorage,ti=Ft===void 0?!1:Ft,di=xe.showNullButton,Pt=di===void 0?!1:di,ct=xe.hidetoolBar,Ui=ct===void 0?!1:ct,Vt=xe.fullScreen,Jt=Vt===void 0?!1:Vt,Ot=xe.onBlur,li=xe.onCMBeforeChange,Ii=xe.onFullScreen,Xi=xe.className,Qe=Xi===void 0?"":Xi,Ct=xe.disablePaste,pr=Ct===void 0?!1:Ct,mr=xe.placeholder,gr=mr===void 0?"":mr,vr=xe.values,V=vr===void 0?"":vr,E=Object(g.useState)(null),I=Object(G.a)(E,2),H=I[0],q=I[1],z=Object(g.useState)(ze),ve=Object(G.a)(z,2),Ke=ve[0],it=ve[1],pt=Object(g.useState)(Qt),Ye=Object(G.a)(pt,2),_t=Ye[0],jt=Ye[1],$t=Object(g.useState)(Jt),ji=Object(G.a)($t,2),Ei=ji[0],xi=ji[1],Qi=Object(g.useState)(""),Ir=Object(G.a)(Qi,2),ci=Ir[0],zi=Ir[1],lr=Object(g.useState)(0),ur=Object(G.a)(lr,2),Hi=ur[0],Dr=ur[1],yr=Object(g.useState)(St),Kr=Object(G.a)(yr,2),zr=Kr[0],Zi=Kr[1],$i=Object(g.useState)(!1),br=Object(G.a)($i,2),dn=br[0],_r=br[1],ri=Object(g.useRef)(Object(ye.a)()),Ht=Object(g.useRef)(!1),yi=Object(g.useRef)(),kt=Object(g.useRef)(),ai=Object(g.useRef)(),Kt=Object(g.useRef)(),rr=Object(g.useRef)(),fi=function(){var gt=Object(U.a)(D.a.mark(function At(){var Et,Dt;return D.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Object(oe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ri.current}});case 2:Dt=Yt.sent,Dt!=null&&(Et=Dt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",H,kt),Dt.attachments.map(function(Nt){Nt.content_type.indexOf("image")>-1?H.replaceSelection("![,](/api/attachments/".concat(Nt.id,"?type=").concat(Nt.content_type,")")):Nt.content_type.indexOf("video")>-1?H.replaceSelection('')):Nt.content_type.indexOf("pdf")>-1?H.replaceSelection('').concat(Nt.name,"")):H.replaceSelection("[".concat(Nt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}));case 4:case"end":return Yt.stop()}},At)}));return function(){return gt.apply(this,arguments)}}();Object(g.useEffect)(function(){it(V),H==null||H.setValue(V)},[V]),Object(g.useEffect)(function(){Ii==null||Ii(Ei)},[Ei]),Object(g.useEffect)(function(){if(kt.current){var gt=l.a.fromTextArea(kt.current,{mode:Ki,lineNumbers:!Ut,lineWrapping:!0,value:ze,autoCloseTags:!0,autoCloseBrackets:!0});qt&>.focus();function At(Et,Dt){if(pr){Dt.preventDefault();return}var Bt=Dt.clipboardData;if(Bt){var Yt=Bt.types.toString(),Nt=Bt.items;if(Yt==="Files"||Bt.types.indexOf("Files")>-1){if(Dt.preventDefault(),Ki=="stex")return;try{var ui,Di=Nt[1];((ui=Nt[0])===null||ui===void 0?void 0:ui.kind)==="file"&&(Di=Nt[0]);var Mt=Di.getAsFile(),hr=Mt.name.split(".").pop();Oe(Mt,function(Wt){if(Wt.id){var ki,Ti,Ji;(Mt==null||((ki=Mt.type)===null||ki===void 0)?void 0:ki.indexOf("image"))>-1?gt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Mt==null||((Ti=Mt.type)===null||Ti===void 0)?void 0:Ti.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Ji=Mt.type)===null||Ji===void 0)?void 0:Ji.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):re.includes(hr)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})}catch(Wt){F.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return gt.on("paste",At),gt.on("dragleave",function(Et,Dt){ai.current.classList.remove("mouse-hover-md")}),gt.on("dragover",function(Et,Dt){ai.current.classList.add("mouse-hover-md")}),gt.on("drop",function(Et,Dt){ai.current.classList.add("mouse-hover-md");var Bt;if(Bt=Dt.dataTransfer.files,Bt.length>0){Dt.preventDefault(),Dt.stopPropagation();for(var Yt=function(Di){var Mt=Bt[Di],hr=Mt.name.split(".").pop();Oe(Mt,function(Wt){if(Wt.id){var ki,Ti,Ji;(Mt==null||((ki=Mt.type)===null||ki===void 0)?void 0:ki.indexOf("image"))>-1?gt.replaceSelection("![,](/api/attachments/".concat(Wt.id,"?type=").concat(Wt.content_type,")")):(Mt==null||((Ti=Mt.type)===null||Ti===void 0)?void 0:Ti.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Ji=Mt.type)===null||Ji===void 0)?void 0:Ji.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):re.includes(hr)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})},Nt=0;Nt0||Nt.target.offsetWidth>0)&&(Ai(),H.setSize("100%","100%"),H.refresh())}}catch(ui){Bt.e(ui)}finally{Bt.f()}});return Et.observe(kt.current.parentElement),Et}if(H){var At=gt();return function(){At.unobserve(kt.current.parentElement)}}},[H,Ai]),Object(g.useEffect)(function(){if(H){for(var gt=[],At=function(){var Nt=Dt[Et];Bt=Object(G.a)(Nt,2);var ui=Bt[0],Di=Bt[1],Mt=Object(W.a)({},ui,function(){Vr(Di)});gt.push(Mt),H.addKeyMap(Mt)},Et=0,Dt=Object.entries(ne);Et0){var gt=new Date().getTime(),At=window.sessionStorage.getItem(Li);gt>=Hi+rt&&(!At||At!==Ke)&&(window.sessionStorage.setItem(Li,Ke),_r(!0))}},rt),Object(g.useEffect)(function(){jt(Qt)},[H,Qt]),Object(g.useEffect)(function(){H&&(qt&&H.focus())},[H,qt]),Object(g.useEffect)(function(){if(_t&&H){var gt=H.getScrollerElement();function At(Et){var Dt=Et.target;if(rr.current){var Bt=Dt.scrollTop/Dt.scrollHeight;rr.current.scrollTop=rr.current.scrollHeight*Bt}}return gt.addEventListener("scroll",At),function(){gt.removeEventListener("scroll",At)}}},[H,_t]),Object(g.useEffect)(function(){if(H&&li){function gt(At,Et){li(At,Et)}return H.on("beforeChange",gt),function(){H.off("beforeChange",gt)}}},[H,li]),Object(g.useEffect)(function(){if(H&&Ot){function gt(){Ot(H.getValue())}return H.on("blur",gt),function(){H.off("blur",gt)}}},[H,Ot]),Object(g.useEffect)(function(){if(H){function gt(At){var Et=At.getValue();it(Et),Dr(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ot&&ot(Et)}return H.on("change",gt),function(){H.off("change",gt)}}},[H,ot]),Object(g.useEffect)(function(){H&&(ze==null?(H.setValue(""),it("")):ze!==H.getValue()&&(H.setValue(ze),it(ze),H.setCursor(H.lineCount(),0)))},[H,ze]);var Vr=Object(g.useCallback)(function(gt){var At=H.getCursor(),Et=H.getSelection(),Dt=Et.split(` `);switch(gt){case"bold":return H.replaceSelection("**"+Et+"**"),Et===""&&H.setCursor(At.line,At.ch+2),H.focus();case"italic":return H.replaceSelection("*"+Et+"*"),Et===""&&H.setCursor(At.line,At.ch+1),H.focus();case"code":return H.replaceSelection("`"+Et+"`"),Et===""&&H.setCursor(At.line,At.ch+1),H.focus();case"inline-latex":return H.replaceSelection("`$$"+Et+"$$`"),Et===""&&H.setCursor(At.line,At.ch+3),H.focus();case"latex":return H.replaceSelection("```latex\n"+Et+"\n```"),H.setCursor(At.line+1,Et.length+1),H.focus();case"line-break":return H.replaceSelection(`
      `),H.focus();case"list-ul":return Et===""?H.replaceSelection("- "+Et):H.replaceSelection(Dt.map(function(Bt){return Bt===""?"":"- ".concat(Bt)}).join(` `)),H.focus();case"list-ol":return Et===""?H.replaceSelection("1. "+Et):H.replaceSelection(Dt.map(function(Bt,Yt){return Bt===""?"":"".concat(Yt+1,". ").concat(Bt)}).join(` -`)),H.focus();case"add-null-ch":return Et===""&&H.setCursor(At.line,At.ch+1),H.replaceSelection(Fe),H.focus();case"inster-template-1":return Et===""&&H.setCursor(At.line,At.ch),H.replaceSelection(je),H.focus();case"eraser":return H.setValue(""),H.focus();case"trigger-watch":return jt(!_t),H.focus();case"trigger-full-screen":return xi(!Ei),H.focus();case we:zi(we);return;case Ue:zi(Ue);return;case Ae:zi(Ae);return;case Ve:zi(Ve);return;default:throw new Error}},[H,_t,Ei]),xn=Object(g.useCallback)(function(gt){zi("");switch(ci){case we:var At=gt.title,Et=gt.link;return H.replaceSelection("[".concat(At,"](").concat(Et,")")),H.focus();case Ue:var Dt=gt.language,Bt=gt.content;return H.replaceSelection(["```"+Dt,Bt,"```"].join(` -`)),H.focus();case Ae:var Yt=gt.src,Nt=gt.alt;return Nt?H.replaceSelection("![ ".concat(Nt," ]( ").concat(Yt,' "').concat(Nt,'" )')):H.replaceSelection("![,](".concat(Yt,")")),H.focus();case Ve:for(var ui=gt.row,Di=gt.col,Mt=gt.align,dn=` -`,Wt=0;Wt300&&(ui=300);var Di=St+ui+"px";Zi(Di)}}return gt.addEventListener("mousedown",Dt),document.addEventListener("mousemove",Yt),document.addEventListener("mouseup",Bt),function(){gt.removeEventListener("mousedown",Dt),document.removeEventListener("mousemove",Yt),document.removeEventListener("mouseup",Bt)}}},[H,Kt]),Object(g.useEffect)(function(){Zi(St)},[St]);var an=Ee(ft),fr=Ee(Vn),qi={width:an,height:fr},pr=Object(g.useMemo)(function(){if(Hi){var gt=new Date(Hi),At=gt.getHours(),Et=gt.getMinutes(),Dt=gt.getSeconds();return At=At<10?"0"+At:At,Et=Et<10?"0"+Et:Et,Dt=Dt<10?"0"+Dt:Dt,"".concat(At,":").concat(Et,":").concat(Dt)}return 0},[Hi]);function jr(){window.sessionStorage.removeItem(Li),En(!1),kn(0)}function Mn(){En(!1),kn(0),H.setValue(window.sessionStorage.getItem(Li))}function ua(gt,At){var Et=H.getValue();Et=Et.replace(gt,At),it(Et),H==null||H.setValue(Et)}return m.a.createElement(g.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:ai},m.a.createElement("div",{className:"markdown-editor-container ".concat(Qe," ").concat(_t?"on-preview":""," ").concat(Ut?"mini":""," ").concat(Ei?"full-screen":""),style:qi},m.a.createElement(v,{insertTemp:It,watch:_t,fullScreen:Ei,showNullButton:Pt,onActionCallback:Yn,hidetoolBar:Ui,uuid:ni.current,setOpenPhones:function(){Ht.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:kt,placeholder:vn})),_t?m.a.createElement("div",{ref:rn,className:"preview-container"},Ki==="stex"&&m.a.createElement(L,{value:Ke}),Ki!=="stex"&&m.a.createElement(S.a,{edit:!0,value:Ke,replaces:ua})):null))),xt?m.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,m.a.createElement(N.a,null,he[ci]?m.a.createElement($.a,{centered:!0,title:he[ci],visible:!0,onCancel:Tn,footer:null,className:"markdown-popup-form"},cr):null))}},RxwV:function(st,be,Q){"use strict";var ie=Q("q1tI"),$=Q("uciX"),M=Q("2W6z"),X=Q.n(M),F=Q("4IlW"),U=Q("uK0f"),G=Q.n(U);function W(ce,pe){if(ce===pe)return!0;if(!ce||!pe)return!1;var se=ce.length;if(pe.length!==se)return!1;for(var ae=0;ae0;(Ve||Te.isLeaf===!1)&&(Ae+=" ".concat(We,"-menu-item-expand"),Te.loading||(Ue=ie.createElement("span",{className:"".concat(We,"-menu-item-expand-icon")},Be))),Le==="hover"&&(Ve||Te.isLeaf===!1)&&(we={onMouseEnter:this.delayOnSelect.bind(this,oe),onMouseLeave:this.delayOnSelect.bind(this),onClick:oe}),this.isActiveOption(Te,Ne)&&(Ae+=" ".concat(We,"-menu-item-active"),we.ref=this.saveMenuItem(Ne)),Te.disabled&&(Ae+=" ".concat(We,"-menu-item-disabled"));var Ze=null;Te.loading&&(Ae+=" ".concat(We,"-menu-item-loading"),Ze=Ge||null);var $e="";return"title"in Te?$e=Te.title:typeof Te[this.getFieldName("label")]=="string"&&($e=Te[this.getFieldName("label")]),ie.createElement("li",Object.assign({key:Te[this.getFieldName("value")],className:Ae,title:$e},we,{role:"menuitem",onMouseDown:function(et){return et.preventDefault()}}),Te[this.getFieldName("label")],Ue,Ze)}},{key:"getActiveOptions",value:function(Te){var Ne=this,De=this.props.options,We=Te||this.props.activeValue;return G()(De,function(Le,Be){return Le[Ne.getFieldName("value")]===We[Be]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var Te=this,Ne=this.props.options,De=this.getActiveOptions().map(function(We){return We[Te.getFieldName("children")]}).filter(function(We){return!!We});return De.unshift(Ne),De}},{key:"delayOnSelect",value:function(Te){for(var Ne=this,De=arguments.length,We=new Array(De>1?De-1:0),Le=1;Le=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ce,ae))continue;se[ae]=ce[ae]}}return se}function C(ce,pe){if(ce==null)return{};var se={},ae=Object.keys(ce),Oe,Te;for(Te=0;Te=0)continue;se[Oe]=ce[Oe]}return se}function w(ce){return y(ce)||T(ce)||c(ce)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +`)),H.focus();case"add-null-ch":return Et===""&&H.setCursor(At.line,At.ch+1),H.replaceSelection(Fe),H.focus();case"inster-template-1":return Et===""&&H.setCursor(At.line,At.ch),H.replaceSelection(je),H.focus();case"eraser":return H.setValue(""),H.focus();case"trigger-watch":return jt(!_t),H.focus();case"trigger-full-screen":return xi(!Ei),H.focus();case we:zi(we);return;case Ue:zi(Ue);return;case Ae:zi(Ae);return;case Ve:zi(Ve);return;default:throw new Error}},[H,_t,Ei]),Er=Object(g.useCallback)(function(gt){zi("");switch(ci){case we:var At=gt.title,Et=gt.link;return H.replaceSelection("[".concat(At,"](").concat(Et,")")),H.focus();case Ue:var Dt=gt.language,Bt=gt.content;return H.replaceSelection(["```"+Dt,Bt,"```"].join(` +`)),H.focus();case Ae:var Yt=gt.src,Nt=gt.alt;return Nt?H.replaceSelection("![ ".concat(Nt," ]( ").concat(Yt,' "').concat(Nt,'" )')):H.replaceSelection("![,](".concat(Yt,")")),H.focus();case Ve:for(var ui=gt.row,Di=gt.col,Mt=gt.align,hr=` +`,Wt=0;Wt300&&(ui=300);var Di=St+ui+"px";Zi(Di)}}return gt.addEventListener("mousedown",Dt),document.addEventListener("mousemove",Yt),document.addEventListener("mouseup",Bt),function(){gt.removeEventListener("mousedown",Dt),document.removeEventListener("mousemove",Yt),document.removeEventListener("mouseup",Bt)}}},[H,Kt]),Object(g.useEffect)(function(){Zi(St)},[St]);var nr=Ee(ft),fn=Ee(zr),qi={width:nr,height:fn},pn=Object(g.useMemo)(function(){if(Hi){var gt=new Date(Hi),At=gt.getHours(),Et=gt.getMinutes(),Dt=gt.getSeconds();return At=At<10?"0"+At:At,Et=Et<10?"0"+Et:Et,Dt=Dt<10?"0"+Dt:Dt,"".concat(At,":").concat(Et,":").concat(Dt)}return 0},[Hi]);function jn(){window.sessionStorage.removeItem(Li),_r(!1),Dr(0)}function kr(){_r(!1),Dr(0),H.setValue(window.sessionStorage.getItem(Li))}function ua(gt,At){var Et=H.getValue();Et=Et.replace(gt,At),it(Et),H==null||H.setValue(Et)}return m.a.createElement(g.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:ai},m.a.createElement("div",{className:"markdown-editor-container ".concat(Qe," ").concat(_t?"on-preview":""," ").concat(Ut?"mini":""," ").concat(Ei?"full-screen":""),style:qi},m.a.createElement(v,{insertTemp:It,watch:_t,fullScreen:Ei,showNullButton:Pt,onActionCallback:Vr,hidetoolBar:Ui,uuid:ri.current,setOpenPhones:function(){Ht.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:kt,placeholder:gr})),_t?m.a.createElement("div",{ref:rr,className:"preview-container"},Ki==="stex"&&m.a.createElement(L,{value:Ke}),Ki!=="stex"&&m.a.createElement(S.a,{edit:!0,value:Ke,replaces:ua})):null))),xt?m.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,m.a.createElement(N.a,null,he[ci]?m.a.createElement($.a,{centered:!0,title:he[ci],visible:!0,onCancel:xr,footer:null,className:"markdown-popup-form"},cn):null))}},RxwV:function(st,be,Q){"use strict";var ie=Q("q1tI"),$=Q("uciX"),M=Q("2W6z"),X=Q.n(M),F=Q("4IlW"),U=Q("uK0f"),G=Q.n(U);function W(ce,pe){if(ce===pe)return!0;if(!ce||!pe)return!1;var se=ce.length;if(pe.length!==se)return!1;for(var ae=0;ae0;(Ve||Te.isLeaf===!1)&&(Ae+=" ".concat(We,"-menu-item-expand"),Te.loading||(Ue=ie.createElement("span",{className:"".concat(We,"-menu-item-expand-icon")},Be))),Le==="hover"&&(Ve||Te.isLeaf===!1)&&(we={onMouseEnter:this.delayOnSelect.bind(this,oe),onMouseLeave:this.delayOnSelect.bind(this),onClick:oe}),this.isActiveOption(Te,Ne)&&(Ae+=" ".concat(We,"-menu-item-active"),we.ref=this.saveMenuItem(Ne)),Te.disabled&&(Ae+=" ".concat(We,"-menu-item-disabled"));var Ze=null;Te.loading&&(Ae+=" ".concat(We,"-menu-item-loading"),Ze=Ge||null);var $e="";return"title"in Te?$e=Te.title:typeof Te[this.getFieldName("label")]=="string"&&($e=Te[this.getFieldName("label")]),ie.createElement("li",Object.assign({key:Te[this.getFieldName("value")],className:Ae,title:$e},we,{role:"menuitem",onMouseDown:function(et){return et.preventDefault()}}),Te[this.getFieldName("label")],Ue,Ze)}},{key:"getActiveOptions",value:function(Te){var Ne=this,De=this.props.options,We=Te||this.props.activeValue;return G()(De,function(Le,Be){return Le[Ne.getFieldName("value")]===We[Be]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var Te=this,Ne=this.props.options,De=this.getActiveOptions().map(function(We){return We[Te.getFieldName("children")]}).filter(function(We){return!!We});return De.unshift(Ne),De}},{key:"delayOnSelect",value:function(Te){for(var Ne=this,De=arguments.length,We=new Array(De>1?De-1:0),Le=1;Le=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ce,ae))continue;se[ae]=ce[ae]}}return se}function C(ce,pe){if(ce==null)return{};var se={},ae=Object.keys(ce),Oe,Te;for(Te=0;Te=0)continue;se[Oe]=ce[Oe]}return se}function w(ce){return y(ce)||T(ce)||c(ce)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(ce,pe){if(!ce)return;if(typeof ce=="string")return v(ce,pe);var se=Object.prototype.toString.call(ce).slice(8,-1);if(se==="Object"&&ce.constructor&&(se=ce.constructor.name),se==="Map"||se==="Set")return Array.from(ce);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return v(ce,pe)}function T(ce){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(ce))return Array.from(ce)}function y(ce){if(Array.isArray(ce))return v(ce)}function v(ce,pe){(pe==null||pe>ce.length)&&(pe=ce.length);for(var se=0,ae=new Array(pe);se=Ge.length?0:ye):(ye-=1,ye=ye<0?Ge.length-1:ye):ye=0,Le[Be]=Ge[ye][Te.getFieldName("value")]}else if(De.keyCode===F.a.LEFT||De.keyCode===F.a.BACKSPACE)De.preventDefault(),Le.splice(Le.length-1,1);else if(De.keyCode===F.a.RIGHT)De.preventDefault(),Ge[oe]&&Ge[oe][Te.getFieldName("children")]&&Le.push(Ge[oe][Te.getFieldName("children")][0][Te.getFieldName("value")]);else if(De.keyCode===F.a.ESC||De.keyCode===F.a.TAB){Te.setPopupVisible(!1);return}(!Le||Le.length===0)&&Te.setPopupVisible(!1);var we=Te.getActiveOptions(Le),Ae=we[we.length-1];Te.handleMenuSelect(Ae,we.length-1,De),Te.props.onKeyDown&&Te.props.onKeyDown(De)},Te.saveTrigger=function(De){Te.trigger=De};var Ne=[];return"value"in Oe?Ne=Oe.value||[]:"defaultValue"in Oe&&(Ne=Oe.defaultValue||[]),X()(!("filedNames"in Oe),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),Te.state={popupVisible:Oe.popupVisible,activeValue:Ne,value:Ne,prevProps:Oe},Te.defaultFieldNames={label:"label",value:"value",children:"children"},Te}return O(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(Te){var Ne=this.defaultFieldNames,De=this.props,We=De.fieldNames,Le=De.filedNames;return"filedNames"in this.props?Le[Te]||Ne[Te]:We[Te]||Ne[Te]}},{key:"getFieldNames",value:function(){var Te=this.props,Ne=Te.fieldNames,De=Te.filedNames;return"filedNames"in this.props?De:Ne}},{key:"getCurrentLevelOptions",value:function(){var Te=this,Ne=this.props.options,De=Ne===void 0?[]:Ne,We=this.state.activeValue,Le=We===void 0?[]:We,Be=G()(De,function(Ge,oe){return Ge[Te.getFieldName("value")]===Le[oe]},{childrenKeyName:this.getFieldName("children")});return Be[Be.length-2]?Be[Be.length-2][this.getFieldName("children")]:w(De).filter(function(Ge){return!Ge.disabled})}},{key:"getActiveOptions",value:function(Te){var Ne=this;return G()(this.props.options||[],function(De,We){return De[Ne.getFieldName("value")]===Te[We]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var Te=this.props,Ne=Te.prefixCls,De=Te.transitionName,We=Te.popupClassName,Le=Te.options,Be=Le===void 0?[]:Le,Ge=Te.disabled,oe=Te.builtinPlacements,ye=Te.popupPlacement,we=Te.children,Ae=Te.dropdownRender,Ue=R(Te,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Ve=ie.createElement("div",null),Ze="";Be&&Be.length>0?Ve=ie.createElement(A,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ze=" ".concat(Ne,"-menus-empty");var $e=Ve;return Ae&&($e=Ae(Ve)),ie.createElement($.a,Object.assign({ref:this.saveTrigger},Ue,{popupPlacement:ye,builtinPlacements:oe,popupTransitionName:De,action:Ge?[]:["click"],popupVisible:Ge?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Ne,"-menus"),popupClassName:We+Ze,popup:$e}),ie.cloneElement(we,{onKeyDown:this.handleKeyDown,tabIndex:Ge?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(Te,Ne){var De=Ne.prevProps,We=De===void 0?{}:De,Le={prevProps:Te};return"value"in Te&&!W(We.value,Te.value)&&(Le.value=Te.value||[],"loadData"in Te||(Le.activeValue=Te.value||[])),"popupVisible"in Te&&(Le.popupVisible=Te.popupVisible),Le}}]),ae}(ie.Component);return ce.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:S,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},ce}(),Se=ke,Ce=be.a=Se},SJMd:function(st,be){/** * @license * Copyright (C) 2006 Google Inc. @@ -324,12 +324,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Q,ie,$,M=!1,X,F;window.PR_SHOULD_USE_CONTINUATION=!0;var U,G;(function(){var W=window,i=["break,continue,do,else,for,if,return,while"],D=[i,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[g,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],l=[g,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],u="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",h=[i,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],s=[i,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],a=[i,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[m,l,p,f,o,h,s,a],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,S="str",L="kwd",R="com",C="typ",w="lit",x="pun",c="pln",T="tag",y="dec",v="src",N="atn",B="atv",O="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function P(Le){for(var Be=0,Ge=!1,oe=!1,ye=0,we=Le.length;ye122||(ne<65||_e>90||ut.push([Math.max(65,_e)|32,Math.min(ne,90)|32]),ne<97||_e>122||ut.push([Math.max(97,_e)&~32,Math.min(ne,122)&~32]))}}ut.sort(function(xe,Pe){return xe[0]-Pe[0]||Pe[1]-xe[1]});for(var re=[],he=[],je=0;jefe[0]&&(fe[1]+1>fe[0]&&Fe.push("-"),Fe.push(Ze(fe[1])))}return Fe.push("]"),Fe.join("")}function tt(Je){for(var Me=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),ut=Me.length,nt=[],Fe=0,je=0;Fe=2&&_e==="["?Me[Fe]=$e(Ee):_e!=="\\"&&(Me[Fe]=Ee.replace(/[a-zA-Z]/g,function(he){var fe=he.charCodeAt(0);return"["+String.fromCharCode(fe&~32,fe|32)+"]"}))}return Me.join("")}for(var et=[],ye=0,we=Le.length;ye|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function P(Le){for(var Be=0,Ge=!1,oe=!1,ye=0,we=Le.length;ye122||(re<65||_e>90||ut.push([Math.max(65,_e)|32,Math.min(re,90)|32]),re<97||_e>122||ut.push([Math.max(97,_e)&~32,Math.min(re,122)&~32]))}}ut.sort(function(xe,Pe){return xe[0]-Pe[0]||Pe[1]-xe[1]});for(var ne=[],he=[],je=0;jefe[0]&&(fe[1]+1>fe[0]&&Fe.push("-"),Fe.push(Ze(fe[1])))}return Fe.push("]"),Fe.join("")}function tt(Je){for(var Me=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),ut=Me.length,rt=[],Fe=0,je=0;Fe=2&&_e==="["?Me[Fe]=$e(Ee):_e!=="\\"&&(Me[Fe]=Ee.replace(/[a-zA-Z]/g,function(he){var fe=he.charCodeAt(0);return"["+String.fromCharCode(fe&~32,fe|32)+"]"}))}return Me.join("")}for(var et=[],ye=0,we=Le.length;ye=0;)Ge[et.charAt(Je)]=tt;var Me=tt[1],ut=""+Me;Ve.hasOwnProperty(ut)||(Ue.push(Me),Ve[ut]=null)}Ue.push(/[\0-\uffff]/),oe=P(Ue)})();var ye=Be.length,we=function(Ae){for(var Ue=Ae.sourceCode,Ve=Ae.basePos,Ze=Ae.sourceNode,$e=[Ve,c],tt=0,et=Ue.match(oe)||[],Je={},Me=0,ut=et.length;Me=5&&Fe.substring(0,5)==="lang-",Ee&&!(je&&typeof je[1]=="string")&&(Ee=!1,Fe=v),Ee||(Je[nt]=Fe)}var ne=tt;if(tt+=nt.length,!Ee)$e.push(Ve+ne,Fe);else{var re=je[1],he=nt.indexOf(re),fe=he+re.length;je[2]&&(fe=nt.length-je[2].length,he=fe-re.length);var xe=Fe.substring(5);Y(Ze,Ve+ne,nt.substring(0,he),we,$e),Y(Ze,Ve+ne+he,re,ae(xe,re),$e),Y(Ze,Ve+ne+fe,nt.substring(fe),we,$e)}}Ae.decorations=$e};return we}function ke(Le){var Be=[],Ge=[];Le.tripleQuotedStrings?Be.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Le.multiLineStrings?Be.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Be.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Le.verbatimStrings&&Ge.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var oe=Le.hashComments;oe&&(Le.cStyleComments?(oe>1?Be.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Be.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ge.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Be.push([R,/^#[^\r\n]*/,null,"#"])),Le.cStyleComments&&(Ge.push([R,/^\/\/[^\r\n]*/,null]),Ge.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ye=Le.regexLiterals;if(ye){var we=ye>1?"":` +`):et=et.replace(/[ \t\r\n]+/g," "),oe[Ae]=et,we[Ae<<1]=ye,ye+=et.length,we[Ae++<<1|1]=Ve)}}return Ue(Le),{sourceCode:oe.join("").replace(/\n$/,""),spans:we}}function Y(Le,Be,Ge,oe,ye){if(!Ge)return;var we={sourceNode:Le,pre:1,langExtension:null,numberLines:null,sourceCode:Ge,spans:null,basePos:Be,decorations:null};oe(we),ye.push.apply(ye,we.decorations)}var ee=/\S/;function le(Le){for(var Be=void 0,Ge=Le.firstChild;Ge;Ge=Ge.nextSibling){var oe=Ge.nodeType;Be=oe===1?Be?Le:Ge:oe===3&&ee.test(Ge.nodeValue)?Le:Be}return Be===Le?void 0:Be}function ue(Le,Be){var Ge={},oe;(function(){for(var Ae=Le.concat(Be),Ue=[],Ve={},Ze=0,$e=Ae.length;Ze<$e;++Ze){var tt=Ae[Ze],et=tt[3];if(et)for(var Je=et.length;--Je>=0;)Ge[et.charAt(Je)]=tt;var Me=tt[1],ut=""+Me;Ve.hasOwnProperty(ut)||(Ue.push(Me),Ve[ut]=null)}Ue.push(/[\0-\uffff]/),oe=P(Ue)})();var ye=Be.length,we=function(Ae){for(var Ue=Ae.sourceCode,Ve=Ae.basePos,Ze=Ae.sourceNode,$e=[Ve,c],tt=0,et=Ue.match(oe)||[],Je={},Me=0,ut=et.length;Me=5&&Fe.substring(0,5)==="lang-",Ee&&!(je&&typeof je[1]=="string")&&(Ee=!1,Fe=v),Ee||(Je[rt]=Fe)}var re=tt;if(tt+=rt.length,!Ee)$e.push(Ve+re,Fe);else{var ne=je[1],he=rt.indexOf(ne),fe=he+ne.length;je[2]&&(fe=rt.length-je[2].length,he=fe-ne.length);var xe=Fe.substring(5);Y(Ze,Ve+re,rt.substring(0,he),we,$e),Y(Ze,Ve+re+he,ne,ae(xe,ne),$e),Y(Ze,Ve+re+fe,rt.substring(fe),we,$e)}}Ae.decorations=$e};return we}function ke(Le){var Be=[],Ge=[];Le.tripleQuotedStrings?Be.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Le.multiLineStrings?Be.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Be.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Le.verbatimStrings&&Ge.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var oe=Le.hashComments;oe&&(Le.cStyleComments?(oe>1?Be.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Be.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ge.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Be.push([R,/^#[^\r\n]*/,null,"#"])),Le.cStyleComments&&(Ge.push([R,/^\/\/[^\r\n]*/,null]),Ge.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ye=Le.regexLiterals;if(ye){var we=ye>1?"":` \r`,Ae=we?".":"[\\S\\s]",Ue="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";Ge.push(["lang-regex",RegExp("^"+j+"("+Ue+")")])}var Ve=Le.types;Ve&&Ge.push([C,Ve]);var Ze=(""+Le.keywords).replace(/^ | $/g,"");Ze.length&&Ge.push([L,new RegExp("^(?:"+Ze.replace(/[\s,]+/g,"|")+")\\b"),null]),Be.push([c,/^\s+/,null,` \r - \xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return Le.regexLiterals&&($e+="(?!s*/)"),Ge.push([w,/^@[a-z_$][a-z_$@0-9]*/i,null],[C,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[w,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[x,new RegExp($e),null]),ue(Be,Ge)}var Se=ke({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(Le,Be,Ge){for(var oe=/(?:^|\s)nocode(?:\s|$)/,ye=/\r\n?|\n/,we=Le.ownerDocument,Ae=we.createElement("li");Le.firstChild;)Ae.appendChild(Le.firstChild);var Ue=[Ae];function Ve(Me){var ut=Me.nodeType;if(ut==1&&!oe.test(Me.className))if(Me.nodeName==="br")Ze(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var nt=Me.firstChild;nt;nt=nt.nextSibling)Ve(nt);else if((ut==3||ut==4)&&Ge){var Fe=Me.nodeValue,je=Fe.match(ye);if(je){var Ee=Fe.substring(0,je.index);Me.nodeValue=Ee;var ge=Fe.substring(je.index+je[0].length);if(ge){var _e=Me.parentNode;_e.insertBefore(we.createTextNode(ge),Me.nextSibling)}Ze(Me),Ee||Me.parentNode.removeChild(Me)}}}function Ze(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function ut(je,Ee){var ge=Ee?je.cloneNode(!1):je,_e=je.parentNode;if(_e){var ne=ut(_e,1),re=je.nextSibling;ne.appendChild(ge);for(var he=re;he;he=re)re=he.nextSibling,ne.appendChild(he)}return ge}for(var nt=ut(Me.nextSibling,0),Fe;(Fe=nt.parentNode)&&Fe.nodeType===1;)nt=Fe;Ue.push(nt)}for(var $e=0;$e=_e&&(Ve+=2),we>=ne&&(tt+=2)}}finally{Fe&&(Fe.style.display=je)}}var pe={};function se(Le,Be){for(var Ge=Be.length;--Ge>=0;){var oe=Be[Ge];pe.hasOwnProperty(oe)?W.console&&console.warn("cannot override language handler %s",oe):pe[oe]=Le}}function ae(Le,Be){return Le&&pe.hasOwnProperty(Le)||(Le=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),se(ue([[c,/^[\s]+/,null,` \r -`],[B,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[T,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[x,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),se(ue([],[[B,/^[\s\S]+/]]),["uq.val"]),se(ke({keywords:m,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),se(ke({keywords:"null,true,false"}),["json"]),se(ke({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),se(ke({keywords:p,cStyleComments:!0}),["java"]),se(ke({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),se(ke({keywords:h,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),se(ke({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),se(ke({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),se(ke({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),se(ke({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),se(ue([],[[S,/^[\s\S]+/]]),["regex"]);function Oe(Le){var Be=Le.langExtension;try{var Ge=b(Le.sourceNode,Le.pre),oe=Ge.sourceCode;Le.sourceCode=oe,Le.spans=Ge.spans,Le.basePos=0,ae(Be,oe)(Le),ce(Le)}catch(ye){W.console&&console.log(ye&&ye.stack||ye)}}function Te(Le,Be,Ge){var oe=Ge||!1,ye=Be||null,we=document.createElement("div");we.innerHTML="
      "+Le+"
      ",we=we.firstChild,oe&&Ce(we,oe,!0);var Ae={langExtension:ye,numberLines:oe,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Oe(Ae),we.innerHTML}function Ne(Le,Be){var Ge=Be||document.body,oe=Ge.ownerDocument||document;function ye(ge){return Ge.getElementsByTagName(ge)}for(var we=[ye("pre"),ye("code"),ye("xmp")],Ae=[],Ue=0;Ue=0),F.set("isFirefox",X.indexOf("Firefox")>=0),F.set("isChrome",X.indexOf("Chrome")>=0),F.set("isSafari",X.indexOf("Safari")>=0);const U=Object.prototype.hasOwnProperty;class G{static has(O){return m.create(O)}static equals(O,j){return p.create(O,j)}static regex(O,j){return S.create(O,j)}static not(O){return o.create(O)}static and(...O){return C.create(O,null)}static or(...O){return w.create(O,null,!0)}static deserialize(O,j=!1){return O?this._deserializeOrExpression(O,j):void 0}static _deserializeOrExpression(O,j){let P=O.split("||");return w.create(P.map(b=>this._deserializeAndExpression(b,j)),null,!0)}static _deserializeAndExpression(O,j){let P=O.split("&&");return C.create(P.map(b=>this._deserializeOne(b,j)),null)}static _deserializeOne(O,j){if(O=O.trim(),O.indexOf("!=")>=0){let P=O.split("!=");return f.create(P[0].trim(),this._deserializeValue(P[1],j))}if(O.indexOf("==")>=0){let P=O.split("==");return p.create(P[0].trim(),this._deserializeValue(P[1],j))}if(O.indexOf("=~")>=0){let P=O.split("=~");return S.create(P[0].trim(),this._deserializeRegexValue(P[1],j))}if(O.indexOf(" in ")>=0){let P=O.split(" in ");return l.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(O)){const P=O.split(">=");return a.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(O)){const P=O.split(">");return s.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(O)){const P=O.split("<=");return _.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(O)){const P=O.split("<");return A.create(P[0].trim(),P[1].trim())}return/^\!\s*/.test(O)?o.create(O.substr(1).trim()):m.create(O)}static _deserializeValue(O,j){if(O=O.trim(),O==="true")return!0;if(O==="false")return!1;let P=/^'([^']*)'$/.exec(O);return P?P[1].trim():O}static _deserializeRegexValue(O,j){if(Object($.C)(O)){if(j)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let P=O.indexOf("/"),b=O.lastIndexOf("/");if(P===b||P<0){if(j)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let Y=O.slice(P+1,b),ee=O[b+1]==="i"?"i":"";try{return new RegExp(Y,ee)}catch(le){if(j)throw new Error(`bad regexp-value '${O}', parse error: ${le}`);return console.warn(`bad regexp-value '${O}', parse error: ${le}`),null}}}function W(O,j){const P=O?O.substituteConstants():void 0,b=j?j.substituteConstants():void 0;return!P&&!b?!0:!P||!b?!1:P.equals(b)}function i(O,j){return O.cmp(j)}class D{constructor(){this.type=0}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}D.INSTANCE=new D;class g{constructor(){this.type=1}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}g.INSTANCE=new g;class m{constructor(O,j){this.key=O,this.negated=j,this.type=2}static create(O,j=null){const P=F.get(O);return typeof P=="boolean"?P?g.INSTANCE:D.INSTANCE:new m(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:y(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=F.get(this.key);return typeof O=="boolean"?O?g.INSTANCE:D.INSTANCE:this}evaluate(O){return!!O.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class p{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=4}static create(O,j,P=null){if(typeof j=="boolean")return j?m.create(O,P):o.create(O,P);const b=F.get(O);if(typeof b=="boolean"){const Y=b?"true":"false";return j===Y?g.INSTANCE:D.INSTANCE}return new p(O,j,P)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=F.get(this.key);if(typeof O=="boolean"){const j=O?"true":"false";return this.value===j?g.INSTANCE:D.INSTANCE}return this}evaluate(O){return O.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class l{constructor(O,j){this.key=O,this.valueKey=j,this.type=10,this.negated=null}static create(O,j){return new l(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.valueKey,O.key,O.valueKey)}equals(O){return O.type===this.type?this.key===O.key&&this.valueKey===O.valueKey:!1}substituteConstants(){return this}evaluate(O){const j=O.getValue(this.valueKey),P=O.getValue(this.key);return Array.isArray(j)?j.indexOf(P)>=0:typeof P=="string"&&typeof j=="object"&&j!==null?U.call(j,P):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(O){this._actual=O,this.type=11}static create(O){return new u(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=5}static create(O,j,P=null){if(typeof j=="boolean")return j?o.create(O,P):m.create(O,P);const b=F.get(O);if(typeof b=="boolean"){const Y=b?"true":"false";return j===Y?D.INSTANCE:g.INSTANCE}return new f(O,j,P)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=F.get(this.key);if(typeof O=="boolean"){const j=O?"true":"false";return this.value===j?D.INSTANCE:g.INSTANCE}return this}evaluate(O){return O.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class o{constructor(O,j){this.key=O,this.negated=j,this.type=3}static create(O,j=null){const P=F.get(O);return typeof P=="boolean"?P?D.INSTANCE:g.INSTANCE:new o(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:y(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=F.get(this.key);return typeof O=="boolean"?O?D.INSTANCE:g.INSTANCE:this}evaluate(O){return!O.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function h(O,j){if(typeof O=="string"){const P=parseFloat(O);isNaN(P)||(O=P)}return typeof O=="string"||typeof O=="number"?j(O):D.INSTANCE}class s{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=12}static create(O,j,P=null){return h(j,b=>new s(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class a{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=13}static create(O,j,P=null){return h(j,b=>new a(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class A{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=14}static create(O,j,P=null){return h(j,b=>new A(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))new _(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class S{constructor(O,j){this.key=O,this.regexp=j,this.type=7,this.negated=null}static create(O,j){return new S(O,j)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.keyO.key)return 1;const j=this.regexp?this.regexp.source:"",P=O.regexp?O.regexp.source:"";return jP?1:0}equals(O){if(O.type===this.type){const j=this.regexp?this.regexp.source:"",P=O.regexp?O.regexp.source:"";return this.key===O.key&&j===P}return!1}substituteConstants(){return this}evaluate(O){let j=O.getValue(this.key);return this.regexp?this.regexp.test(j):!1}serialize(){const O=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${O}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(O){this._actual=O,this.type=8}static create(O){return new L(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(O){let j=null;for(let P=0,b=O.length;PO.expr.length)return 1;for(let j=0,P=this.expr.length;j1;){const Y=P[P.length-1];if(Y.type!==9)break;P.pop();const ee=P.pop(),le=P.length===0,ue=w.create(Y.expr.map(ke=>C.create([ke,ee],null)),null,le);ue&&(P.push(ue),P.sort(i))}return P.length===1?P[0]:new C(P,j)}serialize(){return this.expr.map(O=>O.serialize()).join(" && ")}keys(){const O=[];for(let j of this.expr)O.push(...j.keys());return O}negate(){if(!this.negated){const O=[];for(let j of this.expr)O.push(j.negate());this.negated=w.create(O,this,!0)}return this.negated}}class w{constructor(O,j){this.expr=O,this.negated=j,this.type=9}static create(O,j,P){return w._normalizeArr(O,j,P)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.lengthO.expr.length)return 1;for(let j=0,P=this.expr.length;jO.serialize()).join(" || ")}keys(){const O=[];for(let j of this.expr)O.push(...j.keys());return O}negate(){if(!this.negated){let O=[];for(let j of this.expr)O.push(j.negate());for(;O.length>1;){const j=O.shift(),P=O.shift(),b=[];for(const ee of B(j))for(const le of B(P))b.push(C.create([ee,le],null));const Y=O.length===0;O.unshift(w.create(b,null,Y))}this.negated=O[0]}return this.negated}}class x extends m{constructor(O,j,P){super(O,null);this._defaultValue=j,typeof P=="object"?x._info.push(Object.assign(Object.assign({},P),{key:O})):P!==!0&&x._info.push({key:O,description:P,type:j!=null?typeof j:void 0})}static all(){return x._info.values()}bindTo(O){return O.createKey(this.key,this._defaultValue)}getValue(O){return O.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(O){return p.create(this.key,O)}}x._info=[];const c=Object(M.c)("contextKeyService"),T="setContext";function y(O,j){return Oj?1:0}function v(O,j,P,b){return OP?1:jb?1:0}function N(O,j){if(j.type===6&&O.type!==9&&O.type!==6){for(const Y of j.expr)if(O.equals(Y))return!0}const P=O.negate(),b=B(P).concat(B(j));b.sort(i);for(let Y=0;Y=0;l--)if(this.__items[l].match(p))return!0;return!1},D.prototype.set_indent=function(p,l){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(p){this.__items.push(p);var l=p.lastIndexOf(` + \xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return Le.regexLiterals&&($e+="(?!s*/)"),Ge.push([w,/^@[a-z_$][a-z_$@0-9]*/i,null],[C,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[w,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[x,new RegExp($e),null]),ue(Be,Ge)}var Se=ke({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(Le,Be,Ge){for(var oe=/(?:^|\s)nocode(?:\s|$)/,ye=/\r\n?|\n/,we=Le.ownerDocument,Ae=we.createElement("li");Le.firstChild;)Ae.appendChild(Le.firstChild);var Ue=[Ae];function Ve(Me){var ut=Me.nodeType;if(ut==1&&!oe.test(Me.className))if(Me.nodeName==="br")Ze(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var rt=Me.firstChild;rt;rt=rt.nextSibling)Ve(rt);else if((ut==3||ut==4)&&Ge){var Fe=Me.nodeValue,je=Fe.match(ye);if(je){var Ee=Fe.substring(0,je.index);Me.nodeValue=Ee;var ge=Fe.substring(je.index+je[0].length);if(ge){var _e=Me.parentNode;_e.insertBefore(we.createTextNode(ge),Me.nextSibling)}Ze(Me),Ee||Me.parentNode.removeChild(Me)}}}function Ze(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function ut(je,Ee){var ge=Ee?je.cloneNode(!1):je,_e=je.parentNode;if(_e){var re=ut(_e,1),ne=je.nextSibling;re.appendChild(ge);for(var he=ne;he;he=ne)ne=he.nextSibling,re.appendChild(he)}return ge}for(var rt=ut(Me.nextSibling,0),Fe;(Fe=rt.parentNode)&&Fe.nodeType===1;)rt=Fe;Ue.push(rt)}for(var $e=0;$e=_e&&(Ve+=2),we>=re&&(tt+=2)}}finally{Fe&&(Fe.style.display=je)}}var pe={};function se(Le,Be){for(var Ge=Be.length;--Ge>=0;){var oe=Be[Ge];pe.hasOwnProperty(oe)?W.console&&console.warn("cannot override language handler %s",oe):pe[oe]=Le}}function ae(Le,Be){return Le&&pe.hasOwnProperty(Le)||(Le=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),se(ue([[c,/^[\s]+/,null,` \r +`],[B,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[T,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[x,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),se(ue([],[[B,/^[\s\S]+/]]),["uq.val"]),se(ke({keywords:m,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),se(ke({keywords:"null,true,false"}),["json"]),se(ke({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),se(ke({keywords:p,cStyleComments:!0}),["java"]),se(ke({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),se(ke({keywords:h,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),se(ke({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),se(ke({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),se(ke({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),se(ke({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),se(ue([],[[S,/^[\s\S]+/]]),["regex"]);function Oe(Le){var Be=Le.langExtension;try{var Ge=b(Le.sourceNode,Le.pre),oe=Ge.sourceCode;Le.sourceCode=oe,Le.spans=Ge.spans,Le.basePos=0,ae(Be,oe)(Le),ce(Le)}catch(ye){W.console&&console.log(ye&&ye.stack||ye)}}function Te(Le,Be,Ge){var oe=Ge||!1,ye=Be||null,we=document.createElement("div");we.innerHTML="
      "+Le+"
      ",we=we.firstChild,oe&&Ce(we,oe,!0);var Ae={langExtension:ye,numberLines:oe,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Oe(Ae),we.innerHTML}function Ne(Le,Be){var Ge=Be||document.body,oe=Ge.ownerDocument||document;function ye(ge){return Ge.getElementsByTagName(ge)}for(var we=[ye("pre"),ye("code"),ye("xmp")],Ae=[],Ue=0;Ue=0),F.set("isFirefox",X.indexOf("Firefox")>=0),F.set("isChrome",X.indexOf("Chrome")>=0),F.set("isSafari",X.indexOf("Safari")>=0);const U=Object.prototype.hasOwnProperty;class G{static has(O){return m.create(O)}static equals(O,j){return p.create(O,j)}static regex(O,j){return S.create(O,j)}static not(O){return o.create(O)}static and(...O){return C.create(O,null)}static or(...O){return w.create(O,null,!0)}static deserialize(O,j=!1){return O?this._deserializeOrExpression(O,j):void 0}static _deserializeOrExpression(O,j){let P=O.split("||");return w.create(P.map(b=>this._deserializeAndExpression(b,j)),null,!0)}static _deserializeAndExpression(O,j){let P=O.split("&&");return C.create(P.map(b=>this._deserializeOne(b,j)),null)}static _deserializeOne(O,j){if(O=O.trim(),O.indexOf("!=")>=0){let P=O.split("!=");return f.create(P[0].trim(),this._deserializeValue(P[1],j))}if(O.indexOf("==")>=0){let P=O.split("==");return p.create(P[0].trim(),this._deserializeValue(P[1],j))}if(O.indexOf("=~")>=0){let P=O.split("=~");return S.create(P[0].trim(),this._deserializeRegexValue(P[1],j))}if(O.indexOf(" in ")>=0){let P=O.split(" in ");return l.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(O)){const P=O.split(">=");return a.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(O)){const P=O.split(">");return s.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(O)){const P=O.split("<=");return _.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(O)){const P=O.split("<");return A.create(P[0].trim(),P[1].trim())}return/^\!\s*/.test(O)?o.create(O.substr(1).trim()):m.create(O)}static _deserializeValue(O,j){if(O=O.trim(),O==="true")return!0;if(O==="false")return!1;let P=/^'([^']*)'$/.exec(O);return P?P[1].trim():O}static _deserializeRegexValue(O,j){if(Object($.C)(O)){if(j)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let P=O.indexOf("/"),b=O.lastIndexOf("/");if(P===b||P<0){if(j)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let Y=O.slice(P+1,b),ee=O[b+1]==="i"?"i":"";try{return new RegExp(Y,ee)}catch(le){if(j)throw new Error(`bad regexp-value '${O}', parse error: ${le}`);return console.warn(`bad regexp-value '${O}', parse error: ${le}`),null}}}function W(O,j){const P=O?O.substituteConstants():void 0,b=j?j.substituteConstants():void 0;return!P&&!b?!0:!P||!b?!1:P.equals(b)}function i(O,j){return O.cmp(j)}class D{constructor(){this.type=0}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}D.INSTANCE=new D;class g{constructor(){this.type=1}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}g.INSTANCE=new g;class m{constructor(O,j){this.key=O,this.negated=j,this.type=2}static create(O,j=null){const P=F.get(O);return typeof P=="boolean"?P?g.INSTANCE:D.INSTANCE:new m(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:y(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=F.get(this.key);return typeof O=="boolean"?O?g.INSTANCE:D.INSTANCE:this}evaluate(O){return!!O.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class p{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=4}static create(O,j,P=null){if(typeof j=="boolean")return j?m.create(O,P):o.create(O,P);const b=F.get(O);if(typeof b=="boolean"){const Y=b?"true":"false";return j===Y?g.INSTANCE:D.INSTANCE}return new p(O,j,P)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=F.get(this.key);if(typeof O=="boolean"){const j=O?"true":"false";return this.value===j?g.INSTANCE:D.INSTANCE}return this}evaluate(O){return O.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class l{constructor(O,j){this.key=O,this.valueKey=j,this.type=10,this.negated=null}static create(O,j){return new l(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.valueKey,O.key,O.valueKey)}equals(O){return O.type===this.type?this.key===O.key&&this.valueKey===O.valueKey:!1}substituteConstants(){return this}evaluate(O){const j=O.getValue(this.valueKey),P=O.getValue(this.key);return Array.isArray(j)?j.indexOf(P)>=0:typeof P=="string"&&typeof j=="object"&&j!==null?U.call(j,P):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(O){this._actual=O,this.type=11}static create(O){return new u(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=5}static create(O,j,P=null){if(typeof j=="boolean")return j?o.create(O,P):m.create(O,P);const b=F.get(O);if(typeof b=="boolean"){const Y=b?"true":"false";return j===Y?D.INSTANCE:g.INSTANCE}return new f(O,j,P)}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=F.get(this.key);if(typeof O=="boolean"){const j=O?"true":"false";return this.value===j?D.INSTANCE:g.INSTANCE}return this}evaluate(O){return O.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class o{constructor(O,j){this.key=O,this.negated=j,this.type=3}static create(O,j=null){const P=F.get(O);return typeof P=="boolean"?P?D.INSTANCE:g.INSTANCE:new o(O,j)}cmp(O){return O.type!==this.type?this.type-O.type:y(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=F.get(this.key);return typeof O=="boolean"?O?D.INSTANCE:g.INSTANCE:this}evaluate(O){return!O.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function h(O,j){if(typeof O=="string"){const P=parseFloat(O);isNaN(P)||(O=P)}return typeof O=="string"||typeof O=="number"?j(O):D.INSTANCE}class s{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=12}static create(O,j,P=null){return h(j,b=>new s(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class a{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=13}static create(O,j,P=null){return h(j,b=>new a(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class A{constructor(O,j,P){this.key=O,this.value=j,this.negated=P,this.type=14}static create(O,j,P=null){return h(j,b=>new A(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))new _(O,b,P))}cmp(O){return O.type!==this.type?this.type-O.type:v(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class S{constructor(O,j){this.key=O,this.regexp=j,this.type=7,this.negated=null}static create(O,j){return new S(O,j)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.keyO.key)return 1;const j=this.regexp?this.regexp.source:"",P=O.regexp?O.regexp.source:"";return jP?1:0}equals(O){if(O.type===this.type){const j=this.regexp?this.regexp.source:"",P=O.regexp?O.regexp.source:"";return this.key===O.key&&j===P}return!1}substituteConstants(){return this}evaluate(O){let j=O.getValue(this.key);return this.regexp?this.regexp.test(j):!1}serialize(){const O=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${O}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(O){this._actual=O,this.type=8}static create(O){return new L(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(O){let j=null;for(let P=0,b=O.length;PO.expr.length)return 1;for(let j=0,P=this.expr.length;j1;){const Y=P[P.length-1];if(Y.type!==9)break;P.pop();const ee=P.pop(),le=P.length===0,ue=w.create(Y.expr.map(ke=>C.create([ke,ee],null)),null,le);ue&&(P.push(ue),P.sort(i))}return P.length===1?P[0]:new C(P,j)}serialize(){return this.expr.map(O=>O.serialize()).join(" && ")}keys(){const O=[];for(let j of this.expr)O.push(...j.keys());return O}negate(){if(!this.negated){const O=[];for(let j of this.expr)O.push(j.negate());this.negated=w.create(O,this,!0)}return this.negated}}class w{constructor(O,j){this.expr=O,this.negated=j,this.type=9}static create(O,j,P){return w._normalizeArr(O,j,P)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.lengthO.expr.length)return 1;for(let j=0,P=this.expr.length;jO.serialize()).join(" || ")}keys(){const O=[];for(let j of this.expr)O.push(...j.keys());return O}negate(){if(!this.negated){let O=[];for(let j of this.expr)O.push(j.negate());for(;O.length>1;){const j=O.shift(),P=O.shift(),b=[];for(const ee of B(j))for(const le of B(P))b.push(C.create([ee,le],null));const Y=O.length===0;O.unshift(w.create(b,null,Y))}this.negated=O[0]}return this.negated}}class x extends m{constructor(O,j,P){super(O,null);this._defaultValue=j,typeof P=="object"?x._info.push(Object.assign(Object.assign({},P),{key:O})):P!==!0&&x._info.push({key:O,description:P,type:j!=null?typeof j:void 0})}static all(){return x._info.values()}bindTo(O){return O.createKey(this.key,this._defaultValue)}getValue(O){return O.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(O){return p.create(this.key,O)}}x._info=[];const c=Object(M.c)("contextKeyService"),T="setContext";function y(O,j){return Oj?1:0}function v(O,j,P,b){return OP?1:jb?1:0}function N(O,j){if(j.type===6&&O.type!==9&&O.type!==6){for(const Y of j.expr)if(O.equals(Y))return!0}const P=O.negate(),b=B(P).concat(B(j));b.sort(i);for(let Y=0;Y=0;l--)if(this.__items[l].match(p))return!0;return!1},D.prototype.set_indent=function(p,l){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(p){this.__items.push(p);var l=p.lastIndexOf(` `);l!==-1?this.__character_count=p.length-l:this.__character_count+=p.length},D.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function g(p,l){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),l=l||"",p.indent_level>0&&(l=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}g.prototype.get_indent_size=function(p,l){var u=this.__base_string_length;return l=l||0,p<0&&(u=0),u+=p*this.__indent_size,u+=l,u},g.prototype.get_indent_string=function(p,l){var u=this.__base_string;return l=l||0,p<0&&(p=0,u=""),l+=p*this.__indent_size,this.__ensure_cache(l),u+=this.__cache[l],u},g.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var p=this.__cache.length,l=0,u="";this.__indent_size&&p>=this.__indent_size&&(l=Math.floor(p/this.__indent_size),p-=l*this.__indent_size,u=new Array(l+1).join(this.__indent_string)),p&&(u+=new Array(p+1).join(" ")),this.__cache.push(u)};function m(p,l){this.__indent_cache=new g(p,l),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,l){return this.__indent_cache.get_indent_string(p,l)},m.prototype.get_indent_size=function(p,l){return this.__indent_cache.get_indent_size(p,l)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` `&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(` `);return p!==` @@ -343,30 +343,30 @@ You passed in: '`+this.raw_options[p]+"'");return f},D.prototype._is_valid_selec `&&((C===0||C0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,R=this._options.eol;R==="auto"&&(R=` `,L&&o.test(L||"")&&(R=L.match(o)[0])),L=L.replace(h,` `);var C=L.match(/^[\t ]*/)[0];this._output=new p(this._options,C),this._input=new l(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,x=!1,c=!1,T=!1,y=!1,v=!1,N=!1,B=this._ch,O=!1,j,P,b;j=this._input.read(a),P=j!=="",b=B,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),B=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(A),ee=f.get_directives(Y);ee&&ee.ignore==="start"&&(Y+=f.readIgnored(this._input)),this.print_string(Y),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var le=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);le.match(/[ :]$/)&&(le=this.eatString(": ").replace(/\s$/,""),this.print_string(le),this._output.space_before_token=!0),le=le.replace(/\s$/,""),le==="extend"?y=!0:le==="import"&&(v=!0),le in this.NESTED_AT_RULE?(this._nestedLevel+=1,le in this.CONDITIONAL_GROUP_RULE&&(T=!0)):!x&&w===0&&le.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),T?(T=!1,x=this._indentLevel>=this._nestedLevel):x=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&x&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(b==="("?this._output.space_before_token=!1:b!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),b==="{"&&this._output.trim(!0),v=!1,y=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),x=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ue=0;ue"||this._ch==="+"||this._ch==="~")&&!c&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&s.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(P),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),s.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Ce=b==='"'||b==="'";this.preserveSingleSpace(Ce||P),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&O&&this._output.add_new_line()}var ce=this._output.get_code(R);return ce},i.exports.Beautifier=S},function(i,D,g){var m=g(6).Options;function p(l){m.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var u=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||u;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o` ${g} `).trim():""}class G{constructor(i,D,g){this.id=i,this.definition=D,this.description=g,M.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var W;(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9\\-]+",i.iconModifierExpression="~[A-Za-z]+";const D=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function g(l){if(l instanceof G)return["codicon","codicon-"+l.id];const u=D.exec(l.id);if(!u)return g(G.error);let[,f,o]=u;const h=["codicon","codicon-"+f];return o&&h.push("codicon-modifier-"+o.substr(1)),h}i.asClassNameArray=g;function m(l){return g(l).join(" ")}i.asClassName=m;function p(l){return"."+g(l).join(".")}i.asCSSSelector=p})(W||(W={})),function(i){i.add=new i("add",{fontCharacter:"\\ea60"}),i.plus=new i("plus",i.add.definition),i.gistNew=new i("gist-new",i.add.definition),i.repoCreate=new i("repo-create",i.add.definition),i.lightbulb=new i("lightbulb",{fontCharacter:"\\ea61"}),i.lightBulb=new i("light-bulb",{fontCharacter:"\\ea61"}),i.repo=new i("repo",{fontCharacter:"\\ea62"}),i.repoDelete=new i("repo-delete",{fontCharacter:"\\ea62"}),i.gistFork=new i("gist-fork",{fontCharacter:"\\ea63"}),i.repoForked=new i("repo-forked",{fontCharacter:"\\ea63"}),i.gitPullRequest=new i("git-pull-request",{fontCharacter:"\\ea64"}),i.gitPullRequestAbandoned=new i("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),i.recordKeys=new i("record-keys",{fontCharacter:"\\ea65"}),i.keyboard=new i("keyboard",{fontCharacter:"\\ea65"}),i.tag=new i("tag",{fontCharacter:"\\ea66"}),i.tagAdd=new i("tag-add",{fontCharacter:"\\ea66"}),i.tagRemove=new i("tag-remove",{fontCharacter:"\\ea66"}),i.person=new i("person",{fontCharacter:"\\ea67"}),i.personFollow=new i("person-follow",{fontCharacter:"\\ea67"}),i.personOutline=new i("person-outline",{fontCharacter:"\\ea67"}),i.personFilled=new i("person-filled",{fontCharacter:"\\ea67"}),i.gitBranch=new i("git-branch",{fontCharacter:"\\ea68"}),i.gitBranchCreate=new i("git-branch-create",{fontCharacter:"\\ea68"}),i.gitBranchDelete=new i("git-branch-delete",{fontCharacter:"\\ea68"}),i.sourceControl=new i("source-control",{fontCharacter:"\\ea68"}),i.mirror=new i("mirror",{fontCharacter:"\\ea69"}),i.mirrorPublic=new i("mirror-public",{fontCharacter:"\\ea69"}),i.star=new i("star",{fontCharacter:"\\ea6a"}),i.starAdd=new i("star-add",{fontCharacter:"\\ea6a"}),i.starDelete=new i("star-delete",{fontCharacter:"\\ea6a"}),i.starEmpty=new i("star-empty",{fontCharacter:"\\ea6a"}),i.comment=new i("comment",{fontCharacter:"\\ea6b"}),i.commentAdd=new i("comment-add",{fontCharacter:"\\ea6b"}),i.alert=new i("alert",{fontCharacter:"\\ea6c"}),i.warning=new i("warning",{fontCharacter:"\\ea6c"}),i.search=new i("search",{fontCharacter:"\\ea6d"}),i.searchSave=new i("search-save",{fontCharacter:"\\ea6d"}),i.logOut=new i("log-out",{fontCharacter:"\\ea6e"}),i.signOut=new i("sign-out",{fontCharacter:"\\ea6e"}),i.logIn=new i("log-in",{fontCharacter:"\\ea6f"}),i.signIn=new i("sign-in",{fontCharacter:"\\ea6f"}),i.eye=new i("eye",{fontCharacter:"\\ea70"}),i.eyeUnwatch=new i("eye-unwatch",{fontCharacter:"\\ea70"}),i.eyeWatch=new i("eye-watch",{fontCharacter:"\\ea70"}),i.circleFilled=new i("circle-filled",{fontCharacter:"\\ea71"}),i.primitiveDot=new i("primitive-dot",{fontCharacter:"\\ea71"}),i.closeDirty=new i("close-dirty",{fontCharacter:"\\ea71"}),i.debugBreakpoint=new i("debug-breakpoint",{fontCharacter:"\\ea71"}),i.debugBreakpointDisabled=new i("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),i.debugHint=new i("debug-hint",{fontCharacter:"\\ea71"}),i.primitiveSquare=new i("primitive-square",{fontCharacter:"\\ea72"}),i.edit=new i("edit",{fontCharacter:"\\ea73"}),i.pencil=new i("pencil",{fontCharacter:"\\ea73"}),i.info=new i("info",{fontCharacter:"\\ea74"}),i.issueOpened=new i("issue-opened",{fontCharacter:"\\ea74"}),i.gistPrivate=new i("gist-private",{fontCharacter:"\\ea75"}),i.gitForkPrivate=new i("git-fork-private",{fontCharacter:"\\ea75"}),i.lock=new i("lock",{fontCharacter:"\\ea75"}),i.mirrorPrivate=new i("mirror-private",{fontCharacter:"\\ea75"}),i.close=new i("close",{fontCharacter:"\\ea76"}),i.removeClose=new i("remove-close",{fontCharacter:"\\ea76"}),i.x=new i("x",{fontCharacter:"\\ea76"}),i.repoSync=new i("repo-sync",{fontCharacter:"\\ea77"}),i.sync=new i("sync",{fontCharacter:"\\ea77"}),i.clone=new i("clone",{fontCharacter:"\\ea78"}),i.desktopDownload=new i("desktop-download",{fontCharacter:"\\ea78"}),i.beaker=new i("beaker",{fontCharacter:"\\ea79"}),i.microscope=new i("microscope",{fontCharacter:"\\ea79"}),i.vm=new i("vm",{fontCharacter:"\\ea7a"}),i.deviceDesktop=new i("device-desktop",{fontCharacter:"\\ea7a"}),i.file=new i("file",{fontCharacter:"\\ea7b"}),i.fileText=new i("file-text",{fontCharacter:"\\ea7b"}),i.more=new i("more",{fontCharacter:"\\ea7c"}),i.ellipsis=new i("ellipsis",{fontCharacter:"\\ea7c"}),i.kebabHorizontal=new i("kebab-horizontal",{fontCharacter:"\\ea7c"}),i.mailReply=new i("mail-reply",{fontCharacter:"\\ea7d"}),i.reply=new i("reply",{fontCharacter:"\\ea7d"}),i.organization=new i("organization",{fontCharacter:"\\ea7e"}),i.organizationFilled=new i("organization-filled",{fontCharacter:"\\ea7e"}),i.organizationOutline=new i("organization-outline",{fontCharacter:"\\ea7e"}),i.newFile=new i("new-file",{fontCharacter:"\\ea7f"}),i.fileAdd=new i("file-add",{fontCharacter:"\\ea7f"}),i.newFolder=new i("new-folder",{fontCharacter:"\\ea80"}),i.fileDirectoryCreate=new i("file-directory-create",{fontCharacter:"\\ea80"}),i.trash=new i("trash",{fontCharacter:"\\ea81"}),i.trashcan=new i("trashcan",{fontCharacter:"\\ea81"}),i.history=new i("history",{fontCharacter:"\\ea82"}),i.clock=new i("clock",{fontCharacter:"\\ea82"}),i.folder=new i("folder",{fontCharacter:"\\ea83"}),i.fileDirectory=new i("file-directory",{fontCharacter:"\\ea83"}),i.symbolFolder=new i("symbol-folder",{fontCharacter:"\\ea83"}),i.logoGithub=new i("logo-github",{fontCharacter:"\\ea84"}),i.markGithub=new i("mark-github",{fontCharacter:"\\ea84"}),i.github=new i("github",{fontCharacter:"\\ea84"}),i.terminal=new i("terminal",{fontCharacter:"\\ea85"}),i.console=new i("console",{fontCharacter:"\\ea85"}),i.repl=new i("repl",{fontCharacter:"\\ea85"}),i.zap=new i("zap",{fontCharacter:"\\ea86"}),i.symbolEvent=new i("symbol-event",{fontCharacter:"\\ea86"}),i.error=new i("error",{fontCharacter:"\\ea87"}),i.stop=new i("stop",{fontCharacter:"\\ea87"}),i.variable=new i("variable",{fontCharacter:"\\ea88"}),i.symbolVariable=new i("symbol-variable",{fontCharacter:"\\ea88"}),i.array=new i("array",{fontCharacter:"\\ea8a"}),i.symbolArray=new i("symbol-array",{fontCharacter:"\\ea8a"}),i.symbolModule=new i("symbol-module",{fontCharacter:"\\ea8b"}),i.symbolPackage=new i("symbol-package",{fontCharacter:"\\ea8b"}),i.symbolNamespace=new i("symbol-namespace",{fontCharacter:"\\ea8b"}),i.symbolObject=new i("symbol-object",{fontCharacter:"\\ea8b"}),i.symbolMethod=new i("symbol-method",{fontCharacter:"\\ea8c"}),i.symbolFunction=new i("symbol-function",{fontCharacter:"\\ea8c"}),i.symbolConstructor=new i("symbol-constructor",{fontCharacter:"\\ea8c"}),i.symbolBoolean=new i("symbol-boolean",{fontCharacter:"\\ea8f"}),i.symbolNull=new i("symbol-null",{fontCharacter:"\\ea8f"}),i.symbolNumeric=new i("symbol-numeric",{fontCharacter:"\\ea90"}),i.symbolNumber=new i("symbol-number",{fontCharacter:"\\ea90"}),i.symbolStructure=new i("symbol-structure",{fontCharacter:"\\ea91"}),i.symbolStruct=new i("symbol-struct",{fontCharacter:"\\ea91"}),i.symbolParameter=new i("symbol-parameter",{fontCharacter:"\\ea92"}),i.symbolTypeParameter=new i("symbol-type-parameter",{fontCharacter:"\\ea92"}),i.symbolKey=new i("symbol-key",{fontCharacter:"\\ea93"}),i.symbolText=new i("symbol-text",{fontCharacter:"\\ea93"}),i.symbolReference=new i("symbol-reference",{fontCharacter:"\\ea94"}),i.goToFile=new i("go-to-file",{fontCharacter:"\\ea94"}),i.symbolEnum=new i("symbol-enum",{fontCharacter:"\\ea95"}),i.symbolValue=new i("symbol-value",{fontCharacter:"\\ea95"}),i.symbolRuler=new i("symbol-ruler",{fontCharacter:"\\ea96"}),i.symbolUnit=new i("symbol-unit",{fontCharacter:"\\ea96"}),i.activateBreakpoints=new i("activate-breakpoints",{fontCharacter:"\\ea97"}),i.archive=new i("archive",{fontCharacter:"\\ea98"}),i.arrowBoth=new i("arrow-both",{fontCharacter:"\\ea99"}),i.arrowDown=new i("arrow-down",{fontCharacter:"\\ea9a"}),i.arrowLeft=new i("arrow-left",{fontCharacter:"\\ea9b"}),i.arrowRight=new i("arrow-right",{fontCharacter:"\\ea9c"}),i.arrowSmallDown=new i("arrow-small-down",{fontCharacter:"\\ea9d"}),i.arrowSmallLeft=new i("arrow-small-left",{fontCharacter:"\\ea9e"}),i.arrowSmallRight=new i("arrow-small-right",{fontCharacter:"\\ea9f"}),i.arrowSmallUp=new i("arrow-small-up",{fontCharacter:"\\eaa0"}),i.arrowUp=new i("arrow-up",{fontCharacter:"\\eaa1"}),i.bell=new i("bell",{fontCharacter:"\\eaa2"}),i.bold=new i("bold",{fontCharacter:"\\eaa3"}),i.book=new i("book",{fontCharacter:"\\eaa4"}),i.bookmark=new i("bookmark",{fontCharacter:"\\eaa5"}),i.debugBreakpointConditionalUnverified=new i("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),i.debugBreakpointConditional=new i("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),i.debugBreakpointConditionalDisabled=new i("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),i.debugBreakpointDataUnverified=new i("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),i.debugBreakpointData=new i("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),i.debugBreakpointDataDisabled=new i("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),i.debugBreakpointLogUnverified=new i("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),i.debugBreakpointLog=new i("debug-breakpoint-log",{fontCharacter:"\\eaab"}),i.debugBreakpointLogDisabled=new i("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),i.briefcase=new i("briefcase",{fontCharacter:"\\eaac"}),i.broadcast=new i("broadcast",{fontCharacter:"\\eaad"}),i.browser=new i("browser",{fontCharacter:"\\eaae"}),i.bug=new i("bug",{fontCharacter:"\\eaaf"}),i.calendar=new i("calendar",{fontCharacter:"\\eab0"}),i.caseSensitive=new i("case-sensitive",{fontCharacter:"\\eab1"}),i.check=new i("check",{fontCharacter:"\\eab2"}),i.checklist=new i("checklist",{fontCharacter:"\\eab3"}),i.chevronDown=new i("chevron-down",{fontCharacter:"\\eab4"}),i.dropDownButton=new i("drop-down-button",i.chevronDown.definition),i.chevronLeft=new i("chevron-left",{fontCharacter:"\\eab5"}),i.chevronRight=new i("chevron-right",{fontCharacter:"\\eab6"}),i.chevronUp=new i("chevron-up",{fontCharacter:"\\eab7"}),i.chromeClose=new i("chrome-close",{fontCharacter:"\\eab8"}),i.chromeMaximize=new i("chrome-maximize",{fontCharacter:"\\eab9"}),i.chromeMinimize=new i("chrome-minimize",{fontCharacter:"\\eaba"}),i.chromeRestore=new i("chrome-restore",{fontCharacter:"\\eabb"}),i.circleOutline=new i("circle-outline",{fontCharacter:"\\eabc"}),i.debugBreakpointUnverified=new i("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),i.circleSlash=new i("circle-slash",{fontCharacter:"\\eabd"}),i.circuitBoard=new i("circuit-board",{fontCharacter:"\\eabe"}),i.clearAll=new i("clear-all",{fontCharacter:"\\eabf"}),i.clippy=new i("clippy",{fontCharacter:"\\eac0"}),i.closeAll=new i("close-all",{fontCharacter:"\\eac1"}),i.cloudDownload=new i("cloud-download",{fontCharacter:"\\eac2"}),i.cloudUpload=new i("cloud-upload",{fontCharacter:"\\eac3"}),i.code=new i("code",{fontCharacter:"\\eac4"}),i.collapseAll=new i("collapse-all",{fontCharacter:"\\eac5"}),i.colorMode=new i("color-mode",{fontCharacter:"\\eac6"}),i.commentDiscussion=new i("comment-discussion",{fontCharacter:"\\eac7"}),i.compareChanges=new i("compare-changes",{fontCharacter:"\\eafd"}),i.creditCard=new i("credit-card",{fontCharacter:"\\eac9"}),i.dash=new i("dash",{fontCharacter:"\\eacc"}),i.dashboard=new i("dashboard",{fontCharacter:"\\eacd"}),i.database=new i("database",{fontCharacter:"\\eace"}),i.debugContinue=new i("debug-continue",{fontCharacter:"\\eacf"}),i.debugDisconnect=new i("debug-disconnect",{fontCharacter:"\\ead0"}),i.debugPause=new i("debug-pause",{fontCharacter:"\\ead1"}),i.debugRestart=new i("debug-restart",{fontCharacter:"\\ead2"}),i.debugStart=new i("debug-start",{fontCharacter:"\\ead3"}),i.debugStepInto=new i("debug-step-into",{fontCharacter:"\\ead4"}),i.debugStepOut=new i("debug-step-out",{fontCharacter:"\\ead5"}),i.debugStepOver=new i("debug-step-over",{fontCharacter:"\\ead6"}),i.debugStop=new i("debug-stop",{fontCharacter:"\\ead7"}),i.debug=new i("debug",{fontCharacter:"\\ead8"}),i.deviceCameraVideo=new i("device-camera-video",{fontCharacter:"\\ead9"}),i.deviceCamera=new i("device-camera",{fontCharacter:"\\eada"}),i.deviceMobile=new i("device-mobile",{fontCharacter:"\\eadb"}),i.diffAdded=new i("diff-added",{fontCharacter:"\\eadc"}),i.diffIgnored=new i("diff-ignored",{fontCharacter:"\\eadd"}),i.diffModified=new i("diff-modified",{fontCharacter:"\\eade"}),i.diffRemoved=new i("diff-removed",{fontCharacter:"\\eadf"}),i.diffRenamed=new i("diff-renamed",{fontCharacter:"\\eae0"}),i.diff=new i("diff",{fontCharacter:"\\eae1"}),i.discard=new i("discard",{fontCharacter:"\\eae2"}),i.editorLayout=new i("editor-layout",{fontCharacter:"\\eae3"}),i.emptyWindow=new i("empty-window",{fontCharacter:"\\eae4"}),i.exclude=new i("exclude",{fontCharacter:"\\eae5"}),i.extensions=new i("extensions",{fontCharacter:"\\eae6"}),i.eyeClosed=new i("eye-closed",{fontCharacter:"\\eae7"}),i.fileBinary=new i("file-binary",{fontCharacter:"\\eae8"}),i.fileCode=new i("file-code",{fontCharacter:"\\eae9"}),i.fileMedia=new i("file-media",{fontCharacter:"\\eaea"}),i.filePdf=new i("file-pdf",{fontCharacter:"\\eaeb"}),i.fileSubmodule=new i("file-submodule",{fontCharacter:"\\eaec"}),i.fileSymlinkDirectory=new i("file-symlink-directory",{fontCharacter:"\\eaed"}),i.fileSymlinkFile=new i("file-symlink-file",{fontCharacter:"\\eaee"}),i.fileZip=new i("file-zip",{fontCharacter:"\\eaef"}),i.files=new i("files",{fontCharacter:"\\eaf0"}),i.filter=new i("filter",{fontCharacter:"\\eaf1"}),i.flame=new i("flame",{fontCharacter:"\\eaf2"}),i.foldDown=new i("fold-down",{fontCharacter:"\\eaf3"}),i.foldUp=new i("fold-up",{fontCharacter:"\\eaf4"}),i.fold=new i("fold",{fontCharacter:"\\eaf5"}),i.folderActive=new i("folder-active",{fontCharacter:"\\eaf6"}),i.folderOpened=new i("folder-opened",{fontCharacter:"\\eaf7"}),i.gear=new i("gear",{fontCharacter:"\\eaf8"}),i.gift=new i("gift",{fontCharacter:"\\eaf9"}),i.gistSecret=new i("gist-secret",{fontCharacter:"\\eafa"}),i.gist=new i("gist",{fontCharacter:"\\eafb"}),i.gitCommit=new i("git-commit",{fontCharacter:"\\eafc"}),i.gitCompare=new i("git-compare",{fontCharacter:"\\eafd"}),i.gitMerge=new i("git-merge",{fontCharacter:"\\eafe"}),i.githubAction=new i("github-action",{fontCharacter:"\\eaff"}),i.githubAlt=new i("github-alt",{fontCharacter:"\\eb00"}),i.globe=new i("globe",{fontCharacter:"\\eb01"}),i.grabber=new i("grabber",{fontCharacter:"\\eb02"}),i.graph=new i("graph",{fontCharacter:"\\eb03"}),i.gripper=new i("gripper",{fontCharacter:"\\eb04"}),i.heart=new i("heart",{fontCharacter:"\\eb05"}),i.home=new i("home",{fontCharacter:"\\eb06"}),i.horizontalRule=new i("horizontal-rule",{fontCharacter:"\\eb07"}),i.hubot=new i("hubot",{fontCharacter:"\\eb08"}),i.inbox=new i("inbox",{fontCharacter:"\\eb09"}),i.issueClosed=new i("issue-closed",{fontCharacter:"\\eba4"}),i.issueReopened=new i("issue-reopened",{fontCharacter:"\\eb0b"}),i.issues=new i("issues",{fontCharacter:"\\eb0c"}),i.italic=new i("italic",{fontCharacter:"\\eb0d"}),i.jersey=new i("jersey",{fontCharacter:"\\eb0e"}),i.json=new i("json",{fontCharacter:"\\eb0f"}),i.kebabVertical=new i("kebab-vertical",{fontCharacter:"\\eb10"}),i.key=new i("key",{fontCharacter:"\\eb11"}),i.law=new i("law",{fontCharacter:"\\eb12"}),i.lightbulbAutofix=new i("lightbulb-autofix",{fontCharacter:"\\eb13"}),i.linkExternal=new i("link-external",{fontCharacter:"\\eb14"}),i.link=new i("link",{fontCharacter:"\\eb15"}),i.listOrdered=new i("list-ordered",{fontCharacter:"\\eb16"}),i.listUnordered=new i("list-unordered",{fontCharacter:"\\eb17"}),i.liveShare=new i("live-share",{fontCharacter:"\\eb18"}),i.loading=new i("loading",{fontCharacter:"\\eb19"}),i.location=new i("location",{fontCharacter:"\\eb1a"}),i.mailRead=new i("mail-read",{fontCharacter:"\\eb1b"}),i.mail=new i("mail",{fontCharacter:"\\eb1c"}),i.markdown=new i("markdown",{fontCharacter:"\\eb1d"}),i.megaphone=new i("megaphone",{fontCharacter:"\\eb1e"}),i.mention=new i("mention",{fontCharacter:"\\eb1f"}),i.milestone=new i("milestone",{fontCharacter:"\\eb20"}),i.mortarBoard=new i("mortar-board",{fontCharacter:"\\eb21"}),i.move=new i("move",{fontCharacter:"\\eb22"}),i.multipleWindows=new i("multiple-windows",{fontCharacter:"\\eb23"}),i.mute=new i("mute",{fontCharacter:"\\eb24"}),i.noNewline=new i("no-newline",{fontCharacter:"\\eb25"}),i.note=new i("note",{fontCharacter:"\\eb26"}),i.octoface=new i("octoface",{fontCharacter:"\\eb27"}),i.openPreview=new i("open-preview",{fontCharacter:"\\eb28"}),i.package_=new i("package",{fontCharacter:"\\eb29"}),i.paintcan=new i("paintcan",{fontCharacter:"\\eb2a"}),i.pin=new i("pin",{fontCharacter:"\\eb2b"}),i.play=new i("play",{fontCharacter:"\\eb2c"}),i.run=new i("run",{fontCharacter:"\\eb2c"}),i.plug=new i("plug",{fontCharacter:"\\eb2d"}),i.preserveCase=new i("preserve-case",{fontCharacter:"\\eb2e"}),i.preview=new i("preview",{fontCharacter:"\\eb2f"}),i.project=new i("project",{fontCharacter:"\\eb30"}),i.pulse=new i("pulse",{fontCharacter:"\\eb31"}),i.question=new i("question",{fontCharacter:"\\eb32"}),i.quote=new i("quote",{fontCharacter:"\\eb33"}),i.radioTower=new i("radio-tower",{fontCharacter:"\\eb34"}),i.reactions=new i("reactions",{fontCharacter:"\\eb35"}),i.references=new i("references",{fontCharacter:"\\eb36"}),i.refresh=new i("refresh",{fontCharacter:"\\eb37"}),i.regex=new i("regex",{fontCharacter:"\\eb38"}),i.remoteExplorer=new i("remote-explorer",{fontCharacter:"\\eb39"}),i.remote=new i("remote",{fontCharacter:"\\eb3a"}),i.remove=new i("remove",{fontCharacter:"\\eb3b"}),i.replaceAll=new i("replace-all",{fontCharacter:"\\eb3c"}),i.replace=new i("replace",{fontCharacter:"\\eb3d"}),i.repoClone=new i("repo-clone",{fontCharacter:"\\eb3e"}),i.repoForcePush=new i("repo-force-push",{fontCharacter:"\\eb3f"}),i.repoPull=new i("repo-pull",{fontCharacter:"\\eb40"}),i.repoPush=new i("repo-push",{fontCharacter:"\\eb41"}),i.report=new i("report",{fontCharacter:"\\eb42"}),i.requestChanges=new i("request-changes",{fontCharacter:"\\eb43"}),i.rocket=new i("rocket",{fontCharacter:"\\eb44"}),i.rootFolderOpened=new i("root-folder-opened",{fontCharacter:"\\eb45"}),i.rootFolder=new i("root-folder",{fontCharacter:"\\eb46"}),i.rss=new i("rss",{fontCharacter:"\\eb47"}),i.ruby=new i("ruby",{fontCharacter:"\\eb48"}),i.saveAll=new i("save-all",{fontCharacter:"\\eb49"}),i.saveAs=new i("save-as",{fontCharacter:"\\eb4a"}),i.save=new i("save",{fontCharacter:"\\eb4b"}),i.screenFull=new i("screen-full",{fontCharacter:"\\eb4c"}),i.screenNormal=new i("screen-normal",{fontCharacter:"\\eb4d"}),i.searchStop=new i("search-stop",{fontCharacter:"\\eb4e"}),i.server=new i("server",{fontCharacter:"\\eb50"}),i.settingsGear=new i("settings-gear",{fontCharacter:"\\eb51"}),i.settings=new i("settings",{fontCharacter:"\\eb52"}),i.shield=new i("shield",{fontCharacter:"\\eb53"}),i.smiley=new i("smiley",{fontCharacter:"\\eb54"}),i.sortPrecedence=new i("sort-precedence",{fontCharacter:"\\eb55"}),i.splitHorizontal=new i("split-horizontal",{fontCharacter:"\\eb56"}),i.splitVertical=new i("split-vertical",{fontCharacter:"\\eb57"}),i.squirrel=new i("squirrel",{fontCharacter:"\\eb58"}),i.starFull=new i("star-full",{fontCharacter:"\\eb59"}),i.starHalf=new i("star-half",{fontCharacter:"\\eb5a"}),i.symbolClass=new i("symbol-class",{fontCharacter:"\\eb5b"}),i.symbolColor=new i("symbol-color",{fontCharacter:"\\eb5c"}),i.symbolConstant=new i("symbol-constant",{fontCharacter:"\\eb5d"}),i.symbolEnumMember=new i("symbol-enum-member",{fontCharacter:"\\eb5e"}),i.symbolField=new i("symbol-field",{fontCharacter:"\\eb5f"}),i.symbolFile=new i("symbol-file",{fontCharacter:"\\eb60"}),i.symbolInterface=new i("symbol-interface",{fontCharacter:"\\eb61"}),i.symbolKeyword=new i("symbol-keyword",{fontCharacter:"\\eb62"}),i.symbolMisc=new i("symbol-misc",{fontCharacter:"\\eb63"}),i.symbolOperator=new i("symbol-operator",{fontCharacter:"\\eb64"}),i.symbolProperty=new i("symbol-property",{fontCharacter:"\\eb65"}),i.wrench=new i("wrench",{fontCharacter:"\\eb65"}),i.wrenchSubaction=new i("wrench-subaction",{fontCharacter:"\\eb65"}),i.symbolSnippet=new i("symbol-snippet",{fontCharacter:"\\eb66"}),i.tasklist=new i("tasklist",{fontCharacter:"\\eb67"}),i.telescope=new i("telescope",{fontCharacter:"\\eb68"}),i.textSize=new i("text-size",{fontCharacter:"\\eb69"}),i.threeBars=new i("three-bars",{fontCharacter:"\\eb6a"}),i.thumbsdown=new i("thumbsdown",{fontCharacter:"\\eb6b"}),i.thumbsup=new i("thumbsup",{fontCharacter:"\\eb6c"}),i.tools=new i("tools",{fontCharacter:"\\eb6d"}),i.triangleDown=new i("triangle-down",{fontCharacter:"\\eb6e"}),i.triangleLeft=new i("triangle-left",{fontCharacter:"\\eb6f"}),i.triangleRight=new i("triangle-right",{fontCharacter:"\\eb70"}),i.triangleUp=new i("triangle-up",{fontCharacter:"\\eb71"}),i.twitter=new i("twitter",{fontCharacter:"\\eb72"}),i.unfold=new i("unfold",{fontCharacter:"\\eb73"}),i.unlock=new i("unlock",{fontCharacter:"\\eb74"}),i.unmute=new i("unmute",{fontCharacter:"\\eb75"}),i.unverified=new i("unverified",{fontCharacter:"\\eb76"}),i.verified=new i("verified",{fontCharacter:"\\eb77"}),i.versions=new i("versions",{fontCharacter:"\\eb78"}),i.vmActive=new i("vm-active",{fontCharacter:"\\eb79"}),i.vmOutline=new i("vm-outline",{fontCharacter:"\\eb7a"}),i.vmRunning=new i("vm-running",{fontCharacter:"\\eb7b"}),i.watch=new i("watch",{fontCharacter:"\\eb7c"}),i.whitespace=new i("whitespace",{fontCharacter:"\\eb7d"}),i.wholeWord=new i("whole-word",{fontCharacter:"\\eb7e"}),i.window=new i("window",{fontCharacter:"\\eb7f"}),i.wordWrap=new i("word-wrap",{fontCharacter:"\\eb80"}),i.zoomIn=new i("zoom-in",{fontCharacter:"\\eb81"}),i.zoomOut=new i("zoom-out",{fontCharacter:"\\eb82"}),i.listFilter=new i("list-filter",{fontCharacter:"\\eb83"}),i.listFlat=new i("list-flat",{fontCharacter:"\\eb84"}),i.listSelection=new i("list-selection",{fontCharacter:"\\eb85"}),i.selection=new i("selection",{fontCharacter:"\\eb85"}),i.listTree=new i("list-tree",{fontCharacter:"\\eb86"}),i.debugBreakpointFunctionUnverified=new i("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),i.debugBreakpointFunction=new i("debug-breakpoint-function",{fontCharacter:"\\eb88"}),i.debugBreakpointFunctionDisabled=new i("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),i.debugStackframeActive=new i("debug-stackframe-active",{fontCharacter:"\\eb89"}),i.debugStackframeDot=new i("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),i.debugStackframe=new i("debug-stackframe",{fontCharacter:"\\eb8b"}),i.debugStackframeFocused=new i("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),i.debugBreakpointUnsupported=new i("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),i.symbolString=new i("symbol-string",{fontCharacter:"\\eb8d"}),i.debugReverseContinue=new i("debug-reverse-continue",{fontCharacter:"\\eb8e"}),i.debugStepBack=new i("debug-step-back",{fontCharacter:"\\eb8f"}),i.debugRestartFrame=new i("debug-restart-frame",{fontCharacter:"\\eb90"}),i.callIncoming=new i("call-incoming",{fontCharacter:"\\eb92"}),i.callOutgoing=new i("call-outgoing",{fontCharacter:"\\eb93"}),i.menu=new i("menu",{fontCharacter:"\\eb94"}),i.expandAll=new i("expand-all",{fontCharacter:"\\eb95"}),i.feedback=new i("feedback",{fontCharacter:"\\eb96"}),i.groupByRefType=new i("group-by-ref-type",{fontCharacter:"\\eb97"}),i.ungroupByRefType=new i("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),i.account=new i("account",{fontCharacter:"\\eb99"}),i.bellDot=new i("bell-dot",{fontCharacter:"\\eb9a"}),i.debugConsole=new i("debug-console",{fontCharacter:"\\eb9b"}),i.library=new i("library",{fontCharacter:"\\eb9c"}),i.output=new i("output",{fontCharacter:"\\eb9d"}),i.runAll=new i("run-all",{fontCharacter:"\\eb9e"}),i.syncIgnored=new i("sync-ignored",{fontCharacter:"\\eb9f"}),i.pinned=new i("pinned",{fontCharacter:"\\eba0"}),i.githubInverted=new i("github-inverted",{fontCharacter:"\\eba1"}),i.debugAlt=new i("debug-alt",{fontCharacter:"\\eb91"}),i.serverProcess=new i("server-process",{fontCharacter:"\\eba2"}),i.serverEnvironment=new i("server-environment",{fontCharacter:"\\eba3"}),i.pass=new i("pass",{fontCharacter:"\\eba4"}),i.stopCircle=new i("stop-circle",{fontCharacter:"\\eba5"}),i.playCircle=new i("play-circle",{fontCharacter:"\\eba6"}),i.record=new i("record",{fontCharacter:"\\eba7"}),i.debugAltSmall=new i("debug-alt-small",{fontCharacter:"\\eba8"}),i.vmConnect=new i("vm-connect",{fontCharacter:"\\eba9"}),i.cloud=new i("cloud",{fontCharacter:"\\ebaa"}),i.merge=new i("merge",{fontCharacter:"\\ebab"}),i.exportIcon=new i("export",{fontCharacter:"\\ebac"}),i.graphLeft=new i("graph-left",{fontCharacter:"\\ebad"}),i.magnet=new i("magnet",{fontCharacter:"\\ebae"}),i.notebook=new i("notebook",{fontCharacter:"\\ebaf"}),i.redo=new i("redo",{fontCharacter:"\\ebb0"}),i.checkAll=new i("check-all",{fontCharacter:"\\ebb1"}),i.pinnedDirty=new i("pinned-dirty",{fontCharacter:"\\ebb2"}),i.passFilled=new i("pass-filled",{fontCharacter:"\\ebb3"}),i.circleLargeFilled=new i("circle-large-filled",{fontCharacter:"\\ebb4"}),i.circleLargeOutline=new i("circle-large-outline",{fontCharacter:"\\ebb5"}),i.combine=new i("combine",{fontCharacter:"\\ebb6"}),i.gather=new i("gather",{fontCharacter:"\\ebb6"}),i.table=new i("table",{fontCharacter:"\\ebb7"}),i.variableGroup=new i("variable-group",{fontCharacter:"\\ebb8"}),i.typeHierarchy=new i("type-hierarchy",{fontCharacter:"\\ebb9"}),i.typeHierarchySub=new i("type-hierarchy-sub",{fontCharacter:"\\ebba"}),i.typeHierarchySuper=new i("type-hierarchy-super",{fontCharacter:"\\ebbb"}),i.gitPullRequestCreate=new i("git-pull-request-create",{fontCharacter:"\\ebbc"}),i.runAbove=new i("run-above",{fontCharacter:"\\ebbd"}),i.runBelow=new i("run-below",{fontCharacter:"\\ebbe"}),i.notebookTemplate=new i("notebook-template",{fontCharacter:"\\ebbf"}),i.debugRerun=new i("debug-rerun",{fontCharacter:"\\ebc0"}),i.workspaceTrusted=new i("workspace-trusted",{fontCharacter:"\\ebc1"}),i.workspaceUntrusted=new i("workspace-untrusted",{fontCharacter:"\\ebc2"}),i.workspaceUnspecified=new i("workspace-unspecified",{fontCharacter:"\\ebc3"}),i.terminalCmd=new i("terminal-cmd",{fontCharacter:"\\ebc4"}),i.terminalDebian=new i("terminal-debian",{fontCharacter:"\\ebc5"}),i.terminalLinux=new i("terminal-linux",{fontCharacter:"\\ebc6"}),i.terminalPowershell=new i("terminal-powershell",{fontCharacter:"\\ebc7"}),i.terminalTmux=new i("terminal-tmux",{fontCharacter:"\\ebc8"}),i.terminalUbuntu=new i("terminal-ubuntu",{fontCharacter:"\\ebc9"}),i.terminalBash=new i("terminal-bash",{fontCharacter:"\\ebca"}),i.arrowSwap=new i("arrow-swap",{fontCharacter:"\\ebcb"}),i.copy=new i("copy",{fontCharacter:"\\ebcc"}),i.personAdd=new i("person-add",{fontCharacter:"\\ebcd"}),i.filterFilled=new i("filter-filled",{fontCharacter:"\\ebce"}),i.wand=new i("wand",{fontCharacter:"\\ebcf"}),i.debugLineByLine=new i("debug-line-by-line",{fontCharacter:"\\ebd0"}),i.inspect=new i("inspect",{fontCharacter:"\\ebd1"}),i.layers=new i("layers",{fontCharacter:"\\ebd2"}),i.layersDot=new i("layers-dot",{fontCharacter:"\\ebd3"}),i.layersActive=new i("layers-active",{fontCharacter:"\\ebd4"}),i.compass=new i("compass",{fontCharacter:"\\ebd5"}),i.compassDot=new i("compass-dot",{fontCharacter:"\\ebd6"}),i.compassActive=new i("compass-active",{fontCharacter:"\\ebd7"}),i.azure=new i("azure",{fontCharacter:"\\ebd8"}),i.issueDraft=new i("issue-draft",{fontCharacter:"\\ebd9"}),i.gitPullRequestClosed=new i("git-pull-request-closed",{fontCharacter:"\\ebda"}),i.gitPullRequestDraft=new i("git-pull-request-draft",{fontCharacter:"\\ebdb"}),i.debugAll=new i("debug-all",{fontCharacter:"\\ebdc"}),i.debugCoverage=new i("debug-coverage",{fontCharacter:"\\ebdd"}),i.runErrors=new i("run-errors",{fontCharacter:"\\ebde"}),i.folderLibrary=new i("folder-library",{fontCharacter:"\\ebdf"}),i.debugContinueSmall=new i("debug-continue-small",{fontCharacter:"\\ebe0"}),i.beakerStop=new i("beaker-stop",{fontCharacter:"\\ebe1"}),i.graphLine=new i("graph-line",{fontCharacter:"\\ebe2"}),i.graphScatter=new i("graph-scatter",{fontCharacter:"\\ebe3"}),i.pieChart=new i("pie-chart",{fontCharacter:"\\ebe4"}),i.bracket=new i("bracket",i.json.definition),i.bracketDot=new i("bracket-dot",{fontCharacter:"\\ebe5"}),i.bracketError=new i("bracket-error",{fontCharacter:"\\ebe6"}),i.lockSmall=new i("lock-small",{fontCharacter:"\\ebe7"}),i.azureDevops=new i("azure-devops",{fontCharacter:"\\ebe8"}),i.verifiedFilled=new i("verified-filled",{fontCharacter:"\\ebe9"})}(G||(G={}))},"VrN/":function(st,be,Q){(function(ie,$){st.exports=$()})(this,function(){"use strict";var ie=navigator.userAgent,$=navigator.platform,M=/gecko\/\d/i.test(ie),X=/MSIE \d/.test(ie),F=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),U=/Edge\/(\d+)/.exec(ie),G=X||F||U,W=G&&(X?document.documentMode||6:+(U||F)[1]),i=!U&&/WebKit\//.test(ie),D=i&&/Qt\/\d+\.\d+/.test(ie),g=!U&&/Chrome\//.test(ie),m=/Opera\//.test(ie),p=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),u=/PhantomJS/.test(ie),f=!U&&/AppleWebKit/.test(ie)&&/Mobile\/\w+/.test(ie),o=/Android/.test(ie),h=f||o||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),s=f||/Mac/.test($),a=/\bCrOS\b/.test(ie),A=/win/i.test($),_=m&&ie.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(m=!1,i=!0);var S=s&&(D||m&&(_==null||_<12.11)),L=M||G&&W>=9;function R(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=function(e,t){var r=e.className,n=R(t).exec(r);if(n){var d=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(d?n[1]+d:"")}};function w(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return w(e).appendChild(t)}function c(e,t,r,n){var d=document.createElement(e);if(r&&(d.className=r),n&&(d.style.cssText=n),typeof t=="string")d.appendChild(document.createTextNode(t));else if(t)for(var k=0;k=t)return K+(t-k);K+=J-k,K+=r-K%r,k=J+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r=t)return n+Math.min(K,t-d);if(d+=k-n,d+=r-d%r,n=k+1,d>=t)return n}}var se=[""];function ae(e){for(;se.length<=e;)se.push(Oe(se)+" ");return se[e]}function Oe(e){return e[e.length-1]}function Te(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Le.test(e))}function Ge(e,t){return t?t.source.indexOf("\\w")>-1&&Be(e)?!0:t.test(e):Be(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ye=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function we(e){return e.charCodeAt(0)>=768&&ye.test(e)}function Ae(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var d=(t+r)/2,k=n<0?Math.ceil(d):Math.floor(d);if(k==t)return e(k)?t:r;e(k)?r=k:t=k+n}}function Ve(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var d=!1,k=0;kt||t==r&&K.to==t)&&(n(Math.max(K.from,t),Math.min(K.to,r),K.level==1?"rtl":"ltr",k),d=!0)}d||n(t,r,"ltr")}var Ze=null;function $e(e,t,r){var n;Ze=null;for(var d=0;dt)return d;k.to==t&&(k.from!=k.to&&r=="before"?n=d:Ze=d),k.from==t&&(k.from!=k.to&&r!="before"?n=d:Ze=d)}return n!=null?n:Ze}var tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(te){return te<=247?e.charAt(te):1424<=te&&te<=1524?"R":1536<=te&&te<=1785?t.charAt(te-1536):1774<=te&&te<=2220?"r":8192<=te&&te<=8203?"w":te==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,k=/[LRr]/,K=/[Lb1n]/,J=/[1n]/;function Z(te,de,me){this.level=te,this.from=de,this.to=me}return function(te,de){var me=de=="ltr"?"L":"R";if(te.length==0||de=="ltr"&&!n.test(te))return!1;for(var Ie=te.length,Re=[],He=0;He-1&&(n[t]=d.slice(0,k).concat(d.slice(k+1)))}}}function Fe(e,t){var r=ut(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),d=0;d0}function _e(e){e.prototype.on=function(t,r){Me(this,t,r)},e.prototype.off=function(t,r){nt(this,t,r)}}function ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function re(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function he(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function fe(e){ne(e),re(e)}function xe(e){return e.target||e.srcElement}function Pe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var ze=function(){if(G&&W<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),ot;function mt(e){if(ot==null){var t=c("span","\u200B");x(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ot=t.offsetWidth<=1&&t.offsetHeight>2&&!(G&&W<8))}var r=ot?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ft;function wt(e){if(ft!=null)return ft;var t=x(e,document.createTextNode("A\u062EA")),r=y(t,0,1).getBoundingClientRect(),n=y(t,1,2).getBoundingClientRect();return w(e),!r||r.left==r.right?!1:ft=n.right-r.right<3}var St=` +`&&O&&this._output.add_new_line()}var ce=this._output.get_code(R);return ce},i.exports.Beautifier=S},function(i,D,g){var m=g(6).Options;function p(l){m.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var u=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||u;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o` ${g} `).trim():""}class G{constructor(i,D,g){this.id=i,this.definition=D,this.description=g,M.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var W;(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9\\-]+",i.iconModifierExpression="~[A-Za-z]+";const D=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function g(l){if(l instanceof G)return["codicon","codicon-"+l.id];const u=D.exec(l.id);if(!u)return g(G.error);let[,f,o]=u;const h=["codicon","codicon-"+f];return o&&h.push("codicon-modifier-"+o.substr(1)),h}i.asClassNameArray=g;function m(l){return g(l).join(" ")}i.asClassName=m;function p(l){return"."+g(l).join(".")}i.asCSSSelector=p})(W||(W={})),function(i){i.add=new i("add",{fontCharacter:"\\ea60"}),i.plus=new i("plus",i.add.definition),i.gistNew=new i("gist-new",i.add.definition),i.repoCreate=new i("repo-create",i.add.definition),i.lightbulb=new i("lightbulb",{fontCharacter:"\\ea61"}),i.lightBulb=new i("light-bulb",{fontCharacter:"\\ea61"}),i.repo=new i("repo",{fontCharacter:"\\ea62"}),i.repoDelete=new i("repo-delete",{fontCharacter:"\\ea62"}),i.gistFork=new i("gist-fork",{fontCharacter:"\\ea63"}),i.repoForked=new i("repo-forked",{fontCharacter:"\\ea63"}),i.gitPullRequest=new i("git-pull-request",{fontCharacter:"\\ea64"}),i.gitPullRequestAbandoned=new i("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),i.recordKeys=new i("record-keys",{fontCharacter:"\\ea65"}),i.keyboard=new i("keyboard",{fontCharacter:"\\ea65"}),i.tag=new i("tag",{fontCharacter:"\\ea66"}),i.tagAdd=new i("tag-add",{fontCharacter:"\\ea66"}),i.tagRemove=new i("tag-remove",{fontCharacter:"\\ea66"}),i.person=new i("person",{fontCharacter:"\\ea67"}),i.personFollow=new i("person-follow",{fontCharacter:"\\ea67"}),i.personOutline=new i("person-outline",{fontCharacter:"\\ea67"}),i.personFilled=new i("person-filled",{fontCharacter:"\\ea67"}),i.gitBranch=new i("git-branch",{fontCharacter:"\\ea68"}),i.gitBranchCreate=new i("git-branch-create",{fontCharacter:"\\ea68"}),i.gitBranchDelete=new i("git-branch-delete",{fontCharacter:"\\ea68"}),i.sourceControl=new i("source-control",{fontCharacter:"\\ea68"}),i.mirror=new i("mirror",{fontCharacter:"\\ea69"}),i.mirrorPublic=new i("mirror-public",{fontCharacter:"\\ea69"}),i.star=new i("star",{fontCharacter:"\\ea6a"}),i.starAdd=new i("star-add",{fontCharacter:"\\ea6a"}),i.starDelete=new i("star-delete",{fontCharacter:"\\ea6a"}),i.starEmpty=new i("star-empty",{fontCharacter:"\\ea6a"}),i.comment=new i("comment",{fontCharacter:"\\ea6b"}),i.commentAdd=new i("comment-add",{fontCharacter:"\\ea6b"}),i.alert=new i("alert",{fontCharacter:"\\ea6c"}),i.warning=new i("warning",{fontCharacter:"\\ea6c"}),i.search=new i("search",{fontCharacter:"\\ea6d"}),i.searchSave=new i("search-save",{fontCharacter:"\\ea6d"}),i.logOut=new i("log-out",{fontCharacter:"\\ea6e"}),i.signOut=new i("sign-out",{fontCharacter:"\\ea6e"}),i.logIn=new i("log-in",{fontCharacter:"\\ea6f"}),i.signIn=new i("sign-in",{fontCharacter:"\\ea6f"}),i.eye=new i("eye",{fontCharacter:"\\ea70"}),i.eyeUnwatch=new i("eye-unwatch",{fontCharacter:"\\ea70"}),i.eyeWatch=new i("eye-watch",{fontCharacter:"\\ea70"}),i.circleFilled=new i("circle-filled",{fontCharacter:"\\ea71"}),i.primitiveDot=new i("primitive-dot",{fontCharacter:"\\ea71"}),i.closeDirty=new i("close-dirty",{fontCharacter:"\\ea71"}),i.debugBreakpoint=new i("debug-breakpoint",{fontCharacter:"\\ea71"}),i.debugBreakpointDisabled=new i("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),i.debugHint=new i("debug-hint",{fontCharacter:"\\ea71"}),i.primitiveSquare=new i("primitive-square",{fontCharacter:"\\ea72"}),i.edit=new i("edit",{fontCharacter:"\\ea73"}),i.pencil=new i("pencil",{fontCharacter:"\\ea73"}),i.info=new i("info",{fontCharacter:"\\ea74"}),i.issueOpened=new i("issue-opened",{fontCharacter:"\\ea74"}),i.gistPrivate=new i("gist-private",{fontCharacter:"\\ea75"}),i.gitForkPrivate=new i("git-fork-private",{fontCharacter:"\\ea75"}),i.lock=new i("lock",{fontCharacter:"\\ea75"}),i.mirrorPrivate=new i("mirror-private",{fontCharacter:"\\ea75"}),i.close=new i("close",{fontCharacter:"\\ea76"}),i.removeClose=new i("remove-close",{fontCharacter:"\\ea76"}),i.x=new i("x",{fontCharacter:"\\ea76"}),i.repoSync=new i("repo-sync",{fontCharacter:"\\ea77"}),i.sync=new i("sync",{fontCharacter:"\\ea77"}),i.clone=new i("clone",{fontCharacter:"\\ea78"}),i.desktopDownload=new i("desktop-download",{fontCharacter:"\\ea78"}),i.beaker=new i("beaker",{fontCharacter:"\\ea79"}),i.microscope=new i("microscope",{fontCharacter:"\\ea79"}),i.vm=new i("vm",{fontCharacter:"\\ea7a"}),i.deviceDesktop=new i("device-desktop",{fontCharacter:"\\ea7a"}),i.file=new i("file",{fontCharacter:"\\ea7b"}),i.fileText=new i("file-text",{fontCharacter:"\\ea7b"}),i.more=new i("more",{fontCharacter:"\\ea7c"}),i.ellipsis=new i("ellipsis",{fontCharacter:"\\ea7c"}),i.kebabHorizontal=new i("kebab-horizontal",{fontCharacter:"\\ea7c"}),i.mailReply=new i("mail-reply",{fontCharacter:"\\ea7d"}),i.reply=new i("reply",{fontCharacter:"\\ea7d"}),i.organization=new i("organization",{fontCharacter:"\\ea7e"}),i.organizationFilled=new i("organization-filled",{fontCharacter:"\\ea7e"}),i.organizationOutline=new i("organization-outline",{fontCharacter:"\\ea7e"}),i.newFile=new i("new-file",{fontCharacter:"\\ea7f"}),i.fileAdd=new i("file-add",{fontCharacter:"\\ea7f"}),i.newFolder=new i("new-folder",{fontCharacter:"\\ea80"}),i.fileDirectoryCreate=new i("file-directory-create",{fontCharacter:"\\ea80"}),i.trash=new i("trash",{fontCharacter:"\\ea81"}),i.trashcan=new i("trashcan",{fontCharacter:"\\ea81"}),i.history=new i("history",{fontCharacter:"\\ea82"}),i.clock=new i("clock",{fontCharacter:"\\ea82"}),i.folder=new i("folder",{fontCharacter:"\\ea83"}),i.fileDirectory=new i("file-directory",{fontCharacter:"\\ea83"}),i.symbolFolder=new i("symbol-folder",{fontCharacter:"\\ea83"}),i.logoGithub=new i("logo-github",{fontCharacter:"\\ea84"}),i.markGithub=new i("mark-github",{fontCharacter:"\\ea84"}),i.github=new i("github",{fontCharacter:"\\ea84"}),i.terminal=new i("terminal",{fontCharacter:"\\ea85"}),i.console=new i("console",{fontCharacter:"\\ea85"}),i.repl=new i("repl",{fontCharacter:"\\ea85"}),i.zap=new i("zap",{fontCharacter:"\\ea86"}),i.symbolEvent=new i("symbol-event",{fontCharacter:"\\ea86"}),i.error=new i("error",{fontCharacter:"\\ea87"}),i.stop=new i("stop",{fontCharacter:"\\ea87"}),i.variable=new i("variable",{fontCharacter:"\\ea88"}),i.symbolVariable=new i("symbol-variable",{fontCharacter:"\\ea88"}),i.array=new i("array",{fontCharacter:"\\ea8a"}),i.symbolArray=new i("symbol-array",{fontCharacter:"\\ea8a"}),i.symbolModule=new i("symbol-module",{fontCharacter:"\\ea8b"}),i.symbolPackage=new i("symbol-package",{fontCharacter:"\\ea8b"}),i.symbolNamespace=new i("symbol-namespace",{fontCharacter:"\\ea8b"}),i.symbolObject=new i("symbol-object",{fontCharacter:"\\ea8b"}),i.symbolMethod=new i("symbol-method",{fontCharacter:"\\ea8c"}),i.symbolFunction=new i("symbol-function",{fontCharacter:"\\ea8c"}),i.symbolConstructor=new i("symbol-constructor",{fontCharacter:"\\ea8c"}),i.symbolBoolean=new i("symbol-boolean",{fontCharacter:"\\ea8f"}),i.symbolNull=new i("symbol-null",{fontCharacter:"\\ea8f"}),i.symbolNumeric=new i("symbol-numeric",{fontCharacter:"\\ea90"}),i.symbolNumber=new i("symbol-number",{fontCharacter:"\\ea90"}),i.symbolStructure=new i("symbol-structure",{fontCharacter:"\\ea91"}),i.symbolStruct=new i("symbol-struct",{fontCharacter:"\\ea91"}),i.symbolParameter=new i("symbol-parameter",{fontCharacter:"\\ea92"}),i.symbolTypeParameter=new i("symbol-type-parameter",{fontCharacter:"\\ea92"}),i.symbolKey=new i("symbol-key",{fontCharacter:"\\ea93"}),i.symbolText=new i("symbol-text",{fontCharacter:"\\ea93"}),i.symbolReference=new i("symbol-reference",{fontCharacter:"\\ea94"}),i.goToFile=new i("go-to-file",{fontCharacter:"\\ea94"}),i.symbolEnum=new i("symbol-enum",{fontCharacter:"\\ea95"}),i.symbolValue=new i("symbol-value",{fontCharacter:"\\ea95"}),i.symbolRuler=new i("symbol-ruler",{fontCharacter:"\\ea96"}),i.symbolUnit=new i("symbol-unit",{fontCharacter:"\\ea96"}),i.activateBreakpoints=new i("activate-breakpoints",{fontCharacter:"\\ea97"}),i.archive=new i("archive",{fontCharacter:"\\ea98"}),i.arrowBoth=new i("arrow-both",{fontCharacter:"\\ea99"}),i.arrowDown=new i("arrow-down",{fontCharacter:"\\ea9a"}),i.arrowLeft=new i("arrow-left",{fontCharacter:"\\ea9b"}),i.arrowRight=new i("arrow-right",{fontCharacter:"\\ea9c"}),i.arrowSmallDown=new i("arrow-small-down",{fontCharacter:"\\ea9d"}),i.arrowSmallLeft=new i("arrow-small-left",{fontCharacter:"\\ea9e"}),i.arrowSmallRight=new i("arrow-small-right",{fontCharacter:"\\ea9f"}),i.arrowSmallUp=new i("arrow-small-up",{fontCharacter:"\\eaa0"}),i.arrowUp=new i("arrow-up",{fontCharacter:"\\eaa1"}),i.bell=new i("bell",{fontCharacter:"\\eaa2"}),i.bold=new i("bold",{fontCharacter:"\\eaa3"}),i.book=new i("book",{fontCharacter:"\\eaa4"}),i.bookmark=new i("bookmark",{fontCharacter:"\\eaa5"}),i.debugBreakpointConditionalUnverified=new i("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),i.debugBreakpointConditional=new i("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),i.debugBreakpointConditionalDisabled=new i("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),i.debugBreakpointDataUnverified=new i("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),i.debugBreakpointData=new i("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),i.debugBreakpointDataDisabled=new i("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),i.debugBreakpointLogUnverified=new i("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),i.debugBreakpointLog=new i("debug-breakpoint-log",{fontCharacter:"\\eaab"}),i.debugBreakpointLogDisabled=new i("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),i.briefcase=new i("briefcase",{fontCharacter:"\\eaac"}),i.broadcast=new i("broadcast",{fontCharacter:"\\eaad"}),i.browser=new i("browser",{fontCharacter:"\\eaae"}),i.bug=new i("bug",{fontCharacter:"\\eaaf"}),i.calendar=new i("calendar",{fontCharacter:"\\eab0"}),i.caseSensitive=new i("case-sensitive",{fontCharacter:"\\eab1"}),i.check=new i("check",{fontCharacter:"\\eab2"}),i.checklist=new i("checklist",{fontCharacter:"\\eab3"}),i.chevronDown=new i("chevron-down",{fontCharacter:"\\eab4"}),i.dropDownButton=new i("drop-down-button",i.chevronDown.definition),i.chevronLeft=new i("chevron-left",{fontCharacter:"\\eab5"}),i.chevronRight=new i("chevron-right",{fontCharacter:"\\eab6"}),i.chevronUp=new i("chevron-up",{fontCharacter:"\\eab7"}),i.chromeClose=new i("chrome-close",{fontCharacter:"\\eab8"}),i.chromeMaximize=new i("chrome-maximize",{fontCharacter:"\\eab9"}),i.chromeMinimize=new i("chrome-minimize",{fontCharacter:"\\eaba"}),i.chromeRestore=new i("chrome-restore",{fontCharacter:"\\eabb"}),i.circleOutline=new i("circle-outline",{fontCharacter:"\\eabc"}),i.debugBreakpointUnverified=new i("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),i.circleSlash=new i("circle-slash",{fontCharacter:"\\eabd"}),i.circuitBoard=new i("circuit-board",{fontCharacter:"\\eabe"}),i.clearAll=new i("clear-all",{fontCharacter:"\\eabf"}),i.clippy=new i("clippy",{fontCharacter:"\\eac0"}),i.closeAll=new i("close-all",{fontCharacter:"\\eac1"}),i.cloudDownload=new i("cloud-download",{fontCharacter:"\\eac2"}),i.cloudUpload=new i("cloud-upload",{fontCharacter:"\\eac3"}),i.code=new i("code",{fontCharacter:"\\eac4"}),i.collapseAll=new i("collapse-all",{fontCharacter:"\\eac5"}),i.colorMode=new i("color-mode",{fontCharacter:"\\eac6"}),i.commentDiscussion=new i("comment-discussion",{fontCharacter:"\\eac7"}),i.compareChanges=new i("compare-changes",{fontCharacter:"\\eafd"}),i.creditCard=new i("credit-card",{fontCharacter:"\\eac9"}),i.dash=new i("dash",{fontCharacter:"\\eacc"}),i.dashboard=new i("dashboard",{fontCharacter:"\\eacd"}),i.database=new i("database",{fontCharacter:"\\eace"}),i.debugContinue=new i("debug-continue",{fontCharacter:"\\eacf"}),i.debugDisconnect=new i("debug-disconnect",{fontCharacter:"\\ead0"}),i.debugPause=new i("debug-pause",{fontCharacter:"\\ead1"}),i.debugRestart=new i("debug-restart",{fontCharacter:"\\ead2"}),i.debugStart=new i("debug-start",{fontCharacter:"\\ead3"}),i.debugStepInto=new i("debug-step-into",{fontCharacter:"\\ead4"}),i.debugStepOut=new i("debug-step-out",{fontCharacter:"\\ead5"}),i.debugStepOver=new i("debug-step-over",{fontCharacter:"\\ead6"}),i.debugStop=new i("debug-stop",{fontCharacter:"\\ead7"}),i.debug=new i("debug",{fontCharacter:"\\ead8"}),i.deviceCameraVideo=new i("device-camera-video",{fontCharacter:"\\ead9"}),i.deviceCamera=new i("device-camera",{fontCharacter:"\\eada"}),i.deviceMobile=new i("device-mobile",{fontCharacter:"\\eadb"}),i.diffAdded=new i("diff-added",{fontCharacter:"\\eadc"}),i.diffIgnored=new i("diff-ignored",{fontCharacter:"\\eadd"}),i.diffModified=new i("diff-modified",{fontCharacter:"\\eade"}),i.diffRemoved=new i("diff-removed",{fontCharacter:"\\eadf"}),i.diffRenamed=new i("diff-renamed",{fontCharacter:"\\eae0"}),i.diff=new i("diff",{fontCharacter:"\\eae1"}),i.discard=new i("discard",{fontCharacter:"\\eae2"}),i.editorLayout=new i("editor-layout",{fontCharacter:"\\eae3"}),i.emptyWindow=new i("empty-window",{fontCharacter:"\\eae4"}),i.exclude=new i("exclude",{fontCharacter:"\\eae5"}),i.extensions=new i("extensions",{fontCharacter:"\\eae6"}),i.eyeClosed=new i("eye-closed",{fontCharacter:"\\eae7"}),i.fileBinary=new i("file-binary",{fontCharacter:"\\eae8"}),i.fileCode=new i("file-code",{fontCharacter:"\\eae9"}),i.fileMedia=new i("file-media",{fontCharacter:"\\eaea"}),i.filePdf=new i("file-pdf",{fontCharacter:"\\eaeb"}),i.fileSubmodule=new i("file-submodule",{fontCharacter:"\\eaec"}),i.fileSymlinkDirectory=new i("file-symlink-directory",{fontCharacter:"\\eaed"}),i.fileSymlinkFile=new i("file-symlink-file",{fontCharacter:"\\eaee"}),i.fileZip=new i("file-zip",{fontCharacter:"\\eaef"}),i.files=new i("files",{fontCharacter:"\\eaf0"}),i.filter=new i("filter",{fontCharacter:"\\eaf1"}),i.flame=new i("flame",{fontCharacter:"\\eaf2"}),i.foldDown=new i("fold-down",{fontCharacter:"\\eaf3"}),i.foldUp=new i("fold-up",{fontCharacter:"\\eaf4"}),i.fold=new i("fold",{fontCharacter:"\\eaf5"}),i.folderActive=new i("folder-active",{fontCharacter:"\\eaf6"}),i.folderOpened=new i("folder-opened",{fontCharacter:"\\eaf7"}),i.gear=new i("gear",{fontCharacter:"\\eaf8"}),i.gift=new i("gift",{fontCharacter:"\\eaf9"}),i.gistSecret=new i("gist-secret",{fontCharacter:"\\eafa"}),i.gist=new i("gist",{fontCharacter:"\\eafb"}),i.gitCommit=new i("git-commit",{fontCharacter:"\\eafc"}),i.gitCompare=new i("git-compare",{fontCharacter:"\\eafd"}),i.gitMerge=new i("git-merge",{fontCharacter:"\\eafe"}),i.githubAction=new i("github-action",{fontCharacter:"\\eaff"}),i.githubAlt=new i("github-alt",{fontCharacter:"\\eb00"}),i.globe=new i("globe",{fontCharacter:"\\eb01"}),i.grabber=new i("grabber",{fontCharacter:"\\eb02"}),i.graph=new i("graph",{fontCharacter:"\\eb03"}),i.gripper=new i("gripper",{fontCharacter:"\\eb04"}),i.heart=new i("heart",{fontCharacter:"\\eb05"}),i.home=new i("home",{fontCharacter:"\\eb06"}),i.horizontalRule=new i("horizontal-rule",{fontCharacter:"\\eb07"}),i.hubot=new i("hubot",{fontCharacter:"\\eb08"}),i.inbox=new i("inbox",{fontCharacter:"\\eb09"}),i.issueClosed=new i("issue-closed",{fontCharacter:"\\eba4"}),i.issueReopened=new i("issue-reopened",{fontCharacter:"\\eb0b"}),i.issues=new i("issues",{fontCharacter:"\\eb0c"}),i.italic=new i("italic",{fontCharacter:"\\eb0d"}),i.jersey=new i("jersey",{fontCharacter:"\\eb0e"}),i.json=new i("json",{fontCharacter:"\\eb0f"}),i.kebabVertical=new i("kebab-vertical",{fontCharacter:"\\eb10"}),i.key=new i("key",{fontCharacter:"\\eb11"}),i.law=new i("law",{fontCharacter:"\\eb12"}),i.lightbulbAutofix=new i("lightbulb-autofix",{fontCharacter:"\\eb13"}),i.linkExternal=new i("link-external",{fontCharacter:"\\eb14"}),i.link=new i("link",{fontCharacter:"\\eb15"}),i.listOrdered=new i("list-ordered",{fontCharacter:"\\eb16"}),i.listUnordered=new i("list-unordered",{fontCharacter:"\\eb17"}),i.liveShare=new i("live-share",{fontCharacter:"\\eb18"}),i.loading=new i("loading",{fontCharacter:"\\eb19"}),i.location=new i("location",{fontCharacter:"\\eb1a"}),i.mailRead=new i("mail-read",{fontCharacter:"\\eb1b"}),i.mail=new i("mail",{fontCharacter:"\\eb1c"}),i.markdown=new i("markdown",{fontCharacter:"\\eb1d"}),i.megaphone=new i("megaphone",{fontCharacter:"\\eb1e"}),i.mention=new i("mention",{fontCharacter:"\\eb1f"}),i.milestone=new i("milestone",{fontCharacter:"\\eb20"}),i.mortarBoard=new i("mortar-board",{fontCharacter:"\\eb21"}),i.move=new i("move",{fontCharacter:"\\eb22"}),i.multipleWindows=new i("multiple-windows",{fontCharacter:"\\eb23"}),i.mute=new i("mute",{fontCharacter:"\\eb24"}),i.noNewline=new i("no-newline",{fontCharacter:"\\eb25"}),i.note=new i("note",{fontCharacter:"\\eb26"}),i.octoface=new i("octoface",{fontCharacter:"\\eb27"}),i.openPreview=new i("open-preview",{fontCharacter:"\\eb28"}),i.package_=new i("package",{fontCharacter:"\\eb29"}),i.paintcan=new i("paintcan",{fontCharacter:"\\eb2a"}),i.pin=new i("pin",{fontCharacter:"\\eb2b"}),i.play=new i("play",{fontCharacter:"\\eb2c"}),i.run=new i("run",{fontCharacter:"\\eb2c"}),i.plug=new i("plug",{fontCharacter:"\\eb2d"}),i.preserveCase=new i("preserve-case",{fontCharacter:"\\eb2e"}),i.preview=new i("preview",{fontCharacter:"\\eb2f"}),i.project=new i("project",{fontCharacter:"\\eb30"}),i.pulse=new i("pulse",{fontCharacter:"\\eb31"}),i.question=new i("question",{fontCharacter:"\\eb32"}),i.quote=new i("quote",{fontCharacter:"\\eb33"}),i.radioTower=new i("radio-tower",{fontCharacter:"\\eb34"}),i.reactions=new i("reactions",{fontCharacter:"\\eb35"}),i.references=new i("references",{fontCharacter:"\\eb36"}),i.refresh=new i("refresh",{fontCharacter:"\\eb37"}),i.regex=new i("regex",{fontCharacter:"\\eb38"}),i.remoteExplorer=new i("remote-explorer",{fontCharacter:"\\eb39"}),i.remote=new i("remote",{fontCharacter:"\\eb3a"}),i.remove=new i("remove",{fontCharacter:"\\eb3b"}),i.replaceAll=new i("replace-all",{fontCharacter:"\\eb3c"}),i.replace=new i("replace",{fontCharacter:"\\eb3d"}),i.repoClone=new i("repo-clone",{fontCharacter:"\\eb3e"}),i.repoForcePush=new i("repo-force-push",{fontCharacter:"\\eb3f"}),i.repoPull=new i("repo-pull",{fontCharacter:"\\eb40"}),i.repoPush=new i("repo-push",{fontCharacter:"\\eb41"}),i.report=new i("report",{fontCharacter:"\\eb42"}),i.requestChanges=new i("request-changes",{fontCharacter:"\\eb43"}),i.rocket=new i("rocket",{fontCharacter:"\\eb44"}),i.rootFolderOpened=new i("root-folder-opened",{fontCharacter:"\\eb45"}),i.rootFolder=new i("root-folder",{fontCharacter:"\\eb46"}),i.rss=new i("rss",{fontCharacter:"\\eb47"}),i.ruby=new i("ruby",{fontCharacter:"\\eb48"}),i.saveAll=new i("save-all",{fontCharacter:"\\eb49"}),i.saveAs=new i("save-as",{fontCharacter:"\\eb4a"}),i.save=new i("save",{fontCharacter:"\\eb4b"}),i.screenFull=new i("screen-full",{fontCharacter:"\\eb4c"}),i.screenNormal=new i("screen-normal",{fontCharacter:"\\eb4d"}),i.searchStop=new i("search-stop",{fontCharacter:"\\eb4e"}),i.server=new i("server",{fontCharacter:"\\eb50"}),i.settingsGear=new i("settings-gear",{fontCharacter:"\\eb51"}),i.settings=new i("settings",{fontCharacter:"\\eb52"}),i.shield=new i("shield",{fontCharacter:"\\eb53"}),i.smiley=new i("smiley",{fontCharacter:"\\eb54"}),i.sortPrecedence=new i("sort-precedence",{fontCharacter:"\\eb55"}),i.splitHorizontal=new i("split-horizontal",{fontCharacter:"\\eb56"}),i.splitVertical=new i("split-vertical",{fontCharacter:"\\eb57"}),i.squirrel=new i("squirrel",{fontCharacter:"\\eb58"}),i.starFull=new i("star-full",{fontCharacter:"\\eb59"}),i.starHalf=new i("star-half",{fontCharacter:"\\eb5a"}),i.symbolClass=new i("symbol-class",{fontCharacter:"\\eb5b"}),i.symbolColor=new i("symbol-color",{fontCharacter:"\\eb5c"}),i.symbolConstant=new i("symbol-constant",{fontCharacter:"\\eb5d"}),i.symbolEnumMember=new i("symbol-enum-member",{fontCharacter:"\\eb5e"}),i.symbolField=new i("symbol-field",{fontCharacter:"\\eb5f"}),i.symbolFile=new i("symbol-file",{fontCharacter:"\\eb60"}),i.symbolInterface=new i("symbol-interface",{fontCharacter:"\\eb61"}),i.symbolKeyword=new i("symbol-keyword",{fontCharacter:"\\eb62"}),i.symbolMisc=new i("symbol-misc",{fontCharacter:"\\eb63"}),i.symbolOperator=new i("symbol-operator",{fontCharacter:"\\eb64"}),i.symbolProperty=new i("symbol-property",{fontCharacter:"\\eb65"}),i.wrench=new i("wrench",{fontCharacter:"\\eb65"}),i.wrenchSubaction=new i("wrench-subaction",{fontCharacter:"\\eb65"}),i.symbolSnippet=new i("symbol-snippet",{fontCharacter:"\\eb66"}),i.tasklist=new i("tasklist",{fontCharacter:"\\eb67"}),i.telescope=new i("telescope",{fontCharacter:"\\eb68"}),i.textSize=new i("text-size",{fontCharacter:"\\eb69"}),i.threeBars=new i("three-bars",{fontCharacter:"\\eb6a"}),i.thumbsdown=new i("thumbsdown",{fontCharacter:"\\eb6b"}),i.thumbsup=new i("thumbsup",{fontCharacter:"\\eb6c"}),i.tools=new i("tools",{fontCharacter:"\\eb6d"}),i.triangleDown=new i("triangle-down",{fontCharacter:"\\eb6e"}),i.triangleLeft=new i("triangle-left",{fontCharacter:"\\eb6f"}),i.triangleRight=new i("triangle-right",{fontCharacter:"\\eb70"}),i.triangleUp=new i("triangle-up",{fontCharacter:"\\eb71"}),i.twitter=new i("twitter",{fontCharacter:"\\eb72"}),i.unfold=new i("unfold",{fontCharacter:"\\eb73"}),i.unlock=new i("unlock",{fontCharacter:"\\eb74"}),i.unmute=new i("unmute",{fontCharacter:"\\eb75"}),i.unverified=new i("unverified",{fontCharacter:"\\eb76"}),i.verified=new i("verified",{fontCharacter:"\\eb77"}),i.versions=new i("versions",{fontCharacter:"\\eb78"}),i.vmActive=new i("vm-active",{fontCharacter:"\\eb79"}),i.vmOutline=new i("vm-outline",{fontCharacter:"\\eb7a"}),i.vmRunning=new i("vm-running",{fontCharacter:"\\eb7b"}),i.watch=new i("watch",{fontCharacter:"\\eb7c"}),i.whitespace=new i("whitespace",{fontCharacter:"\\eb7d"}),i.wholeWord=new i("whole-word",{fontCharacter:"\\eb7e"}),i.window=new i("window",{fontCharacter:"\\eb7f"}),i.wordWrap=new i("word-wrap",{fontCharacter:"\\eb80"}),i.zoomIn=new i("zoom-in",{fontCharacter:"\\eb81"}),i.zoomOut=new i("zoom-out",{fontCharacter:"\\eb82"}),i.listFilter=new i("list-filter",{fontCharacter:"\\eb83"}),i.listFlat=new i("list-flat",{fontCharacter:"\\eb84"}),i.listSelection=new i("list-selection",{fontCharacter:"\\eb85"}),i.selection=new i("selection",{fontCharacter:"\\eb85"}),i.listTree=new i("list-tree",{fontCharacter:"\\eb86"}),i.debugBreakpointFunctionUnverified=new i("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),i.debugBreakpointFunction=new i("debug-breakpoint-function",{fontCharacter:"\\eb88"}),i.debugBreakpointFunctionDisabled=new i("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),i.debugStackframeActive=new i("debug-stackframe-active",{fontCharacter:"\\eb89"}),i.debugStackframeDot=new i("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),i.debugStackframe=new i("debug-stackframe",{fontCharacter:"\\eb8b"}),i.debugStackframeFocused=new i("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),i.debugBreakpointUnsupported=new i("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),i.symbolString=new i("symbol-string",{fontCharacter:"\\eb8d"}),i.debugReverseContinue=new i("debug-reverse-continue",{fontCharacter:"\\eb8e"}),i.debugStepBack=new i("debug-step-back",{fontCharacter:"\\eb8f"}),i.debugRestartFrame=new i("debug-restart-frame",{fontCharacter:"\\eb90"}),i.callIncoming=new i("call-incoming",{fontCharacter:"\\eb92"}),i.callOutgoing=new i("call-outgoing",{fontCharacter:"\\eb93"}),i.menu=new i("menu",{fontCharacter:"\\eb94"}),i.expandAll=new i("expand-all",{fontCharacter:"\\eb95"}),i.feedback=new i("feedback",{fontCharacter:"\\eb96"}),i.groupByRefType=new i("group-by-ref-type",{fontCharacter:"\\eb97"}),i.ungroupByRefType=new i("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),i.account=new i("account",{fontCharacter:"\\eb99"}),i.bellDot=new i("bell-dot",{fontCharacter:"\\eb9a"}),i.debugConsole=new i("debug-console",{fontCharacter:"\\eb9b"}),i.library=new i("library",{fontCharacter:"\\eb9c"}),i.output=new i("output",{fontCharacter:"\\eb9d"}),i.runAll=new i("run-all",{fontCharacter:"\\eb9e"}),i.syncIgnored=new i("sync-ignored",{fontCharacter:"\\eb9f"}),i.pinned=new i("pinned",{fontCharacter:"\\eba0"}),i.githubInverted=new i("github-inverted",{fontCharacter:"\\eba1"}),i.debugAlt=new i("debug-alt",{fontCharacter:"\\eb91"}),i.serverProcess=new i("server-process",{fontCharacter:"\\eba2"}),i.serverEnvironment=new i("server-environment",{fontCharacter:"\\eba3"}),i.pass=new i("pass",{fontCharacter:"\\eba4"}),i.stopCircle=new i("stop-circle",{fontCharacter:"\\eba5"}),i.playCircle=new i("play-circle",{fontCharacter:"\\eba6"}),i.record=new i("record",{fontCharacter:"\\eba7"}),i.debugAltSmall=new i("debug-alt-small",{fontCharacter:"\\eba8"}),i.vmConnect=new i("vm-connect",{fontCharacter:"\\eba9"}),i.cloud=new i("cloud",{fontCharacter:"\\ebaa"}),i.merge=new i("merge",{fontCharacter:"\\ebab"}),i.exportIcon=new i("export",{fontCharacter:"\\ebac"}),i.graphLeft=new i("graph-left",{fontCharacter:"\\ebad"}),i.magnet=new i("magnet",{fontCharacter:"\\ebae"}),i.notebook=new i("notebook",{fontCharacter:"\\ebaf"}),i.redo=new i("redo",{fontCharacter:"\\ebb0"}),i.checkAll=new i("check-all",{fontCharacter:"\\ebb1"}),i.pinnedDirty=new i("pinned-dirty",{fontCharacter:"\\ebb2"}),i.passFilled=new i("pass-filled",{fontCharacter:"\\ebb3"}),i.circleLargeFilled=new i("circle-large-filled",{fontCharacter:"\\ebb4"}),i.circleLargeOutline=new i("circle-large-outline",{fontCharacter:"\\ebb5"}),i.combine=new i("combine",{fontCharacter:"\\ebb6"}),i.gather=new i("gather",{fontCharacter:"\\ebb6"}),i.table=new i("table",{fontCharacter:"\\ebb7"}),i.variableGroup=new i("variable-group",{fontCharacter:"\\ebb8"}),i.typeHierarchy=new i("type-hierarchy",{fontCharacter:"\\ebb9"}),i.typeHierarchySub=new i("type-hierarchy-sub",{fontCharacter:"\\ebba"}),i.typeHierarchySuper=new i("type-hierarchy-super",{fontCharacter:"\\ebbb"}),i.gitPullRequestCreate=new i("git-pull-request-create",{fontCharacter:"\\ebbc"}),i.runAbove=new i("run-above",{fontCharacter:"\\ebbd"}),i.runBelow=new i("run-below",{fontCharacter:"\\ebbe"}),i.notebookTemplate=new i("notebook-template",{fontCharacter:"\\ebbf"}),i.debugRerun=new i("debug-rerun",{fontCharacter:"\\ebc0"}),i.workspaceTrusted=new i("workspace-trusted",{fontCharacter:"\\ebc1"}),i.workspaceUntrusted=new i("workspace-untrusted",{fontCharacter:"\\ebc2"}),i.workspaceUnspecified=new i("workspace-unspecified",{fontCharacter:"\\ebc3"}),i.terminalCmd=new i("terminal-cmd",{fontCharacter:"\\ebc4"}),i.terminalDebian=new i("terminal-debian",{fontCharacter:"\\ebc5"}),i.terminalLinux=new i("terminal-linux",{fontCharacter:"\\ebc6"}),i.terminalPowershell=new i("terminal-powershell",{fontCharacter:"\\ebc7"}),i.terminalTmux=new i("terminal-tmux",{fontCharacter:"\\ebc8"}),i.terminalUbuntu=new i("terminal-ubuntu",{fontCharacter:"\\ebc9"}),i.terminalBash=new i("terminal-bash",{fontCharacter:"\\ebca"}),i.arrowSwap=new i("arrow-swap",{fontCharacter:"\\ebcb"}),i.copy=new i("copy",{fontCharacter:"\\ebcc"}),i.personAdd=new i("person-add",{fontCharacter:"\\ebcd"}),i.filterFilled=new i("filter-filled",{fontCharacter:"\\ebce"}),i.wand=new i("wand",{fontCharacter:"\\ebcf"}),i.debugLineByLine=new i("debug-line-by-line",{fontCharacter:"\\ebd0"}),i.inspect=new i("inspect",{fontCharacter:"\\ebd1"}),i.layers=new i("layers",{fontCharacter:"\\ebd2"}),i.layersDot=new i("layers-dot",{fontCharacter:"\\ebd3"}),i.layersActive=new i("layers-active",{fontCharacter:"\\ebd4"}),i.compass=new i("compass",{fontCharacter:"\\ebd5"}),i.compassDot=new i("compass-dot",{fontCharacter:"\\ebd6"}),i.compassActive=new i("compass-active",{fontCharacter:"\\ebd7"}),i.azure=new i("azure",{fontCharacter:"\\ebd8"}),i.issueDraft=new i("issue-draft",{fontCharacter:"\\ebd9"}),i.gitPullRequestClosed=new i("git-pull-request-closed",{fontCharacter:"\\ebda"}),i.gitPullRequestDraft=new i("git-pull-request-draft",{fontCharacter:"\\ebdb"}),i.debugAll=new i("debug-all",{fontCharacter:"\\ebdc"}),i.debugCoverage=new i("debug-coverage",{fontCharacter:"\\ebdd"}),i.runErrors=new i("run-errors",{fontCharacter:"\\ebde"}),i.folderLibrary=new i("folder-library",{fontCharacter:"\\ebdf"}),i.debugContinueSmall=new i("debug-continue-small",{fontCharacter:"\\ebe0"}),i.beakerStop=new i("beaker-stop",{fontCharacter:"\\ebe1"}),i.graphLine=new i("graph-line",{fontCharacter:"\\ebe2"}),i.graphScatter=new i("graph-scatter",{fontCharacter:"\\ebe3"}),i.pieChart=new i("pie-chart",{fontCharacter:"\\ebe4"}),i.bracket=new i("bracket",i.json.definition),i.bracketDot=new i("bracket-dot",{fontCharacter:"\\ebe5"}),i.bracketError=new i("bracket-error",{fontCharacter:"\\ebe6"}),i.lockSmall=new i("lock-small",{fontCharacter:"\\ebe7"}),i.azureDevops=new i("azure-devops",{fontCharacter:"\\ebe8"}),i.verifiedFilled=new i("verified-filled",{fontCharacter:"\\ebe9"})}(G||(G={}))},"VrN/":function(st,be,Q){(function(ie,$){st.exports=$()})(this,function(){"use strict";var ie=navigator.userAgent,$=navigator.platform,M=/gecko\/\d/i.test(ie),X=/MSIE \d/.test(ie),F=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),U=/Edge\/(\d+)/.exec(ie),G=X||F||U,W=G&&(X?document.documentMode||6:+(U||F)[1]),i=!U&&/WebKit\//.test(ie),D=i&&/Qt\/\d+\.\d+/.test(ie),g=!U&&/Chrome\//.test(ie),m=/Opera\//.test(ie),p=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),u=/PhantomJS/.test(ie),f=!U&&/AppleWebKit/.test(ie)&&/Mobile\/\w+/.test(ie),o=/Android/.test(ie),h=f||o||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),s=f||/Mac/.test($),a=/\bCrOS\b/.test(ie),A=/win/i.test($),_=m&&ie.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(m=!1,i=!0);var S=s&&(D||m&&(_==null||_<12.11)),L=M||G&&W>=9;function R(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=function(e,t){var n=e.className,r=R(t).exec(n);if(r){var d=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(d?r[1]+d:"")}};function w(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return w(e).appendChild(t)}function c(e,t,n,r){var d=document.createElement(e);if(n&&(d.className=n),r&&(d.style.cssText=r),typeof t=="string")d.appendChild(document.createTextNode(t));else if(t)for(var k=0;k=t)return K+(t-k);K+=J-k,K+=n-K%n,k=J+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(K,t-d);if(d+=k-r,d+=n-d%n,r=k+1,d>=t)return r}}var se=[""];function ae(e){for(;se.length<=e;)se.push(Oe(se)+" ");return se[e]}function Oe(e){return e[e.length-1]}function Te(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Le.test(e))}function Ge(e,t){return t?t.source.indexOf("\\w")>-1&&Be(e)?!0:t.test(e):Be(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ye=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function we(e){return e.charCodeAt(0)>=768&&ye.test(e)}function Ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var d=(t+n)/2,k=r<0?Math.ceil(d):Math.floor(d);if(k==t)return e(k)?t:n;e(k)?n=k:t=k+r}}function Ve(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var d=!1,k=0;kt||t==n&&K.to==t)&&(r(Math.max(K.from,t),Math.min(K.to,n),K.level==1?"rtl":"ltr",k),d=!0)}d||r(t,n,"ltr")}var Ze=null;function $e(e,t,n){var r;Ze=null;for(var d=0;dt)return d;k.to==t&&(k.from!=k.to&&n=="before"?r=d:Ze=d),k.from==t&&(k.from!=k.to&&n!="before"?r=d:Ze=d)}return r!=null?r:Ze}var tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(te){return te<=247?e.charAt(te):1424<=te&&te<=1524?"R":1536<=te&&te<=1785?t.charAt(te-1536):1774<=te&&te<=2220?"r":8192<=te&&te<=8203?"w":te==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,k=/[LRr]/,K=/[Lb1n]/,J=/[1n]/;function Z(te,de,me){this.level=te,this.from=de,this.to=me}return function(te,de){var me=de=="ltr"?"L":"R";if(te.length==0||de=="ltr"&&!r.test(te))return!1;for(var Ie=te.length,Re=[],He=0;He-1&&(r[t]=d.slice(0,k).concat(d.slice(k+1)))}}}function Fe(e,t){var n=ut(e,t);if(!n.length)return;for(var r=Array.prototype.slice.call(arguments,2),d=0;d0}function _e(e){e.prototype.on=function(t,n){Me(this,t,n)},e.prototype.off=function(t,n){rt(this,t,n)}}function re(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function he(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function fe(e){re(e),ne(e)}function xe(e){return e.target||e.srcElement}function Pe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var ze=function(){if(G&&W<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),ot;function mt(e){if(ot==null){var t=c("span","\u200B");x(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ot=t.offsetWidth<=1&&t.offsetHeight>2&&!(G&&W<8))}var n=ot?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var ft;function wt(e){if(ft!=null)return ft;var t=x(e,document.createTextNode("A\u062EA")),n=y(t,0,1).getBoundingClientRect(),r=y(t,1,2).getBoundingClientRect();return w(e),!n||n.left==n.right?!1:ft=r.right-n.right<3}var St=` -b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var d=e.indexOf(` -`,t);d==-1&&(d=e.length);var k=e.slice(t,e.charAt(d-1)=="\r"?d-1:d),K=k.indexOf("\r");K!=-1?(r.push(k.slice(0,K)),t+=K+1):(r.push(k),t=d+1)}return r}:function(e){return e.split(/\r\n?|\n/)},dt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ut=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Lt=null;function qt(e){if(Lt!=null)return Lt;var t=x(e,c("span","x")),r=t.getBoundingClientRect(),n=y(t,0,1).getBoundingClientRect();return Lt=Math.abs(r.left-n.left)>1}var Qt={},It={};function Ci(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Qt[e]=t}function Ki(e,t){It[e]=t}function yt(e){if(typeof e=="string"&&It.hasOwnProperty(e))e=It[e];else if(e&&typeof e.name=="string"&&It.hasOwnProperty(e.name)){var t=It[e.name];typeof t=="string"&&(t={name:t}),e=We(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return yt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return yt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Li(e,t){t=yt(t);var r=Qt[t.name];if(!r)return Li(e,"text/plain");var n=r(e,t);if(bt.hasOwnProperty(t.name)){var d=bt[t.name];for(var k in d){if(!d.hasOwnProperty(k))continue;n.hasOwnProperty(k)&&(n["_"+k]=n[k]),n[k]=d[k]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var K in t.modeProps)n[K]=t.modeProps[K];return n}var bt={};function xt(e,t){var r=bt.hasOwnProperty(e)?bt[e]:bt[e]={};b(t,r)}function Ft(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var d=t[n];d instanceof Array&&(d=d.concat([])),r[n]=d}return r}function ti(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function di(e,t,r){return e.startState?e.startState(t,r):!0}var Pt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.post},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos0?null:(k&&t!==!1&&(this.pos+=k[0].length),k)}},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ct(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var d=r.children[n],k=d.chunkSize();if(t=e.first&&tr?Qe(r,ct(e,r).text.length):I(t,ct(e,t.line).text.length)}function I(e,t){var r=e.ch;return r==null||r>t?Qe(e.line,t):r<0?Qe(e.line,0):e}function H(e,t){for(var r=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},z.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},z.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},z.fromSaved=function(e,t,r){return t instanceof q?new z(e,Ft(e.mode,t.state),r,t.lookAhead):new z(e,Ft(e.mode,t),r)},z.prototype.save=function(e){var t=e!==!1?Ft(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new q(t,this.maxLookAhead):t};function ve(e,t,r,n){var d=[e.state.modeGen],k={};Ei(e,t.text,e.doc.mode,r,function(te,de){return d.push(te,de)},k,n);for(var K=r.state,J=function(te){r.baseTokens=d;var de=e.state.overlays[te],me=1,Ie=0;r.state=!0,Ei(e,t.text,de.mode,r,function(Re,He){for(var Xe=me;IeRe&&d.splice(me,1,Re,d[me+1],qe),me+=2,Ie=Math.min(Re,qe)}if(!He)return;if(de.opaque)d.splice(Xe,me-Xe,Re,"overlay "+He),me=Xe+2;else for(;Xee.options.maxHighlightLength&&Ft(e.doc.mode,n.state),k=ve(e,t,n);d&&(n.state=d),t.stateAfter=n.save(!d),t.styles=k.styles,k.classes?t.styleClasses=k.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function it(e,t,r){var n=e.doc,d=e.display;if(!n.mode.startState)return new z(n,!0,t);var k=xi(e,t,r),K=k>n.first&&ct(n,k-1).stateAfter,J=K?z.fromSaved(n,K,k):new z(n,di(n.mode),k);return n.iter(k,t,function(Z){pt(e,Z.text,J);var te=J.line;Z.stateAfter=te==t-1||te%5==0||te>=d.viewFrom&&tet.start)return k}throw new Error("Mode "+e.name+" failed to advance stream.")}var jt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function $t(e,t,r,n){var d=e.doc,k=d.mode,K;t=E(d,t);var J=ct(d,t.line),Z=it(e,t.line,r),te=new Pt(J.text,e.options.tabSize,Z),de;for(n&&(de=[]);(n||te.pose.options.maxHighlightLength?(J=!1,K&&pt(e,t,n,de.pos),de.pos=t.length,me=null):me=ji(_t(r,de,n.state,Ie),k),Ie){var Re=Ie[0].name;Re&&(me="m-"+(me?Re+" "+me:Re))}if(!J||te!=me){for(;ZK;--J){if(J<=k.first)return k.first;var Z=ct(k,J-1),te=Z.stateAfter;if(te&&(!r||J+(te instanceof q?te.lookAhead:0)<=k.modeFrontier))return J;var de=Y(Z.text,null,e.options.tabSize);(d==null||n>de)&&(d=J-1,n=de)}return d}function Qi(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierr;n--){var d=ct(e,n).stateAfter;if(d&&(!(d instanceof q)||n+d.lookAhead=t:k.to>t);(n||(n=[])).push(new hn(K,k.from,Z?null:k.to))}}return n}function Vn(e,t,r){var n;if(e)for(var d=0;d=t:k.to>t);if(J||k.from==t&&K.type=="bookmark"&&(!r||k.marker.insertLeft)){var Z=k.from==null||(K.inclusiveLeft?k.from<=t:k.from0&&J)for(var ht=0;ht0)continue;var de=[Z,1],me=Ct(te.from,J.from),Ie=Ct(te.to,J.to);(me<0||!K.inclusiveLeft&&!me)&&de.push({from:te.from,to:J.from}),(Ie>0||!K.inclusiveRight&&!Ie)&&de.push({from:J.to,to:te.to}),d.splice.apply(d,de),Z+=de.length-3}return d}function dr(e){var t=e.markedSpans;if(!t)return;for(var r=0;rt)&&(!n||yi(n,k.marker)<0)&&(n=k.marker)}return n}function fi(e,t,r,n,d){var k=ct(e,t),K=ci&&k.markedSpans;if(K)for(var J=0;J=0&&me<=0||de<=0&&me>=0)continue;if(de<=0&&(Z.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.to,r)>=0:Ct(te.to,r)>0)||de>=0&&(Z.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.from,n)<=0:Ct(te.from,n)<0))return!0}}function Ai(e){for(var t;t=ai(e);)e=t.find(-1,!0).line;return e}function Yn(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function xn(e){for(var t,r;t=Kt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function cr(e,t){var r=ct(e,t),n=Ai(r);return r==n?t:Ot(n)}function Tn(e,t){if(t>e.lastLine())return t;var r=ct(e,t),n;if(!an(e,r))return t;for(;n=Kt(r);)r=n.find(1,!0).line;return Ot(r)+1}function an(e,t){var r=ci&&t.markedSpans;if(r)for(var n=void 0,d=0;dt.maxLineLength&&(t.maxLineLength=d,t.maxLine=n)})}var Mn=function(e,t,r){this.text=e,En(this,t),this.height=r?r(this):1};Mn.prototype.lineNo=function(){return Ot(this)},_e(Mn);function ua(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dr(e),En(e,r);var d=n?n(e):1;d!=e.height&&Jt(e,d)}function gt(e){e.parent=null,dr(e)}var At={},Et={};function Dt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Et:At;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Bt(e,t){var r=T("span",null,null,i?"padding-right: .1px":null),n={pre:T("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var d=0;d<=(t.rest?t.rest.length:0);d++){var k=d?t.rest[d-1]:t.line,K=void 0;n.pos=0,n.addToken=Nt,wt(e.display.measure)&&(K=et(k,e.doc.direction))&&(n.addToken=Di(n.addToken,K)),n.map=[];var J=t!=e.display.externalMeasured&&Ot(k);dn(k,n,Ke(e,k,J)),k.styleClasses&&(k.styleClasses.bgClass&&(n.bgClass=O(k.styleClasses.bgClass,n.bgClass||"")),k.styleClasses.textClass&&(n.textClass=O(k.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(mt(e.display.measure))),d==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(i){var Z=n.content.lastChild;(/\bcm-tab\b/.test(Z.className)||Z.querySelector&&Z.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Fe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=O(n.pre.className,n.textClass||"")),n}function Yt(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nt(e,t,r,n,d,k,K){if(!t)return;var J=e.splitSpaces?ui(t,e.trailingSpace):t,Z=e.cm.state.specialChars,te=!1,de;if(!Z.test(t))e.col+=t.length,de=document.createTextNode(J),e.map.push(e.pos,e.pos+t.length,de),G&&W<9&&(te=!0),e.pos+=t.length;else{de=document.createDocumentFragment();for(var me=0;;){Z.lastIndex=me;var Ie=Z.exec(t),Re=Ie?Ie.index-me:t.length-me;if(Re){var He=document.createTextNode(J.slice(me,me+Re));G&&W<9?de.appendChild(c("span",[He])):de.appendChild(He),e.map.push(e.pos,e.pos+Re,He),e.col+=Re,e.pos+=Re}if(!Ie)break;me+=Re+1;var Xe=void 0;if(Ie[0]==" "){var qe=e.cm.options.tabSize,rt=qe-e.col%qe;Xe=de.appendChild(c("span",ae(rt),"cm-tab")),Xe.setAttribute("role","presentation"),Xe.setAttribute("cm-text"," "),e.col+=rt}else Ie[0]=="\r"||Ie[0]==` -`?(Xe=de.appendChild(c("span",Ie[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Xe.setAttribute("cm-text",Ie[0]),e.col+=1):(Xe=e.cm.options.specialCharPlaceholder(Ie[0]),Xe.setAttribute("cm-text",Ie[0]),G&&W<9?de.appendChild(c("span",[Xe])):de.appendChild(Xe),e.col+=1);e.map.push(e.pos,e.pos+1,Xe),e.pos++}}if(e.trailingSpace=J.charCodeAt(t.length-1)==32,r||n||d||te||k||K){var lt=r||"";n&&(lt+=n),d&&(lt+=d);var at=c("span",[de],lt,k);if(K)for(var ht in K)K.hasOwnProperty(ht)&&ht!="style"&&ht!="class"&&at.setAttribute(ht,K[ht]);return e.content.appendChild(at)}e.content.appendChild(de)}function ui(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",d=0;dte&&me.from<=te);Ie++);if(me.to>=de)return e(r,n,d,k,K,J,Z);e(r,n.slice(0,me.to-te),d,k,null,J,Z),k=null,n=n.slice(me.to-te),te=me.to}}}function Mt(e,t,r,n){var d=!n&&r.widgetNode;d&&e.map.push(e.pos,e.pos+t,d),!n&&e.cm.display.input.needsContentAttribute&&(d||(d=e.content.appendChild(document.createElement("span"))),d.setAttribute("cm-marker",r.id)),d&&(e.cm.display.input.setUneditable(d),e.content.appendChild(d)),e.pos+=t,e.trailingSpace=!1}function dn(e,t,r){var n=e.markedSpans,d=e.text,k=0;if(!n){for(var K=1;KZ||Rt.collapsed&&vt.to==Z&&vt.from==Z)){if(vt.to!=null&&vt.to!=Z&&Re>vt.to&&(Re=vt.to,Xe=""),Rt.className&&(He+=" "+Rt.className),Rt.css&&(Ie=(Ie?Ie+";":"")+Rt.css),Rt.startStyle&&vt.from==Z&&(qe+=" "+Rt.startStyle),Rt.endStyle&&vt.to==Re&&(ht||(ht=[])).push(Rt.endStyle,vt.to),Rt.title&&((lt||(lt={})).title=Rt.title),Rt.attributes)for(var Xt in Rt.attributes)(lt||(lt={}))[Xt]=Rt.attributes[Xt];Rt.collapsed&&(!rt||yi(rt.marker,Rt)<0)&&(rt=vt)}else vt.from>Z&&Re>vt.from&&(Re=vt.from)}if(ht)for(var gi=0;gi=J)break;for(var Gi=Math.min(J,Re);;){if(de){var Ni=Z+de.length;if(!rt){var si=Ni>Gi?de.slice(0,Gi-Z):de;t.addToken(t,si,me?me+He:He,qe,Z+si.length==Re?Xe:"",Ie,lt)}if(Ni>=Gi){de=de.slice(Gi-Z),Z=Gi;break}Z=Ni,qe=""}de=d.slice(k,k=r[te++]),me=Dt(r[te++],t.cm.options)}}}function Wt(e,t,r){this.line=t,this.rest=xn(t),this.size=this.rest?Ot(Oe(this.rest))-r+1:1,this.node=this.text=null,this.hidden=an(e,t)}function ki(e,t,r){for(var n=[],d,k=t;k2&&k.push((Z.bottom+te.top)/2-r.top)}}k.push(r.bottom-r.top)}}function es(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[d],cache:e.measure.caches[d],before:!0}}function Uo(e,t){t=Ai(t);var r=Ot(t),n=e.display.externalMeasured=new Wt(e.doc,t,r);n.lineN=r;var d=n.built=Bt(e,n);return n.text=d.pre,x(e.display.lineMeasure,d.pre),n}function ts(e,t,r,n){return on(e,Xn(e,t),r,n)}function fa(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(k=Z-J,d=k-1,t>=Z&&(K="right")),d!=null){if(n=e[te+2],J==Z&&r==(n.insertLeft?"left":"right")&&(K=r),r=="left"&&d==0)for(;te&&e[te-2]==e[te-3]&&e[te-1].insertLeft;)n=e[(te-=3)+2],K="left";if(r=="right"&&d==Z-J)for(;te=0&&!((r=e[d]).left!=r.right);d--);return r}function Ho(e,t,r,n){var d=ns(t.map,r,n),k=d.node,K=d.start,J=d.end,Z=d.collapse,te;if(k.nodeType==3){for(var de=0;de<4;de++){for(;K&&we(t.line.text.charAt(d.coverStart+K));)--K;for(;d.coverStart+J0&&(Z=n="right");var me;e.options.lineWrapping&&(me=k.getClientRects()).length>1?te=me[n=="right"?me.length-1:0]:te=k.getBoundingClientRect()}if(G&&W<9&&!K&&(!te||!te.left&&!te.right)){var Ie=k.parentNode.getClientRects()[0];Ie?te={left:Ie.left,right:Ie.left+Jn(e.display),top:Ie.top,bottom:Ie.bottom}:te=is}for(var Re=te.top-t.rect.top,He=te.bottom-t.rect.top,Xe=(Re+He)/2,qe=t.view.measure.heights,rt=0;rt=n.text.length?(Z=n.text.length,te="before"):Z<=0&&(Z=0,te="after"),!J)return K(te=="before"?Z-1:Z,te=="before");function de(He,Xe,qe){var rt=J[Xe],lt=rt.level==1;return K(qe?He-1:He,lt!=qe)}var me=$e(J,Z,te),Ie=Ze,Re=de(Z,me,te=="before");return Ie!=null&&(Re.other=de(Z,Ie,te!="before")),Re}function us(e,t){var r=0;t=E(e.doc,t),e.options.lineWrapping||(r=Jn(e.display)*t.ch);var n=ct(e.doc,t.line),d=qi(n)+Hr(e.display);return{left:r,right:r,top:d,bottom:d+n.height}}function ga(e,t,r,n,d){var k=Qe(e,t,r);return k.xRel=d,n&&(k.outside=n),k}function va(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ga(n.first,0,null,-1,-1);var d=li(n,r),k=n.first+n.size-1;if(d>k)return ga(n.first+n.size-1,ct(n,k).text.length,null,1,1);t<0&&(t=0);for(var K=ct(n,d);;){var J=Go(e,K,d,t,r),Z=rn(K,J.ch+(J.xRel>0||J.outside>0?1:0));if(!Z)return J;var te=Z.find(1);if(te.line==d)return te;K=ct(n,d=te.line)}}function hs(e,t,r,n){n-=pa(t);var d=t.text.length,k=Ue(function(K){return on(e,r,K-1).bottom<=n},d,0);return d=Ue(function(K){return on(e,r,K).top>n},k,d),{begin:k,end:d}}function ds(e,t,r,n){r||(r=Xn(e,t));var d=Wr(e,t,on(e,r,n),"line").top;return hs(e,t,r,d)}function ya(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Go(e,t,r,n,d){d-=qi(t);var k=Xn(e,t),K=pa(t),J=0,Z=t.text.length,te=!0,de=et(t,e.doc.direction);if(de){var me=(e.options.lineWrapping?zo:Ko)(e,t,r,k,de,n,d);te=me.level!=1,J=te?me.from:me.to-1,Z=te?me.to:me.from-1}var Ie=null,Re=null,He=Ue(function(Tt){var vt=on(e,k,Tt);return vt.top+=K,vt.bottom+=K,ya(vt,n,d,!1)?(vt.top<=d&&vt.left<=n&&(Ie=Tt,Re=vt),!0):!1},J,Z),Xe,qe,rt=!1;if(Re){var lt=n-Re.left=ht.bottom?1:0}return He=Ae(t.text,He,1),ga(r,He,qe,rt,n-Xe)}function Ko(e,t,r,n,d,k,K){var J=Ue(function(me){var Ie=d[me],Re=Ie.level!=1;return ya(en(e,Qe(r,Re?Ie.to:Ie.from,Re?"before":"after"),"line",t,n),k,K,!0)},0,d.length-1),Z=d[J];if(J>0){var te=Z.level!=1,de=en(e,Qe(r,te?Z.from:Z.to,te?"after":"before"),"line",t,n);ya(de,k,K,!0)&&de.top>K&&(Z=d[J-1])}return Z}function zo(e,t,r,n,d,k,K){var J=hs(e,t,n,K),Z=J.begin,te=J.end;/\s/.test(t.text.charAt(te-1))&&te--;for(var de=null,me=null,Ie=0;Ie=te||Re.to<=Z)continue;var He=Re.level!=1,Xe=on(e,n,He?Math.min(te,Re.to)-1:Math.max(Z,Re.from)).right,qe=Xeqe)&&(de=Re,me=qe)}return de||(de=d[d.length-1]),de.fromte&&(de={from:de.from,to:te,level:de.level}),de}var Nn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Nn==null){Nn=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(c("br"));Nn.appendChild(document.createTextNode("x"))}x(e.measure,Nn);var r=Nn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),w(e.measure),r||1}function Jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),r=c("pre",[t],"CodeMirror-line-like");x(e.measure,r);var n=t.getBoundingClientRect(),d=(n.right-n.left)/10;return d>2&&(e.cachedCharWidth=d),d||10}function ba(e){for(var t=e.display,r={},n={},d=t.gutters.clientLeft,k=t.gutters.firstChild,K=0;k;k=k.nextSibling,++K){var J=e.display.gutterSpecs[K].className;r[J]=k.offsetLeft+k.clientLeft+d,n[J]=k.clientWidth}return{fixedPos:_a(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function _a(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cs(e){var t=$n(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Jn(e.display)-3);return function(d){if(an(e.doc,d))return 0;var k=0;if(d.widgets)for(var K=0;K0&&(te=ct(e.doc,Z.line).text).length==Z.ch){var de=Y(te,te.length,e.options.tabSize)-te.length;Z=Qe(Z.line,Math.max(0,Math.round((k-qa(e.display).left)/Jn(e.display))-de))}return Z}function Bn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;nt)&&(d.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=d.viewTo)ci&&cr(e.doc,t)d.viewFrom?Sn(e):(d.viewFrom+=n,d.viewTo+=n);else if(t<=d.viewFrom&&r>=d.viewTo)Sn(e);else if(t<=d.viewFrom){var k=Gr(e,r,r+n,1);k?(d.view=d.view.slice(k.index),d.viewFrom=k.lineN,d.viewTo+=n):Sn(e)}else if(r>=d.viewTo){var K=Gr(e,t,t,-1);K?(d.view=d.view.slice(0,K.index),d.viewTo=K.lineN):Sn(e)}else{var J=Gr(e,t,t,-1),Z=Gr(e,r,r+n,1);J&&Z?(d.view=d.view.slice(0,J.index).concat(ki(e,J.lineN,Z.lineN)).concat(d.view.slice(Z.index)),d.viewTo+=n):Sn(e)}var te=d.externalMeasured;te&&(r=d.lineN&&t=n.viewTo)return;var k=n.view[Bn(e,t)];if(k.node==null)return;var K=k.changes||(k.changes=[]);le(K,r)==-1&&K.push(r)}function Sn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gr(e,t,r,n){var d=Bn(e,t),k,K=e.display.view;if(!ci||r==e.doc.first+e.doc.size)return{index:d,lineN:r};for(var J=e.display.viewFrom,Z=0;Z0){if(d==K.length-1)return null;k=J+K[d].size-t,d++}else k=J-t;t+=k,r+=k}for(;cr(e.doc,r)!=r;){if(d==(n<0?0:K.length-1))return null;r+=n*K[d-(n<0?1:0)].size,d+=n}return{index:d,lineN:r}}function Vo(e,t,r){var n=e.display,d=n.view;d.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=ki(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ki(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Bn(e,r)))),n.viewTo=r}function fs(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||J.to().line1}var Qt={},It={};function Ci(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Qt[e]=t}function Ki(e,t){It[e]=t}function yt(e){if(typeof e=="string"&&It.hasOwnProperty(e))e=It[e];else if(e&&typeof e.name=="string"&&It.hasOwnProperty(e.name)){var t=It[e.name];typeof t=="string"&&(t={name:t}),e=We(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return yt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return yt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Li(e,t){t=yt(t);var n=Qt[t.name];if(!n)return Li(e,"text/plain");var r=n(e,t);if(bt.hasOwnProperty(t.name)){var d=bt[t.name];for(var k in d){if(!d.hasOwnProperty(k))continue;r.hasOwnProperty(k)&&(r["_"+k]=r[k]),r[k]=d[k]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var K in t.modeProps)r[K]=t.modeProps[K];return r}var bt={};function xt(e,t){var n=bt.hasOwnProperty(e)?bt[e]:bt[e]={};b(t,n)}function Ft(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var d=t[r];d instanceof Array&&(d=d.concat([])),n[r]=d}return n}function ti(e,t){for(var n;e.innerMode&&!(n=e.innerMode(t),!n||n.mode==e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function di(e,t,n){return e.startState?e.startState(t,n):!0}var Pt=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.post},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos0?null:(k&&t!==!1&&(this.pos+=k[0].length),k)}},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ct(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var d=n.children[r],k=d.chunkSize();if(t=e.first&&tn?Qe(n,ct(e,n).text.length):I(t,ct(e,t.line).text.length)}function I(e,t){var n=e.ch;return n==null||n>t?Qe(e.line,t):n<0?Qe(e.line,0):e}function H(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},z.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},z.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},z.fromSaved=function(e,t,n){return t instanceof q?new z(e,Ft(e.mode,t.state),n,t.lookAhead):new z(e,Ft(e.mode,t),n)},z.prototype.save=function(e){var t=e!==!1?Ft(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new q(t,this.maxLookAhead):t};function ve(e,t,n,r){var d=[e.state.modeGen],k={};Ei(e,t.text,e.doc.mode,n,function(te,de){return d.push(te,de)},k,r);for(var K=n.state,J=function(te){n.baseTokens=d;var de=e.state.overlays[te],me=1,Ie=0;n.state=!0,Ei(e,t.text,de.mode,n,function(Re,He){for(var Xe=me;IeRe&&d.splice(me,1,Re,d[me+1],qe),me+=2,Ie=Math.min(Re,qe)}if(!He)return;if(de.opaque)d.splice(Xe,me-Xe,Re,"overlay "+He),me=Xe+2;else for(;Xee.options.maxHighlightLength&&Ft(e.doc.mode,r.state),k=ve(e,t,r);d&&(r.state=d),t.stateAfter=r.save(!d),t.styles=k.styles,k.classes?t.styleClasses=k.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function it(e,t,n){var r=e.doc,d=e.display;if(!r.mode.startState)return new z(r,!0,t);var k=xi(e,t,n),K=k>r.first&&ct(r,k-1).stateAfter,J=K?z.fromSaved(r,K,k):new z(r,di(r.mode),k);return r.iter(k,t,function(Z){pt(e,Z.text,J);var te=J.line;Z.stateAfter=te==t-1||te%5==0||te>=d.viewFrom&&tet.start)return k}throw new Error("Mode "+e.name+" failed to advance stream.")}var jt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function $t(e,t,n,r){var d=e.doc,k=d.mode,K;t=E(d,t);var J=ct(d,t.line),Z=it(e,t.line,n),te=new Pt(J.text,e.options.tabSize,Z),de;for(r&&(de=[]);(r||te.pose.options.maxHighlightLength?(J=!1,K&&pt(e,t,r,de.pos),de.pos=t.length,me=null):me=ji(_t(n,de,r.state,Ie),k),Ie){var Re=Ie[0].name;Re&&(me="m-"+(me?Re+" "+me:Re))}if(!J||te!=me){for(;ZK;--J){if(J<=k.first)return k.first;var Z=ct(k,J-1),te=Z.stateAfter;if(te&&(!n||J+(te instanceof q?te.lookAhead:0)<=k.modeFrontier))return J;var de=Y(Z.text,null,e.options.tabSize);(d==null||r>de)&&(d=J-1,r=de)}return d}function Qi(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiern;r--){var d=ct(e,r).stateAfter;if(d&&(!(d instanceof q)||r+d.lookAhead=t:k.to>t);(r||(r=[])).push(new ur(K,k.from,Z?null:k.to))}}return r}function zr(e,t,n){var r;if(e)for(var d=0;d=t:k.to>t);if(J||k.from==t&&K.type=="bookmark"&&(!n||k.marker.insertLeft)){var Z=k.from==null||(K.inclusiveLeft?k.from<=t:k.from0&&J)for(var ht=0;ht0)continue;var de=[Z,1],me=Ct(te.from,J.from),Ie=Ct(te.to,J.to);(me<0||!K.inclusiveLeft&&!me)&&de.push({from:te.from,to:J.from}),(Ie>0||!K.inclusiveRight&&!Ie)&&de.push({from:J.to,to:te.to}),d.splice.apply(d,de),Z+=de.length-3}return d}function dn(e){var t=e.markedSpans;if(!t)return;for(var n=0;nt)&&(!r||yi(r,k.marker)<0)&&(r=k.marker)}return r}function fi(e,t,n,r,d){var k=ct(e,t),K=ci&&k.markedSpans;if(K)for(var J=0;J=0&&me<=0||de<=0&&me>=0)continue;if(de<=0&&(Z.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.to,n)>=0:Ct(te.to,n)>0)||de>=0&&(Z.marker.inclusiveRight&&d.inclusiveLeft?Ct(te.from,r)<=0:Ct(te.from,r)<0))return!0}}function Ai(e){for(var t;t=ai(e);)e=t.find(-1,!0).line;return e}function Vr(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function Er(e){for(var t,n;t=Kt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function cn(e,t){var n=ct(e,t),r=Ai(n);return n==r?t:Ot(r)}function xr(e,t){if(t>e.lastLine())return t;var n=ct(e,t),r;if(!nr(e,n))return t;for(;r=Kt(n);)n=r.find(1,!0).line;return Ot(n)+1}function nr(e,t){var n=ci&&t.markedSpans;if(n)for(var r=void 0,d=0;dt.maxLineLength&&(t.maxLineLength=d,t.maxLine=r)})}var kr=function(e,t,n){this.text=e,_r(this,t),this.height=n?n(this):1};kr.prototype.lineNo=function(){return Ot(this)},_e(kr);function ua(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dn(e),_r(e,n);var d=r?r(e):1;d!=e.height&&Jt(e,d)}function gt(e){e.parent=null,dn(e)}var At={},Et={};function Dt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Et:At;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Bt(e,t){var n=T("span",null,null,i?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var d=0;d<=(t.rest?t.rest.length:0);d++){var k=d?t.rest[d-1]:t.line,K=void 0;r.pos=0,r.addToken=Nt,wt(e.display.measure)&&(K=et(k,e.doc.direction))&&(r.addToken=Di(r.addToken,K)),r.map=[];var J=t!=e.display.externalMeasured&&Ot(k);hr(k,r,Ke(e,k,J)),k.styleClasses&&(k.styleClasses.bgClass&&(r.bgClass=O(k.styleClasses.bgClass,r.bgClass||"")),k.styleClasses.textClass&&(r.textClass=O(k.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(mt(e.display.measure))),d==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(i){var Z=r.content.lastChild;(/\bcm-tab\b/.test(Z.className)||Z.querySelector&&Z.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Fe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=O(r.pre.className,r.textClass||"")),r}function Yt(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nt(e,t,n,r,d,k,K){if(!t)return;var J=e.splitSpaces?ui(t,e.trailingSpace):t,Z=e.cm.state.specialChars,te=!1,de;if(!Z.test(t))e.col+=t.length,de=document.createTextNode(J),e.map.push(e.pos,e.pos+t.length,de),G&&W<9&&(te=!0),e.pos+=t.length;else{de=document.createDocumentFragment();for(var me=0;;){Z.lastIndex=me;var Ie=Z.exec(t),Re=Ie?Ie.index-me:t.length-me;if(Re){var He=document.createTextNode(J.slice(me,me+Re));G&&W<9?de.appendChild(c("span",[He])):de.appendChild(He),e.map.push(e.pos,e.pos+Re,He),e.col+=Re,e.pos+=Re}if(!Ie)break;me+=Re+1;var Xe=void 0;if(Ie[0]==" "){var qe=e.cm.options.tabSize,nt=qe-e.col%qe;Xe=de.appendChild(c("span",ae(nt),"cm-tab")),Xe.setAttribute("role","presentation"),Xe.setAttribute("cm-text"," "),e.col+=nt}else Ie[0]=="\r"||Ie[0]==` +`?(Xe=de.appendChild(c("span",Ie[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Xe.setAttribute("cm-text",Ie[0]),e.col+=1):(Xe=e.cm.options.specialCharPlaceholder(Ie[0]),Xe.setAttribute("cm-text",Ie[0]),G&&W<9?de.appendChild(c("span",[Xe])):de.appendChild(Xe),e.col+=1);e.map.push(e.pos,e.pos+1,Xe),e.pos++}}if(e.trailingSpace=J.charCodeAt(t.length-1)==32,n||r||d||te||k||K){var lt=n||"";r&&(lt+=r),d&&(lt+=d);var at=c("span",[de],lt,k);if(K)for(var ht in K)K.hasOwnProperty(ht)&&ht!="style"&&ht!="class"&&at.setAttribute(ht,K[ht]);return e.content.appendChild(at)}e.content.appendChild(de)}function ui(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",d=0;dte&&me.from<=te);Ie++);if(me.to>=de)return e(n,r,d,k,K,J,Z);e(n,r.slice(0,me.to-te),d,k,null,J,Z),k=null,r=r.slice(me.to-te),te=me.to}}}function Mt(e,t,n,r){var d=!r&&n.widgetNode;d&&e.map.push(e.pos,e.pos+t,d),!r&&e.cm.display.input.needsContentAttribute&&(d||(d=e.content.appendChild(document.createElement("span"))),d.setAttribute("cm-marker",n.id)),d&&(e.cm.display.input.setUneditable(d),e.content.appendChild(d)),e.pos+=t,e.trailingSpace=!1}function hr(e,t,n){var r=e.markedSpans,d=e.text,k=0;if(!r){for(var K=1;KZ||Rt.collapsed&&vt.to==Z&&vt.from==Z)){if(vt.to!=null&&vt.to!=Z&&Re>vt.to&&(Re=vt.to,Xe=""),Rt.className&&(He+=" "+Rt.className),Rt.css&&(Ie=(Ie?Ie+";":"")+Rt.css),Rt.startStyle&&vt.from==Z&&(qe+=" "+Rt.startStyle),Rt.endStyle&&vt.to==Re&&(ht||(ht=[])).push(Rt.endStyle,vt.to),Rt.title&&((lt||(lt={})).title=Rt.title),Rt.attributes)for(var Xt in Rt.attributes)(lt||(lt={}))[Xt]=Rt.attributes[Xt];Rt.collapsed&&(!nt||yi(nt.marker,Rt)<0)&&(nt=vt)}else vt.from>Z&&Re>vt.from&&(Re=vt.from)}if(ht)for(var gi=0;gi=J)break;for(var Gi=Math.min(J,Re);;){if(de){var Ni=Z+de.length;if(!nt){var si=Ni>Gi?de.slice(0,Gi-Z):de;t.addToken(t,si,me?me+He:He,qe,Z+si.length==Re?Xe:"",Ie,lt)}if(Ni>=Gi){de=de.slice(Gi-Z),Z=Gi;break}Z=Ni,qe=""}de=d.slice(k,k=n[te++]),me=Dt(n[te++],t.cm.options)}}}function Wt(e,t,n){this.line=t,this.rest=Er(t),this.size=this.rest?Ot(Oe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=nr(e,t)}function ki(e,t,n){for(var r=[],d,k=t;k2&&k.push((Z.bottom+te.top)/2-n.top)}}k.push(n.bottom-n.top)}}function es(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[d],cache:e.measure.caches[d],before:!0}}function Uo(e,t){t=Ai(t);var n=Ot(t),r=e.display.externalMeasured=new Wt(e.doc,t,n);r.lineN=n;var d=r.built=Bt(e,r);return r.text=d.pre,x(e.display.lineMeasure,d.pre),r}function ts(e,t,n,r){return sr(e,Yr(e,t),n,r)}function fa(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(k=Z-J,d=k-1,t>=Z&&(K="right")),d!=null){if(r=e[te+2],J==Z&&n==(r.insertLeft?"left":"right")&&(K=n),n=="left"&&d==0)for(;te&&e[te-2]==e[te-3]&&e[te-1].insertLeft;)r=e[(te-=3)+2],K="left";if(n=="right"&&d==Z-J)for(;te=0&&!((n=e[d]).left!=n.right);d--);return n}function Ho(e,t,n,r){var d=rs(t.map,n,r),k=d.node,K=d.start,J=d.end,Z=d.collapse,te;if(k.nodeType==3){for(var de=0;de<4;de++){for(;K&&we(t.line.text.charAt(d.coverStart+K));)--K;for(;d.coverStart+J0&&(Z=r="right");var me;e.options.lineWrapping&&(me=k.getClientRects()).length>1?te=me[r=="right"?me.length-1:0]:te=k.getBoundingClientRect()}if(G&&W<9&&!K&&(!te||!te.left&&!te.right)){var Ie=k.parentNode.getClientRects()[0];Ie?te={left:Ie.left,right:Ie.left+$r(e.display),top:Ie.top,bottom:Ie.bottom}:te=is}for(var Re=te.top-t.rect.top,He=te.bottom-t.rect.top,Xe=(Re+He)/2,qe=t.view.measure.heights,nt=0;nt=r.text.length?(Z=r.text.length,te="before"):Z<=0&&(Z=0,te="after"),!J)return K(te=="before"?Z-1:Z,te=="before");function de(He,Xe,qe){var nt=J[Xe],lt=nt.level==1;return K(qe?He-1:He,lt!=qe)}var me=$e(J,Z,te),Ie=Ze,Re=de(Z,me,te=="before");return Ie!=null&&(Re.other=de(Z,Ie,te!="before")),Re}function us(e,t){var n=0;t=E(e.doc,t),e.options.lineWrapping||(n=$r(e.display)*t.ch);var r=ct(e.doc,t.line),d=qi(r)+Hn(e.display);return{left:n,right:n,top:d,bottom:d+r.height}}function ga(e,t,n,r,d){var k=Qe(e,t,n);return k.xRel=d,r&&(k.outside=r),k}function va(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return ga(r.first,0,null,-1,-1);var d=li(r,n),k=r.first+r.size-1;if(d>k)return ga(r.first+r.size-1,ct(r,k).text.length,null,1,1);t<0&&(t=0);for(var K=ct(r,d);;){var J=Go(e,K,d,t,n),Z=rr(K,J.ch+(J.xRel>0||J.outside>0?1:0));if(!Z)return J;var te=Z.find(1);if(te.line==d)return te;K=ct(r,d=te.line)}}function hs(e,t,n,r){r-=pa(t);var d=t.text.length,k=Ue(function(K){return sr(e,n,K-1).bottom<=r},d,0);return d=Ue(function(K){return sr(e,n,K).top>r},k,d),{begin:k,end:d}}function ds(e,t,n,r){n||(n=Yr(e,t));var d=Wn(e,t,sr(e,n,r),"line").top;return hs(e,t,n,d)}function ya(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Go(e,t,n,r,d){d-=qi(t);var k=Yr(e,t),K=pa(t),J=0,Z=t.text.length,te=!0,de=et(t,e.doc.direction);if(de){var me=(e.options.lineWrapping?zo:Ko)(e,t,n,k,de,r,d);te=me.level!=1,J=te?me.from:me.to-1,Z=te?me.to:me.from-1}var Ie=null,Re=null,He=Ue(function(Tt){var vt=sr(e,k,Tt);return vt.top+=K,vt.bottom+=K,ya(vt,r,d,!1)?(vt.top<=d&&vt.left<=r&&(Ie=Tt,Re=vt),!0):!1},J,Z),Xe,qe,nt=!1;if(Re){var lt=r-Re.left=ht.bottom?1:0}return He=Ae(t.text,He,1),ga(n,He,qe,nt,r-Xe)}function Ko(e,t,n,r,d,k,K){var J=Ue(function(me){var Ie=d[me],Re=Ie.level!=1;return ya(er(e,Qe(n,Re?Ie.to:Ie.from,Re?"before":"after"),"line",t,r),k,K,!0)},0,d.length-1),Z=d[J];if(J>0){var te=Z.level!=1,de=er(e,Qe(n,te?Z.from:Z.to,te?"after":"before"),"line",t,r);ya(de,k,K,!0)&&de.top>K&&(Z=d[J-1])}return Z}function zo(e,t,n,r,d,k,K){var J=hs(e,t,r,K),Z=J.begin,te=J.end;/\s/.test(t.text.charAt(te-1))&&te--;for(var de=null,me=null,Ie=0;Ie=te||Re.to<=Z)continue;var He=Re.level!=1,Xe=sr(e,r,He?Math.min(te,Re.to)-1:Math.max(Z,Re.from)).right,qe=Xeqe)&&(de=Re,me=qe)}return de||(de=d[d.length-1]),de.fromte&&(de={from:de.from,to:te,level:de.level}),de}var Pr;function Xr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Pr==null){Pr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Pr.appendChild(document.createTextNode("x")),Pr.appendChild(c("br"));Pr.appendChild(document.createTextNode("x"))}x(e.measure,Pr);var n=Pr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),w(e.measure),n||1}function $r(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t],"CodeMirror-line-like");x(e.measure,n);var r=t.getBoundingClientRect(),d=(r.right-r.left)/10;return d>2&&(e.cachedCharWidth=d),d||10}function ba(e){for(var t=e.display,n={},r={},d=t.gutters.clientLeft,k=t.gutters.firstChild,K=0;k;k=k.nextSibling,++K){var J=e.display.gutterSpecs[K].className;n[J]=k.offsetLeft+k.clientLeft+d,r[J]=k.clientWidth}return{fixedPos:_a(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function _a(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cs(e){var t=Xr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/$r(e.display)-3);return function(d){if(nr(e.doc,d))return 0;var k=0;if(d.widgets)for(var K=0;K0&&(te=ct(e.doc,Z.line).text).length==Z.ch){var de=Y(te,te.length,e.options.tabSize)-te.length;Z=Qe(Z.line,Math.max(0,Math.round((k-qa(e.display).left)/$r(e.display))-de))}return Z}function Fr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(d.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=d.viewTo)ci&&cn(e.doc,t)d.viewFrom?wr(e):(d.viewFrom+=r,d.viewTo+=r);else if(t<=d.viewFrom&&n>=d.viewTo)wr(e);else if(t<=d.viewFrom){var k=Gn(e,n,n+r,1);k?(d.view=d.view.slice(k.index),d.viewFrom=k.lineN,d.viewTo+=r):wr(e)}else if(n>=d.viewTo){var K=Gn(e,t,t,-1);K?(d.view=d.view.slice(0,K.index),d.viewTo=K.lineN):wr(e)}else{var J=Gn(e,t,t,-1),Z=Gn(e,n,n+r,1);J&&Z?(d.view=d.view.slice(0,J.index).concat(ki(e,J.lineN,Z.lineN)).concat(d.view.slice(Z.index)),d.viewTo+=r):wr(e)}var te=d.externalMeasured;te&&(n=d.lineN&&t=r.viewTo)return;var k=r.view[Fr(e,t)];if(k.node==null)return;var K=k.changes||(k.changes=[]);le(K,n)==-1&&K.push(n)}function wr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gn(e,t,n,r){var d=Fr(e,t),k,K=e.display.view;if(!ci||n==e.doc.first+e.doc.size)return{index:d,lineN:n};for(var J=e.display.viewFrom,Z=0;Z0){if(d==K.length-1)return null;k=J+K[d].size-t,d++}else k=J-t;t+=k,n+=k}for(;cn(e.doc,n)!=n;){if(d==(r<0?0:K.length-1))return null;n+=r*K[d-(r<0?1:0)].size,d+=r}return{index:d,lineN:n}}function Vo(e,t,n){var r=e.display,d=r.view;d.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=ki(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=ki(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Fr(e,n)))),r.viewTo=n}function fs(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||J.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Qn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gs(e){e.state.focused||(e.display.input.focus(),Ta(e))}function vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qn(e))},100)}function Ta(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Fe(e,"focus",e,t),e.state.focused=!0,B(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),i&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),xa(e)}function Qn(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Fe(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zr(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||de<-.005)&&(Jt(d.line,K),ys(d.line),d.rest))for(var me=0;mee.display.sizerWidth){var Ie=Math.ceil(J/Jn(e.display));Ie>e.display.maxLineLength&&(e.display.maxLineLength=Ie,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}function ys(e){if(e.widgets)for(var t=0;t=K&&(k=li(t,qi(ct(t,Z))-e.wrapper.clientHeight),K=Z)}return{from:k,to:Math.max(K,k+1)}}function Xo(e,t){if(je(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),d=null;if(t.top+n.top<0?d=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(d=!1),d!=null&&!u){var k=c("div","\u200B",null,`position: absolute; - top: `+(t.top-r.viewOffset-Hr(e.display))+`px; - height: `+(t.bottom-t.top+sn(e)+r.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(k),k.scrollIntoView(d),e.display.lineSpace.removeChild(k)}}function $o(e,t,r,n){n==null&&(n=0);var d;!e.options.lineWrapping&&t==r&&(t=t.ch?Qe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Qe(t.line,t.ch+1,"before"):t);for(var k=0;k<5;k++){var K=!1,J=en(e,t),Z=!r||r==t?J:en(e,r);d={left:Math.min(J.left,Z.left),top:Math.min(J.top,Z.top)-n,right:Math.max(J.left,Z.left),bottom:Math.max(J.bottom,Z.bottom)+n};var te=wa(e,d),de=e.doc.scrollTop,me=e.doc.scrollLeft;if(te.scrollTop!=null&&(Er(e,te.scrollTop),Math.abs(e.doc.scrollTop-de)>1&&(K=!0)),te.scrollLeft!=null&&(Un(e,te.scrollLeft),Math.abs(e.doc.scrollLeft-me)>1&&(K=!0)),!K)break}return d}function Jo(e,t){var r=wa(e,t);r.scrollTop!=null&&Er(e,r.scrollTop),r.scrollLeft!=null&&Un(e,r.scrollLeft)}function wa(e,t){var r=e.display,n=$n(e.display);t.top<0&&(t.top=0);var d=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,k=ca(e),K={};t.bottom-t.top>k&&(t.bottom=t.top+k);var J=e.doc.height+da(r),Z=t.topJ-n;if(t.topd+k){var de=Math.min(t.top,(te?J:t.bottom)-k);de!=d&&(K.scrollTop=de)}var me=e.options.fixedGutter?0:r.gutters.offsetWidth,Ie=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-me,Re=Pn(e)-r.gutters.offsetWidth,He=t.right-t.left>Re;return He&&(t.right=t.left+Re),t.left<10?K.scrollLeft=0:t.leftRe+Ie-3&&(K.scrollLeft=t.right+(He?0:10)-Re),K}function Sa(e,t){if(t==null)return;Yr(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Zn(e){Yr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _r(e,t,r){(t!=null||r!=null)&&Yr(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Qo(e,t){Yr(e),e.curOp.scrollToPos=t}function Yr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=us(e,t.from),n=us(e,t.to);bs(e,r,n,t.margin)}}function bs(e,t,r,n){var d=wa(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});_r(e,d.scrollLeft,d.scrollTop)}function Er(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;M||Aa(e,{top:t}),_s(e,t,!0),M&&Aa(e),wr(e,100)}function _s(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Un(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Ss(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function xr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var jn=function(e,t,r){this.cm=r;var n=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=d.tabIndex=-1,e(n),e(d),Me(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Me(d,"scroll",function(){d.clientWidth&&t(d.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,G&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var d=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+d)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var k=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+k)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},jn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jn.prototype.zeroWidthHack=function(){var e=s&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},jn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var d=e.getBoundingClientRect(),k=r=="vert"?document.elementFromPoint(d.right-1,(d.top+d.bottom)/2):document.elementFromPoint((d.right+d.left)/2,d.bottom-1);k!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},jn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Tr=function(){};Tr.prototype.update=function(){return{bottom:0,right:0}},Tr.prototype.setScrollLeft=function(){},Tr.prototype.setScrollTop=function(){},Tr.prototype.clear=function(){};function qn(e,t){t||(t=xr(e));var r=e.display.barWidth,n=e.display.barHeight;Es(e,t);for(var d=0;d<4&&r!=e.display.barWidth||n!=e.display.barHeight;d++)r!=e.display.barWidth&&e.options.lineWrapping&&zr(e),Es(e,xr(e)),r=e.display.barWidth,n=e.display.barHeight}function Es(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var xs={native:jn,null:Tr};function Ts(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?Un(e,t):Er(e,t)},e),e.display.scrollbars.addClass&&B(e.display.wrapper,e.display.scrollbars.addClass)}var Zo=0;function Hn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},Ji(e.curOp)}function Wn(e){var t=e.curOp;t&&Io(t,function(r){for(var n=0;n=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ca(e.cm,e.update)}function il(e){var t=e.cm,r=t.display;e.updatedDisplay&&zr(t),e.barMeasure=xr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ts(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function nl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=it(e,t.highlightFrontier),d=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(k){if(n.line>=e.display.viewFrom){var K=k.styles,J=k.text.length>e.options.maxHighlightLength?Ft(t.mode,n.state):null,Z=ve(e,k,n,!0);J&&(n.state=J),k.styles=Z.styles;var te=k.styleClasses,de=Z.classes;de?k.styleClasses=de:te&&(k.styleClasses=null);for(var me=!K||K.length!=k.styles.length||te!=de&&(!te||!de||te.bgClass!=de.bgClass||te.textClass!=de.textClass),Ie=0;!me&&Ier)return wr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),d.length&&Wi(e,function(){for(var k=0;k=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&fs(e)==0)return!1;Cs(e)&&(Sn(e),t.dims=ba(e));var d=n.first+n.size,k=Math.max(t.visible.from-e.options.viewportMargin,n.first),K=Math.min(d,t.visible.to+e.options.viewportMargin);r.viewFromK&&r.viewTo-K<20&&(K=Math.min(d,r.viewTo)),ci&&(k=cr(e.doc,k),K=Tn(e.doc,K));var J=k!=r.viewFrom||K!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Vo(e,k,K),r.viewOffset=qi(ct(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var Z=fs(e);if(!J&&Z==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var te=ol(e);return Z>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),Z>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(te),w(r.cursorDiv),w(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,J&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,wr(e,400)),r.updateLineNumbers=null,!0}function ws(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Pn(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+da(e.display)-ca(e),r.top)}),t.visible=Vr(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Vr(e.display,e.doc,r));if(!Ca(e,t))break;zr(e);var d=xr(e);br(e),qn(e,d),Ra(e,d),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Aa(e,t){var r=new Xr(e,t);if(Ca(e,r)){zr(e),ws(e,r);var n=xr(e);br(e),qn(e,n),Ra(e,n),r.finish()}}function ul(e,t,r){var n=e.display,d=e.options.lineNumbers,k=n.lineDiv,K=k.firstChild;function J(He){var Xe=He.nextSibling;return i&&s&&e.display.currentWheelTarget==He?He.style.display="none":He.parentNode.removeChild(He),Xe}for(var Z=n.view,te=n.viewFrom,de=0;de-1&&(Re=!1),Xa(e,me,te,r)),Re&&(w(me.lineNumber),me.lineNumber.appendChild(document.createTextNode(Xi(e.options,te)))),K=me.node.nextSibling}te+=me.size}for(;K;)K=J(K)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ra(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+sn(e)+"px"}function Ss(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=_a(t)-t.scroller.scrollLeft+e.doc.scrollLeft,d=t.gutters.offsetWidth,k=n+"px",K=0;KK.clientWidth,Z=K.scrollHeight>K.clientHeight;if(!(n&&J||d&&Z))return;if(d&&s&&i){e:for(var te=t.target,de=k.view;te!=K;te=te.parentNode)for(var me=0;me=0&&Ct(e,n.to())<=0)return r}return-1};var Gt=function(e,t){this.anchor=e,this.head=t};Gt.prototype.from=function(){return yn(this.anchor,this.head)},Gt.prototype.to=function(){return vn(this.anchor,this.head)},Gt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function tn(e,t,r){var n=e&&e.options.selectionsMayTouch,d=t[r];t.sort(function(Ie,Re){return Ct(Ie.from(),Re.from())}),r=le(t,d);for(var k=1;k0:Z>=0){var te=yn(J.from(),K.from()),de=vn(J.to(),K.to()),me=J.empty()?K.from()==K.head:J.from()==J.head;k<=r&&--r,t.splice(--k,2,new Gt(me?de:te,me?te:de))}}return new Yi(t,r)}function Cn(e,t){return new Yi([new Gt(e,t||e)],0)}function An(e){return e.text?Qe(e.from.line+e.text.length-1,Oe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(Ct(e,t.from)<0)return e;if(Ct(e,t.to)<=0)return An(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=An(t).ch-t.to.ch),Qe(r,n)}function Ia(e,t){for(var r=[],n=0;n1&&e.remove(J.line+1,He-1),e.insert(J.line+1,rt)}bi(e,"change",e,t)}function On(e,t,r){function n(d,k,K){if(d.linked)for(var J=0;J1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Oe(e.done)}function Ns(e,t,r,n){var d=e.history;d.undone.length=0;var k=+new Date,K,J;if((d.lastOp==n||d.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&d.lastModTime>k-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(K=pl(d,d.lastOp==n)))J=Oe(K.changes),Ct(t.from,t.to)==0&&Ct(t.from,J.to)==0?J.to=An(t):K.changes.push(Ma(e,t));else{var Z=Oe(d.done);for((!Z||!Z.ranges)&&Qr(e.sel,d.done),K={changes:[Ma(e,t)],generation:d.generation},d.done.push(K);d.done.length>d.undoDepth;)d.done.shift(),d.done[0].ranges||d.done.shift()}d.done.push(r),d.generation=++d.maxGeneration,d.lastModTime=d.lastSelTime=k,d.lastOp=d.lastSelOp=n,d.lastOrigin=d.lastSelOrigin=t.origin,J||Fe(e,"historyAdded")}function ml(e,t,r,n){var d=t.charAt(0);return d=="*"||d=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var d=e.history,k=n&&n.origin;r==d.lastSelOp||k&&d.lastSelOrigin==k&&(d.lastModTime==d.lastSelTime&&d.lastOrigin==k||ml(e,k,Oe(d.done),t))?d.done[d.done.length-1]=t:Qr(t,d.done),d.lastSelTime=+new Date,d.lastSelOrigin=k,d.lastSelOp=r,n&&n.clearRedo!==!1&&Ps(d.undone)}function Qr(e,t){var r=Oe(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Fs(e,t,r,n){var d=t["spans_"+e.id],k=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(K){K.markedSpans&&((d||(d=t["spans_"+e.id]={}))[k]=K.markedSpans),++k})}function vl(e){if(!e)return null;for(var t,r=0;r-1&&(Oe(J)[me]=te[me],delete te[me]))}}return n}function Pa(e,t,r,n){if(n){var d=e.anchor;if(r){var k=Ct(t,d)<0;k!=Ct(r,d)<0?(d=t,t=r):k!=Ct(t,r)<0&&(t=r)}return new Gt(d,t)}else return new Gt(r||t,t)}function Zr(e,t,r,n,d){d==null&&(d=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Yi([Pa(e.sel.primary(),t,r,d)],0),n)}function Us(e,t,r){for(var n=[],d=e.cm&&(e.cm.display.shift||e.extend),k=0;k=t.ch:J.to>t.ch))){if(d&&(Fe(Z,"beforeCursorEnter"),Z.explicitlyCleared))if(k.markedSpans){--K;continue}else break;if(!Z.atomic)continue;if(r){var me=Z.find(n<0?1:-1),Ie=void 0;if((n<0?de:te)&&(me=zs(e,me,-n,me&&me.line==t.line?k:null)),me&&me.line==t.line&&(Ie=Ct(me,r))&&(n<0?Ie<0:Ie>0))return tr(e,me,t,n,d)}var Re=Z.find(n<0?-1:1);return(n<0?te:de)&&(Re=zs(e,Re,n,Re.line==t.line?k:null)),Re?tr(e,Re,t,n,d):null}}return t}function ea(e,t,r,n,d){var k=n||1,K=tr(e,t,r,k,d)||!d&&tr(e,t,r,k,!0)||tr(e,t,r,-k,d)||!d&&tr(e,t,r,-k,!0);return K||(e.cantEdit=!0,Qe(e.first,0))}function zs(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?E(e,Qe(t.line-1)):null:r>0&&t.ch==(n||ct(e,t.line)).text.length?t.line=0;--d)Xs(e,{from:n[d].from,to:n[d].to,text:d?[""]:t.text,origin:t.origin});else Xs(e,t)}function Xs(e,t){if(t.text.length==1&&t.text[0]==""&&Ct(t.from,t.to)==0)return;var r=Ia(e,t);Ns(e,t,r,e.cm?e.cm.curOp.id:NaN),Ar(e,t,r,Zi(e,t));var n=[];On(e,function(d,k){!k&&le(n,d.history)==-1&&(Zs(d.history,t),n.push(d.history)),Ar(d,t,null,Zi(d,t))})}function ta(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var d=e.history,k,K=e.sel,J=t=="undo"?d.done:d.undone,Z=t=="undo"?d.undone:d.done,te=0;te=0;--Re){var He=Ie(Re);if(He)return He.v}}function $s(e,t){if(t==0)return;if(e.first+=t,e.sel=new Yi(Te(e.sel.ranges,function(d){return new Gt(Qe(d.anchor.line+t,d.anchor.ch),Qe(d.head.line+t,d.head.ch))}),e.sel.primIndex),e.cm){Mi(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())return;if(t.from.linek&&(t={from:t.from,to:Qe(k,ct(e,k).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ui(e,t.from,t.to),r||(r=Ia(e,t)),e.cm?_l(e.cm,t,n):ka(e,t,n),qr(e,r,Se),e.cantEdit&&ea(e,Qe(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var n=e.doc,d=e.display,k=t.from,K=t.to,J=!1,Z=k.line;e.options.lineWrapping||(Z=Ot(Ai(ct(n,k.line))),n.iter(Z,K.line+1,function(Re){if(Re==d.maxLine)return J=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ee(e),ka(n,t,r,cs(e)),e.options.lineWrapping||(n.iter(Z,k.line+t.text.length,function(Re){var He=pr(Re);He>d.maxLineLength&&(d.maxLine=Re,d.maxLineLength=He,d.maxLineChanged=!0,J=!1)}),J&&(e.curOp.updateMaxLine=!0)),Qi(n,k.line),wr(e,400);var te=t.text.length-(K.line-k.line)-1;t.full?Mi(e):k.line==K.line&&t.text.length==1&&!Ds(e.doc,t)?wn(e,k.line,"text"):Mi(e,k.line,K.line+1,te);var de=ge(e,"changes"),me=ge(e,"change");if(me||de){var Ie={from:k,to:K,text:t.text,removed:t.removed,origin:t.origin};me&&bi(e,"change",e,Ie),de&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ie)}e.display.selForContextMenu=null}function nr(e,t,r,n,d){var k;n||(n=r),Ct(n,r)<0&&(k=[n,r],r=k[0],n=k[1]),typeof t=="string"&&(t=e.splitLines(t)),ir(e,{from:r,to:n,text:t,origin:d})}function Js(e,t,r,n){r1||!(this.children[0]instanceof Rr))){var J=[];this.collapse(J),this.children=[new Rr(J)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var K=d.lines.length%25+25,J=K;J10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=te,e.display.maxLineLength=de,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Mi(e,n,d+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gs(e.doc)),e&&bi(e,"markerCleared",e,this,n,d),t&&Wn(e),this.parent&&this.parent.clear()},Rn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,d=0;d0||K==0&&k.clearWhenEmpty!==!1)return k;if(k.replacedWith&&(k.collapsed=!0,k.widgetNode=T("span",[k.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||k.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(k.widgetNode.insertLeft=!0)),k.collapsed){if(fi(e,t.line,t,r,k)||t.line!=r.line&&fi(e,r.line,t,r,k))throw new Error("Inserting collapsed marker partially overlapping an existing one");un()}k.addToHistory&&Ns(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var J=t.line,Z=e.cm,te;if(e.iter(J,r.line+1,function(me){Z&&k.collapsed&&!Z.options.lineWrapping&&Ai(me)==Z.display.maxLine&&(te=!0),k.collapsed&&J!=t.line&&Jt(me,0),bn(me,new hn(k,J==t.line?t.ch:null,J==r.line?r.ch:null)),++J}),k.collapsed&&e.iter(t.line,r.line+1,function(me){an(e,me)&&Jt(me,0)}),k.clearOnEnter&&Me(k,"beforeCursorEnter",function(){return k.clear()}),k.readOnly&&(zi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),k.collapsed&&(k.id=++eo,k.atomic=!0),Z){if(te&&(Z.curOp.updateMaxLine=!0),k.collapsed)Mi(Z,t.line,r.line+1);else if(k.className||k.startStyle||k.endStyle||k.css||k.attributes||k.title)for(var de=t.line;de<=r.line;de++)wn(Z,de,"text");k.atomic&&Gs(Z.doc),bi(Z,"markerAdded",Z,k)}return k}var Dr=function(e,t){this.markers=e,this.primary=t;for(var r=0;r=0;Z--)ir(this,n[Z]);J?Hs(this,J):this.cm&&Zn(this.cm)}),undo:mi(function(){ta(this,"undo")}),redo:mi(function(){ta(this,"redo")}),undoSelection:mi(function(){ta(this,"undo",!0)}),redoSelection:mi(function(){ta(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(d.marker.parent||d.marker)}return t},findMarks:function(e,t,r){e=E(this,e),t=E(this,t);var n=[],d=e.line;return this.iter(e.line,t.line+1,function(k){var K=k.markedSpans;if(K)for(var J=0;J=Z.to||Z.from==null&&d!=e.line||Z.from!=null&&d==t.line&&Z.from>=t.ch)&&(!r||r(Z.marker))&&n.push(Z.marker.parent||Z.marker)}++d}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=k,++r}),E(this,Qe(r,t))},indexFromPos:function(e){e=E(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var de=e.dataTransfer.getData("Text");if(de){var me;if(t.state.draggingText&&!t.state.draggingText.copy&&(me=t.listSelections()),qr(t.doc,Cn(r,r)),me)for(var Ie=0;Ie=0;J--)nr(e.doc,"",n[J].from,n[J].to,"+delete");Zn(e)})}function Fa(e,t,r){var n=Ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ba(e,t,r){var n=Fa(e,t.ch,r);return n==null?null:new Qe(t.line,n,r<0?"after":"before")}function Ua(e,t,r,n,d){if(e){t.doc.direction=="rtl"&&(d=-d);var k=et(r,t.doc.direction);if(k){var K=d<0?Oe(k):k[0],J=d<0==(K.level==1),Z=J?"after":"before",te;if(K.level>0||t.doc.direction=="rtl"){var de=Xn(t,r);te=d<0?r.text.length-1:0;var me=on(t,de,te).top;te=Ue(function(Ie){return on(t,de,Ie).top==me},d<0==(K.level==1)?K.from:K.to-1,te),Z=="before"&&(te=Fa(r,te,1))}else te=d<0?K.to:K.from;return new Qe(n,te,Z)}}return new Qe(n,d<0?r.text.length:0,d<0?"before":"after")}function Ml(e,t,r,n){var d=et(t,e.doc.direction);if(!d)return Ba(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var k=$e(d,r.ch,r.sticky),K=d[k];if(e.doc.direction=="ltr"&&K.level%2==0&&(n>0?K.to>r.ch:K.from=K.from&&Ie>=de.begin)){var Re=me?"before":"after";return new Qe(r.line,Ie,Re)}}var He=function(rt,lt,at){for(var ht=function(Xt,gi){return gi?new Qe(r.line,J(Xt,1),"before"):new Qe(r.line,Xt,"after")};rt>=0&&rt0==(Tt.level!=1),Rt=vt?at.begin:J(at.end,-1);if(Tt.from<=Rt&&Rt0?de.end:J(de.begin,-1);return qe!=null&&!(n>0&&qe==t.text.length)&&(Xe=He(n>0?0:d.length-1,n,te(qe)),Xe)?Xe:null}var Pr={selectAll:Vs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Se)},killLine:function(e){return sr(e,function(t){if(t.empty()){var r=ct(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)d=new Qe(d.line,d.ch+1),e.replaceRange(k.charAt(d.ch-1)+k.charAt(d.ch-2),Qe(d.line,d.ch-2),d,"+transpose");else if(d.line>e.doc.first){var K=ct(e.doc,d.line-1).text;K&&(d=new Qe(d.line,1),e.replaceRange(k.charAt(0)+e.doc.lineSeparator()+K.charAt(K.length-1),Qe(d.line-1,K.length-1),d,"+transpose"))}}r.push(new Gt(d,d))}e.setSelections(r)})},newlineAndIndent:function(e){return Wi(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne&&Ct(t,this.pos)==0&&r==this.button};var Fr,Br;function Hl(e,t){var r=+new Date;return Br&&Br.compare(r,e,t)?(Fr=Br=null,"triple"):Fr&&Fr.compare(r,e,t)?(Br=new Ha(r,e,t),Fr=null,"double"):(Fr=new Ha(r,e,t),Br=null,"single")}function vo(e){var t=this,r=t.display;if(je(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,cn(r,e)){i||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Wa(t,e))return;var n=Fn(t,e),d=Pe(e),k=n?Hl(n,d):"single";if(window.focus(),d==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,d,n,k,e))return;d==1?n?Kl(t,n,k,e):xe(e)==r.scroller&&ne(e):d==2?(n&&Zr(t.doc,n),setTimeout(function(){return r.input.focus()},20)):d==3&&(L?t.display.input.onContextMenu(e):vs(t))}function Wl(e,t,r,n,d){var k="Click";return n=="double"?k="Double"+k:n=="triple"&&(k="Triple"+k),k=(t==1?"Left":t==2?"Middle":"Right")+k,Nr(e,oo(k,d),d,function(K){if(typeof K=="string"&&(K=Pr[K]),!K)return!1;var J=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),J=K(e,r)!=ke}finally{e.state.suppressEdits=!1}return J})}function Gl(e,t,r){var n=e.getOption("configureMouse"),d=n?n(e,t,r):{};if(d.unit==null){var k=a?r.shiftKey&&r.metaKey:r.altKey;d.unit=k?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(d.extend==null||e.doc.extend)&&(d.extend=e.doc.extend||r.shiftKey),d.addNew==null&&(d.addNew=s?r.metaKey:r.ctrlKey),d.moveOnDrag==null&&(d.moveOnDrag=!(s?r.altKey:r.ctrlKey)),d}function Kl(e,t,r,n){G?setTimeout(P(gs,e),0):e.curOp.focus=N();var d=Gl(e,r,n),k=e.doc.sel,K;e.options.dragDrop&&ze&&!e.isReadOnly()&&r=="single"&&(K=k.contains(t))>-1&&(Ct((K=k.ranges[K]).from(),t)<0||t.xRel>0)&&(Ct(K.to(),t)>0||t.xRel<0)?zl(e,n,t,d):Vl(e,n,t,d)}function zl(e,t,r,n){var d=e.display,k=!1,K=pi(e,function(te){i&&(d.scroller.draggable=!1),e.state.draggingText=!1,nt(d.wrapper.ownerDocument,"mouseup",K),nt(d.wrapper.ownerDocument,"mousemove",J),nt(d.scroller,"dragstart",Z),nt(d.scroller,"drop",K),k||(ne(te),n.addNew||Zr(e.doc,r,null,null,n.extend),i&&!p||G&&W==9?setTimeout(function(){d.wrapper.ownerDocument.body.focus({preventScroll:!0}),d.input.focus()},20):d.input.focus())}),J=function(te){k=k||Math.abs(t.clientX-te.clientX)+Math.abs(t.clientY-te.clientY)>=10},Z=function(){return k=!0};i&&(d.scroller.draggable=!0),e.state.draggingText=K,K.copy=!n.moveOnDrag,d.scroller.dragDrop&&d.scroller.dragDrop(),Me(d.wrapper.ownerDocument,"mouseup",K),Me(d.wrapper.ownerDocument,"mousemove",J),Me(d.scroller,"dragstart",Z),Me(d.scroller,"drop",K),vs(e),setTimeout(function(){return d.input.focus()},20)}function yo(e,t,r){if(r=="char")return new Gt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Gt(Qe(t.line,0),E(e.doc,Qe(t.line+1,0)));var n=r(e,t);return new Gt(n.from,n.to)}function Vl(e,t,r,n){var d=e.display,k=e.doc;ne(t);var K,J,Z=k.sel,te=Z.ranges;if(n.addNew&&!n.extend?(J=k.sel.contains(r),J>-1?K=te[J]:K=new Gt(r,r)):(K=k.sel.primary(),J=k.sel.primIndex),n.unit=="rectangle")n.addNew||(K=new Gt(r,r)),r=Fn(e,t,!0,!0),J=-1;else{var de=yo(e,r,n.unit);n.extend?K=Pa(K,de.anchor,de.head,n.extend):K=de}n.addNew?J==-1?(J=te.length,wi(k,tn(e,te.concat([K]),J),{scroll:!1,origin:"*mouse"})):te.length>1&&te[J].empty()&&n.unit=="char"&&!n.extend?(wi(k,tn(e,te.slice(0,J).concat(te.slice(J+1)),0),{scroll:!1,origin:"*mouse"}),Z=k.sel):Na(k,J,K,Ce):(J=0,wi(k,new Yi([K],0),Ce),Z=k.sel);var me=r;function Ie(at){if(Ct(me,at)==0)return;if(me=at,n.unit=="rectangle"){for(var ht=[],Tt=e.options.tabSize,vt=Y(ct(k,r.line).text,r.ch,Tt),Rt=Y(ct(k,at.line).text,at.ch,Tt),Xt=Math.min(vt,Rt),gi=Math.max(vt,Rt),ei=Math.min(r.line,at.line),Gi=Math.min(e.lastLine(),Math.max(r.line,at.line));ei<=Gi;ei++){var Ni=ct(k,ei).text,si=pe(Ni,Xt,Tt);Xt==gi?ht.push(new Gt(Qe(ei,si),Qe(ei,si))):Ni.length>si&&ht.push(new Gt(Qe(ei,si),Qe(ei,pe(Ni,gi,Tt))))}ht.length||ht.push(new Gt(r,r)),wi(k,tn(e,Z.ranges.slice(0,J).concat(ht),J),{origin:"*mouse",scroll:!1}),e.scrollIntoView(at)}else{var Fi=K,_i=yo(e,at,n.unit),hi=Fi.anchor,oi;Ct(_i.anchor,hi)>0?(oi=_i.head,hi=yn(Fi.from(),_i.anchor)):(oi=_i.anchor,hi=vn(Fi.to(),_i.head));var ii=Z.ranges.slice(0);ii[J]=Yl(e,new Gt(E(k,hi),oi)),wi(k,tn(e,ii,J),Ce)}}var Re=d.wrapper.getBoundingClientRect(),He=0;function Xe(at){var ht=++He,Tt=Fn(e,at,!0,n.unit=="rectangle");if(!Tt)return;if(Ct(Tt,me)!=0){e.curOp.focus=N(),Ie(Tt);var vt=Vr(d,k);(Tt.line>=vt.to||Tt.lineRe.bottom?20:0;Rt&&setTimeout(pi(e,function(){if(He!=ht)return;d.scroller.scrollTop+=Rt,Xe(at)}),50)}}function qe(at){e.state.selectingText=!1,He=Infinity,at&&(ne(at),d.input.focus()),nt(d.wrapper.ownerDocument,"mousemove",rt),nt(d.wrapper.ownerDocument,"mouseup",lt),k.history.lastSelOrigin=null}var rt=pi(e,function(at){at.buttons===0||!Pe(at)?qe(at):Xe(at)}),lt=pi(e,qe);e.state.selectingText=lt,Me(d.wrapper.ownerDocument,"mousemove",rt),Me(d.wrapper.ownerDocument,"mouseup",lt)}function Yl(e,t){var r=t.anchor,n=t.head,d=ct(e.doc,r.line);if(Ct(r,n)==0&&r.sticky==n.sticky)return t;var k=et(d);if(!k)return t;var K=$e(k,r.ch,r.sticky),J=k[K];if(J.from!=r.ch&&J.to!=r.ch)return t;var Z=K+(J.from==r.ch==(J.level!=1)?0:1);if(Z==0||Z==k.length)return t;var te;if(n.line!=r.line)te=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var de=$e(k,n.ch,n.sticky),me=de-K||(n.ch-r.ch)*(J.level==1?-1:1);de==Z-1||de==Z?te=me<0:te=me>0}var Ie=k[Z+(te?-1:0)],Re=te==(Ie.level==1),He=Re?Ie.from:Ie.to,Xe=Re?"after":"before";return r.ch==He&&r.sticky==Xe?t:new Gt(new Qe(r.line,He,Xe),n)}function bo(e,t,r,n){var d,k;if(t.touches)d=t.touches[0].clientX,k=t.touches[0].clientY;else try{d=t.clientX,k=t.clientY}catch(Ie){return!1}if(d>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ne(t);var K=e.display,J=K.lineDiv.getBoundingClientRect();if(k>J.bottom||!ge(e,r))return he(t);k-=J.top-K.viewOffset;for(var Z=0;Z=d){var de=li(e.doc,k),me=e.display.gutterSpecs[Z];return Fe(e,r,e,de,me.className,t),he(t)}}}function Wa(e,t){return bo(e,t,"gutterClick",!0)}function _o(e,t){if(cn(e.display,t)||Xl(e,t))return;if(je(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Xl(e,t){return ge(e,"gutterContextMenu")?bo(e,t,"gutterContextMenu",!1):!1}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yr(e)}var or={toString:function(){return"CodeMirror.Init"}},xo={},aa={};function $l(e){var t=e.optionHandlers;function r(n,d,k,K){e.defaults[n]=d,k&&(t[n]=K?function(J,Z,te){te!=or&&k(J,Z,te)}:k)}e.defineOption=r,e.Init=or,r("value","",function(n,d){return n.setValue(d)},!0),r("mode",null,function(n,d){n.doc.modeOption=d,Da(n)},!0),r("indentUnit",2,Da,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Cr(n),yr(n),Mi(n)},!0),r("lineSeparator",null,function(n,d){if(n.doc.lineSep=d,!d)return;var k=[],K=n.doc.first;n.doc.iter(function(Z){for(var te=0;;){var de=Z.text.indexOf(d,te);if(de==-1)break;te=de+d.length,k.push(Qe(K,de))}K++});for(var J=k.length-1;J>=0;J--)nr(n.doc,d,k[J],Qe(k[J].line,k[J].ch+d.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,d,k){n.state.specialChars=new RegExp(d.source+(d.test(" ")?"":"| "),"g"),k!=or&&n.refresh()}),r("specialCharPlaceholder",Yt,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",h?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,d){return n.getInputField().spellcheck=d},!0),r("autocorrect",!1,function(n,d){return n.getInputField().autocorrect=d},!0),r("autocapitalize",!1,function(n,d){return n.getInputField().autocapitalize=d},!0),r("rtlMoveVisually",!A),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Eo(n),Sr(n)},!0),r("keyMap","default",function(n,d,k){var K=na(d),J=k!=or&&na(k);J&&J.detach&&J.detach(n,K),K.attach&&K.attach(n,J||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Ql,!0),r("gutters",[],function(n,d){n.display.gutterSpecs=La(d,n.options.lineNumbers),Sr(n)},!0),r("fixedGutter",!0,function(n,d){n.display.gutters.style.left=d?_a(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return qn(n)},!0),r("scrollbarStyle","native",function(n){Ts(n),qn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,d){n.display.gutterSpecs=La(n.options.gutters,d),Sr(n)},!0),r("firstLineNumber",1,Sr,!0),r("lineNumberFormatter",function(n){return n},Sr,!0),r("showCursorWhenSelecting",!1,br,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,d){d=="nocursor"&&(Qn(n),n.display.input.blur()),n.display.input.readOnlyChanged(d)}),r("screenReaderLabel",null,function(n,d){d=d===""?null:d,n.display.input.screenReaderLabelChanged(d)}),r("disableInput",!1,function(n,d){d||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,br,!0),r("singleCursorHeightPerLine",!0,br,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Cr,!0),r("addModeClass",!1,Cr,!0),r("pollInterval",100),r("undoDepth",200,function(n,d){return n.doc.history.undoDepth=d}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,Cr,!0),r("moveInputWithCursor",!0,function(n,d){d||n.display.input.resetPosition()}),r("tabindex",null,function(n,d){return n.display.input.getField().tabIndex=d||""}),r("autofocus",null),r("direction","ltr",function(n,d){return n.doc.setDirection(d)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=or;if(!t!=!n){var d=e.display.dragFunctions,k=t?Me:nt;k(e.display.scroller,"dragstart",d.start),k(e.display.scroller,"dragenter",d.enter),k(e.display.scroller,"dragover",d.over),k(e.display.scroller,"dragleave",d.leave),k(e.display.scroller,"drop",d.drop)}}function Ql(e){e.options.lineWrapping?(B(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),jr(e)),Ea(e),Mi(e),yr(e),setTimeout(function(){return qn(e)},100)}function Zt(e,t){var r=this;if(!(this instanceof Zt))return new Zt(e,t);this.options=t=t?b(t):{},b(xo,t,!1);var n=t.value;typeof n=="string"?n=new Pi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var d=new Zt.inputStyles[t.inputStyle](this),k=this.display=new hl(e,n,d,t);k.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},t.autofocus&&!h&&k.input.focus(),G&&W<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Rl(),Hn(this),this.curOp.forceUpdate=!0,ks(this,n),t.autofocus&&!h||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ta(r)},20):Qn(this);for(var K in aa)aa.hasOwnProperty(K)&&aa[K](this,t[K],or);Cs(this),t.finishInit&&t.finishInit(this);for(var J=0;J20*20}Me(t.scroller,"touchstart",function(Z){if(!je(e,Z)&&!k(Z)&&!Wa(e,Z)){t.input.ensurePolled(),clearTimeout(r);var te=+new Date;t.activeTouch={start:te,moved:!1,prev:te-n.end<=300?n:null},Z.touches.length==1&&(t.activeTouch.left=Z.touches[0].pageX,t.activeTouch.top=Z.touches[0].pageY)}}),Me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Me(t.scroller,"touchend",function(Z){var te=t.activeTouch;if(te&&!cn(t,Z)&&te.left!=null&&!te.moved&&new Date-te.start<300){var de=e.coordsChar(t.activeTouch,"page"),me;!te.prev||K(te,te.prev)?me=new Gt(de,de):!te.prev.prev||K(te,te.prev.prev)?me=e.findWordAt(de):me=new Gt(Qe(de.line,0),E(e.doc,Qe(de.line+1,0))),e.setSelection(me.anchor,me.head),e.focus(),ne(Z)}d()}),Me(t.scroller,"touchcancel",d),Me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Er(e,t.scroller.scrollTop),Un(e,t.scroller.scrollLeft,!0),Fe(e,"scroll",e))}),Me(t.scroller,"mousewheel",function(Z){return Rs(e,Z)}),Me(t.scroller,"DOMMouseScroll",function(Z){return Rs(e,Z)}),Me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(Z){je(e,Z)||fe(Z)},over:function(Z){je(e,Z)||(Ol(e,Z),fe(Z))},start:function(Z){return Al(e,Z)},drop:pi(e,Cl),leave:function(Z){je(e,Z)||no(e)}};var J=t.input.getField();Me(J,"keyup",function(Z){return mo.call(e,Z)}),Me(J,"keydown",pi(e,po)),Me(J,"keypress",pi(e,go)),Me(J,"focus",function(Z){return Ta(e,Z)}),Me(J,"blur",function(Z){return Qn(e,Z)})}var Ga=[];Zt.defineInitHook=function(e){return Ga.push(e)};function Ur(e,t,r,n){var d=e.doc,k;r==null&&(r="add"),r=="smart"&&(d.mode.indent?k=it(e,t).state:r="prev");var K=e.options.tabSize,J=ct(d,t),Z=Y(J.text,null,K);J.stateAfter&&(J.stateAfter=null);var te=J.text.match(/^\s*/)[0],de;if(!n&&!/\S/.test(J.text))de=0,r="not";else if(r=="smart"&&(de=d.mode.indent(k,J.text.slice(te.length),J.text),de==ke||de>150)){if(!n)return;r="prev"}r=="prev"?t>d.first?de=Y(ct(d,t-1).text,null,K):de=0:r=="add"?de=Z+e.options.indentUnit:r=="subtract"?de=Z-e.options.indentUnit:typeof r=="number"&&(de=Z+r),de=Math.max(0,de);var me="",Ie=0;if(e.options.indentWithTabs)for(var Re=Math.floor(de/K);Re;--Re)Ie+=K,me+=" ";if(IeK,Z=St(t),te=null;if(J&&n.ranges.length>1)if(nn&&nn.text.join(` -`)==t){if(n.ranges.length%nn.text.length==0){te=[];for(var de=0;de=0;Ie--){var Re=n.ranges[Ie],He=Re.from(),Xe=Re.to();Re.empty()&&(r&&r>0?He=Qe(He.line,He.ch-r):e.state.overwrite&&!J?Xe=Qe(Xe.line,Math.min(ct(k,Xe.line).text.length,Xe.ch+Oe(Z).length)):J&&nn&&nn.lineWise&&nn.text.join(` + height: `+(vt-ht)+"px"))}function me(at,ht,Tt){var vt=ct(d,at),Rt=vt.text.length,Xt,gi;function ei(si,Fi){return ma(e,Qe(at,si),"div",vt,Fi)}function Gi(si,Fi,_i){var hi=ds(e,vt,null,si),oi=Fi=="ltr"==(_i=="after")?"left":"right",ii=_i=="after"?hi.begin:hi.end-(/\s/.test(vt.text.charAt(hi.end-1))?2:1);return ei(ii,oi)[oi]}var Ni=et(vt,d.direction);return Ve(Ni,ht||0,Tt==null?Rt:Tt,function(si,Fi,_i,hi){var oi=_i=="ltr",ii=ei(si,oi?"left":"right"),Bi=ei(Fi-1,oi?"right":"left"),un=ht==null&&si==0,Lr=Tt==null&&Fi==Rt,Si=hi==0,or=!Ni||hi==Ni.length-1;if(Bi.top-ii.top<=3){var vi=(te?un:Lr)&&Si,Va=(te?Lr:un)&&or,fr=vi?J:(oi?ii:Bi).left,Wr=Va?Z:(oi?Bi:ii).right;de(fr,ii.top,Wr-fr,ii.bottom)}else{var Gr,Ri,hn,Ya;oi?(Gr=te&&un&&Si?J:ii.left,Ri=te?Z:Gi(si,_i,"before"),hn=te?J:Gi(Fi,_i,"after"),Ya=te&&Lr&&or?Z:Bi.right):(Gr=te?Gi(si,_i,"before"):J,Ri=!te&&un&&Si?Z:ii.right,hn=!te&&Lr&&or?J:Bi.left,Ya=te?Gi(Fi,_i,"after"):Z),de(Gr,ii.top,Ri-Gr,ii.bottom),ii.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gs(e){e.state.focused||(e.display.input.focus(),Ta(e))}function vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Jr(e))},100)}function Ta(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Fe(e,"focus",e,t),e.state.focused=!0,B(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),i&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),xa(e)}function Jr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Fe(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||de<-.005)&&(Jt(d.line,K),ys(d.line),d.rest))for(var me=0;mee.display.sizerWidth){var Ie=Math.ceil(J/$r(e.display));Ie>e.display.maxLineLength&&(e.display.maxLineLength=Ie,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}function ys(e){if(e.widgets)for(var t=0;t=K&&(k=li(t,qi(ct(t,Z))-e.wrapper.clientHeight),K=Z)}return{from:k,to:Math.max(K,k+1)}}function Xo(e,t){if(je(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),d=null;if(t.top+r.top<0?d=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(d=!1),d!=null&&!u){var k=c("div","\u200B",null,`position: absolute; + top: `+(t.top-n.viewOffset-Hn(e.display))+`px; + height: `+(t.bottom-t.top+ar(e)+n.barHeight)+`px; + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(k),k.scrollIntoView(d),e.display.lineSpace.removeChild(k)}}function $o(e,t,n,r){r==null&&(r=0);var d;!e.options.lineWrapping&&t==n&&(t=t.ch?Qe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?Qe(t.line,t.ch+1,"before"):t);for(var k=0;k<5;k++){var K=!1,J=er(e,t),Z=!n||n==t?J:er(e,n);d={left:Math.min(J.left,Z.left),top:Math.min(J.top,Z.top)-r,right:Math.max(J.left,Z.left),bottom:Math.max(J.bottom,Z.bottom)+r};var te=wa(e,d),de=e.doc.scrollTop,me=e.doc.scrollLeft;if(te.scrollTop!=null&&(En(e,te.scrollTop),Math.abs(e.doc.scrollTop-de)>1&&(K=!0)),te.scrollLeft!=null&&(Br(e,te.scrollLeft),Math.abs(e.doc.scrollLeft-me)>1&&(K=!0)),!K)break}return d}function Jo(e,t){var n=wa(e,t);n.scrollTop!=null&&En(e,n.scrollTop),n.scrollLeft!=null&&Br(e,n.scrollLeft)}function wa(e,t){var n=e.display,r=Xr(e.display);t.top<0&&(t.top=0);var d=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,k=ca(e),K={};t.bottom-t.top>k&&(t.bottom=t.top+k);var J=e.doc.height+da(n),Z=t.topJ-r;if(t.topd+k){var de=Math.min(t.top,(te?J:t.bottom)-k);de!=d&&(K.scrollTop=de)}var me=e.options.fixedGutter?0:n.gutters.offsetWidth,Ie=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-me,Re=Mr(e)-n.gutters.offsetWidth,He=t.right-t.left>Re;return He&&(t.right=t.left+Re),t.left<10?K.scrollLeft=0:t.leftRe+Ie-3&&(K.scrollLeft=t.right+(He?0:10)-Re),K}function Sa(e,t){if(t==null)return;Yn(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Qr(e){Yn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _n(e,t,n){(t!=null||n!=null)&&Yn(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Qo(e,t){Yn(e),e.curOp.scrollToPos=t}function Yn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=us(e,t.from),r=us(e,t.to);bs(e,n,r,t.margin)}}function bs(e,t,n,r){var d=wa(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});_n(e,d.scrollLeft,d.scrollTop)}function En(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;M||Aa(e,{top:t}),_s(e,t,!0),M&&Aa(e),wn(e,100)}function _s(e,t,n){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Br(e,t,n,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,Ss(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+ar(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ur=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=d.tabIndex=-1,e(r),e(d),Me(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Me(d,"scroll",function(){d.clientWidth&&t(d.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,G&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ur.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var d=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+d)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var k=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+k)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ur.prototype.zeroWidthHack=function(){var e=s&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},Ur.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var d=e.getBoundingClientRect(),k=n=="vert"?document.elementFromPoint(d.right-1,(d.top+d.bottom)/2):document.elementFromPoint((d.right+d.left)/2,d.bottom-1);k!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},Ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Tn=function(){};Tn.prototype.update=function(){return{bottom:0,right:0}},Tn.prototype.setScrollLeft=function(){},Tn.prototype.setScrollTop=function(){},Tn.prototype.clear=function(){};function Zr(e,t){t||(t=xn(e));var n=e.display.barWidth,r=e.display.barHeight;Es(e,t);for(var d=0;d<4&&n!=e.display.barWidth||r!=e.display.barHeight;d++)n!=e.display.barWidth&&e.options.lineWrapping&&zn(e),Es(e,xn(e)),n=e.display.barWidth,r=e.display.barHeight}function Es(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var xs={native:Ur,null:Tn};function Ts(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Br(e,t):En(e,t)},e),e.display.scrollbars.addClass&&B(e.display.wrapper,e.display.scrollbars.addClass)}var Zo=0;function jr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},Ji(e.curOp)}function Hr(e){var t=e.curOp;t&&Io(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ca(e.cm,e.update)}function il(e){var t=e.cm,n=t.display;e.updatedDisplay&&zn(t),e.barMeasure=xn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ts(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+ar(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Mr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var n=+new Date+e.options.workTime,r=it(e,t.highlightFrontier),d=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(k){if(r.line>=e.display.viewFrom){var K=k.styles,J=k.text.length>e.options.maxHighlightLength?Ft(t.mode,r.state):null,Z=ve(e,k,r,!0);J&&(r.state=J),k.styles=Z.styles;var te=k.styleClasses,de=Z.classes;de?k.styleClasses=de:te&&(k.styleClasses=null);for(var me=!K||K.length!=k.styles.length||te!=de&&(!te||!de||te.bgClass!=de.bgClass||te.textClass!=de.textClass),Ie=0;!me&&Ien)return wn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),d.length&&Wi(e,function(){for(var k=0;k=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&fs(e)==0)return!1;Cs(e)&&(wr(e),t.dims=ba(e));var d=r.first+r.size,k=Math.max(t.visible.from-e.options.viewportMargin,r.first),K=Math.min(d,t.visible.to+e.options.viewportMargin);n.viewFromK&&n.viewTo-K<20&&(K=Math.min(d,n.viewTo)),ci&&(k=cn(e.doc,k),K=xr(e.doc,K));var J=k!=n.viewFrom||K!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Vo(e,k,K),n.viewOffset=qi(ct(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var Z=fs(e);if(!J&&Z==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var te=ol(e);return Z>4&&(n.lineDiv.style.display="none"),ul(e,n.updateLineNumbers,t.dims),Z>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ll(te),w(n.cursorDiv),w(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,J&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function ws(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Mr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+da(e.display)-ca(e),n.top)}),t.visible=Vn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Vn(e.display,e.doc,n));if(!Ca(e,t))break;zn(e);var d=xn(e);bn(e),Zr(e,d),Ra(e,d),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Aa(e,t){var n=new Xn(e,t);if(Ca(e,n)){zn(e),ws(e,n);var r=xn(e);bn(e),Zr(e,r),Ra(e,r),n.finish()}}function ul(e,t,n){var r=e.display,d=e.options.lineNumbers,k=r.lineDiv,K=k.firstChild;function J(He){var Xe=He.nextSibling;return i&&s&&e.display.currentWheelTarget==He?He.style.display="none":He.parentNode.removeChild(He),Xe}for(var Z=r.view,te=r.viewFrom,de=0;de-1&&(Re=!1),Xa(e,me,te,n)),Re&&(w(me.lineNumber),me.lineNumber.appendChild(document.createTextNode(Xi(e.options,te)))),K=me.node.nextSibling}te+=me.size}for(;K;)K=J(K)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ra(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+ar(e)+"px"}function Ss(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=_a(t)-t.scroller.scrollLeft+e.doc.scrollLeft,d=t.gutters.offsetWidth,k=r+"px",K=0;KK.clientWidth,Z=K.scrollHeight>K.clientHeight;if(!(r&&J||d&&Z))return;if(d&&s&&i){e:for(var te=t.target,de=k.view;te!=K;te=te.parentNode)for(var me=0;me=0&&Ct(e,r.to())<=0)return n}return-1};var Gt=function(e,t){this.anchor=e,this.head=t};Gt.prototype.from=function(){return vr(this.anchor,this.head)},Gt.prototype.to=function(){return gr(this.anchor,this.head)},Gt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function tr(e,t,n){var r=e&&e.options.selectionsMayTouch,d=t[n];t.sort(function(Ie,Re){return Ct(Ie.from(),Re.from())}),n=le(t,d);for(var k=1;k0:Z>=0){var te=vr(J.from(),K.from()),de=gr(J.to(),K.to()),me=J.empty()?K.from()==K.head:J.from()==J.head;k<=n&&--n,t.splice(--k,2,new Gt(me?de:te,me?te:de))}}return new Yi(t,n)}function Sr(e,t){return new Yi([new Gt(e,t||e)],0)}function Cr(e){return e.text?Qe(e.from.line+e.text.length-1,Oe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(Ct(e,t.from)<0)return e;if(Ct(e,t.to)<=0)return Cr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Cr(t).ch-t.to.ch),Qe(n,r)}function Ia(e,t){for(var n=[],r=0;r1&&e.remove(J.line+1,He-1),e.insert(J.line+1,nt)}bi(e,"change",e,t)}function Ar(e,t,n){function r(d,k,K){if(d.linked)for(var J=0;J1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Oe(e.done)}function Ns(e,t,n,r){var d=e.history;d.undone.length=0;var k=+new Date,K,J;if((d.lastOp==r||d.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&d.lastModTime>k-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(K=pl(d,d.lastOp==r)))J=Oe(K.changes),Ct(t.from,t.to)==0&&Ct(t.from,J.to)==0?J.to=Cr(t):K.changes.push(Ma(e,t));else{var Z=Oe(d.done);for((!Z||!Z.ranges)&&Qn(e.sel,d.done),K={changes:[Ma(e,t)],generation:d.generation},d.done.push(K);d.done.length>d.undoDepth;)d.done.shift(),d.done[0].ranges||d.done.shift()}d.done.push(n),d.generation=++d.maxGeneration,d.lastModTime=d.lastSelTime=k,d.lastOp=d.lastSelOp=r,d.lastOrigin=d.lastSelOrigin=t.origin,J||Fe(e,"historyAdded")}function ml(e,t,n,r){var d=t.charAt(0);return d=="*"||d=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,n,r){var d=e.history,k=r&&r.origin;n==d.lastSelOp||k&&d.lastSelOrigin==k&&(d.lastModTime==d.lastSelTime&&d.lastOrigin==k||ml(e,k,Oe(d.done),t))?d.done[d.done.length-1]=t:Qn(t,d.done),d.lastSelTime=+new Date,d.lastSelOrigin=k,d.lastSelOp=n,r&&r.clearRedo!==!1&&Ps(d.undone)}function Qn(e,t){var n=Oe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fs(e,t,n,r){var d=t["spans_"+e.id],k=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(K){K.markedSpans&&((d||(d=t["spans_"+e.id]={}))[k]=K.markedSpans),++k})}function vl(e){if(!e)return null;for(var t,n=0;n-1&&(Oe(J)[me]=te[me],delete te[me]))}}return r}function Pa(e,t,n,r){if(r){var d=e.anchor;if(n){var k=Ct(t,d)<0;k!=Ct(n,d)<0?(d=t,t=n):k!=Ct(t,n)<0&&(t=n)}return new Gt(d,t)}else return new Gt(n||t,t)}function Zn(e,t,n,r,d){d==null&&(d=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Yi([Pa(e.sel.primary(),t,n,d)],0),r)}function Us(e,t,n){for(var r=[],d=e.cm&&(e.cm.display.shift||e.extend),k=0;k=t.ch:J.to>t.ch))){if(d&&(Fe(Z,"beforeCursorEnter"),Z.explicitlyCleared))if(k.markedSpans){--K;continue}else break;if(!Z.atomic)continue;if(n){var me=Z.find(r<0?1:-1),Ie=void 0;if((r<0?de:te)&&(me=zs(e,me,-r,me&&me.line==t.line?k:null)),me&&me.line==t.line&&(Ie=Ct(me,n))&&(r<0?Ie<0:Ie>0))return en(e,me,t,r,d)}var Re=Z.find(r<0?-1:1);return(r<0?te:de)&&(Re=zs(e,Re,r,Re.line==t.line?k:null)),Re?en(e,Re,t,r,d):null}}return t}function ea(e,t,n,r,d){var k=r||1,K=en(e,t,n,k,d)||!d&&en(e,t,n,k,!0)||en(e,t,n,-k,d)||!d&&en(e,t,n,-k,!0);return K||(e.cantEdit=!0,Qe(e.first,0))}function zs(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?E(e,Qe(t.line-1)):null:n>0&&t.ch==(r||ct(e,t.line)).text.length?t.line=0;--d)Xs(e,{from:r[d].from,to:r[d].to,text:d?[""]:t.text,origin:t.origin});else Xs(e,t)}function Xs(e,t){if(t.text.length==1&&t.text[0]==""&&Ct(t.from,t.to)==0)return;var n=Ia(e,t);Ns(e,t,n,e.cm?e.cm.curOp.id:NaN),An(e,t,n,Zi(e,t));var r=[];Ar(e,function(d,k){!k&&le(r,d.history)==-1&&(Zs(d.history,t),r.push(d.history)),An(d,t,null,Zi(d,t))})}function ta(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!n)return;for(var d=e.history,k,K=e.sel,J=t=="undo"?d.done:d.undone,Z=t=="undo"?d.undone:d.done,te=0;te=0;--Re){var He=Ie(Re);if(He)return He.v}}function $s(e,t){if(t==0)return;if(e.first+=t,e.sel=new Yi(Te(e.sel.ranges,function(d){return new Gt(Qe(d.anchor.line+t,d.anchor.ch),Qe(d.head.line+t,d.head.ch))}),e.sel.primIndex),e.cm){Mi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())return;if(t.from.linek&&(t={from:t.from,to:Qe(k,ct(e,k).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ui(e,t.from,t.to),n||(n=Ia(e,t)),e.cm?_l(e.cm,t,r):ka(e,t,r),qn(e,n,Se),e.cantEdit&&ea(e,Qe(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,n){var r=e.doc,d=e.display,k=t.from,K=t.to,J=!1,Z=k.line;e.options.lineWrapping||(Z=Ot(Ai(ct(r,k.line))),r.iter(Z,K.line+1,function(Re){if(Re==d.maxLine)return J=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ee(e),ka(r,t,n,cs(e)),e.options.lineWrapping||(r.iter(Z,k.line+t.text.length,function(Re){var He=pn(Re);He>d.maxLineLength&&(d.maxLine=Re,d.maxLineLength=He,d.maxLineChanged=!0,J=!1)}),J&&(e.curOp.updateMaxLine=!0)),Qi(r,k.line),wn(e,400);var te=t.text.length-(K.line-k.line)-1;t.full?Mi(e):k.line==K.line&&t.text.length==1&&!Ds(e.doc,t)?Tr(e,k.line,"text"):Mi(e,k.line,K.line+1,te);var de=ge(e,"changes"),me=ge(e,"change");if(me||de){var Ie={from:k,to:K,text:t.text,removed:t.removed,origin:t.origin};me&&bi(e,"change",e,Ie),de&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ie)}e.display.selForContextMenu=null}function rn(e,t,n,r,d){var k;r||(r=n),Ct(r,n)<0&&(k=[r,n],n=k[0],r=k[1]),typeof t=="string"&&(t=e.splitLines(t)),tn(e,{from:n,to:r,text:t,origin:d})}function Js(e,t,n,r){n1||!(this.children[0]instanceof Rn))){var J=[];this.collapse(J),this.children=[new Rn(J)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var K=d.lines.length%25+25,J=K;J10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=te,e.display.maxLineLength=de,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Mi(e,r,d+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gs(e.doc)),e&&bi(e,"markerCleared",e,this,r,d),t&&Hr(e),this.parent&&this.parent.clear()},Or.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,d=0;d0||K==0&&k.clearWhenEmpty!==!1)return k;if(k.replacedWith&&(k.collapsed=!0,k.widgetNode=T("span",[k.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||k.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(k.widgetNode.insertLeft=!0)),k.collapsed){if(fi(e,t.line,t,n,k)||t.line!=n.line&&fi(e,n.line,t,n,k))throw new Error("Inserting collapsed marker partially overlapping an existing one");lr()}k.addToHistory&&Ns(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var J=t.line,Z=e.cm,te;if(e.iter(J,n.line+1,function(me){Z&&k.collapsed&&!Z.options.lineWrapping&&Ai(me)==Z.display.maxLine&&(te=!0),k.collapsed&&J!=t.line&&Jt(me,0),yr(me,new ur(k,J==t.line?t.ch:null,J==n.line?n.ch:null)),++J}),k.collapsed&&e.iter(t.line,n.line+1,function(me){nr(e,me)&&Jt(me,0)}),k.clearOnEnter&&Me(k,"beforeCursorEnter",function(){return k.clear()}),k.readOnly&&(zi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),k.collapsed&&(k.id=++eo,k.atomic=!0),Z){if(te&&(Z.curOp.updateMaxLine=!0),k.collapsed)Mi(Z,t.line,n.line+1);else if(k.className||k.startStyle||k.endStyle||k.css||k.attributes||k.title)for(var de=t.line;de<=n.line;de++)Tr(Z,de,"text");k.atomic&&Gs(Z.doc),bi(Z,"markerAdded",Z,k)}return k}var Dn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;Z--)tn(this,r[Z]);J?Hs(this,J):this.cm&&Qr(this.cm)}),undo:mi(function(){ta(this,"undo")}),redo:mi(function(){ta(this,"redo")}),undoSelection:mi(function(){ta(this,"undo",!0)}),redoSelection:mi(function(){ta(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(d.marker.parent||d.marker)}return t},findMarks:function(e,t,n){e=E(this,e),t=E(this,t);var r=[],d=e.line;return this.iter(e.line,t.line+1,function(k){var K=k.markedSpans;if(K)for(var J=0;J=Z.to||Z.from==null&&d!=e.line||Z.from!=null&&d==t.line&&Z.from>=t.ch)&&(!n||n(Z.marker))&&r.push(Z.marker.parent||Z.marker)}++d}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=k,++n}),E(this,Qe(n,t))},indexFromPos:function(e){e=E(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var de=e.dataTransfer.getData("Text");if(de){var me;if(t.state.draggingText&&!t.state.draggingText.copy&&(me=t.listSelections()),qn(t.doc,Sr(n,n)),me)for(var Ie=0;Ie=0;J--)rn(e.doc,"",r[J].from,r[J].to,"+delete");Qr(e)})}function Fa(e,t,n){var r=Ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ba(e,t,n){var r=Fa(e,t.ch,n);return r==null?null:new Qe(t.line,r,n<0?"after":"before")}function Ua(e,t,n,r,d){if(e){t.doc.direction=="rtl"&&(d=-d);var k=et(n,t.doc.direction);if(k){var K=d<0?Oe(k):k[0],J=d<0==(K.level==1),Z=J?"after":"before",te;if(K.level>0||t.doc.direction=="rtl"){var de=Yr(t,n);te=d<0?n.text.length-1:0;var me=sr(t,de,te).top;te=Ue(function(Ie){return sr(t,de,Ie).top==me},d<0==(K.level==1)?K.from:K.to-1,te),Z=="before"&&(te=Fa(n,te,1))}else te=d<0?K.to:K.from;return new Qe(r,te,Z)}}return new Qe(r,d<0?n.text.length:0,d<0?"before":"after")}function Ml(e,t,n,r){var d=et(t,e.doc.direction);if(!d)return Ba(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var k=$e(d,n.ch,n.sticky),K=d[k];if(e.doc.direction=="ltr"&&K.level%2==0&&(r>0?K.to>n.ch:K.from=K.from&&Ie>=de.begin)){var Re=me?"before":"after";return new Qe(n.line,Ie,Re)}}var He=function(nt,lt,at){for(var ht=function(Xt,gi){return gi?new Qe(n.line,J(Xt,1),"before"):new Qe(n.line,Xt,"after")};nt>=0&&nt0==(Tt.level!=1),Rt=vt?at.begin:J(at.end,-1);if(Tt.from<=Rt&&Rt0?de.end:J(de.begin,-1);return qe!=null&&!(r>0&&qe==t.text.length)&&(Xe=He(r>0?0:d.length-1,r,te(qe)),Xe)?Xe:null}var Pn={selectAll:Vs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Se)},killLine:function(e){return sn(e,function(t){if(t.empty()){var n=ct(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)d=new Qe(d.line,d.ch+1),e.replaceRange(k.charAt(d.ch-1)+k.charAt(d.ch-2),Qe(d.line,d.ch-2),d,"+transpose");else if(d.line>e.doc.first){var K=ct(e.doc,d.line-1).text;K&&(d=new Qe(d.line,1),e.replaceRange(k.charAt(0)+e.doc.lineSeparator()+K.charAt(K.length-1),Qe(d.line-1,K.length-1),d,"+transpose"))}}n.push(new Gt(d,d))}e.setSelections(n)})},newlineAndIndent:function(e){return Wi(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&Ct(t,this.pos)==0&&n==this.button};var Fn,Bn;function Hl(e,t){var n=+new Date;return Bn&&Bn.compare(n,e,t)?(Fn=Bn=null,"triple"):Fn&&Fn.compare(n,e,t)?(Bn=new Ha(n,e,t),Fn=null,"double"):(Fn=new Ha(n,e,t),Bn=null,"single")}function vo(e){var t=this,n=t.display;if(je(t,e)||n.activeTouch&&n.input.supportsTouch())return;if(n.input.ensurePolled(),n.shift=e.shiftKey,dr(n,e)){i||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(Wa(t,e))return;var r=Nr(t,e),d=Pe(e),k=r?Hl(r,d):"single";if(window.focus(),d==1&&t.state.selectingText&&t.state.selectingText(e),r&&Wl(t,d,r,k,e))return;d==1?r?Kl(t,r,k,e):xe(e)==n.scroller&&re(e):d==2?(r&&Zn(t.doc,r),setTimeout(function(){return n.input.focus()},20)):d==3&&(L?t.display.input.onContextMenu(e):vs(t))}function Wl(e,t,n,r,d){var k="Click";return r=="double"?k="Double"+k:r=="triple"&&(k="Triple"+k),k=(t==1?"Left":t==2?"Middle":"Right")+k,Nn(e,oo(k,d),d,function(K){if(typeof K=="string"&&(K=Pn[K]),!K)return!1;var J=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),J=K(e,n)!=ke}finally{e.state.suppressEdits=!1}return J})}function Gl(e,t,n){var r=e.getOption("configureMouse"),d=r?r(e,t,n):{};if(d.unit==null){var k=a?n.shiftKey&&n.metaKey:n.altKey;d.unit=k?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(d.extend==null||e.doc.extend)&&(d.extend=e.doc.extend||n.shiftKey),d.addNew==null&&(d.addNew=s?n.metaKey:n.ctrlKey),d.moveOnDrag==null&&(d.moveOnDrag=!(s?n.altKey:n.ctrlKey)),d}function Kl(e,t,n,r){G?setTimeout(P(gs,e),0):e.curOp.focus=N();var d=Gl(e,n,r),k=e.doc.sel,K;e.options.dragDrop&&ze&&!e.isReadOnly()&&n=="single"&&(K=k.contains(t))>-1&&(Ct((K=k.ranges[K]).from(),t)<0||t.xRel>0)&&(Ct(K.to(),t)>0||t.xRel<0)?zl(e,r,t,d):Vl(e,r,t,d)}function zl(e,t,n,r){var d=e.display,k=!1,K=pi(e,function(te){i&&(d.scroller.draggable=!1),e.state.draggingText=!1,rt(d.wrapper.ownerDocument,"mouseup",K),rt(d.wrapper.ownerDocument,"mousemove",J),rt(d.scroller,"dragstart",Z),rt(d.scroller,"drop",K),k||(re(te),r.addNew||Zn(e.doc,n,null,null,r.extend),i&&!p||G&&W==9?setTimeout(function(){d.wrapper.ownerDocument.body.focus({preventScroll:!0}),d.input.focus()},20):d.input.focus())}),J=function(te){k=k||Math.abs(t.clientX-te.clientX)+Math.abs(t.clientY-te.clientY)>=10},Z=function(){return k=!0};i&&(d.scroller.draggable=!0),e.state.draggingText=K,K.copy=!r.moveOnDrag,d.scroller.dragDrop&&d.scroller.dragDrop(),Me(d.wrapper.ownerDocument,"mouseup",K),Me(d.wrapper.ownerDocument,"mousemove",J),Me(d.scroller,"dragstart",Z),Me(d.scroller,"drop",K),vs(e),setTimeout(function(){return d.input.focus()},20)}function yo(e,t,n){if(n=="char")return new Gt(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Gt(Qe(t.line,0),E(e.doc,Qe(t.line+1,0)));var r=n(e,t);return new Gt(r.from,r.to)}function Vl(e,t,n,r){var d=e.display,k=e.doc;re(t);var K,J,Z=k.sel,te=Z.ranges;if(r.addNew&&!r.extend?(J=k.sel.contains(n),J>-1?K=te[J]:K=new Gt(n,n)):(K=k.sel.primary(),J=k.sel.primIndex),r.unit=="rectangle")r.addNew||(K=new Gt(n,n)),n=Nr(e,t,!0,!0),J=-1;else{var de=yo(e,n,r.unit);r.extend?K=Pa(K,de.anchor,de.head,r.extend):K=de}r.addNew?J==-1?(J=te.length,wi(k,tr(e,te.concat([K]),J),{scroll:!1,origin:"*mouse"})):te.length>1&&te[J].empty()&&r.unit=="char"&&!r.extend?(wi(k,tr(e,te.slice(0,J).concat(te.slice(J+1)),0),{scroll:!1,origin:"*mouse"}),Z=k.sel):Na(k,J,K,Ce):(J=0,wi(k,new Yi([K],0),Ce),Z=k.sel);var me=n;function Ie(at){if(Ct(me,at)==0)return;if(me=at,r.unit=="rectangle"){for(var ht=[],Tt=e.options.tabSize,vt=Y(ct(k,n.line).text,n.ch,Tt),Rt=Y(ct(k,at.line).text,at.ch,Tt),Xt=Math.min(vt,Rt),gi=Math.max(vt,Rt),ei=Math.min(n.line,at.line),Gi=Math.min(e.lastLine(),Math.max(n.line,at.line));ei<=Gi;ei++){var Ni=ct(k,ei).text,si=pe(Ni,Xt,Tt);Xt==gi?ht.push(new Gt(Qe(ei,si),Qe(ei,si))):Ni.length>si&&ht.push(new Gt(Qe(ei,si),Qe(ei,pe(Ni,gi,Tt))))}ht.length||ht.push(new Gt(n,n)),wi(k,tr(e,Z.ranges.slice(0,J).concat(ht),J),{origin:"*mouse",scroll:!1}),e.scrollIntoView(at)}else{var Fi=K,_i=yo(e,at,r.unit),hi=Fi.anchor,oi;Ct(_i.anchor,hi)>0?(oi=_i.head,hi=vr(Fi.from(),_i.anchor)):(oi=_i.anchor,hi=gr(Fi.to(),_i.head));var ii=Z.ranges.slice(0);ii[J]=Yl(e,new Gt(E(k,hi),oi)),wi(k,tr(e,ii,J),Ce)}}var Re=d.wrapper.getBoundingClientRect(),He=0;function Xe(at){var ht=++He,Tt=Nr(e,at,!0,r.unit=="rectangle");if(!Tt)return;if(Ct(Tt,me)!=0){e.curOp.focus=N(),Ie(Tt);var vt=Vn(d,k);(Tt.line>=vt.to||Tt.lineRe.bottom?20:0;Rt&&setTimeout(pi(e,function(){if(He!=ht)return;d.scroller.scrollTop+=Rt,Xe(at)}),50)}}function qe(at){e.state.selectingText=!1,He=Infinity,at&&(re(at),d.input.focus()),rt(d.wrapper.ownerDocument,"mousemove",nt),rt(d.wrapper.ownerDocument,"mouseup",lt),k.history.lastSelOrigin=null}var nt=pi(e,function(at){at.buttons===0||!Pe(at)?qe(at):Xe(at)}),lt=pi(e,qe);e.state.selectingText=lt,Me(d.wrapper.ownerDocument,"mousemove",nt),Me(d.wrapper.ownerDocument,"mouseup",lt)}function Yl(e,t){var n=t.anchor,r=t.head,d=ct(e.doc,n.line);if(Ct(n,r)==0&&n.sticky==r.sticky)return t;var k=et(d);if(!k)return t;var K=$e(k,n.ch,n.sticky),J=k[K];if(J.from!=n.ch&&J.to!=n.ch)return t;var Z=K+(J.from==n.ch==(J.level!=1)?0:1);if(Z==0||Z==k.length)return t;var te;if(r.line!=n.line)te=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var de=$e(k,r.ch,r.sticky),me=de-K||(r.ch-n.ch)*(J.level==1?-1:1);de==Z-1||de==Z?te=me<0:te=me>0}var Ie=k[Z+(te?-1:0)],Re=te==(Ie.level==1),He=Re?Ie.from:Ie.to,Xe=Re?"after":"before";return n.ch==He&&n.sticky==Xe?t:new Gt(new Qe(n.line,He,Xe),r)}function bo(e,t,n,r){var d,k;if(t.touches)d=t.touches[0].clientX,k=t.touches[0].clientY;else try{d=t.clientX,k=t.clientY}catch(Ie){return!1}if(d>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&re(t);var K=e.display,J=K.lineDiv.getBoundingClientRect();if(k>J.bottom||!ge(e,n))return he(t);k-=J.top-K.viewOffset;for(var Z=0;Z=d){var de=li(e.doc,k),me=e.display.gutterSpecs[Z];return Fe(e,n,e,de,me.className,t),he(t)}}}function Wa(e,t){return bo(e,t,"gutterClick",!0)}function _o(e,t){if(dr(e.display,t)||Xl(e,t))return;if(je(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Xl(e,t){return ge(e,"gutterContextMenu")?bo(e,t,"gutterContextMenu",!1):!1}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yn(e)}var on={toString:function(){return"CodeMirror.Init"}},xo={},aa={};function $l(e){var t=e.optionHandlers;function n(r,d,k,K){e.defaults[r]=d,k&&(t[r]=K?function(J,Z,te){te!=on&&k(J,Z,te)}:k)}e.defineOption=n,e.Init=on,n("value","",function(r,d){return r.setValue(d)},!0),n("mode",null,function(r,d){r.doc.modeOption=d,Da(r)},!0),n("indentUnit",2,Da,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Cn(r),yn(r),Mi(r)},!0),n("lineSeparator",null,function(r,d){if(r.doc.lineSep=d,!d)return;var k=[],K=r.doc.first;r.doc.iter(function(Z){for(var te=0;;){var de=Z.text.indexOf(d,te);if(de==-1)break;te=de+d.length,k.push(Qe(K,de))}K++});for(var J=k.length-1;J>=0;J--)rn(r.doc,d,k[J],Qe(k[J].line,k[J].ch+d.length))}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,d,k){r.state.specialChars=new RegExp(d.source+(d.test(" ")?"":"| "),"g"),k!=on&&r.refresh()}),n("specialCharPlaceholder",Yt,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",h?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,d){return r.getInputField().spellcheck=d},!0),n("autocorrect",!1,function(r,d){return r.getInputField().autocorrect=d},!0),n("autocapitalize",!1,function(r,d){return r.getInputField().autocapitalize=d},!0),n("rtlMoveVisually",!A),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Eo(r),Sn(r)},!0),n("keyMap","default",function(r,d,k){var K=ra(d),J=k!=on&&ra(k);J&&J.detach&&J.detach(r,K),K.attach&&K.attach(r,J||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ql,!0),n("gutters",[],function(r,d){r.display.gutterSpecs=La(d,r.options.lineNumbers),Sn(r)},!0),n("fixedGutter",!0,function(r,d){r.display.gutters.style.left=d?_a(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Zr(r)},!0),n("scrollbarStyle","native",function(r){Ts(r),Zr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,d){r.display.gutterSpecs=La(r.options.gutters,d),Sn(r)},!0),n("firstLineNumber",1,Sn,!0),n("lineNumberFormatter",function(r){return r},Sn,!0),n("showCursorWhenSelecting",!1,bn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,d){d=="nocursor"&&(Jr(r),r.display.input.blur()),r.display.input.readOnlyChanged(d)}),n("screenReaderLabel",null,function(r,d){d=d===""?null:d,r.display.input.screenReaderLabelChanged(d)}),n("disableInput",!1,function(r,d){d||r.display.input.reset()},!0),n("dragDrop",!0,Jl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,bn,!0),n("singleCursorHeightPerLine",!0,bn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Cn,!0),n("addModeClass",!1,Cn,!0),n("pollInterval",100),n("undoDepth",200,function(r,d){return r.doc.history.undoDepth=d}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Cn,!0),n("moveInputWithCursor",!0,function(r,d){d||r.display.input.resetPosition()}),n("tabindex",null,function(r,d){return r.display.input.getField().tabIndex=d||""}),n("autofocus",null),n("direction","ltr",function(r,d){return r.doc.setDirection(d)},!0),n("phrases",null)}function Jl(e,t,n){var r=n&&n!=on;if(!t!=!r){var d=e.display.dragFunctions,k=t?Me:rt;k(e.display.scroller,"dragstart",d.start),k(e.display.scroller,"dragenter",d.enter),k(e.display.scroller,"dragover",d.over),k(e.display.scroller,"dragleave",d.leave),k(e.display.scroller,"drop",d.drop)}}function Ql(e){e.options.lineWrapping?(B(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),jn(e)),Ea(e),Mi(e),yn(e),setTimeout(function(){return Zr(e)},100)}function Zt(e,t){var n=this;if(!(this instanceof Zt))return new Zt(e,t);this.options=t=t?b(t):{},b(xo,t,!1);var r=t.value;typeof r=="string"?r=new Pi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var d=new Zt.inputStyles[t.inputStyle](this),k=this.display=new hl(e,r,d,t);k.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},t.autofocus&&!h&&k.input.focus(),G&&W<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Zl(this),Rl(),jr(this),this.curOp.forceUpdate=!0,ks(this,r),t.autofocus&&!h||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ta(n)},20):Jr(this);for(var K in aa)aa.hasOwnProperty(K)&&aa[K](this,t[K],on);Cs(this),t.finishInit&&t.finishInit(this);for(var J=0;J20*20}Me(t.scroller,"touchstart",function(Z){if(!je(e,Z)&&!k(Z)&&!Wa(e,Z)){t.input.ensurePolled(),clearTimeout(n);var te=+new Date;t.activeTouch={start:te,moved:!1,prev:te-r.end<=300?r:null},Z.touches.length==1&&(t.activeTouch.left=Z.touches[0].pageX,t.activeTouch.top=Z.touches[0].pageY)}}),Me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Me(t.scroller,"touchend",function(Z){var te=t.activeTouch;if(te&&!dr(t,Z)&&te.left!=null&&!te.moved&&new Date-te.start<300){var de=e.coordsChar(t.activeTouch,"page"),me;!te.prev||K(te,te.prev)?me=new Gt(de,de):!te.prev.prev||K(te,te.prev.prev)?me=e.findWordAt(de):me=new Gt(Qe(de.line,0),E(e.doc,Qe(de.line+1,0))),e.setSelection(me.anchor,me.head),e.focus(),re(Z)}d()}),Me(t.scroller,"touchcancel",d),Me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(En(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),Fe(e,"scroll",e))}),Me(t.scroller,"mousewheel",function(Z){return Rs(e,Z)}),Me(t.scroller,"DOMMouseScroll",function(Z){return Rs(e,Z)}),Me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(Z){je(e,Z)||fe(Z)},over:function(Z){je(e,Z)||(Ol(e,Z),fe(Z))},start:function(Z){return Al(e,Z)},drop:pi(e,Cl),leave:function(Z){je(e,Z)||ro(e)}};var J=t.input.getField();Me(J,"keyup",function(Z){return mo.call(e,Z)}),Me(J,"keydown",pi(e,po)),Me(J,"keypress",pi(e,go)),Me(J,"focus",function(Z){return Ta(e,Z)}),Me(J,"blur",function(Z){return Jr(e,Z)})}var Ga=[];Zt.defineInitHook=function(e){return Ga.push(e)};function Un(e,t,n,r){var d=e.doc,k;n==null&&(n="add"),n=="smart"&&(d.mode.indent?k=it(e,t).state:n="prev");var K=e.options.tabSize,J=ct(d,t),Z=Y(J.text,null,K);J.stateAfter&&(J.stateAfter=null);var te=J.text.match(/^\s*/)[0],de;if(!r&&!/\S/.test(J.text))de=0,n="not";else if(n=="smart"&&(de=d.mode.indent(k,J.text.slice(te.length),J.text),de==ke||de>150)){if(!r)return;n="prev"}n=="prev"?t>d.first?de=Y(ct(d,t-1).text,null,K):de=0:n=="add"?de=Z+e.options.indentUnit:n=="subtract"?de=Z-e.options.indentUnit:typeof n=="number"&&(de=Z+n),de=Math.max(0,de);var me="",Ie=0;if(e.options.indentWithTabs)for(var Re=Math.floor(de/K);Re;--Re)Ie+=K,me+=" ";if(IeK,Z=St(t),te=null;if(J&&r.ranges.length>1)if(ir&&ir.text.join(` +`)==t){if(r.ranges.length%ir.text.length==0){te=[];for(var de=0;de=0;Ie--){var Re=r.ranges[Ie],He=Re.from(),Xe=Re.to();Re.empty()&&(n&&n>0?He=Qe(He.line,He.ch-n):e.state.overwrite&&!J?Xe=Qe(Xe.line,Math.min(ct(k,Xe.line).text.length,Xe.ch+Oe(Z).length)):J&&ir&&ir.lineWise&&ir.text.join(` `)==Z.join(` -`)&&(He=Xe=Qe(He.line,0)));var qe={from:He,to:Xe,text:te?te[Ie%te.length]:Z,origin:d||(J?"paste":e.state.cutIncoming>K?"cut":"+input")};ir(e.doc,qe),bi(e,"inputRead",e,qe)}t&&!J&&wo(e,t),Zn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=me),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function To(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Wi(t,function(){return Ka(t,r,0,null,"paste")}),!0}function wo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var d=r.ranges[n];if(d.head.ch>100||n&&r.ranges[n-1].head.line==d.head.line)continue;var k=e.getModeAt(d.head),K=!1;if(k.electricChars){for(var J=0;J-1){K=Ur(e,d.head.line,"smart");break}}else k.electricInput&&(k.electricInput.test(ct(e.doc,d.head.line).text.slice(0,d.head.ch))&&(K=Ur(e,d.head.line,"smart")));K&&bi(e,"electricInput",e,d.head.line)}}function So(e){for(var t=[],r=[],n=0;nk&&(Ur(this,J.head.line,n,!0),k=J.head.line,K==this.doc.sel.primIndex&&Zn(this));else{var Z=J.from(),te=J.to(),de=Math.max(k,Z.line);k=Math.min(this.lastLine(),te.line-(te.ch?0:1))+1;for(var me=de;me0&&Na(this.doc,K,new Gt(Z,Ie[K].to()),Se)}}}),getTokenAt:function(n,d){return $t(this,n,d)},getLineTokens:function(n,d){return $t(this,Qe(n),d,!0)},getTokenTypeAt:function(n){n=E(this.doc,n);var d=Ke(this,ct(this.doc,n.line)),k=0,K=(d.length-1)/2,J=n.ch,Z;if(J==0)Z=d[2];else for(;;){var te=k+K>>1;if((te?d[te*2-1]:0)>=J)K=te;else if(d[te*2+1]Z&&(n=Z,K=!0),J=ct(this.doc,n)}else J=n;return Wr(this,J,{top:0,left:0},d||"page",k||K).top+(K?this.doc.height-qi(J):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,d,k,K,J){var Z=this.display;n=en(this,E(this.doc,n));var te=n.bottom,de=n.left;if(d.style.position="absolute",d.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(d),Z.sizer.appendChild(d),K=="over")te=n.top;else if(K=="above"||K=="near"){var me=Math.max(Z.wrapper.clientHeight,this.doc.height),Ie=Math.max(Z.sizer.clientWidth,Z.lineSpace.clientWidth);(K=="above"||n.bottom+d.offsetHeight>me)&&n.top>d.offsetHeight?te=n.top-d.offsetHeight:n.bottom+d.offsetHeight<=me&&(te=n.bottom),de+d.offsetWidth>Ie&&(de=Ie-d.offsetWidth)}d.style.top=te+"px",d.style.left=d.style.right="",J=="right"?(de=Z.sizer.clientWidth-d.offsetWidth,d.style.right="0px"):(J=="left"?de=0:J=="middle"&&(de=(Z.sizer.clientWidth-d.offsetWidth)/2),d.style.left=de+"px"),k&&Jo(this,{left:de,top:te,right:de+d.offsetWidth,bottom:te+d.offsetHeight})},triggerOnKeyDown:Oi(po),triggerOnKeyPress:Oi(go),triggerOnKeyUp:mo,triggerOnMouseDown:Oi(vo),execCommand:function(n){if(Pr.hasOwnProperty(n))return Pr[n].call(null,this)},triggerElectric:Oi(function(n){wo(this,n)}),findPosH:function(n,d,k,K){var J=1;d<0&&(J=-1,d=-d);for(var Z=E(this.doc,n),te=0;te0&&de(k.charAt(K-1));)--K;for(;J.5||this.options.lineWrapping)&&Ea(this),Fe(this,"refresh",this)}),swapDoc:Oi(function(n){var d=this.doc;return d.cm=null,this.state.selectingText&&this.state.selectingText(),ks(this,n),yr(this),this.display.input.reset(),_r(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,d),d}),phrase:function(n){var d=this.options.phrases;return d&&Object.prototype.hasOwnProperty.call(d,n)?d[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},_e(e),e.registerHelper=function(n,d,k){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][d]=k},e.registerGlobalHelper=function(n,d,k,K){e.registerHelper(n,d,K),r[n]._global.push({pred:k,val:K})}}function za(e,t,r,n,d){var k=t,K=r,J=ct(e,t.line),Z=d&&e.direction=="rtl"?-r:r;function te(){var lt=t.line+Z;return lt=e.first+e.size?!1:(t=new Qe(lt,t.ch,t.sticky),J=ct(e,lt))}function de(lt){var at;if(n=="codepoint"){var ht=J.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(ht)?at=null:at=new Qe(t.line,Math.max(0,Math.min(J.text.length,t.ch+r*(ht>=55296&&ht<56320?2:1))),-r)}else d?at=Ml(e.cm,J,t,r):at=Ba(J,t,r);if(at==null)if(!lt&&te())t=Ua(d,e.cm,J,t.line,Z);else return!1;else t=at;return!0}if(n=="char"||n=="codepoint")de();else if(n=="column")de(!0);else if(n=="word"||n=="group")for(var me=null,Ie=n=="group",Re=e.cm&&e.cm.getHelper(t,"wordChars"),He=!0;!(r<0&&!de(!He));He=!1){var Xe=J.text.charAt(t.ch)||` +`)&&(He=Xe=Qe(He.line,0)));var qe={from:He,to:Xe,text:te?te[Ie%te.length]:Z,origin:d||(J?"paste":e.state.cutIncoming>K?"cut":"+input")};tn(e.doc,qe),bi(e,"inputRead",e,qe)}t&&!J&&wo(e,t),Qr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=me),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function To(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Wi(t,function(){return Ka(t,n,0,null,"paste")}),!0}function wo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var d=n.ranges[r];if(d.head.ch>100||r&&n.ranges[r-1].head.line==d.head.line)continue;var k=e.getModeAt(d.head),K=!1;if(k.electricChars){for(var J=0;J-1){K=Un(e,d.head.line,"smart");break}}else k.electricInput&&(k.electricInput.test(ct(e.doc,d.head.line).text.slice(0,d.head.ch))&&(K=Un(e,d.head.line,"smart")));K&&bi(e,"electricInput",e,d.head.line)}}function So(e){for(var t=[],n=[],r=0;rk&&(Un(this,J.head.line,r,!0),k=J.head.line,K==this.doc.sel.primIndex&&Qr(this));else{var Z=J.from(),te=J.to(),de=Math.max(k,Z.line);k=Math.min(this.lastLine(),te.line-(te.ch?0:1))+1;for(var me=de;me0&&Na(this.doc,K,new Gt(Z,Ie[K].to()),Se)}}}),getTokenAt:function(r,d){return $t(this,r,d)},getLineTokens:function(r,d){return $t(this,Qe(r),d,!0)},getTokenTypeAt:function(r){r=E(this.doc,r);var d=Ke(this,ct(this.doc,r.line)),k=0,K=(d.length-1)/2,J=r.ch,Z;if(J==0)Z=d[2];else for(;;){var te=k+K>>1;if((te?d[te*2-1]:0)>=J)K=te;else if(d[te*2+1]Z&&(r=Z,K=!0),J=ct(this.doc,r)}else J=r;return Wn(this,J,{top:0,left:0},d||"page",k||K).top+(K?this.doc.height-qi(J):0)},defaultTextHeight:function(){return Xr(this.display)},defaultCharWidth:function(){return $r(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,d,k,K,J){var Z=this.display;r=er(this,E(this.doc,r));var te=r.bottom,de=r.left;if(d.style.position="absolute",d.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(d),Z.sizer.appendChild(d),K=="over")te=r.top;else if(K=="above"||K=="near"){var me=Math.max(Z.wrapper.clientHeight,this.doc.height),Ie=Math.max(Z.sizer.clientWidth,Z.lineSpace.clientWidth);(K=="above"||r.bottom+d.offsetHeight>me)&&r.top>d.offsetHeight?te=r.top-d.offsetHeight:r.bottom+d.offsetHeight<=me&&(te=r.bottom),de+d.offsetWidth>Ie&&(de=Ie-d.offsetWidth)}d.style.top=te+"px",d.style.left=d.style.right="",J=="right"?(de=Z.sizer.clientWidth-d.offsetWidth,d.style.right="0px"):(J=="left"?de=0:J=="middle"&&(de=(Z.sizer.clientWidth-d.offsetWidth)/2),d.style.left=de+"px"),k&&Jo(this,{left:de,top:te,right:de+d.offsetWidth,bottom:te+d.offsetHeight})},triggerOnKeyDown:Oi(po),triggerOnKeyPress:Oi(go),triggerOnKeyUp:mo,triggerOnMouseDown:Oi(vo),execCommand:function(r){if(Pn.hasOwnProperty(r))return Pn[r].call(null,this)},triggerElectric:Oi(function(r){wo(this,r)}),findPosH:function(r,d,k,K){var J=1;d<0&&(J=-1,d=-d);for(var Z=E(this.doc,r),te=0;te0&&de(k.charAt(K-1));)--K;for(;J.5||this.options.lineWrapping)&&Ea(this),Fe(this,"refresh",this)}),swapDoc:Oi(function(r){var d=this.doc;return d.cm=null,this.state.selectingText&&this.state.selectingText(),ks(this,r),yn(this),this.display.input.reset(),_n(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,d),d}),phrase:function(r){var d=this.options.phrases;return d&&Object.prototype.hasOwnProperty.call(d,r)?d[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},_e(e),e.registerHelper=function(r,d,k){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][d]=k},e.registerGlobalHelper=function(r,d,k,K){e.registerHelper(r,d,K),n[r]._global.push({pred:k,val:K})}}function za(e,t,n,r,d){var k=t,K=n,J=ct(e,t.line),Z=d&&e.direction=="rtl"?-n:n;function te(){var lt=t.line+Z;return lt=e.first+e.size?!1:(t=new Qe(lt,t.ch,t.sticky),J=ct(e,lt))}function de(lt){var at;if(r=="codepoint"){var ht=J.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(ht)?at=null:at=new Qe(t.line,Math.max(0,Math.min(J.text.length,t.ch+n*(ht>=55296&&ht<56320?2:1))),-n)}else d?at=Ml(e.cm,J,t,n):at=Ba(J,t,n);if(at==null)if(!lt&&te())t=Ua(d,e.cm,J,t.line,Z);else return!1;else t=at;return!0}if(r=="char"||r=="codepoint")de();else if(r=="column")de(!0);else if(r=="word"||r=="group")for(var me=null,Ie=r=="group",Re=e.cm&&e.cm.getHelper(t,"wordChars"),He=!0;!(n<0&&!de(!He));He=!1){var Xe=J.text.charAt(t.ch)||` `,qe=Ge(Xe,Re)?"w":Ie&&Xe==` -`?"n":!Ie||/\s/.test(Xe)?null:"p";if(Ie&&!He&&!qe&&(qe="s"),me&&me!=qe){r<0&&(r=1,de(),t.sticky="after");break}if(qe&&(me=qe),r>0&&!de(!He))break}var rt=ea(e,t,k,K,!0);return mn(k,rt)&&(rt.hitSide=!0),rt}function Oo(e,t,r,n){var d=e.doc,k=t.left,K;if(n=="page"){var J=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Z=Math.max(J-.5*$n(e.display),3);K=(r>0?t.bottom:t.top)+r*Z}else n=="line"&&(K=r>0?t.bottom+3:t.top-3);for(var te;!(te=va(e,k,K),!te.outside);){if(r<0?K<=0:K>=d.height){te.hitSide=!0;break}K+=r*5}return te}var zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zt.prototype.init=function(e){var t=this,r=this,n=r.cm,d=r.div=e.lineDiv;Co(d,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function k(J){for(var Z=J.target;Z;Z=Z.parentNode){if(Z==d)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Z.className))break}return!1}Me(d,"paste",function(J){if(!k(J)||je(n,J)||To(J,n))return;W<=11&&setTimeout(pi(n,function(){return t.updateFromDOM()}),20)}),Me(d,"compositionstart",function(J){t.composing={data:J.data,done:!1}}),Me(d,"compositionupdate",function(J){t.composing||(t.composing={data:J.data,done:!1})}),Me(d,"compositionend",function(J){t.composing&&(J.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Me(d,"touchstart",function(){return r.forceCompositionEnd()}),Me(d,"input",function(){t.composing||t.readFromDOMSoon()});function K(J){if(!k(J)||je(n,J))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()}),J.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var Z=So(n);sa({lineWise:!0,text:Z.text}),J.type=="cut"&&n.operation(function(){n.setSelections(Z.ranges,0,Se),n.replaceSelection("",null,"cut")})}else return;if(J.clipboardData){J.clipboardData.clearData();var te=nn.text.join(` -`);if(J.clipboardData.setData("Text",te),J.clipboardData.getData("Text")==te){J.preventDefault();return}}var de=Ao(),me=de.firstChild;n.display.lineSpace.insertBefore(de,n.display.lineSpace.firstChild),me.value=nn.text.join(` -`);var Ie=document.activeElement;j(me),setTimeout(function(){n.display.lineSpace.removeChild(de),Ie.focus(),Ie==d&&r.showPrimarySelection()},50)}Me(d,"copy",K),Me(d,"cut",K)},zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var e=ps(this.cm,!1);return e.focus=document.activeElement==this.div,e},zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),d=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||d.line=t.display.viewFrom&&Ro(t,n)||{node:J[0].measure.map[2],offset:0},te=d.linee.firstLine()&&(n=Qe(n.line-1,ct(e.doc,n.line-1).length)),d.ch==ct(e.doc,d.line).text.length&&d.linet.viewTo-1)return!1;var k,K,J;n.line==t.viewFrom||(k=Bn(e,n.line))==0?(K=Ot(t.view[0].line),J=t.view[0].node):(K=Ot(t.view[k].line),J=t.view[k-1].node.nextSibling);var Z=Bn(e,d.line),te,de;if(Z==t.view.length-1?(te=t.viewTo-1,de=t.lineDiv.lastChild):(te=Ot(t.view[Z+1].line)-1,de=t.view[Z+1].node.previousSibling),!J)return!1;for(var me=e.doc.splitLines(tu(e,J,de,K,te)),Ie=Ui(e.doc,Qe(K,0),Qe(te,ct(e.doc,te).text.length));me.length>1&&Ie.length>1;)if(Oe(me)==Oe(Ie))me.pop(),Ie.pop(),te--;else if(me[0]==Ie[0])me.shift(),Ie.shift(),K++;else break;for(var Re=0,He=0,Xe=me[0],qe=Ie[0],rt=Math.min(Xe.length,qe.length);Ren.ch&<.charCodeAt(lt.length-He-1)==at.charCodeAt(at.length-He-1);)Re--,He++;me[me.length-1]=lt.slice(0,lt.length-He).replace(/^\u200b+/,""),me[0]=me[0].slice(Re).replace(/\u200b+$/,"");var Tt=Qe(K,Re),vt=Qe(te,Ie.length?Oe(Ie).length-He:0);if(me.length>1||me[0]||Ct(Tt,vt))return nr(e.doc,me,Tt,vt,"+input"),!0},zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},zt.prototype.reset=function(){this.forceCompositionEnd()},zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},zt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Mi(e.cm)})},zt.prototype.setUneditable=function(e){e.contentEditable="false"},zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pi(this.cm,Ka)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zt.prototype.onContextMenu=function(){},zt.prototype.resetPosition=function(){},zt.prototype.needsContentAttribute=!0;function Ro(e,t){var r=fa(e,t.line);if(!r||r.hidden)return null;var n=ct(e.doc,t.line),d=es(r,n,t.line),k=et(n,e.doc.direction),K="left";if(k){var J=$e(k,t.ch);K=J%2?"right":"left"}var Z=ns(d.map,t.ch,K);return Z.offset=Z.collapse=="right"?Z.end:Z.start,Z}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function lr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,d){var k="",K=!1,J=e.doc.lineSeparator(),Z=!1;function te(Re){return function(He){return He.id==Re}}function de(){K&&(k+=J,Z&&(k+=J),K=Z=!1)}function me(Re){Re&&(de(),k+=Re)}function Ie(Re){if(Re.nodeType==1){var He=Re.getAttribute("cm-text");if(He){me(He);return}var Xe=Re.getAttribute("cm-marker"),qe;if(Xe){var rt=e.findMarks(Qe(n,0),Qe(d+1,0),te(+Xe));rt.length&&(qe=rt[0].find(0))&&me(Ui(e.doc,qe.from,qe.to).join(J));return}if(Re.getAttribute("contenteditable")=="false")return;var lt=/^(pre|div|p|li|table|br)$/i.test(Re.nodeName);if(!/^br$/i.test(Re.nodeName)&&Re.textContent.length==0)return;lt&&de();for(var at=0;at=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Me(d,"paste",function(K){if(je(n,K)||To(K,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function k(K){if(je(n,K))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var J=So(n);sa({lineWise:!0,text:J.text}),K.type=="cut"?n.setSelections(J.ranges,null,Se):(r.prevInput="",d.value=J.text.join(` -`),j(d))}else return;K.type=="cut"&&(n.state.cutIncoming=+new Date)}Me(d,"cut",k),Me(d,"copy",k),Me(e.scroller,"paste",function(K){if(cn(e,K)||je(n,K))return;if(!d.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var J=new Event("paste");J.clipboardData=K.clipboardData,d.dispatchEvent(J)}),Me(e.lineSpace,"selectstart",function(K){cn(e,K)||ne(K)}),Me(d,"compositionstart",function(){var K=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:K,range:n.markText(K,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(d,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ri.prototype.createField=function(e){this.wrapper=Ao(),this.textarea=this.wrapper.firstChild},ri.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ri.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=ps(e);if(e.options.moveInputWithCursor){var d=en(e,r.sel.primary().head,"div"),k=t.wrapper.getBoundingClientRect(),K=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,d.top+K.top-k.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,d.left+K.left-k.left))}return n},ri.prototype.showSelection=function(e){var t=this.cm,r=t.display;x(r.cursorDiv,e.cursors),x(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ri.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&j(this.textarea),G&&W>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",G&&W>=9&&(this.hasSelection=null))},ri.prototype.getField=function(){return this.textarea},ri.prototype.supportsTouch=function(){return!1},ri.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!h||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},ri.prototype.blur=function(){this.textarea.blur()},ri.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ri.prototype.receivedFocus=function(){this.slowPoll()},ri.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ri.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},ri.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||dt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var d=r.value;if(d==n&&!t.somethingSelected())return!1;if(G&&W>=9&&this.hasSelection===d||s&&/[\uf700-\uf7ff]/.test(d))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var k=d.charCodeAt(0);if(k==8203&&!n&&(n="\u200B"),k==8666)return this.reset(),this.cm.execCommand("undo")}for(var K=0,J=Math.min(n.length,d.length);K1e3||d.indexOf(` -`)>-1?r.value=e.prevInput="":e.prevInput=d,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ri.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ri.prototype.onKeyPress=function(){G&&W>=9&&(this.hasSelection=null),this.fastPoll()},ri.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,d=t.textarea;t.contextMenuPending&&t.contextMenuPending();var k=Fn(r,e),K=n.scroller.scrollTop;if(!k||m)return;var J=r.options.resetSelectionOnContextMenu;J&&r.doc.sel.contains(k)==-1&&pi(r,wi)(r.doc,Cn(k),Se);var Z=d.style.cssText,te=t.wrapper.style.cssText,de=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",d.style.cssText=`position: absolute; width: 30px; height: 30px; +`?"n":!Ie||/\s/.test(Xe)?null:"p";if(Ie&&!He&&!qe&&(qe="s"),me&&me!=qe){n<0&&(n=1,de(),t.sticky="after");break}if(qe&&(me=qe),n>0&&!de(!He))break}var nt=ea(e,t,k,K,!0);return pr(k,nt)&&(nt.hitSide=!0),nt}function Oo(e,t,n,r){var d=e.doc,k=t.left,K;if(r=="page"){var J=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Z=Math.max(J-.5*Xr(e.display),3);K=(n>0?t.bottom:t.top)+n*Z}else r=="line"&&(K=n>0?t.bottom+3:t.top-3);for(var te;!(te=va(e,k,K),!te.outside);){if(n<0?K<=0:K>=d.height){te.hitSide=!0;break}K+=n*5}return te}var zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zt.prototype.init=function(e){var t=this,n=this,r=n.cm,d=n.div=e.lineDiv;Co(d,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function k(J){for(var Z=J.target;Z;Z=Z.parentNode){if(Z==d)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Z.className))break}return!1}Me(d,"paste",function(J){if(!k(J)||je(r,J)||To(J,r))return;W<=11&&setTimeout(pi(r,function(){return t.updateFromDOM()}),20)}),Me(d,"compositionstart",function(J){t.composing={data:J.data,done:!1}}),Me(d,"compositionupdate",function(J){t.composing||(t.composing={data:J.data,done:!1})}),Me(d,"compositionend",function(J){t.composing&&(J.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Me(d,"touchstart",function(){return n.forceCompositionEnd()}),Me(d,"input",function(){t.composing||t.readFromDOMSoon()});function K(J){if(!k(J)||je(r,J))return;if(r.somethingSelected())sa({lineWise:!1,text:r.getSelections()}),J.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var Z=So(r);sa({lineWise:!0,text:Z.text}),J.type=="cut"&&r.operation(function(){r.setSelections(Z.ranges,0,Se),r.replaceSelection("",null,"cut")})}else return;if(J.clipboardData){J.clipboardData.clearData();var te=ir.text.join(` +`);if(J.clipboardData.setData("Text",te),J.clipboardData.getData("Text")==te){J.preventDefault();return}}var de=Ao(),me=de.firstChild;r.display.lineSpace.insertBefore(de,r.display.lineSpace.firstChild),me.value=ir.text.join(` +`);var Ie=document.activeElement;j(me),setTimeout(function(){r.display.lineSpace.removeChild(de),Ie.focus(),Ie==d&&n.showPrimarySelection()},50)}Me(d,"copy",K),Me(d,"cut",K)},zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var e=ps(this.cm,!1);return e.focus=document.activeElement==this.div,e},zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),d=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||d.line=t.display.viewFrom&&Ro(t,r)||{node:J[0].measure.map[2],offset:0},te=d.linee.firstLine()&&(r=Qe(r.line-1,ct(e.doc,r.line-1).length)),d.ch==ct(e.doc,d.line).text.length&&d.linet.viewTo-1)return!1;var k,K,J;r.line==t.viewFrom||(k=Fr(e,r.line))==0?(K=Ot(t.view[0].line),J=t.view[0].node):(K=Ot(t.view[k].line),J=t.view[k-1].node.nextSibling);var Z=Fr(e,d.line),te,de;if(Z==t.view.length-1?(te=t.viewTo-1,de=t.lineDiv.lastChild):(te=Ot(t.view[Z+1].line)-1,de=t.view[Z+1].node.previousSibling),!J)return!1;for(var me=e.doc.splitLines(tu(e,J,de,K,te)),Ie=Ui(e.doc,Qe(K,0),Qe(te,ct(e.doc,te).text.length));me.length>1&&Ie.length>1;)if(Oe(me)==Oe(Ie))me.pop(),Ie.pop(),te--;else if(me[0]==Ie[0])me.shift(),Ie.shift(),K++;else break;for(var Re=0,He=0,Xe=me[0],qe=Ie[0],nt=Math.min(Xe.length,qe.length);Rer.ch&<.charCodeAt(lt.length-He-1)==at.charCodeAt(at.length-He-1);)Re--,He++;me[me.length-1]=lt.slice(0,lt.length-He).replace(/^\u200b+/,""),me[0]=me[0].slice(Re).replace(/\u200b+$/,"");var Tt=Qe(K,Re),vt=Qe(te,Ie.length?Oe(Ie).length-He:0);if(me.length>1||me[0]||Ct(Tt,vt))return rn(e.doc,me,Tt,vt,"+input"),!0},zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},zt.prototype.reset=function(){this.forceCompositionEnd()},zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},zt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Mi(e.cm)})},zt.prototype.setUneditable=function(e){e.contentEditable="false"},zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pi(this.cm,Ka)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zt.prototype.onContextMenu=function(){},zt.prototype.resetPosition=function(){},zt.prototype.needsContentAttribute=!0;function Ro(e,t){var n=fa(e,t.line);if(!n||n.hidden)return null;var r=ct(e.doc,t.line),d=es(n,r,t.line),k=et(r,e.doc.direction),K="left";if(k){var J=$e(k,t.ch);K=J%2?"right":"left"}var Z=rs(d.map,t.ch,K);return Z.offset=Z.collapse=="right"?Z.end:Z.start,Z}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ln(e,t){return t&&(e.bad=!0),e}function tu(e,t,n,r,d){var k="",K=!1,J=e.doc.lineSeparator(),Z=!1;function te(Re){return function(He){return He.id==Re}}function de(){K&&(k+=J,Z&&(k+=J),K=Z=!1)}function me(Re){Re&&(de(),k+=Re)}function Ie(Re){if(Re.nodeType==1){var He=Re.getAttribute("cm-text");if(He){me(He);return}var Xe=Re.getAttribute("cm-marker"),qe;if(Xe){var nt=e.findMarks(Qe(r,0),Qe(d+1,0),te(+Xe));nt.length&&(qe=nt[0].find(0))&&me(Ui(e.doc,qe.from,qe.to).join(J));return}if(Re.getAttribute("contenteditable")=="false")return;var lt=/^(pre|div|p|li|table|br)$/i.test(Re.nodeName);if(!/^br$/i.test(Re.nodeName)&&Re.textContent.length==0)return;lt&&de();for(var at=0;at=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Me(d,"paste",function(K){if(je(r,K)||To(K,r))return;r.state.pasteIncoming=+new Date,n.fastPoll()});function k(K){if(je(r,K))return;if(r.somethingSelected())sa({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var J=So(r);sa({lineWise:!0,text:J.text}),K.type=="cut"?r.setSelections(J.ranges,null,Se):(n.prevInput="",d.value=J.text.join(` +`),j(d))}else return;K.type=="cut"&&(r.state.cutIncoming=+new Date)}Me(d,"cut",k),Me(d,"copy",k),Me(e.scroller,"paste",function(K){if(dr(e,K)||je(r,K))return;if(!d.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var J=new Event("paste");J.clipboardData=K.clipboardData,d.dispatchEvent(J)}),Me(e.lineSpace,"selectstart",function(K){dr(e,K)||re(K)}),Me(d,"compositionstart",function(){var K=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:K,range:r.markText(K,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(d,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ni.prototype.createField=function(e){this.wrapper=Ao(),this.textarea=this.wrapper.firstChild},ni.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ni.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=ps(e);if(e.options.moveInputWithCursor){var d=er(e,n.sel.primary().head,"div"),k=t.wrapper.getBoundingClientRect(),K=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,d.top+K.top-k.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,d.left+K.left-k.left))}return r},ni.prototype.showSelection=function(e){var t=this.cm,n=t.display;x(n.cursorDiv,e.cursors),x(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ni.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),G&&W>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",G&&W>=9&&(this.hasSelection=null))},ni.prototype.getField=function(){return this.textarea},ni.prototype.supportsTouch=function(){return!1},ni.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!h||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},ni.prototype.blur=function(){this.textarea.blur()},ni.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ni.prototype.receivedFocus=function(){this.slowPoll()},ni.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ni.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},ni.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||dt(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var d=n.value;if(d==r&&!t.somethingSelected())return!1;if(G&&W>=9&&this.hasSelection===d||s&&/[\uf700-\uf7ff]/.test(d))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var k=d.charCodeAt(0);if(k==8203&&!r&&(r="\u200B"),k==8666)return this.reset(),this.cm.execCommand("undo")}for(var K=0,J=Math.min(r.length,d.length);K1e3||d.indexOf(` +`)>-1?n.value=e.prevInput="":e.prevInput=d,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ni.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ni.prototype.onKeyPress=function(){G&&W>=9&&(this.hasSelection=null),this.fastPoll()},ni.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,d=t.textarea;t.contextMenuPending&&t.contextMenuPending();var k=Nr(n,e),K=r.scroller.scrollTop;if(!k||m)return;var J=n.options.resetSelectionOnContextMenu;J&&n.doc.sel.contains(k)==-1&&pi(n,wi)(n.doc,Sr(k),Se);var Z=d.style.cssText,te=t.wrapper.style.cssText,de=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",d.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-de.top-5)+"px; left: "+(e.clientX-de.left-5)+`px; z-index: 1000; background: `+(G?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var me;i&&(me=window.scrollY),n.input.focus(),i&&window.scrollTo(null,me),n.input.reset(),r.somethingSelected()||(d.value=t.prevInput=" "),t.contextMenuPending=Re,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Ie(){if(d.selectionStart!=null){var Xe=r.somethingSelected(),qe="\u200B"+(Xe?d.value:"");d.value="\u21DA",d.value=qe,t.prevInput=Xe?"":"\u200B",d.selectionStart=1,d.selectionEnd=qe.length,n.selForContextMenu=r.doc.sel}}function Re(){if(t.contextMenuPending!=Re)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=te,d.style.cssText=Z,G&&W<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=K),d.selectionStart!=null){(!G||G&&W<9)&&Ie();var Xe=0,qe=function(){n.selForContextMenu==r.doc.sel&&d.selectionStart==0&&d.selectionEnd>0&&t.prevInput=="\u200B"?pi(r,Vs)(r):Xe++<10?n.detectingSelectAll=setTimeout(qe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(qe,200)}}if(G&&W>=9&&Ie(),L){fe(e);var He=function(){nt(window,"mouseup",He),setTimeout(Re,20)};Me(window,"mouseup",He)}else setTimeout(Re,50)},ri.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ri.prototype.setUneditable=function(){},ri.prototype.needsContentAttribute=!1;function nu(e,t){if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=N();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=J.getValue()}var d;if(e.form&&(Me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var k=e.form;d=k.submit;try{var K=k.submit=function(){n(),k.submit=d,k.submit(),k.submit=K}}catch(Z){}}t.finishInit=function(Z){Z.save=n,Z.getTextArea=function(){return e},Z.toTextArea=function(){Z.toTextArea=isNaN,n(),e.parentNode.removeChild(Z.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=d))}},e.style.display="none";var J=Zt(function(Z){return e.parentNode.insertBefore(Z,e.nextSibling)},t);return J}function ru(e){e.off=nt,e.on=Me,e.wheelEventPixels=dl,e.Doc=Pi,e.splitLines=St,e.countColumn=Y,e.findColumn=pe,e.isWordChar=Be,e.Pass=ke,e.signal=Fe,e.Line=Mn,e.changeEnd=An,e.scrollbarModel=xs,e.Pos=Qe,e.cmpPos=Ct,e.modes=Qt,e.mimeModes=It,e.resolveMode=yt,e.getMode=Li,e.modeExtensions=bt,e.extendMode=xt,e.copyState=Ft,e.startState=di,e.innerMode=ti,e.commands=Pr,e.keyMap=fn,e.keyName=lo,e.isModifierKey=so,e.lookupKey=ar,e.normalizeKeyMap=kl,e.StringStream=Pt,e.SharedTextMarker=Dr,e.TextMarker=Rn,e.LineWidget=Ir,e.e_preventDefault=ne,e.e_stopPropagation=re,e.e_stop=fe,e.addClass=B,e.contains=v,e.rmClass=C,e.keyNames=Ln}$l(Zt),ql(Zt);var au="iter insert remove copy getEditor constructor".split(" ");for(var la in Pi.prototype)Pi.prototype.hasOwnProperty(la)&&le(au,la)<0&&(Zt.prototype[la]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[la]));return _e(Pi),Zt.inputStyles={textarea:ri,contenteditable:zt},Zt.defineMode=function(e){!Zt.defaults.mode&&e!="null"&&(Zt.defaults.mode=e),Ci.apply(this,arguments)},Zt.defineMIME=Ki,Zt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Zt.defineMIME("text/plain","null"),Zt.defineExtension=function(e,t){Zt.prototype[e]=t},Zt.defineDocExtension=function(e,t){Pi.prototype[e]=t},Zt.fromTextArea=nu,ru(Zt),Zt.version="5.58.2",Zt})},Y1PL:function(st,be,Q){"use strict";Q.r(be),Q.d(be,"ResizableTextArea",function(){return le});var ie=Q("wx14"),$=Q("1OyB"),M=Q("vuIU"),X=Q("Ji7U"),F=Q("LK+K"),U=Q("q1tI"),G=Q("VTBJ"),W=Q("rePB"),i=Q("Zm9Q"),D=Q("Kwbf"),g=Q("c+Xe"),m=Q("m+aA"),p=Q("bdgK"),l=new Map;function u(Se){Se.forEach(function(Ce){var ce,pe=Ce.target;(ce=l.get(pe))===null||ce===void 0||ce.forEach(function(se){return se(pe)})})}var f=new p.default(u),o=null,h=null;function s(Se,Ce){l.has(Se)||(l.set(Se,new Set),f.observe(Se)),l.get(Se).add(Ce)}function a(Se,Ce){l.has(Se)&&(l.get(Se).delete(Ce),l.get(Se).size||(f.unobserve(Se),l.delete(Se)))}var A=function(Se){Object(X.a)(ce,Se);var Ce=Object(F.a)(ce);function ce(){return Object($.a)(this,ce),Ce.apply(this,arguments)}return Object(M.a)(ce,[{key:"render",value:function(){return this.props.children}}]),ce}(U.Component),_=U.createContext(null);function S(Se){var Ce=Se.children,ce=Se.onBatchResize,pe=U.useRef(0),se=U.useRef([]),ae=U.useContext(_),Oe=U.useCallback(function(Te,Ne,De){pe.current+=1;var We=pe.current;se.current.push({size:Te,element:Ne,data:De}),Promise.resolve().then(function(){We===pe.current&&(ce==null||ce(se.current),se.current=[])}),ae==null||ae(Te,Ne,De)},[ce,ae]);return U.createElement(_.Provider,{value:Oe},Ce)}function L(Se){var Ce=Se.children,ce=Se.disabled,pe=U.useRef(null),se=U.useRef(null),ae=U.useContext(_),Oe=U.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Te=U.isValidElement(Ce)&&Object(g.c)(Ce),Ne=Te?Ce.ref:null,De=U.useMemo(function(){return Object(g.a)(Ne,pe)},[Ne,pe]),We=U.useRef(Se);We.current=Se;var Le=U.useCallback(function(Be){var Ge=We.current,oe=Ge.onResize,ye=Ge.data,we=Be.getBoundingClientRect(),Ae=we.width,Ue=we.height,Ve=Be.offsetWidth,Ze=Be.offsetHeight,$e=Math.floor(Ae),tt=Math.floor(Ue);if(Oe.current.width!==$e||Oe.current.height!==tt||Oe.current.offsetWidth!==Ve||Oe.current.offsetHeight!==Ze){var et={width:$e,height:tt,offsetWidth:Ve,offsetHeight:Ze};Oe.current=et;var Je=Ve===Math.round(Ae)?Ae:Ve,Me=Ze===Math.round(Ue)?Ue:Ze,ut=Object(G.a)(Object(G.a)({},et),{},{offsetWidth:Je,offsetHeight:Me});ae==null||ae(ut,Be,ye),oe&&Promise.resolve().then(function(){oe(ut,Be)})}},[]);return U.useEffect(function(){var Be=Object(m.a)(pe.current)||Object(m.a)(se.current);return Be&&!ce&&s(Be,Le),function(){return a(Be,Le)}},[pe.current,ce]),U.createElement(A,{ref:se},Te?U.cloneElement(Ce,{ref:De}):Ce)}var R="rc-observer-key";function C(Se){var Ce=Se.children,ce=Object(i.a)(Ce);return ce.map(function(pe,se){var ae=(pe==null?void 0:pe.key)||"".concat(R,"-").concat(se);return U.createElement(L,Object(ie.a)({},Se,{key:ae}),pe)})}C.Collection=S;var w=C,x=Q("bT9E"),c=Q("TSYQ"),T=Q.n(c),y=` + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var me;i&&(me=window.scrollY),r.input.focus(),i&&window.scrollTo(null,me),r.input.reset(),n.somethingSelected()||(d.value=t.prevInput=" "),t.contextMenuPending=Re,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function Ie(){if(d.selectionStart!=null){var Xe=n.somethingSelected(),qe="\u200B"+(Xe?d.value:"");d.value="\u21DA",d.value=qe,t.prevInput=Xe?"":"\u200B",d.selectionStart=1,d.selectionEnd=qe.length,r.selForContextMenu=n.doc.sel}}function Re(){if(t.contextMenuPending!=Re)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=te,d.style.cssText=Z,G&&W<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=K),d.selectionStart!=null){(!G||G&&W<9)&&Ie();var Xe=0,qe=function(){r.selForContextMenu==n.doc.sel&&d.selectionStart==0&&d.selectionEnd>0&&t.prevInput=="\u200B"?pi(n,Vs)(n):Xe++<10?r.detectingSelectAll=setTimeout(qe,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(qe,200)}}if(G&&W>=9&&Ie(),L){fe(e);var He=function(){rt(window,"mouseup",He),setTimeout(Re,20)};Me(window,"mouseup",He)}else setTimeout(Re,50)},ni.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ni.prototype.setUneditable=function(){},ni.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=N();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=J.getValue()}var d;if(e.form&&(Me(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var k=e.form;d=k.submit;try{var K=k.submit=function(){r(),k.submit=d,k.submit(),k.submit=K}}catch(Z){}}t.finishInit=function(Z){Z.save=r,Z.getTextArea=function(){return e},Z.toTextArea=function(){Z.toTextArea=isNaN,r(),e.parentNode.removeChild(Z.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=d))}},e.style.display="none";var J=Zt(function(Z){return e.parentNode.insertBefore(Z,e.nextSibling)},t);return J}function nu(e){e.off=rt,e.on=Me,e.wheelEventPixels=dl,e.Doc=Pi,e.splitLines=St,e.countColumn=Y,e.findColumn=pe,e.isWordChar=Be,e.Pass=ke,e.signal=Fe,e.Line=kr,e.changeEnd=Cr,e.scrollbarModel=xs,e.Pos=Qe,e.cmpPos=Ct,e.modes=Qt,e.mimeModes=It,e.resolveMode=yt,e.getMode=Li,e.modeExtensions=bt,e.extendMode=xt,e.copyState=Ft,e.startState=di,e.innerMode=ti,e.commands=Pn,e.keyMap=cr,e.keyName=lo,e.isModifierKey=so,e.lookupKey=an,e.normalizeKeyMap=kl,e.StringStream=Pt,e.SharedTextMarker=Dn,e.TextMarker=Or,e.LineWidget=In,e.e_preventDefault=re,e.e_stopPropagation=ne,e.e_stop=fe,e.addClass=B,e.contains=v,e.rmClass=C,e.keyNames=Rr}$l(Zt),ql(Zt);var au="iter insert remove copy getEditor constructor".split(" ");for(var la in Pi.prototype)Pi.prototype.hasOwnProperty(la)&&le(au,la)<0&&(Zt.prototype[la]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[la]));return _e(Pi),Zt.inputStyles={textarea:ni,contenteditable:zt},Zt.defineMode=function(e){!Zt.defaults.mode&&e!="null"&&(Zt.defaults.mode=e),Ci.apply(this,arguments)},Zt.defineMIME=Ki,Zt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Zt.defineMIME("text/plain","null"),Zt.defineExtension=function(e,t){Zt.prototype[e]=t},Zt.defineDocExtension=function(e,t){Pi.prototype[e]=t},Zt.fromTextArea=ru,nu(Zt),Zt.version="5.58.2",Zt})},Y1PL:function(st,be,Q){"use strict";Q.r(be),Q.d(be,"ResizableTextArea",function(){return le});var ie=Q("wx14"),$=Q("1OyB"),M=Q("vuIU"),X=Q("Ji7U"),F=Q("LK+K"),U=Q("q1tI"),G=Q("VTBJ"),W=Q("rePB"),i=Q("Zm9Q"),D=Q("Kwbf"),g=Q("c+Xe"),m=Q("m+aA"),p=Q("bdgK"),l=new Map;function u(Se){Se.forEach(function(Ce){var ce,pe=Ce.target;(ce=l.get(pe))===null||ce===void 0||ce.forEach(function(se){return se(pe)})})}var f=new p.default(u),o=null,h=null;function s(Se,Ce){l.has(Se)||(l.set(Se,new Set),f.observe(Se)),l.get(Se).add(Ce)}function a(Se,Ce){l.has(Se)&&(l.get(Se).delete(Ce),l.get(Se).size||(f.unobserve(Se),l.delete(Se)))}var A=function(Se){Object(X.a)(ce,Se);var Ce=Object(F.a)(ce);function ce(){return Object($.a)(this,ce),Ce.apply(this,arguments)}return Object(M.a)(ce,[{key:"render",value:function(){return this.props.children}}]),ce}(U.Component),_=U.createContext(null);function S(Se){var Ce=Se.children,ce=Se.onBatchResize,pe=U.useRef(0),se=U.useRef([]),ae=U.useContext(_),Oe=U.useCallback(function(Te,Ne,De){pe.current+=1;var We=pe.current;se.current.push({size:Te,element:Ne,data:De}),Promise.resolve().then(function(){We===pe.current&&(ce==null||ce(se.current),se.current=[])}),ae==null||ae(Te,Ne,De)},[ce,ae]);return U.createElement(_.Provider,{value:Oe},Ce)}function L(Se){var Ce=Se.children,ce=Se.disabled,pe=U.useRef(null),se=U.useRef(null),ae=U.useContext(_),Oe=U.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Te=U.isValidElement(Ce)&&Object(g.c)(Ce),Ne=Te?Ce.ref:null,De=U.useMemo(function(){return Object(g.a)(Ne,pe)},[Ne,pe]),We=U.useRef(Se);We.current=Se;var Le=U.useCallback(function(Be){var Ge=We.current,oe=Ge.onResize,ye=Ge.data,we=Be.getBoundingClientRect(),Ae=we.width,Ue=we.height,Ve=Be.offsetWidth,Ze=Be.offsetHeight,$e=Math.floor(Ae),tt=Math.floor(Ue);if(Oe.current.width!==$e||Oe.current.height!==tt||Oe.current.offsetWidth!==Ve||Oe.current.offsetHeight!==Ze){var et={width:$e,height:tt,offsetWidth:Ve,offsetHeight:Ze};Oe.current=et;var Je=Ve===Math.round(Ae)?Ae:Ve,Me=Ze===Math.round(Ue)?Ue:Ze,ut=Object(G.a)(Object(G.a)({},et),{},{offsetWidth:Je,offsetHeight:Me});ae==null||ae(ut,Be,ye),oe&&Promise.resolve().then(function(){oe(ut,Be)})}},[]);return U.useEffect(function(){var Be=Object(m.a)(pe.current)||Object(m.a)(se.current);return Be&&!ce&&s(Be,Le),function(){return a(Be,Le)}},[pe.current,ce]),U.createElement(A,{ref:se},Te?U.cloneElement(Ce,{ref:De}):Ce)}var R="rc-observer-key";function C(Se){var Ce=Se.children,ce=Object(i.a)(Ce);return ce.map(function(pe,se){var ae=(pe==null?void 0:pe.key)||"".concat(R,"-").concat(se);return U.createElement(L,Object(ie.a)({},Se,{key:ae}),pe)})}C.Collection=S;var w=C,x=Q("bT9E"),c=Q("TSYQ"),T=Q.n(c),y=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -395,7 +395,7 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var d=e. `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},o={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` -`)}]},h=Q("5VLF"),s=Q.n(h),a={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},A=function(Y,ee){return ee.map(function(le){return{label:le,kind:Y.languages.CompletionItemKind.Keyword,insertText:le}})},_=function(Y){return Object.keys(a.tables).map(function(ee){return{label:ee,kind:Y.languages.CompletionItemKind.Variable,insertText:ee}})},S=function(Y,ee){var le=a.tables[Y];return le?le.map(function(ue){return{label:ue,kind:ee.languages.CompletionItemKind.Field,insertText:ue}}):[]};function L(b,Y,ee,le,ue){var ke=Y.getWordUntilPosition(ee),Se={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Ce=le.map(function(ce){return{label:ce,kind:b.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ue.map(function(ce){Ce.push(Object(ie.a)(Object(ie.a)({},ce),{},{range:Se}))}),Ce}var R=function(b){a.languages.map(function(ue){return b.languages.registerDocumentFormattingEditProvider(ue,{provideDocumentFormattingEdits:function(Se,Ce,ce){return Object(g.a)(p.a.mark(function pe(){var se;return p.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return se=s()(Se.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Oe.abrupt("return",[{range:Se.getFullModelRange(),text:se}]);case 2:case"end":return Oe.stop()}},pe)}))()}}),ue});var Y=f.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=o.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),le=u.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}});b.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(f.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(f.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}}),b.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn};return{suggestions:Object($.a)(l.keywords.map(function(pe){return{label:pe,kind:b.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}}))}}}),b.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(u.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(u.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}}),b.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(o.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(o.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}})},C="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",w=Q("fjLI"),x=Q("LvDl"),c=Q("+ua5");function T(b){return/^\d+$/.test(b)?"".concat(b,"px"):b}function y(){}var v=!1,N={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function B(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=b;if(Array.isArray(b)){for(var ee=0;ee0||di.target.offsetWidth>0)&&je.current.instance.layout()}}catch(Pt){Ft.e(Pt)}finally{Ft.f()}}),bt.observe(Fe.current)),bt}function ze(){X.b.warn(decodeURIComponent(C))}var ot=function(){var xt=je.current.instance;if(ke!=null&&xt&&fe){var Ft=xt.getModel();Ft&&ke!==Ft.getValue()&&(v=!0,Ft.setValue(ke),xt.layout(),v=!1)}};Object(W.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){ot()},500)},[ke,fe,je.current]),Object(W.useEffect)(function(){if(Je&&je.current&&je.current.instance){var bt=je.current.instance;bt.changeViewZones(function(Ft){var ti=document.createElement("div");ti.style.padding="10px 20px",ti.style.width="calc(100% - 20px)",ti.className="my-error-line-wrp",ti.innerHTML=ut,Ft.addZone({afterLineNumber:Je||11,heightInLines:3,domNode:ti})});var xt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};bt.addOverlayWidget(xt),bt.revealPositionInCenter({lineNumber:20,column:1})}},[Je,je.current,fe]);function mt(){var bt=je.current.instance;if(bt){var xt=bt.getSelection(),Ft=je.current.pastePos||{},ti=new O.Range(Ft.startLineNumber||xt.endLineNumber,Ft.startColumn||xt.endColumn,Ft.endLineNumber||xt.endLineNumber,Ft.endColumn||xt.endColumn);setTimeout(function(){bt.executeEdits("",[{range:ti,text:""}])},300)}}function ft(bt){(window.navigator.platform.match("Mac")?bt.metaKey:bt.ctrlKey)&&bt.keyCode==83&&(bt.preventDefault(),Le())}var wt=function(){if(Ge&&je.current.instance){var xt=je.current.instance.getContentHeight();yt(xt0||Ue.target.offsetWidth>0)&&Ge.layout()}}catch(Ve){we.e(Ve)}finally{we.f()}}),oe.observe(se.current)),oe}Object(W.useEffect)(function(){se.current&&Promise.all([Q.e(16),Q.e(28)]).then(Q.t.bind(null,"M/lh",7)).then(function(Ge){O=Ge;var oe=O.editor.createDiffEditor(se.current,Object(ie.a)(Object(ie.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},pe),{},{wordWrap:!0}));Ne(oe);var ye=De(oe);return function(){oe.dispose();var we=oe.getModel();we&&we.dispose(),ye.unobserve(se.current)}})},[]),Object(W.useEffect)(function(){Te&&Te.setModel({original:O.editor.createModel(ke,Ce),modified:O.editor.createModel(Se,Ce)})},[ke,Se,Ce,Te]);var We=T(ee),Le=T(ue),Be={width:We,height:Le};return i.a.createElement("div",{className:"my-diff-editor",ref:se,style:Be})}},ZpRC:function(st,be,Q){"use strict";function ie(g){return typeof g=="object"&&g!=null&&g.nodeType===1}function $(g,m){return(!m||g!=="hidden")&&g!=="visible"&&g!=="clip"}function M(g,m){if(g.clientHeightm||f>g&&o=m&&h>=p?f-g-l:o>m&&hp?o-m+u:0}var F=function(g,m){var p=window,l=m.scrollMode,u=m.block,f=m.inline,o=m.boundary,h=m.skipOverflowHiddenElements,s=typeof o=="function"?o:function(Ge){return Ge!==o};if(!ie(g))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,A=[],_=g;ie(_)&&s(_);){if((_=_.parentElement)===a){A.push(_);break}_!=null&&_===document.body&&M(_)&&!M(document.documentElement)||_!=null&&M(_,h)&&A.push(_)}for(var S=p.visualViewport?p.visualViewport.width:innerWidth,L=p.visualViewport?p.visualViewport.height:innerHeight,R=window.scrollX||pageXOffset,C=window.scrollY||pageYOffset,w=g.getBoundingClientRect(),x=w.height,c=w.width,T=w.top,y=w.right,v=w.bottom,N=w.left,B=u==="start"||u==="nearest"?T:u==="end"?v:T+x/2,O=f==="center"?N+c/2:f==="end"?y:N,j=[],P=0;P=0&&N>=0&&v<=L&&y<=S&&T>=ue&&v<=Se&&N>=Ce&&y<=ke)return j;var ce=getComputedStyle(b),pe=parseInt(ce.borderLeftWidth,10),se=parseInt(ce.borderTopWidth,10),ae=parseInt(ce.borderRightWidth,10),Oe=parseInt(ce.borderBottomWidth,10),Te=0,Ne=0,De="offsetWidth"in b?b.offsetWidth-b.clientWidth-pe-ae:0,We="offsetHeight"in b?b.offsetHeight-b.clientHeight-se-Oe:0;if(a===b)Te=u==="start"?B:u==="end"?B-L:u==="nearest"?X(C,C+L,L,se,Oe,C+B,C+B+x,x):B-L/2,Ne=f==="start"?O:f==="center"?O-S/2:f==="end"?O-S:X(R,R+S,S,pe,ae,R+O,R+O+c,c),Te=Math.max(0,Te+C),Ne=Math.max(0,Ne+R);else{Te=u==="start"?B-ue-se:u==="end"?B-Se+Oe+We:u==="nearest"?X(ue,Se,ee,se,Oe+We,B,B+x,x):B-(ue+ee/2)+We/2,Ne=f==="start"?O-Ce-pe:f==="center"?O-(Ce+le/2)+De/2:f==="end"?O-ke+ae+De:X(Ce,ke,le,pe,ae+De,O,O+c,c);var Le=b.scrollLeft,Be=b.scrollTop;B+=Be-(Te=Math.max(0,Math.min(Be+Te,b.scrollHeight-ee+We))),O+=Le-(Ne=Math.max(0,Math.min(Le+Ne,b.scrollWidth-le+De)))}j.push({el:b,top:Te,left:Ne})}return j};function U(g){return g===Object(g)&&Object.keys(g).length!==0}function G(g,m){m===void 0&&(m="auto");var p="scrollBehavior"in document.body.style;g.forEach(function(l){var u=l.el,f=l.top,o=l.left;u.scroll&&p?u.scroll({top:f,left:o,behavior:m}):(u.scrollTop=f,u.scrollLeft=o)})}function W(g){return g===!1?{block:"end",inline:"nearest"}:U(g)?g:{block:"start",inline:"nearest"}}function i(g,m){var p=!g.ownerDocument.documentElement.contains(g);if(U(m)&&typeof m.behavior=="function")return m.behavior(p?[]:F(g,m));if(p)return;var l=W(m);return G(F(g,l),l.behavior)}var D=be.a=i},bT9E:function(st,be,Q){"use strict";Q.d(be,"a",function(){return $});var ie=Q("VTBJ");function $(M,X){var F=Object(ie.a)({},M);return Array.isArray(X)&&X.forEach(function(U){delete F[U]}),F}},c5Ni:function(st,be,Q){},dejd:function(st,be,Q){},dmUQ:function(st,be,Q){"use strict";var ie=Q("Ff2n"),$=Q("rePB"),M=Q("1OyB"),X=Q("vuIU"),F=Q("Ji7U"),U=Q("md7G"),G=Q("foSv"),W=Q("q1tI"),i=Q.n(W),D=Q("TSYQ"),g=Q.n(D),m=Q("4IlW");function p(x,c){var T=Object.keys(x);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(x);c&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),T.push.apply(T,y)}return T}function l(x){for(var c=1;c1?le-1:0),ke=1;ke1?P-1:0),Y=1;Y=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var P=0;return j.indexOf(".")>=0&&(P=j.length-j.indexOf(".")-1),P},v.getInputDisplayValue=function(O){var j=O||v.state,P=j.focused,b=j.inputValue,Y=j.value,ee;P?ee=b:ee=v.toPrecisionAsStep(Y),ee==null&&(ee="");var le=v.formatWrapper(ee);return S(v.props.decimalSeparator)&&(le=le.toString().replace(".",v.props.decimalSeparator)),le},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(O){}},v.restoreByAfter=function(O){if(O===void 0)return!1;var j=v.input.value,P=j.lastIndexOf(O);if(P===-1)return!1;var b=v.cursorBefore.length;return v.lastKeyCode===m.a.DELETE&&v.cursorBefore.charAt(b-1)===O[0]?(v.fixCaret(b,b),!0):P+O.length===j.length?(v.fixCaret(P,P),!0):!1},v.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(j,P){var b=O.substring(P);return v.restoreByAfter(b)})},v.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(O,j,P){v.pressingUpOrDown=!0,v.step("down",O,j,P)},v.up=function(O,j,P){v.pressingUpOrDown=!0,v.step("up",O,j,P)},v.saveInput=function(O){v.input=O};var N=y.value;N===void 0&&(N=y.defaultValue),v.state={focused:y.autoFocus};var B=v.getValidValue(v.toNumber(N));return v.state=l(l({},v.state),{},{inputValue:v.toPrecisionAsStep(B),value:B}),v}return Object(X.a)(T,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var N=this.props,B=N.value,O=N.onChange,j=N.max,P=N.min,b=this.state.focused;if(v){if(!L(v.value,B)||!L(v.max,j)||!L(v.min,P)){var Y=b?B:this.getValidValue(B),ee;this.pressingUpOrDown?ee=Y:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:ee})}var le="value"in this.props?B:this.state.value;"max"in this.props&&v.max!==j&&typeof le=="number"&&le>j&&O&&O(j),"min"in this.props&&v.min!==P&&typeof le=="number"&&le1&&arguments[1]!==void 0?arguments[1]:this.props.min,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(v);return isNaN(O)?v:(OB&&(O=B),O)}},{key:"setValue",value:function(v,N){var B=this.props.precision,O=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),j=this.state.value,P=j===void 0?null:j,b=this.state.inputValue,Y=b===void 0?null:b,ee=typeof O=="number"?O.toFixed(B):"".concat(O),le=O!==P||ee!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},N)):this.setState({value:O,inputValue:this.toPrecisionAsStep(v)},N),le&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.props,O=B.precision,j=B.step;if(S(O))return O;var P=this.getPrecision(N),b=this.getPrecision(j),Y=this.getPrecision(v);return v?Math.max(Y,P+b):P+b}},{key:"getPrecisionFactor",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.getMaxPrecision(v,N);return Math.pow(10,B)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var N=Math.abs(this.getMaxPrecision(v));return isNaN(N)?v.toString():Number(v).toFixed(N)}},{key:"toNumber",value:function(v){var N=this.props.precision,B=this.state.focused,O=v&&v.length>16&&B;return this.isNotCompleteNumber(v)||O?v:S(N)?Math.round(v*Math.pow(10,N))/Math.pow(10,N):Number(v)}},{key:"upStep",value:function(v,N){var B=this.props.step,O=this.getPrecisionFactor(v,N),j=Math.abs(this.getMaxPrecision(v,N)),P=((O*v+O*B*N)/O).toFixed(j);return this.toNumber(P)}},{key:"downStep",value:function(v,N){var B=this.props.step,O=this.getPrecisionFactor(v,N),j=Math.abs(this.getMaxPrecision(v,N)),P=((O*v-O*B*N)/O).toFixed(j);return this.toNumber(P)}},{key:"step",value:function(v,N){var B=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),N&&(N.persist(),N.preventDefault());var P=this.props;if(P.disabled)return;var b=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(b))return;var Y=this["".concat(v,"Step")](b,O),ee=Y>P.max||YP.max?Y=P.max:Y=ue),je=(tt||tt===0)&&(isNaN(tt)||Number(tt)<=ke),Ee=Fe||O||j,ge=je||O||j,_e=g()("".concat(B,"-handler"),"".concat(B,"-handler-up"),Object($.a)({},"".concat(B,"-handler-up-disabled"),Ee)),ne=g()("".concat(B,"-handler"),"".concat(B,"-handler-down"),Object($.a)({},"".concat(B,"-handler-down-disabled"),ge)),re=P?{onTouchStart:Ee?o:this.up,onTouchEnd:this.stop}:{onMouseDown:Ee?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=P?{onTouchStart:ge?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ge?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return i.a.createElement("div",{className:Je,style:Se,title:Ce,onMouseEnter:ce,onMouseLeave:pe,onMouseOver:se,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},i.a.createElement("div",{className:"".concat(B,"-handler-wrap")},i.a.createElement("span",Object.assign({unselectable:"on"},re,{role:"button","aria-label":"Increase Value","aria-disabled":Ee,className:_e}),Y||i.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-up-inner"),onClick:h})),i.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Decrease Value","aria-disabled":ge,className:ne}),ee||i.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-down-inner"),onClick:h}))),i.a.createElement("div",{className:"".concat(B,"-input-wrap")},i.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ke,"aria-valuemax":ue,"aria-valuenow":tt,required:Oe,type:De,placeholder:We,onPaste:Ue,onClick:Te,onMouseUp:this.onMouseUp,className:"".concat(B,"-input"),tabIndex:Ne,autoComplete:b,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ut?this.onKeyDown:o,onKeyUp:ut?this.onKeyUp:o,autoFocus:we,maxLength:ye,readOnly:j,disabled:O,max:ue,min:ke,step:oe,name:Ae,title:Ce,id:Le,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(nt),pattern:Ge,inputMode:Be,onInput:Ve},Me))))}}]),T}(i.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:s,required:!1,autoComplete:"off"};var C=R,w=be.a=C},eYnf:function(st,be,Q){st.exports={flex_box_center:"flex_box_center___1XyGp",flex_space_between:"flex_space_between___3jaTm",flex_box_vertical_center:"flex_box_vertical_center___2_EoO",flex_box_center_end:"flex_box_center_end___aCF48",flex_box_column:"flex_box_column___10vW2",bg:"bg___1Uj9H",title:"title___2xwyX",titleLeft:"titleLeft___1ASl5",titleRight:"titleRight___1FHl9",btns:"btns___3kkgI"}},fjLI:function(st,be,Q){"use strict";Q.d(be,"f",function(){return p}),Q.d(be,"b",function(){return l}),Q.d(be,"a",function(){return u}),Q.d(be,"d",function(){return f}),Q.d(be,"e",function(){return o}),Q.d(be,"c",function(){return h});var ie=Q("8HAY"),$=Q("Vhoy"),M=Q("MI8n"),X=Q("JYp7"),F=Q("pmY6"),U=Q("24hK"),G=Q("nnTU"),W=Q("T8No"),i=Q("Cg/j"),D=Q("t9D7"),g=function(s,a,A,_){var S=arguments.length,L=S<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,A):_,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(s,a,A,_);else for(var C=s.length-1;C>=0;C--)(R=s[C])&&(L=(S<3?R(L):S>3?R(a,A,L):R(a,A))||L);return S>3&&L&&Object.defineProperty(a,A,L),L},m=function(s,a){return function(A,_){a(A,_,s)}};function p(s){return s.command!==void 0}class l{constructor(s){this.id=l._idPool++,this._debugName=s}}l._idPool=0,l.CommandPalette=new l("CommandPalette"),l.EditorContext=new l("EditorContext"),l.SimpleEditorContext=new l("SimpleEditorContext"),l.EditorContextCopy=new l("EditorContextCopy"),l.EditorContextPeek=new l("EditorContextPeek"),l.MenubarEditMenu=new l("MenubarEditMenu"),l.MenubarCopy=new l("MenubarCopy"),l.MenubarGoMenu=new l("MenubarGoMenu"),l.MenubarSelectionMenu=new l("MenubarSelectionMenu"),l.InlineCompletionsActions=new l("InlineCompletionsActions");const u=Object(i.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new M.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===l.CommandPalette}}addCommand(s){return this.addCommands(X.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(F.i)(()=>{let a=!1;for(const A of s)a=this._commands.delete(A.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,A)=>s.set(A,a)),s}appendMenuItem(s,a){return this.appendMenuItems(X.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,A=new U.a;for(const{id:_,item:S}of s){let L=this._menuItems.get(_);L||(L=new U.a,this._menuItems.set(_,L)),A.push(L.push(S)),a.add(_)}return this._onDidChangeMenu.fire(a),Object(F.i)(()=>{if(A.size>0){for(let _ of A)_();this._onDidChangeMenu.fire(a),A.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===l.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const A of s)p(A)&&(a.add(A.command.id),A.alt&&a.add(A.alt.id));this._commands.forEach((A,_)=>{a.has(_)||s.push({command:A})})}};class o extends ie.e{constructor(s,a,A,_){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=A,this._options=_}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),A=a.getActions(this._options);a.dispose();for(const[,_]of A)_.length>0&&(s.push(..._),s.push(new ie.d));return s.length&&s.pop(),s}}let h=class s{constructor(a,A,_,S,L){var R,C;if(this._commandService=L,this.id=a.id,this.label=(_==null?void 0:_.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(C=typeof a.tooltip=="string"?a.tooltip:(R=a.tooltip)===null||R===void 0?void 0:R.value)!==null&&C!==void 0?C:"",this.enabled=!a.precondition||S.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const w=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=S.contextMatchesRules(w.condition),this.checked&&w.tooltip&&(this.tooltip=typeof w.tooltip=="string"?w.tooltip:w.tooltip.value),w.title&&(this.label=typeof w.title=="string"?w.title:w.title.value)}this.item=a,this.alt=A?new s(A,void 0,_,S,L):void 0,this._options=_,D.d.isThemeIcon(a.icon)&&(this.class=$.a.asClassName(a.icon))}dispose(){}run(...a){var A,_;let S=[];return((A=this._options)===null||A===void 0?void 0:A.arg)&&(S=[...S,this._options.arg]),((_=this._options)===null||_===void 0?void 0:_.shouldForwardArgs)&&(S=[...S,...a]),this._commandService.executeCommand(this.id,...S)}};h=g([m(3,W.b),m(4,G.b)],h)},gJ3r:function(st,be,Q){"use strict";Q.d(be,"a",function(){return ie});var ie=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},ic2d:function(st,be,Q){"use strict";Q.d(be,"a",function(){return X});var ie=Q("FWmy"),$=Q("746U");class M{constructor(){this.data=new Map}add(F,U){ie.a($.l(F)),ie.a($.k(U)),ie.a(!this.data.has(F),"There is already an extension with this id"),this.data.set(F,U)}as(F){return this.data.get(F)||null}}const X=new M},kSUc:function(st,be,Q){},lZu9:function(st,be,Q){(function(ie){ie(Q("VrN/"),Q("1eCo"),Q("8EBN"))})(function(ie){"use strict";ie.defineMode("markdown",function($,M){var X=ie.getMode($,"text/html"),F=X.name=="null";function U(P){if(ie.findModeByName){var b=ie.findModeByName(P);b&&(P=b.mime||b.mimes[0])}var Y=ie.getMode($,P);return Y.name=="null"?null:Y}M.highlightFormatting===void 0&&(M.highlightFormatting=!1),M.maxBlockquoteDepth===void 0&&(M.maxBlockquoteDepth=0),M.taskLists===void 0&&(M.taskLists=!1),M.strikethrough===void 0&&(M.strikethrough=!1),M.emoji===void 0&&(M.emoji=!1),M.fencedCodeBlockHighlighting===void 0&&(M.fencedCodeBlockHighlighting=!0),M.fencedCodeBlockDefaultMode===void 0&&(M.fencedCodeBlockDefaultMode="text/plain"),M.xml===void 0&&(M.xml=!0),M.tokenTypeOverrides===void 0&&(M.tokenTypeOverrides={});var G={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var W in G)G.hasOwnProperty(W)&&M.tokenTypeOverrides[W]&&(G[W]=M.tokenTypeOverrides[W]);var i=/^([*\-_])(?:\s*\1){2,}\s*$/,D=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,g=/^\[(x| )\](?=\s)/i,m=M.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,l=/^[^#!\[\]*_\\<>` "'(~:]+/,u=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,o=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,h=" ";function s(P,b,Y){return b.f=b.inline=Y,Y(P,b)}function a(P,b,Y){return b.f=b.block=Y,Y(P,b)}function A(P){return!P||!/\S/.test(P.string)}function _(P){if(P.linkTitle=!1,P.linkHref=!1,P.linkText=!1,P.em=!1,P.strong=!1,P.strikethrough=!1,P.quote=0,P.indentedCode=!1,P.f==L){var b=F;if(!b){var Y=ie.innerMode(X,P.htmlState);b=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}b&&(P.f=x,P.block=S,P.htmlState=null)}return P.trailingSpace=0,P.trailingSpaceNewLine=!1,P.prevLine=P.thisLine,P.thisLine={stream:null},null}function S(P,b){var Y=P.column()===b.indentation,ee=A(b.prevLine.stream),le=b.indentedCode,ue=b.prevLine.hr,ke=b.list!==!1,Se=(b.listStack[b.listStack.length-1]||0)+3;b.indentedCode=!1;var Ce=b.indentation;if(b.indentationDiff===null&&(b.indentationDiff=b.indentation,ke)){for(b.list=null;Ce=4&&(le||b.prevLine.fencedCodeEnd||b.prevLine.header||ee))return P.skipToEnd(),b.indentedCode=!0,G.code;if(P.eatSpace())return null;if(Y&&b.indentation<=Se&&(se=P.match(m))&&se[1].length<=6)return b.quote=0,b.header=se[1].length,b.thisLine.header=!0,M.highlightFormatting&&(b.formatting="header"),b.f=b.inline,C(b);if(b.indentation<=Se&&P.eat(">"))return b.quote=Y?1:b.quote+1,M.highlightFormatting&&(b.formatting="quote"),P.eatSpace(),C(b);if(!pe&&!b.setext&&Y&&b.indentation<=Se&&(se=P.match(D))){var ae=se[1]?"ol":"ul";return b.indentation=Ce+P.current().length,b.list=!0,b.quote=0,b.listStack.push(b.indentation),b.em=!1,b.strong=!1,b.code=!1,b.strikethrough=!1,M.taskLists&&P.match(g,!1)&&(b.taskList=!0),b.f=b.inline,M.highlightFormatting&&(b.formatting=["list","list-"+ae]),C(b)}else{if(Y&&b.indentation<=Se&&(se=P.match(u,!0)))return b.quote=0,b.fencedEndRE=new RegExp(se[1]+"+ *$"),b.localMode=M.fencedCodeBlockHighlighting&&U(se[2]||M.fencedCodeBlockDefaultMode),b.localMode&&(b.localState=ie.startState(b.localMode)),b.f=b.block=R,M.highlightFormatting&&(b.formatting="code-block"),b.code=-1,C(b);if(b.setext||(!ce||!ke)&&!b.quote&&b.list===!1&&!b.code&&!pe&&!f.test(P.string)&&(se=P.lookAhead(1))&&(se=se.match(p)))return b.setext?(b.header=b.setext,b.setext=0,P.skipToEnd(),M.highlightFormatting&&(b.formatting="header")):(b.header=se[0].charAt(0)=="="?1:2,b.setext=b.header),b.thisLine.header=!0,b.f=b.inline,C(b);if(pe)return P.skipToEnd(),b.hr=!0,b.thisLine.hr=!0,G.hr;if(P.peek()==="[")return s(P,b,N)}return s(P,b,b.inline)}function L(P,b){var Y=X.token(P,b.htmlState);if(!F){var ee=ie.innerMode(X,b.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||b.md_inside&&P.current().indexOf(">")>-1)&&(b.f=x,b.block=S,b.htmlState=null)}return Y}function R(P,b){var Y=b.listStack[b.listStack.length-1]||0,ee=b.indentation=P.quote?b.push(G.formatting+"-"+P.formatting[Y]+"-"+P.quote):b.push("error"))}if(P.taskOpen)return b.push("meta"),b.length?b.join(" "):null;if(P.taskClosed)return b.push("property"),b.length?b.join(" "):null;if(P.linkHref?b.push(G.linkHref,"url"):(P.strong&&b.push(G.strong),P.em&&b.push(G.em),P.strikethrough&&b.push(G.strikethrough),P.emoji&&b.push(G.emoji),P.linkText&&b.push(G.linkText),P.code&&b.push(G.code),P.image&&b.push(G.image),P.imageAltText&&b.push(G.imageAltText,"link"),P.imageMarker&&b.push(G.imageMarker)),P.header&&b.push(G.header,G.header+"-"+P.header),P.quote&&(b.push(G.quote),!M.maxBlockquoteDepth||M.maxBlockquoteDepth>=P.quote?b.push(G.quote+"-"+P.quote):b.push(G.quote+"-"+M.maxBlockquoteDepth)),P.list!==!1){var ee=(P.listStack.length-1)%3;ee?ee===1?b.push(G.list2):b.push(G.list3):b.push(G.list1)}return P.trailingSpaceNewLine?b.push("trailing-space-new-line"):P.trailingSpace&&b.push("trailing-space-"+(P.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function w(P,b){return P.match(l,!0)?C(b):void 0}function x(P,b){var Y=b.text(P,b);if(typeof Y!="undefined")return Y;if(b.list)return b.list=null,C(b);if(b.taskList){var ee=P.match(g,!0)[1]===" ";return ee?b.taskOpen=!0:b.taskClosed=!0,M.highlightFormatting&&(b.formatting="task"),b.taskList=!1,C(b)}if(b.taskOpen=!1,b.taskClosed=!1,b.header&&P.match(/^#+$/,!0))return M.highlightFormatting&&(b.formatting="header"),C(b);var le=P.next();if(b.linkTitle){b.linkTitle=!1;var ue=le;le==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ke="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(P.match(new RegExp(ke),!0))return G.linkHref}if(le==="`"){var Se=b.formatting;M.highlightFormatting&&(b.formatting="code"),P.eatWhile("`");var Ce=P.current().length;if(b.code==0&&(!b.quote||Ce==1))return b.code=Ce,C(b);if(Ce==b.code){var ce=C(b);return b.code=0,ce}else return b.formatting=Se,C(b)}else if(b.code)return C(b);if(le==="\\"&&(P.next(),M.highlightFormatting)){var pe=C(b),se=G.formatting+"-escape";return pe?pe+" "+se:se}if(le==="!"&&P.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return b.imageMarker=!0,b.image=!0,M.highlightFormatting&&(b.formatting="image"),C(b);if(le==="["&&b.imageMarker&&P.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return b.imageMarker=!1,b.imageAltText=!0,M.highlightFormatting&&(b.formatting="image"),C(b);if(le==="]"&&b.imageAltText){M.highlightFormatting&&(b.formatting="image");var pe=C(b);return b.imageAltText=!1,b.image=!1,b.inline=b.f=T,pe}if(le==="["&&!b.image)return b.linkText&&P.match(/^.*?\]/)||(b.linkText=!0,M.highlightFormatting&&(b.formatting="link")),C(b);if(le==="]"&&b.linkText){M.highlightFormatting&&(b.formatting="link");var pe=C(b);return b.linkText=!1,b.inline=b.f=P.match(/\(.*?\)| ?\[.*?\]/,!1)?T:x,pe}if(le==="<"&&P.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=c,M.highlightFormatting&&(b.formatting="link");var pe=C(b);return pe?pe+=" ":pe="",pe+G.linkInline}if(le==="<"&&P.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=c,M.highlightFormatting&&(b.formatting="link");var pe=C(b);return pe?pe+=" ":pe="",pe+G.linkEmail}if(M.xml&&le==="<"&&P.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=P.string.indexOf(">",P.pos);if(ae!=-1){var Oe=P.string.substring(P.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Oe)&&(b.md_inside=!0)}return P.backUp(1),b.htmlState=ie.startState(X),a(P,b,L)}if(M.xml&&le==="<"&&P.match(/^\/\w*?>/))return b.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var Te=1,Ne=P.pos==1?" ":P.string.charAt(P.pos-2);Te<3&&P.eat(le);)Te++;var De=P.peek()||" ",We=!/\s/.test(De)&&(!o.test(De)||/\s/.test(Ne)||o.test(Ne)),Le=!/\s/.test(Ne)&&(!o.test(Ne)||/\s/.test(De)||o.test(De)),Be=null,Ge=null;if(Te%2&&(!b.em&&We&&(le==="*"||!Le||o.test(Ne))?Be=!0:b.em==le&&Le&&(le==="*"||!We||o.test(De))&&(Be=!1)),Te>1&&(!b.strong&&We&&(le==="*"||!Le||o.test(Ne))?Ge=!0:b.strong==le&&Le&&(le==="*"||!We||o.test(De))&&(Ge=!1)),Ge!=null||Be!=null){M.highlightFormatting&&(b.formatting=Be==null?"strong":Ge==null?"em":"strong em"),Be===!0&&(b.em=le),Ge===!0&&(b.strong=le);var ce=C(b);return Be===!1&&(b.em=!1),Ge===!1&&(b.strong=!1),ce}}else if(le===" "&&(P.eat("*")||P.eat("_"))){if(P.peek()===" ")return C(b);P.backUp(1)}if(M.strikethrough){if(le==="~"&&P.eatWhile(le)){if(b.strikethrough){M.highlightFormatting&&(b.formatting="strikethrough");var ce=C(b);return b.strikethrough=!1,ce}else if(P.match(/^[^\s]/,!1))return b.strikethrough=!0,M.highlightFormatting&&(b.formatting="strikethrough"),C(b)}else if(le===" "&&P.match(/^~~/,!0)){if(P.peek()===" ")return C(b);P.backUp(2)}}if(M.emoji&&le===":"&&P.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){b.emoji=!0,M.highlightFormatting&&(b.formatting="emoji");var oe=C(b);return b.emoji=!1,oe}return le===" "&&(P.match(/^ +$/,!1)?b.trailingSpace++:b.trailingSpace&&(b.trailingSpaceNewLine=!0)),C(b)}function c(P,b){var Y=P.next();if(Y===">"){b.f=b.inline=x,M.highlightFormatting&&(b.formatting="link");var ee=C(b);return ee?ee+=" ":ee="",ee+G.linkInline}return P.match(/^[^>]+/,!0),G.linkInline}function T(P,b){if(P.eatSpace())return null;var Y=P.next();return Y==="("||Y==="["?(b.f=b.inline=v(Y==="("?")":"]"),M.highlightFormatting&&(b.formatting="link-string"),b.linkHref=!0,C(b)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(P){return function(b,Y){var ee=b.next();if(ee===P){Y.f=Y.inline=x,M.highlightFormatting&&(Y.formatting="link-string");var le=C(Y);return Y.linkHref=!1,le}return b.match(y[P]),Y.linkHref=!0,C(Y)}}function N(P,b){return P.match(/^([^\]\\]|\\.)*\]:/,!1)?(b.f=B,P.next(),M.highlightFormatting&&(b.formatting="link"),b.linkText=!0,C(b)):s(P,b,x)}function B(P,b){if(P.match(/^\]:/,!0)){b.f=b.inline=O,M.highlightFormatting&&(b.formatting="link");var Y=C(b);return b.linkText=!1,Y}return P.match(/^([^\]\\]|\\.)+/,!0),G.linkText}function O(P,b){return P.eatSpace()?null:(P.match(/^[^\s]+/,!0),P.peek()===void 0?b.linkTitle=!0:P.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=x,G.linkHref+" url")}var j={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:x,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(P){return{f:P.f,prevLine:P.prevLine,thisLine:P.thisLine,block:P.block,htmlState:P.htmlState&&ie.copyState(X,P.htmlState),indentation:P.indentation,localMode:P.localMode,localState:P.localMode?ie.copyState(P.localMode,P.localState):null,inline:P.inline,text:P.text,formatting:!1,linkText:P.linkText,linkTitle:P.linkTitle,linkHref:P.linkHref,code:P.code,em:P.em,strong:P.strong,strikethrough:P.strikethrough,emoji:P.emoji,header:P.header,setext:P.setext,hr:P.hr,taskList:P.taskList,list:P.list,listStack:P.listStack.slice(0),quote:P.quote,indentedCode:P.indentedCode,trailingSpace:P.trailingSpace,trailingSpaceNewLine:P.trailingSpaceNewLine,md_inside:P.md_inside,fencedEndRE:P.fencedEndRE}},token:function(P,b){if(b.formatting=!1,P!=b.thisLine.stream){if(b.header=0,b.hr=!1,P.match(/^\s*$/,!0))return _(b),null;if(b.prevLine=b.thisLine,b.thisLine={stream:P},b.taskList=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,!b.localState&&(b.f=b.block,b.f!=L)){var Y=P.match(/^\s*/,!0)[0].replace(/\t/g,h).length;if(b.indentation=Y,b.indentationDiff=null,Y>0)return null}}return b.f(P,b)},innerMode:function(P){return P.block==L?{state:P.htmlState,mode:X}:P.localState?{state:P.localState,mode:P.localMode}:{state:P,mode:j}},indent:function(P,b,Y){return P.block==L&&X.indent?X.indent(P.htmlState,b,Y):P.localState&&P.localMode.indent?P.localMode.indent(P.localState,b,Y):ie.Pass},blankLine:_,getType:C,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return j},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},nEHx:function(st,be,Q){"use strict";Q.d(be,"a",function(){return ie});var ie;(function($){$.DARK="dark",$.LIGHT="light",$.HIGH_CONTRAST="hc"})(ie||(ie={}))},nnTU:function(st,be,Q){"use strict";Q.d(be,"b",function(){return G}),Q.d(be,"a",function(){return W});var ie=Q("MI8n"),$=Q("JYp7"),M=Q("pmY6"),X=Q("24hK"),F=Q("746U"),U=Q("Cg/j");const G=Object(U.c)("commandService"),W=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ie.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,D){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!D)throw new Error("invalid command");return this.registerCommand({id:i,handler:D})}if(i.description){const u=[];for(let o of i.description.args)u.push(o.constraint);const f=i.handler;i.handler=function(o,...h){return Object(F.o)(h,u),f(o,...h)}}const{id:g}=i;let m=this._commands.get(g);m||(m=new X.a,this._commands.set(g,m));let p=m.unshift(i),l=Object(M.i)(()=>{p();const u=this._commands.get(g);(u==null?void 0:u.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),l}registerCommandAlias(i,D){return W.registerCommand(i,(g,...m)=>g.get(G).executeCommand(D,...m))}getCommand(i){const D=this._commands.get(i);return!D||D.isEmpty()?void 0:$.a.first(D)}getCommands(){const i=new Map;for(const D of this._commands.keys()){const g=this.getCommand(D);g&&i.set(D,g)}return i}};W.registerCommand("noop",()=>{})},osHv:function(st,be,Q){(function(ie){ie(Q("VrN/"))})(function(ie){"use strict";var $=ie.Pos;function M(o,h){return o.line-h.line||o.ch-h.ch}var X="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",F=X+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",U=new RegExp("<(/?)(["+X+"]["+F+"]*)","g");function G(o,h,s,a){this.line=h,this.ch=s,this.cm=o,this.text=o.getLine(h),this.min=a?Math.max(a.from,o.firstLine()):o.firstLine(),this.max=a?Math.min(a.to-1,o.lastLine()):o.lastLine()}function W(o,h){var s=o.cm.getTokenTypeAt($(o.line,h));return s&&/\btag\b/.test(s)}function i(o){return o.line>=o.max?void 0:(o.ch=0,o.text=o.cm.getLine(++o.line),!0)}function D(o){return o.line<=o.min?void 0:(o.text=o.cm.getLine(--o.line),o.ch=o.text.length,!0)}function g(o){for(;;){var h=o.text.indexOf(">",o.ch);if(h==-1){if(i(o))continue;return}if(!W(o,h+1)){o.ch=h+1;continue}var s=o.text.lastIndexOf("/",h),a=s>-1&&!/\S/.test(o.text.slice(s+1,h));return o.ch=h+1,a?"selfClose":"regular"}}function m(o){for(;;){var h=o.ch?o.text.lastIndexOf("<",o.ch-1):-1;if(h==-1){if(D(o))continue;return}if(!W(o,h+1)){o.ch=h;continue}U.lastIndex=h,o.ch=h;var s=U.exec(o.text);if(s&&s.index==h)return s}}function p(o){for(;;){U.lastIndex=o.ch;var h=U.exec(o.text);if(!h){if(i(o))continue;return}if(!W(o,h.index+1)){o.ch=h.index+1;continue}return o.ch=h.index+h[0].length,h}}function l(o){for(;;){var h=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(h==-1){if(D(o))continue;return}if(!W(o,h+1)){o.ch=h;continue}var s=o.text.lastIndexOf("/",h),a=s>-1&&!/\S/.test(o.text.slice(s+1,h));return o.ch=h+1,a?"selfClose":"regular"}}function u(o,h){for(var s=[];;){var a=p(o),A,_=o.line,S=o.ch-(a?a[0].length:0);if(!a||!(A=g(o)))return;if(A=="selfClose")continue;if(a[1]){for(var L=s.length-1;L>=0;--L)if(s[L]==a[2]){s.length=L;break}if(L<0&&(!h||h==a[2]))return{tag:a[2],from:$(_,S),to:$(o.line,o.ch)}}else s.push(a[2])}}function f(o,h){for(var s=[];;){var a=l(o);if(!a)return;if(a=="selfClose"){m(o);continue}var A=o.line,_=o.ch,S=m(o);if(!S)return;if(S[1])s.push(S[2]);else{for(var L=s.length-1;L>=0;--L)if(s[L]==S[2]){s.length=L;break}if(L<0&&(!h||h==S[2]))return{tag:S[2],from:$(o.line,o.ch),to:$(A,_)}}}}ie.registerHelper("fold","xml",function(o,h){for(var s=new G(o,h.line,0);;){var a=p(s);if(!a||s.line!=h.line)return;var A=g(s);if(!A)return;if(!a[1]&&A!="selfClose"){var _=$(s.line,s.ch),S=u(s,a[2]);return S&&M(S.from,_)>0?{from:_,to:S.from}:null}}}),ie.findMatchingTag=function(o,h,s){var a=new G(o,h.line,h.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var A=g(a),_=A&&$(a.line,a.ch),S=A&&m(a);if(!A||!S||M(a,h)>0)return;var L={from:$(a.line,a.ch),to:_,tag:S[2]};return A=="selfClose"?{open:L,close:null,at:"open"}:S[1]?{open:f(a,S[2]),close:L,at:"close"}:(a=new G(o,_.line,_.ch,s),{open:L,close:u(a,S[2]),at:"open"})},ie.findEnclosingTag=function(o,h,s,a){for(var A=new G(o,h.line,h.ch,s);;){var _=f(A,a);if(!_)break;var S=new G(o,h.line,h.ch,s),L=u(S,_.tag);if(L)return{open:_,close:L}}},ie.scanForClosingTag=function(o,h,s,a){var A=new G(o,h.line,h.ch,a?{from:0,to:a}:null);return u(A,s)}})},p5ED:function(st,be,Q){"use strict";var ie=Q("+L6B"),$=Q("2/Rp"),M=Q("5Dmo"),X=Q("3S7+"),F=Q("k1fw"),U=Q("9og8"),G=Q("tJVT"),W=Q("WmNS"),i=Q.n(W),D=Q("q1tI"),g=Q.n(D),m=Q("vHTk"),p=Q.n(m),l=Q("yEEn"),u=Q("ZW9T"),f=Q("1vsH"),o=Q("V0Rq"),h=Q("m3rI");be.a=function(s){var a,A,_,S,L,R,C,w=s.editOffice,x=w===void 0?"view":w,c=s.data,T=s.theme,y=s.type,v=s.filename,N=s.monacoEditor,B=s.className,O=s.style,j=s.close,P=s.onClose,b=s.hasMask,Y=s.disabledDownload,ee=Object(D.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),le=Object(G.a)(ee,2),ue=le[0],ke=le[1],Se=Object(D.useState)(""),Ce=Object(G.a)(Se,2),ce=Ce[0],pe=Ce[1],se=Object(D.useState)(),ae=Object(G.a)(se,2),Oe=ae[0],Te=ae[1],Ne=window.ENV==="build"?"/react/build":"",De=h.a.PROXY_SERVER||location.origin,We,Le=1024*1024,Be=10*Le,Ge=Object(D.useRef)();(a=c)!==null&&a!==void 0&&a.startsWith("/api")&&y!=="txt"&&(c=h.a.API_SERVER+c),y==="office"&&(We=Object(f.T)(c).filesize,We>Be&&(y="other")),v&&N&&(N.filename=v),Object(D.useEffect)(function(){var Ae,Ue,Ve=(Ae=document.cookie)===null||Ae===void 0||((Ue=Ae.replace(/\s/g,""))===null||Ue===void 0)?void 0:Ue.split(";");Ve==null||Ve.map(function(Ze){var $e=Ze.split("=");$e[0]==="_educoder_session"&&pe($e[1])})},[]),Object(D.useEffect)(function(){y==="office"&&oe()},[y,c]);var oe=function(){var Ae=Object(U.a)(i.a.mark(function Ue(){var Ve,Ze,$e;return i.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return console.log("data:",c),Ve=c,c.startsWith("http")||(Ve=location.origin+Ve),Ze=new URL(Ve).pathname.split("/").pop(),et.next=6,Object(o.V)({attachment_id:Ze});case 6:$e=et.sent,Te($e);case 8:case"end":return et.stop()}},Ue)}));return function(){return Ae.apply(this,arguments)}}(),ye=function(){if(c.startsWith("http")||c.startsWith("blob:")){we();return}Object(f.z)(v||"educoder",c,v)},we=function(){Object(f.x)(v||"educoder",decodeURIComponent(c))};return g.a.createElement("div",{style:Object(F.a)({},O||{}),className:"".concat(b&&p.a.bgBlack," ").concat(y?p.a.wrp:"hide")},j&&g.a.createElement("div",{className:p.a.close,ref:Ge},!Y&&g.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ge.current}},g.a.createElement("span",{onClick:we},g.a.createElement("i",{className:"icon-quxiaozhiding"}))),g.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ge.current}},g.a.createElement("span",{className:"",onClick:P},g.a.createElement("i",{className:"icon-guanbi1"})))),g.a.createElement("div",{className:"".concat(p.a[B]," ").concat(B," ").concat(p.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&g.a.createElement(u.b,N)),y==="audio"&&g.a.createElement("audio",{src:"".concat(((A=c)===null||A===void 0?void 0:A.indexOf("http://"))>-1||((_=c)===null||_===void 0?void 0:_.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),y==="video"&&g.a.createElement(g.a.Fragment,null,((S=c)===null||S===void 0?void 0:S.indexOf("http"))>-1?g.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):g.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),y==="office"&&Oe&&g.a.createElement("iframe",{src:"".concat(Ne,"/office.html?key=").concat(Oe.key,"&url=").concat(De+Oe.url,"&callbackUrl=").concat(De+Oe.callbackUrl,"&fileType=").concat(Oe.fileType,"&title=").concat(Oe.title,"&model=").concat(x,"&officeServer=").concat(h.a.OFFICE_SERVER,"&disabledDownload=").concat(!!Y)}),y==="html"&&g.a.createElement("iframe",{src:c+"&disposition=inline"}),y==="pdf"&&g.a.createElement("iframe",{src:"".concat(Ne,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!Y)}),y==="image"&&g.a.createElement("img",{src:"".concat(((L=c)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((R=c)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(C=c)!==null&&C!==void 0&&C.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),y==="other"&&g.a.createElement("div",null,g.a.createElement($.a,{type:"primary",size:"large",onClick:ye},g.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&g.a.createElement($.a,{type:"primary",size:"large",onClick:ye},g.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(st,be,Q){},pmY6:function(st,be,Q){"use strict";Q.d(be,"h",function(){return D}),Q.d(be,"g",function(){return m}),Q.d(be,"f",function(){return p}),Q.d(be,"e",function(){return l}),Q.d(be,"i",function(){return u}),Q.d(be,"b",function(){return f}),Q.d(be,"a",function(){return o}),Q.d(be,"d",function(){return h}),Q.d(be,"c",function(){return s});var ie=Q("C/vA"),$=Q("JYp7");const M=!1;let X=null;function F(a){X=a}if(M){const a="__is_disposable_tracked__";F(new class{trackDisposable(A){const _=new Error("Potentially leaked disposable").stack;setTimeout(()=>{A[a]||console.log(_)},3e3)}setParent(A,_){if(A&&A!==o.None)try{A[a]=!0}catch(S){}}markAsDisposed(A){if(A&&A!==o.None)try{A[a]=!0}catch(_){}}markAsSingleton(A){}})}function U(a){return X==null||X.trackDisposable(a),a}function G(a){X==null||X.markAsDisposed(a)}function W(a,A){X==null||X.setParent(a,A)}function i(a,A){if(!X)return;for(const _ of a)X.setParent(_,A)}function D(a){return X==null||X.markAsSingleton(a),a}class g extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function p(a){if($.a.is(a)){let A=[];for(const _ of a)if(_)try{_.dispose()}catch(S){A.push(S)}if(A.length===1)throw A[0];if(A.length>1)throw new g(A);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function l(...a){const A=u(()=>p(a));return i(a,A),A}function u(a){const A=U({dispose:Object(ie.a)(()=>{G(A),a()})});return A}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,U(this)}dispose(){if(this._isDisposed)return;G(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return W(a,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}f.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new f,U(this),W(this._store,this)}dispose(){G(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}o.None=Object.freeze({dispose(){}});class h{constructor(){this._isDisposed=!1,U(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var A;if(this._isDisposed||a===this._value)return;(A=this._value)===null||A===void 0||A.dispose(),a&&W(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,G(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&W(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(st,be,Q){var ie,$;(function(){var M;(function(){"use strict";var G=[,,function(g){function m(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var u=new m(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},m.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},m.prototype.has_match=function(u){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(u))return!0;return!1},m.prototype.set_indent=function(u,f){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(u){this.__items.push(u);var f=u.lastIndexOf(` +`)}]},h=Q("5VLF"),s=Q.n(h),a={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},A=function(Y,ee){return ee.map(function(le){return{label:le,kind:Y.languages.CompletionItemKind.Keyword,insertText:le}})},_=function(Y){return Object.keys(a.tables).map(function(ee){return{label:ee,kind:Y.languages.CompletionItemKind.Variable,insertText:ee}})},S=function(Y,ee){var le=a.tables[Y];return le?le.map(function(ue){return{label:ue,kind:ee.languages.CompletionItemKind.Field,insertText:ue}}):[]};function L(b,Y,ee,le,ue){var ke=Y.getWordUntilPosition(ee),Se={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Ce=le.map(function(ce){return{label:ce,kind:b.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ue.map(function(ce){Ce.push(Object(ie.a)(Object(ie.a)({},ce),{},{range:Se}))}),Ce}var R=function(b){a.languages.map(function(ue){return b.languages.registerDocumentFormattingEditProvider(ue,{provideDocumentFormattingEdits:function(Se,Ce,ce){return Object(g.a)(p.a.mark(function pe(){var se;return p.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return se=s()(Se.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Oe.abrupt("return",[{range:Se.getFullModelRange(),text:se}]);case 2:case"end":return Oe.stop()}},pe)}))()}}),ue});var Y=f.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=o.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),le=u.quickKey.map(function(ue){return{label:ue.label,kind:b.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}});b.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(f.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(f.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}}),b.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn};return{suggestions:Object($.a)(l.keywords.map(function(pe){return{label:pe,kind:b.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}}))}}}),b.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(u.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(u.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}}),b.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ke,Se){var Ce=ke.getWordUntilPosition(Se),ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},pe=ke.getLineContent(Se.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object($.a)(o.keywords.map(function(se){return{label:se,kind:b.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})),Object($.a)(o.quickKey.map(function(se){return{label:se.label,kind:b.languages.CompletionItemKind.Function,documentation:se.content,insertText:pe.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}})))}}})},C="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",w=Q("fjLI"),x=Q("LvDl"),c=Q("+ua5");function T(b){return/^\d+$/.test(b)?"".concat(b,"px"):b}function y(){}var v=!1,N={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function B(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=b;if(Array.isArray(b)){for(var ee=0;ee0||di.target.offsetWidth>0)&&je.current.instance.layout()}}catch(Pt){Ft.e(Pt)}finally{Ft.f()}}),bt.observe(Fe.current)),bt}function ze(){X.b.warn(decodeURIComponent(C))}var ot=function(){var xt=je.current.instance;if(ke!=null&&xt&&fe){var Ft=xt.getModel();Ft&&ke!==Ft.getValue()&&(v=!0,Ft.setValue(ke),xt.layout(),v=!1)}};Object(W.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){ot()},500)},[ke,fe,je.current]),Object(W.useEffect)(function(){if(Je&&je.current&&je.current.instance){var bt=je.current.instance;bt.changeViewZones(function(Ft){var ti=document.createElement("div");ti.style.padding="10px 20px",ti.style.width="calc(100% - 20px)",ti.className="my-error-line-wrp",ti.innerHTML=ut,Ft.addZone({afterLineNumber:Je||11,heightInLines:3,domNode:ti})});var xt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};bt.addOverlayWidget(xt),bt.revealPositionInCenter({lineNumber:20,column:1})}},[Je,je.current,fe]);function mt(){var bt=je.current.instance;if(bt){var xt=bt.getSelection(),Ft=je.current.pastePos||{},ti=new O.Range(Ft.startLineNumber||xt.endLineNumber,Ft.startColumn||xt.endColumn,Ft.endLineNumber||xt.endLineNumber,Ft.endColumn||xt.endColumn);setTimeout(function(){bt.executeEdits("",[{range:ti,text:""}])},300)}}function ft(bt){(window.navigator.platform.match("Mac")?bt.metaKey:bt.ctrlKey)&&bt.keyCode==83&&(bt.preventDefault(),Le())}var wt=function(){if(Ge&&je.current.instance){var xt=je.current.instance.getContentHeight();yt(xt0||Ue.target.offsetWidth>0)&&Ge.layout()}}catch(Ve){we.e(Ve)}finally{we.f()}}),oe.observe(se.current)),oe}Object(W.useEffect)(function(){se.current&&Promise.all([Q.e(16),Q.e(28)]).then(Q.t.bind(null,"M/lh",7)).then(function(Ge){O=Ge;var oe=O.editor.createDiffEditor(se.current,Object(ie.a)(Object(ie.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},pe),{},{wordWrap:!0}));Ne(oe);var ye=De(oe);return function(){oe.dispose();var we=oe.getModel();we&&we.dispose(),ye.unobserve(se.current)}})},[]),Object(W.useEffect)(function(){Te&&Te.setModel({original:O.editor.createModel(ke,Ce),modified:O.editor.createModel(Se,Ce)})},[ke,Se,Ce,Te]);var We=T(ee),Le=T(ue),Be={width:We,height:Le};return i.a.createElement("div",{className:"my-diff-editor",ref:se,style:Be})}},ZpRC:function(st,be,Q){"use strict";function ie(g){return typeof g=="object"&&g!=null&&g.nodeType===1}function $(g,m){return(!m||g!=="hidden")&&g!=="visible"&&g!=="clip"}function M(g,m){if(g.clientHeightm||f>g&&o=m&&h>=p?f-g-l:o>m&&hp?o-m+u:0}var F=function(g,m){var p=window,l=m.scrollMode,u=m.block,f=m.inline,o=m.boundary,h=m.skipOverflowHiddenElements,s=typeof o=="function"?o:function(Ge){return Ge!==o};if(!ie(g))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,A=[],_=g;ie(_)&&s(_);){if((_=_.parentElement)===a){A.push(_);break}_!=null&&_===document.body&&M(_)&&!M(document.documentElement)||_!=null&&M(_,h)&&A.push(_)}for(var S=p.visualViewport?p.visualViewport.width:innerWidth,L=p.visualViewport?p.visualViewport.height:innerHeight,R=window.scrollX||pageXOffset,C=window.scrollY||pageYOffset,w=g.getBoundingClientRect(),x=w.height,c=w.width,T=w.top,y=w.right,v=w.bottom,N=w.left,B=u==="start"||u==="nearest"?T:u==="end"?v:T+x/2,O=f==="center"?N+c/2:f==="end"?y:N,j=[],P=0;P=0&&N>=0&&v<=L&&y<=S&&T>=ue&&v<=Se&&N>=Ce&&y<=ke)return j;var ce=getComputedStyle(b),pe=parseInt(ce.borderLeftWidth,10),se=parseInt(ce.borderTopWidth,10),ae=parseInt(ce.borderRightWidth,10),Oe=parseInt(ce.borderBottomWidth,10),Te=0,Ne=0,De="offsetWidth"in b?b.offsetWidth-b.clientWidth-pe-ae:0,We="offsetHeight"in b?b.offsetHeight-b.clientHeight-se-Oe:0;if(a===b)Te=u==="start"?B:u==="end"?B-L:u==="nearest"?X(C,C+L,L,se,Oe,C+B,C+B+x,x):B-L/2,Ne=f==="start"?O:f==="center"?O-S/2:f==="end"?O-S:X(R,R+S,S,pe,ae,R+O,R+O+c,c),Te=Math.max(0,Te+C),Ne=Math.max(0,Ne+R);else{Te=u==="start"?B-ue-se:u==="end"?B-Se+Oe+We:u==="nearest"?X(ue,Se,ee,se,Oe+We,B,B+x,x):B-(ue+ee/2)+We/2,Ne=f==="start"?O-Ce-pe:f==="center"?O-(Ce+le/2)+De/2:f==="end"?O-ke+ae+De:X(Ce,ke,le,pe,ae+De,O,O+c,c);var Le=b.scrollLeft,Be=b.scrollTop;B+=Be-(Te=Math.max(0,Math.min(Be+Te,b.scrollHeight-ee+We))),O+=Le-(Ne=Math.max(0,Math.min(Le+Ne,b.scrollWidth-le+De)))}j.push({el:b,top:Te,left:Ne})}return j};function U(g){return g===Object(g)&&Object.keys(g).length!==0}function G(g,m){m===void 0&&(m="auto");var p="scrollBehavior"in document.body.style;g.forEach(function(l){var u=l.el,f=l.top,o=l.left;u.scroll&&p?u.scroll({top:f,left:o,behavior:m}):(u.scrollTop=f,u.scrollLeft=o)})}function W(g){return g===!1?{block:"end",inline:"nearest"}:U(g)?g:{block:"start",inline:"nearest"}}function i(g,m){var p=!g.ownerDocument.documentElement.contains(g);if(U(m)&&typeof m.behavior=="function")return m.behavior(p?[]:F(g,m));if(p)return;var l=W(m);return G(F(g,l),l.behavior)}var D=be.a=i},bT9E:function(st,be,Q){"use strict";Q.d(be,"a",function(){return $});var ie=Q("VTBJ");function $(M,X){var F=Object(ie.a)({},M);return Array.isArray(X)&&X.forEach(function(U){delete F[U]}),F}},c5Ni:function(st,be,Q){},dejd:function(st,be,Q){},dmUQ:function(st,be,Q){"use strict";var ie=Q("Ff2n"),$=Q("rePB"),M=Q("1OyB"),X=Q("vuIU"),F=Q("Ji7U"),U=Q("md7G"),G=Q("foSv"),W=Q("q1tI"),i=Q.n(W),D=Q("TSYQ"),g=Q.n(D),m=Q("4IlW");function p(x,c){var T=Object.keys(x);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(x);c&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),T.push.apply(T,y)}return T}function l(x){for(var c=1;c1?le-1:0),ke=1;ke1?P-1:0),Y=1;Y=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var P=0;return j.indexOf(".")>=0&&(P=j.length-j.indexOf(".")-1),P},v.getInputDisplayValue=function(O){var j=O||v.state,P=j.focused,b=j.inputValue,Y=j.value,ee;P?ee=b:ee=v.toPrecisionAsStep(Y),ee==null&&(ee="");var le=v.formatWrapper(ee);return S(v.props.decimalSeparator)&&(le=le.toString().replace(".",v.props.decimalSeparator)),le},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(O){}},v.restoreByAfter=function(O){if(O===void 0)return!1;var j=v.input.value,P=j.lastIndexOf(O);if(P===-1)return!1;var b=v.cursorBefore.length;return v.lastKeyCode===m.a.DELETE&&v.cursorBefore.charAt(b-1)===O[0]?(v.fixCaret(b,b),!0):P+O.length===j.length?(v.fixCaret(P,P),!0):!1},v.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(j,P){var b=O.substring(P);return v.restoreByAfter(b)})},v.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(O,j,P){v.pressingUpOrDown=!0,v.step("down",O,j,P)},v.up=function(O,j,P){v.pressingUpOrDown=!0,v.step("up",O,j,P)},v.saveInput=function(O){v.input=O};var N=y.value;N===void 0&&(N=y.defaultValue),v.state={focused:y.autoFocus};var B=v.getValidValue(v.toNumber(N));return v.state=l(l({},v.state),{},{inputValue:v.toPrecisionAsStep(B),value:B}),v}return Object(X.a)(T,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var N=this.props,B=N.value,O=N.onChange,j=N.max,P=N.min,b=this.state.focused;if(v){if(!L(v.value,B)||!L(v.max,j)||!L(v.min,P)){var Y=b?B:this.getValidValue(B),ee;this.pressingUpOrDown?ee=Y:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:ee})}var le="value"in this.props?B:this.state.value;"max"in this.props&&v.max!==j&&typeof le=="number"&&le>j&&O&&O(j),"min"in this.props&&v.min!==P&&typeof le=="number"&&le1&&arguments[1]!==void 0?arguments[1]:this.props.min,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(v);return isNaN(O)?v:(OB&&(O=B),O)}},{key:"setValue",value:function(v,N){var B=this.props.precision,O=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),j=this.state.value,P=j===void 0?null:j,b=this.state.inputValue,Y=b===void 0?null:b,ee=typeof O=="number"?O.toFixed(B):"".concat(O),le=O!==P||ee!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},N)):this.setState({value:O,inputValue:this.toPrecisionAsStep(v)},N),le&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.props,O=B.precision,j=B.step;if(S(O))return O;var P=this.getPrecision(N),b=this.getPrecision(j),Y=this.getPrecision(v);return v?Math.max(Y,P+b):P+b}},{key:"getPrecisionFactor",value:function(v){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.getMaxPrecision(v,N);return Math.pow(10,B)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var N=Math.abs(this.getMaxPrecision(v));return isNaN(N)?v.toString():Number(v).toFixed(N)}},{key:"toNumber",value:function(v){var N=this.props.precision,B=this.state.focused,O=v&&v.length>16&&B;return this.isNotCompleteNumber(v)||O?v:S(N)?Math.round(v*Math.pow(10,N))/Math.pow(10,N):Number(v)}},{key:"upStep",value:function(v,N){var B=this.props.step,O=this.getPrecisionFactor(v,N),j=Math.abs(this.getMaxPrecision(v,N)),P=((O*v+O*B*N)/O).toFixed(j);return this.toNumber(P)}},{key:"downStep",value:function(v,N){var B=this.props.step,O=this.getPrecisionFactor(v,N),j=Math.abs(this.getMaxPrecision(v,N)),P=((O*v-O*B*N)/O).toFixed(j);return this.toNumber(P)}},{key:"step",value:function(v,N){var B=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),N&&(N.persist(),N.preventDefault());var P=this.props;if(P.disabled)return;var b=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(b))return;var Y=this["".concat(v,"Step")](b,O),ee=Y>P.max||YP.max?Y=P.max:Y=ue),je=(tt||tt===0)&&(isNaN(tt)||Number(tt)<=ke),Ee=Fe||O||j,ge=je||O||j,_e=g()("".concat(B,"-handler"),"".concat(B,"-handler-up"),Object($.a)({},"".concat(B,"-handler-up-disabled"),Ee)),re=g()("".concat(B,"-handler"),"".concat(B,"-handler-down"),Object($.a)({},"".concat(B,"-handler-down-disabled"),ge)),ne=P?{onTouchStart:Ee?o:this.up,onTouchEnd:this.stop}:{onMouseDown:Ee?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=P?{onTouchStart:ge?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ge?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return i.a.createElement("div",{className:Je,style:Se,title:Ce,onMouseEnter:ce,onMouseLeave:pe,onMouseOver:se,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},i.a.createElement("div",{className:"".concat(B,"-handler-wrap")},i.a.createElement("span",Object.assign({unselectable:"on"},ne,{role:"button","aria-label":"Increase Value","aria-disabled":Ee,className:_e}),Y||i.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-up-inner"),onClick:h})),i.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Decrease Value","aria-disabled":ge,className:re}),ee||i.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-down-inner"),onClick:h}))),i.a.createElement("div",{className:"".concat(B,"-input-wrap")},i.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ke,"aria-valuemax":ue,"aria-valuenow":tt,required:Oe,type:De,placeholder:We,onPaste:Ue,onClick:Te,onMouseUp:this.onMouseUp,className:"".concat(B,"-input"),tabIndex:Ne,autoComplete:b,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ut?this.onKeyDown:o,onKeyUp:ut?this.onKeyUp:o,autoFocus:we,maxLength:ye,readOnly:j,disabled:O,max:ue,min:ke,step:oe,name:Ae,title:Ce,id:Le,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(rt),pattern:Ge,inputMode:Be,onInput:Ve},Me))))}}]),T}(i.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:s,required:!1,autoComplete:"off"};var C=R,w=be.a=C},eYnf:function(st,be,Q){st.exports={flex_box_center:"flex_box_center___1XyGp",flex_space_between:"flex_space_between___3jaTm",flex_box_vertical_center:"flex_box_vertical_center___2_EoO",flex_box_center_end:"flex_box_center_end___aCF48",flex_box_column:"flex_box_column___10vW2",bg:"bg___1Uj9H",title:"title___2xwyX",titleLeft:"titleLeft___1ASl5",titleRight:"titleRight___1FHl9",btns:"btns___3kkgI"}},fjLI:function(st,be,Q){"use strict";Q.d(be,"f",function(){return p}),Q.d(be,"b",function(){return l}),Q.d(be,"a",function(){return u}),Q.d(be,"d",function(){return f}),Q.d(be,"e",function(){return o}),Q.d(be,"c",function(){return h});var ie=Q("8HAY"),$=Q("Vhoy"),M=Q("MI8n"),X=Q("JYp7"),F=Q("pmY6"),U=Q("24hK"),G=Q("nnTU"),W=Q("T8No"),i=Q("Cg/j"),D=Q("t9D7"),g=function(s,a,A,_){var S=arguments.length,L=S<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,A):_,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(s,a,A,_);else for(var C=s.length-1;C>=0;C--)(R=s[C])&&(L=(S<3?R(L):S>3?R(a,A,L):R(a,A))||L);return S>3&&L&&Object.defineProperty(a,A,L),L},m=function(s,a){return function(A,_){a(A,_,s)}};function p(s){return s.command!==void 0}class l{constructor(s){this.id=l._idPool++,this._debugName=s}}l._idPool=0,l.CommandPalette=new l("CommandPalette"),l.EditorContext=new l("EditorContext"),l.SimpleEditorContext=new l("SimpleEditorContext"),l.EditorContextCopy=new l("EditorContextCopy"),l.EditorContextPeek=new l("EditorContextPeek"),l.MenubarEditMenu=new l("MenubarEditMenu"),l.MenubarCopy=new l("MenubarCopy"),l.MenubarGoMenu=new l("MenubarGoMenu"),l.MenubarSelectionMenu=new l("MenubarSelectionMenu"),l.InlineCompletionsActions=new l("InlineCompletionsActions");const u=Object(i.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new M.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===l.CommandPalette}}addCommand(s){return this.addCommands(X.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(F.i)(()=>{let a=!1;for(const A of s)a=this._commands.delete(A.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,A)=>s.set(A,a)),s}appendMenuItem(s,a){return this.appendMenuItems(X.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,A=new U.a;for(const{id:_,item:S}of s){let L=this._menuItems.get(_);L||(L=new U.a,this._menuItems.set(_,L)),A.push(L.push(S)),a.add(_)}return this._onDidChangeMenu.fire(a),Object(F.i)(()=>{if(A.size>0){for(let _ of A)_();this._onDidChangeMenu.fire(a),A.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===l.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const A of s)p(A)&&(a.add(A.command.id),A.alt&&a.add(A.alt.id));this._commands.forEach((A,_)=>{a.has(_)||s.push({command:A})})}};class o extends ie.e{constructor(s,a,A,_){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=A,this._options=_}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),A=a.getActions(this._options);a.dispose();for(const[,_]of A)_.length>0&&(s.push(..._),s.push(new ie.d));return s.length&&s.pop(),s}}let h=class s{constructor(a,A,_,S,L){var R,C;if(this._commandService=L,this.id=a.id,this.label=(_==null?void 0:_.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(C=typeof a.tooltip=="string"?a.tooltip:(R=a.tooltip)===null||R===void 0?void 0:R.value)!==null&&C!==void 0?C:"",this.enabled=!a.precondition||S.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const w=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=S.contextMatchesRules(w.condition),this.checked&&w.tooltip&&(this.tooltip=typeof w.tooltip=="string"?w.tooltip:w.tooltip.value),w.title&&(this.label=typeof w.title=="string"?w.title:w.title.value)}this.item=a,this.alt=A?new s(A,void 0,_,S,L):void 0,this._options=_,D.d.isThemeIcon(a.icon)&&(this.class=$.a.asClassName(a.icon))}dispose(){}run(...a){var A,_;let S=[];return((A=this._options)===null||A===void 0?void 0:A.arg)&&(S=[...S,this._options.arg]),((_=this._options)===null||_===void 0?void 0:_.shouldForwardArgs)&&(S=[...S,...a]),this._commandService.executeCommand(this.id,...S)}};h=g([m(3,W.b),m(4,G.b)],h)},gJ3r:function(st,be,Q){"use strict";Q.d(be,"a",function(){return ie});var ie=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},ic2d:function(st,be,Q){"use strict";Q.d(be,"a",function(){return X});var ie=Q("FWmy"),$=Q("746U");class M{constructor(){this.data=new Map}add(F,U){ie.a($.l(F)),ie.a($.k(U)),ie.a(!this.data.has(F),"There is already an extension with this id"),this.data.set(F,U)}as(F){return this.data.get(F)||null}}const X=new M},kSUc:function(st,be,Q){},lZu9:function(st,be,Q){(function(ie){ie(Q("VrN/"),Q("1eCo"),Q("8EBN"))})(function(ie){"use strict";ie.defineMode("markdown",function($,M){var X=ie.getMode($,"text/html"),F=X.name=="null";function U(P){if(ie.findModeByName){var b=ie.findModeByName(P);b&&(P=b.mime||b.mimes[0])}var Y=ie.getMode($,P);return Y.name=="null"?null:Y}M.highlightFormatting===void 0&&(M.highlightFormatting=!1),M.maxBlockquoteDepth===void 0&&(M.maxBlockquoteDepth=0),M.taskLists===void 0&&(M.taskLists=!1),M.strikethrough===void 0&&(M.strikethrough=!1),M.emoji===void 0&&(M.emoji=!1),M.fencedCodeBlockHighlighting===void 0&&(M.fencedCodeBlockHighlighting=!0),M.fencedCodeBlockDefaultMode===void 0&&(M.fencedCodeBlockDefaultMode="text/plain"),M.xml===void 0&&(M.xml=!0),M.tokenTypeOverrides===void 0&&(M.tokenTypeOverrides={});var G={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var W in G)G.hasOwnProperty(W)&&M.tokenTypeOverrides[W]&&(G[W]=M.tokenTypeOverrides[W]);var i=/^([*\-_])(?:\s*\1){2,}\s*$/,D=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,g=/^\[(x| )\](?=\s)/i,m=M.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,l=/^[^#!\[\]*_\\<>` "'(~:]+/,u=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,o=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,h=" ";function s(P,b,Y){return b.f=b.inline=Y,Y(P,b)}function a(P,b,Y){return b.f=b.block=Y,Y(P,b)}function A(P){return!P||!/\S/.test(P.string)}function _(P){if(P.linkTitle=!1,P.linkHref=!1,P.linkText=!1,P.em=!1,P.strong=!1,P.strikethrough=!1,P.quote=0,P.indentedCode=!1,P.f==L){var b=F;if(!b){var Y=ie.innerMode(X,P.htmlState);b=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}b&&(P.f=x,P.block=S,P.htmlState=null)}return P.trailingSpace=0,P.trailingSpaceNewLine=!1,P.prevLine=P.thisLine,P.thisLine={stream:null},null}function S(P,b){var Y=P.column()===b.indentation,ee=A(b.prevLine.stream),le=b.indentedCode,ue=b.prevLine.hr,ke=b.list!==!1,Se=(b.listStack[b.listStack.length-1]||0)+3;b.indentedCode=!1;var Ce=b.indentation;if(b.indentationDiff===null&&(b.indentationDiff=b.indentation,ke)){for(b.list=null;Ce=4&&(le||b.prevLine.fencedCodeEnd||b.prevLine.header||ee))return P.skipToEnd(),b.indentedCode=!0,G.code;if(P.eatSpace())return null;if(Y&&b.indentation<=Se&&(se=P.match(m))&&se[1].length<=6)return b.quote=0,b.header=se[1].length,b.thisLine.header=!0,M.highlightFormatting&&(b.formatting="header"),b.f=b.inline,C(b);if(b.indentation<=Se&&P.eat(">"))return b.quote=Y?1:b.quote+1,M.highlightFormatting&&(b.formatting="quote"),P.eatSpace(),C(b);if(!pe&&!b.setext&&Y&&b.indentation<=Se&&(se=P.match(D))){var ae=se[1]?"ol":"ul";return b.indentation=Ce+P.current().length,b.list=!0,b.quote=0,b.listStack.push(b.indentation),b.em=!1,b.strong=!1,b.code=!1,b.strikethrough=!1,M.taskLists&&P.match(g,!1)&&(b.taskList=!0),b.f=b.inline,M.highlightFormatting&&(b.formatting=["list","list-"+ae]),C(b)}else{if(Y&&b.indentation<=Se&&(se=P.match(u,!0)))return b.quote=0,b.fencedEndRE=new RegExp(se[1]+"+ *$"),b.localMode=M.fencedCodeBlockHighlighting&&U(se[2]||M.fencedCodeBlockDefaultMode),b.localMode&&(b.localState=ie.startState(b.localMode)),b.f=b.block=R,M.highlightFormatting&&(b.formatting="code-block"),b.code=-1,C(b);if(b.setext||(!ce||!ke)&&!b.quote&&b.list===!1&&!b.code&&!pe&&!f.test(P.string)&&(se=P.lookAhead(1))&&(se=se.match(p)))return b.setext?(b.header=b.setext,b.setext=0,P.skipToEnd(),M.highlightFormatting&&(b.formatting="header")):(b.header=se[0].charAt(0)=="="?1:2,b.setext=b.header),b.thisLine.header=!0,b.f=b.inline,C(b);if(pe)return P.skipToEnd(),b.hr=!0,b.thisLine.hr=!0,G.hr;if(P.peek()==="[")return s(P,b,N)}return s(P,b,b.inline)}function L(P,b){var Y=X.token(P,b.htmlState);if(!F){var ee=ie.innerMode(X,b.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||b.md_inside&&P.current().indexOf(">")>-1)&&(b.f=x,b.block=S,b.htmlState=null)}return Y}function R(P,b){var Y=b.listStack[b.listStack.length-1]||0,ee=b.indentation=P.quote?b.push(G.formatting+"-"+P.formatting[Y]+"-"+P.quote):b.push("error"))}if(P.taskOpen)return b.push("meta"),b.length?b.join(" "):null;if(P.taskClosed)return b.push("property"),b.length?b.join(" "):null;if(P.linkHref?b.push(G.linkHref,"url"):(P.strong&&b.push(G.strong),P.em&&b.push(G.em),P.strikethrough&&b.push(G.strikethrough),P.emoji&&b.push(G.emoji),P.linkText&&b.push(G.linkText),P.code&&b.push(G.code),P.image&&b.push(G.image),P.imageAltText&&b.push(G.imageAltText,"link"),P.imageMarker&&b.push(G.imageMarker)),P.header&&b.push(G.header,G.header+"-"+P.header),P.quote&&(b.push(G.quote),!M.maxBlockquoteDepth||M.maxBlockquoteDepth>=P.quote?b.push(G.quote+"-"+P.quote):b.push(G.quote+"-"+M.maxBlockquoteDepth)),P.list!==!1){var ee=(P.listStack.length-1)%3;ee?ee===1?b.push(G.list2):b.push(G.list3):b.push(G.list1)}return P.trailingSpaceNewLine?b.push("trailing-space-new-line"):P.trailingSpace&&b.push("trailing-space-"+(P.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function w(P,b){return P.match(l,!0)?C(b):void 0}function x(P,b){var Y=b.text(P,b);if(typeof Y!="undefined")return Y;if(b.list)return b.list=null,C(b);if(b.taskList){var ee=P.match(g,!0)[1]===" ";return ee?b.taskOpen=!0:b.taskClosed=!0,M.highlightFormatting&&(b.formatting="task"),b.taskList=!1,C(b)}if(b.taskOpen=!1,b.taskClosed=!1,b.header&&P.match(/^#+$/,!0))return M.highlightFormatting&&(b.formatting="header"),C(b);var le=P.next();if(b.linkTitle){b.linkTitle=!1;var ue=le;le==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ke="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(P.match(new RegExp(ke),!0))return G.linkHref}if(le==="`"){var Se=b.formatting;M.highlightFormatting&&(b.formatting="code"),P.eatWhile("`");var Ce=P.current().length;if(b.code==0&&(!b.quote||Ce==1))return b.code=Ce,C(b);if(Ce==b.code){var ce=C(b);return b.code=0,ce}else return b.formatting=Se,C(b)}else if(b.code)return C(b);if(le==="\\"&&(P.next(),M.highlightFormatting)){var pe=C(b),se=G.formatting+"-escape";return pe?pe+" "+se:se}if(le==="!"&&P.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return b.imageMarker=!0,b.image=!0,M.highlightFormatting&&(b.formatting="image"),C(b);if(le==="["&&b.imageMarker&&P.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return b.imageMarker=!1,b.imageAltText=!0,M.highlightFormatting&&(b.formatting="image"),C(b);if(le==="]"&&b.imageAltText){M.highlightFormatting&&(b.formatting="image");var pe=C(b);return b.imageAltText=!1,b.image=!1,b.inline=b.f=T,pe}if(le==="["&&!b.image)return b.linkText&&P.match(/^.*?\]/)||(b.linkText=!0,M.highlightFormatting&&(b.formatting="link")),C(b);if(le==="]"&&b.linkText){M.highlightFormatting&&(b.formatting="link");var pe=C(b);return b.linkText=!1,b.inline=b.f=P.match(/\(.*?\)| ?\[.*?\]/,!1)?T:x,pe}if(le==="<"&&P.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=c,M.highlightFormatting&&(b.formatting="link");var pe=C(b);return pe?pe+=" ":pe="",pe+G.linkInline}if(le==="<"&&P.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=c,M.highlightFormatting&&(b.formatting="link");var pe=C(b);return pe?pe+=" ":pe="",pe+G.linkEmail}if(M.xml&&le==="<"&&P.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=P.string.indexOf(">",P.pos);if(ae!=-1){var Oe=P.string.substring(P.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Oe)&&(b.md_inside=!0)}return P.backUp(1),b.htmlState=ie.startState(X),a(P,b,L)}if(M.xml&&le==="<"&&P.match(/^\/\w*?>/))return b.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var Te=1,Ne=P.pos==1?" ":P.string.charAt(P.pos-2);Te<3&&P.eat(le);)Te++;var De=P.peek()||" ",We=!/\s/.test(De)&&(!o.test(De)||/\s/.test(Ne)||o.test(Ne)),Le=!/\s/.test(Ne)&&(!o.test(Ne)||/\s/.test(De)||o.test(De)),Be=null,Ge=null;if(Te%2&&(!b.em&&We&&(le==="*"||!Le||o.test(Ne))?Be=!0:b.em==le&&Le&&(le==="*"||!We||o.test(De))&&(Be=!1)),Te>1&&(!b.strong&&We&&(le==="*"||!Le||o.test(Ne))?Ge=!0:b.strong==le&&Le&&(le==="*"||!We||o.test(De))&&(Ge=!1)),Ge!=null||Be!=null){M.highlightFormatting&&(b.formatting=Be==null?"strong":Ge==null?"em":"strong em"),Be===!0&&(b.em=le),Ge===!0&&(b.strong=le);var ce=C(b);return Be===!1&&(b.em=!1),Ge===!1&&(b.strong=!1),ce}}else if(le===" "&&(P.eat("*")||P.eat("_"))){if(P.peek()===" ")return C(b);P.backUp(1)}if(M.strikethrough){if(le==="~"&&P.eatWhile(le)){if(b.strikethrough){M.highlightFormatting&&(b.formatting="strikethrough");var ce=C(b);return b.strikethrough=!1,ce}else if(P.match(/^[^\s]/,!1))return b.strikethrough=!0,M.highlightFormatting&&(b.formatting="strikethrough"),C(b)}else if(le===" "&&P.match(/^~~/,!0)){if(P.peek()===" ")return C(b);P.backUp(2)}}if(M.emoji&&le===":"&&P.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){b.emoji=!0,M.highlightFormatting&&(b.formatting="emoji");var oe=C(b);return b.emoji=!1,oe}return le===" "&&(P.match(/^ +$/,!1)?b.trailingSpace++:b.trailingSpace&&(b.trailingSpaceNewLine=!0)),C(b)}function c(P,b){var Y=P.next();if(Y===">"){b.f=b.inline=x,M.highlightFormatting&&(b.formatting="link");var ee=C(b);return ee?ee+=" ":ee="",ee+G.linkInline}return P.match(/^[^>]+/,!0),G.linkInline}function T(P,b){if(P.eatSpace())return null;var Y=P.next();return Y==="("||Y==="["?(b.f=b.inline=v(Y==="("?")":"]"),M.highlightFormatting&&(b.formatting="link-string"),b.linkHref=!0,C(b)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(P){return function(b,Y){var ee=b.next();if(ee===P){Y.f=Y.inline=x,M.highlightFormatting&&(Y.formatting="link-string");var le=C(Y);return Y.linkHref=!1,le}return b.match(y[P]),Y.linkHref=!0,C(Y)}}function N(P,b){return P.match(/^([^\]\\]|\\.)*\]:/,!1)?(b.f=B,P.next(),M.highlightFormatting&&(b.formatting="link"),b.linkText=!0,C(b)):s(P,b,x)}function B(P,b){if(P.match(/^\]:/,!0)){b.f=b.inline=O,M.highlightFormatting&&(b.formatting="link");var Y=C(b);return b.linkText=!1,Y}return P.match(/^([^\]\\]|\\.)+/,!0),G.linkText}function O(P,b){return P.eatSpace()?null:(P.match(/^[^\s]+/,!0),P.peek()===void 0?b.linkTitle=!0:P.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=x,G.linkHref+" url")}var j={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:x,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(P){return{f:P.f,prevLine:P.prevLine,thisLine:P.thisLine,block:P.block,htmlState:P.htmlState&&ie.copyState(X,P.htmlState),indentation:P.indentation,localMode:P.localMode,localState:P.localMode?ie.copyState(P.localMode,P.localState):null,inline:P.inline,text:P.text,formatting:!1,linkText:P.linkText,linkTitle:P.linkTitle,linkHref:P.linkHref,code:P.code,em:P.em,strong:P.strong,strikethrough:P.strikethrough,emoji:P.emoji,header:P.header,setext:P.setext,hr:P.hr,taskList:P.taskList,list:P.list,listStack:P.listStack.slice(0),quote:P.quote,indentedCode:P.indentedCode,trailingSpace:P.trailingSpace,trailingSpaceNewLine:P.trailingSpaceNewLine,md_inside:P.md_inside,fencedEndRE:P.fencedEndRE}},token:function(P,b){if(b.formatting=!1,P!=b.thisLine.stream){if(b.header=0,b.hr=!1,P.match(/^\s*$/,!0))return _(b),null;if(b.prevLine=b.thisLine,b.thisLine={stream:P},b.taskList=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,!b.localState&&(b.f=b.block,b.f!=L)){var Y=P.match(/^\s*/,!0)[0].replace(/\t/g,h).length;if(b.indentation=Y,b.indentationDiff=null,Y>0)return null}}return b.f(P,b)},innerMode:function(P){return P.block==L?{state:P.htmlState,mode:X}:P.localState?{state:P.localState,mode:P.localMode}:{state:P,mode:j}},indent:function(P,b,Y){return P.block==L&&X.indent?X.indent(P.htmlState,b,Y):P.localState&&P.localMode.indent?P.localMode.indent(P.localState,b,Y):ie.Pass},blankLine:_,getType:C,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return j},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},nEHx:function(st,be,Q){"use strict";Q.d(be,"a",function(){return ie});var ie;(function($){$.DARK="dark",$.LIGHT="light",$.HIGH_CONTRAST="hc"})(ie||(ie={}))},nnTU:function(st,be,Q){"use strict";Q.d(be,"b",function(){return G}),Q.d(be,"a",function(){return W});var ie=Q("MI8n"),$=Q("JYp7"),M=Q("pmY6"),X=Q("24hK"),F=Q("746U"),U=Q("Cg/j");const G=Object(U.c)("commandService"),W=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ie.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,D){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!D)throw new Error("invalid command");return this.registerCommand({id:i,handler:D})}if(i.description){const u=[];for(let o of i.description.args)u.push(o.constraint);const f=i.handler;i.handler=function(o,...h){return Object(F.o)(h,u),f(o,...h)}}const{id:g}=i;let m=this._commands.get(g);m||(m=new X.a,this._commands.set(g,m));let p=m.unshift(i),l=Object(M.i)(()=>{p();const u=this._commands.get(g);(u==null?void 0:u.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),l}registerCommandAlias(i,D){return W.registerCommand(i,(g,...m)=>g.get(G).executeCommand(D,...m))}getCommand(i){const D=this._commands.get(i);return!D||D.isEmpty()?void 0:$.a.first(D)}getCommands(){const i=new Map;for(const D of this._commands.keys()){const g=this.getCommand(D);g&&i.set(D,g)}return i}};W.registerCommand("noop",()=>{})},osHv:function(st,be,Q){(function(ie){ie(Q("VrN/"))})(function(ie){"use strict";var $=ie.Pos;function M(o,h){return o.line-h.line||o.ch-h.ch}var X="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",F=X+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",U=new RegExp("<(/?)(["+X+"]["+F+"]*)","g");function G(o,h,s,a){this.line=h,this.ch=s,this.cm=o,this.text=o.getLine(h),this.min=a?Math.max(a.from,o.firstLine()):o.firstLine(),this.max=a?Math.min(a.to-1,o.lastLine()):o.lastLine()}function W(o,h){var s=o.cm.getTokenTypeAt($(o.line,h));return s&&/\btag\b/.test(s)}function i(o){return o.line>=o.max?void 0:(o.ch=0,o.text=o.cm.getLine(++o.line),!0)}function D(o){return o.line<=o.min?void 0:(o.text=o.cm.getLine(--o.line),o.ch=o.text.length,!0)}function g(o){for(;;){var h=o.text.indexOf(">",o.ch);if(h==-1){if(i(o))continue;return}if(!W(o,h+1)){o.ch=h+1;continue}var s=o.text.lastIndexOf("/",h),a=s>-1&&!/\S/.test(o.text.slice(s+1,h));return o.ch=h+1,a?"selfClose":"regular"}}function m(o){for(;;){var h=o.ch?o.text.lastIndexOf("<",o.ch-1):-1;if(h==-1){if(D(o))continue;return}if(!W(o,h+1)){o.ch=h;continue}U.lastIndex=h,o.ch=h;var s=U.exec(o.text);if(s&&s.index==h)return s}}function p(o){for(;;){U.lastIndex=o.ch;var h=U.exec(o.text);if(!h){if(i(o))continue;return}if(!W(o,h.index+1)){o.ch=h.index+1;continue}return o.ch=h.index+h[0].length,h}}function l(o){for(;;){var h=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(h==-1){if(D(o))continue;return}if(!W(o,h+1)){o.ch=h;continue}var s=o.text.lastIndexOf("/",h),a=s>-1&&!/\S/.test(o.text.slice(s+1,h));return o.ch=h+1,a?"selfClose":"regular"}}function u(o,h){for(var s=[];;){var a=p(o),A,_=o.line,S=o.ch-(a?a[0].length:0);if(!a||!(A=g(o)))return;if(A=="selfClose")continue;if(a[1]){for(var L=s.length-1;L>=0;--L)if(s[L]==a[2]){s.length=L;break}if(L<0&&(!h||h==a[2]))return{tag:a[2],from:$(_,S),to:$(o.line,o.ch)}}else s.push(a[2])}}function f(o,h){for(var s=[];;){var a=l(o);if(!a)return;if(a=="selfClose"){m(o);continue}var A=o.line,_=o.ch,S=m(o);if(!S)return;if(S[1])s.push(S[2]);else{for(var L=s.length-1;L>=0;--L)if(s[L]==S[2]){s.length=L;break}if(L<0&&(!h||h==S[2]))return{tag:S[2],from:$(o.line,o.ch),to:$(A,_)}}}}ie.registerHelper("fold","xml",function(o,h){for(var s=new G(o,h.line,0);;){var a=p(s);if(!a||s.line!=h.line)return;var A=g(s);if(!A)return;if(!a[1]&&A!="selfClose"){var _=$(s.line,s.ch),S=u(s,a[2]);return S&&M(S.from,_)>0?{from:_,to:S.from}:null}}}),ie.findMatchingTag=function(o,h,s){var a=new G(o,h.line,h.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var A=g(a),_=A&&$(a.line,a.ch),S=A&&m(a);if(!A||!S||M(a,h)>0)return;var L={from:$(a.line,a.ch),to:_,tag:S[2]};return A=="selfClose"?{open:L,close:null,at:"open"}:S[1]?{open:f(a,S[2]),close:L,at:"close"}:(a=new G(o,_.line,_.ch,s),{open:L,close:u(a,S[2]),at:"open"})},ie.findEnclosingTag=function(o,h,s,a){for(var A=new G(o,h.line,h.ch,s);;){var _=f(A,a);if(!_)break;var S=new G(o,h.line,h.ch,s),L=u(S,_.tag);if(L)return{open:_,close:L}}},ie.scanForClosingTag=function(o,h,s,a){var A=new G(o,h.line,h.ch,a?{from:0,to:a}:null);return u(A,s)}})},p5ED:function(st,be,Q){"use strict";var ie=Q("+L6B"),$=Q("2/Rp"),M=Q("5Dmo"),X=Q("3S7+"),F=Q("k1fw"),U=Q("9og8"),G=Q("tJVT"),W=Q("WmNS"),i=Q.n(W),D=Q("q1tI"),g=Q.n(D),m=Q("vHTk"),p=Q.n(m),l=Q("yEEn"),u=Q("ZW9T"),f=Q("1vsH"),o=Q("V0Rq"),h=Q("m3rI");be.a=function(s){var a,A,_,S,L,R,C,w=s.editOffice,x=w===void 0?"view":w,c=s.data,T=s.theme,y=s.type,v=s.filename,N=s.monacoEditor,B=s.className,O=s.style,j=s.close,P=s.onClose,b=s.hasMask,Y=s.disabledDownload,ee=Object(D.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),le=Object(G.a)(ee,2),ue=le[0],ke=le[1],Se=Object(D.useState)(""),Ce=Object(G.a)(Se,2),ce=Ce[0],pe=Ce[1],se=Object(D.useState)(),ae=Object(G.a)(se,2),Oe=ae[0],Te=ae[1],Ne=window.ENV==="build"?"/react/build":"",De=h.a.PROXY_SERVER||location.origin,We,Le=1024*1024,Be=10*Le,Ge=Object(D.useRef)();(a=c)!==null&&a!==void 0&&a.startsWith("/api")&&y!=="txt"&&(c=h.a.API_SERVER+c),y==="office"&&(We=Object(f.T)(c).filesize,We>Be&&(y="other")),v&&N&&(N.filename=v),Object(D.useEffect)(function(){var Ae,Ue,Ve=(Ae=document.cookie)===null||Ae===void 0||((Ue=Ae.replace(/\s/g,""))===null||Ue===void 0)?void 0:Ue.split(";");Ve==null||Ve.map(function(Ze){var $e=Ze.split("=");$e[0]==="_educoder_session"&&pe($e[1])})},[]),Object(D.useEffect)(function(){y==="office"&&oe()},[y,c]);var oe=function(){var Ae=Object(U.a)(i.a.mark(function Ue(){var Ve,Ze,$e;return i.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return console.log("data:",c),Ve=c,c.startsWith("http")||(Ve=location.origin+Ve),Ze=new URL(Ve).pathname.split("/").pop(),et.next=6,Object(o.V)({attachment_id:Ze});case 6:$e=et.sent,Te($e);case 8:case"end":return et.stop()}},Ue)}));return function(){return Ae.apply(this,arguments)}}(),ye=function(){if(c.startsWith("http")||c.startsWith("blob:")){we();return}Object(f.z)(v||"educoder",c,v)},we=function(){Object(f.x)(v||"educoder",decodeURIComponent(c))};return g.a.createElement("div",{style:Object(F.a)({},O||{}),className:"".concat(b&&p.a.bgBlack," ").concat(y?p.a.wrp:"hide")},j&&g.a.createElement("div",{className:p.a.close,ref:Ge},!Y&&g.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ge.current}},g.a.createElement("span",{onClick:we},g.a.createElement("i",{className:"icon-quxiaozhiding"}))),g.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ge.current}},g.a.createElement("span",{className:"",onClick:P},g.a.createElement("i",{className:"icon-guanbi1"})))),g.a.createElement("div",{className:"".concat(p.a[B]," ").concat(B," ").concat(p.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&g.a.createElement(u.b,N)),y==="audio"&&g.a.createElement("audio",{src:"".concat(((A=c)===null||A===void 0?void 0:A.indexOf("http://"))>-1||((_=c)===null||_===void 0?void 0:_.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),y==="video"&&g.a.createElement(g.a.Fragment,null,((S=c)===null||S===void 0?void 0:S.indexOf("http"))>-1?g.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):g.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),y==="office"&&Oe&&g.a.createElement("iframe",{src:"".concat(Ne,"/office.html?key=").concat(Oe.key,"&url=").concat(De+Oe.url,"&callbackUrl=").concat(De+Oe.callbackUrl,"&fileType=").concat(Oe.fileType,"&title=").concat(Oe.title,"&model=").concat(x,"&officeServer=").concat(h.a.OFFICE_SERVER,"&disabledDownload=").concat(!!Y)}),y==="html"&&g.a.createElement("iframe",{src:c+"&disposition=inline"}),y==="pdf"&&g.a.createElement("iframe",{src:"".concat(Ne,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!Y)}),y==="image"&&g.a.createElement("img",{src:"".concat(((L=c)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((R=c)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(C=c)!==null&&C!==void 0&&C.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),y==="other"&&g.a.createElement("div",null,g.a.createElement($.a,{type:"primary",size:"large",onClick:ye},g.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&g.a.createElement($.a,{type:"primary",size:"large",onClick:ye},g.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(st,be,Q){},pmY6:function(st,be,Q){"use strict";Q.d(be,"h",function(){return D}),Q.d(be,"g",function(){return m}),Q.d(be,"f",function(){return p}),Q.d(be,"e",function(){return l}),Q.d(be,"i",function(){return u}),Q.d(be,"b",function(){return f}),Q.d(be,"a",function(){return o}),Q.d(be,"d",function(){return h}),Q.d(be,"c",function(){return s});var ie=Q("C/vA"),$=Q("JYp7");const M=!1;let X=null;function F(a){X=a}if(M){const a="__is_disposable_tracked__";F(new class{trackDisposable(A){const _=new Error("Potentially leaked disposable").stack;setTimeout(()=>{A[a]||console.log(_)},3e3)}setParent(A,_){if(A&&A!==o.None)try{A[a]=!0}catch(S){}}markAsDisposed(A){if(A&&A!==o.None)try{A[a]=!0}catch(_){}}markAsSingleton(A){}})}function U(a){return X==null||X.trackDisposable(a),a}function G(a){X==null||X.markAsDisposed(a)}function W(a,A){X==null||X.setParent(a,A)}function i(a,A){if(!X)return;for(const _ of a)X.setParent(_,A)}function D(a){return X==null||X.markAsSingleton(a),a}class g extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function p(a){if($.a.is(a)){let A=[];for(const _ of a)if(_)try{_.dispose()}catch(S){A.push(S)}if(A.length===1)throw A[0];if(A.length>1)throw new g(A);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function l(...a){const A=u(()=>p(a));return i(a,A),A}function u(a){const A=U({dispose:Object(ie.a)(()=>{G(A),a()})});return A}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,U(this)}dispose(){if(this._isDisposed)return;G(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return W(a,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}f.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new f,U(this),W(this._store,this)}dispose(){G(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}o.None=Object.freeze({dispose(){}});class h{constructor(){this._isDisposed=!1,U(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var A;if(this._isDisposed||a===this._value)return;(A=this._value)===null||A===void 0||A.dispose(),a&&W(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,G(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&W(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(st,be,Q){var ie,$;(function(){var M;(function(){"use strict";var G=[,,function(g){function m(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var u=new m(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},m.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},m.prototype.has_match=function(u){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(u))return!0;return!1},m.prototype.set_indent=function(u,f){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(u){this.__items.push(u);var f=u.lastIndexOf(` `);f!==-1?this.__character_count=u.length-f:this.__character_count+=u.length},m.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function p(u,f){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),f=f||"",u.indent_level>0&&(f=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}p.prototype.get_indent_size=function(u,f){var o=this.__base_string_length;return f=f||0,u<0&&(o=0),o+=u*this.__indent_size,o+=f,o},p.prototype.get_indent_string=function(u,f){var o=this.__base_string;return f=f||0,u<0&&(u=0,o=""),f+=u*this.__indent_size,this.__ensure_cache(f),o+=this.__cache[f],o},p.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var u=this.__cache.length,f=0,o="";this.__indent_size&&u>=this.__indent_size&&(f=Math.floor(u/this.__indent_size),u-=f*this.__indent_size,o=new Array(f+1).join(this.__indent_string)),u&&(o+=new Array(u+1).join(" ")),this.__cache.push(o)};function l(u,f){this.__indent_cache=new p(u,f),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(u,f){return this.__indent_cache.get_indent_string(u,f)},l.prototype.get_indent_size=function(u,f){return this.__indent_cache.get_indent_size(u,f)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(u){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===` `&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return u!==` @@ -426,7 +426,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho trackSwitch: `+O+` contiguous: `+b+` accurateTimeOffset: `+R+` - timeOffset: `+y);var le=new G.TransmuxConfig(a,A,s,L,w);this.configureTransmuxer(le)}if(this.frag=_,this.part=S,T)T.postMessage({cmd:"demux",data:h,decryptdata:v,chunkMeta:C,state:ee},h instanceof ArrayBuffer?[h]:[]);else if(c){var ue=c.push(h,v,C,ee);Object(G.isPromise)(ue)?ue.then(function(ke){x.handleTransmuxComplete(ke)}):this.handleTransmuxComplete(ue)}},f.flush=function(h){var s=this;h.transmuxing.start=self.performance.now();var a=this.transmuxer,A=this.worker;if(A)A.postMessage({cmd:"flush",chunkMeta:h});else if(a){var _=a.flush(h);Object(G.isPromise)(_)?_.then(function(S){s.handleFlushResult(S,h)}):this.handleFlushResult(_,h)}},f.handleFlushResult=function(h,s){var a=this;h.forEach(function(A){a.handleTransmuxComplete(A)}),this.onFlush(s)},f.onWorkerMessage=function(h){var s=h.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},f.configureTransmuxer=function(h){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:h}):a&&a.configure(h)},f.handleTransmuxComplete=function(h){h.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(h)},u}()},"./src/demux/transmuxer-worker.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return i});var X=M("./src/demux/transmuxer.ts"),F=M("./src/events.ts"),U=M("./src/utils/logger.ts"),G=M("./node_modules/eventemitter3/index.js"),W=M.n(G);function i(l){var u=new G.EventEmitter,f=function(h,s){l.postMessage({event:h,data:s})};u.on(F.Events.FRAG_DECRYPTED,f),u.on(F.Events.ERROR,f),l.addEventListener("message",function(o){var h=o.data;switch(h.cmd){case"init":{var s=JSON.parse(h.config);l.transmuxer=new X.default(u,h.typeSupported,s,h.vendor,h.id),Object(U.enableLogs)(s.debug),f("init",null);break}case"configure":{l.transmuxer.configure(h.config);break}case"demux":{var a=l.transmuxer.push(h.data,h.decryptdata,h.chunkMeta,h.state);Object(X.isPromise)(a)?a.then(function(S){D(l,S)}):D(l,a);break}case"flush":{var A=h.chunkMeta,_=l.transmuxer.flush(A);Object(X.isPromise)(_)?_.then(function(S){m(l,S,A)}):m(l,_,A);break}default:break}})}function D(l,u){if(p(u.remuxResult))return;var f=[],o=u.remuxResult,h=o.audio,s=o.video;h&&g(f,h),s&&g(f,s),l.postMessage({event:"transmuxComplete",data:u},f)}function g(l,u){u.data1&&l.push(u.data1.buffer),u.data2&&l.push(u.data2.buffer)}function m(l,u,f){u.forEach(function(o){D(l,o)}),l.postMessage({event:"flush",data:f})}function p(l){return!l.audio&&!l.video&&!l.text&&!l.id3&&!l.initSegment}},"./src/demux/transmuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return s}),M.d($,"isPromise",function(){return _}),M.d($,"TransmuxConfig",function(){return S}),M.d($,"TransmuxState",function(){return L});var X=M("./src/events.ts"),F=M("./src/errors.ts"),U=M("./src/crypt/decrypter.ts"),G=M("./src/demux/aacdemuxer.ts"),W=M("./src/demux/mp4demuxer.ts"),i=M("./src/demux/tsdemuxer.ts"),D=M("./src/demux/mp3demuxer.ts"),g=M("./src/remux/mp4-remuxer.ts"),m=M("./src/remux/passthrough-remuxer.ts"),p=M("./src/demux/chunk-cache.ts"),l=M("./src/utils/mp4-tools.ts"),u=M("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){u.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var o=[{demux:i.default,remux:g.default},{demux:W.default,remux:m.default},{demux:G.default,remux:g.default},{demux:D.default,remux:g.default}],h=1024;o.forEach(function(R){var C=R.demux;h=Math.max(h,C.minProbeByteLength)});var s=function(){function R(w,x,c,T,y){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=w,this.typeSupported=x,this.config=c,this.vendor=T,this.id=y}var C=R.prototype;return C.configure=function(x){this.transmuxConfig=x,this.decrypter&&this.decrypter.reset()},C.push=function(x,c,T,y){var v=this,N=T.transmuxing;N.executeStart=f();var B=new Uint8Array(x),O=this.cache,j=this.config,P=this.currentTransmuxState,b=this.transmuxConfig;y&&(this.currentTransmuxState=y);var Y=a(B,c);if(Y&&Y.method==="AES-128"){var ee=this.getDecrypter();if(j.enableSoftwareAES){var le=ee.softwareDecrypt(B,Y.key.buffer,Y.iv.buffer);if(!le)return N.executeEnd=f(),A(T);B=new Uint8Array(le)}else return this.decryptionPromise=ee.webCryptoDecrypt(B,Y.key.buffer,Y.iv.buffer).then(function(Be){var Ge=v.push(Be,null,T);return v.decryptionPromise=null,Ge}),this.decryptionPromise}var ue=y||P,ke=ue.contiguous,Se=ue.discontinuity,Ce=ue.trackSwitch,ce=ue.accurateTimeOffset,pe=ue.timeOffset,se=b.audioCodec,ae=b.videoCodec,Oe=b.defaultInitPts,Te=b.duration,Ne=b.initSegmentData;if((Se||Ce)&&this.resetInitSegment(Ne,se,ae,Te),Se&&this.resetInitialTimestamp(Oe),ke||this.resetContiguity(),this.needsProbing(B,Se,Ce)){if(O.dataLength){var De=O.flush();B=Object(l.appendUint8Array)(De,B)}this.configureTransmuxer(B,b)}var We=this.transmux(B,Y,pe,ce,T),Le=this.currentTransmuxState;return Le.contiguous=!0,Le.discontinuity=!1,Le.trackSwitch=!1,N.executeEnd=f(),We},C.flush=function(x){var c=this,T=x.transmuxing;T.executeStart=f();var y=this.decrypter,v=this.cache,N=this.currentTransmuxState,B=this.decryptionPromise;if(B)return B.then(function(){return c.flush(x)});var O=[],j=N.timeOffset;if(y){var P=y.flush();P&&O.push(this.push(P,null,x))}var b=v.dataLength;v.reset();var Y=this.demuxer,ee=this.remuxer;if(!Y||!ee)return b>=h&&this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),T.executeEnd=f(),[A(x)];var le=Y.flush(j);return _(le)?le.then(function(ue){return c.flushRemux(O,ue,x),O}):(this.flushRemux(O,le,x),O)},C.flushRemux=function(x,c,T){var y=c.audioTrack,v=c.avcTrack,N=c.id3Track,B=c.textTrack,O=this.currentTransmuxState,j=O.accurateTimeOffset,P=O.timeOffset;u.logger.log("[transmuxer.ts]: Flushed fragment "+T.sn+(T.part>-1?" p: "+T.part:"")+" of level "+T.level);var b=this.remuxer.remux(y,v,N,B,P,j,!0,this.id);x.push({remuxResult:b,chunkMeta:T}),T.transmuxing.executeEnd=f()},C.resetInitialTimestamp=function(x){var c=this.demuxer,T=this.remuxer;if(!c||!T)return;c.resetTimeStamp(x),T.resetTimeStamp(x)},C.resetContiguity=function(){var x=this.demuxer,c=this.remuxer;if(!x||!c)return;x.resetContiguity(),c.resetNextTimestamp()},C.resetInitSegment=function(x,c,T,y){var v=this.demuxer,N=this.remuxer;if(!v||!N)return;v.resetInitSegment(c,T,y),N.resetInitSegment(x,c,T)},C.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},C.transmux=function(x,c,T,y,v){var N;return c&&c.method==="SAMPLE-AES"?N=this.transmuxSampleAes(x,c,T,y,v):N=this.transmuxUnencrypted(x,T,y,v),N},C.transmuxUnencrypted=function(x,c,T,y){var v=this.demuxer.demux(x,c,!1,!this.config.progressive),N=v.audioTrack,B=v.avcTrack,O=v.id3Track,j=v.textTrack,P=this.remuxer.remux(N,B,O,j,c,T,!1,this.id);return{remuxResult:P,chunkMeta:y}},C.transmuxSampleAes=function(x,c,T,y,v){var N=this;return this.demuxer.demuxSampleAes(x,c,T).then(function(B){var O=N.remuxer.remux(B.audioTrack,B.avcTrack,B.id3Track,B.textTrack,T,y,!1,N.id);return{remuxResult:O,chunkMeta:v}})},C.configureTransmuxer=function(x,c){for(var T=this.config,y=this.observer,v=this.typeSupported,N=this.vendor,B=c.audioCodec,O=c.defaultInitPts,j=c.duration,P=c.initSegmentData,b=c.videoCodec,Y,ee=0,le=o.length;ee0&&C!=null&&C.key!=null&&C.iv!==null&&C.method!=null&&(w=C),w}var A=function(C){return{remuxResult:{},chunkMeta:C}};function _(R){return"then"in R&&R.then instanceof Function}var S=function(C,w,x,c,T){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=C,this.videoCodec=w,this.initSegmentData=x,this.duration=c,this.defaultInitPts=T},L=function(C,w,x,c,T){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=C,this.contiguous=w,this.accurateTimeOffset=x,this.trackSwitch=c,this.timeOffset=T}},"./src/demux/tsdemuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"discardEPB",function(){return A});var X=M("./src/demux/adts.ts"),F=M("./src/demux/mpegaudio.ts"),U=M("./src/demux/exp-golomb.ts"),G=M("./src/demux/id3.ts"),W=M("./src/demux/sample-aes.ts"),i=M("./src/events.ts"),D=M("./src/utils/mp4-tools.ts"),g=M("./src/utils/logger.ts"),m=M("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},l=function(){function _(L,R,C){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=R,this.typeSupported=C}_.probe=function(R){var C=_.syncOffset(R);return C<0?!1:(C&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+C+", junk ahead ?"),!0)},_.syncOffset=function(R){for(var C=Math.min(1e3,R.length-3*188),w=0;w>4,se=void 0;if(pe>1){if(se=Se+5+R[Se+4],se===Se+188)continue}else se=Se+4;switch(ce){case N:Ce&&(B&&(c=h(B))&&this.parseAVCPES(c,!1),B={data:[],size:0}),B&&(B.data.push(R.subarray(se,Se+188)),B.size+=Se+188-se);break;case O:Ce&&(P&&(c=h(P))&&(y.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),P={data:[],size:0}),P&&(P.data.push(R.subarray(se,Se+188)),P.size+=Se+188-se);break;case j:Ce&&(b&&(c=h(b))&&this.parseID3PES(c),b={data:[],size:0}),b&&(b.data.push(R.subarray(se,Se+188)),b.size+=Se+188-se);break;case 0:Ce&&(se+=R[se]+1),le=this._pmtId=f(R,se);break;case le:{Ce&&(se+=R[se]+1);var ae=o(R,se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,w);N=ae.avc,N>0&&(T.pid=N),O=ae.audio,O>0&&(y.pid=O,y.isAAC=ae.isAAC),j=ae.id3,j>0&&(v.pid=j),Y&&!ee&&(g.logger.log("reparse from beginning"),Y=!1,Se=ke-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T.pesData=B,y.pesData=P,v.pesData=b;var Oe={audioTrack:y,avcTrack:T,id3Track:v,textTrack:this._txtTrack};return x&&this.extractRemainingSamples(Oe),Oe},S.flush=function(){var R=this.remainderData;this.remainderData=null;var C;return R?C=this.demux(R,-1,!1,!0):C={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(C),this.sampleAes?this.decrypt(C,this.sampleAes):C},S.extractRemainingSamples=function(R){var C=R.audioTrack,w=R.avcTrack,x=R.id3Track,c=w.pesData,T=C.pesData,y=x.pesData,v;c&&(v=h(c))?(this.parseAVCPES(v,!0),w.pesData=null):w.pesData=c,T&&(v=h(T))?(C.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),C.pesData=null):(T!=null&&T.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),C.pesData=T),y&&(v=h(y))?(this.parseID3PES(v),x.pesData=null):x.pesData=y},S.demuxSampleAes=function(R,C,w){var x=this.demux(R,w,!0,!this.config.progressive),c=this.sampleAes=new W.default(this.observer,this.config,C);return this.decrypt(x,c)},S.decrypt=function(R,C){return new Promise(function(w){var x=R.audioTrack,c=R.avcTrack;x.samples&&x.isAAC?C.decryptAacSamples(x.samples,0,function(){c.samples?C.decryptAvcSamples(c.samples,0,0,function(){w(R)}):w(R)}):c.samples&&C.decryptAvcSamples(c.samples,0,0,function(){w(R)})})},S.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},S.parseAVCPES=function(R,C){var w=this,x=this._avcTrack,c=this.parseAVCNALu(R.data),T=!1,y=this.avcSample,v,N=!1;R.data=null,y&&c.length&&!x.audFound&&(s(y,x),y=this.avcSample=u(!1,R.pts,R.dts,"")),c.forEach(function(B){switch(B.type){case 1:{v=!0,y||(y=w.avcSample=u(!0,R.pts,R.dts,"")),T&&(y.debug+="NDR "),y.frame=!0;var O=B.data;if(N&&O.length>4){var j=new U.default(O).readSliceType();(j===2||j===4||j===7||j===9)&&(y.key=!0)}break}case 5:v=!0,y||(y=w.avcSample=u(!0,R.pts,R.dts,"")),T&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{v=!0,T&&y&&(y.debug+="SEI ");var P=new U.default(A(B.data));P.readUByte();for(var b=0,Y=0,ee=!1,le=0;!ee&&P.bytesAvailable>1;){b=0;do le=P.readUByte(),b+=le;while(le===255);Y=0;do le=P.readUByte(),Y+=le;while(le===255);if(b===4&&P.bytesAvailable!==0){ee=!0;var ue=P.readUByte();if(ue===181){var ke=P.readUShort();if(ke===49){var Se=P.readUInt();if(Se===1195456820){var Ce=P.readUByte();if(Ce===3){for(var ce=P.readUByte(),pe=P.readUByte(),se=31&ce,ae=[ce,pe],Oe=0;Oe16){for(var Te=[],Ne=0;Ne<16;Ne++)Te.push(P.readUByte().toString(16)),(Ne===3||Ne===5||Ne===7||Ne===9)&&Te.push("-");for(var De=Y-16,We=new Uint8Array(De),Le=0;Le=0){var P={data:R.subarray(O,y-x-1),type:j};T.push(P)}else{var b=this.getLastNalUnit();if(b&&(c&&y<=4-c&&(b.state&&(b.data=b.data.subarray(0,b.data.byteLength-c))),N=y-x-1,N>0)){var Y=new Uint8Array(b.data.byteLength+N);Y.set(b.data,0),Y.set(R.subarray(0,N),b.data.byteLength),b.data=Y,b.state=0}}y=0&&x>=0){var ee={data:R.subarray(O,C),type:j,state:x};T.push(ee)}if(T.length===0){var le=this.getLastNalUnit();if(le){var ue=new Uint8Array(le.data.byteLength+R.byteLength);ue.set(le.data,0),ue.set(R,le.data.byteLength),le.data=ue}}return w.naluState=x,T},S.parseAACPES=function(R){var C=0,w=this._audioTrack,x=this.aacOverFlow,c=R.data;if(x){this.aacOverFlow=null;var T=x.sample.unit.byteLength,y=Math.min(x.missing,T),v=T-y;x.sample.unit.set(c.subarray(0,y),v),w.samples.push(x.sample),C=x.missing}var N,B;for(N=C,B=c.length;N1;){var T=new Uint8Array(c[0].length+c[1].length);T.set(c[0]),T.set(c[1],c[0].length),c[0]=T,c.splice(1,1)}L=c[0];var y=(L[0]<<16)+(L[1]<<8)+L[2];if(y===1){if(R=(L[4]<<8)+L[5],R&&R>_.size-6)return null;var v=L[7];v&192&&(w=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(x=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,w-x>60*9e4&&(g.logger.warn(Math.round((w-x)/9e4)+"s delta between PTS and DTS, align them"),w=x)):x=w),C=L[8];var N=C+9;if(_.size<=N)return null;_.size-=N;for(var B=new Uint8Array(_.size),O=0,j=c.length;OP){N-=P;continue}else L=L.subarray(N),P-=N,N=0;B.set(L,S),S+=P}return R&&(R-=C+3),{data:B,pts:w,dts:x,len:R}}return null}function s(_,S){if(_.units.length&&_.frame){if(_.pts===void 0){var L=S.samples,R=L.length;if(R){var C=L[R-1];_.pts=C.pts,_.dts=C.dts}else{S.dropped++;return}}S.samples.push(_)}_.debug.length&&g.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function a(_,S){var L=_.length;if(L>0){if(S.pts>=_[L-1].pts)_.push(S);else for(var R=L-1;R>=0;R--)if(S.pts<_[R].pts){_.splice(R,0,S);break}}else _.push(S)}function A(_){for(var S=_.byteLength,L=[],R=1;Rw)return c;return 0}},{key:"maxAutoLevel",get:function(){var C=this.levels,w=this.autoLevelCapping,x;return w===-1&&C&&C.length?x=C.length-1:x=w,x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(C){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,C)}},{key:"audioTracks",get:function(){var C=this.audioTrackController;return C?C.audioTracks:[]}},{key:"audioTrack",get:function(){var C=this.audioTrackController;return C?C.audioTrack:-1},set:function(C){var w=this.audioTrackController;w&&(w.audioTrack=C)}},{key:"subtitleTracks",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTrack:-1},set:function(C){var w=this.subtitleTrackController;w&&(w.subtitleTrack=C)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var C=this.subtitleTrackController;return C?C.subtitleDisplay:!1},set:function(C){var w=this.subtitleTrackController;w&&(w.subtitleDisplay=C)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(C){this.config.lowLatencyMode=C}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return h.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:u.hlsDefaultConfig},set:function(C){S.defaultConfig=C}}]),S}();_.defaultConfig=void 0},"./src/is-supported.ts":function(ie,$,M){"use strict";M.r($),M.d($,"isSupported",function(){return U}),M.d($,"changeTypeSupported",function(){return G});var X=M("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function U(){var W=Object(X.getMediaSource)();if(!W)return!1;var i=F(),D=W&&typeof W.isTypeSupported=="function"&&W.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!i||i.prototype&&typeof i.prototype.appendBuffer=="function"&&typeof i.prototype.remove=="function";return!!D&&!!g}function G(){var W,i=F();return typeof(i==null||((W=i.prototype)===null||W===void 0)?void 0:W.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return l}),M.d($,"LoadError",function(){return f});var X=M("./src/polyfills/number.ts"),F=M("./src/errors.ts");function U(o,h){o.prototype=Object.create(h.prototype),o.prototype.constructor=o,g(o,h)}function G(o){var h=typeof Map=="function"?new Map:void 0;return G=function(a){if(a===null||!D(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof h!="undefined"){if(h.has(a))return h.get(a);h.set(a,A)}function A(){return W(a,arguments,m(this).constructor)}return A.prototype=Object.create(a.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),g(A,a)},G(o)}function W(o,h,s){return i()?W=Reflect.construct:W=function(A,_,S){var L=[null];L.push.apply(L,_);var R=Function.bind.apply(A,L),C=new R;return S&&g(C,S.prototype),C},W.apply(null,arguments)}function i(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function D(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function g(o,h){return g=Object.setPrototypeOf||function(a,A){return a.__proto__=A,a},g(o,h)}function m(o){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(o)}var p=Math.pow(2,17),l=function(){function o(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var h=o.prototype;return h.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},h.abort=function(){this.loader&&this.loader.abort()},h.load=function(a,A){var _=this,S=a.url;if(!S)return Promise.reject(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(S?"part list":"url")));this.abort();var L=this.config,R=L.fLoader,C=L.loader;return new Promise(function(w,x){_.loader&&_.loader.destroy();var c=_.loader=a.loader=R?new R(L):new C(L),T=u(a),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};a.stats=c.stats,c.load(T,y,{onSuccess:function(N,B,O,j){_.resetLoader(a,c),w({frag:a,part:null,payload:N.data,networkDetails:j})},onError:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:N,networkDetails:O}))},onAbort:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:O}))},onTimeout:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:O}))},onProgress:function(N,B,O,j){A&&A({frag:a,part:null,payload:O,networkDetails:j})}})})},h.loadPart=function(a,A,_){var S=this;this.abort();var L=this.config,R=L.fLoader,C=L.loader;return new Promise(function(w,x){S.loader&&S.loader.destroy();var c=S.loader=a.loader=R?new R(L):new C(L),T=u(a,A),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};A.stats=c.stats,c.load(T,y,{onSuccess:function(N,B,O,j){S.resetLoader(a,c),S.updateStatsFromPart(a,A);var P={frag:a,part:A,payload:N.data,networkDetails:j};_(P),w(P)},onError:function(N,B,O){S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:A,response:N,networkDetails:O}))},onAbort:function(N,B,O){a.stats.aborted=A.stats.aborted,S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:A,networkDetails:O}))},onTimeout:function(N,B,O){S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:A,networkDetails:O}))}})})},h.updateStatsFromPart=function(a,A){var _=a.stats,S=A.stats,L=S.total;if(_.loaded+=S.loaded,L){var R=Math.round(a.duration/A.duration),C=Math.min(Math.round(_.loaded/L),R),w=R-C,x=w*Math.round(_.loaded/C);_.total=_.loaded+x}else _.total=Math.max(_.loaded,_.total);var c=_.loading,T=S.loading;c.start?c.first+=T.first-T.start:(c.start=T.start,c.first=T.first),c.end=T.end},h.resetLoader=function(a,A){a.loader=null,this.loader===A&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),A.destroy()},o}();function u(o,h){h===void 0&&(h=null);var s=h||o,a={frag:o,part:h,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},A=s.byteRangeStartOffset,_=s.byteRangeEndOffset;return Object(X.isFiniteNumber)(A)&&Object(X.isFiniteNumber)(_)&&(a.rangeStart=A,a.rangeEnd=_),a}var f=function(o){U(h,o);function h(s){for(var a,A=arguments.length,_=new Array(A>1?A-1:0),S=1;S>8*(15-L)&255;return S},a.setDecryptDataFromLevelKey=function(_,S){var L=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(L=W.LevelKey.fromURI(_.uri),L.method=_.method,L.iv=this.createInitializationVector(S),L.keyFormat="identity"),L},a.setElementaryStreamInfo=function(_,S,L,R,C,w){w===void 0&&(w=!1);var x=this.elementaryStreams,c=x[_];if(!c){x[_]={startPTS:S,endPTS:L,startDTS:R,endDTS:C,partial:w};return}c.startPTS=Math.min(c.startPTS,S),c.endPTS=Math.max(c.endPTS,L),c.startDTS=Math.min(c.startDTS,R),c.endDTS=Math.max(c.endDTS,C)},a.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[l.AUDIO]=null,_[l.VIDEO]=null,_[l.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&G.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(X.isFiniteNumber)(this.programDateTime))return null;var _=Object(X.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),s}(u),o=function(h){D(s,h);function s(a,A,_,S,L){var R;R=h.call(this,_)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new i.LoadStats,R.duration=a.decimalFloatingPoint("DURATION"),R.gap=a.bool("GAP"),R.independent=a.bool("INDEPENDENT"),R.relurl=a.enumeratedString("URI"),R.fragment=A,R.index=S;var C=a.enumeratedString("BYTERANGE");return C&&R.setByteRange(C,L),L&&(R.fragOffset=L.fragOffset+L.duration),R}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var A=this.elementaryStreams;return!!(A.audio||A.video||A.audiovideo)}}]),s}(u)},"./src/loader/key-loader.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return G});var X=M("./src/events.ts"),F=M("./src/errors.ts"),U=M("./src/utils/logger.ts"),G=function(){function W(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var i=W.prototype;return i._registerListeners=function(){this.hls.on(X.Events.KEY_LOADING,this.onKeyLoading,this)},i._unregisterListeners=function(){this.hls.off(X.Events.KEY_LOADING,this.onKeyLoading)},i.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var m=this.loaders[g];m&&m.destroy()}this.loaders={}},i.onKeyLoading=function(g,m){var p=m.frag,l=p.type,u=this.loaders[l];if(!p.decryptdata){U.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=p.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(u&&(U.logger.warn("abort previous key loader for type:"+l),u.abort()),!f){U.logger.warn("key uri is falsy");return}var h=o.loader,s=p.loader=this.loaders[l]=new h(o);this.decrypturl=f,this.decryptkey=null;var a={url:f,frag:p,responseType:"arraybuffer"},A={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,A,_)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(X.Events.KEY_LOADED,{frag:p}))},i.loadsuccess=function(g,m,p){var l=p.frag;if(!l.decryptdata){U.logger.error("after key load, decryptdata unset");return}this.decryptkey=l.decryptdata.key=new Uint8Array(g.data),l.loader=null,delete this.loaders[l.type],this.hls.trigger(X.Events.KEY_LOADED,{frag:l})},i.loaderror=function(g,m){var p=m.frag,l=p.loader;l&&l.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:g})},i.loadtimeout=function(g,m){var p=m.frag,l=p.loader;l&&l.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},W}()},"./src/loader/level-details.ts":function(ie,$,M){"use strict";M.r($),M.d($,"LevelDetails",function(){return W});var X=M("./src/polyfills/number.ts");function F(i,D){for(var g=0;gm.endSN||p>0||p===0&&l>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},U(i,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(X.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var p=this.driftEnd-this.driftStart;return p*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),i}()},"./src/loader/level-key.ts":function(ie,$,M){"use strict";M.r($),M.d($,"LevelKey",function(){return W});var X=M("./node_modules/url-toolkit/src/url-toolkit.js"),F=M.n(X);function U(i,D){for(var g=0;g2){var x=w.shift()+".";return x+=parseInt(w.shift()).toString(16),x+=("000"+parseInt(w.shift()).toString(16)).substr(-4),x}return C},L.resolve=function(C,w){return F.buildAbsoluteURL(w,C,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(C,w){var x=[],c={},T=!1;p.lastIndex=0;for(var y;(y=p.exec(C))!=null;)if(y[1]){var v=new D.AttrList(y[1]),N={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(y[2],w)},B=v.decimalResolution("RESOLUTION");B&&(N.width=B.width,N.height=B.height),a((v.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),N),N.videoCodec&&N.videoCodec.indexOf("avc1")!==-1&&(N.videoCodec=L.convertAVC1ToAVCOTI(N.videoCodec)),x.push(N)}else if(y[3]){var O=new D.AttrList(y[3]);O["DATA-ID"]&&(T=!0,c[O["DATA-ID"]]=O)}return{levels:x,sessionData:T?c:null}},L.parseMasterPlaylistMedia=function(C,w,x,c){c===void 0&&(c=[]);var T,y=[],v=0;for(l.lastIndex=0;(T=l.exec(C))!==null;){var N=new D.AttrList(T[1]);if(N.TYPE===x){var B={attrs:N,bitrate:0,id:v++,groupId:N["GROUP-ID"],instreamId:N["INSTREAM-ID"],name:N.NAME||N.LANGUAGE||"",type:x,default:N.bool("DEFAULT"),autoselect:N.bool("AUTOSELECT"),forced:N.bool("FORCED"),lang:N.LANGUAGE,url:N.URI?L.resolve(N.URI,w):""};if(c.length){var O=L.findGroup(c,B.groupId)||c[0];A(B,O,"audioCodec"),A(B,O,"textCodec")}y.push(B)}}return y},L.parseLevelPlaylist=function(C,w,x,c,T){var y=new W.LevelDetails(w),v=y.fragments,N=null,B=0,O=0,j=0,P=0,b=null,Y=new G.Fragment(c,w),ee,le,ue,ke=-1,Se=!1;for(u.lastIndex=0,y.m3u8=C;(ee=u.exec(C))!==null;){Se&&(Se=!1,Y=new G.Fragment(c,w),Y.start=j,Y.sn=B,Y.cc=P,Y.level=x,N&&(Y.initSegment=N,Y.rawProgramDateTime=N.rawProgramDateTime));var Ce=ee[1];if(Ce){Y.duration=parseFloat(Ce);var ce=(" "+ee[2]).slice(1);Y.title=ce||null,Y.tagList.push(ce?["INF",Ce,ce]:["INF",Ce])}else if(ee[3])Object(X.isFiniteNumber)(Y.duration)&&(Y.start=j,ue&&(Y.levelkey=ue),Y.sn=B,Y.level=x,Y.cc=P,Y.urlId=T,v.push(Y),Y.relurl=(" "+ee[3]).slice(1),S(Y,b),b=Y,j+=Y.duration,B++,O=0,Se=!0);else if(ee[4]){var pe=(" "+ee[4]).slice(1);b?Y.setByteRange(pe,b):Y.setByteRange(pe)}else if(ee[5])Y.rawProgramDateTime=(" "+ee[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),ke===-1&&(ke=v.length);else{if(ee=ee[0].match(f),!ee){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(le=1;le-1){g.logger.warn("Keyformat "+Ue+" is not supported from the manifest");continue}else if(Ue!=="identity")continue;Ge&&(ue=i.LevelKey.fromURL(w,oe),oe&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ge)>=0&&(ue.method=Ge,ue.keyFormat=Ue,Ae&&(ue.keyID=Ae),we&&(ue.keyFormatVersions=we),ue.iv=ye));break}case"START":{var Ze=new D.AttrList(ae),$e=Ze.decimalFloatingPoint("TIME-OFFSET");Object(X.isFiniteNumber)($e)&&(y.startTimeOffset=$e);break}case"MAP":{var tt=new D.AttrList(ae);Y.relurl=tt.URI,tt.BYTERANGE&&Y.setByteRange(tt.BYTERANGE),Y.level=x,Y.sn="initSegment",ue&&(Y.levelkey=ue),Y.initSegment=null,N=Y,Se=!0;break}case"SERVER-CONTROL":{var et=new D.AttrList(ae);y.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),y.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Je=new D.AttrList(ae);y.partTarget=Je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=y.partList;Me||(Me=y.partList=[]);var ut=O>0?Me[Me.length-1]:void 0,nt=O++,Fe=new G.Part(new D.AttrList(ae),Y,w,nt,ut);Me.push(Fe),Y.duration+=Fe.duration;break}case"PRELOAD-HINT":{var je=new D.AttrList(ae);y.preloadHint=je;break}case"RENDITION-REPORT":{var Ee=new D.AttrList(ae);y.renditionReports=y.renditionReports||[],y.renditionReports.push(Ee);break}default:g.logger.warn("line parsed but not handled: "+ee);break}}}b&&!b.relurl?(v.pop(),j-=b.duration,y.partList&&(y.fragmentHint=b)):y.partList&&(S(Y,b),Y.cc=P,y.fragmentHint=Y);var ge=v.length,_e=v[0],ne=v[ge-1];if(j+=y.skippedSegments*y.targetduration,j>0&&ge&&ne){y.averagetargetduration=j/ge;var re=ne.sn;y.endSN=re!=="initSegment"?re:0,_e&&(y.startCC=_e.cc,_e.initSegment||y.fragments.every(function(he){return he.relurl&&h(he.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new G.Fragment(c,w),Y.relurl=ne.relurl,Y.level=x,Y.sn="initSegment",_e.initSegment=Y,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(j+=y.fragmentHint.duration),y.totalduration=j,y.endCC=P,ke>0&&_(v,ke),y},L}();function a(L,R){["video","audio","text"].forEach(function(C){var w=L.filter(function(c){return Object(m.isCodecType)(c,C)});if(w.length){var x=w.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});R[C+"Codec"]=x.length>0?x[0]:w[0],L=L.filter(function(c){return w.indexOf(c)===-1})}}),R.unknownCodecs=L}function A(L,R,C){var w=R[C];w&&(L[C]=w)}function _(L,R){for(var C=L[R],w=R;w--;){var x=L[w];if(!x)return;x.programDateTime=C.programDateTime-x.duration*1e3,C=x}}function S(L,R){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):R!=null&&R.programDateTime&&(L.programDateTime=R.endProgramDateTime),Object(X.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,$,M){"use strict";M.r($);var X=M("./src/polyfills/number.ts"),F=M("./src/events.ts"),U=M("./src/errors.ts"),G=M("./src/utils/logger.ts"),W=M("./src/utils/mp4-tools.ts"),i=M("./src/loader/m3u8-parser.ts"),D=M("./src/types/loader.ts"),g=M("./src/utils/attr-list.ts");function m(u){var f=u.type;switch(f){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function p(u,f){var o=u.url;return(o===void 0||o.indexOf("data:")===0)&&(o=f.url),o}var l=function(){function u(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var f=u.prototype;return f.registerListeners=function(){var h=this.hls;h.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),h.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),h.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var h=this.hls;h.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),h.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),h.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(h){var s=this.hls.config,a=s.pLoader,A=s.loader,_=a||A,S=new _(s);return h.loader=S,this.loaders[h.type]=S,S},f.getInternalLoader=function(h){return this.loaders[h.type]},f.resetInternalLoader=function(h){this.loaders[h]&&delete this.loaders[h]},f.destroyInternalLoaders=function(){for(var h in this.loaders){var s=this.loaders[h];s&&s.destroy(),this.resetInternalLoader(h)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(h,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},f.onLevelLoading=function(h,s){var a=s.id,A=s.level,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:null,level:A,responseType:"text",type:D.PlaylistContextType.LEVEL,url:_,deliveryDirectives:S})},f.onAudioTrackLoading=function(h,s){var a=s.id,A=s.groupId,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:S})},f.onSubtitleTrackLoading=function(h,s){var a=s.id,A=s.groupId,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:S})},f.load=function(h){var s,a=this.hls.config,A=this.getInternalLoader(h);if(A){var _=A.context;if(_&&_.url===h.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+h.type),A.abort()}var S,L,R,C;switch(h.type){case D.PlaylistContextType.MANIFEST:S=a.manifestLoadingMaxRetry,L=a.manifestLoadingTimeOut,R=a.manifestLoadingRetryDelay,C=a.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:S=0,L=a.levelLoadingTimeOut;break;default:S=a.levelLoadingMaxRetry,L=a.levelLoadingTimeOut,R=a.levelLoadingRetryDelay,C=a.levelLoadingMaxRetryTimeout;break}if(A=this.createInternalLoader(h),(s=h.deliveryDirectives)!==null&&s!==void 0&&s.part){var w;if(h.type===D.PlaylistContextType.LEVEL&&h.level!==null?w=this.hls.levels[h.level].details:h.type===D.PlaylistContextType.AUDIO_TRACK&&h.id!==null?w=this.hls.audioTracks[h.id].details:h.type===D.PlaylistContextType.SUBTITLE_TRACK&&h.id!==null&&(w=this.hls.subtitleTracks[h.id].details),w){var x=w.partTarget,c=w.targetduration;x&&c&&(L=Math.min(Math.max(x*3,c*.8)*1e3,L))}}var T={timeout:L,maxRetry:S,retryDelay:R,maxRetryDelay:C,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};A.load(h,T,y)},f.loadsuccess=function(h,s,a,A){if(A===void 0&&(A=null),a.isSidxRequest){this.handleSidxRequest(h,a),this.handlePlaylistLoaded(h,s,a,A);return}this.resetInternalLoader(a.type);var _=h.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(h,a,"no EXTM3U delimiter",A);return}s.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(h,s,a,A):this.handleMasterPlaylist(h,s,a,A)},f.loaderror=function(h,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,h)},f.loadtimeout=function(h,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},f.handleMasterPlaylist=function(h,s,a,A){var _=this.hls,S=h.data,L=p(h,a),R=i.default.parseMasterPlaylist(S,L),C=R.levels,w=R.sessionData;if(!C.length){this.handleManifestParsingError(h,a,"no level found in manifest",A);return}var x=C.map(function(B){return{id:B.attrs.AUDIO,audioCodec:B.audioCodec}}),c=C.map(function(B){return{id:B.attrs.SUBTITLES,textCodec:B.textCodec}}),T=i.default.parseMasterPlaylistMedia(S,L,"AUDIO",x),y=i.default.parseMasterPlaylistMedia(S,L,"SUBTITLES",c),v=i.default.parseMasterPlaylistMedia(S,L,"CLOSED-CAPTIONS");if(T.length){var N=T.some(function(B){return!B.url});!N&&C[0].audioCodec&&!C[0].attrs.AUDIO&&(G.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),T.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}_.trigger(F.Events.MANIFEST_LOADED,{levels:C,audioTracks:T,subtitles:y,captions:v,url:L,stats:s,networkDetails:A,sessionData:w})},f.handleTrackOrLevelPlaylist=function(h,s,a,A){var _=this.hls,S=a.id,L=a.level,R=a.type,C=p(h,a),w=Object(X.isFiniteNumber)(S)?S:0,x=Object(X.isFiniteNumber)(L)?L:w,c=m(a),T=i.default.parseLevelPlaylist(h.data,C,x,c,w);if(!T.fragments.length){_.trigger(F.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:C,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(R===D.PlaylistContextType.MANIFEST){var y={attrs:new g.AttrList({}),bitrate:0,details:T,name:"",url:C};_.trigger(F.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:C,stats:s,networkDetails:A,sessionData:null})}if(s.parsing.end=performance.now(),T.needSidxRanges){var v,N=(v=T.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:N,isSidxRequest:!0,type:R,level:L,levelDetails:T,id:S,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=T,this.handlePlaylistLoaded(h,s,a,A)},f.handleSidxRequest=function(h,s){var a=Object(W.parseSegmentIndex)(new Uint8Array(h.data));if(!a)return;var A=a.references,_=s.levelDetails;A.forEach(function(S,L){var R=S.info,C=_.fragments[L];C.byteRange.length===0&&C.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),C.initSegment&&C.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(h,s,a,A){this.hls.trigger(F.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===D.PlaylistContextType.MANIFEST,url:h.url,reason:a,response:h,context:s,networkDetails:A})},f.handleNetworkError=function(h,s,a,A){a===void 0&&(a=!1),G.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+h.type+" level: "+h.level+" id: "+h.id+' group-id: "'+h.groupId+'"');var _=U.ErrorDetails.UNKNOWN,S=!1,L=this.getInternalLoader(h);switch(h.type){case D.PlaylistContextType.MANIFEST:_=a?U.ErrorDetails.MANIFEST_LOAD_TIMEOUT:U.ErrorDetails.MANIFEST_LOAD_ERROR,S=!0;break;case D.PlaylistContextType.LEVEL:_=a?U.ErrorDetails.LEVEL_LOAD_TIMEOUT:U.ErrorDetails.LEVEL_LOAD_ERROR,S=!1;break;case D.PlaylistContextType.AUDIO_TRACK:_=a?U.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,S=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:_=a?U.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:U.ErrorDetails.SUBTITLE_LOAD_ERROR,S=!1;break}L&&this.resetInternalLoader(h.type);var R={type:U.ErrorTypes.NETWORK_ERROR,details:_,fatal:S,url:h.url,loader:L,context:h,networkDetails:s};A&&(R.response=A),this.hls.trigger(F.Events.ERROR,R)},f.handlePlaylistLoaded=function(h,s,a,A){var _=a.type,S=a.level,L=a.id,R=a.groupId,C=a.loader,w=a.levelDetails,x=a.deliveryDirectives;if(!(w!=null&&w.targetduration)){this.handleManifestParsingError(h,a,"invalid target duration",A);return}if(!C)return;w.live&&(C.getCacheAge&&(w.ageHeader=C.getCacheAge()||0),(!C.getCacheAge||isNaN(w.ageHeader))&&(w.ageHeader=0));switch(_){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:w,level:S||0,id:L||0,stats:s,networkDetails:A,deliveryDirectives:x});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:w,id:L||0,groupId:R||"",stats:s,networkDetails:A,deliveryDirectives:x});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:w,id:L||0,groupId:R||"",stats:s,networkDetails:A,deliveryDirectives:x});break}},u}();$.default=l},"./src/polyfills/number.ts":function(ie,$,M){"use strict";M.r($),M.d($,"isFiniteNumber",function(){return X}),M.d($,"MAX_SAFE_INTEGER",function(){return F});var X=Number.isFinite||function(U){return typeof U=="number"&&isFinite(U)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,$,M){"use strict";M.r($);var X=function(){function F(){}return F.getSilentFrame=function(G,W){switch(G){case"mp4a.40.2":if(W===1)return new Uint8Array([0,200,0,128,35,128]);if(W===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(W===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(W===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(W===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(W===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(W===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(W===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(W===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},F}();$.default=X},"./src/remux/mp4-generator.ts":function(ie,$,M){"use strict";M.r($);var X=Math.pow(2,32)-1,F=function(){function U(){}return U.init=function(){U.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var W;for(W in U.types)U.types.hasOwnProperty(W)&&(U.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),D=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);U.HDLR_TYPES={video:i,audio:D};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);U.STTS=U.STSC=U.STCO=m,U.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),U.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),U.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);U.FTYP=U.box(U.types.ftyp,p,u,p,l),U.DINF=U.box(U.types.dinf,U.box(U.types.dref,g))},U.box=function(W){for(var i=8,D=arguments.length,g=new Array(D>1?D-1:0),m=1;m>24&255,u[1]=i>>16&255,u[2]=i>>8&255,u[3]=i&255,u.set(W,4),p=0,i=8;p>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},U.mdia=function(W){return U.box(U.types.mdia,U.mdhd(W.timescale,W.duration),U.hdlr(W.type),U.minf(W))},U.mfhd=function(W){return U.box(U.types.mfhd,new Uint8Array([0,0,0,0,W>>24,W>>16&255,W>>8&255,W&255]))},U.minf=function(W){return W.type==="audio"?U.box(U.types.minf,U.box(U.types.smhd,U.SMHD),U.DINF,U.stbl(W)):U.box(U.types.minf,U.box(U.types.vmhd,U.VMHD),U.DINF,U.stbl(W))},U.moof=function(W,i,D){return U.box(U.types.moof,U.mfhd(W),U.traf(D,i))},U.moov=function(W){for(var i=W.length,D=[];i--;)D[i]=U.trak(W[i]);return U.box.apply(null,[U.types.moov,U.mvhd(W[0].timescale,W[0].duration)].concat(D).concat(U.mvex(W)))},U.mvex=function(W){for(var i=W.length,D=[];i--;)D[i]=U.trex(W[i]);return U.box.apply(null,[U.types.mvex].concat(D))},U.mvhd=function(W,i){i*=W;var D=Math.floor(i/(X+1)),g=Math.floor(i%(X+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,W>>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return U.box(U.types.mvhd,m)},U.sdtp=function(W){var i=W.samples||[],D=new Uint8Array(4+i.length),g,m;for(g=0;g>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(m));for(g=0;g>>8&255),D.push(p&255),D=D.concat(Array.prototype.slice.call(m));var l=U.box(U.types.avcC,new Uint8Array([1,i[3],i[4],i[5],252|3,224|W.sps.length].concat(i).concat([W.pps.length]).concat(D))),u=W.width,f=W.height,o=W.pixelRatio[0],h=W.pixelRatio[1];return U.box(U.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,U.box(U.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),U.box(U.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,h>>24,h>>16&255,h>>8&255,h&255])))},U.esds=function(W){var i=W.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(W.config).concat([6,1,2]))},U.mp4a=function(W){var i=W.samplerate;return U.box(U.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]),U.box(U.types.esds,U.esds(W)))},U.mp3=function(W){var i=W.samplerate;return U.box(U.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]))},U.stsd=function(W){return W.type==="audio"?!W.isAAC&&W.codec==="mp3"?U.box(U.types.stsd,U.STSD,U.mp3(W)):U.box(U.types.stsd,U.STSD,U.mp4a(W)):U.box(U.types.stsd,U.STSD,U.avc1(W))},U.tkhd=function(W){var i=W.id,D=W.duration*W.timescale,g=W.width,m=W.height,p=Math.floor(D/(X+1)),l=Math.floor(D%(X+1));return U.box(U.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,i&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,g>>8&255,g&255,0,0,m>>8&255,m&255,0,0]))},U.traf=function(W,i){var D=U.sdtp(W),g=W.id,m=Math.floor(i/(X+1)),p=Math.floor(i%(X+1));return U.box(U.types.traf,U.box(U.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),U.box(U.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,p>>24,p>>16&255,p>>8&255,p&255])),U.trun(W,D.length+16+20+8+16+8+8),D)},U.trak=function(W){return W.duration=W.duration||4294967295,U.box(U.types.trak,U.tkhd(W),U.mdia(W))},U.trex=function(W){var i=W.id;return U.box(U.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},U.trun=function(W,i){var D=W.samples||[],g=D.length,m=12+16*g,p=new Uint8Array(m),l,u,f,o,h,s;for(i+=8+m,p.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255],0),l=0;l>>24&255,f>>>16&255,f>>>8&255,f&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,h.degradPrio&240<<8,h.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*l);return U.box(U.types.trun,p)},U.initSegment=function(W){U.types||U.init();var i=U.moov(W),D=new Uint8Array(U.FTYP.byteLength+i.byteLength);return D.set(U.FTYP),D.set(i,U.FTYP.byteLength),D},U}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,$.default=F},"./src/remux/mp4-remuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return s}),M.d($,"normalizePts",function(){return a});var X=M("./src/polyfills/number.ts"),F=M("./src/remux/aac-helper.ts"),U=M("./src/remux/mp4-generator.ts"),G=M("./src/events.ts"),W=M("./src/errors.ts"),i=M("./src/utils/logger.ts"),D=M("./src/types/loader.ts"),g=M("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(L){for(var R=1;R0?T:y.pts},w[0].pts);return x&&i.logger.debug("PTS rollover detected"),c},R.remux=function(w,x,c,T,y,v,N,B){var O,j,P,b,Y,ee,le=y,ue=y,ke=w.pid>-1,Se=x.pid>-1,Ce=x.samples.length,ce=w.samples.length>0,pe=Ce>1,se=(!ke||ce)&&(!Se||pe)||this.ISGenerated||N;if(se){this.ISGenerated||(P=this.generateIS(w,x,y));var ae=this.isVideoContiguous,Oe=-1;if(pe&&(Oe=A(x.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,Oe>0){i.logger.warn("[mp4-remuxer]: Dropped "+Oe+" out of "+Ce+" video samples due to a missing keyframe");var Te=this.getVideoStartPts(x.samples);x.samples=x.samples.slice(Oe),x.dropped+=Oe,ue+=(x.samples[0].pts-Te)/(x.timescale||9e4)}else Oe===-1&&(i.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ce+" video samples"),ee=!1);if(this.ISGenerated){if(ce&&pe){var Ne=this.getVideoStartPts(x.samples),De=a(w.samples[0].pts,Ne)-Ne,We=De/x.inputTimeScale;le+=Math.max(0,We),ue+=Math.max(0,-We)}if(ce){if(w.samplerate||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),P=this.generateIS(w,x,y)),j=this.remuxAudio(w,le,this.isAudioContiguous,v,Se||pe||B===D.PlaylistLevelType.AUDIO?ue:void 0),pe){var Le=j?j.endPTS-j.startPTS:0;x.inputTimeScale||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),P=this.generateIS(w,x,y)),O=this.remuxVideo(x,ue,ae,Le)}}else pe&&(O=this.remuxVideo(x,ue,ae,0));O&&(O.firstKeyFrame=Oe,O.independent=Oe!==-1)}}return this.ISGenerated&&(c.samples.length&&(Y=this.remuxID3(c,y)),T.samples.length&&(b=this.remuxText(T,y))),{audio:j,video:O,initSegment:P,independent:ee,text:b,id3:Y}},R.generateIS=function(w,x,c){var T=w.samples,y=x.samples,v=this.typeSupported,N={},B=!Object(X.isFiniteNumber)(this._initPTS),O="audio/mp4",j,P,b;if(B&&(j=P=Infinity),w.config&&T.length&&(w.timescale=w.samplerate,w.isAAC||(v.mpeg?(O="audio/mpeg",w.codec=""):v.mp3&&(w.codec="mp3")),N.audio={id:"audio",container:O,codec:w.codec,initSegment:!w.isAAC&&v.mpeg?new Uint8Array(0):U.default.initSegment([w]),metadata:{channelCount:w.channelCount}},B&&(b=w.inputTimeScale,j=P=T[0].pts-Math.round(b*c))),x.sps&&x.pps&&y.length&&(x.timescale=x.inputTimeScale,N.video={id:"main",container:"video/mp4",codec:x.codec,initSegment:U.default.initSegment([x]),metadata:{width:x.width,height:x.height}},B)){b=x.inputTimeScale;var Y=this.getVideoStartPts(y),ee=Math.round(b*c);P=Math.min(P,a(y[0].dts,Y)-ee),j=Math.min(j,Y-ee)}if(Object.keys(N).length)return this.ISGenerated=!0,B&&(this._initPTS=j,this._initDTS=P),{tracks:N,initPTS:j,timescale:b}},R.remuxVideo=function(w,x,c,T){var y=w.inputTimeScale,v=w.samples,N=[],B=v.length,O=this._initPTS,j=this.nextAvcDts,P=8,b,Y,ee,le=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,ke=0,Se=!1;if(!c||j===null){var Ce=x*y,ce=v[0].pts-a(v[0].dts,v[0].pts);j=Ce-ce}for(var pe=0;pese.pts){var ae=9e4*.2;ke=Math.max(Math.min(ke,se.pts-se.dts),-1*ae)}se.dts0?pe-1:pe].dts&&(Se=!0)}Se&&v.sort(function(wt,St){var dt=wt.dts-St.dts,Ut=wt.pts-St.pts;return dt||Ut}),Y=v[0].dts,ee=v[v.length-1].dts;var Oe=Math.round((ee-Y)/(B-1));if(ke<0){if(keOe,Be=We<-1;if(Le||Be){Le?i.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(We,!0)+" ms ("+We+"dts) hole between fragments detected, filling it"):i.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-We,!0)+" ms ("+We+"dts) overlapping between fragments detected"),Y=j;var Ge=v[0].pts-We;v[0].dts=Y,v[0].pts=Ge,i.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(Ge,!0)+"/"+Object(g.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(g.toMsFromMpegTsClock)(We,!0)+" ms")}}h&&(Y=Math.max(0,Y));for(var oe=0,ye=0,we=0;we0?Me-1:Me].dts;if(re.stretchShortVideoTrack&&this.nextAudioPts!==null){var fe=Math.floor(re.maxBufferHole*y),xe=(T?le+T*y:this.nextAudioPts)-ut.pts;xe>fe?(b=xe-he,b<0&&(b=he),i.logger.log("[mp4-remuxer]: It is approximately "+xe/90+" ms to the next segment; using duration "+b/90+" ms for the last video frame.")):b=he}else b=he}var Pe=Math.round(ut.pts-ut.dts);N.push(new _(ut.key,b,Fe,Pe))}if(N.length&&f&&f<70){var ze=N[0].flags;ze.dependsOn=2,ze.isNonSync=0}console.assert(b!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=ee+b,this.isVideoContiguous=!0;var ot=U.default.moof(w.sequenceNumber++,Y,m({},w,{samples:N})),mt="video",ft={data1:ot,data2:et,startPTS:le/y,endPTS:(ue+b)/y,startDTS:Y/y,endDTS:j/y,type:mt,hasAudio:!1,hasVideo:!0,nb:N.length,dropped:w.dropped};return w.samples=[],w.dropped=0,console.assert(et.length,"MDAT length must not be zero"),ft},R.remuxAudio=function(w,x,c,T,y){var v=w.inputTimeScale,N=w.samplerate?w.samplerate:v,B=v/N,O=w.isAAC?l:u,j=O*B,P=this._initPTS,b=!w.isAAC&&this.typeSupported.mpeg,Y=[],ee=w.samples,le=b?0:8,ue=this.nextAudioPts||-1,ke=x*v;if(this.isAudioContiguous=c=c||ee.length&&ue>0&&(T&&Math.abs(ke-ue)<9e3||Math.abs(a(ee[0].pts-P,ke)-ue)<20*j),ee.forEach(function(_e){_e.pts=a(_e.pts-P,ke)}),!c||ue<0){if(ee=ee.filter(function(_e){return _e.pts>=0}),!ee.length)return;y===0?ue=0:T?ue=Math.max(0,ke):ue=ee[0].pts}if(w.isAAC)for(var Se=y!==void 0,Ce=this.config.maxAudioFramesDrift,ce=0,pe=ue;ce=Ce*j&&Te0){ye+=le;try{oe=new Uint8Array(ye)}catch(_e){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:W.ErrorTypes.MUX_ERROR,details:W.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ye,reason:"fail allocating audio mdat "+ye});return}if(!b){var et=new DataView(oe.buffer);et.setUint32(0,ye),oe.set(U.default.types.mdat,4)}}else return;oe.set(Ze,le);var Je=Ze.byteLength;le+=Je,Y.push(new _(!0,O,Je,0)),Ge=$e}var Me=Y.length;if(!Me)return;var ut=Y[Y.length-1];this.nextAudioPts=ue=Ge+B*ut.duration;var nt=b?new Uint8Array(0):U.default.moof(w.sequenceNumber++,Be/B,m({},w,{samples:Y}));w.samples=[];var Fe=Be/v,je=ue/v,Ee="audio",ge={data1:nt,data2:oe,startPTS:Fe,endPTS:je,startDTS:Fe,endDTS:je,type:Ee,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(oe.length,"MDAT length must not be zero"),ge},R.remuxEmptyAudio=function(w,x,c,T){var y=w.inputTimeScale,v=w.samplerate?w.samplerate:y,N=y/v,B=this.nextAudioPts,O=(B!==null?B:T.startDTS*y)+this._initDTS,j=T.endDTS*y+this._initDTS,P=N*l,b=Math.ceil((j-O)/P),Y=F.default.getSilentFrame(w.manifestCodec||w.codec,w.channelCount);if(i.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){i.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],le=0;le4294967296;)L+=C;return L}function A(L){for(var R=0;R0?this.lastEndDTS=w:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var x=!!L.audio,c=!!L.video,T="";x&&(T+="audio"),c&&(T+="video");var y={data1:_,startPTS:C,startDTS:C,endPTS:w,endDTS:w,type:T,hasAudio:x,hasVideo:c,nb:1,dropped:0};return A.audio=y.type==="audio"?y:void 0,A.video=y.type!=="audio"?y:void 0,A.text=o,A.id3=f,A.initSegment=S,A},g}(),i=function(m,p,l){return Object(F.getStartDTS)(m,p)-l};function D(g,m){var p=g==null?void 0:g.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||m===U.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}$.default=W},"./src/task-loop.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return X});var X=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var U=F.prototype;return U.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},U.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},U.onHandlerDestroyed=function(){},U.hasInterval=function(){return!!this._tickInterval},U.hasNextTick=function(){return!!this._tickTimer},U.setInterval=function(W){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,W),!0)},U.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},U.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},U.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},U.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},U.doTick=function(){},F}()},"./src/types/cmcd.ts":function(ie,$,M){"use strict";M.r($),M.d($,"CMCDVersion",function(){return X}),M.d($,"CMCDObjectType",function(){return F}),M.d($,"CMCDStreamingFormat",function(){return U}),M.d($,"CMCDStreamType",function(){return G});var X=1,F;(function(W){W.MANIFEST="m",W.AUDIO="a",W.VIDEO="v",W.MUXED="av",W.INIT="i",W.CAPTION="c",W.TIMED_TEXT="tt",W.KEY="k",W.OTHER="o"})(F||(F={}));var U;(function(W){W.DASH="d",W.HLS="h",W.SMOOTH="s",W.OTHER="o"})(U||(U={}));var G;(function(W){W.VOD="v",W.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(ie,$,M){"use strict";M.r($),M.d($,"HlsSkip",function(){return U}),M.d($,"getSkipValue",function(){return G}),M.d($,"HlsUrlParameters",function(){return W}),M.d($,"Level",function(){return i});function X(D,g){for(var m=0;mNumber.MAX_SAFE_INTEGER?Infinity:g},W.hexadecimalInteger=function(D){if(this[D]){var g=(this[D]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var m=new Uint8Array(g.length/2),p=0;pNumber.MAX_SAFE_INTEGER?Infinity:g},W.decimalFloatingPoint=function(D){return parseFloat(this[D])},W.optionalFloat=function(D,g){var m=this[D];return m?parseFloat(m):g},W.enumeratedString=function(D){return this[D]},W.bool=function(D){return this[D]==="YES"},W.decimalResolution=function(D){var g=X.exec(this[D]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},G.parseAttrList=function(D){var g,m={},p='"';for(F.lastIndex=0;(g=F.exec(D))!==null;){var l=g[2];l.indexOf(p)===0&&l.lastIndexOf(p)===l.length-1&&(l=l.slice(1,-1)),m[g[1]]=l}return m},G}()},"./src/utils/binary-search.ts":function(ie,$,M){"use strict";M.r($);var X={search:function(U,G){for(var W=0,i=U.length-1,D=null,g=null;W<=i;){D=(W+i)/2|0,g=U[D];var m=G(g);if(m>0)W=D+1;else if(m<0)i=D-1;else return g}return null}};$.default=X},"./src/utils/buffer-helper.ts":function(ie,$,M){"use strict";M.r($),M.d($,"BufferHelper",function(){return U});var X=M("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},U=function(){function G(){}return G.isBuffered=function(i,D){try{if(i){for(var g=G.getBuffered(i),m=0;m=g.start(m)&&D<=g.end(m))return!0}}catch(p){}return!1},G.bufferInfo=function(i,D,g){try{if(i){var m=G.getBuffered(i),p=[],l;for(l=0;lu&&(m[l-1].end=i[p].end):m.push(i[p])}else m.push(i[p])}else m=i;for(var f=0,o,h=D,s=D,a=0;a=A&&D<_)h=A,s=_,f=s-D;else if(D+g=c&&X.logger.log(this.time+" ["+c+"] "+T)},C}(),f=function(w){for(var x=[],c=0;cW&&(this.logger.log(l.DEBUG,"Too large cursor position "+this.pos),this.pos=W)},w.moveCursor=function(c){var T=this.pos+c;if(c>1)for(var y=this.pos+1;y=144&&this.backSpace();var T=U(c);if(this.pos>=W){this.logger.log(l.ERROR,"Cannot insert "+c.toString(16)+" ("+T+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},w.clearFromPos=function(c){var T;for(T=c;T0&&(c?y="["+T.join(" | ")+"]":y=T.join(` + timeOffset: `+y);var le=new G.TransmuxConfig(a,A,s,L,w);this.configureTransmuxer(le)}if(this.frag=_,this.part=S,T)T.postMessage({cmd:"demux",data:h,decryptdata:v,chunkMeta:C,state:ee},h instanceof ArrayBuffer?[h]:[]);else if(c){var ue=c.push(h,v,C,ee);Object(G.isPromise)(ue)?ue.then(function(ke){x.handleTransmuxComplete(ke)}):this.handleTransmuxComplete(ue)}},f.flush=function(h){var s=this;h.transmuxing.start=self.performance.now();var a=this.transmuxer,A=this.worker;if(A)A.postMessage({cmd:"flush",chunkMeta:h});else if(a){var _=a.flush(h);Object(G.isPromise)(_)?_.then(function(S){s.handleFlushResult(S,h)}):this.handleFlushResult(_,h)}},f.handleFlushResult=function(h,s){var a=this;h.forEach(function(A){a.handleTransmuxComplete(A)}),this.onFlush(s)},f.onWorkerMessage=function(h){var s=h.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},f.configureTransmuxer=function(h){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:h}):a&&a.configure(h)},f.handleTransmuxComplete=function(h){h.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(h)},u}()},"./src/demux/transmuxer-worker.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return i});var X=M("./src/demux/transmuxer.ts"),F=M("./src/events.ts"),U=M("./src/utils/logger.ts"),G=M("./node_modules/eventemitter3/index.js"),W=M.n(G);function i(l){var u=new G.EventEmitter,f=function(h,s){l.postMessage({event:h,data:s})};u.on(F.Events.FRAG_DECRYPTED,f),u.on(F.Events.ERROR,f),l.addEventListener("message",function(o){var h=o.data;switch(h.cmd){case"init":{var s=JSON.parse(h.config);l.transmuxer=new X.default(u,h.typeSupported,s,h.vendor,h.id),Object(U.enableLogs)(s.debug),f("init",null);break}case"configure":{l.transmuxer.configure(h.config);break}case"demux":{var a=l.transmuxer.push(h.data,h.decryptdata,h.chunkMeta,h.state);Object(X.isPromise)(a)?a.then(function(S){D(l,S)}):D(l,a);break}case"flush":{var A=h.chunkMeta,_=l.transmuxer.flush(A);Object(X.isPromise)(_)?_.then(function(S){m(l,S,A)}):m(l,_,A);break}default:break}})}function D(l,u){if(p(u.remuxResult))return;var f=[],o=u.remuxResult,h=o.audio,s=o.video;h&&g(f,h),s&&g(f,s),l.postMessage({event:"transmuxComplete",data:u},f)}function g(l,u){u.data1&&l.push(u.data1.buffer),u.data2&&l.push(u.data2.buffer)}function m(l,u,f){u.forEach(function(o){D(l,o)}),l.postMessage({event:"flush",data:f})}function p(l){return!l.audio&&!l.video&&!l.text&&!l.id3&&!l.initSegment}},"./src/demux/transmuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return s}),M.d($,"isPromise",function(){return _}),M.d($,"TransmuxConfig",function(){return S}),M.d($,"TransmuxState",function(){return L});var X=M("./src/events.ts"),F=M("./src/errors.ts"),U=M("./src/crypt/decrypter.ts"),G=M("./src/demux/aacdemuxer.ts"),W=M("./src/demux/mp4demuxer.ts"),i=M("./src/demux/tsdemuxer.ts"),D=M("./src/demux/mp3demuxer.ts"),g=M("./src/remux/mp4-remuxer.ts"),m=M("./src/remux/passthrough-remuxer.ts"),p=M("./src/demux/chunk-cache.ts"),l=M("./src/utils/mp4-tools.ts"),u=M("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){u.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var o=[{demux:i.default,remux:g.default},{demux:W.default,remux:m.default},{demux:G.default,remux:g.default},{demux:D.default,remux:g.default}],h=1024;o.forEach(function(R){var C=R.demux;h=Math.max(h,C.minProbeByteLength)});var s=function(){function R(w,x,c,T,y){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=w,this.typeSupported=x,this.config=c,this.vendor=T,this.id=y}var C=R.prototype;return C.configure=function(x){this.transmuxConfig=x,this.decrypter&&this.decrypter.reset()},C.push=function(x,c,T,y){var v=this,N=T.transmuxing;N.executeStart=f();var B=new Uint8Array(x),O=this.cache,j=this.config,P=this.currentTransmuxState,b=this.transmuxConfig;y&&(this.currentTransmuxState=y);var Y=a(B,c);if(Y&&Y.method==="AES-128"){var ee=this.getDecrypter();if(j.enableSoftwareAES){var le=ee.softwareDecrypt(B,Y.key.buffer,Y.iv.buffer);if(!le)return N.executeEnd=f(),A(T);B=new Uint8Array(le)}else return this.decryptionPromise=ee.webCryptoDecrypt(B,Y.key.buffer,Y.iv.buffer).then(function(Be){var Ge=v.push(Be,null,T);return v.decryptionPromise=null,Ge}),this.decryptionPromise}var ue=y||P,ke=ue.contiguous,Se=ue.discontinuity,Ce=ue.trackSwitch,ce=ue.accurateTimeOffset,pe=ue.timeOffset,se=b.audioCodec,ae=b.videoCodec,Oe=b.defaultInitPts,Te=b.duration,Ne=b.initSegmentData;if((Se||Ce)&&this.resetInitSegment(Ne,se,ae,Te),Se&&this.resetInitialTimestamp(Oe),ke||this.resetContiguity(),this.needsProbing(B,Se,Ce)){if(O.dataLength){var De=O.flush();B=Object(l.appendUint8Array)(De,B)}this.configureTransmuxer(B,b)}var We=this.transmux(B,Y,pe,ce,T),Le=this.currentTransmuxState;return Le.contiguous=!0,Le.discontinuity=!1,Le.trackSwitch=!1,N.executeEnd=f(),We},C.flush=function(x){var c=this,T=x.transmuxing;T.executeStart=f();var y=this.decrypter,v=this.cache,N=this.currentTransmuxState,B=this.decryptionPromise;if(B)return B.then(function(){return c.flush(x)});var O=[],j=N.timeOffset;if(y){var P=y.flush();P&&O.push(this.push(P,null,x))}var b=v.dataLength;v.reset();var Y=this.demuxer,ee=this.remuxer;if(!Y||!ee)return b>=h&&this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),T.executeEnd=f(),[A(x)];var le=Y.flush(j);return _(le)?le.then(function(ue){return c.flushRemux(O,ue,x),O}):(this.flushRemux(O,le,x),O)},C.flushRemux=function(x,c,T){var y=c.audioTrack,v=c.avcTrack,N=c.id3Track,B=c.textTrack,O=this.currentTransmuxState,j=O.accurateTimeOffset,P=O.timeOffset;u.logger.log("[transmuxer.ts]: Flushed fragment "+T.sn+(T.part>-1?" p: "+T.part:"")+" of level "+T.level);var b=this.remuxer.remux(y,v,N,B,P,j,!0,this.id);x.push({remuxResult:b,chunkMeta:T}),T.transmuxing.executeEnd=f()},C.resetInitialTimestamp=function(x){var c=this.demuxer,T=this.remuxer;if(!c||!T)return;c.resetTimeStamp(x),T.resetTimeStamp(x)},C.resetContiguity=function(){var x=this.demuxer,c=this.remuxer;if(!x||!c)return;x.resetContiguity(),c.resetNextTimestamp()},C.resetInitSegment=function(x,c,T,y){var v=this.demuxer,N=this.remuxer;if(!v||!N)return;v.resetInitSegment(c,T,y),N.resetInitSegment(x,c,T)},C.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},C.transmux=function(x,c,T,y,v){var N;return c&&c.method==="SAMPLE-AES"?N=this.transmuxSampleAes(x,c,T,y,v):N=this.transmuxUnencrypted(x,T,y,v),N},C.transmuxUnencrypted=function(x,c,T,y){var v=this.demuxer.demux(x,c,!1,!this.config.progressive),N=v.audioTrack,B=v.avcTrack,O=v.id3Track,j=v.textTrack,P=this.remuxer.remux(N,B,O,j,c,T,!1,this.id);return{remuxResult:P,chunkMeta:y}},C.transmuxSampleAes=function(x,c,T,y,v){var N=this;return this.demuxer.demuxSampleAes(x,c,T).then(function(B){var O=N.remuxer.remux(B.audioTrack,B.avcTrack,B.id3Track,B.textTrack,T,y,!1,N.id);return{remuxResult:O,chunkMeta:v}})},C.configureTransmuxer=function(x,c){for(var T=this.config,y=this.observer,v=this.typeSupported,N=this.vendor,B=c.audioCodec,O=c.defaultInitPts,j=c.duration,P=c.initSegmentData,b=c.videoCodec,Y,ee=0,le=o.length;ee0&&C!=null&&C.key!=null&&C.iv!==null&&C.method!=null&&(w=C),w}var A=function(C){return{remuxResult:{},chunkMeta:C}};function _(R){return"then"in R&&R.then instanceof Function}var S=function(C,w,x,c,T){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=C,this.videoCodec=w,this.initSegmentData=x,this.duration=c,this.defaultInitPts=T},L=function(C,w,x,c,T){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=C,this.contiguous=w,this.accurateTimeOffset=x,this.trackSwitch=c,this.timeOffset=T}},"./src/demux/tsdemuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"discardEPB",function(){return A});var X=M("./src/demux/adts.ts"),F=M("./src/demux/mpegaudio.ts"),U=M("./src/demux/exp-golomb.ts"),G=M("./src/demux/id3.ts"),W=M("./src/demux/sample-aes.ts"),i=M("./src/events.ts"),D=M("./src/utils/mp4-tools.ts"),g=M("./src/utils/logger.ts"),m=M("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},l=function(){function _(L,R,C){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=R,this.typeSupported=C}_.probe=function(R){var C=_.syncOffset(R);return C<0?!1:(C&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+C+", junk ahead ?"),!0)},_.syncOffset=function(R){for(var C=Math.min(1e3,R.length-3*188),w=0;w>4,se=void 0;if(pe>1){if(se=Se+5+R[Se+4],se===Se+188)continue}else se=Se+4;switch(ce){case N:Ce&&(B&&(c=h(B))&&this.parseAVCPES(c,!1),B={data:[],size:0}),B&&(B.data.push(R.subarray(se,Se+188)),B.size+=Se+188-se);break;case O:Ce&&(P&&(c=h(P))&&(y.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),P={data:[],size:0}),P&&(P.data.push(R.subarray(se,Se+188)),P.size+=Se+188-se);break;case j:Ce&&(b&&(c=h(b))&&this.parseID3PES(c),b={data:[],size:0}),b&&(b.data.push(R.subarray(se,Se+188)),b.size+=Se+188-se);break;case 0:Ce&&(se+=R[se]+1),le=this._pmtId=f(R,se);break;case le:{Ce&&(se+=R[se]+1);var ae=o(R,se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,w);N=ae.avc,N>0&&(T.pid=N),O=ae.audio,O>0&&(y.pid=O,y.isAAC=ae.isAAC),j=ae.id3,j>0&&(v.pid=j),Y&&!ee&&(g.logger.log("reparse from beginning"),Y=!1,Se=ke-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T.pesData=B,y.pesData=P,v.pesData=b;var Oe={audioTrack:y,avcTrack:T,id3Track:v,textTrack:this._txtTrack};return x&&this.extractRemainingSamples(Oe),Oe},S.flush=function(){var R=this.remainderData;this.remainderData=null;var C;return R?C=this.demux(R,-1,!1,!0):C={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(C),this.sampleAes?this.decrypt(C,this.sampleAes):C},S.extractRemainingSamples=function(R){var C=R.audioTrack,w=R.avcTrack,x=R.id3Track,c=w.pesData,T=C.pesData,y=x.pesData,v;c&&(v=h(c))?(this.parseAVCPES(v,!0),w.pesData=null):w.pesData=c,T&&(v=h(T))?(C.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),C.pesData=null):(T!=null&&T.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),C.pesData=T),y&&(v=h(y))?(this.parseID3PES(v),x.pesData=null):x.pesData=y},S.demuxSampleAes=function(R,C,w){var x=this.demux(R,w,!0,!this.config.progressive),c=this.sampleAes=new W.default(this.observer,this.config,C);return this.decrypt(x,c)},S.decrypt=function(R,C){return new Promise(function(w){var x=R.audioTrack,c=R.avcTrack;x.samples&&x.isAAC?C.decryptAacSamples(x.samples,0,function(){c.samples?C.decryptAvcSamples(c.samples,0,0,function(){w(R)}):w(R)}):c.samples&&C.decryptAvcSamples(c.samples,0,0,function(){w(R)})})},S.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},S.parseAVCPES=function(R,C){var w=this,x=this._avcTrack,c=this.parseAVCNALu(R.data),T=!1,y=this.avcSample,v,N=!1;R.data=null,y&&c.length&&!x.audFound&&(s(y,x),y=this.avcSample=u(!1,R.pts,R.dts,"")),c.forEach(function(B){switch(B.type){case 1:{v=!0,y||(y=w.avcSample=u(!0,R.pts,R.dts,"")),T&&(y.debug+="NDR "),y.frame=!0;var O=B.data;if(N&&O.length>4){var j=new U.default(O).readSliceType();(j===2||j===4||j===7||j===9)&&(y.key=!0)}break}case 5:v=!0,y||(y=w.avcSample=u(!0,R.pts,R.dts,"")),T&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{v=!0,T&&y&&(y.debug+="SEI ");var P=new U.default(A(B.data));P.readUByte();for(var b=0,Y=0,ee=!1,le=0;!ee&&P.bytesAvailable>1;){b=0;do le=P.readUByte(),b+=le;while(le===255);Y=0;do le=P.readUByte(),Y+=le;while(le===255);if(b===4&&P.bytesAvailable!==0){ee=!0;var ue=P.readUByte();if(ue===181){var ke=P.readUShort();if(ke===49){var Se=P.readUInt();if(Se===1195456820){var Ce=P.readUByte();if(Ce===3){for(var ce=P.readUByte(),pe=P.readUByte(),se=31&ce,ae=[ce,pe],Oe=0;Oe16){for(var Te=[],Ne=0;Ne<16;Ne++)Te.push(P.readUByte().toString(16)),(Ne===3||Ne===5||Ne===7||Ne===9)&&Te.push("-");for(var De=Y-16,We=new Uint8Array(De),Le=0;Le=0){var P={data:R.subarray(O,y-x-1),type:j};T.push(P)}else{var b=this.getLastNalUnit();if(b&&(c&&y<=4-c&&(b.state&&(b.data=b.data.subarray(0,b.data.byteLength-c))),N=y-x-1,N>0)){var Y=new Uint8Array(b.data.byteLength+N);Y.set(b.data,0),Y.set(R.subarray(0,N),b.data.byteLength),b.data=Y,b.state=0}}y=0&&x>=0){var ee={data:R.subarray(O,C),type:j,state:x};T.push(ee)}if(T.length===0){var le=this.getLastNalUnit();if(le){var ue=new Uint8Array(le.data.byteLength+R.byteLength);ue.set(le.data,0),ue.set(R,le.data.byteLength),le.data=ue}}return w.naluState=x,T},S.parseAACPES=function(R){var C=0,w=this._audioTrack,x=this.aacOverFlow,c=R.data;if(x){this.aacOverFlow=null;var T=x.sample.unit.byteLength,y=Math.min(x.missing,T),v=T-y;x.sample.unit.set(c.subarray(0,y),v),w.samples.push(x.sample),C=x.missing}var N,B;for(N=C,B=c.length;N1;){var T=new Uint8Array(c[0].length+c[1].length);T.set(c[0]),T.set(c[1],c[0].length),c[0]=T,c.splice(1,1)}L=c[0];var y=(L[0]<<16)+(L[1]<<8)+L[2];if(y===1){if(R=(L[4]<<8)+L[5],R&&R>_.size-6)return null;var v=L[7];v&192&&(w=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(x=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,w-x>60*9e4&&(g.logger.warn(Math.round((w-x)/9e4)+"s delta between PTS and DTS, align them"),w=x)):x=w),C=L[8];var N=C+9;if(_.size<=N)return null;_.size-=N;for(var B=new Uint8Array(_.size),O=0,j=c.length;OP){N-=P;continue}else L=L.subarray(N),P-=N,N=0;B.set(L,S),S+=P}return R&&(R-=C+3),{data:B,pts:w,dts:x,len:R}}return null}function s(_,S){if(_.units.length&&_.frame){if(_.pts===void 0){var L=S.samples,R=L.length;if(R){var C=L[R-1];_.pts=C.pts,_.dts=C.dts}else{S.dropped++;return}}S.samples.push(_)}_.debug.length&&g.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function a(_,S){var L=_.length;if(L>0){if(S.pts>=_[L-1].pts)_.push(S);else for(var R=L-1;R>=0;R--)if(S.pts<_[R].pts){_.splice(R,0,S);break}}else _.push(S)}function A(_){for(var S=_.byteLength,L=[],R=1;Rw)return c;return 0}},{key:"maxAutoLevel",get:function(){var C=this.levels,w=this.autoLevelCapping,x;return w===-1&&C&&C.length?x=C.length-1:x=w,x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(C){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,C)}},{key:"audioTracks",get:function(){var C=this.audioTrackController;return C?C.audioTracks:[]}},{key:"audioTrack",get:function(){var C=this.audioTrackController;return C?C.audioTrack:-1},set:function(C){var w=this.audioTrackController;w&&(w.audioTrack=C)}},{key:"subtitleTracks",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTrack:-1},set:function(C){var w=this.subtitleTrackController;w&&(w.subtitleTrack=C)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var C=this.subtitleTrackController;return C?C.subtitleDisplay:!1},set:function(C){var w=this.subtitleTrackController;w&&(w.subtitleDisplay=C)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(C){this.config.lowLatencyMode=C}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return h.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:u.hlsDefaultConfig},set:function(C){S.defaultConfig=C}}]),S}();_.defaultConfig=void 0},"./src/is-supported.ts":function(ie,$,M){"use strict";M.r($),M.d($,"isSupported",function(){return U}),M.d($,"changeTypeSupported",function(){return G});var X=M("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function U(){var W=Object(X.getMediaSource)();if(!W)return!1;var i=F(),D=W&&typeof W.isTypeSupported=="function"&&W.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!i||i.prototype&&typeof i.prototype.appendBuffer=="function"&&typeof i.prototype.remove=="function";return!!D&&!!g}function G(){var W,i=F();return typeof(i==null||((W=i.prototype)===null||W===void 0)?void 0:W.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return l}),M.d($,"LoadError",function(){return f});var X=M("./src/polyfills/number.ts"),F=M("./src/errors.ts");function U(o,h){o.prototype=Object.create(h.prototype),o.prototype.constructor=o,g(o,h)}function G(o){var h=typeof Map=="function"?new Map:void 0;return G=function(a){if(a===null||!D(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof h!="undefined"){if(h.has(a))return h.get(a);h.set(a,A)}function A(){return W(a,arguments,m(this).constructor)}return A.prototype=Object.create(a.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),g(A,a)},G(o)}function W(o,h,s){return i()?W=Reflect.construct:W=function(A,_,S){var L=[null];L.push.apply(L,_);var R=Function.bind.apply(A,L),C=new R;return S&&g(C,S.prototype),C},W.apply(null,arguments)}function i(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function D(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function g(o,h){return g=Object.setPrototypeOf||function(a,A){return a.__proto__=A,a},g(o,h)}function m(o){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(o)}var p=Math.pow(2,17),l=function(){function o(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var h=o.prototype;return h.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},h.abort=function(){this.loader&&this.loader.abort()},h.load=function(a,A){var _=this,S=a.url;if(!S)return Promise.reject(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(S?"part list":"url")));this.abort();var L=this.config,R=L.fLoader,C=L.loader;return new Promise(function(w,x){_.loader&&_.loader.destroy();var c=_.loader=a.loader=R?new R(L):new C(L),T=u(a),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};a.stats=c.stats,c.load(T,y,{onSuccess:function(N,B,O,j){_.resetLoader(a,c),w({frag:a,part:null,payload:N.data,networkDetails:j})},onError:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:N,networkDetails:O}))},onAbort:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:O}))},onTimeout:function(N,B,O){_.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:O}))},onProgress:function(N,B,O,j){A&&A({frag:a,part:null,payload:O,networkDetails:j})}})})},h.loadPart=function(a,A,_){var S=this;this.abort();var L=this.config,R=L.fLoader,C=L.loader;return new Promise(function(w,x){S.loader&&S.loader.destroy();var c=S.loader=a.loader=R?new R(L):new C(L),T=u(a,A),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};A.stats=c.stats,c.load(T,y,{onSuccess:function(N,B,O,j){S.resetLoader(a,c),S.updateStatsFromPart(a,A);var P={frag:a,part:A,payload:N.data,networkDetails:j};_(P),w(P)},onError:function(N,B,O){S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:A,response:N,networkDetails:O}))},onAbort:function(N,B,O){a.stats.aborted=A.stats.aborted,S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:A,networkDetails:O}))},onTimeout:function(N,B,O){S.resetLoader(a,c),x(new f({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:A,networkDetails:O}))}})})},h.updateStatsFromPart=function(a,A){var _=a.stats,S=A.stats,L=S.total;if(_.loaded+=S.loaded,L){var R=Math.round(a.duration/A.duration),C=Math.min(Math.round(_.loaded/L),R),w=R-C,x=w*Math.round(_.loaded/C);_.total=_.loaded+x}else _.total=Math.max(_.loaded,_.total);var c=_.loading,T=S.loading;c.start?c.first+=T.first-T.start:(c.start=T.start,c.first=T.first),c.end=T.end},h.resetLoader=function(a,A){a.loader=null,this.loader===A&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),A.destroy()},o}();function u(o,h){h===void 0&&(h=null);var s=h||o,a={frag:o,part:h,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},A=s.byteRangeStartOffset,_=s.byteRangeEndOffset;return Object(X.isFiniteNumber)(A)&&Object(X.isFiniteNumber)(_)&&(a.rangeStart=A,a.rangeEnd=_),a}var f=function(o){U(h,o);function h(s){for(var a,A=arguments.length,_=new Array(A>1?A-1:0),S=1;S>8*(15-L)&255;return S},a.setDecryptDataFromLevelKey=function(_,S){var L=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(L=W.LevelKey.fromURI(_.uri),L.method=_.method,L.iv=this.createInitializationVector(S),L.keyFormat="identity"),L},a.setElementaryStreamInfo=function(_,S,L,R,C,w){w===void 0&&(w=!1);var x=this.elementaryStreams,c=x[_];if(!c){x[_]={startPTS:S,endPTS:L,startDTS:R,endDTS:C,partial:w};return}c.startPTS=Math.min(c.startPTS,S),c.endPTS=Math.max(c.endPTS,L),c.startDTS=Math.min(c.startDTS,R),c.endDTS=Math.max(c.endDTS,C)},a.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[l.AUDIO]=null,_[l.VIDEO]=null,_[l.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&G.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(X.isFiniteNumber)(this.programDateTime))return null;var _=Object(X.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),s}(u),o=function(h){D(s,h);function s(a,A,_,S,L){var R;R=h.call(this,_)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new i.LoadStats,R.duration=a.decimalFloatingPoint("DURATION"),R.gap=a.bool("GAP"),R.independent=a.bool("INDEPENDENT"),R.relurl=a.enumeratedString("URI"),R.fragment=A,R.index=S;var C=a.enumeratedString("BYTERANGE");return C&&R.setByteRange(C,L),L&&(R.fragOffset=L.fragOffset+L.duration),R}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var A=this.elementaryStreams;return!!(A.audio||A.video||A.audiovideo)}}]),s}(u)},"./src/loader/key-loader.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return G});var X=M("./src/events.ts"),F=M("./src/errors.ts"),U=M("./src/utils/logger.ts"),G=function(){function W(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var i=W.prototype;return i._registerListeners=function(){this.hls.on(X.Events.KEY_LOADING,this.onKeyLoading,this)},i._unregisterListeners=function(){this.hls.off(X.Events.KEY_LOADING,this.onKeyLoading)},i.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var m=this.loaders[g];m&&m.destroy()}this.loaders={}},i.onKeyLoading=function(g,m){var p=m.frag,l=p.type,u=this.loaders[l];if(!p.decryptdata){U.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=p.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(u&&(U.logger.warn("abort previous key loader for type:"+l),u.abort()),!f){U.logger.warn("key uri is falsy");return}var h=o.loader,s=p.loader=this.loaders[l]=new h(o);this.decrypturl=f,this.decryptkey=null;var a={url:f,frag:p,responseType:"arraybuffer"},A={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,A,_)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(X.Events.KEY_LOADED,{frag:p}))},i.loadsuccess=function(g,m,p){var l=p.frag;if(!l.decryptdata){U.logger.error("after key load, decryptdata unset");return}this.decryptkey=l.decryptdata.key=new Uint8Array(g.data),l.loader=null,delete this.loaders[l.type],this.hls.trigger(X.Events.KEY_LOADED,{frag:l})},i.loaderror=function(g,m){var p=m.frag,l=p.loader;l&&l.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:g})},i.loadtimeout=function(g,m){var p=m.frag,l=p.loader;l&&l.abort(),delete this.loaders[p.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},W}()},"./src/loader/level-details.ts":function(ie,$,M){"use strict";M.r($),M.d($,"LevelDetails",function(){return W});var X=M("./src/polyfills/number.ts");function F(i,D){for(var g=0;gm.endSN||p>0||p===0&&l>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},U(i,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(X.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var p=this.driftEnd-this.driftStart;return p*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),i}()},"./src/loader/level-key.ts":function(ie,$,M){"use strict";M.r($),M.d($,"LevelKey",function(){return W});var X=M("./node_modules/url-toolkit/src/url-toolkit.js"),F=M.n(X);function U(i,D){for(var g=0;g2){var x=w.shift()+".";return x+=parseInt(w.shift()).toString(16),x+=("000"+parseInt(w.shift()).toString(16)).substr(-4),x}return C},L.resolve=function(C,w){return F.buildAbsoluteURL(w,C,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(C,w){var x=[],c={},T=!1;p.lastIndex=0;for(var y;(y=p.exec(C))!=null;)if(y[1]){var v=new D.AttrList(y[1]),N={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(y[2],w)},B=v.decimalResolution("RESOLUTION");B&&(N.width=B.width,N.height=B.height),a((v.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),N),N.videoCodec&&N.videoCodec.indexOf("avc1")!==-1&&(N.videoCodec=L.convertAVC1ToAVCOTI(N.videoCodec)),x.push(N)}else if(y[3]){var O=new D.AttrList(y[3]);O["DATA-ID"]&&(T=!0,c[O["DATA-ID"]]=O)}return{levels:x,sessionData:T?c:null}},L.parseMasterPlaylistMedia=function(C,w,x,c){c===void 0&&(c=[]);var T,y=[],v=0;for(l.lastIndex=0;(T=l.exec(C))!==null;){var N=new D.AttrList(T[1]);if(N.TYPE===x){var B={attrs:N,bitrate:0,id:v++,groupId:N["GROUP-ID"],instreamId:N["INSTREAM-ID"],name:N.NAME||N.LANGUAGE||"",type:x,default:N.bool("DEFAULT"),autoselect:N.bool("AUTOSELECT"),forced:N.bool("FORCED"),lang:N.LANGUAGE,url:N.URI?L.resolve(N.URI,w):""};if(c.length){var O=L.findGroup(c,B.groupId)||c[0];A(B,O,"audioCodec"),A(B,O,"textCodec")}y.push(B)}}return y},L.parseLevelPlaylist=function(C,w,x,c,T){var y=new W.LevelDetails(w),v=y.fragments,N=null,B=0,O=0,j=0,P=0,b=null,Y=new G.Fragment(c,w),ee,le,ue,ke=-1,Se=!1;for(u.lastIndex=0,y.m3u8=C;(ee=u.exec(C))!==null;){Se&&(Se=!1,Y=new G.Fragment(c,w),Y.start=j,Y.sn=B,Y.cc=P,Y.level=x,N&&(Y.initSegment=N,Y.rawProgramDateTime=N.rawProgramDateTime));var Ce=ee[1];if(Ce){Y.duration=parseFloat(Ce);var ce=(" "+ee[2]).slice(1);Y.title=ce||null,Y.tagList.push(ce?["INF",Ce,ce]:["INF",Ce])}else if(ee[3])Object(X.isFiniteNumber)(Y.duration)&&(Y.start=j,ue&&(Y.levelkey=ue),Y.sn=B,Y.level=x,Y.cc=P,Y.urlId=T,v.push(Y),Y.relurl=(" "+ee[3]).slice(1),S(Y,b),b=Y,j+=Y.duration,B++,O=0,Se=!0);else if(ee[4]){var pe=(" "+ee[4]).slice(1);b?Y.setByteRange(pe,b):Y.setByteRange(pe)}else if(ee[5])Y.rawProgramDateTime=(" "+ee[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),ke===-1&&(ke=v.length);else{if(ee=ee[0].match(f),!ee){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(le=1;le-1){g.logger.warn("Keyformat "+Ue+" is not supported from the manifest");continue}else if(Ue!=="identity")continue;Ge&&(ue=i.LevelKey.fromURL(w,oe),oe&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ge)>=0&&(ue.method=Ge,ue.keyFormat=Ue,Ae&&(ue.keyID=Ae),we&&(ue.keyFormatVersions=we),ue.iv=ye));break}case"START":{var Ze=new D.AttrList(ae),$e=Ze.decimalFloatingPoint("TIME-OFFSET");Object(X.isFiniteNumber)($e)&&(y.startTimeOffset=$e);break}case"MAP":{var tt=new D.AttrList(ae);Y.relurl=tt.URI,tt.BYTERANGE&&Y.setByteRange(tt.BYTERANGE),Y.level=x,Y.sn="initSegment",ue&&(Y.levelkey=ue),Y.initSegment=null,N=Y,Se=!0;break}case"SERVER-CONTROL":{var et=new D.AttrList(ae);y.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),y.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Je=new D.AttrList(ae);y.partTarget=Je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=y.partList;Me||(Me=y.partList=[]);var ut=O>0?Me[Me.length-1]:void 0,rt=O++,Fe=new G.Part(new D.AttrList(ae),Y,w,rt,ut);Me.push(Fe),Y.duration+=Fe.duration;break}case"PRELOAD-HINT":{var je=new D.AttrList(ae);y.preloadHint=je;break}case"RENDITION-REPORT":{var Ee=new D.AttrList(ae);y.renditionReports=y.renditionReports||[],y.renditionReports.push(Ee);break}default:g.logger.warn("line parsed but not handled: "+ee);break}}}b&&!b.relurl?(v.pop(),j-=b.duration,y.partList&&(y.fragmentHint=b)):y.partList&&(S(Y,b),Y.cc=P,y.fragmentHint=Y);var ge=v.length,_e=v[0],re=v[ge-1];if(j+=y.skippedSegments*y.targetduration,j>0&&ge&&re){y.averagetargetduration=j/ge;var ne=re.sn;y.endSN=ne!=="initSegment"?ne:0,_e&&(y.startCC=_e.cc,_e.initSegment||y.fragments.every(function(he){return he.relurl&&h(he.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new G.Fragment(c,w),Y.relurl=re.relurl,Y.level=x,Y.sn="initSegment",_e.initSegment=Y,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(j+=y.fragmentHint.duration),y.totalduration=j,y.endCC=P,ke>0&&_(v,ke),y},L}();function a(L,R){["video","audio","text"].forEach(function(C){var w=L.filter(function(c){return Object(m.isCodecType)(c,C)});if(w.length){var x=w.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});R[C+"Codec"]=x.length>0?x[0]:w[0],L=L.filter(function(c){return w.indexOf(c)===-1})}}),R.unknownCodecs=L}function A(L,R,C){var w=R[C];w&&(L[C]=w)}function _(L,R){for(var C=L[R],w=R;w--;){var x=L[w];if(!x)return;x.programDateTime=C.programDateTime-x.duration*1e3,C=x}}function S(L,R){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):R!=null&&R.programDateTime&&(L.programDateTime=R.endProgramDateTime),Object(X.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,$,M){"use strict";M.r($);var X=M("./src/polyfills/number.ts"),F=M("./src/events.ts"),U=M("./src/errors.ts"),G=M("./src/utils/logger.ts"),W=M("./src/utils/mp4-tools.ts"),i=M("./src/loader/m3u8-parser.ts"),D=M("./src/types/loader.ts"),g=M("./src/utils/attr-list.ts");function m(u){var f=u.type;switch(f){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function p(u,f){var o=u.url;return(o===void 0||o.indexOf("data:")===0)&&(o=f.url),o}var l=function(){function u(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var f=u.prototype;return f.registerListeners=function(){var h=this.hls;h.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),h.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),h.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var h=this.hls;h.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),h.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),h.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(h){var s=this.hls.config,a=s.pLoader,A=s.loader,_=a||A,S=new _(s);return h.loader=S,this.loaders[h.type]=S,S},f.getInternalLoader=function(h){return this.loaders[h.type]},f.resetInternalLoader=function(h){this.loaders[h]&&delete this.loaders[h]},f.destroyInternalLoaders=function(){for(var h in this.loaders){var s=this.loaders[h];s&&s.destroy(),this.resetInternalLoader(h)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(h,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},f.onLevelLoading=function(h,s){var a=s.id,A=s.level,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:null,level:A,responseType:"text",type:D.PlaylistContextType.LEVEL,url:_,deliveryDirectives:S})},f.onAudioTrackLoading=function(h,s){var a=s.id,A=s.groupId,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:S})},f.onSubtitleTrackLoading=function(h,s){var a=s.id,A=s.groupId,_=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:S})},f.load=function(h){var s,a=this.hls.config,A=this.getInternalLoader(h);if(A){var _=A.context;if(_&&_.url===h.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+h.type),A.abort()}var S,L,R,C;switch(h.type){case D.PlaylistContextType.MANIFEST:S=a.manifestLoadingMaxRetry,L=a.manifestLoadingTimeOut,R=a.manifestLoadingRetryDelay,C=a.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:S=0,L=a.levelLoadingTimeOut;break;default:S=a.levelLoadingMaxRetry,L=a.levelLoadingTimeOut,R=a.levelLoadingRetryDelay,C=a.levelLoadingMaxRetryTimeout;break}if(A=this.createInternalLoader(h),(s=h.deliveryDirectives)!==null&&s!==void 0&&s.part){var w;if(h.type===D.PlaylistContextType.LEVEL&&h.level!==null?w=this.hls.levels[h.level].details:h.type===D.PlaylistContextType.AUDIO_TRACK&&h.id!==null?w=this.hls.audioTracks[h.id].details:h.type===D.PlaylistContextType.SUBTITLE_TRACK&&h.id!==null&&(w=this.hls.subtitleTracks[h.id].details),w){var x=w.partTarget,c=w.targetduration;x&&c&&(L=Math.min(Math.max(x*3,c*.8)*1e3,L))}}var T={timeout:L,maxRetry:S,retryDelay:R,maxRetryDelay:C,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};A.load(h,T,y)},f.loadsuccess=function(h,s,a,A){if(A===void 0&&(A=null),a.isSidxRequest){this.handleSidxRequest(h,a),this.handlePlaylistLoaded(h,s,a,A);return}this.resetInternalLoader(a.type);var _=h.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(h,a,"no EXTM3U delimiter",A);return}s.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(h,s,a,A):this.handleMasterPlaylist(h,s,a,A)},f.loaderror=function(h,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,h)},f.loadtimeout=function(h,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},f.handleMasterPlaylist=function(h,s,a,A){var _=this.hls,S=h.data,L=p(h,a),R=i.default.parseMasterPlaylist(S,L),C=R.levels,w=R.sessionData;if(!C.length){this.handleManifestParsingError(h,a,"no level found in manifest",A);return}var x=C.map(function(B){return{id:B.attrs.AUDIO,audioCodec:B.audioCodec}}),c=C.map(function(B){return{id:B.attrs.SUBTITLES,textCodec:B.textCodec}}),T=i.default.parseMasterPlaylistMedia(S,L,"AUDIO",x),y=i.default.parseMasterPlaylistMedia(S,L,"SUBTITLES",c),v=i.default.parseMasterPlaylistMedia(S,L,"CLOSED-CAPTIONS");if(T.length){var N=T.some(function(B){return!B.url});!N&&C[0].audioCodec&&!C[0].attrs.AUDIO&&(G.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),T.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}_.trigger(F.Events.MANIFEST_LOADED,{levels:C,audioTracks:T,subtitles:y,captions:v,url:L,stats:s,networkDetails:A,sessionData:w})},f.handleTrackOrLevelPlaylist=function(h,s,a,A){var _=this.hls,S=a.id,L=a.level,R=a.type,C=p(h,a),w=Object(X.isFiniteNumber)(S)?S:0,x=Object(X.isFiniteNumber)(L)?L:w,c=m(a),T=i.default.parseLevelPlaylist(h.data,C,x,c,w);if(!T.fragments.length){_.trigger(F.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:C,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(R===D.PlaylistContextType.MANIFEST){var y={attrs:new g.AttrList({}),bitrate:0,details:T,name:"",url:C};_.trigger(F.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:C,stats:s,networkDetails:A,sessionData:null})}if(s.parsing.end=performance.now(),T.needSidxRanges){var v,N=(v=T.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:N,isSidxRequest:!0,type:R,level:L,levelDetails:T,id:S,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=T,this.handlePlaylistLoaded(h,s,a,A)},f.handleSidxRequest=function(h,s){var a=Object(W.parseSegmentIndex)(new Uint8Array(h.data));if(!a)return;var A=a.references,_=s.levelDetails;A.forEach(function(S,L){var R=S.info,C=_.fragments[L];C.byteRange.length===0&&C.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),C.initSegment&&C.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(h,s,a,A){this.hls.trigger(F.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===D.PlaylistContextType.MANIFEST,url:h.url,reason:a,response:h,context:s,networkDetails:A})},f.handleNetworkError=function(h,s,a,A){a===void 0&&(a=!1),G.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+h.type+" level: "+h.level+" id: "+h.id+' group-id: "'+h.groupId+'"');var _=U.ErrorDetails.UNKNOWN,S=!1,L=this.getInternalLoader(h);switch(h.type){case D.PlaylistContextType.MANIFEST:_=a?U.ErrorDetails.MANIFEST_LOAD_TIMEOUT:U.ErrorDetails.MANIFEST_LOAD_ERROR,S=!0;break;case D.PlaylistContextType.LEVEL:_=a?U.ErrorDetails.LEVEL_LOAD_TIMEOUT:U.ErrorDetails.LEVEL_LOAD_ERROR,S=!1;break;case D.PlaylistContextType.AUDIO_TRACK:_=a?U.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,S=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:_=a?U.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:U.ErrorDetails.SUBTITLE_LOAD_ERROR,S=!1;break}L&&this.resetInternalLoader(h.type);var R={type:U.ErrorTypes.NETWORK_ERROR,details:_,fatal:S,url:h.url,loader:L,context:h,networkDetails:s};A&&(R.response=A),this.hls.trigger(F.Events.ERROR,R)},f.handlePlaylistLoaded=function(h,s,a,A){var _=a.type,S=a.level,L=a.id,R=a.groupId,C=a.loader,w=a.levelDetails,x=a.deliveryDirectives;if(!(w!=null&&w.targetduration)){this.handleManifestParsingError(h,a,"invalid target duration",A);return}if(!C)return;w.live&&(C.getCacheAge&&(w.ageHeader=C.getCacheAge()||0),(!C.getCacheAge||isNaN(w.ageHeader))&&(w.ageHeader=0));switch(_){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:w,level:S||0,id:L||0,stats:s,networkDetails:A,deliveryDirectives:x});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:w,id:L||0,groupId:R||"",stats:s,networkDetails:A,deliveryDirectives:x});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:w,id:L||0,groupId:R||"",stats:s,networkDetails:A,deliveryDirectives:x});break}},u}();$.default=l},"./src/polyfills/number.ts":function(ie,$,M){"use strict";M.r($),M.d($,"isFiniteNumber",function(){return X}),M.d($,"MAX_SAFE_INTEGER",function(){return F});var X=Number.isFinite||function(U){return typeof U=="number"&&isFinite(U)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,$,M){"use strict";M.r($);var X=function(){function F(){}return F.getSilentFrame=function(G,W){switch(G){case"mp4a.40.2":if(W===1)return new Uint8Array([0,200,0,128,35,128]);if(W===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(W===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(W===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(W===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(W===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(W===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(W===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(W===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},F}();$.default=X},"./src/remux/mp4-generator.ts":function(ie,$,M){"use strict";M.r($);var X=Math.pow(2,32)-1,F=function(){function U(){}return U.init=function(){U.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var W;for(W in U.types)U.types.hasOwnProperty(W)&&(U.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),D=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);U.HDLR_TYPES={video:i,audio:D};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);U.STTS=U.STSC=U.STCO=m,U.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),U.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),U.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);U.FTYP=U.box(U.types.ftyp,p,u,p,l),U.DINF=U.box(U.types.dinf,U.box(U.types.dref,g))},U.box=function(W){for(var i=8,D=arguments.length,g=new Array(D>1?D-1:0),m=1;m>24&255,u[1]=i>>16&255,u[2]=i>>8&255,u[3]=i&255,u.set(W,4),p=0,i=8;p>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},U.mdia=function(W){return U.box(U.types.mdia,U.mdhd(W.timescale,W.duration),U.hdlr(W.type),U.minf(W))},U.mfhd=function(W){return U.box(U.types.mfhd,new Uint8Array([0,0,0,0,W>>24,W>>16&255,W>>8&255,W&255]))},U.minf=function(W){return W.type==="audio"?U.box(U.types.minf,U.box(U.types.smhd,U.SMHD),U.DINF,U.stbl(W)):U.box(U.types.minf,U.box(U.types.vmhd,U.VMHD),U.DINF,U.stbl(W))},U.moof=function(W,i,D){return U.box(U.types.moof,U.mfhd(W),U.traf(D,i))},U.moov=function(W){for(var i=W.length,D=[];i--;)D[i]=U.trak(W[i]);return U.box.apply(null,[U.types.moov,U.mvhd(W[0].timescale,W[0].duration)].concat(D).concat(U.mvex(W)))},U.mvex=function(W){for(var i=W.length,D=[];i--;)D[i]=U.trex(W[i]);return U.box.apply(null,[U.types.mvex].concat(D))},U.mvhd=function(W,i){i*=W;var D=Math.floor(i/(X+1)),g=Math.floor(i%(X+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,W>>24&255,W>>16&255,W>>8&255,W&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return U.box(U.types.mvhd,m)},U.sdtp=function(W){var i=W.samples||[],D=new Uint8Array(4+i.length),g,m;for(g=0;g>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(m));for(g=0;g>>8&255),D.push(p&255),D=D.concat(Array.prototype.slice.call(m));var l=U.box(U.types.avcC,new Uint8Array([1,i[3],i[4],i[5],252|3,224|W.sps.length].concat(i).concat([W.pps.length]).concat(D))),u=W.width,f=W.height,o=W.pixelRatio[0],h=W.pixelRatio[1];return U.box(U.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,U.box(U.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),U.box(U.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,h>>24,h>>16&255,h>>8&255,h&255])))},U.esds=function(W){var i=W.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(W.config).concat([6,1,2]))},U.mp4a=function(W){var i=W.samplerate;return U.box(U.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]),U.box(U.types.esds,U.esds(W)))},U.mp3=function(W){var i=W.samplerate;return U.box(U.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]))},U.stsd=function(W){return W.type==="audio"?!W.isAAC&&W.codec==="mp3"?U.box(U.types.stsd,U.STSD,U.mp3(W)):U.box(U.types.stsd,U.STSD,U.mp4a(W)):U.box(U.types.stsd,U.STSD,U.avc1(W))},U.tkhd=function(W){var i=W.id,D=W.duration*W.timescale,g=W.width,m=W.height,p=Math.floor(D/(X+1)),l=Math.floor(D%(X+1));return U.box(U.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,i&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,g>>8&255,g&255,0,0,m>>8&255,m&255,0,0]))},U.traf=function(W,i){var D=U.sdtp(W),g=W.id,m=Math.floor(i/(X+1)),p=Math.floor(i%(X+1));return U.box(U.types.traf,U.box(U.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),U.box(U.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,p>>24,p>>16&255,p>>8&255,p&255])),U.trun(W,D.length+16+20+8+16+8+8),D)},U.trak=function(W){return W.duration=W.duration||4294967295,U.box(U.types.trak,U.tkhd(W),U.mdia(W))},U.trex=function(W){var i=W.id;return U.box(U.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},U.trun=function(W,i){var D=W.samples||[],g=D.length,m=12+16*g,p=new Uint8Array(m),l,u,f,o,h,s;for(i+=8+m,p.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255],0),l=0;l>>24&255,f>>>16&255,f>>>8&255,f&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,h.degradPrio&240<<8,h.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*l);return U.box(U.types.trun,p)},U.initSegment=function(W){U.types||U.init();var i=U.moov(W),D=new Uint8Array(U.FTYP.byteLength+i.byteLength);return D.set(U.FTYP),D.set(i,U.FTYP.byteLength),D},U}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,$.default=F},"./src/remux/mp4-remuxer.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return s}),M.d($,"normalizePts",function(){return a});var X=M("./src/polyfills/number.ts"),F=M("./src/remux/aac-helper.ts"),U=M("./src/remux/mp4-generator.ts"),G=M("./src/events.ts"),W=M("./src/errors.ts"),i=M("./src/utils/logger.ts"),D=M("./src/types/loader.ts"),g=M("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(L){for(var R=1;R0?T:y.pts},w[0].pts);return x&&i.logger.debug("PTS rollover detected"),c},R.remux=function(w,x,c,T,y,v,N,B){var O,j,P,b,Y,ee,le=y,ue=y,ke=w.pid>-1,Se=x.pid>-1,Ce=x.samples.length,ce=w.samples.length>0,pe=Ce>1,se=(!ke||ce)&&(!Se||pe)||this.ISGenerated||N;if(se){this.ISGenerated||(P=this.generateIS(w,x,y));var ae=this.isVideoContiguous,Oe=-1;if(pe&&(Oe=A(x.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,Oe>0){i.logger.warn("[mp4-remuxer]: Dropped "+Oe+" out of "+Ce+" video samples due to a missing keyframe");var Te=this.getVideoStartPts(x.samples);x.samples=x.samples.slice(Oe),x.dropped+=Oe,ue+=(x.samples[0].pts-Te)/(x.timescale||9e4)}else Oe===-1&&(i.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ce+" video samples"),ee=!1);if(this.ISGenerated){if(ce&&pe){var Ne=this.getVideoStartPts(x.samples),De=a(w.samples[0].pts,Ne)-Ne,We=De/x.inputTimeScale;le+=Math.max(0,We),ue+=Math.max(0,-We)}if(ce){if(w.samplerate||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),P=this.generateIS(w,x,y)),j=this.remuxAudio(w,le,this.isAudioContiguous,v,Se||pe||B===D.PlaylistLevelType.AUDIO?ue:void 0),pe){var Le=j?j.endPTS-j.startPTS:0;x.inputTimeScale||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),P=this.generateIS(w,x,y)),O=this.remuxVideo(x,ue,ae,Le)}}else pe&&(O=this.remuxVideo(x,ue,ae,0));O&&(O.firstKeyFrame=Oe,O.independent=Oe!==-1)}}return this.ISGenerated&&(c.samples.length&&(Y=this.remuxID3(c,y)),T.samples.length&&(b=this.remuxText(T,y))),{audio:j,video:O,initSegment:P,independent:ee,text:b,id3:Y}},R.generateIS=function(w,x,c){var T=w.samples,y=x.samples,v=this.typeSupported,N={},B=!Object(X.isFiniteNumber)(this._initPTS),O="audio/mp4",j,P,b;if(B&&(j=P=Infinity),w.config&&T.length&&(w.timescale=w.samplerate,w.isAAC||(v.mpeg?(O="audio/mpeg",w.codec=""):v.mp3&&(w.codec="mp3")),N.audio={id:"audio",container:O,codec:w.codec,initSegment:!w.isAAC&&v.mpeg?new Uint8Array(0):U.default.initSegment([w]),metadata:{channelCount:w.channelCount}},B&&(b=w.inputTimeScale,j=P=T[0].pts-Math.round(b*c))),x.sps&&x.pps&&y.length&&(x.timescale=x.inputTimeScale,N.video={id:"main",container:"video/mp4",codec:x.codec,initSegment:U.default.initSegment([x]),metadata:{width:x.width,height:x.height}},B)){b=x.inputTimeScale;var Y=this.getVideoStartPts(y),ee=Math.round(b*c);P=Math.min(P,a(y[0].dts,Y)-ee),j=Math.min(j,Y-ee)}if(Object.keys(N).length)return this.ISGenerated=!0,B&&(this._initPTS=j,this._initDTS=P),{tracks:N,initPTS:j,timescale:b}},R.remuxVideo=function(w,x,c,T){var y=w.inputTimeScale,v=w.samples,N=[],B=v.length,O=this._initPTS,j=this.nextAvcDts,P=8,b,Y,ee,le=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,ke=0,Se=!1;if(!c||j===null){var Ce=x*y,ce=v[0].pts-a(v[0].dts,v[0].pts);j=Ce-ce}for(var pe=0;pese.pts){var ae=9e4*.2;ke=Math.max(Math.min(ke,se.pts-se.dts),-1*ae)}se.dts0?pe-1:pe].dts&&(Se=!0)}Se&&v.sort(function(wt,St){var dt=wt.dts-St.dts,Ut=wt.pts-St.pts;return dt||Ut}),Y=v[0].dts,ee=v[v.length-1].dts;var Oe=Math.round((ee-Y)/(B-1));if(ke<0){if(keOe,Be=We<-1;if(Le||Be){Le?i.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(We,!0)+" ms ("+We+"dts) hole between fragments detected, filling it"):i.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-We,!0)+" ms ("+We+"dts) overlapping between fragments detected"),Y=j;var Ge=v[0].pts-We;v[0].dts=Y,v[0].pts=Ge,i.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(Ge,!0)+"/"+Object(g.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(g.toMsFromMpegTsClock)(We,!0)+" ms")}}h&&(Y=Math.max(0,Y));for(var oe=0,ye=0,we=0;we0?Me-1:Me].dts;if(ne.stretchShortVideoTrack&&this.nextAudioPts!==null){var fe=Math.floor(ne.maxBufferHole*y),xe=(T?le+T*y:this.nextAudioPts)-ut.pts;xe>fe?(b=xe-he,b<0&&(b=he),i.logger.log("[mp4-remuxer]: It is approximately "+xe/90+" ms to the next segment; using duration "+b/90+" ms for the last video frame.")):b=he}else b=he}var Pe=Math.round(ut.pts-ut.dts);N.push(new _(ut.key,b,Fe,Pe))}if(N.length&&f&&f<70){var ze=N[0].flags;ze.dependsOn=2,ze.isNonSync=0}console.assert(b!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=ee+b,this.isVideoContiguous=!0;var ot=U.default.moof(w.sequenceNumber++,Y,m({},w,{samples:N})),mt="video",ft={data1:ot,data2:et,startPTS:le/y,endPTS:(ue+b)/y,startDTS:Y/y,endDTS:j/y,type:mt,hasAudio:!1,hasVideo:!0,nb:N.length,dropped:w.dropped};return w.samples=[],w.dropped=0,console.assert(et.length,"MDAT length must not be zero"),ft},R.remuxAudio=function(w,x,c,T,y){var v=w.inputTimeScale,N=w.samplerate?w.samplerate:v,B=v/N,O=w.isAAC?l:u,j=O*B,P=this._initPTS,b=!w.isAAC&&this.typeSupported.mpeg,Y=[],ee=w.samples,le=b?0:8,ue=this.nextAudioPts||-1,ke=x*v;if(this.isAudioContiguous=c=c||ee.length&&ue>0&&(T&&Math.abs(ke-ue)<9e3||Math.abs(a(ee[0].pts-P,ke)-ue)<20*j),ee.forEach(function(_e){_e.pts=a(_e.pts-P,ke)}),!c||ue<0){if(ee=ee.filter(function(_e){return _e.pts>=0}),!ee.length)return;y===0?ue=0:T?ue=Math.max(0,ke):ue=ee[0].pts}if(w.isAAC)for(var Se=y!==void 0,Ce=this.config.maxAudioFramesDrift,ce=0,pe=ue;ce=Ce*j&&Te0){ye+=le;try{oe=new Uint8Array(ye)}catch(_e){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:W.ErrorTypes.MUX_ERROR,details:W.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ye,reason:"fail allocating audio mdat "+ye});return}if(!b){var et=new DataView(oe.buffer);et.setUint32(0,ye),oe.set(U.default.types.mdat,4)}}else return;oe.set(Ze,le);var Je=Ze.byteLength;le+=Je,Y.push(new _(!0,O,Je,0)),Ge=$e}var Me=Y.length;if(!Me)return;var ut=Y[Y.length-1];this.nextAudioPts=ue=Ge+B*ut.duration;var rt=b?new Uint8Array(0):U.default.moof(w.sequenceNumber++,Be/B,m({},w,{samples:Y}));w.samples=[];var Fe=Be/v,je=ue/v,Ee="audio",ge={data1:rt,data2:oe,startPTS:Fe,endPTS:je,startDTS:Fe,endDTS:je,type:Ee,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(oe.length,"MDAT length must not be zero"),ge},R.remuxEmptyAudio=function(w,x,c,T){var y=w.inputTimeScale,v=w.samplerate?w.samplerate:y,N=y/v,B=this.nextAudioPts,O=(B!==null?B:T.startDTS*y)+this._initDTS,j=T.endDTS*y+this._initDTS,P=N*l,b=Math.ceil((j-O)/P),Y=F.default.getSilentFrame(w.manifestCodec||w.codec,w.channelCount);if(i.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){i.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],le=0;le4294967296;)L+=C;return L}function A(L){for(var R=0;R0?this.lastEndDTS=w:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var x=!!L.audio,c=!!L.video,T="";x&&(T+="audio"),c&&(T+="video");var y={data1:_,startPTS:C,startDTS:C,endPTS:w,endDTS:w,type:T,hasAudio:x,hasVideo:c,nb:1,dropped:0};return A.audio=y.type==="audio"?y:void 0,A.video=y.type!=="audio"?y:void 0,A.text=o,A.id3=f,A.initSegment=S,A},g}(),i=function(m,p,l){return Object(F.getStartDTS)(m,p)-l};function D(g,m){var p=g==null?void 0:g.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||m===U.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}$.default=W},"./src/task-loop.ts":function(ie,$,M){"use strict";M.r($),M.d($,"default",function(){return X});var X=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var U=F.prototype;return U.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},U.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},U.onHandlerDestroyed=function(){},U.hasInterval=function(){return!!this._tickInterval},U.hasNextTick=function(){return!!this._tickTimer},U.setInterval=function(W){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,W),!0)},U.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},U.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},U.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},U.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},U.doTick=function(){},F}()},"./src/types/cmcd.ts":function(ie,$,M){"use strict";M.r($),M.d($,"CMCDVersion",function(){return X}),M.d($,"CMCDObjectType",function(){return F}),M.d($,"CMCDStreamingFormat",function(){return U}),M.d($,"CMCDStreamType",function(){return G});var X=1,F;(function(W){W.MANIFEST="m",W.AUDIO="a",W.VIDEO="v",W.MUXED="av",W.INIT="i",W.CAPTION="c",W.TIMED_TEXT="tt",W.KEY="k",W.OTHER="o"})(F||(F={}));var U;(function(W){W.DASH="d",W.HLS="h",W.SMOOTH="s",W.OTHER="o"})(U||(U={}));var G;(function(W){W.VOD="v",W.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(ie,$,M){"use strict";M.r($),M.d($,"HlsSkip",function(){return U}),M.d($,"getSkipValue",function(){return G}),M.d($,"HlsUrlParameters",function(){return W}),M.d($,"Level",function(){return i});function X(D,g){for(var m=0;mNumber.MAX_SAFE_INTEGER?Infinity:g},W.hexadecimalInteger=function(D){if(this[D]){var g=(this[D]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var m=new Uint8Array(g.length/2),p=0;pNumber.MAX_SAFE_INTEGER?Infinity:g},W.decimalFloatingPoint=function(D){return parseFloat(this[D])},W.optionalFloat=function(D,g){var m=this[D];return m?parseFloat(m):g},W.enumeratedString=function(D){return this[D]},W.bool=function(D){return this[D]==="YES"},W.decimalResolution=function(D){var g=X.exec(this[D]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},G.parseAttrList=function(D){var g,m={},p='"';for(F.lastIndex=0;(g=F.exec(D))!==null;){var l=g[2];l.indexOf(p)===0&&l.lastIndexOf(p)===l.length-1&&(l=l.slice(1,-1)),m[g[1]]=l}return m},G}()},"./src/utils/binary-search.ts":function(ie,$,M){"use strict";M.r($);var X={search:function(U,G){for(var W=0,i=U.length-1,D=null,g=null;W<=i;){D=(W+i)/2|0,g=U[D];var m=G(g);if(m>0)W=D+1;else if(m<0)i=D-1;else return g}return null}};$.default=X},"./src/utils/buffer-helper.ts":function(ie,$,M){"use strict";M.r($),M.d($,"BufferHelper",function(){return U});var X=M("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},U=function(){function G(){}return G.isBuffered=function(i,D){try{if(i){for(var g=G.getBuffered(i),m=0;m=g.start(m)&&D<=g.end(m))return!0}}catch(p){}return!1},G.bufferInfo=function(i,D,g){try{if(i){var m=G.getBuffered(i),p=[],l;for(l=0;lu&&(m[l-1].end=i[p].end):m.push(i[p])}else m.push(i[p])}else m=i;for(var f=0,o,h=D,s=D,a=0;a=A&&D<_)h=A,s=_,f=s-D;else if(D+g=c&&X.logger.log(this.time+" ["+c+"] "+T)},C}(),f=function(w){for(var x=[],c=0;cW&&(this.logger.log(l.DEBUG,"Too large cursor position "+this.pos),this.pos=W)},w.moveCursor=function(c){var T=this.pos+c;if(c>1)for(var y=this.pos+1;y=144&&this.backSpace();var T=U(c);if(this.pos>=W){this.logger.log(l.ERROR,"Cannot insert "+c.toString(16)+" ("+T+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},w.clearFromPos=function(c){var T;for(T=c;T0&&(c?y="["+T.join(" | ")+"]":y=T.join(` `)),y},w.getTextAndFormat=function(){return this.rows},C}(),A=function(){function C(x,c,T){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=x,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new a(T),this.nonDisplayedMemory=new a(T),this.lastOutputScreen=new a(T),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=T}var w=C.prototype;return w.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},w.getHandler=function(){return this.outputFilter},w.setHandler=function(c){this.outputFilter=c},w.setPAC=function(c){this.writeScreen.setPAC(c)},w.setBkgData=function(c){this.writeScreen.setBkgData(c)},w.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(l.INFO,"MODE="+c),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=c},w.insertChars=function(c){for(var T=0;T=46,T.italics)T.foreground="white";else{var y=Math.floor(c/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];T.foreground=v[y]}this.logger.log(l.INFO,"MIDROW: "+JSON.stringify(T)),this.writeScreen.setPen(T)},w.outputDataUpdate=function(c){c===void 0&&(c=!1);var T=this.logger.time;if(T===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=T:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,T,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:T),this.lastOutputScreen.copy(this.displayedMemory))},w.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},C}(),_=function(){function C(x,c,T){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new u;this.channels=[null,new A(x,c,y),new A(x+1,T,y)],this.cmdHistory=R(),this.logger=y}var w=C.prototype;return w.getHandler=function(c){return this.channels[c].getHandler()},w.setHandler=function(c,T){this.channels[c].setHandler(T)},w.addData=function(c,T){var y,v,N,B=!1;this.logger.time=c;for(var O=0;O ("+f([v,N])+")"),y=this.parseCmd(v,N),y||(y=this.parseMidrow(v,N)),y||(y=this.parsePAC(v,N)),y||(y=this.parseBackgroundAttributes(v,N)),!y&&(B=this.parseChars(v,N),B)){var j=this.currentChannel;if(j&&j>0){var P=this.channels[j];P.insertChars(B)}else this.logger.log(l.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!B&&this.logger.log(l.WARNING,"Couldn't parse cleaned data "+f([v,N])+" orig: "+f([T[O],T[O+1]]))}},w.parseCmd=function(c,T){var y=this.cmdHistory,v=(c===20||c===28||c===21||c===29)&&T>=32&&T<=47,N=(c===23||c===31)&&T>=33&&T<=35;if(!(v||N))return!1;if(L(c,T,y))return S(null,null,y),this.logger.log(l.DEBUG,"Repeated command ("+f([c,T])+") is dropped"),!0;var B=c===20||c===21||c===23?1:2,O=this.channels[B];return c===20||c===21||c===28||c===29?T===32?O.ccRCL():T===33?O.ccBS():T===34?O.ccAOF():T===35?O.ccAON():T===36?O.ccDER():T===37?O.ccRU(2):T===38?O.ccRU(3):T===39?O.ccRU(4):T===40?O.ccFON():T===41?O.ccRDC():T===42?O.ccTR():T===43?O.ccRTD():T===44?O.ccEDM():T===45?O.ccCR():T===46?O.ccENM():T===47&&O.ccEOC():O.ccTO(T-32),S(c,T,y),this.currentChannel=B,!0},w.parseMidrow=function(c,T){var y=0;if((c===17||c===25)&&T>=32&&T<=47){if(c===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(l.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[y];return v?(v.ccMIDROW(T),this.logger.log(l.DEBUG,"MIDROW ("+f([c,T])+")"),!0):!1}return!1},w.parsePAC=function(c,T){var y,v=this.cmdHistory,N=(c>=17&&c<=23||c>=25&&c<=31)&&T>=64&&T<=127,B=(c===16||c===24)&&T>=64&&T<=95;if(!(N||B))return!1;if(L(c,T,v))return S(null,null,v),!0;var O=c<=23?1:2;T>=64&&T<=95?y=O===1?i[c]:g[c]:y=O===1?D[c]:m[c];var j=this.channels[O];return j?(j.setPAC(this.interpretPAC(y,T)),S(c,T,v),this.currentChannel=O,!0):!1},w.interpretPAC=function(c,T){var y,v={color:null,italics:!1,indent:null,underline:!1,row:c};return T>95?y=T-96:y=T-64,v.underline=(y&1)===1,y<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((y-16)/2)*4,v},w.parseChars=function(c,T){var y,v=null,N=null;if(c>=25?(y=2,N=c-8):(y=1,N=c),N>=17&&N<=19){var B;N===17?B=T+80:N===18?B=T+112:B=T+144,this.logger.log(l.INFO,"Special char '"+U(B)+"' in channel "+y),v=[B]}else c>=32&&c<=127&&(v=T===0?[c]:[c,T]);if(v){var O=f(v);this.logger.log(l.DEBUG,"Char codes = "+O.join(",")),S(c,T,this.cmdHistory)}return v},w.parseBackgroundAttributes=function(c,T){var y=(c===16||c===24)&&T>=32&&T<=47,v=(c===23||c===31)&&T>=45&&T<=47;if(!(y||v))return!1;var N,B={};c===16||c===24?(N=Math.floor((T-32)/2),B.background=p[N],T%2===1&&(B.background=B.background+"_semi")):T===45?B.background="transparent":(B.foreground="black",T===47&&(B.underline=!0));var O=c<=23?1:2,j=this.channels[O];return j.setBkgData(B),S(c,T,this.cmdHistory),!0},w.reset=function(){for(var c=0;c=16?h--:h++;var S=Object(X.fixLineBreaks)(s.trim()),L=Object(F.generateCueId)(g,m,S);(!D||!D.cues||!D.cues.getCueById(L))&&(f=new a(g,m,S),f.id=L,f.line=A+1,f.align="left",f.position=10+Math.min(80,Math.floor(h*8/32)*10),l.push(f))}return D&&l.length&&(l.sort(function(R,C){return R.line==="auto"||C.line==="auto"?0:R.line>8&&C.line>8?C.line-R.line:R.line-C.line}),l.forEach(function(R){return Object(U.addCueToTrack)(D,R)})),l}};$.default=W},"./src/utils/discontinuities.ts":function(ie,$,M){"use strict";M.r($),M.d($,"findFirstFragWithCC",function(){return G}),M.d($,"shouldAlignOnDiscontinuities",function(){return W}),M.d($,"findDiscontinuousReferenceFrag",function(){return i}),M.d($,"adjustSlidingStart",function(){return g}),M.d($,"alignStream",function(){return m}),M.d($,"alignPDT",function(){return l}),M.d($,"alignFragmentByPDTDelta",function(){return u}),M.d($,"alignMediaPlaylistByPDT",function(){return f});var X=M("./src/polyfills/number.ts"),F=M("./src/utils/logger.ts"),U=M("./src/controller/level-helper.ts");function G(o,h){for(var s=null,a=0,A=o.length;as.startCC||o&&o.cc=this.minWeight_},G.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},G.destroy=function(){},U}();$.default=F},"./src/utils/ewma.ts":function(ie,$,M){"use strict";M.r($);var X=function(){function F(G,W,i){W===void 0&&(W=0),i===void 0&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=G,this.alpha_=G?Math.exp(Math.log(.5)/G):0,this.estimate_=W,this.totalWeight_=i}var U=F.prototype;return U.sample=function(W,i){var D=Math.pow(this.alpha_,W);this.estimate_=i*(1-D)+D*this.estimate_,this.totalWeight_+=W},U.getTotalWeight=function(){return this.totalWeight_},U.getEstimate=function(){if(this.alpha_){var W=1-Math.pow(this.alpha_,this.totalWeight_);if(W)return this.estimate_/W}return this.estimate_},F}();$.default=X},"./src/utils/fetch-loader.ts":function(ie,$,M){"use strict";M.r($),M.d($,"fetchSupported",function(){return u});var X=M("./src/polyfills/number.ts"),F=M("./src/loader/load-stats.ts"),U=M("./src/demux/chunk-cache.ts");function G(a,A){a.prototype=Object.create(A.prototype),a.prototype.constructor=a,m(a,A)}function W(a){var A=typeof Map=="function"?new Map:void 0;return W=function(S){if(S===null||!g(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A!="undefined"){if(A.has(S))return A.get(S);A.set(S,L)}function L(){return i(S,arguments,p(this).constructor)}return L.prototype=Object.create(S.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),m(L,S)},W(a)}function i(a,A,_){return D()?i=Reflect.construct:i=function(L,R,C){var w=[null];w.push.apply(w,R);var x=Function.bind.apply(L,w),c=new x;return C&&m(c,C.prototype),c},i.apply(null,arguments)}function D(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function g(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function m(a,A){return m=Object.setPrototypeOf||function(S,L){return S.__proto__=L,S},m(a,A)}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},p(a)}function l(){return l=Object.assign||function(a){for(var A=1;A=C&&w(L,R,x.flush(),S)):w(L,R,N,S),y()}).catch(function(){return Promise.reject()})};return T()},a}();function o(a,A){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:A,headers:new self.Headers(l({},a.headers))};return a.rangeEnd&&_.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),_}function h(a,A){return new self.Request(a.url,A)}var s=function(a){G(A,a);function A(_,S,L){var R;return R=a.call(this,_)||this,R.code=void 0,R.details=void 0,R.code=S,R.details=L,R}return A}(W(Error));$.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ie,$,M){"use strict";M.r($),M.d($,"IMSC1_CODEC",function(){return g}),M.d($,"parseIMSC1",function(){return u});var X=M("./src/utils/mp4-tools.ts"),F=M("./src/utils/vttparser.ts"),U=M("./src/utils/vttcue.ts"),G=M("./src/demux/id3.ts"),W=M("./src/utils/timescale-conversion.ts"),i=M("./src/utils/webvtt-parser.ts");function D(){return D=Object.assign||function(C){for(var w=1;w"):X}function W(g){for(var m=arguments.length,p=new Array(m>1?m-1:0),l=1;l>24,A[_+1]=S>>16&255,A[_+2]=S>>8&255,A[_+3]=S&255}function m(A,_){var S=[];if(!_.length)return S;var L,R,C;"data"in A?(L=A.data,R=A.start,C=A.end):(L=A,R=0,C=L.byteLength);for(var w=R;w1?w+x:C;if(c===_[0])if(_.length===1)S.push({data:L,start:w+8,end:T});else{var y=m({data:L,start:w+8,end:T},_.slice(1));y.length&&G.apply(S,y)}w=T}return S}function p(A){var _=m(A,["moov"]),S=_[0],L=S?S.end:null,R=m(A,["sidx"]);if(!R||!R[0])return null;var C=[],w=R[0],x=w.data[0],c=x===0?8:16,T=D(w,c);c+=4;var y=0,v=0;x===0?c+=8:c+=16,c+=2;var N=w.end+v,B=i(w,c);c+=2;for(var O=0;O>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=D(w,j);j+=4,C.push({referenceSize:b,subsegmentDuration:ee,info:{duration:ee/T,start:N,end:N+b-1}}),N+=b,j+=4,c=j}return{earliestPresentationTime:y,timescale:T,version:x,referencesCount:B,references:C,moovEndOffset:L}}function l(A){for(var _=[],S=m(A,["moov","trak"]),L=0;LW)&&(this.startTime=W),this.endTime=i,this.screen=D,this.timelineController.createCaptionsTrack(this.trackName)},U.reset=function(){this.cueRanges=[]},F}()},"./src/utils/texttrack-utils.ts":function(ie,$,M){"use strict";M.r($),M.d($,"sendAddTrackEvent",function(){return F}),M.d($,"addCueToTrack",function(){return U}),M.d($,"clearCurrentCues",function(){return G}),M.d($,"removeCuesInRange",function(){return W}),M.d($,"getCuesInRange",function(){return D});var X=M("./src/utils/logger.ts");function F(g,m){var p;try{p=new Event("addtrack")}catch(l){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=g,m.dispatchEvent(p)}function U(g,m){var p=g.mode;if(p==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(m.id))try{if(g.addCue(m),!g.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(u){X.logger.debug("[texttrack-utils]: "+u);var l=new self.TextTrackCue(m.startTime,m.endTime,m.text);l.id=m.id,g.addCue(l)}p==="disabled"&&(g.mode=p)}function G(g){var m=g.mode;if(m==="disabled"&&(g.mode="hidden"),g.cues)for(var p=g.cues.length;p--;)g.removeCue(g.cues[p]);m==="disabled"&&(g.mode=m)}function W(g,m,p){var l=g.mode;if(l==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var u=D(g.cues,m,p),f=0;fg[p].endTime)return-1;for(var l=0,u=p;l<=u;){var f=Math.floor((u+l)/2);if(mg[f].startTime&&l-1)for(var f=u,o=g.length;f=m&&h.endTime<=p)l.push(h);else if(h.startTime>p)return l}return l}},"./src/utils/time-ranges.ts":function(ie,$,M){"use strict";M.r($);var X={toString:function(U){for(var G="",W=U.length,i=0;i1?m-1:0),l=1;l100)throw new Error("Position must be between 0 and 100.");C=y,this.hasBeenReset=!0}})),Object.defineProperty(l,"positionAlign",i({},u,{get:function(){return w},set:function(y){var v=W(y);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");w=v,this.hasBeenReset=!0}})),Object.defineProperty(l,"size",i({},u,{get:function(){return x},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");x=y,this.hasBeenReset=!0}})),Object.defineProperty(l,"align",i({},u,{get:function(){return c},set:function(y){var v=W(y);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");c=v,this.hasBeenReset=!0}})),l.displayState=void 0}return D.prototype.getCueAsHTML=function(){var g=self.WebVTT;return g.convertCueToDOMTree(self,this.text)},D}()},"./src/utils/vttparser.ts":function(ie,$,M){"use strict";M.r($),M.d($,"parseTimeStamp",function(){return U}),M.d($,"fixLineBreaks",function(){return m}),M.d($,"VTTParser",function(){return p});var X=M("./src/utils/vttcue.ts"),F=function(){function l(){}var u=l.prototype;return u.decode=function(o,h){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},l}();function U(l){function u(o,h,s,a){return(o|0)*3600+(h|0)*60+(s|0)+parseFloat(a||0)}var f=l.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?u(f[2],f[3],0,f[4]):u(f[1],f[2],f[3],f[4]):null}var G=function(){function l(){this.values=Object.create(null)}var u=l.prototype;return u.set=function(o,h){!this.get(o)&&h!==""&&(this.values[o]=h)},u.get=function(o,h,s){return s?this.has(o)?this.values[o]:h[s]:this.has(o)?this.values[o]:h},u.has=function(o){return o in this.values},u.alt=function(o,h,s){for(var a=0;a=0&&s<=100)return this.set(o,s),!0}return!1},l}();function W(l,u,f,o){var h=o?l.split(o):[l];for(var s in h){if(typeof h[s]!="string")continue;var a=h[s].split(f);if(a.length!==2)continue;var A=a[0],_=a[1];u(A,_)}}var i=new X.default(0,0,""),D=i.align==="middle"?"middle":"center";function g(l,u,f){var o=l;function h(){var A=U(l);if(A===null)throw new Error("Malformed timestamp: "+o);return l=l.replace(/^[^\sa-zA-Z-]+/,""),A}function s(A,_){var S=new G;W(A,function(C,w){var x;switch(C){case"region":for(var c=f.length-1;c>=0;c--)if(f[c].id===w){S.set(C,f[c].region);break}break;case"vertical":S.alt(C,w,["rl","lr"]);break;case"line":x=w.split(","),S.integer(C,x[0]),S.percent(C,x[0])&&S.set("snapToLines",!1),S.alt(C,x[0],["auto"]),x.length===2&&S.alt("lineAlign",x[1],["start",D,"end"]);break;case"position":x=w.split(","),S.percent(C,x[0]),x.length===2&&S.alt("positionAlign",x[1],["start",D,"end","line-left","line-right","auto"]);break;case"size":S.percent(C,w);break;case"align":S.alt(C,w,["start",D,"end","left","right"]);break}},/:/,/\s/),_.region=S.get("region",null),_.vertical=S.get("vertical","");var L=S.get("line","auto");L==="auto"&&i.line===-1&&(L=-1),_.line=L,_.lineAlign=S.get("lineAlign","start"),_.snapToLines=S.get("snapToLines",!0),_.size=S.get("size",100),_.align=S.get("align",D);var R=S.get("position","auto");R==="auto"&&i.position===50&&(R=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=R}function a(){l=l.replace(/^\s+/,"")}if(a(),u.startTime=h(),a(),l.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);l=l.substr(3),a(),u.endTime=h(),a(),s(l,u)}function m(l){return l.replace(//gi,` `)}var p=function(){function l(){this.state="INITIAL",this.buffer="",this.decoder=new F,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var u=l.prototype;return u.parse=function(o){var h=this;o&&(h.buffer+=h.decoder.decode(o,{stream:!0}));function s(){var R=h.buffer,C=0;for(R=m(R);C9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(X.isFiniteNumber)(h)||!Object(X.isFiniteNumber)(s)||!Object(X.isFiniteNumber)(a)||!Object(X.isFiniteNumber)(A))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return h+=1e3*s,h+=60*1e3*a,h+=60*60*1e3*A,h},m=function(o){for(var h=5381,s=o.length;s;)h=h*33^o.charCodeAt(--s);return(h>>>0).toString()};function p(f,o,h){return m(f.toString())+m(o.toString())+m(h)}var l=function(o,h,s){var a=o[h],A=o[a.prevCC];if(!A||!A.new&&a.new){o.ccOffset=o.presentationOffset=a.start,a.new=!1;return}for(;(_=A)!==null&&_!==void 0&&_.new;){var _;o.ccOffset+=a.start-A.start,a.new=!1,a=A,A=o[a.prevCC]}o.presentationOffset=s};function u(f,o,h,s,a,A,_,S){var L=new F.VTTParser,R=Object(U.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(i,` `).split(` `),C=[],w=Object(G.toMpegTsClockFromTimescale)(o,h),x="00:00.000",c=0,T=0,y,v=!0,N=!1;L.oncue=function(B){var O=s[a],j=s.ccOffset,P=(c-w)/9e4;if(O!=null&&O.new&&(T!==void 0?j=s.ccOffset=O.start:l(s,a,P)),P&&(j=P-s.presentationOffset),N){var b=B.endTime-B.startTime,Y=Object(W.normalizePts)((B.startTime+j-T)*9e4,A*9e4)/9e4;B.startTime=Y,B.endTime=Y+b}var ee=B.text.trim();B.text=decodeURIComponent(encodeURIComponent(ee)),B.id||(B.id=p(B.startTime,B.endTime,ee)),B.endTime>0&&C.push(B)},L.onparsingerror=function(B){y=B},L.onflush=function(){if(y){S(y);return}_(C)},R.forEach(function(B){if(v)if(D(B,"X-TIMESTAMP-MAP=")){v=!1,N=!0,B.substr(16).split(",").forEach(function(O){D(O,"LOCAL:")?x=O.substr(6):D(O,"MPEGTS:")&&(c=parseInt(O.substr(7)))});try{T=g(x)/1e3}catch(O){N=!1,y=O}return}else B===""&&(v=!1);L.parse(B+` -`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(ie,$,M){"use strict";M.r($);var X=M("./src/utils/logger.ts"),F=M("./src/loader/load-stats.ts"),U=/^age:\s*[\d.]+\s*$/m,G=function(){function W(D){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=D?D.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var i=W.prototype;return i.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},i.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},i.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},i.load=function(g,m,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=m,this.callbacks=p,this.retryDelay=m.retryDelay,this.loadInternal()},i.loadInternal=function(){var g=this.config,m=this.context;if(!g)return;var p=this.loader=new self.XMLHttpRequest,l=this.stats;l.loading.first=0,l.loaded=0;var u=this.xhrSetup;try{if(u)try{u(p,m.url)}catch(h){p.open("GET",m.url,!0),u(p,m.url)}p.readyState||p.open("GET",m.url,!0);var f=this.context.headers;if(f)for(var o in f)p.setRequestHeader(o,f[o])}catch(h){this.callbacks.onError({code:p.status,text:h.message},m,p);return}m.rangeEnd&&p.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),p.send()},i.readystatechange=function(){var g=this.context,m=this.loader,p=this.stats;if(!g||!m)return;var l=m.readyState,u=this.config;if(p.aborted)return;if(l>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),l===4){m.onreadystatechange=null,m.onprogress=null;var f=m.status;if(f>=200&&f<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var o,h;if(g.responseType==="arraybuffer"?(o=m.response,h=o.byteLength):(o=m.responseText,h=o.length),p.loaded=p.total=h,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,g,o,m),!this.callbacks)return;var a={url:m.responseURL,data:o};this.callbacks.onSuccess(a,p,g,m)}else p.retry>=u.maxRetry||f>=400&&f<499?(X.logger.error(f+" while loading "+g.url),this.callbacks.onError({code:f,text:m.statusText},g,m)):(X.logger.warn(f+" while loading "+g.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout)},i.loadtimeout=function(){X.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},i.loadprogress=function(g){var m=this.stats;m.loaded=g.loaded,g.lengthComputable&&(m.total=g.total)},i.getCacheAge=function(){var g=null;if(this.loader&&U.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");g=m?parseFloat(m):null}return g},W}();$.default=G}}).default})},vHTk:function(st,be,Q){st.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKdk:function(st,be,Q){"use strict";Q.r(be);var ie=Q("+L6B"),$=Q("2/Rp"),M=Q("6UJt"),X=Q("DFOY"),F=Q("/zsF"),U=Q("PArb"),G=Q("5NDa"),W=Q("5rEg"),i=Q("OaEy"),D=Q("2fM7"),g=Q("14J3"),m=Q("BMrR"),p=Q("jCWc"),l=Q("kPKH"),u=Q("sPJy"),f=Q("bE4q"),o=Q("miYZ"),h=Q("tsqr"),s=Q("k1fw"),a=Q("9og8"),A=Q("y8nQ"),_=Q("Vl3Y"),S=Q("tJVT"),L=Q("PpiC"),R=Q("B9cy"),C=Q("Ol7k"),w=Q("lUTK"),x=Q("BvKs"),c=Q("WmNS"),T=Q.n(c),y=Q("q1tI"),v=Q.n(y),N=Q("Ot1p"),B=Q("Ty5D"),O=Q("9kvl"),j=Q("55Ip"),P=Q("gJ3r"),b=Q("eYnf"),Y=Q.n(b),ee=x.a.SubMenu,le=C.a.Content,ue=C.a.Sider,ke=function(Ce){var ce,pe,se,ae,Oe,Te,Ne,De,We=Ce.graduation,Le=Ce.globalSetting,Be=Ce.loading,Ge=Ce.user,oe=Ce.dispatch,ye=Object(L.a)(Ce,["graduation","globalSetting","loading","user","dispatch"]),we=Object(B.i)(),Ae=Object(B.h)(),Ue=Ge.userInfo,Ve=_.a.useForm(),Ze=Object(S.a)(Ve,1),$e=Ze[0],tt=We.editTopicData,et=function(){var Je=Object(a.a)(T.a.mark(function Me(){var ut,nt,Fe;return T.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ut=$e.getFieldsValue(),nt=Object(s.a)({},ut),nt.city&&(nt.province=nt.city[0],nt.city=nt.city[1]),Ee.next=5,oe({type:"graduation/editTopic",payload:{categoryId:we.categoryId,coursesId:we.coursesId,attachment_ids:[],graduation_topic:nt}});case 5:Fe=Ee.sent,Fe.status?h.b.error(Fe.message):O.d.push("/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id));case 7:case"end":return Ee.stop()}},Me)}));return function(){return Je.apply(this,arguments)}}();return Object(y.useEffect)(function(){function Je(){return Me.apply(this,arguments)}function Me(){return Me=Object(a.a)(T.a.mark(function ut(){var nt,Fe;return T.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.next=2,oe({type:"graduation/editTopicDefaultData",payload:Object(s.a)({},we)});case 2:nt=Ee.sent,Fe=Object(s.a)({},nt.selected_data),Fe.city=[Fe.province,Fe.city],$e.setFieldsValue(Fe);case 6:case"end":return Ee.stop()}},ut)})),Me.apply(this,arguments)}Je()},[we.coursesId]),v.a.createElement("section",{className:"edu-container"},v.a.createElement("section",{className:"animated fadeIn"},v.a.createElement("aside",{className:"mt10"},Ue&&v.a.createElement(f.a,{separator:">"},v.a.createElement(f.a.Item,null,v.a.createElement(j.a,{to:"".concat(Ue.first_category_url)},Ue==null||((ce=Ue.course)===null||ce===void 0)?void 0:ce.course_name)),v.a.createElement(f.a.Item,null,v.a.createElement(j.a,{to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id)},"\u6BD5\u8BBE\u9009\u9898")),v.a.createElement(f.a.Item,null,"\u7F16\u8F91"))),v.a.createElement("aside",{className:[Y.a.title,"mt20"].join(" ")},v.a.createElement(m.a,{style:{width:"100%"}},v.a.createElement(l.a,{flex:"1"},v.a.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u6BD5\u8BBE\u9009\u9898")),v.a.createElement(l.a,null,v.a.createElement(j.a,{className:"font16 c-light-black",to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id)},"\u8FD4\u56DE"))))),v.a.createElement("section",{className:[Y.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},v.a.createElement(_.a,{layout:"vertical",form:$e,scrollToFirstError:!0,initialValues:tt==null?void 0:tt.selected_data,onFinish:function(){var Je=Object(a.a)(T.a.mark(function Me(ut){return T.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:et();case 1:case"end":return Fe.stop()}},Me)}));return function(Me){return Je.apply(this,arguments)}}()},v.a.createElement(_.a.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(pe=tt.teacher_list)===null||pe===void 0?void 0:pe.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)}))),v.a.createElement(_.a.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},v.a.createElement(W.a,{maxLength:60,size:"large",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),v.a.createElement(U.a,null),v.a.createElement(_.a.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},v.a.createElement(N.a,{watch:!0,defaultValue:(se=tt.selected_data)===null||se===void 0?void 0:se.description,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),v.a.createElement(m.a,{gutter:[20,0]},v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_type"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(ae=tt.topic_type)===null||ae===void 0?void 0:ae.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_source"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(Oe=tt.topic_source)===null||Oe===void 0?void 0:Oe.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_property_first"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(Te=tt.topic_property_first)===null||Te===void 0?void 0:Te.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_property_second"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(Ne=tt.topic_property_second)===null||Ne===void 0?void 0:Ne.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"150px"})),v.a.createElement(U.a,null),v.a.createElement(_.a.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},v.a.createElement(W.a,{width:"200",size:"large",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),v.a.createElement(_.a.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(De=tt.topic_repeat)===null||De===void 0?void 0:De.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)}))),v.a.createElement(_.a.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},v.a.createElement(X.a,{size:"large",style:{width:200},options:P.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),v.a.createElement("aside",{className:Y.a.btns},v.a.createElement($.a,{type:"primary",onClick:function(){$e.submit()}},"\u4FDD\u5B58"),v.a.createElement(j.a,{to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(we.categoryId)},"\u53D6\u6D88")))};be.default=Object(O.a)(function(Se){var Ce=Se.graduation,ce=Se.loading,pe=Se.user,se=Se.globalSetting;return{graduation:Ce,globalSetting:se,user:pe,loading:ce.effects}})(ke)}}]); +`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(ie,$,M){"use strict";M.r($);var X=M("./src/utils/logger.ts"),F=M("./src/loader/load-stats.ts"),U=/^age:\s*[\d.]+\s*$/m,G=function(){function W(D){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=D?D.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var i=W.prototype;return i.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},i.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},i.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},i.load=function(g,m,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=m,this.callbacks=p,this.retryDelay=m.retryDelay,this.loadInternal()},i.loadInternal=function(){var g=this.config,m=this.context;if(!g)return;var p=this.loader=new self.XMLHttpRequest,l=this.stats;l.loading.first=0,l.loaded=0;var u=this.xhrSetup;try{if(u)try{u(p,m.url)}catch(h){p.open("GET",m.url,!0),u(p,m.url)}p.readyState||p.open("GET",m.url,!0);var f=this.context.headers;if(f)for(var o in f)p.setRequestHeader(o,f[o])}catch(h){this.callbacks.onError({code:p.status,text:h.message},m,p);return}m.rangeEnd&&p.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),p.send()},i.readystatechange=function(){var g=this.context,m=this.loader,p=this.stats;if(!g||!m)return;var l=m.readyState,u=this.config;if(p.aborted)return;if(l>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),l===4){m.onreadystatechange=null,m.onprogress=null;var f=m.status;if(f>=200&&f<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var o,h;if(g.responseType==="arraybuffer"?(o=m.response,h=o.byteLength):(o=m.responseText,h=o.length),p.loaded=p.total=h,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,g,o,m),!this.callbacks)return;var a={url:m.responseURL,data:o};this.callbacks.onSuccess(a,p,g,m)}else p.retry>=u.maxRetry||f>=400&&f<499?(X.logger.error(f+" while loading "+g.url),this.callbacks.onError({code:f,text:m.statusText},g,m)):(X.logger.warn(f+" while loading "+g.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout)},i.loadtimeout=function(){X.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},i.loadprogress=function(g){var m=this.stats;m.loaded=g.loaded,g.lengthComputable&&(m.total=g.total)},i.getCacheAge=function(){var g=null;if(this.loader&&U.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");g=m?parseFloat(m):null}return g},W}();$.default=G}}).default})},vHTk:function(st,be,Q){st.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKdk:function(st,be,Q){"use strict";Q.r(be);var ie=Q("+L6B"),$=Q("2/Rp"),M=Q("6UJt"),X=Q("DFOY"),F=Q("/zsF"),U=Q("PArb"),G=Q("5NDa"),W=Q("5rEg"),i=Q("OaEy"),D=Q("2fM7"),g=Q("14J3"),m=Q("BMrR"),p=Q("jCWc"),l=Q("kPKH"),u=Q("sPJy"),f=Q("bE4q"),o=Q("miYZ"),h=Q("tsqr"),s=Q("k1fw"),a=Q("9og8"),A=Q("y8nQ"),_=Q("Vl3Y"),S=Q("tJVT"),L=Q("PpiC"),R=Q("B9cy"),C=Q("Ol7k"),w=Q("lUTK"),x=Q("BvKs"),c=Q("WmNS"),T=Q.n(c),y=Q("q1tI"),v=Q.n(y),N=Q("Ot1p"),B=Q("Ty5D"),O=Q("9kvl"),j=Q("55Ip"),P=Q("gJ3r"),b=Q("eYnf"),Y=Q.n(b),ee=x.a.SubMenu,le=C.a.Content,ue=C.a.Sider,ke=function(Ce){var ce,pe,se,ae,Oe,Te,Ne,De,We=Ce.graduation,Le=Ce.globalSetting,Be=Ce.loading,Ge=Ce.user,oe=Ce.dispatch,ye=Object(L.a)(Ce,["graduation","globalSetting","loading","user","dispatch"]),we=Object(B.i)(),Ae=Object(B.h)(),Ue=Ge.userInfo,Ve=_.a.useForm(),Ze=Object(S.a)(Ve,1),$e=Ze[0],tt=We.editTopicData,et=function(){var Je=Object(a.a)(T.a.mark(function Me(){var ut,rt,Fe;return T.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ut=$e.getFieldsValue(),rt=Object(s.a)({},ut),rt.city&&(rt.province=rt.city[0],rt.city=rt.city[1]),Ee.next=5,oe({type:"graduation/editTopic",payload:{categoryId:we.categoryId,coursesId:we.coursesId,attachment_ids:[],graduation_topic:rt}});case 5:Fe=Ee.sent,Fe.status?h.b.error(Fe.message):O.d.push("/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id));case 7:case"end":return Ee.stop()}},Me)}));return function(){return Je.apply(this,arguments)}}();return Object(y.useEffect)(function(){function Je(){return Me.apply(this,arguments)}function Me(){return Me=Object(a.a)(T.a.mark(function ut(){var rt,Fe;return T.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.next=2,oe({type:"graduation/editTopicDefaultData",payload:Object(s.a)({},we)});case 2:rt=Ee.sent,Fe=Object(s.a)({},rt.selected_data),Fe.city=[Fe.province,Fe.city],$e.setFieldsValue(Fe);case 6:case"end":return Ee.stop()}},ut)})),Me.apply(this,arguments)}Je()},[we.coursesId]),v.a.createElement("section",{className:"edu-container"},v.a.createElement("section",{className:"animated fadeIn"},v.a.createElement("aside",{className:"mt10"},Ue&&v.a.createElement(f.a,{separator:">"},v.a.createElement(f.a.Item,null,v.a.createElement(j.a,{to:"".concat(Ue.first_category_url)},Ue==null||((ce=Ue.course)===null||ce===void 0)?void 0:ce.course_name)),v.a.createElement(f.a.Item,null,v.a.createElement(j.a,{to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id)},"\u6BD5\u8BBE\u9009\u9898")),v.a.createElement(f.a.Item,null,"\u7F16\u8F91"))),v.a.createElement("aside",{className:[Y.a.title,"mt20"].join(" ")},v.a.createElement(m.a,{style:{width:"100%"}},v.a.createElement(l.a,{flex:"1"},v.a.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u6BD5\u8BBE\u9009\u9898")),v.a.createElement(l.a,null,v.a.createElement(j.a,{className:"font16 c-light-black",to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(tt.left_banner_id)},"\u8FD4\u56DE"))))),v.a.createElement("section",{className:[Y.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},v.a.createElement(_.a,{layout:"vertical",form:$e,scrollToFirstError:!0,initialValues:tt==null?void 0:tt.selected_data,onFinish:function(){var Je=Object(a.a)(T.a.mark(function Me(ut){return T.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:et();case 1:case"end":return Fe.stop()}},Me)}));return function(Me){return Je.apply(this,arguments)}}()},v.a.createElement(_.a.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(pe=tt.teacher_list)===null||pe===void 0?void 0:pe.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)}))),v.a.createElement(_.a.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},v.a.createElement(W.a,{maxLength:60,size:"large",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),v.a.createElement(U.a,null),v.a.createElement(_.a.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},v.a.createElement(N.a,{watch:!0,defaultValue:(se=tt.selected_data)===null||se===void 0?void 0:se.description,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),v.a.createElement(m.a,{gutter:[20,0]},v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_type"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(ae=tt.topic_type)===null||ae===void 0?void 0:ae.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_source"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(Oe=tt.topic_source)===null||Oe===void 0?void 0:Oe.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_property_first"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(Te=tt.topic_property_first)===null||Te===void 0?void 0:Te.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"1"},v.a.createElement(_.a.Item,{name:"topic_property_second"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(Ne=tt.topic_property_second)===null||Ne===void 0?void 0:Ne.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)})))),v.a.createElement(l.a,{flex:"150px"})),v.a.createElement(U.a,null),v.a.createElement(_.a.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},v.a.createElement(W.a,{width:"200",size:"large",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),v.a.createElement(_.a.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},v.a.createElement(D.a,{size:"large",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(De=tt.topic_repeat)===null||De===void 0?void 0:De.map(function(Je,Me){return v.a.createElement(D.a.Option,{value:Je.id,key:Me},Je.name)}))),v.a.createElement(_.a.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},v.a.createElement(X.a,{size:"large",style:{width:200},options:P.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),v.a.createElement("aside",{className:Y.a.btns},v.a.createElement($.a,{type:"primary",onClick:function(){$e.submit()}},"\u4FDD\u5B58"),v.a.createElement(j.a,{to:"/classrooms/".concat(we.coursesId,"/graduation_topics/").concat(we.categoryId)},"\u53D6\u6D88")))};be.default=Object(O.a)(function(Se){var Ce=Se.graduation,ce=Se.loading,pe=Se.user,se=Se.globalSetting;return{graduation:Ce,globalSetting:se,user:pe,loading:ce.effects}})(ke)}}]); diff --git a/p__Terminal__.d36523fb.async.js b/p__Terminal__.4be2e7f8.async.js similarity index 90% rename from p__Terminal__.d36523fb.async.js rename to p__Terminal__.4be2e7f8.async.js index efd60cd97f..e65ad0a024 100644 --- a/p__Terminal__.d36523fb.async.js +++ b/p__Terminal__.4be2e7f8.async.js @@ -1,7 +1,7 @@ (window.webpackJsonp=window.webpackJsonp||[]).push([[254],{"07cG":function(Te,f,E){Te.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"1dTM":function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("GQ8N"),K=V(E("Lo0S")),U=E("VSMT"),x=E("GdRQ"),T=E("SZEN"),t=E("vewr"),c=L(E("YJ9k")),i=L(E("MZdM")),o=L(E("ItS6")),h=L(E("whVF")),r=L(E("Fv0C")),m=L(E("LCi9")),w=L(E("rwxt")),v=L(E("Mmt2")),d=L(E("iUHT")),n=L(E("mHUz")),b=L(E("P2ho")),g=E("NBmB");E("mdZa");var S=L(E("34/K")),A=L(E("hXwI")),O=L(E("SgaC")),R=L(E("3690")),B=L(E("8K/p")),F=L(E("xO64"));function L(Z){return Z&&Z.__esModule?Z:{default:Z}}function P(){if(typeof WeakMap!="function")return null;var Z=new WeakMap;return P=function(){return Z},Z}function V(Z){if(Z&&Z.__esModule)return Z;if(Z===null||Y(Z)!=="object"&&typeof Z!="function")return{default:Z};var z=P();if(z&&z.has(Z))return z.get(Z);var j={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in Z)if(Object.prototype.hasOwnProperty.call(Z,a)){var y=I?Object.getOwnPropertyDescriptor(Z,a):null;y&&(y.get||y.set)?Object.defineProperty(j,a,y):j[a]=Z[a]}return j.default=Z,z&&z.set(Z,j),j}function Y(Z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(j){return typeof j}:Y=function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},Y(Z)}function q(Z,z){if(!(Z instanceof z))throw new TypeError("Cannot call a class as a function")}function be(Z,z){for(var j=0;j> RFB.constructor"),s._screen=document.createElement("div"),s._screen.style.display="flex",s._screen.style.width="100%",s._screen.style.height="100%",s._screen.style.overflow="auto",s._screen.style.background=Me,s._canvas=document.createElement("canvas"),s._canvas.style.margin="auto",s._canvas.style.outline="none",s._canvas.style.flexShrink="0",s._canvas.width=0,s._canvas.height=0,s._canvas.tabIndex=-1,s._screen.appendChild(s._canvas),s._cursor=new w.default,s._cursorImage=j.cursors.none,s._decoders[g.encodings.encodingRaw]=new S.default,s._decoders[g.encodings.encodingCopyRect]=new A.default,s._decoders[g.encodings.encodingRRE]=new O.default,s._decoders[g.encodings.encodingHextile]=new R.default,s._decoders[g.encodings.encodingTight]=new B.default,s._decoders[g.encodings.encodingTightPNG]=new F.default;try{s._display=new i.default(s._canvas)}catch(C){throw K.Error("Display exception: "+C),C}return s._display.onflush=s._onFlush.bind(Fe(s)),s._keyboard=new r.default(s._canvas),s._keyboard.onkeyevent=s._handleKeyEvent.bind(Fe(s)),s._gestures=new m.default,s._sock=new v.default,s._sock.on("message",function(){s._handleMessage()}),s._sock.on("open",function(){s._rfbConnectionState==="connecting"&&s._rfbInitState===""?(s._rfbInitState="ProtocolVersion",K.Debug("Starting VNC handshake")):s._fail("Unexpected server connection while "+s._rfbConnectionState)}),s._sock.on("close",function(C){K.Debug("WebSocket on-close event");var te="";C.code&&(te="(code: "+C.code,C.reason&&(te+=", reason: "+C.reason),te+=")");switch(s._rfbConnectionState){case"connecting":s._fail("Connection closed "+te);break;case"connected":s._updateConnectionState("disconnecting"),s._updateConnectionState("disconnected");break;case"disconnecting":s._updateConnectionState("disconnected");break;case"disconnected":s._fail("Unexpected server disconnect when already disconnected "+te);break;default:s._fail("Unexpected server disconnect before connecting "+te);break}s._sock.off("close")}),s._sock.on("error",function(C){return K.Warn("WebSocket on-error event")}),setTimeout(s._updateConnectionState.bind(Fe(s),"connecting")),K.Debug("<< RFB.constructor"),s.dragViewport=!1,s.focusOnClick=!0,s._viewOnly=!1,s._clipViewport=!1,s._scaleViewport=!1,s._resizeSession=!1,s._showDotCursor=!1,y.showDotCursor!==void 0&&(K.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),s._showDotCursor=y.showDotCursor),s._qualityLevel=6,s._compressionLevel=2,s}return Ie(j,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(a){this._rfbCredentials=a,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;K.Info("Sending Ctrl-Alt-Del"),this.sendKey(n.default.XK_Control_L,"ControlLeft",!0),this.sendKey(n.default.XK_Alt_L,"AltLeft",!0),this.sendKey(n.default.XK_Delete,"Delete",!0),this.sendKey(n.default.XK_Delete,"Delete",!1),this.sendKey(n.default.XK_Alt_L,"AltLeft",!1),this.sendKey(n.default.XK_Control_L,"ControlLeft",!1)}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(a,y,s){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(s===void 0){this.sendKey(a,y,!0),this.sendKey(a,y,!1);return}var C=b.default[y];if(this._qemuExtKeyEventSupported&&C)a=a||0,K.Info("Sending key ("+(s?"down":"up")+"): keysym "+a+", scancode "+C),j.messages.QEMUExtendedKeyEvent(this._sock,a,s,C);else{if(!a)return;K.Info("Sending keysym ("+(s?"down":"up")+"): "+a),j.messages.keyEvent(this._sock,a,s?1:0)}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(a){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(this._clipboardServerCapabilitiesFormats[J]&&this._clipboardServerCapabilitiesActions[ne])this._clipboardText=a,j.messages.extendedClipboardNotify(this._sock,[J]);else{for(var y=new Uint8Array(a.length),s=0;s> RFB.connect"),K.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(a){a.name==="SyntaxError"?this._fail("Invalid host or port ("+a+")"):this._fail("Error when opening socket ("+a+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("touchstart",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),K.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){K.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(a){if(!(a.name==="NotFoundError"))throw a}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),K.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(a){if(!this.focusOnClick)return;this.focus()}},{key:"_setDesktopName",value:function(a){this._fbName=a,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(a){var y=this;window.requestAnimationFrame(function(){y._updateClip(),y._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var a=this._display.clipViewport,y=this._clipViewport;if(this._scaleViewport&&(y=!1),a!==y&&(this._display.clipViewport=y),y){var s=this._screenSize();this._display.viewportChangeSize(s.w,s.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var a=this._screenSize();this._display.autoscale(a.w,a.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;var a=this._screenSize();j.messages.setDesktopSize(this._sock,Math.floor(a.w),Math.floor(a.h),this._screenID,this._screenFlags),K.Debug("Requested new desktop size: "+a.w+"x"+a.h)}},{key:"_screenSize",value:function(){var a=this._screen.getBoundingClientRect();return{w:a.width,h:a.height}}},{key:"_fixScrollbars",value:function(){var a=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=a}},{key:"_updateConnectionState",value:function(a){var y=this,s=this._rfbConnectionState;if(a===s){K.Debug("Already in state '"+a+"', ignoring");return}if(s==="disconnected"){K.Error("Tried changing state of a disconnected RFB object");return}switch(a){case"connected":if(s!=="connecting"){K.Error("Bad transition to connected state, previous connection state: "+s);return}break;case"disconnected":if(s!=="disconnecting"){K.Error("Bad transition to disconnected state, previous connection state: "+s);return}break;case"connecting":if(s!==""){K.Error("Bad transition to connecting state, previous connection state: "+s);return}break;case"disconnecting":if(s!=="connected"&&s!=="connecting"){K.Error("Bad transition to disconnecting state, previous connection state: "+s);return}break;default:K.Error("Unknown connection state: "+a);return}this._rfbConnectionState=a,K.Debug("New state '"+a+"', was '"+s+"'."),this._disconnTimer&&a!=="disconnecting"&&(K.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close"));switch(a){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){K.Error("Disconnection timed out."),y._updateConnectionState("disconnected")},Ae*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(a){switch(this._rfbConnectionState){case"disconnecting":K.Error("Failed when disconnecting: "+a);break;case"connected":K.Error("Failed while connected: "+a);break;case"connecting":K.Error("Failed when connecting: "+a);break;default:K.Error("RFB failure: "+a);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(a,y){this._capabilities[a]=y,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){K.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":K.Error("Got data while disconnected");break;case"connected":for(;!this._flushing;){if(!this._normalMsg())break;if(this._sock.rQlen===0)break}break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(a,y,s){this.sendKey(a,y,s)}},{key:"_handleMouse",value:function(a){if(a.type==="click"&&a.target!==this._canvas)return;if(a.stopPropagation(),a.preventDefault(),a.type==="click"||a.type==="contextmenu")return;var y=(0,T.clientToElement)(a.clientX,a.clientY,this._canvas);switch(a.type){case"mousedown":(0,t.setCapture)(this._canvas),this._handleMouseButton(y.x,y.y,!0,1<x.dragThreshold||Math.abs(te)>x.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:a,y},this._display.viewportChangePos(C,te));return}if(this._mousePos={x:a,y},this._mouseMoveTimer==null){var ue=Date.now()-this._mouseLastMoveTime;ue>We?(this._sendMouse(a,y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){s._handleDelayedMouseMove()},We-ue)}}},{key:"_handleDelayedMouseMove",value:function(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}},{key:"_sendMouse",value:function(a,y,s){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;j.messages.pointerEvent(this._sock,this._display.absX(a),this._display.absY(y),s)}},{key:"_handleWheel",value:function(a){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;a.stopPropagation(),a.preventDefault();var y=(0,T.clientToElement)(a.clientX,a.clientY,this._canvas),s=a.deltaX,C=a.deltaY;a.deltaMode!==0&&(s*=ze,C*=ze),this._accumulatedWheelDeltaX+=s,this._accumulatedWheelDeltaY+=C,Math.abs(this._accumulatedWheelDeltaX)>=je&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(y.x,y.y,!0,1<<5),this._handleMouseButton(y.x,y.y,!1,1<<5)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(y.x,y.y,!0,1<<6),this._handleMouseButton(y.x,y.y,!1,1<<6)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=je&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(y.x,y.y,!0,1<<3),this._handleMouseButton(y.x,y.y,!1,1<<3)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(y.x,y.y,!0,1<<4),this._handleMouseButton(y.x,y.y,!1,1<<4)),this._accumulatedWheelDeltaY=0)}},{key:"_fakeMouseMove",value:function(a,y,s){this._handleMouseMove(y,s),this._cursor.move(a.detail.clientX,a.detail.clientY)}},{key:"_handleTapEvent",value:function(a,y){var s=(0,T.clientToElement)(a.detail.clientX,a.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTimeye;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeY+=ye;for(;a.detail.magnitudeY-this._gestureLastMagnitudeY<-ye;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeY-=ye;for(;a.detail.magnitudeX-this._gestureLastMagnitudeX>ye;)this._handleMouseButton(s.x,s.y,!0,32),this._handleMouseButton(s.x,s.y,!1,32),this._gestureLastMagnitudeX+=ye;for(;a.detail.magnitudeX-this._gestureLastMagnitudeX<-ye;)this._handleMouseButton(s.x,s.y,!0,64),this._handleMouseButton(s.x,s.y,!1,64),this._gestureLastMagnitudeX-=ye;break;case"pinch":if(this._fakeMouseMove(a,s.x,s.y),y=Math.hypot(a.detail.magnitudeX,a.detail.magnitudeY),Math.abs(y-this._gestureLastMagnitudeX)>oe){for(this._handleKeyEvent(n.default.XK_Control_L,"ControlLeft",!0);y-this._gestureLastMagnitudeX>oe;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeX+=oe;for(;y-this._gestureLastMagnitudeX<-oe;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeX-=oe}this._handleKeyEvent(n.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(a.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(a,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,1);break;case"longpress":this._fakeMouseMove(a,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var a=this._sock.rQshiftStr(12).substr(4,7);K.Info("Server ProtocolVersion: "+a);var y=0;switch(a){case"000.000":y=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+a)}if(y){for(var s="ID:"+this._repeaterID;s.length<250;)s+="\0";return this._sock.sendString(s),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var C="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+C+` -`),K.Debug("Sent ProtocolVersion: "+C),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function a(C,te){for(var ue=0;ue=3.7){var y=this._sock.rQshift8();if(this._sock.rQwait("security type",y,1))return!1;if(y===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var s=this._sock.rQshiftBytes(y);if(K.Debug("Server security types: "+s),a(1,s))this._rfbAuthScheme=1;else if(a(22,s))this._rfbAuthScheme=22;else if(a(16,s))this._rfbAuthScheme=16;else if(a(2,s))this._rfbAuthScheme=2;else if(a(19,s))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+s+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",K.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var a=this._sock.rQshift32(),y="";if(a>0){if(this._sock.rQwait("reason",a,4))return!1;y=this._sock.rQshiftStr(a)}return y!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:y}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+y+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var a=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(a),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var a=this._sock.rQshift8(),y=this._sock.rQshift8();if(!(a==0&&y==2))return this._fail("Unsupported VeNCrypt version "+a+"."+y);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var s=this._sock.rQshift8();if(s!=0)return this._fail("VeNCrypt failure "+s);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var C=this._sock.rQshift8();if(C<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=C,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var te=[],ue=0;ue0&&this._sock.rQwait("tunnel capabilities",16*a,4))return!1;if(this._rfbTightVNC=!0,a>0)return this._negotiateTightTunnels(a),!1}if(this._sock.rQwait("sub auth count",4))return!1;var y=this._sock.rQshift32();if(y===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*y,4))return!1;for(var s={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},C=[],te=0;te=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var a=this._sock.rQshift32();return a===0?(this._rfbInitState="ClientInitialisation",K.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=a,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:a}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var a=this._sock.rQshift16(),y=this._sock.rQshift16(),s=this._sock.rQshift8(),C=this._sock.rQshift8(),te=this._sock.rQshift8(),ue=this._sock.rQshift8(),le=this._sock.rQshift16(),De=this._sock.rQshift16(),_=this._sock.rQshift16(),W=this._sock.rQshift8(),H=this._sock.rQshift8(),se=this._sock.rQshift8();this._sock.rQskipBytes(3);var ee=this._sock.rQshift32();if(this._sock.rQwait("server init name",ee,24))return!1;var ie=this._sock.rQshiftStr(ee);if(ie=(0,U.decodeUTF8)(ie,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+ee))return!1;var k=this._sock.rQshift16(),G=this._sock.rQshift16(),u=this._sock.rQshift16();this._sock.rQskipBytes(2);var $=(k+G+u)*16;if(this._sock.rQwait("TightVNC extended server init header",$,32+ee))return!1;this._sock.rQskipBytes(16*k),this._sock.rQskipBytes(16*G),this._sock.rQskipBytes(16*u)}return K.Info("Screen: "+a+"x"+y+", bpp: "+s+", depth: "+C+", bigEndian: "+te+", trueColor: "+ue+", redMax: "+le+", greenMax: "+De+", blueMax: "+_+", redShift: "+W+", greenShift: "+H+", blueShift: "+se),this._setDesktopName(ie),this._resize(a,y),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(K.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),j.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),j.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var a=[];a.push(g.encodings.encodingCopyRect),this._fbDepth==24&&(a.push(g.encodings.encodingTight),a.push(g.encodings.encodingTightPNG),a.push(g.encodings.encodingHextile),a.push(g.encodings.encodingRRE)),a.push(g.encodings.encodingRaw),a.push(g.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),a.push(g.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),a.push(g.encodings.pseudoEncodingDesktopSize),a.push(g.encodings.pseudoEncodingLastRect),a.push(g.encodings.pseudoEncodingQEMUExtendedKeyEvent),a.push(g.encodings.pseudoEncodingExtendedDesktopSize),a.push(g.encodings.pseudoEncodingXvp),a.push(g.encodings.pseudoEncodingFence),a.push(g.encodings.pseudoEncodingContinuousUpdates),a.push(g.encodings.pseudoEncodingDesktopName),a.push(g.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(a.push(g.encodings.pseudoEncodingVMwareCursor),a.push(g.encodings.pseudoEncodingCursor)),j.messages.clientEncodings(this._sock,a)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return K.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(K.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var a=this._sock.rQshift32();if(a=(0,l.toSigned32bit)(a),this._sock.rQwait("ServerCutText content",Math.abs(a),8))return!1;if(a>=0){var y=this._sock.rQshiftStr(a);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:y}}))}else{a=Math.abs(a);var s=this._sock.rQshift32(),C=s&65535,te=s&4278190080,ue=!!(te&fe);if(ue){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var le=0;le<=15;le++){var De=1<0&&ie.charAt(ie.length-1)==="\0"&&(ie=ie.slice(0,-1)),ie=ie.replace(`\r +`),K.Debug("Sent ProtocolVersion: "+C),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function a(C,te){for(var ue=0;ue=3.7){var y=this._sock.rQshift8();if(this._sock.rQwait("security type",y,1))return!1;if(y===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var s=this._sock.rQshiftBytes(y);if(K.Debug("Server security types: "+s),a(1,s))this._rfbAuthScheme=1;else if(a(22,s))this._rfbAuthScheme=22;else if(a(16,s))this._rfbAuthScheme=16;else if(a(2,s))this._rfbAuthScheme=2;else if(a(19,s))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+s+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",K.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var a=this._sock.rQshift32(),y="";if(a>0){if(this._sock.rQwait("reason",a,4))return!1;y=this._sock.rQshiftStr(a)}return y!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:y}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+y+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var a=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(a),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var a=this._sock.rQshift8(),y=this._sock.rQshift8();if(!(a==0&&y==2))return this._fail("Unsupported VeNCrypt version "+a+"."+y);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var s=this._sock.rQshift8();if(s!=0)return this._fail("VeNCrypt failure "+s);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var C=this._sock.rQshift8();if(C<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=C,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var te=[],ue=0;ue0&&this._sock.rQwait("tunnel capabilities",16*a,4))return!1;if(this._rfbTightVNC=!0,a>0)return this._negotiateTightTunnels(a),!1}if(this._sock.rQwait("sub auth count",4))return!1;var y=this._sock.rQshift32();if(y===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*y,4))return!1;for(var s={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},C=[],te=0;te=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var a=this._sock.rQshift32();return a===0?(this._rfbInitState="ClientInitialisation",K.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=a,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:a}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var a=this._sock.rQshift16(),y=this._sock.rQshift16(),s=this._sock.rQshift8(),C=this._sock.rQshift8(),te=this._sock.rQshift8(),ue=this._sock.rQshift8(),le=this._sock.rQshift16(),Ue=this._sock.rQshift16(),_=this._sock.rQshift16(),W=this._sock.rQshift8(),H=this._sock.rQshift8(),se=this._sock.rQshift8();this._sock.rQskipBytes(3);var ee=this._sock.rQshift32();if(this._sock.rQwait("server init name",ee,24))return!1;var ie=this._sock.rQshiftStr(ee);if(ie=(0,U.decodeUTF8)(ie,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+ee))return!1;var k=this._sock.rQshift16(),G=this._sock.rQshift16(),u=this._sock.rQshift16();this._sock.rQskipBytes(2);var $=(k+G+u)*16;if(this._sock.rQwait("TightVNC extended server init header",$,32+ee))return!1;this._sock.rQskipBytes(16*k),this._sock.rQskipBytes(16*G),this._sock.rQskipBytes(16*u)}return K.Info("Screen: "+a+"x"+y+", bpp: "+s+", depth: "+C+", bigEndian: "+te+", trueColor: "+ue+", redMax: "+le+", greenMax: "+Ue+", blueMax: "+_+", redShift: "+W+", greenShift: "+H+", blueShift: "+se),this._setDesktopName(ie),this._resize(a,y),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(K.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),j.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),j.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var a=[];a.push(g.encodings.encodingCopyRect),this._fbDepth==24&&(a.push(g.encodings.encodingTight),a.push(g.encodings.encodingTightPNG),a.push(g.encodings.encodingHextile),a.push(g.encodings.encodingRRE)),a.push(g.encodings.encodingRaw),a.push(g.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),a.push(g.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),a.push(g.encodings.pseudoEncodingDesktopSize),a.push(g.encodings.pseudoEncodingLastRect),a.push(g.encodings.pseudoEncodingQEMUExtendedKeyEvent),a.push(g.encodings.pseudoEncodingExtendedDesktopSize),a.push(g.encodings.pseudoEncodingXvp),a.push(g.encodings.pseudoEncodingFence),a.push(g.encodings.pseudoEncodingContinuousUpdates),a.push(g.encodings.pseudoEncodingDesktopName),a.push(g.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(a.push(g.encodings.pseudoEncodingVMwareCursor),a.push(g.encodings.pseudoEncodingCursor)),j.messages.clientEncodings(this._sock,a)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return K.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(K.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var a=this._sock.rQshift32();if(a=(0,l.toSigned32bit)(a),this._sock.rQwait("ServerCutText content",Math.abs(a),8))return!1;if(a>=0){var y=this._sock.rQshiftStr(a);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:y}}))}else{a=Math.abs(a);var s=this._sock.rQshift32(),C=s&65535,te=s&4278190080,ue=!!(te&fe);if(ue){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var le=0;le<=15;le++){var Ue=1<0&&ie.charAt(ie.length-1)==="\0"&&(ie=ie.slice(0,-1)),ie=ie.replace(`\r `,` -`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:ie}}))}}else return this._fail("Unexpected action in extended clipboard message: "+te)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var a=this._sock.rQshift32(),y=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",y,9))return!1;y>64&&(K.Warn("Bad payload length ("+y+") in fence response"),y=64);var s=this._sock.rQshiftStr(y);return this._supportsFence=!0,a&1<<31?(a&=1<<0|1<<1,j.messages.clientFence(this._sock,a,s),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var a=this._sock.rQshift8(),y=this._sock.rQshift8();switch(y){case 0:K.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=a,K.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+y+")");break}return!0}},{key:"_normalMsg",value:function(){var a;this._FBU.rects>0?a=0:a=this._sock.rQshift8();var y,s;switch(a){case 0:return s=this._framebufferUpdate(),s&&!this._enabledContinuousUpdates&&j.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),s;case 1:return this._handleSetColourMapMsg();case 2:return K.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return y=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,y&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),K.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+a+")"),K.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var a=this._sock.rQshiftBytes(12);this._FBU.x=(a[0]<<8)+a[1],this._FBU.y=(a[2]<<8)+a[3],this._FBU.width=(a[4]<<8)+a[5],this._FBU.height=(a[6]<<8)+a[7],this._FBU.encoding=parseInt((a[8]<<24)+(a[9]<<16)+(a[10]<<8)+a[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case g.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case g.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case g.encodings.pseudoEncodingCursor:return this._handleCursor();case g.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var a=document.createEvent("keyboardEvent");a.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(y){}return!0;case g.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case g.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case g.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var a=this._FBU.x,y=this._FBU.y,s=this._FBU.width,C=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var te=this._sock.rQshift8();this._sock.rQshift8();var ue,le=4;if(te==0){var De=4294967040|0;if(ue=new Array(s*C*le),this._sock.rQwait("VMware cursor classic encoding",s*C*le*2,2))return!1;for(var _=new Array(s*C),W=0;W>8&255,G=ie>>16&255,u=ie>>24&255;ue[ee*le]=k,ue[ee*le+1]=G,ue[ee*le+2]=u,ue[ee*le+3]=255}else(_[ee]&De)==De?H[ee]==0?(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=0):((H[ee]&De)==De,ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255):(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255)}else if(te==1){if(this._sock.rQwait("VMware cursor alpha encoding",s*C*4,2))return!1;ue=new Array(s*C*le);for(var $=0;$>24&255,ue[$*4+1]=we>>16&255,ue[$*4+2]=we>>8&255,ue[$*4+3]=we&255}}else return K.Warn("The given cursor type is not supported: "+te+" given."),!1;return this._updateCursor(ue,a,y,s,C),!0}},{key:"_handleCursor",value:function(){var a=this._FBU.x,y=this._FBU.y,s=this._FBU.width,C=this._FBU.height,te=s*C*4,ue=Math.ceil(s/8)*C,le=te+ue;if(this._sock.rQwait("cursor encoding",le))return!1;for(var De=this._sock.rQshiftBytes(te),_=this._sock.rQshiftBytes(ue),W=new Uint8Array(s*C*4),H=0,se=0;se9){K.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===a)return;this._qualityLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(a){if(!Number.isInteger(a)||a<0||a>9){K.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===a)return;this._compressionLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(a,y){var s=a.split("").map(function(C){return C.charCodeAt(0)});return new d.default(s).encrypt(y)}}]),j}(c.default);f.default=me,me.messages={keyEvent:function(z,j,I){var a=z._sQ,y=z._sQlen;a[y]=4,a[y+1]=I,a[y+2]=0,a[y+3]=0,a[y+4]=j>>24,a[y+5]=j>>16,a[y+6]=j>>8,a[y+7]=j,z._sQlen+=8,z.flush()},QEMUExtendedKeyEvent:function(z,j,I,a){function y(ue){var le=a>>8,De=a&255;return le===224&&De<127?De|128:ue}var s=z._sQ,C=z._sQlen;s[C]=255,s[C+1]=0,s[C+2]=I>>8,s[C+3]=I,s[C+4]=j>>24,s[C+5]=j>>16,s[C+6]=j>>8,s[C+7]=j;var te=y(a);s[C+8]=te>>24,s[C+9]=te>>16,s[C+10]=te>>8,s[C+11]=te,z._sQlen+=12,z.flush()},pointerEvent:function(z,j,I,a){var y=z._sQ,s=z._sQlen;y[s]=5,y[s+1]=a,y[s+2]=j>>8,y[s+3]=j,y[s+4]=I>>8,y[s+5]=I,z._sQlen+=6,z.flush()},_buildExtendedClipboardFlags:function(z,j){for(var I=new Uint8Array(4),a=0,y=0,s=0;s>24,I[1]=0,I[2]=0,I[3]=a,I},extendedClipboardProvide:function(z,j,I){for(var a=new h.default,y=[],s=0;s64&&(K.Warn("Bad payload length ("+y+") in fence response"),y=64);var s=this._sock.rQshiftStr(y);return this._supportsFence=!0,a&1<<31?(a&=1<<0|1<<1,j.messages.clientFence(this._sock,a,s),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var a=this._sock.rQshift8(),y=this._sock.rQshift8();switch(y){case 0:K.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=a,K.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+y+")");break}return!0}},{key:"_normalMsg",value:function(){var a;this._FBU.rects>0?a=0:a=this._sock.rQshift8();var y,s;switch(a){case 0:return s=this._framebufferUpdate(),s&&!this._enabledContinuousUpdates&&j.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),s;case 1:return this._handleSetColourMapMsg();case 2:return K.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return y=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,y&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),K.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+a+")"),K.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var a=this._sock.rQshiftBytes(12);this._FBU.x=(a[0]<<8)+a[1],this._FBU.y=(a[2]<<8)+a[3],this._FBU.width=(a[4]<<8)+a[5],this._FBU.height=(a[6]<<8)+a[7],this._FBU.encoding=parseInt((a[8]<<24)+(a[9]<<16)+(a[10]<<8)+a[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case g.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case g.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case g.encodings.pseudoEncodingCursor:return this._handleCursor();case g.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var a=document.createEvent("keyboardEvent");a.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(y){}return!0;case g.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case g.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case g.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var a=this._FBU.x,y=this._FBU.y,s=this._FBU.width,C=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var te=this._sock.rQshift8();this._sock.rQshift8();var ue,le=4;if(te==0){var Ue=4294967040|0;if(ue=new Array(s*C*le),this._sock.rQwait("VMware cursor classic encoding",s*C*le*2,2))return!1;for(var _=new Array(s*C),W=0;W>8&255,G=ie>>16&255,u=ie>>24&255;ue[ee*le]=k,ue[ee*le+1]=G,ue[ee*le+2]=u,ue[ee*le+3]=255}else(_[ee]&Ue)==Ue?H[ee]==0?(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=0):((H[ee]&Ue)==Ue,ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255):(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255)}else if(te==1){if(this._sock.rQwait("VMware cursor alpha encoding",s*C*4,2))return!1;ue=new Array(s*C*le);for(var $=0;$>24&255,ue[$*4+1]=we>>16&255,ue[$*4+2]=we>>8&255,ue[$*4+3]=we&255}}else return K.Warn("The given cursor type is not supported: "+te+" given."),!1;return this._updateCursor(ue,a,y,s,C),!0}},{key:"_handleCursor",value:function(){var a=this._FBU.x,y=this._FBU.y,s=this._FBU.width,C=this._FBU.height,te=s*C*4,ue=Math.ceil(s/8)*C,le=te+ue;if(this._sock.rQwait("cursor encoding",le))return!1;for(var Ue=this._sock.rQshiftBytes(te),_=this._sock.rQshiftBytes(ue),W=new Uint8Array(s*C*4),H=0,se=0;se9){K.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===a)return;this._qualityLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(a){if(!Number.isInteger(a)||a<0||a>9){K.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===a)return;this._compressionLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(a,y){var s=a.split("").map(function(C){return C.charCodeAt(0)});return new d.default(s).encrypt(y)}}]),j}(c.default);f.default=me,me.messages={keyEvent:function(z,j,I){var a=z._sQ,y=z._sQlen;a[y]=4,a[y+1]=I,a[y+2]=0,a[y+3]=0,a[y+4]=j>>24,a[y+5]=j>>16,a[y+6]=j>>8,a[y+7]=j,z._sQlen+=8,z.flush()},QEMUExtendedKeyEvent:function(z,j,I,a){function y(ue){var le=a>>8,Ue=a&255;return le===224&&Ue<127?Ue|128:ue}var s=z._sQ,C=z._sQlen;s[C]=255,s[C+1]=0,s[C+2]=I>>8,s[C+3]=I,s[C+4]=j>>24,s[C+5]=j>>16,s[C+6]=j>>8,s[C+7]=j;var te=y(a);s[C+8]=te>>24,s[C+9]=te>>16,s[C+10]=te>>8,s[C+11]=te,z._sQlen+=12,z.flush()},pointerEvent:function(z,j,I,a){var y=z._sQ,s=z._sQlen;y[s]=5,y[s+1]=a,y[s+2]=j>>8,y[s+3]=j,y[s+4]=I>>8,y[s+5]=I,z._sQlen+=6,z.flush()},_buildExtendedClipboardFlags:function(z,j){for(var I=new Uint8Array(4),a=0,y=0,s=0;s>24,I[1]=0,I[2]=0,I[3]=a,I},extendedClipboardProvide:function(z,j,I){for(var a=new h.default,y=[],s=0;s>24&255,C.length>>16&255,C.length>>8&255,C.length&255);for(var te=0;te>24,y[s+1]=I[a[C]]>>16,y[s+2]=I[a[C]]>>8,y[s+3]=I[a[C]]>>0,s+=4,y[3]|=1<2&&arguments[2]!==void 0?arguments[2]:!1,a=z._sQ,y=z._sQlen;a[y]=6,a[y+1]=0,a[y+2]=0,a[y+3]=0;var s;I?s=(0,l.toUnsigned32bit)(-j.length):s=j.length,a[y+4]=s>>24,a[y+5]=s>>16,a[y+6]=s>>8,a[y+7]=s,z._sQlen+=8;for(var C=0,te=j.length;te>0;){for(var ue=Math.min(te,z._sQbufferSize-z._sQlen),le=0;le>8,s[C+3]=j,s[C+4]=I>>8,s[C+5]=I,s[C+6]=1,s[C+7]=0,s[C+8]=a>>24,s[C+9]=a>>16,s[C+10]=a>>8,s[C+11]=a,s[C+12]=0,s[C+13]=0,s[C+14]=0,s[C+15]=0,s[C+16]=j>>8,s[C+17]=j,s[C+18]=I>>8,s[C+19]=I,s[C+20]=y>>24,s[C+21]=y>>16,s[C+22]=y>>8,s[C+23]=y,z._sQlen+=24,z.flush()},clientFence:function(z,j,I){var a=z._sQ,y=z._sQlen;a[y]=248,a[y+1]=0,a[y+2]=0,a[y+3]=0,a[y+4]=j>>24,a[y+5]=j>>16,a[y+6]=j>>8,a[y+7]=j;var s=I.length;a[y+8]=s;for(var C=0;C>8,C[te+3]=I,C[te+4]=a>>8,C[te+5]=a,C[te+6]=y>>8,C[te+7]=y,C[te+8]=s>>8,C[te+9]=s,z._sQlen+=10,z.flush()},pixelFormat:function(z,j,I){var a=z._sQ,y=z._sQlen,s;j>16?s=32:j>8?s=16:s=8;var C=Math.floor(j/3);a[y]=0,a[y+1]=0,a[y+2]=0,a[y+3]=0,a[y+4]=s,a[y+5]=j,a[y+6]=0,a[y+7]=I?1:0,a[y+8]=0,a[y+9]=(1<>8,I[a+3]=j.length;for(var y=a+4,s=0;s>24,I[y+1]=C>>16,I[y+2]=C>>8,I[y+3]=C,y+=4}z._sQlen+=y-a,z.flush()},fbUpdateRequest:function(z,j,I,a,y,s){var C=z._sQ,te=z._sQlen;typeof I=="undefined"&&(I=0),typeof a=="undefined"&&(a=0),C[te]=3,C[te+1]=j?1:0,C[te+2]=I>>8&255,C[te+3]=I&255,C[te+4]=a>>8&255,C[te+5]=a&255,C[te+6]=y>>8&255,C[te+7]=y&255,C[te+8]=s>>8&255,C[te+9]=s&255,z._sQlen+=10,z.flush()},xvpOp:function(z,j,I){var a=z._sQ,y=z._sQlen;a[y]=250,a[y+1]=0,a[y+2]=j,a[y+3]=I,z._sQlen+=4,z.flush()}},me.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},"1q3G":function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=l;function l(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"34/K":function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c>0&3)*255/3,O[R*4+1]=(g[S+R]>>2&3)*255/3,O[R*4+2]=(g[S+R]>>4&3)*255/3,O[R*4+4]=0;g=O,S=0}return m.blitImage(c,n,o,b,g,S),r.rQskipBytes(b*d),this._lines-=b,!(this._lines>0)}}]),T}();f.default=x},"3690":function(Te,f,E){"use strict";function l(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(r){return typeof r}:l=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},l(o)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var o=new WeakMap;return U=function(){return o},o}function x(o){if(o&&o.__esModule)return o;if(o===null||l(o)!=="object"&&typeof o!="function")return{default:o};var h=U();if(h&&h.has(o))return h.get(o);var r={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in o)if(Object.prototype.hasOwnProperty.call(o,w)){var v=m?Object.getOwnPropertyDescriptor(o,w):null;v&&(v.get||v.set)?Object.defineProperty(r,w,v):r[w]=o[w]}return r.default=o,h&&h.set(o,r),r}function T(o,h){if(!(o instanceof h))throw new TypeError("Cannot call a class as a function")}function t(o,h){for(var r=0;r0;){var g=1;if(d.rQwait("HEXTILE",g))return!1;var S=d.rQ,A=d.rQi,O=S[A];if(O>30)throw new Error("Illegal hextile subencoding (subencoding: "+O+")");var R=this._totalTiles-this._tiles,B=R%this._tilesX,F=Math.floor(R/this._tilesX),L=r+B*16,P=m+F*16,V=Math.min(16,r+w-L),Y=Math.min(16,m+v-P);if(O&1)g+=V*Y*4;else if(O&2&&(g+=4),O&4&&(g+=4),O&8){if(g++,d.rQwait("HEXTILE",g))return!1;var q=S[A+g-1];O&16?g+=q*(4+2):g+=q*2}if(d.rQwait("HEXTILE",g))return!1;if(A++,O===0)this._lastsubencoding&1?K.Debug(" Ignoring blank after RAW"):n.fillRect(L,P,V,Y,this._background);else if(O&1)n.blitImage(L,P,V,Y,S,A),A+=g-1;else{if(O&2&&(this._background=[S[A],S[A+1],S[A+2],S[A+3]],A+=4),O&4&&(this._foreground=[S[A],S[A+1],S[A+2],S[A+3]],A+=4),n.startTile(L,P,V,Y,this._background),O&8){var be=S[A];A++;for(var Ie=0;Ie>4,Re=Ke&15,Fe=S[A];A++;var Be=(Fe>>4)+1,ge=(Fe&15)+1;n.subTile(ke,Re,Be,ge,Xe)}}n.finishTile()}d.rQi=A,this._lastsubencoding=O,this._tiles--}return!0}}]),o}();f.default=i},"6BzB":function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.shrinkBuf=l,f.arraySet=K,f.flattenChunks=U,f.Buf32=f.Buf16=f.Buf8=void 0;function l(c,i){return c.length===i?c:c.subarray?c.subarray(0,i):(c.length=i,c)}function K(c,i,o,h,r){if(i.subarray&&c.subarray){c.set(i.subarray(o,o+h),r);return}for(var m=0;m=32&&x<=255)return x;var T=l[x];return T!==void 0?T:16777216|x}};f.default=K},"8CQX":function(Te,f,E){"use strict";function l(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(n){return typeof n}:l=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l(v)}Object.defineProperty(f,"__esModule",{value:!0}),f.getKeycode=r,f.getKey=m,f.getKeysym=w;var K=h(E("mHUz")),U=h(E("8+yF")),x=h(E("6Qwc")),T=h(E("gIYZ")),t=h(E("mTgk")),c=o(E("GdRQ"));function i(){if(typeof WeakMap!="function")return null;var v=new WeakMap;return i=function(){return v},v}function o(v){if(v&&v.__esModule)return v;if(v===null||l(v)!=="object"&&typeof v!="function")return{default:v};var d=i();if(d&&d.has(v))return d.get(v);var n={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){var S=b?Object.getOwnPropertyDescriptor(v,g):null;S&&(S.get||S.set)?Object.defineProperty(n,g,S):n[g]=v[g]}return n.default=v,d&&d.set(v,n),n}function h(v){return v&&v.__esModule?v:{default:v}}function r(v){if(v.code){switch(v.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return v.code}if(v.type!=="keypress"&&v.keyCode in x.default){var d=x.default[v.keyCode];if(c.isMac()&&d==="ContextMenu"&&(d="MetaRight"),v.location===2)switch(d){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(v.location===3)switch(d){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return d}return"Unidentified"}function m(v){if(v.key!==void 0){switch(v.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return v.char}switch(v.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(v.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(v.key==="\0"&&v.code==="NumpadDecimal")return"Delete";if(!c.isIE()&&!c.isEdge())return v.key;if(v.key.length!==1&&v.key!=="Unidentified")return v.key}var d=r(v);return d in T.default?T.default[d]:v.charCode?String.fromCharCode(v.charCode):"Unidentified"}function w(v){var d=m(v);if(d==="Unidentified")return null;if(d in t.default){var n=v.location;if(d==="Meta"&&n===0&&(n=2),d==="Clear"&&n===3){var b=r(v);b==="NumLock"&&(n=0)}if((n===void 0||n>3)&&(n=0),d==="Meta"){var g=r(v);if(g==="AltLeft")return K.default.XK_Meta_L;if(g==="AltRight")return K.default.XK_Meta_R}if(d==="Clear"){var S=r(v);if(S==="NumLock")return K.default.XK_Num_Lock}return t.default[d][n]}if(d.length!==1)return null;var A=d.charCodeAt();return A?U.default.lookup(A):null}},"8K/p":function(Te,f,E){"use strict";function l(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(w){return typeof w}:l=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},l(r)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=t(E("Lo0S")),U=x(E("ItS6"));function x(r){return r&&r.__esModule?r:{default:r}}function T(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return T=function(){return r},r}function t(r){if(r&&r.__esModule)return r;if(r===null||l(r)!=="object"&&typeof r!="function")return{default:r};var m=T();if(m&&m.has(r))return m.get(r);var w={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in r)if(Object.prototype.hasOwnProperty.call(r,d)){var n=v?Object.getOwnPropertyDescriptor(r,d):null;n&&(n.get||n.set)?Object.defineProperty(w,d,n):w[d]=r[d]}return w.default=r,m&&m.set(r,w),w}function c(r,m){if(!(r instanceof m))throw new TypeError("Cannot call a class as a function")}function i(r,m){for(var w=0;w>A&1&&(this._zlibs[A].reset(),K.Info("Reset zlib stream "+A));this._ctl=this._ctl>>4}var O;if(this._ctl===8)O=this._fillRect(w,v,d,n,b,g,S);else if(this._ctl===9)O=this._jpegRect(w,v,d,n,b,g,S);else if(this._ctl===10)O=this._pngRect(w,v,d,n,b,g,S);else if((this._ctl&128)==0)O=this._basicRect(this._ctl,w,v,d,n,b,g,S);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return O&&(this._ctl=null),O}},{key:"_fillRect",value:function(w,v,d,n,b,g,S){if(b.rQwait("TIGHT",3))return!1;var A=b.rQi,O=b.rQ;return g.fillRect(w,v,d,n,[O[A+2],O[A+1],O[A]],!1),b.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(w,v,d,n,b,g,S){var A=this._readData(b);return A===null?!1:(g.imageRect(w,v,d,n,"image/jpeg",A),!0)}},{key:"_pngRect",value:function(w,v,d,n,b,g,S){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(w,v,d,n,b,g,S,A){if(this._filter===null)if(w&4){if(g.rQwait("TIGHT",1))return!1;this._filter=g.rQshift8()}else this._filter=0;var O=w&3,R;switch(this._filter){case 0:R=this._copyFilter(O,v,d,n,b,g,S,A);break;case 1:R=this._paletteFilter(O,v,d,n,b,g,S,A);break;case 2:R=this._gradientFilter(O,v,d,n,b,g,S,A);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return R&&(this._filter=null),R}},{key:"_copyFilter",value:function(w,v,d,n,b,g,S,A){var O=n*b*3,R;if(O<12){if(g.rQwait("TIGHT",O))return!1;R=g.rQshiftBytes(O)}else{if(R=this._readData(g),R===null)return!1;this._zlibs[w].setInput(R),R=this._zlibs[w].inflate(O),this._zlibs[w].setInput(null)}return S.blitRgbImage(v,d,n,b,R,0,!1),!0}},{key:"_paletteFilter",value:function(w,v,d,n,b,g,S,A){if(this._numColors===0){if(g.rQwait("TIGHT palette",1))return!1;var O=g.rQpeek8()+1,R=O*3;if(g.rQwait("TIGHT palette",1+R))return!1;this._numColors=O,g.rQskipBytes(1),g.rQshiftTo(this._palette,R)}var B=this._numColors<=2?1:8,F=Math.floor((n*B+7)/8),L=F*b,P;if(L<12){if(g.rQwait("TIGHT",L))return!1;P=g.rQshiftBytes(L)}else{if(P=this._readData(g),P===null)return!1;this._zlibs[w].setInput(P),P=this._zlibs[w].inflate(L),this._zlibs[w].setInput(null)}return this._numColors==2?this._monoRect(v,d,n,b,P,this._palette,S):this._paletteRect(v,d,n,b,P,this._palette,S),this._numColors=0,!0}},{key:"_monoRect",value:function(w,v,d,n,b,g,S){for(var A=this._getScratchBuffer(d*n*4),O=Math.floor((d+7)/8),R=Math.floor(d/8),B=0;B=0;V--)F=(B*d+P*8+7-V)*4,L=(b[B*O+P]>>V&1)*3,A[F]=g[L],A[F+1]=g[L+1],A[F+2]=g[L+2],A[F+3]=255;for(var Y=7;Y>=8-d%8;Y--)F=(B*d+P*8+7-Y)*4,L=(b[B*O+P]>>Y&1)*3,A[F]=g[L],A[F+1]=g[L+1],A[F+2]=g[L+2],A[F+3]=255}S.blitRgbxImage(w,v,d,n,A,0,!1)}},{key:"_paletteRect",value:function(w,v,d,n,b,g,S){for(var A=this._getScratchBuffer(d*n*4),O=d*n*4,R=0,B=0;R1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(l.a)())return null;var h=document.createElement("style");if((i=o.csp)===null||i===void 0?void 0:i.nonce){var r;h.nonce=(r=o.csp)===null||r===void 0?void 0:r.nonce}h.innerHTML=c;var m=U(o),w=m.firstChild;return o.prepend&&m.prepend?m.prepend(h):o.prepend&&w?m.insertBefore(h,w):m.appendChild(h),h}var T=new Map;function t(c,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=U(o);if(!T.has(h)){var r=x("",o),m=r.parentNode;T.set(h,m),m.removeChild(r)}var w=Array.from(T.get(h).children).find(function(g){return g.tagName==="STYLE"&&g[K]===i});if(w){var v,d;if(((v=o.csp)===null||v===void 0?void 0:v.nonce)&&w.nonce!==((d=o.csp)===null||d===void 0?void 0:d.nonce)){var n;w.nonce=(n=o.csp)===null||n===void 0?void 0:n.nonce}return w.innerHTML!==c&&(w.innerHTML=c),w}var b=x(c,o);return b[K]=i,b}},Fv0C:function(Te,f,E){"use strict";function l(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(n){return typeof n}:l=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l(v)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=o(E("Lo0S")),U=E("vewr"),x=o(E("8CQX")),T=c(E("mHUz")),t=o(E("GdRQ"));function c(v){return v&&v.__esModule?v:{default:v}}function i(){if(typeof WeakMap!="function")return null;var v=new WeakMap;return i=function(){return v},v}function o(v){if(v&&v.__esModule)return v;if(v===null||l(v)!=="object"&&typeof v!="function")return{default:v};var d=i();if(d&&d.has(v))return d.get(v);var n={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){var S=b?Object.getOwnPropertyDescriptor(v,g):null;S&&(S.get||S.set)?Object.defineProperty(n,g,S):n[g]=v[g]}return n.default=v,d&&d.set(v,n),n}function h(v,d){if(!(v instanceof d))throw new TypeError("Cannot call a class as a function")}function r(v,d){for(var n=0;n=48&&n.keyCode<=57)b=n.keyCode;else if(n.keyCode>=65&&n.keyCode<=90){var S=String.fromCharCode(n.keyCode);n.shiftKey?S=S.toUpperCase():S=S.toLowerCase(),b=S.charCodeAt()}else b=0;this._sendKeyEvent(b,g,!0)}},{key:"_handleKeyUp",value:function(n){(0,U.stopEvent)(n);var b=this._getKeyCode(n);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(T.default.XK_Control_L,"ControlLeft",!0)),(t.isMac()||t.isIOS())&&b==="CapsLock"){this._sendKeyEvent(T.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(T.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[b],b,!1),t.isWindows()&&(b==="ShiftLeft"||b==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(T.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){K.Debug(">> Keyboard.allKeysUp");for(var n in this._keyDownList)this._sendKeyEvent(this._keyDownList[n],n,!1);K.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(n){if(n.skipCheckAlt)return;if(n.altKey)return;var b=this._target,g=this._keyDownList;["AltLeft","AltRight"].forEach(function(S){if(!(S in g))return;var A=new KeyboardEvent("keyup",{key:g[S],code:S});A.skipCheckAlt=!0,b.dispatchEvent(A)})}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),t.isWindows()&&t.isFirefox()){var n=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(b){return document.addEventListener(b,n,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(t.isWindows()&&t.isFirefox()){var n=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(b){return document.removeEventListener(b,n)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),v}();f.default=w},GQ8N:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.toUnsigned32bit=l,f.toSigned32bit=K;function l(U){return U>>>0}function K(U){return U|0}},GdRQ:function(Te,f,E){"use strict";function l(F){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(P){return typeof P}:l=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},l(F)}Object.defineProperty(f,"__esModule",{value:!0}),f.isMac=b,f.isWindows=g,f.isIOS=S,f.isSafari=A,f.isIE=O,f.isEdge=R,f.isFirefox=B,f.hasScrollbarGutter=f.supportsImageMetadata=f.supportsCursorURIs=f.dragThreshold=f.isTouchDevice=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var F=new WeakMap;return U=function(){return F},F}function x(F){if(F&&F.__esModule)return F;if(F===null||l(F)!=="object"&&typeof F!="function")return{default:F};var L=U();if(L&&L.has(F))return L.get(F);var P={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in F)if(Object.prototype.hasOwnProperty.call(F,Y)){var q=V?Object.getOwnPropertyDescriptor(F,Y):null;q&&(q.get||q.set)?Object.defineProperty(P,Y,q):P[Y]=F[Y]}return P.default=F,L&&L.set(F,P),P}var T="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;f.isTouchDevice=T,window.addEventListener("touchstart",function F(){f.isTouchDevice=T=!0,window.removeEventListener("touchstart",F,!1)},!1);var t=10*(window.devicePixelRatio||1);f.dragThreshold=t;var c=!1;try{var i=document.createElement("canvas");i.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',i.style.cursor.indexOf("url")===0?(K.Info("Data URI scheme cursor supported"),c=!0):K.Warn("Data URI scheme cursor not supported")}catch(F){K.Error("Data URI scheme cursor test exception: "+F)}var o=c;f.supportsCursorURIs=o;var h=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),h=!0}catch(F){}var r=h;f.supportsImageMetadata=r;var m=!0;try{var w=document.createElement("div");w.style.visibility="hidden",w.style.overflow="scroll",document.body.appendChild(w);var v=document.createElement("div");w.appendChild(v);var d=w.offsetWidth-v.offsetWidth;w.parentNode.removeChild(w),m=d!=0}catch(F){K.Error("Scrollbar test exception: "+F)}var n=m;f.hasScrollbarGutter=n;function b(){return navigator&&!!/mac/i.exec(navigator.platform)}function g(){return navigator&&!!/win/i.exec(navigator.platform)}function S(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function A(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function O(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function R(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function B(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},Gytx:function(Te,f){Te.exports=function(l,K,U,x){var T=U?U.call(x,l,K):void 0;if(T!==void 0)return!!T;if(l===K)return!0;if(typeof l!="object"||!l||typeof K!="object"||!K)return!1;var t=Object.keys(l),c=Object.keys(K);if(t.length!==c.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(K),o=0;o1&&arguments[1]!==void 0?arguments[1]:{};return Object(T.f)("myshixuns/".concat(Q,"/repository.json"),ne)}function V(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/start.json"),ne||{})}function Y(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/start.json"),ne||{})}function q(Q){return Object(T.c)("myshixuns/".concat(Q,"/reset_pod.json"))}function be(Q){return Object(T.c)("myshixuns/".concat(Q.myshixunId,"/reset_pod.json"),{game_id:Q.game_id})}function Ie(Q){return Object(T.c)("myshixuns/".concat(Q.myshixunId,"/reset_pod.json"),{game_id:Q.game_id})}function Xe(Q){var ne=Q.myshixunId;return delete Q.myshixunId,Object(T.c)("myshixuns/".concat(ne,"/reset_pod.json"),Object(K.a)({game_id:Q.game_id},Q))}function Ke(Q){return Object(T.c)("tasks/".concat(Q,"/check_test_sets.json"))}function ke(Q){return Object(T.c)("tasks/".concat(Q,"/get_answer_info.json"))}function Re(Q){return Object(T.c)("tasks/".concat(Q,"/get_choose_answer.json"))}function Fe(Q){return Object(T.c)("tasks/".concat(Q,"/unlock_choose_answer.json"))}function Be(Q,ne){return Object(T.c)("tasks/".concat(Q,"/unlock_answer.json?answer_id=").concat(ne))}function ge(Q,ne,_e){return Object(T.f)("tasks/".concat(Q,"/set_games_status.json"),{result:ne,data:_e})}function Ae(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/active_pod.json?game_id=").concat(ne))}function Me(Q,ne){return Object(T.a)("/api/myshixuns/".concat(Q,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:ne}})}function We(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/active_pod.json?game_id=").concat(ne))}function je(Q,ne){return Object(T.c)("tasks/".concat(Q,"/rank_list.json"),ne)}function ze(Q,ne){return Object(T.f)("tasks/".concat(Q,"/close_windows_vnc.json"),{tpi_id:ne})}function oe(Q){return Object(T.c)("tasks/".concat(Q,"/pull_files.json"))}function ye(Q,ne){return Object(T.f)("tasks/".concat(Q,"/log_output"),ne)}function de(Q){return Object(T.c)("tasks/".concat(Q,"/stop_log_output.json"))}function ae(Q){return J.apply(this,arguments)}function J(){return J=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/add_file.json"),{method:"post",body:ne}));case 1:case"end":return me.stop()}},Q)})),J.apply(this,arguments)}function he(Q){return re.apply(this,arguments)}function re(){return re=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/delete_git_file.json"),{method:"Delete",body:ne}));case 1:case"end":return me.stop()}},Q)})),re.apply(this,arguments)}function xe(Q){return Le.apply(this,arguments)}function Le(){return Le=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/mv_file.json"),{method:"post",body:ne}));case 1:case"end":return me.stop()}},Q)})),Le.apply(this,arguments)}function fe(Q){return Ce.apply(this,arguments)}function Ce(){return Ce=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/tasks/".concat(ne.id,"/rep_content.json"),{method:"get",params:ne}));case 1:case"end":return me.stop()}},Q)})),Ce.apply(this,arguments)}},ItS6:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("eP3c"),K=U(E("1q3G"));function U(i){return i&&i.__esModule?i:{default:i}}function x(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function T(i,o){for(var h=0;hthis.chunkSize&&(this.chunkSize=h,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=h;var r=(0,l.inflate)(this.strm,0);if(r<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=h)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,l.inflateReset)(this.strm)}}]),i}();f.default=c},IxHN:function(Te,f,E){"use strict";var l=E("q1tI"),K=E.n(l),U=E("07cG"),x=E.n(U);f.a=function(T){var t=T.message,c=T.className,i=T.children,o=T.style,h=o===void 0?{}:o;return K.a.createElement("div",{className:"".concat(x.a.idsRingWrapper," ").concat(c)},K.a.createElement("div",{className:x.a.ldsRing},K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null)),t?K.a.createElement("p",{style:h},t):null,i)}},JSwD:function(Te,f,E){"use strict";function l(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(g){return typeof g}:l=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},l(n)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=d;var K=x(E("6BzB"));function U(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return U=function(){return n},n}function x(n){if(n&&n.__esModule)return n;if(n===null||l(n)!=="object"&&typeof n!="function")return{default:n};var b=U();if(b&&b.has(n))return b.get(n);var g={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in n)if(Object.prototype.hasOwnProperty.call(n,A)){var O=S?Object.getOwnPropertyDescriptor(n,A):null;O&&(O.get||O.set)?Object.defineProperty(g,A,O):g[A]=n[A]}return g.default=n,b&&b.set(n,g),g}var T=15,t=852,c=592,i=0,o=1,h=2,r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],m=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],w=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function d(n,b,g,S,A,O,R,B){var F=B.bits,L=0,P=0,V=0,Y=0,q=0,be=0,Ie=0,Xe=0,Ke=0,ke=0,Re,Fe,Be,ge,Ae,Me=null,We=0,je,ze=new K.Buf16(T+1),oe=new K.Buf16(T+1),ye=null,de=0,ae,J,he;for(L=0;L<=T;L++)ze[L]=0;for(P=0;P=1&&!(ze[Y]!==0);Y--);if(q>Y&&(q=Y),Y===0)return A[O++]=1<<24|64<<16|0,A[O++]=1<<24|64<<16|0,B.bits=1,0;for(V=1;V0&&(n===i||Y!==1))return-1;for(oe[1]=0,L=1;Lt||n===h&&Ke>c)return 1;for(;;){ae=L-Ie,R[P]je?(J=ye[de+R[P]],he=Me[We+R[P]]):(J=32+64,he=0),Re=1<>Ie)+Fe]=ae<<24|J<<16|he|0;while(Fe!==0);for(Re=1<>=1;if(Re!==0?(ke&=Re-1,ke+=Re):ke=0,P++,--ze[L]===0){if(L===Y)break;L=b[g+R[P]]}if(L>q&&(ke&ge)!==Be){for(Ie===0&&(Ie=q),Ae+=V,be=L-Ie,Xe=1<t||n===h&&Ke>c)return 1;Be=ke&ge,A[Be]=q<<24|be<<16|Ae-O|0}}return ke!==0&&(A[Ae+ke]=L-Ie<<24|64<<16|0),B.bits=q,0}},LCi9:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function K(A,O){for(var R=0;R0&&Date.now()-this._tracked[0].started>d){this._state=x,this._ignored.push(R);return}if(this._waitingRelease){this._state=x,this._ignored.push(R);return}this._tracked.push({id:R,started:Date.now(),active:!0,firstX:B,firstY:F,lastX:B,lastY:F,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(T|i|o),this._stopLongpressTimeout();break;case 3:this._state&=~(t|h|r);break;default:this._state=x}}},{key:"_touchMove",value:function(R,B,F){var L=this._tracked.find(function(Ie){return Ie.id===R});if(L===void 0)return;L.lastX=B,L.lastY=F;var P=B-L.firstX,V=F-L.firstY;if((L.firstX!==L.lastX||L.firstY!==L.lastY)&&(L.angle=Math.atan2(V,P)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(P,V)w){var be=Math.abs(L.angle-Y.angle);be=Math.abs((be+180)%360-180),be>v?this._state&=~h:this._state&=~r,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}},{key:"_touchEnd",value:function(R,B,F){if(this._ignored.indexOf(R)!==-1){this._ignored.splice(this._ignored.indexOf(R),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=m,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=x),!this._hasDetectedGesture()&&(this._state&=~(i|h|r),this._state&=~o,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(t|c);break;case 2:this._state&=~(T|c);break}}if(this._waitingRelease){Date.now()-this._releaseStart>d&&(this._state=x),this._tracked.some(function(V){return Date.now()-V.started>n})&&(this._state=x);var L=this._tracked.find(function(V){return V.id===R});if(L.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==x)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var P=0;P> Display.constructor"),this._target=v,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},K.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),K.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return r(w,[{key:"viewportChangePos",value:function(d,n){var b=this._viewportLoc;d=Math.floor(d),n=Math.floor(n),this._clipViewport||(d=-b.w,n=-b.h);var g=b.x+b.w-1,S=b.y+b.h-1;if(d<0&&b.x+d<0&&(d=-b.x),g+d>=this._fbWidth&&(d-=g+d-this._fbWidth+1),b.y+n<0&&(n=-b.y),S+n>=this._fbHeight&&(n-=S+n-this._fbHeight+1),d===0&&n===0)return;K.Debug("viewportChange deltaX: "+d+", deltaY: "+n),b.x+=d,b.y+=n,this._damage(b.x,b.y,b.w,b.h),this.flip()}},{key:"viewportChangeSize",value:function(d,n){(!this._clipViewport||typeof d=="undefined"||typeof n=="undefined")&&(K.Debug("Setting viewport to full display region"),d=this._fbWidth,n=this._fbHeight),d=Math.floor(d),n=Math.floor(n),d>this._fbWidth&&(d=this._fbWidth),n>this._fbHeight&&(n=this._fbHeight);var b=this._viewportLoc;if(b.w!==d||b.h!==n){b.w=d,b.h=n;var g=this._target;g.width=d,g.height=n,this.viewportChangePos(0,0),this._damage(b.x,b.y,b.w,b.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(d){return this._scale===0?0:(0,T.toSigned32bit)(d/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(d){return this._scale===0?0:(0,T.toSigned32bit)(d/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(d,n){this._prevDrawStyle="",this._fbWidth=d,this._fbHeight=n;var b=this._backbuffer;if(b.width!==d||b.height!==n){var g=null;b.width>0&&b.height>0&&(g=this._drawCtx.getImageData(0,0,b.width,b.height)),b.width!==d&&(b.width=d),b.height!==n&&(b.height=n),g&&this._drawCtx.putImageData(g,0,0)}var S=this._viewportLoc;this.viewportChangeSize(S.w,S.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(d,n,b,g){dthis._damageBounds.right&&(this._damageBounds.right=d+b),n+g>this._damageBounds.bottom&&(this._damageBounds.bottom=n+g)}},{key:"flip",value:function(d){if(this._renderQ.length!==0&&!d)this._renderQPush({type:"flip"});else{var n=this._damageBounds.left,b=this._damageBounds.top,g=this._damageBounds.right-n,S=this._damageBounds.bottom-b,A=n-this._viewportLoc.x,O=b-this._viewportLoc.y;A<0&&(g+=A,n-=A,A=0),O<0&&(S+=O,b-=O,O=0),A+g>this._viewportLoc.w&&(g=this._viewportLoc.w-A),O+S>this._viewportLoc.h&&(S=this._viewportLoc.h-O),g>0&&S>0&&this._targetCtx.drawImage(this._backbuffer,n,b,g,S,A,O,g,S),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(d,n,b,g,S,A){this._renderQ.length!==0&&!A?this._renderQPush({type:"fill",x:d,y:n,width:b,height:g,color:S}):(this._setFillColor(S),this._drawCtx.fillRect(d,n,b,g),this._damage(d,n,b,g))}},{key:"copyImage",value:function(d,n,b,g,S,A,O){this._renderQ.length!==0&&!O?this._renderQPush({type:"copy",oldX:d,oldY:n,x:b,y:g,width:S,height:A}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,d,n,S,A,b,g,S,A),this._damage(b,g,S,A))}},{key:"imageRect",value:function(d,n,b,g,S,A){if(b===0||g===0)return;var O=new Image;O.src="data: "+S+";base64,"+U.default.encode(A),this._renderQPush({type:"img",img:O,x:d,y:n,width:b,height:g})}},{key:"startTile",value:function(d,n,b,g,S){this._tileX=d,this._tileY=n,b===16&&g===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(b,g);for(var A=S[2],O=S[1],R=S[0],B=this._tile.data,F=0;F=S?b=d/g.w:b=n/g.h}this._rescale(b)}},{key:"_rescale",value:function(d){this._scale=d;var n=this._viewportLoc,b=d*n.w+"px",g=d*n.h+"px";(this._target.style.width!==b||this._target.style.height!==g)&&(this._target.style.width=b,this._target.style.height=g)}},{key:"_setFillColor",value:function(d){var n="rgb("+d[2]+","+d[1]+","+d[0]+")";n!==this._prevDrawStyle&&(this._drawCtx.fillStyle=n,this._prevDrawStyle=n)}},{key:"_rgbImageData",value:function(d,n,b,g,S,A){for(var O=this._drawCtx.createImageData(b,g),R=O.data,B=0,F=A;B0;){var n=this._renderQ[0];switch(n.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(n.oldX,n.oldY,n.x,n.y,n.width,n.height,!0);break;case"fill":this.fillRect(n.x,n.y,n.width,n.height,n.color,!0);break;case"blit":this.blitImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"blitRgb":this.blitRgbImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"img":if(n.img.complete&&n.img.width!==0&&n.img.height!==0){if(n.img.width!==n.width||n.img.height!==n.height){K.Error("Decoded image has incorrect dimensions. Got "+n.img.width+"x"+n.img.height+". Expected "+n.width+"x"+n.height+".");return}this.drawImage(n.img,n.x,n.y)}else n.img._noVNCDisplay=this,n.img.addEventListener("load",this._resumeRenderQ),d=!1;break}d&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(d){this._rescale(d)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(d){this._clipViewport=d;var n=this._viewportLoc;this.viewportChangeSize(n.w,n.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),w}();f.default=m},Mmt2:function(Te,f,E){"use strict";function l(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(w){return typeof w}:l=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},l(r)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return U=function(){return r},r}function x(r){if(r&&r.__esModule)return r;if(r===null||l(r)!=="object"&&typeof r!="function")return{default:r};var m=U();if(m&&m.has(r))return m.get(r);var w={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in r)if(Object.prototype.hasOwnProperty.call(r,d)){var n=v?Object.getOwnPropertyDescriptor(r,d):null;n&&(n.get||n.set)?Object.defineProperty(w,d,n):w[d]=r[d]}return w.default=r,m&&m.set(r,w),w}function T(r,m){if(!(r instanceof m))throw new TypeError("Cannot call a class as a function")}function t(r,m){for(var w=0;w=0;d--)v+=this._rQ[this._rQi++]<1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+w,v-w)}},{key:"rQwait",value:function(w,v,d){if(this.rQlen0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(w){this._sQ.set(w,this._sQlen),this._sQlen+=w.length,this.flush()}},{key:"sendString",value:function(w){this.send(w.split("").map(function(v){return v.charCodeAt(0)}))}},{key:"off",value:function(w){this._eventHandlers[w]=function(){}}},{key:"on",value:function(w,v){this._eventHandlers[w]=v}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(w,v){var d=this;this.init(),this._websocket=new WebSocket(w,v),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){K.Debug(">> WebSock.onopen"),d._websocket.protocol&&K.Info("Server choose sub-protocol: "+d._websocket.protocol),d._eventHandlers.open(),K.Debug("<< WebSock.onopen")},this._websocket.onclose=function(n){K.Debug(">> WebSock.onclose"),d._eventHandlers.close(n),K.Debug("<< WebSock.onclose")},this._websocket.onerror=function(n){K.Debug(">> WebSock.onerror: "+n),d._eventHandlers.error(n),K.Debug("<< WebSock.onerror: "+n)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(K.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(w){var v=(this._rQlen-this._rQi+w)*8,d=this._rQbufferSizeo&&(this._rQbufferSize=o,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(v.length),this._rQ.set(v,this._rQlen),this._rQlen+=v.length}},{key:"_recvMessage",value:function(w){this._DecodeMessage(w.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):K.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(w){this._rQi=w}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),r}();f.default=h},"N/zr":function(Te,f,E){"use strict";function l(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(i){return typeof i}:l=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},l(t)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return U=function(){return t},t}function x(t){if(t&&t.__esModule)return t;if(t===null||l(t)!=="object"&&typeof t!="function")return{default:t};var c=U();if(c&&c.has(t))return c.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)){var r=o?Object.getOwnPropertyDescriptor(t,h):null;r&&(r.get||r.set)?Object.defineProperty(i,h,r):i[h]=t[h]}return i.default=t,c&&c.set(t,i),i}var T={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(c){"use strict";for(var i="",o=c.length,h=o%3,r=0;r>2],i+=this.toBase64Table[((c[r]&3)<<4)+(c[r+1]>>4)],i+=this.toBase64Table[((c[r+1]&15)<<2)+(c[r+2]>>6)],i+=this.toBase64Table[c[r+2]&63];var m=o-h;return h===2?(i+=this.toBase64Table[c[m]>>2],i+=this.toBase64Table[((c[m]&3)<<4)+(c[m+1]>>4)],i+=this.toBase64Table[(c[m+1]&15)<<2],i+=this.toBase64Table[64]):h===1&&(i+=this.toBase64Table[c[m]>>2],i+=this.toBase64Table[(c[m]&3)<<4],i+=this.toBase64Table[64],i+=this.toBase64Table[64]),i},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=c.indexOf("=")-i;o<0&&(o=c.length-i);for(var h=(o>>2)*3+Math.floor(o%4/1.5),r=new Array(h),m=0,w=0,v=0,d=i;d=8&&(m-=8,b||(r[v++]=w>>m&255),w&=(1<>>1:x>>>1;T[t]=x}return T}var K=l();function U(x,T,t,c){var i=K,o=c+t;x^=-1;for(var h=c;h>>8^i[(x^T[h])&255];return x^-1}},SZEN:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.clientToElement=l;function l(K,U,x){var T=x.getBoundingClientRect(),t={x:0,y:0};return K=T.right?t.x=T.width-1:t.x=K-T.left,U=T.bottom?t.y=T.height-1:t.y=U-T.top,t}},SgaC:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c0;){if(r.rQwait("RRE",4+8))return!1;var d=r.rQshiftBytes(4),n=r.rQshift16(),b=r.rQshift16(),g=r.rQshift16(),S=r.rQshift16();m.fillRect(c+n,i+b,g,S,d),this._subrects--}return!0}}]),T}();f.default=x},VSMT:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.decodeUTF8=l,f.encodeUTF8=K;function l(U){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(U))}catch(T){if(T instanceof URIError&&x)return U;throw T}}function K(U){return unescape(encodeURIComponent(U))}},Y1PL:function(Te,f,E){"use strict";E.r(f),E.d(f,"ResizableTextArea",function(){return We});var l=E("wx14"),K=E("1OyB"),U=E("vuIU"),x=E("Ji7U"),T=E("LK+K"),t=E("q1tI"),c=E("VTBJ"),i=E("rePB"),o=E("Zm9Q"),h=E("Kwbf"),r=E("c+Xe"),m=E("m+aA"),w=E("bdgK"),v=new Map;function d(oe){oe.forEach(function(ye){var de,ae=ye.target;(de=v.get(ae))===null||de===void 0||de.forEach(function(J){return J(ae)})})}var n=new w.default(d),b=null,g=null;function S(oe,ye){v.has(oe)||(v.set(oe,new Set),n.observe(oe)),v.get(oe).add(ye)}function A(oe,ye){v.has(oe)&&(v.get(oe).delete(ye),v.get(oe).size||(n.unobserve(oe),v.delete(oe)))}var O=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(){return Object(K.a)(this,de),ye.apply(this,arguments)}return Object(U.a)(de,[{key:"render",value:function(){return this.props.children}}]),de}(t.Component),R=t.createContext(null);function B(oe){var ye=oe.children,de=oe.onBatchResize,ae=t.useRef(0),J=t.useRef([]),he=t.useContext(R),re=t.useCallback(function(xe,Le,fe){ae.current+=1;var Ce=ae.current;J.current.push({size:xe,element:Le,data:fe}),Promise.resolve().then(function(){Ce===ae.current&&(de==null||de(J.current),J.current=[])}),he==null||he(xe,Le,fe)},[de,he]);return t.createElement(R.Provider,{value:re},ye)}function F(oe){var ye=oe.children,de=oe.disabled,ae=t.useRef(null),J=t.useRef(null),he=t.useContext(R),re=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),xe=t.isValidElement(ye)&&Object(r.c)(ye),Le=xe?ye.ref:null,fe=t.useMemo(function(){return Object(r.a)(Le,ae)},[Le,ae]),Ce=t.useRef(oe);Ce.current=oe;var Q=t.useCallback(function(ne){var _e=Ce.current,me=_e.onResize,Z=_e.data,z=ne.getBoundingClientRect(),j=z.width,I=z.height,a=ne.offsetWidth,y=ne.offsetHeight,s=Math.floor(j),C=Math.floor(I);if(re.current.width!==s||re.current.height!==C||re.current.offsetWidth!==a||re.current.offsetHeight!==y){var te={width:s,height:C,offsetWidth:a,offsetHeight:y};re.current=te;var ue=a===Math.round(j)?j:a,le=y===Math.round(I)?I:y,De=Object(c.a)(Object(c.a)({},te),{},{offsetWidth:ue,offsetHeight:le});he==null||he(De,ne,Z),me&&Promise.resolve().then(function(){me(De,ne)})}},[]);return t.useEffect(function(){var ne=Object(m.a)(ae.current)||Object(m.a)(J.current);return ne&&!de&&S(ne,Q),function(){return A(ne,Q)}},[ae.current,de]),t.createElement(O,{ref:J},xe?t.cloneElement(ye,{ref:fe}):ye)}var L="rc-observer-key";function P(oe){var ye=oe.children,de=Object(o.a)(ye);return de.map(function(ae,J){var he=(ae==null?void 0:ae.key)||"".concat(L,"-").concat(J);return t.createElement(F,Object(l.a)({},oe,{key:he}),ae)})}P.Collection=B;var V=P,Y=E("bT9E"),q=E("TSYQ"),be=E.n(q),Ie=` +`,actual_output:null,compile_success:null,ts_time:null,ts_mem:null}],allowed_unlock:!0,test_sets_count:null,sets_error_count:null}),q=Object(U.a)(Y,2),be=q[0],Ie=q[1],Xe=B.match.params,Ke=B.location.query,ke;Object(c.useEffect)(function(){Re()},[]),Object(c.useEffect)(function(){P.host&&setTimeout(function(){v.a.publish("create-socket",1)},500)},[P]);var Re=function(){var Fe=Object(K.a)(t.a.mark(function Be(){var ge;return t.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!(Ke.type==="terminal")){Me.next=5;break}return Me.next=3,Object(d.a)("/api/myshixuns/".concat(Ke.taskId||"f3n9o5xvik","/open_webssh.json"),{method:"get"});case 3:ge=Me.sent,V(Object(l.a)({},ge));case 5:Ke.type==="windows";case 6:case"end":return Me.stop()}},Be)}));return function(){return Fe.apply(this,arguments)}}();return i.a.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},Ke.type==="terminal"&&i.a.createElement(h.a,{sshConfigData:P,sid:1}),Ke.type!=="terminal"&&i.a.createElement(r.a,{taskId:Ke.type==="windows"?"pcf9t4w6vrnz":"ijby95c82nsh",vnc_url:Ke.type==="vnc",window_vnc_url:Ke.type==="windows",taskData:be}))};f.default=Object(o.a)(function(b){var g=b.classroomList,S=b.loading,A=b.globalSetting;return{classroomList:g,globalSetting:A,loading:S.models.classroomList}})(n)},QV2g:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=l;function l(){for(var x,T=[],t=0;t<256;t++){x=t;for(var c=0;c<8;c++)x=x&1?3988292384^x>>>1:x>>>1;T[t]=x}return T}var K=l();function U(x,T,t,c){var i=K,o=c+t;x^=-1;for(var h=c;h>>8^i[(x^T[h])&255];return x^-1}},SZEN:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.clientToElement=l;function l(K,U,x){var T=x.getBoundingClientRect(),t={x:0,y:0};return K=T.right?t.x=T.width-1:t.x=K-T.left,U=T.bottom?t.y=T.height-1:t.y=U-T.top,t}},SgaC:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c0;){if(r.rQwait("RRE",4+8))return!1;var d=r.rQshiftBytes(4),n=r.rQshift16(),b=r.rQshift16(),g=r.rQshift16(),S=r.rQshift16();m.fillRect(c+n,i+b,g,S,d),this._subrects--}return!0}}]),T}();f.default=x},VSMT:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.decodeUTF8=l,f.encodeUTF8=K;function l(U){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(U))}catch(T){if(T instanceof URIError&&x)return U;throw T}}function K(U){return unescape(encodeURIComponent(U))}},Y1PL:function(Te,f,E){"use strict";E.r(f),E.d(f,"ResizableTextArea",function(){return We});var l=E("wx14"),K=E("1OyB"),U=E("vuIU"),x=E("Ji7U"),T=E("LK+K"),t=E("q1tI"),c=E("VTBJ"),i=E("rePB"),o=E("Zm9Q"),h=E("Kwbf"),r=E("c+Xe"),m=E("m+aA"),w=E("bdgK"),v=new Map;function d(oe){oe.forEach(function(ye){var de,ae=ye.target;(de=v.get(ae))===null||de===void 0||de.forEach(function(J){return J(ae)})})}var n=new w.default(d),b=null,g=null;function S(oe,ye){v.has(oe)||(v.set(oe,new Set),n.observe(oe)),v.get(oe).add(ye)}function A(oe,ye){v.has(oe)&&(v.get(oe).delete(ye),v.get(oe).size||(n.unobserve(oe),v.delete(oe)))}var O=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(){return Object(K.a)(this,de),ye.apply(this,arguments)}return Object(U.a)(de,[{key:"render",value:function(){return this.props.children}}]),de}(t.Component),R=t.createContext(null);function B(oe){var ye=oe.children,de=oe.onBatchResize,ae=t.useRef(0),J=t.useRef([]),he=t.useContext(R),re=t.useCallback(function(xe,Le,fe){ae.current+=1;var Ce=ae.current;J.current.push({size:xe,element:Le,data:fe}),Promise.resolve().then(function(){Ce===ae.current&&(de==null||de(J.current),J.current=[])}),he==null||he(xe,Le,fe)},[de,he]);return t.createElement(R.Provider,{value:re},ye)}function F(oe){var ye=oe.children,de=oe.disabled,ae=t.useRef(null),J=t.useRef(null),he=t.useContext(R),re=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),xe=t.isValidElement(ye)&&Object(r.c)(ye),Le=xe?ye.ref:null,fe=t.useMemo(function(){return Object(r.a)(Le,ae)},[Le,ae]),Ce=t.useRef(oe);Ce.current=oe;var Q=t.useCallback(function(ne){var _e=Ce.current,me=_e.onResize,Z=_e.data,z=ne.getBoundingClientRect(),j=z.width,I=z.height,a=ne.offsetWidth,y=ne.offsetHeight,s=Math.floor(j),C=Math.floor(I);if(re.current.width!==s||re.current.height!==C||re.current.offsetWidth!==a||re.current.offsetHeight!==y){var te={width:s,height:C,offsetWidth:a,offsetHeight:y};re.current=te;var ue=a===Math.round(j)?j:a,le=y===Math.round(I)?I:y,Ue=Object(c.a)(Object(c.a)({},te),{},{offsetWidth:ue,offsetHeight:le});he==null||he(Ue,ne,Z),me&&Promise.resolve().then(function(){me(Ue,ne)})}},[]);return t.useEffect(function(){var ne=Object(m.a)(ae.current)||Object(m.a)(J.current);return ne&&!de&&S(ne,Q),function(){return A(ne,Q)}},[ae.current,de]),t.createElement(O,{ref:J},xe?t.cloneElement(ye,{ref:fe}):ye)}var L="rc-observer-key";function P(oe){var ye=oe.children,de=Object(o.a)(ye);return de.map(function(ae,J){var he=(ae==null?void 0:ae.key)||"".concat(L,"-").concat(J);return t.createElement(F,Object(l.a)({},oe,{key:he}),ae)})}P.Collection=B;var V=P,Y=E("bT9E"),q=E("TSYQ"),be=E.n(q),Ie=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -171,4 +171,4 @@ Fried seaweed z-index:-1000 !important; top:0 !important; right:0 !important -`,Xe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],Ke={},ke;function Re(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(ye&&Ke[de])return Ke[de];var ae=window.getComputedStyle(oe),J=ae.getPropertyValue("box-sizing")||ae.getPropertyValue("-moz-box-sizing")||ae.getPropertyValue("-webkit-box-sizing"),he=parseFloat(ae.getPropertyValue("padding-bottom"))+parseFloat(ae.getPropertyValue("padding-top")),re=parseFloat(ae.getPropertyValue("border-bottom-width"))+parseFloat(ae.getPropertyValue("border-top-width")),xe=Xe.map(function(fe){return"".concat(fe,":").concat(ae.getPropertyValue(fe))}).join(";"),Le={sizingStyle:xe,paddingSize:he,borderSize:re,boxSizing:J};return ye&&de&&(Ke[de]=Le),Le}function Fe(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ke||(ke=document.createElement("textarea"),ke.setAttribute("tab-index","-1"),ke.setAttribute("aria-hidden","true"),document.body.appendChild(ke)),oe.getAttribute("wrap")?ke.setAttribute("wrap",oe.getAttribute("wrap")):ke.removeAttribute("wrap");var J=Re(oe,ye),he=J.paddingSize,re=J.borderSize,xe=J.boxSizing,Le=J.sizingStyle;ke.setAttribute("style","".concat(Le,";").concat(Ie)),ke.value=oe.value||oe.placeholder||"";var fe=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,Q=ke.scrollHeight,ne;if(xe==="border-box"?Q+=re:xe==="content-box"&&(Q-=he),de!==null||ae!==null){ke.value=" ";var _e=ke.scrollHeight-he;de!==null&&(fe=_e*de,xe==="border-box"&&(fe=fe+he+re),Q=Math.max(fe,Q)),ae!==null&&(Ce=_e*ae,xe==="border-box"&&(Ce=Ce+he+re),ne=Q>Ce?"":"hidden",Q=Math.min(Ce,Q))}return{height:Q,minHeight:fe,maxHeight:Ce,overflowY:ne,resize:"none"}}var Be=E("Gytx"),ge=E.n(Be),Ae;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(Ae||(Ae={}));var Me=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(ae){var J;return Object(K.a)(this,de),J=ye.call(this,ae),J.nextFrameActionId=void 0,J.resizeFrameId=void 0,J.textArea=void 0,J.saveTextArea=function(he){J.textArea=he},J.handleResize=function(he){var re=J.state.resizeStatus,xe=J.props,Le=xe.autoSize,fe=xe.onResize;if(re!==Ae.NONE)return;typeof fe=="function"&&fe(he),Le&&J.resizeOnNextFrame()},J.resizeOnNextFrame=function(){cancelAnimationFrame(J.nextFrameActionId),J.nextFrameActionId=requestAnimationFrame(J.resizeTextarea)},J.resizeTextarea=function(){var he=J.props.autoSize;if(!he||!J.textArea)return;var re=he.minRows,xe=he.maxRows,Le=Fe(J.textArea,!1,re,xe);J.setState({textareaStyles:Le,resizeStatus:Ae.RESIZING},function(){cancelAnimationFrame(J.resizeFrameId),J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Ae.RESIZED},function(){J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Ae.NONE}),J.fixFirefoxAutoScroll()})})})})},J.renderTextArea=function(){var he=J.props,re=he.prefixCls,xe=re===void 0?"rc-textarea":re,Le=he.autoSize,fe=he.onResize,Ce=he.className,Q=he.disabled,ne=J.state,_e=ne.textareaStyles,me=ne.resizeStatus,Z=Object(Y.a)(J.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),z=be()(xe,Ce,Object(i.a)({},"".concat(xe,"-disabled"),Q));"value"in Z&&(Z.value=Z.value||"");var j=Object(c.a)(Object(c.a)(Object(c.a)({},J.props.style),_e),me===Ae.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return t.createElement(V,{onResize:J.handleResize,disabled:!(Le||fe)},t.createElement("textarea",Object(l.a)({},Z,{className:z,style:j,ref:J.saveTextArea})))},J.state={textareaStyles:{},resizeStatus:Ae.NONE},J}return Object(U.a)(de,[{key:"componentDidUpdate",value:function(J){(J.value!==this.props.value||!ge()(J.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var J=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(J,he)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),de}(t.Component),We=Me,je=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(ae){var J;Object(K.a)(this,de),J=ye.call(this,ae),J.resizableTextArea=void 0,J.focus=function(){J.resizableTextArea.textArea.focus()},J.saveTextArea=function(re){J.resizableTextArea=re},J.handleChange=function(re){var xe=J.props.onChange;J.setValue(re.target.value,function(){J.resizableTextArea.resizeTextarea()}),xe&&xe(re)},J.handleKeyDown=function(re){var xe=J.props,Le=xe.onPressEnter,fe=xe.onKeyDown;re.keyCode===13&&Le&&Le(re),fe&&fe(re)};var he=typeof ae.value=="undefined"||ae.value===null?ae.defaultValue:ae.value;return J.state={value:he},J}return Object(U.a)(de,[{key:"setValue",value:function(J,he){"value"in this.props||this.setState({value:J},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return t.createElement(We,Object(l.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(J){return"value"in J?{value:J.value}:null}}]),de}(t.Component),ze=f.default=je},YJ9k:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c=0;)_[W]=0}var h=0,r=1,m=2,w=3,v=258,d=29,n=256,b=n+1+d,g=30,S=19,A=2*b+1,O=15,R=16,B=7,F=256,L=16,P=17,V=18,Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],be=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xe=512,Ke=new Array((b+2)*2);o(Ke);var ke=new Array(g*2);o(ke);var Re=new Array(Xe);o(Re);var Fe=new Array(v-w+1);o(Fe);var Be=new Array(d);o(Be);var ge=new Array(g);o(ge);function Ae(_,W,H,se,ee){this.static_tree=_,this.extra_bits=W,this.extra_base=H,this.elems=se,this.max_length=ee,this.has_stree=_&&_.length}var Me,We,je;function ze(_,W){this.dyn_tree=_,this.max_code=0,this.stat_desc=W}function oe(_){return _<256?Re[_]:Re[256+(_>>>7)]}function ye(_,W){_.pending_buf[_.pending++]=W&255,_.pending_buf[_.pending++]=W>>>8&255}function de(_,W,H){_.bi_valid>R-H?(_.bi_buf|=W<<_.bi_valid&65535,ye(_,_.bi_buf),_.bi_buf=W>>R-_.bi_valid,_.bi_valid+=H-R):(_.bi_buf|=W<<_.bi_valid&65535,_.bi_valid+=H)}function ae(_,W,H){de(_,H[W*2],H[W*2+1])}function J(_,W){var H=0;do H|=_&1,_>>>=1,H<<=1;while(--W>0);return H>>>1}function he(_){_.bi_valid===16?(ye(_,_.bi_buf),_.bi_buf=0,_.bi_valid=0):_.bi_valid>=8&&(_.pending_buf[_.pending++]=_.bi_buf&255,_.bi_buf>>=8,_.bi_valid-=8)}function re(_,W){var H=W.dyn_tree,se=W.max_code,ee=W.stat_desc.static_tree,ie=W.stat_desc.has_stree,k=W.stat_desc.extra_bits,G=W.stat_desc.extra_base,u=W.stat_desc.max_length,$,we,e,M,D,p,X=0;for(M=0;M<=O;M++)_.bl_count[M]=0;for(H[_.heap[_.heap_max]*2+1]=0,$=_.heap_max+1;$u&&(M=u,X++),H[we*2+1]=M,we>se)continue;_.bl_count[M]++,D=0,we>=G&&(D=k[we-G]),p=H[we*2],_.opt_len+=p*(M+D),ie&&(_.static_len+=p*(ee[we*2+1]+D))}if(X===0)return;do{for(M=u-1;_.bl_count[M]===0;)M--;_.bl_count[M]--,_.bl_count[M+1]+=2,_.bl_count[u]--,X-=2}while(X>0);for(M=u;M!==0;M--)for(we=_.bl_count[M];we!==0;){if(e=_.heap[--$],e>se)continue;H[e*2+1]!==M&&(_.opt_len+=(M-H[e*2+1])*H[e*2],H[e*2+1]=M),we--}}function xe(_,W,H){var se=new Array(O+1),ee=0,ie,k;for(ie=1;ie<=O;ie++)se[ie]=ee=ee+H[ie-1]<<1;for(k=0;k<=W;k++){var G=_[k*2+1];if(G===0)continue;_[k*2]=J(se[G]++,G)}}function Le(){var _,W,H,se,ee,ie=new Array(O+1);for(H=0,se=0;se>=7;se8?ye(_,_.bi_buf):_.bi_valid>0&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function Q(_,W,H,se){Ce(_),se&&(ye(_,H),ye(_,~H)),K.arraySet(_.pending_buf,_.window,W,H,_.pending),_.pending+=H}function ne(_,W,H,se){var ee=W*2,ie=H*2;return _[ee]<_[ie]||_[ee]===_[ie]&&se[W]<=se[H]}function _e(_,W,H){for(var se=_.heap[H],ee=H<<1;ee<=_.heap_len&&!(ee<_.heap_len&&ne(W,_.heap[ee+1],_.heap[ee],_.depth)&&ee++,ne(W,se,_.heap[ee],_.depth));)_.heap[H]=_.heap[ee],H=ee,ee<<=1;_.heap[H]=se}function me(_,W,H){var se,ee,ie=0,k,G;if(_.last_lit!==0)do se=_.pending_buf[_.d_buf+ie*2]<<8|_.pending_buf[_.d_buf+ie*2+1],ee=_.pending_buf[_.l_buf+ie],ie++,se===0?ae(_,ee,W):(k=Fe[ee],ae(_,k+n+1,W),G=Y[k],G!==0&&(ee-=Be[k],de(_,ee,G)),se--,k=oe(se),ae(_,k,H),G=q[k],G!==0&&(se-=ge[k],de(_,se,G)));while(ie<_.last_lit);ae(_,F,W)}function Z(_,W){var H=W.dyn_tree,se=W.stat_desc.static_tree,ee=W.stat_desc.has_stree,ie=W.stat_desc.elems,k,G,u=-1,$;for(_.heap_len=0,_.heap_max=A,k=0;k>1;k>=1;k--)_e(_,H,k);$=ie;do k=_.heap[1],_.heap[1]=_.heap[_.heap_len--],_e(_,H,1),G=_.heap[1],_.heap[--_.heap_max]=k,_.heap[--_.heap_max]=G,H[$*2]=H[k*2]+H[G*2],_.depth[$]=(_.depth[k]>=_.depth[G]?_.depth[k]:_.depth[G])+1,H[k*2+1]=H[G*2+1]=$,_.heap[1]=$++,_e(_,H,1);while(_.heap_len>=2);_.heap[--_.heap_max]=_.heap[1],re(_,W),xe(H,u,_.bl_count)}function z(_,W,H){var se,ee=-1,ie,k=W[0*2+1],G=0,u=7,$=4;for(k===0&&(u=138,$=3),W[(H+1)*2+1]=65535,se=0;se<=H;se++){if(ie=k,k=W[(se+1)*2+1],++G=3&&!(_.bl_tree[Ie[W]*2+1]!==0);W--);return _.opt_len+=3*(W+1)+5+5+4,W}function a(_,W,H,se){var ee;for(de(_,W-257,5),de(_,H-1,5),de(_,se-4,4),ee=0;ee>>=1)if(W&1&&_.dyn_ltree[H*2]!==0)return t;if(_.dyn_ltree[9*2]!==0||_.dyn_ltree[10*2]!==0||_.dyn_ltree[13*2]!==0)return c;for(H=32;H0?(_.strm.data_type===i&&(_.strm.data_type=y(_)),Z(_,_.l_desc),Z(_,_.d_desc),k=I(_),ee=_.opt_len+3+7>>>3,ie=_.static_len+3+7>>>3,ie<=ee&&(ee=ie)):ee=ie=H+5,H+4<=ee&&W!==-1?te(_,W,H,se):_.strategy===T||ie===ee?(de(_,(r<<1)+(se?1:0),3),me(_,Ke,ke)):(de(_,(m<<1)+(se?1:0),3),a(_,_.l_desc.max_code+1,_.d_desc.max_code+1,k+1),me(_,_.dyn_ltree,_.dyn_dtree)),fe(_),se&&Ce(_)}function De(_,W,H){return _.pending_buf[_.d_buf+_.last_lit*2]=W>>>8&255,_.pending_buf[_.d_buf+_.last_lit*2+1]=W&255,_.pending_buf[_.l_buf+_.last_lit]=H&255,_.last_lit++,W===0?_.dyn_ltree[H*2]++:(_.matches++,W--,_.dyn_ltree[(Fe[H]+n+1)*2]++,_.dyn_dtree[oe(W)*2]++),_.last_lit===_.lit_bufsize-1}},eP3c:function(Te,f,E){"use strict";function l(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(u){return typeof u}:l=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},l(k)}Object.defineProperty(f,"__esModule",{value:!0}),f.inflateReset=a,f.inflateReset2=y,f.inflateResetKeep=I,f.inflateInit=C,f.inflateInit2=s,f.inflate=W,f.inflateEnd=H,f.inflateGetHeader=se,f.inflateSetDictionary=ee,f.inflateInfo=f.Z_DEFLATED=f.Z_BUF_ERROR=f.Z_MEM_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_NEED_DICT=f.Z_STREAM_END=f.Z_OK=f.Z_TREES=f.Z_BLOCK=f.Z_FINISH=void 0;var K=o(E("6BzB")),U=c(E("xlC8")),x=c(E("QV2g")),T=c(E("sjKO")),t=c(E("JSwD"));function c(k){return k&&k.__esModule?k:{default:k}}function i(){if(typeof WeakMap!="function")return null;var k=new WeakMap;return i=function(){return k},k}function o(k){if(k&&k.__esModule)return k;if(k===null||l(k)!=="object"&&typeof k!="function")return{default:k};var G=i();if(G&&G.has(k))return G.get(k);var u={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var we in k)if(Object.prototype.hasOwnProperty.call(k,we)){var e=$?Object.getOwnPropertyDescriptor(k,we):null;e&&(e.get||e.set)?Object.defineProperty(u,we,e):u[we]=k[we]}return u.default=k,G&&G.set(k,u),u}var h=0,r=1,m=2,w=4;f.Z_FINISH=w;var v=5;f.Z_BLOCK=v;var d=6;f.Z_TREES=d;var n=0;f.Z_OK=n;var b=1;f.Z_STREAM_END=b;var g=2;f.Z_NEED_DICT=g;var S=-2;f.Z_STREAM_ERROR=S;var A=-3;f.Z_DATA_ERROR=A;var O=-4;f.Z_MEM_ERROR=O;var R=-5;f.Z_BUF_ERROR=R;var B=8;f.Z_DEFLATED=B;var F=1,L=2,P=3,V=4,Y=5,q=6,be=7,Ie=8,Xe=9,Ke=10,ke=11,Re=12,Fe=13,Be=14,ge=15,Ae=16,Me=17,We=18,je=19,ze=20,oe=21,ye=22,de=23,ae=24,J=25,he=26,re=27,xe=28,Le=29,fe=30,Ce=31,Q=32,ne=852,_e=592,me=15,Z=me;function z(k){return(k>>>24&255)+(k>>>8&65280)+((k&65280)<<8)+((k&255)<<24)}function j(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new K.Buf16(320),this.work=new K.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function I(k){var G;return!k||!k.state?S:(G=k.state,k.total_in=k.total_out=G.total=0,k.msg="",G.wrap&&(k.adler=G.wrap&1),G.mode=F,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new K.Buf32(ne),G.distcode=G.distdyn=new K.Buf32(_e),G.sane=1,G.back=-1,n)}function a(k){var G;return!k||!k.state?S:(G=k.state,G.wsize=0,G.whave=0,G.wnext=0,I(k))}function y(k,G){var u,$;return!k||!k.state?S:($=k.state,G<0?(u=0,G=-G):(u=(G>>4)+1,G<48&&(G&=15)),G&&(G<8||G>15)?S:($.window!==null&&$.wbits!==G&&($.window=null),$.wrap=u,$.wbits=G,a(k)))}function s(k,G){var u,$;return k?($=new j,k.state=$,$.window=null,u=y(k,G),u!==n&&(k.state=null),u):S}function C(k){return s(k,Z)}var te=!0,ue,le;function De(k){if(te){var G;for(ue=new K.Buf32(512),le=new K.Buf32(32),G=0;G<144;)k.lens[G++]=8;for(;G<256;)k.lens[G++]=9;for(;G<280;)k.lens[G++]=7;for(;G<288;)k.lens[G++]=8;for((0,t.default)(r,k.lens,0,288,ue,0,k.work,{bits:9}),G=0;G<32;)k.lens[G++]=5;(0,t.default)(m,k.lens,0,32,le,0,k.work,{bits:5}),te=!1}k.lencode=ue,k.lenbits=9,k.distcode=le,k.distbits=5}function _(k,G,u,$){var we,e=k.state;return e.window===null&&(e.wsize=1<=e.wsize?(K.arraySet(e.window,G,u-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):(we=e.wsize-e.wnext,we>$&&(we=$),K.arraySet(e.window,G,u-$,we,e.wnext),$-=we,$?(K.arraySet(e.window,G,u-$,$,0),e.wnext=$,e.whave=e.wsize):(e.wnext+=we,e.wnext===e.wsize&&(e.wnext=0),e.whave>>8&255,u.check=(0,x.default)(u.check,Se,2,0),X=0,N=0,u.mode=L;break}if(u.flags=0,u.head&&(u.head.done=!1),!(u.wrap&1)||(((X&255)<<8)+(X>>8))%31){k.msg="incorrect header check",u.mode=fe;break}if((X&15)!==B){k.msg="unknown compression method",u.mode=fe;break}if(X>>>=4,N-=4,Ve=(X&15)+8,u.wbits===0)u.wbits=Ve;else if(Ve>u.wbits){k.msg="invalid window size",u.mode=fe;break}u.dmax=1<>8&1),u.flags&512&&(Se[0]=X&255,Se[1]=X>>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0,u.mode=P;case P:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>8&255,Se[2]=X>>>16&255,Se[3]=X>>>24&255,u.check=(0,x.default)(u.check,Se,4,0)),X=0,N=0,u.mode=V;case V:for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>8),u.flags&512&&(Se[0]=X&255,Se[1]=X>>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0,u.mode=Y;case Y:if(u.flags&1024){for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0}else u.head&&(u.head.extra=null);u.mode=q;case q:if(u.flags&1024&&(pe=u.length,pe>D&&(pe=D),pe&&(u.head&&(Ve=u.head.extra_len-u.length,u.head.extra||(u.head.extra=new Array(u.head.extra_len)),K.arraySet(u.head.extra,$,e,pe,Ve)),u.flags&512&&(u.check=(0,x.default)(u.check,$,pe,e)),D-=pe,e+=pe,u.length-=pe),u.length))break e;u.length=0,u.mode=be;case be:if(u.flags&2048){if(D===0)break e;pe=0;do Ve=$[e+pe++],u.head&&Ve&&u.length<65536&&(u.head.name+=String.fromCharCode(Ve));while(Ve&&pe>9&1,u.head.done=!0),k.adler=u.check=0,u.mode=Re;break;case Ke:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>=N&7,N-=N&7,u.mode=re;break}for(;N<3;){if(D===0)break e;D--,X+=$[e++]<>>=1,N-=1;switch(X&3){case 0:u.mode=Be;break;case 1:if(De(u),u.mode=ze,G===d){X>>>=2,N-=2;break e}break;case 2:u.mode=Me;break;case 3:k.msg="invalid block type",u.mode=fe}X>>>=2,N-=2;break;case Be:for(X>>>=N&7,N-=N&7;N<32;){if(D===0)break e;D--,X+=$[e++]<>>16^65535)){k.msg="invalid stored block lengths",u.mode=fe;break}if(u.length=X&65535,X=0,N=0,u.mode=ge,G===d)break e;case ge:u.mode=Ae;case Ae:if(pe=u.length,pe){if(pe>D&&(pe=D),pe>p&&(pe=p),pe===0)break e;K.arraySet(we,$,e,pe,M),D-=pe,e+=pe,p-=pe,M+=pe,u.length-=pe;break}u.mode=Re;break;case Me:for(;N<14;){if(D===0)break e;D--,X+=$[e++]<>>=5,N-=5,u.ndist=(X&31)+1,X>>>=5,N-=5,u.ncode=(X&15)+4,X>>>=4,N-=4,u.nlen>286||u.ndist>30){k.msg="too many length or distance symbols",u.mode=fe;break}u.have=0,u.mode=We;case We:for(;u.have>>=3,N-=3}for(;u.have<19;)u.lens[$e[u.have++]]=0;if(u.lencode=u.lendyn,u.lenbits=7,Pe={bits:u.lenbits},ve=(0,t.default)(h,u.lens,0,19,u.lencode,0,u.work,Pe),u.lenbits=Pe.bits,ve){k.msg="invalid code lengths set",u.mode=fe;break}u.have=0,u.mode=je;case je:for(;u.have>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=Ne,N-=Ne,u.lens[u.have++]=Ze;else{if(Ze===16){for(He=Ne+2;N>>=Ne,N-=Ne,u.have===0){k.msg="invalid bit length repeat",u.mode=fe;break}Ve=u.lens[u.have-1],pe=3+(X&3),X>>>=2,N-=2}else if(Ze===17){for(He=Ne+3;N>>=Ne,N-=Ne,Ve=0,pe=3+(X&7),X>>>=3,N-=3}else{for(He=Ne+7;N>>=Ne,N-=Ne,Ve=0,pe=11+(X&127),X>>>=7,N-=7}if(u.have+pe>u.nlen+u.ndist){k.msg="invalid bit length repeat",u.mode=fe;break}for(;pe--;)u.lens[u.have++]=Ve}}if(u.mode===fe)break;if(u.lens[256]===0){k.msg="invalid code -- missing end-of-block",u.mode=fe;break}if(u.lenbits=9,Pe={bits:u.lenbits},ve=(0,t.default)(r,u.lens,0,u.nlen,u.lencode,0,u.work,Pe),u.lenbits=Pe.bits,ve){k.msg="invalid literal/lengths set",u.mode=fe;break}if(u.distbits=6,u.distcode=u.distdyn,Pe={bits:u.distbits},ve=(0,t.default)(m,u.lens,u.nlen,u.ndist,u.distcode,0,u.work,Pe),u.distbits=Pe.bits,ve){k.msg="invalid distances set",u.mode=fe;break}if(u.mode=ze,G===d)break e;case ze:u.mode=oe;case oe:if(D>=6&&p>=258){k.next_out=M,k.avail_out=p,k.next_in=e,k.avail_in=D,u.hold=X,u.bits=N,(0,T.default)(k,ce),M=k.next_out,we=k.output,p=k.avail_out,e=k.next_in,$=k.input,D=k.avail_in,X=u.hold,N=u.bits,u.mode===Re&&(u.back=-1);break}for(u.back=0;!(Ge=u.lencode[X&(1<>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ne=Ge>>>24,Ye=Ge>>>16&255,Ze=Ge&65535,qe+Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ne,N-=Ne,u.back+=Ne,u.length=Ze,Ye===0){u.mode=he;break}if(Ye&32){u.back=-1,u.mode=Re;break}if(Ye&64){k.msg="invalid literal/length code",u.mode=fe;break}u.extra=Ye&15,u.mode=ye;case ye:if(u.extra){for(He=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}u.was=u.length,u.mode=de;case de:for(;!(Ge=u.distcode[X&(1<>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ne=Ge>>>24,Ye=Ge>>>16&255,Ze=Ge&65535,qe+Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ne,N-=Ne,u.back+=Ne,Ye&64){k.msg="invalid distance code",u.mode=fe;break}u.offset=Ze,u.extra=Ye&15,u.mode=ae;case ae:if(u.extra){for(He=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}if(u.offset>u.dmax){k.msg="invalid distance too far back",u.mode=fe;break}u.mode=J;case J:if(p===0)break e;if(pe=ce-p,u.offset>pe){if(pe=u.offset-pe,pe>u.whave&&u.sane){k.msg="invalid distance too far back",u.mode=fe;break}pe>u.wnext?(pe-=u.wnext,Oe=u.wsize-pe):Oe=u.wnext-pe,pe>u.length&&(pe=u.length),tt=u.window}else tt=we,Oe=M-u.offset,pe=u.length;pe>p&&(pe=p),p-=pe,u.length-=pe;do we[M++]=tt[Oe++];while(--pe);u.length===0&&(u.mode=oe);break;case he:if(p===0)break e;we[M++]=u.length,p--,u.mode=oe;break;case re:if(u.wrap){for(;N<32;){if(D===0)break e;D--,X|=$[e++]<>>3]&1<>>10,this.keys[Ae]|=(We&4032)>>>6,++Ae,this.keys[Ae]=(Me&258048)<<12,this.keys[Ae]|=(Me&63)<<16,this.keys[Ae]|=(We&258048)>>>4,this.keys[Ae]|=We&63,++Ae}}return U(R,[{key:"enc8",value:function(F){var L=F.slice(),P=0,V,Y,q;V=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],Y=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],q=(V>>>4^Y)&252645135,Y^=q,V^=q<<4,q=(V>>>16^Y)&65535,Y^=q,V^=q<<16,q=(Y>>>2^V)&858993459,V^=q,Y^=q<<2,q=(Y>>>8^V)&16711935,V^=q,Y^=q<<8,Y=Y<<1|Y>>>31&1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<1|V>>>31&1;for(var be=0,Ie=0;be<8;++be){q=Y<<28|Y>>>4,q^=this.keys[Ie++];var Xe=S[q&63];Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=w[q>>>24&63],q=Y^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],V^=Xe,q=V<<28|V>>>4,q^=this.keys[Ie++],Xe=S[q&63],Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=w[q>>>24&63],q=V^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],Y^=Xe}for(Y=Y<<31|Y>>>1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<31|V>>>1,q=(V>>>8^Y)&16711935,Y^=q,V^=q<<8,q=(V>>>2^Y)&858993459,Y^=q,V^=q<<2,q=(Y>>>16^V)&65535,V^=q,Y^=q<<16,q=(Y>>>4^V)&252645135,V^=q,Y^=q<<4,q=[Y,V],P=0;P<8;P++)L[P]=(q[P>>>2]>>>8*(3-P%4))%256,L[P]<0&&(L[P]+=256);return L}},{key:"encrypt",value:function(F){return this.enc8(F.slice(0,8)).concat(this.enc8(F.slice(8,16)))}}]),R}();f.default=O},lNSK:function(Te,f,E){"use strict";function l(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(D){return typeof D}:l=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},l(e)}Object.defineProperty(f,"__esModule",{value:!0}),f.deflateInit=k,f.deflateInit2=ie,f.deflateReset=se,f.deflateResetKeep=H,f.deflateSetHeader=ee,f.deflate=G,f.deflateEnd=u,f.deflateSetDictionary=$,f.deflateInfo=f.Z_DEFLATED=f.Z_UNKNOWN=f.Z_DEFAULT_STRATEGY=f.Z_FIXED=f.Z_RLE=f.Z_HUFFMAN_ONLY=f.Z_FILTERED=f.Z_DEFAULT_COMPRESSION=f.Z_BUF_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_STREAM_END=f.Z_OK=f.Z_BLOCK=f.Z_FINISH=f.Z_FULL_FLUSH=f.Z_PARTIAL_FLUSH=f.Z_NO_FLUSH=void 0;var K=o(E("6BzB")),U=o(E("c5fP")),x=c(E("xlC8")),T=c(E("QV2g")),t=c(E("xSIq"));function c(e){return e&&e.__esModule?e:{default:e}}function i(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(e===null||l(e)!=="object"&&typeof e!="function")return{default:e};var M=i();if(M&&M.has(e))return M.get(e);var D={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var X in e)if(Object.prototype.hasOwnProperty.call(e,X)){var N=p?Object.getOwnPropertyDescriptor(e,X):null;N&&(N.get||N.set)?Object.defineProperty(D,X,N):D[X]=e[X]}return D.default=e,M&&M.set(e,D),D}var h=0;f.Z_NO_FLUSH=h;var r=1;f.Z_PARTIAL_FLUSH=r;var m=3;f.Z_FULL_FLUSH=m;var w=4;f.Z_FINISH=w;var v=5;f.Z_BLOCK=v;var d=0;f.Z_OK=d;var n=1;f.Z_STREAM_END=n;var b=-2;f.Z_STREAM_ERROR=b;var g=-3;f.Z_DATA_ERROR=g;var S=-5;f.Z_BUF_ERROR=S;var A=-1;f.Z_DEFAULT_COMPRESSION=A;var O=1;f.Z_FILTERED=O;var R=2;f.Z_HUFFMAN_ONLY=R;var B=3;f.Z_RLE=B;var F=4;f.Z_FIXED=F;var L=0;f.Z_DEFAULT_STRATEGY=L;var P=2;f.Z_UNKNOWN=P;var V=8;f.Z_DEFLATED=V;var Y=9,q=15,be=8,Ie=29,Xe=256,Ke=Xe+1+Ie,ke=30,Re=19,Fe=2*Ke+1,Be=15,ge=3,Ae=258,Me=Ae+ge+1,We=32,je=42,ze=69,oe=73,ye=91,de=103,ae=113,J=666,he=1,re=2,xe=3,Le=4,fe=3;function Ce(e,M){return e.msg=t.default[M],M}function Q(e){return(e<<1)-(e>4?9:0)}function ne(e){for(var M=e.length;--M>=0;)e[M]=0}function _e(e){var M=e.state,D=M.pending;if(D>e.avail_out&&(D=e.avail_out),D===0)return;K.arraySet(e.output,M.pending_buf,M.pending_out,D,e.next_out),e.next_out+=D,M.pending_out+=D,e.total_out+=D,e.avail_out-=D,M.pending-=D,M.pending===0&&(M.pending_out=0)}function me(e,M){U._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,M),e.block_start=e.strstart,_e(e.strm)}function Z(e,M){e.pending_buf[e.pending++]=M}function z(e,M){e.pending_buf[e.pending++]=M>>>8&255,e.pending_buf[e.pending++]=M&255}function j(e,M,D,p){var X=e.avail_in;return X>p&&(X=p),X===0?0:(e.avail_in-=X,K.arraySet(M,e.input,e.next_in,X,D),e.state.wrap===1?e.adler=(0,x.default)(e.adler,M,X,D):e.state.wrap===2&&(e.adler=(0,T.default)(e.adler,M,X,D)),e.next_in+=X,e.total_in+=X,X)}function I(e,M){var D=e.max_chain_length,p=e.strstart,X,N,Ee=e.prev_length,ce=e.nice_match,pe=e.strstart>e.w_size-Me?e.strstart-(e.w_size-Me):0,Oe=e.window,tt=e.w_mask,Ge=e.prev,Ne=e.strstart+Ae,Ye=Oe[p+Ee-1],Ze=Oe[p+Ee];e.prev_length>=e.good_match&&(D>>=2),ce>e.lookahead&&(ce=e.lookahead);do{if(X=M,Oe[X+Ee]!==Ze||Oe[X+Ee-1]!==Ye||Oe[X]!==Oe[p]||Oe[++X]!==Oe[p+1])continue;p+=2,X++;do;while(Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&pEe){if(e.match_start=M,Ee=N,N>=ce)break;Ye=Oe[p+Ee-1],Ze=Oe[p+Ee]}}while((M=Ge[M&tt])>pe&&--D!==0);return Ee<=e.lookahead?Ee:e.lookahead}function a(e){var M=e.w_size,D,p,X,N,Ee;do{if(N=e.window_size-e.lookahead-e.strstart,e.strstart>=M+(M-Me)){K.arraySet(e.window,e.window,M,M,0),e.match_start-=M,e.strstart-=M,e.block_start-=M,p=e.hash_size,D=p;do X=e.head[--D],e.head[D]=X>=M?X-M:0;while(--p);p=M,D=p;do X=e.prev[--D],e.prev[D]=X>=M?X-M:0;while(--p);N+=M}if(e.strm.avail_in===0)break;if(p=j(e.strm,e.window,e.strstart+e.lookahead,N),e.lookahead+=p,e.lookahead+e.insert>=ge)for(Ee=e.strstart-e.insert,e.ins_h=e.window[Ee],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(D=e.pending_buf_size-5);;){if(e.lookahead<=1){if(a(e),e.lookahead===0&&M===h)return he;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var p=e.block_start+D;if((e.strstart===0||e.strstart>=p)&&(e.lookahead=e.strstart-p,e.strstart=p,me(e,!1),e.strm.avail_out===0))return he;if(e.strstart-e.block_start>=e.w_size-Me&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):(e.strstart>e.block_start&&(me(e,!1),e.strm.avail_out===0),he)}function s(e,M){for(var D,p;;){if(e.lookahead=ge&&(e.ins_h=(e.ins_h<=ge)if(p=U._tr_tally(e,e.strstart-e.match_start,e.match_length-ge),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ge){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ge&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ge-1)),e.prev_length>=ge&&e.match_length<=e.prev_length){X=e.strstart+e.lookahead-ge,p=U._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ge),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=X&&(e.ins_h=(e.ins_h<=ge&&e.strstart>0&&(X=e.strstart-1,p=Ee[X],p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X])){N=e.strstart+Ae;do;while(p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&Xe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ge?(D=U._tr_tally(e,1,e.match_length-ge),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function ue(e,M){for(var D;;){if(e.lookahead===0&&(a(e),e.lookahead===0)){if(M===h)return he;break}if(e.match_length=0,D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function le(e,M,D,p,X){this.good_length=e,this.max_lazy=M,this.nice_length=D,this.max_chain=p,this.func=X}var De;De=[new le(0,0,0,0,y),new le(4,4,8,4,s),new le(4,5,16,8,s),new le(4,6,32,32,s),new le(4,4,16,16,C),new le(8,16,32,32,C),new le(8,16,128,128,C),new le(8,32,128,256,C),new le(32,128,258,1024,C),new le(32,258,258,4096,C)];function _(e){e.window_size=2*e.w_size,ne(e.head),e.max_lazy_match=De[e.level].max_lazy,e.good_match=De[e.level].good_length,e.nice_match=De[e.level].nice_length,e.max_chain_length=De[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ge-1,e.match_available=0,e.ins_h=0}function W(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new K.Buf16(Fe*2),this.dyn_dtree=new K.Buf16((2*ke+1)*2),this.bl_tree=new K.Buf16((2*Re+1)*2),ne(this.dyn_ltree),ne(this.dyn_dtree),ne(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new K.Buf16(Be+1),this.heap=new K.Buf16(2*Ke+1),ne(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new K.Buf16(2*Ke+1),ne(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function H(e){var M;return!e||!e.state?Ce(e,b):(e.total_in=e.total_out=0,e.data_type=P,M=e.state,M.pending=0,M.pending_out=0,M.wrap<0&&(M.wrap=-M.wrap),M.status=M.wrap?je:ae,e.adler=M.wrap===2?0:1,M.last_flush=h,U._tr_init(M),d)}function se(e){var M=H(e);return M===d&&_(e.state),M}function ee(e,M){return!e||!e.state||e.state.wrap!==2?b:(e.state.gzhead=M,d)}function ie(e,M,D,p,X,N){if(!e)return b;var Ee=1;if(M===A&&(M=6),p<0?(Ee=0,p=-p):p>15&&(Ee=2,p-=16),X<1||X>Y||D!==V||p<8||p>15||M<0||M>9||N<0||N>F)return Ce(e,b);p===8&&(p=9);var ce=new W;return e.state=ce,ce.strm=e,ce.wrap=Ee,ce.gzhead=null,ce.w_bits=p,ce.w_size=1<v||M<0)return e?Ce(e,b):b;if(p=e.state,!e.output||!e.input&&e.avail_in!==0||p.status===J&&M!==w)return Ce(e,e.avail_out===0?S:b);if(p.strm=e,D=p.last_flush,p.last_flush=M,p.status===je)if(p.wrap===2)e.adler=0,Z(p,31),Z(p,139),Z(p,8),p.gzhead?(Z(p,(p.gzhead.text?1:0)+(p.gzhead.hcrc?2:0)+(p.gzhead.extra?4:0)+(p.gzhead.name?8:0)+(p.gzhead.comment?16:0)),Z(p,p.gzhead.time&255),Z(p,p.gzhead.time>>8&255),Z(p,p.gzhead.time>>16&255),Z(p,p.gzhead.time>>24&255),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,p.gzhead.os&255),p.gzhead.extra&&p.gzhead.extra.length&&(Z(p,p.gzhead.extra.length&255),Z(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=ze):(Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,fe),p.status=ae);else{var Ee=V+(p.w_bits-8<<4)<<8,ce=-1;p.strategy>=R||p.level<2?ce=0:p.level<6?ce=1:p.level===6?ce=2:ce=3,Ee|=ce<<6,p.strstart!==0&&(Ee|=We),Ee+=31-Ee%31,p.status=ae,z(p,Ee),p.strstart!==0&&(z(p,e.adler>>>16),z(p,e.adler&65535)),e.adler=1}if(p.status===ze)if(p.gzhead.extra){for(X=p.pending;p.gzindex<(p.gzhead.extra.length&65535)&&!(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size));)Z(p,p.gzhead.extra[p.gzindex]&255),p.gzindex++;p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),p.gzindex===p.gzhead.extra.length&&(p.gzindex=0,p.status=oe)}else p.status=oe;if(p.status===oe)if(p.gzhead.name){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.gzindex=0,p.status=ye)}else p.status=ye;if(p.status===ye)if(p.gzhead.comment){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.status=de)}else p.status=de;if(p.status===de&&(p.gzhead.hcrc?(p.pending+2>p.pending_buf_size&&_e(e),p.pending+2<=p.pending_buf_size&&(Z(p,e.adler&255),Z(p,e.adler>>8&255),e.adler=0,p.status=ae)):p.status=ae),p.pending!==0){if(_e(e),e.avail_out===0)return p.last_flush=-1,d}else if(e.avail_in===0&&Q(M)<=Q(D)&&M!==w)return Ce(e,S);if(p.status===J&&e.avail_in!==0)return Ce(e,S);if(e.avail_in!==0||p.lookahead!==0||M!==h&&p.status!==J){var pe=p.strategy===R?ue(p,M):p.strategy===B?te(p,M):De[p.level].func(p,M);if((pe===xe||pe===Le)&&(p.status=J),pe===he||pe===xe)return e.avail_out===0&&(p.last_flush=-1),d;if(pe===re&&(M===r?U._tr_align(p):M!==v&&(U._tr_stored_block(p,0,0,!1),M===m&&(ne(p.head),p.lookahead===0&&(p.strstart=0,p.block_start=0,p.insert=0))),_e(e),e.avail_out===0))return p.last_flush=-1,d}return M!==w?d:p.wrap<=0?n:(p.wrap===2?(Z(p,e.adler&255),Z(p,e.adler>>8&255),Z(p,e.adler>>16&255),Z(p,e.adler>>24&255),Z(p,e.total_in&255),Z(p,e.total_in>>8&255),Z(p,e.total_in>>16&255),Z(p,e.total_in>>24&255)):(z(p,e.adler>>>16),z(p,e.adler&65535)),_e(e),p.wrap>0&&(p.wrap=-p.wrap),p.pending!==0?d:n)}function u(e){var M;return!e||!e.state?b:(M=e.state.status,M!==je&&M!==ze&&M!==oe&&M!==ye&&M!==de&&M!==ae&&M!==J?Ce(e,b):(e.state=null,M===ae?Ce(e,g):d))}function $(e,M){var D=M.length,p,X,N,Ee,ce,pe,Oe,tt;if(!e||!e.state)return b;if(p=e.state,Ee=p.wrap,Ee===2||Ee===1&&p.status!==je||p.lookahead)return b;for(Ee===1&&(e.adler=(0,x.default)(e.adler,M,D,0)),p.wrap=0,D>=p.w_size&&(Ee===0&&(ne(p.head),p.strstart=0,p.block_start=0,p.insert=0),tt=new K.Buf8(p.w_size),K.arraySet(tt,M,D-p.w_size,p.w_size,0),M=tt,D=p.w_size),ce=e.avail_in,pe=e.next_in,Oe=e.input,e.avail_in=D,e.next_in=0,e.input=M,a(p);p.lookahead>=ge;){X=p.strstart,N=p.lookahead-(ge-1);do p.ins_h=(p.ins_h<2&&k(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function tt(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!1})}function Ge(){H({type:ae.SET_IS_LARGE,payload:!we})}function Ne(ve){var Se;return me.current&&(Se=new R.default(function(Pe){var He=Object(v.a)(Pe),$e;try{for(He.s();!($e=He.n()).done;){var at,et=$e.value;if((_e==null||((at=_e.shixun)===null||at===void 0)?void 0:at.windows_connection_mode)==="rdp"&&ot(),et.target.offsetHeight>0||et.target.offsetWidth>0){var lt;ve==null||((lt=ve._eventHandlers)===null||lt===void 0)||lt.windowResize()}}}catch(Ue){He.e(Ue)}finally{He.f()}}),Se.observe(me.current)),Se}var Ye=function(){var ve=Object(w.a)(g.a.mark(function Se(){var Pe,He,$e,at,et,lt,Ue,nt,Je,it,rt;return g.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return lt=(Pe=ye())!==null&&Pe!==void 0&&Pe.homework_common_id?{homework_common_id:(He=ye())===null||He===void 0?void 0:He.homework_common_id}:{},Qe.next=3,Object(ke.a)("/api/myshixuns/".concat(($e=_e.myshixun)===null||$e===void 0?void 0:$e.identifier,"/start.json"),{method:"get",params:Object(n.a)(Object(n.a)(Object(n.a)({},Ee),lt),{},{template_id:y||""})});case 3:if(Ue=Qe.sent,!(Ue!=null&&(at=Ue.data)!==null&&at!==void 0&&(et=at.data_list)!==null&&et!==void 0&&et.length)){Qe.next=7;break}return Y.a.publish("pod-restrict-data",{identifier:Ue==null||((nt=Ue.data)===null||nt===void 0)?void 0:nt.identifier,data_list:Ue==null||((Je=Ue.data)===null||Je===void 0)?void 0:Je.data_list}),Qe.abrupt("return");case 7:if(!((Ue==null?void 0:Ue.status)===-3)){Qe.next=9;break}return Qe.abrupt("return",new Promise(function(){var _t=Object(w.a)(g.a.mark(function dt(pt,ct){return g.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:m.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var gt=Object(w.a)(g.a.mark(function vt(){return g.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return clearTimeout(N.current),X(0),ft.next=4,Object(Re.f)(Ee.taskId,Ue==null?void 0:Ue.message);case 4:return k(ie+1),ft.abrupt("return");case 6:case"end":return ft.stop()}},vt)}));function bt(){return gt.apply(this,arguments)}return bt}()});case 1:case"end":return ht.stop()}},dt)}));return function(dt,pt){return _t.apply(this,arguments)}}()));case 9:if(!((Ue==null?void 0:Ue.status)===-1)){Qe.next=11;break}throw new String(Ue==null?void 0:Ue.message);case 11:return Q&&(Object(L.W)("PVEAuthCookie",Ue==null||((it=Ue.data)===null||it===void 0||((rt=it.cookie_options)===null||rt===void 0))?void 0:rt.cookies_value,1),Object(L.W)("PVELangCookie","zh_CN",1)),Y.a.publish("update-windows-time",Ue==null?void 0:Ue.data),Qe.abrupt("return",Ue);case 14:case"end":return Qe.stop()}},Se)}));return function(){return ve.apply(this,arguments)}}();Object(S.useEffect)(function(){var ve,Se;function Pe(nt){fe&&(h.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),H({type:ae.SET_LOADING,payload:!0}),k(ie+1))}Y.a.subscribe("reset-linux-windows-loading",function(){H({type:ae.SET_LOADING,payload:!0})}),Y.a.subscribe("reset-linux-windos-vnc",function(){k(ie+1)});function He(nt){X(100),clearTimeout(N.current),setTimeout(function(){z.current.resizeSession=!1,H({type:ae.SET_LOADING,payload:!1})},1300),Y.a.subscribe("send-ctrl-alt-delete",function(){var Je;(Je=ve)===null||Je===void 0||Je.sendCtrlAltDel()})}function $e(nt){var Je=oe(nt.detail.text);H({type:ae.SET_TRANSFER_CONTENT,payload:Je})}if((fe||Le||Ce||Q&&y)&&me.current){var at;clearTimeout(N.current),(_e==null||((at=_e.shixun)===null||at===void 0)?void 0:at.windows_connection_mode)==="rdp"&&ot(),new Promise(Object(w.a)(g.a.mark(function nt(){var Je,it,rt,mt,Qe,_t,dt,pt,ct,yt,ht,gt,bt,vt,xt;return g.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return it=ye(),rt="",st.next=4,Ye();case 4:if(Qe=st.sent,!(Ce||Q)){st.next=11;break}return j.current.src=(Qe==null||((_t=Qe.data)===null||_t===void 0)?void 0:_t.link_url)+"&time="+Date.now(),H({type:ae.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),st.abrupt("return");case 11:fe?(mt="Edu123",rt=decodeURIComponent(Qe==null||((dt=Qe.data)===null||dt===void 0)?void 0:dt.link_url)):(ct=new URL(decodeURIComponent(Qe==null||((pt=Qe.data)===null||pt===void 0)?void 0:pt.link_url)),yt=ct.protocol,ht=ct.searchParams,gt=ct.host,bt=ct.search,vt=Object(L.T)(bt),mt=ht.get("password"),rt="".concat(yt==="https:"?"wss":"ws","://").concat(gt,"/").concat(vt.path||"websockify"));case 12:if(!((_e==null||((Je=_e.shixun)===null||Je===void 0)?void 0:Je.windows_connection_mode)==="rdp")){st.next=18;break}return Ne(),j.current.style.cssText=j.current.style.cssText+"width:1920px;height:1080px;position:initial",j.current.src="/rdp.html?tpiId=".concat(_e==null||((xt=_e.myshixun)===null||xt===void 0)?void 0:xt.id),H({type:ae.SET_LOADING,payload:!1}),st.abrupt("return");case 18:ve=new V.a(me.current,rt,{credentials:{password:mt},wsProtocols:["binary"],resize:"scale",show_dot:!0}),Se=Ne(ve),ve.viewOnly=it.view_only||!1,fe?ve.scaleViewport=!0:ve.scaleViewport=it.scale||!1,ve.scaleViewport=it.scale||!0,ve.showDotCursor=!0,ve.resizeSession=!0,z.current=ve,ve.addEventListener("disconnect",Pe),ve.addEventListener("connect",He),ve.addEventListener("clipboard",$e);case 29:case"end":return st.stop()}},nt)})));var et=Y.a.subscribe("vnc-reseting",function(){X(0),H({type:ae.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),lt=Y.a.subscribe("vnc-enlarge",function(nt){}),Ue=Y.a.subscribe("show-clipboard-box",function(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!0})});return X(0),function(){var nt,Je,it,rt;(nt=ve)===null||nt===void 0||nt.removeEventListener("disconnect",Pe),(Je=ve)===null||Je===void 0||Je.removeEventListener("connect",He),(it=ve)===null||it===void 0||it.removeEventListener("clipboard",$e),et(),lt(),Ue(),(rt=Se)===null||rt===void 0||rt.unobserve(me.current)}}},[Le,fe,Ce,ie,y]),Object(S.useEffect)(function(){var ve,Se;if(Q&&(_e==null||((ve=_e.shixun_virtual_templates)===null||ve===void 0)?void 0:ve.length)===1){var Pe,He;s(_e==null||((Pe=_e.shixun_virtual_templates)===null||Pe===void 0||((He=Pe[0])===null||He===void 0))?void 0:He.template_id)}else Q&&(_e==null||((Se=_e.shixun_virtual_templates)===null||Se===void 0)?void 0:Se.length)>1&&le(!0)},[Q]);function Ze(ve){return qe.apply(this,arguments)}function qe(){return qe=Object(w.a)(g.a.mark(function ve(Se){var Pe,He,$e;return g.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(!Le){et.next=8;break}return Pe=Se,et.next=4,Object(ke.a)("/api/tasks/".concat(Ee.taskId,"/vnc_paste.json"),{method:"post",body:{content:je.Base64.encode(Pe)}});case 4:He=et.sent,(He==null?void 0:He.status)===0&&(H({type:ae.SET_TRANSFER_CONTENT,payload:Se}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),tt()),et.next=12;break;case 8:($e=z.current)===null||$e===void 0||$e.clipboardPasteFrom(Se),H({type:ae.SET_TRANSFER_CONTENT,payload:Se}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),tt();case 12:case"end":return et.stop()}},ve)})),qe.apply(this,arguments)}function ot(){var ve,Se;ve=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),j.current.parentElement.className="wh1080p",j.current.parentElement.style.cssText="transform:scale(".concat(ve,");transform-origin:center center"),me.current.style.cssText="translate(-50%, -50%) scale("+ve+")"}Object(S.useEffect)(function(){p==0&&(clearTimeout(N.current),ut())},[p]);var ut=function ve(){p>99?p=99:(p=p+1,N.current=setTimeout(function(){ve()},1500)),p<100&&X(p)},Ve=Object(S.useMemo)(function(){var ve;return u?"none":Ce||Q||fe&&(_e==null||((ve=_e.shixun)===null||ve===void 0)?void 0:ve.windows_connection_mode)==="rdp"?"block":"none"},[Ce,u,Q,fe]);return A.a.createElement(S.Fragment,null,ue&&A.a.createElement("div",{className:Ae.a.selectImage},A.a.createElement("section",{className:Ae.a.container},A.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),A.a.createElement("aside",null,_e==null||((xe=_e.shixun_virtual_templates)===null||xe===void 0)?void 0:xe.map(function(ve,Se){return A.a.createElement(x.a,{align:"middle",key:Se},A.a.createElement(i.a,{flex:"1"},ve.template_name),A.a.createElement(i.a,null,A.a.createElement(t.a,{type:"primary",onClick:function(){s(ve.template_id),le(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),we&&A.a.createElement("a",{className:"btn-vnc-resize",onClick:Ge},A.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),A.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:Ve==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},A.a.createElement("div",null,A.a.createElement("iframe",{style:{position:we?"fixed":"absolute",left:0,top:we?54:40,width:"100%",height:"calc(100% - ".concat(we?"100px":"45px",")")},frameBorder:"0",ref:j,allowFullScreen:!0}))),A.a.createElement("div",{style:{position:we?"fixed":"absolute",left:0,top:we?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(we?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(we?"full-screen":"")},u?A.a.createElement(O.a,{message:G,style:{color:"#0152d9"}},A.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},A.a.createElement(K.a,{percent:p,format:function(Se){return A.a.createElement("span",{className:"c-white"},Se,"%")}}))):null,A.a.createElement("div",{ref:me,className:"vnc-panel ".concat(u?"hidden zIndexf1":"animated fadeIn")})),A.a.createElement(B.a,null,A.a.createElement(m.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:$,onCancel:tt,footer:null},A.a.createElement(Ke,{onCancel:tt,onSave:Ze,content:e}))))}},rwxt:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("GdRQ");function K(c,i){if(!(c instanceof i))throw new TypeError("Cannot call a class as a function")}function U(c,i){for(var o=0;o>>24,b>>>=F,g-=F,F=B>>>16&255,F===0)be[o++]=B&65535;else if(F&16){L=B&65535,F&=15,F&&(g>>=F,g-=F),g<15&&(b+=q[c++]<>>24,b>>>=F,g-=F,F=B>>>16&255,F&16){if(P=B&65535,F&=15,gm){x.msg="invalid distance too far back",t.mode=l;break e}if(b>>>=F,g-=F,F=o-h,P>F){if(F=P-F,F>v&&t.sane){x.msg="invalid distance too far back",t.mode=l;break e}if(V=0,Y=n,d===0){if(V+=w-F,F2;)be[o++]=Y[V++],be[o++]=Y[V++],be[o++]=Y[V++],L-=3;L&&(be[o++]=Y[V++],L>1&&(be[o++]=Y[V++]))}else{V=o-P;do be[o++]=be[V++],be[o++]=be[V++],be[o++]=be[V++],L-=3;while(L>2);L&&(be[o++]=be[V++],L>1&&(be[o++]=be[V++]))}}else if((F&64)===0){B=A[(B&65535)+(b&(1<>3,c-=L,g-=L<<3,b&=(1<0){var w=[m],v=m.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,r=(0,l.deflate)(this.strm,l.Z_FULL_FLUSH),r<0)throw new Error("zlib deflate failed");var d=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);v+=d.length,w.push(d)}while(this.strm.avail_in>0);for(var n=new Uint8Array(v),b=0,g=0;g>>16&65535|0,i=0;x!==0;){i=x>2e3?2e3:x,x-=i;do t=t+U[T++]|0,c=c+t|0;while(--i);t%=65521,c%=65521}return t|c<<16|0}}}]); +`,Xe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],Ke={},ke;function Re(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(ye&&Ke[de])return Ke[de];var ae=window.getComputedStyle(oe),J=ae.getPropertyValue("box-sizing")||ae.getPropertyValue("-moz-box-sizing")||ae.getPropertyValue("-webkit-box-sizing"),he=parseFloat(ae.getPropertyValue("padding-bottom"))+parseFloat(ae.getPropertyValue("padding-top")),re=parseFloat(ae.getPropertyValue("border-bottom-width"))+parseFloat(ae.getPropertyValue("border-top-width")),xe=Xe.map(function(fe){return"".concat(fe,":").concat(ae.getPropertyValue(fe))}).join(";"),Le={sizingStyle:xe,paddingSize:he,borderSize:re,boxSizing:J};return ye&&de&&(Ke[de]=Le),Le}function Fe(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ke||(ke=document.createElement("textarea"),ke.setAttribute("tab-index","-1"),ke.setAttribute("aria-hidden","true"),document.body.appendChild(ke)),oe.getAttribute("wrap")?ke.setAttribute("wrap",oe.getAttribute("wrap")):ke.removeAttribute("wrap");var J=Re(oe,ye),he=J.paddingSize,re=J.borderSize,xe=J.boxSizing,Le=J.sizingStyle;ke.setAttribute("style","".concat(Le,";").concat(Ie)),ke.value=oe.value||oe.placeholder||"";var fe=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,Q=ke.scrollHeight,ne;if(xe==="border-box"?Q+=re:xe==="content-box"&&(Q-=he),de!==null||ae!==null){ke.value=" ";var _e=ke.scrollHeight-he;de!==null&&(fe=_e*de,xe==="border-box"&&(fe=fe+he+re),Q=Math.max(fe,Q)),ae!==null&&(Ce=_e*ae,xe==="border-box"&&(Ce=Ce+he+re),ne=Q>Ce?"":"hidden",Q=Math.min(Ce,Q))}return{height:Q,minHeight:fe,maxHeight:Ce,overflowY:ne,resize:"none"}}var Be=E("Gytx"),ge=E.n(Be),Ae;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(Ae||(Ae={}));var Me=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(ae){var J;return Object(K.a)(this,de),J=ye.call(this,ae),J.nextFrameActionId=void 0,J.resizeFrameId=void 0,J.textArea=void 0,J.saveTextArea=function(he){J.textArea=he},J.handleResize=function(he){var re=J.state.resizeStatus,xe=J.props,Le=xe.autoSize,fe=xe.onResize;if(re!==Ae.NONE)return;typeof fe=="function"&&fe(he),Le&&J.resizeOnNextFrame()},J.resizeOnNextFrame=function(){cancelAnimationFrame(J.nextFrameActionId),J.nextFrameActionId=requestAnimationFrame(J.resizeTextarea)},J.resizeTextarea=function(){var he=J.props.autoSize;if(!he||!J.textArea)return;var re=he.minRows,xe=he.maxRows,Le=Fe(J.textArea,!1,re,xe);J.setState({textareaStyles:Le,resizeStatus:Ae.RESIZING},function(){cancelAnimationFrame(J.resizeFrameId),J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Ae.RESIZED},function(){J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Ae.NONE}),J.fixFirefoxAutoScroll()})})})})},J.renderTextArea=function(){var he=J.props,re=he.prefixCls,xe=re===void 0?"rc-textarea":re,Le=he.autoSize,fe=he.onResize,Ce=he.className,Q=he.disabled,ne=J.state,_e=ne.textareaStyles,me=ne.resizeStatus,Z=Object(Y.a)(J.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),z=be()(xe,Ce,Object(i.a)({},"".concat(xe,"-disabled"),Q));"value"in Z&&(Z.value=Z.value||"");var j=Object(c.a)(Object(c.a)(Object(c.a)({},J.props.style),_e),me===Ae.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return t.createElement(V,{onResize:J.handleResize,disabled:!(Le||fe)},t.createElement("textarea",Object(l.a)({},Z,{className:z,style:j,ref:J.saveTextArea})))},J.state={textareaStyles:{},resizeStatus:Ae.NONE},J}return Object(U.a)(de,[{key:"componentDidUpdate",value:function(J){(J.value!==this.props.value||!ge()(J.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var J=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(J,he)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),de}(t.Component),We=Me,je=function(oe){Object(x.a)(de,oe);var ye=Object(T.a)(de);function de(ae){var J;Object(K.a)(this,de),J=ye.call(this,ae),J.resizableTextArea=void 0,J.focus=function(){J.resizableTextArea.textArea.focus()},J.saveTextArea=function(re){J.resizableTextArea=re},J.handleChange=function(re){var xe=J.props.onChange;J.setValue(re.target.value,function(){J.resizableTextArea.resizeTextarea()}),xe&&xe(re)},J.handleKeyDown=function(re){var xe=J.props,Le=xe.onPressEnter,fe=xe.onKeyDown;re.keyCode===13&&Le&&Le(re),fe&&fe(re)};var he=typeof ae.value=="undefined"||ae.value===null?ae.defaultValue:ae.value;return J.state={value:he},J}return Object(U.a)(de,[{key:"setValue",value:function(J,he){"value"in this.props||this.setState({value:J},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return t.createElement(We,Object(l.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(J){return"value"in J?{value:J.value}:null}}]),de}(t.Component),ze=f.default=je},YJ9k:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c=0;)_[W]=0}var h=0,r=1,m=2,w=3,v=258,d=29,n=256,b=n+1+d,g=30,S=19,A=2*b+1,O=15,R=16,B=7,F=256,L=16,P=17,V=18,Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],be=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xe=512,Ke=new Array((b+2)*2);o(Ke);var ke=new Array(g*2);o(ke);var Re=new Array(Xe);o(Re);var Fe=new Array(v-w+1);o(Fe);var Be=new Array(d);o(Be);var ge=new Array(g);o(ge);function Ae(_,W,H,se,ee){this.static_tree=_,this.extra_bits=W,this.extra_base=H,this.elems=se,this.max_length=ee,this.has_stree=_&&_.length}var Me,We,je;function ze(_,W){this.dyn_tree=_,this.max_code=0,this.stat_desc=W}function oe(_){return _<256?Re[_]:Re[256+(_>>>7)]}function ye(_,W){_.pending_buf[_.pending++]=W&255,_.pending_buf[_.pending++]=W>>>8&255}function de(_,W,H){_.bi_valid>R-H?(_.bi_buf|=W<<_.bi_valid&65535,ye(_,_.bi_buf),_.bi_buf=W>>R-_.bi_valid,_.bi_valid+=H-R):(_.bi_buf|=W<<_.bi_valid&65535,_.bi_valid+=H)}function ae(_,W,H){de(_,H[W*2],H[W*2+1])}function J(_,W){var H=0;do H|=_&1,_>>>=1,H<<=1;while(--W>0);return H>>>1}function he(_){_.bi_valid===16?(ye(_,_.bi_buf),_.bi_buf=0,_.bi_valid=0):_.bi_valid>=8&&(_.pending_buf[_.pending++]=_.bi_buf&255,_.bi_buf>>=8,_.bi_valid-=8)}function re(_,W){var H=W.dyn_tree,se=W.max_code,ee=W.stat_desc.static_tree,ie=W.stat_desc.has_stree,k=W.stat_desc.extra_bits,G=W.stat_desc.extra_base,u=W.stat_desc.max_length,$,we,e,M,D,p,X=0;for(M=0;M<=O;M++)_.bl_count[M]=0;for(H[_.heap[_.heap_max]*2+1]=0,$=_.heap_max+1;$u&&(M=u,X++),H[we*2+1]=M,we>se)continue;_.bl_count[M]++,D=0,we>=G&&(D=k[we-G]),p=H[we*2],_.opt_len+=p*(M+D),ie&&(_.static_len+=p*(ee[we*2+1]+D))}if(X===0)return;do{for(M=u-1;_.bl_count[M]===0;)M--;_.bl_count[M]--,_.bl_count[M+1]+=2,_.bl_count[u]--,X-=2}while(X>0);for(M=u;M!==0;M--)for(we=_.bl_count[M];we!==0;){if(e=_.heap[--$],e>se)continue;H[e*2+1]!==M&&(_.opt_len+=(M-H[e*2+1])*H[e*2],H[e*2+1]=M),we--}}function xe(_,W,H){var se=new Array(O+1),ee=0,ie,k;for(ie=1;ie<=O;ie++)se[ie]=ee=ee+H[ie-1]<<1;for(k=0;k<=W;k++){var G=_[k*2+1];if(G===0)continue;_[k*2]=J(se[G]++,G)}}function Le(){var _,W,H,se,ee,ie=new Array(O+1);for(H=0,se=0;se>=7;se8?ye(_,_.bi_buf):_.bi_valid>0&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function Q(_,W,H,se){Ce(_),se&&(ye(_,H),ye(_,~H)),K.arraySet(_.pending_buf,_.window,W,H,_.pending),_.pending+=H}function ne(_,W,H,se){var ee=W*2,ie=H*2;return _[ee]<_[ie]||_[ee]===_[ie]&&se[W]<=se[H]}function _e(_,W,H){for(var se=_.heap[H],ee=H<<1;ee<=_.heap_len&&!(ee<_.heap_len&&ne(W,_.heap[ee+1],_.heap[ee],_.depth)&&ee++,ne(W,se,_.heap[ee],_.depth));)_.heap[H]=_.heap[ee],H=ee,ee<<=1;_.heap[H]=se}function me(_,W,H){var se,ee,ie=0,k,G;if(_.last_lit!==0)do se=_.pending_buf[_.d_buf+ie*2]<<8|_.pending_buf[_.d_buf+ie*2+1],ee=_.pending_buf[_.l_buf+ie],ie++,se===0?ae(_,ee,W):(k=Fe[ee],ae(_,k+n+1,W),G=Y[k],G!==0&&(ee-=Be[k],de(_,ee,G)),se--,k=oe(se),ae(_,k,H),G=q[k],G!==0&&(se-=ge[k],de(_,se,G)));while(ie<_.last_lit);ae(_,F,W)}function Z(_,W){var H=W.dyn_tree,se=W.stat_desc.static_tree,ee=W.stat_desc.has_stree,ie=W.stat_desc.elems,k,G,u=-1,$;for(_.heap_len=0,_.heap_max=A,k=0;k>1;k>=1;k--)_e(_,H,k);$=ie;do k=_.heap[1],_.heap[1]=_.heap[_.heap_len--],_e(_,H,1),G=_.heap[1],_.heap[--_.heap_max]=k,_.heap[--_.heap_max]=G,H[$*2]=H[k*2]+H[G*2],_.depth[$]=(_.depth[k]>=_.depth[G]?_.depth[k]:_.depth[G])+1,H[k*2+1]=H[G*2+1]=$,_.heap[1]=$++,_e(_,H,1);while(_.heap_len>=2);_.heap[--_.heap_max]=_.heap[1],re(_,W),xe(H,u,_.bl_count)}function z(_,W,H){var se,ee=-1,ie,k=W[0*2+1],G=0,u=7,$=4;for(k===0&&(u=138,$=3),W[(H+1)*2+1]=65535,se=0;se<=H;se++){if(ie=k,k=W[(se+1)*2+1],++G=3&&!(_.bl_tree[Ie[W]*2+1]!==0);W--);return _.opt_len+=3*(W+1)+5+5+4,W}function a(_,W,H,se){var ee;for(de(_,W-257,5),de(_,H-1,5),de(_,se-4,4),ee=0;ee>>=1)if(W&1&&_.dyn_ltree[H*2]!==0)return t;if(_.dyn_ltree[9*2]!==0||_.dyn_ltree[10*2]!==0||_.dyn_ltree[13*2]!==0)return c;for(H=32;H0?(_.strm.data_type===i&&(_.strm.data_type=y(_)),Z(_,_.l_desc),Z(_,_.d_desc),k=I(_),ee=_.opt_len+3+7>>>3,ie=_.static_len+3+7>>>3,ie<=ee&&(ee=ie)):ee=ie=H+5,H+4<=ee&&W!==-1?te(_,W,H,se):_.strategy===T||ie===ee?(de(_,(r<<1)+(se?1:0),3),me(_,Ke,ke)):(de(_,(m<<1)+(se?1:0),3),a(_,_.l_desc.max_code+1,_.d_desc.max_code+1,k+1),me(_,_.dyn_ltree,_.dyn_dtree)),fe(_),se&&Ce(_)}function Ue(_,W,H){return _.pending_buf[_.d_buf+_.last_lit*2]=W>>>8&255,_.pending_buf[_.d_buf+_.last_lit*2+1]=W&255,_.pending_buf[_.l_buf+_.last_lit]=H&255,_.last_lit++,W===0?_.dyn_ltree[H*2]++:(_.matches++,W--,_.dyn_ltree[(Fe[H]+n+1)*2]++,_.dyn_dtree[oe(W)*2]++),_.last_lit===_.lit_bufsize-1}},eP3c:function(Te,f,E){"use strict";function l(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(u){return typeof u}:l=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},l(k)}Object.defineProperty(f,"__esModule",{value:!0}),f.inflateReset=a,f.inflateReset2=y,f.inflateResetKeep=I,f.inflateInit=C,f.inflateInit2=s,f.inflate=W,f.inflateEnd=H,f.inflateGetHeader=se,f.inflateSetDictionary=ee,f.inflateInfo=f.Z_DEFLATED=f.Z_BUF_ERROR=f.Z_MEM_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_NEED_DICT=f.Z_STREAM_END=f.Z_OK=f.Z_TREES=f.Z_BLOCK=f.Z_FINISH=void 0;var K=o(E("6BzB")),U=c(E("xlC8")),x=c(E("QV2g")),T=c(E("sjKO")),t=c(E("JSwD"));function c(k){return k&&k.__esModule?k:{default:k}}function i(){if(typeof WeakMap!="function")return null;var k=new WeakMap;return i=function(){return k},k}function o(k){if(k&&k.__esModule)return k;if(k===null||l(k)!=="object"&&typeof k!="function")return{default:k};var G=i();if(G&&G.has(k))return G.get(k);var u={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var we in k)if(Object.prototype.hasOwnProperty.call(k,we)){var e=$?Object.getOwnPropertyDescriptor(k,we):null;e&&(e.get||e.set)?Object.defineProperty(u,we,e):u[we]=k[we]}return u.default=k,G&&G.set(k,u),u}var h=0,r=1,m=2,w=4;f.Z_FINISH=w;var v=5;f.Z_BLOCK=v;var d=6;f.Z_TREES=d;var n=0;f.Z_OK=n;var b=1;f.Z_STREAM_END=b;var g=2;f.Z_NEED_DICT=g;var S=-2;f.Z_STREAM_ERROR=S;var A=-3;f.Z_DATA_ERROR=A;var O=-4;f.Z_MEM_ERROR=O;var R=-5;f.Z_BUF_ERROR=R;var B=8;f.Z_DEFLATED=B;var F=1,L=2,P=3,V=4,Y=5,q=6,be=7,Ie=8,Xe=9,Ke=10,ke=11,Re=12,Fe=13,Be=14,ge=15,Ae=16,Me=17,We=18,je=19,ze=20,oe=21,ye=22,de=23,ae=24,J=25,he=26,re=27,xe=28,Le=29,fe=30,Ce=31,Q=32,ne=852,_e=592,me=15,Z=me;function z(k){return(k>>>24&255)+(k>>>8&65280)+((k&65280)<<8)+((k&255)<<24)}function j(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new K.Buf16(320),this.work=new K.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function I(k){var G;return!k||!k.state?S:(G=k.state,k.total_in=k.total_out=G.total=0,k.msg="",G.wrap&&(k.adler=G.wrap&1),G.mode=F,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new K.Buf32(ne),G.distcode=G.distdyn=new K.Buf32(_e),G.sane=1,G.back=-1,n)}function a(k){var G;return!k||!k.state?S:(G=k.state,G.wsize=0,G.whave=0,G.wnext=0,I(k))}function y(k,G){var u,$;return!k||!k.state?S:($=k.state,G<0?(u=0,G=-G):(u=(G>>4)+1,G<48&&(G&=15)),G&&(G<8||G>15)?S:($.window!==null&&$.wbits!==G&&($.window=null),$.wrap=u,$.wbits=G,a(k)))}function s(k,G){var u,$;return k?($=new j,k.state=$,$.window=null,u=y(k,G),u!==n&&(k.state=null),u):S}function C(k){return s(k,Z)}var te=!0,ue,le;function Ue(k){if(te){var G;for(ue=new K.Buf32(512),le=new K.Buf32(32),G=0;G<144;)k.lens[G++]=8;for(;G<256;)k.lens[G++]=9;for(;G<280;)k.lens[G++]=7;for(;G<288;)k.lens[G++]=8;for((0,t.default)(r,k.lens,0,288,ue,0,k.work,{bits:9}),G=0;G<32;)k.lens[G++]=5;(0,t.default)(m,k.lens,0,32,le,0,k.work,{bits:5}),te=!1}k.lencode=ue,k.lenbits=9,k.distcode=le,k.distbits=5}function _(k,G,u,$){var we,e=k.state;return e.window===null&&(e.wsize=1<=e.wsize?(K.arraySet(e.window,G,u-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):(we=e.wsize-e.wnext,we>$&&(we=$),K.arraySet(e.window,G,u-$,we,e.wnext),$-=we,$?(K.arraySet(e.window,G,u-$,$,0),e.wnext=$,e.whave=e.wsize):(e.wnext+=we,e.wnext===e.wsize&&(e.wnext=0),e.whave>>8&255,u.check=(0,x.default)(u.check,Se,2,0),X=0,N=0,u.mode=L;break}if(u.flags=0,u.head&&(u.head.done=!1),!(u.wrap&1)||(((X&255)<<8)+(X>>8))%31){k.msg="incorrect header check",u.mode=fe;break}if((X&15)!==B){k.msg="unknown compression method",u.mode=fe;break}if(X>>>=4,N-=4,Ve=(X&15)+8,u.wbits===0)u.wbits=Ve;else if(Ve>u.wbits){k.msg="invalid window size",u.mode=fe;break}u.dmax=1<>8&1),u.flags&512&&(Se[0]=X&255,Se[1]=X>>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0,u.mode=P;case P:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>8&255,Se[2]=X>>>16&255,Se[3]=X>>>24&255,u.check=(0,x.default)(u.check,Se,4,0)),X=0,N=0,u.mode=V;case V:for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>8),u.flags&512&&(Se[0]=X&255,Se[1]=X>>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0,u.mode=Y;case Y:if(u.flags&1024){for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>>8&255,u.check=(0,x.default)(u.check,Se,2,0)),X=0,N=0}else u.head&&(u.head.extra=null);u.mode=q;case q:if(u.flags&1024&&(pe=u.length,pe>D&&(pe=D),pe&&(u.head&&(Ve=u.head.extra_len-u.length,u.head.extra||(u.head.extra=new Array(u.head.extra_len)),K.arraySet(u.head.extra,$,e,pe,Ve)),u.flags&512&&(u.check=(0,x.default)(u.check,$,pe,e)),D-=pe,e+=pe,u.length-=pe),u.length))break e;u.length=0,u.mode=be;case be:if(u.flags&2048){if(D===0)break e;pe=0;do Ve=$[e+pe++],u.head&&Ve&&u.length<65536&&(u.head.name+=String.fromCharCode(Ve));while(Ve&&pe>9&1,u.head.done=!0),k.adler=u.check=0,u.mode=Re;break;case Ke:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>=N&7,N-=N&7,u.mode=re;break}for(;N<3;){if(D===0)break e;D--,X+=$[e++]<>>=1,N-=1;switch(X&3){case 0:u.mode=Be;break;case 1:if(Ue(u),u.mode=ze,G===d){X>>>=2,N-=2;break e}break;case 2:u.mode=Me;break;case 3:k.msg="invalid block type",u.mode=fe}X>>>=2,N-=2;break;case Be:for(X>>>=N&7,N-=N&7;N<32;){if(D===0)break e;D--,X+=$[e++]<>>16^65535)){k.msg="invalid stored block lengths",u.mode=fe;break}if(u.length=X&65535,X=0,N=0,u.mode=ge,G===d)break e;case ge:u.mode=Ae;case Ae:if(pe=u.length,pe){if(pe>D&&(pe=D),pe>p&&(pe=p),pe===0)break e;K.arraySet(we,$,e,pe,M),D-=pe,e+=pe,p-=pe,M+=pe,u.length-=pe;break}u.mode=Re;break;case Me:for(;N<14;){if(D===0)break e;D--,X+=$[e++]<>>=5,N-=5,u.ndist=(X&31)+1,X>>>=5,N-=5,u.ncode=(X&15)+4,X>>>=4,N-=4,u.nlen>286||u.ndist>30){k.msg="too many length or distance symbols",u.mode=fe;break}u.have=0,u.mode=We;case We:for(;u.have>>=3,N-=3}for(;u.have<19;)u.lens[$e[u.have++]]=0;if(u.lencode=u.lendyn,u.lenbits=7,Pe={bits:u.lenbits},ve=(0,t.default)(h,u.lens,0,19,u.lencode,0,u.work,Pe),u.lenbits=Pe.bits,ve){k.msg="invalid code lengths set",u.mode=fe;break}u.have=0,u.mode=je;case je:for(;u.have>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=Ne,N-=Ne,u.lens[u.have++]=Ze;else{if(Ze===16){for(He=Ne+2;N>>=Ne,N-=Ne,u.have===0){k.msg="invalid bit length repeat",u.mode=fe;break}Ve=u.lens[u.have-1],pe=3+(X&3),X>>>=2,N-=2}else if(Ze===17){for(He=Ne+3;N>>=Ne,N-=Ne,Ve=0,pe=3+(X&7),X>>>=3,N-=3}else{for(He=Ne+7;N>>=Ne,N-=Ne,Ve=0,pe=11+(X&127),X>>>=7,N-=7}if(u.have+pe>u.nlen+u.ndist){k.msg="invalid bit length repeat",u.mode=fe;break}for(;pe--;)u.lens[u.have++]=Ve}}if(u.mode===fe)break;if(u.lens[256]===0){k.msg="invalid code -- missing end-of-block",u.mode=fe;break}if(u.lenbits=9,Pe={bits:u.lenbits},ve=(0,t.default)(r,u.lens,0,u.nlen,u.lencode,0,u.work,Pe),u.lenbits=Pe.bits,ve){k.msg="invalid literal/lengths set",u.mode=fe;break}if(u.distbits=6,u.distcode=u.distdyn,Pe={bits:u.distbits},ve=(0,t.default)(m,u.lens,u.nlen,u.ndist,u.distcode,0,u.work,Pe),u.distbits=Pe.bits,ve){k.msg="invalid distances set",u.mode=fe;break}if(u.mode=ze,G===d)break e;case ze:u.mode=oe;case oe:if(D>=6&&p>=258){k.next_out=M,k.avail_out=p,k.next_in=e,k.avail_in=D,u.hold=X,u.bits=N,(0,T.default)(k,ce),M=k.next_out,we=k.output,p=k.avail_out,e=k.next_in,$=k.input,D=k.avail_in,X=u.hold,N=u.bits,u.mode===Re&&(u.back=-1);break}for(u.back=0;!(Ge=u.lencode[X&(1<>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ne=Ge>>>24,Ye=Ge>>>16&255,Ze=Ge&65535,qe+Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ne,N-=Ne,u.back+=Ne,u.length=Ze,Ye===0){u.mode=he;break}if(Ye&32){u.back=-1,u.mode=Re;break}if(Ye&64){k.msg="invalid literal/length code",u.mode=fe;break}u.extra=Ye&15,u.mode=ye;case ye:if(u.extra){for(He=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}u.was=u.length,u.mode=de;case de:for(;!(Ge=u.distcode[X&(1<>>24,Ye=Ge>>>16&255,Ze=Ge&65535,Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ne=Ge>>>24,Ye=Ge>>>16&255,Ze=Ge&65535,qe+Ne<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ne,N-=Ne,u.back+=Ne,Ye&64){k.msg="invalid distance code",u.mode=fe;break}u.offset=Ze,u.extra=Ye&15,u.mode=ae;case ae:if(u.extra){for(He=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}if(u.offset>u.dmax){k.msg="invalid distance too far back",u.mode=fe;break}u.mode=J;case J:if(p===0)break e;if(pe=ce-p,u.offset>pe){if(pe=u.offset-pe,pe>u.whave&&u.sane){k.msg="invalid distance too far back",u.mode=fe;break}pe>u.wnext?(pe-=u.wnext,Oe=u.wsize-pe):Oe=u.wnext-pe,pe>u.length&&(pe=u.length),tt=u.window}else tt=we,Oe=M-u.offset,pe=u.length;pe>p&&(pe=p),p-=pe,u.length-=pe;do we[M++]=tt[Oe++];while(--pe);u.length===0&&(u.mode=oe);break;case he:if(p===0)break e;we[M++]=u.length,p--,u.mode=oe;break;case re:if(u.wrap){for(;N<32;){if(D===0)break e;D--,X|=$[e++]<>>3]&1<>>10,this.keys[Ae]|=(We&4032)>>>6,++Ae,this.keys[Ae]=(Me&258048)<<12,this.keys[Ae]|=(Me&63)<<16,this.keys[Ae]|=(We&258048)>>>4,this.keys[Ae]|=We&63,++Ae}}return U(R,[{key:"enc8",value:function(F){var L=F.slice(),P=0,V,Y,q;V=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],Y=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],q=(V>>>4^Y)&252645135,Y^=q,V^=q<<4,q=(V>>>16^Y)&65535,Y^=q,V^=q<<16,q=(Y>>>2^V)&858993459,V^=q,Y^=q<<2,q=(Y>>>8^V)&16711935,V^=q,Y^=q<<8,Y=Y<<1|Y>>>31&1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<1|V>>>31&1;for(var be=0,Ie=0;be<8;++be){q=Y<<28|Y>>>4,q^=this.keys[Ie++];var Xe=S[q&63];Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=w[q>>>24&63],q=Y^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],V^=Xe,q=V<<28|V>>>4,q^=this.keys[Ie++],Xe=S[q&63],Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=w[q>>>24&63],q=V^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],Y^=Xe}for(Y=Y<<31|Y>>>1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<31|V>>>1,q=(V>>>8^Y)&16711935,Y^=q,V^=q<<8,q=(V>>>2^Y)&858993459,Y^=q,V^=q<<2,q=(Y>>>16^V)&65535,V^=q,Y^=q<<16,q=(Y>>>4^V)&252645135,V^=q,Y^=q<<4,q=[Y,V],P=0;P<8;P++)L[P]=(q[P>>>2]>>>8*(3-P%4))%256,L[P]<0&&(L[P]+=256);return L}},{key:"encrypt",value:function(F){return this.enc8(F.slice(0,8)).concat(this.enc8(F.slice(8,16)))}}]),R}();f.default=O},lNSK:function(Te,f,E){"use strict";function l(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(D){return typeof D}:l=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},l(e)}Object.defineProperty(f,"__esModule",{value:!0}),f.deflateInit=k,f.deflateInit2=ie,f.deflateReset=se,f.deflateResetKeep=H,f.deflateSetHeader=ee,f.deflate=G,f.deflateEnd=u,f.deflateSetDictionary=$,f.deflateInfo=f.Z_DEFLATED=f.Z_UNKNOWN=f.Z_DEFAULT_STRATEGY=f.Z_FIXED=f.Z_RLE=f.Z_HUFFMAN_ONLY=f.Z_FILTERED=f.Z_DEFAULT_COMPRESSION=f.Z_BUF_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_STREAM_END=f.Z_OK=f.Z_BLOCK=f.Z_FINISH=f.Z_FULL_FLUSH=f.Z_PARTIAL_FLUSH=f.Z_NO_FLUSH=void 0;var K=o(E("6BzB")),U=o(E("c5fP")),x=c(E("xlC8")),T=c(E("QV2g")),t=c(E("xSIq"));function c(e){return e&&e.__esModule?e:{default:e}}function i(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(e===null||l(e)!=="object"&&typeof e!="function")return{default:e};var M=i();if(M&&M.has(e))return M.get(e);var D={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var X in e)if(Object.prototype.hasOwnProperty.call(e,X)){var N=p?Object.getOwnPropertyDescriptor(e,X):null;N&&(N.get||N.set)?Object.defineProperty(D,X,N):D[X]=e[X]}return D.default=e,M&&M.set(e,D),D}var h=0;f.Z_NO_FLUSH=h;var r=1;f.Z_PARTIAL_FLUSH=r;var m=3;f.Z_FULL_FLUSH=m;var w=4;f.Z_FINISH=w;var v=5;f.Z_BLOCK=v;var d=0;f.Z_OK=d;var n=1;f.Z_STREAM_END=n;var b=-2;f.Z_STREAM_ERROR=b;var g=-3;f.Z_DATA_ERROR=g;var S=-5;f.Z_BUF_ERROR=S;var A=-1;f.Z_DEFAULT_COMPRESSION=A;var O=1;f.Z_FILTERED=O;var R=2;f.Z_HUFFMAN_ONLY=R;var B=3;f.Z_RLE=B;var F=4;f.Z_FIXED=F;var L=0;f.Z_DEFAULT_STRATEGY=L;var P=2;f.Z_UNKNOWN=P;var V=8;f.Z_DEFLATED=V;var Y=9,q=15,be=8,Ie=29,Xe=256,Ke=Xe+1+Ie,ke=30,Re=19,Fe=2*Ke+1,Be=15,ge=3,Ae=258,Me=Ae+ge+1,We=32,je=42,ze=69,oe=73,ye=91,de=103,ae=113,J=666,he=1,re=2,xe=3,Le=4,fe=3;function Ce(e,M){return e.msg=t.default[M],M}function Q(e){return(e<<1)-(e>4?9:0)}function ne(e){for(var M=e.length;--M>=0;)e[M]=0}function _e(e){var M=e.state,D=M.pending;if(D>e.avail_out&&(D=e.avail_out),D===0)return;K.arraySet(e.output,M.pending_buf,M.pending_out,D,e.next_out),e.next_out+=D,M.pending_out+=D,e.total_out+=D,e.avail_out-=D,M.pending-=D,M.pending===0&&(M.pending_out=0)}function me(e,M){U._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,M),e.block_start=e.strstart,_e(e.strm)}function Z(e,M){e.pending_buf[e.pending++]=M}function z(e,M){e.pending_buf[e.pending++]=M>>>8&255,e.pending_buf[e.pending++]=M&255}function j(e,M,D,p){var X=e.avail_in;return X>p&&(X=p),X===0?0:(e.avail_in-=X,K.arraySet(M,e.input,e.next_in,X,D),e.state.wrap===1?e.adler=(0,x.default)(e.adler,M,X,D):e.state.wrap===2&&(e.adler=(0,T.default)(e.adler,M,X,D)),e.next_in+=X,e.total_in+=X,X)}function I(e,M){var D=e.max_chain_length,p=e.strstart,X,N,Ee=e.prev_length,ce=e.nice_match,pe=e.strstart>e.w_size-Me?e.strstart-(e.w_size-Me):0,Oe=e.window,tt=e.w_mask,Ge=e.prev,Ne=e.strstart+Ae,Ye=Oe[p+Ee-1],Ze=Oe[p+Ee];e.prev_length>=e.good_match&&(D>>=2),ce>e.lookahead&&(ce=e.lookahead);do{if(X=M,Oe[X+Ee]!==Ze||Oe[X+Ee-1]!==Ye||Oe[X]!==Oe[p]||Oe[++X]!==Oe[p+1])continue;p+=2,X++;do;while(Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&pEe){if(e.match_start=M,Ee=N,N>=ce)break;Ye=Oe[p+Ee-1],Ze=Oe[p+Ee]}}while((M=Ge[M&tt])>pe&&--D!==0);return Ee<=e.lookahead?Ee:e.lookahead}function a(e){var M=e.w_size,D,p,X,N,Ee;do{if(N=e.window_size-e.lookahead-e.strstart,e.strstart>=M+(M-Me)){K.arraySet(e.window,e.window,M,M,0),e.match_start-=M,e.strstart-=M,e.block_start-=M,p=e.hash_size,D=p;do X=e.head[--D],e.head[D]=X>=M?X-M:0;while(--p);p=M,D=p;do X=e.prev[--D],e.prev[D]=X>=M?X-M:0;while(--p);N+=M}if(e.strm.avail_in===0)break;if(p=j(e.strm,e.window,e.strstart+e.lookahead,N),e.lookahead+=p,e.lookahead+e.insert>=ge)for(Ee=e.strstart-e.insert,e.ins_h=e.window[Ee],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(D=e.pending_buf_size-5);;){if(e.lookahead<=1){if(a(e),e.lookahead===0&&M===h)return he;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var p=e.block_start+D;if((e.strstart===0||e.strstart>=p)&&(e.lookahead=e.strstart-p,e.strstart=p,me(e,!1),e.strm.avail_out===0))return he;if(e.strstart-e.block_start>=e.w_size-Me&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):(e.strstart>e.block_start&&(me(e,!1),e.strm.avail_out===0),he)}function s(e,M){for(var D,p;;){if(e.lookahead=ge&&(e.ins_h=(e.ins_h<=ge)if(p=U._tr_tally(e,e.strstart-e.match_start,e.match_length-ge),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ge){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ge&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ge-1)),e.prev_length>=ge&&e.match_length<=e.prev_length){X=e.strstart+e.lookahead-ge,p=U._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ge),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=X&&(e.ins_h=(e.ins_h<=ge&&e.strstart>0&&(X=e.strstart-1,p=Ee[X],p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X])){N=e.strstart+Ae;do;while(p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&p===Ee[++X]&&Xe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ge?(D=U._tr_tally(e,1,e.match_length-ge),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function ue(e,M){for(var D;;){if(e.lookahead===0&&(a(e),e.lookahead===0)){if(M===h)return he;break}if(e.match_length=0,D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===w?(me(e,!0),e.strm.avail_out===0?xe:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function le(e,M,D,p,X){this.good_length=e,this.max_lazy=M,this.nice_length=D,this.max_chain=p,this.func=X}var Ue;Ue=[new le(0,0,0,0,y),new le(4,4,8,4,s),new le(4,5,16,8,s),new le(4,6,32,32,s),new le(4,4,16,16,C),new le(8,16,32,32,C),new le(8,16,128,128,C),new le(8,32,128,256,C),new le(32,128,258,1024,C),new le(32,258,258,4096,C)];function _(e){e.window_size=2*e.w_size,ne(e.head),e.max_lazy_match=Ue[e.level].max_lazy,e.good_match=Ue[e.level].good_length,e.nice_match=Ue[e.level].nice_length,e.max_chain_length=Ue[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ge-1,e.match_available=0,e.ins_h=0}function W(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new K.Buf16(Fe*2),this.dyn_dtree=new K.Buf16((2*ke+1)*2),this.bl_tree=new K.Buf16((2*Re+1)*2),ne(this.dyn_ltree),ne(this.dyn_dtree),ne(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new K.Buf16(Be+1),this.heap=new K.Buf16(2*Ke+1),ne(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new K.Buf16(2*Ke+1),ne(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function H(e){var M;return!e||!e.state?Ce(e,b):(e.total_in=e.total_out=0,e.data_type=P,M=e.state,M.pending=0,M.pending_out=0,M.wrap<0&&(M.wrap=-M.wrap),M.status=M.wrap?je:ae,e.adler=M.wrap===2?0:1,M.last_flush=h,U._tr_init(M),d)}function se(e){var M=H(e);return M===d&&_(e.state),M}function ee(e,M){return!e||!e.state||e.state.wrap!==2?b:(e.state.gzhead=M,d)}function ie(e,M,D,p,X,N){if(!e)return b;var Ee=1;if(M===A&&(M=6),p<0?(Ee=0,p=-p):p>15&&(Ee=2,p-=16),X<1||X>Y||D!==V||p<8||p>15||M<0||M>9||N<0||N>F)return Ce(e,b);p===8&&(p=9);var ce=new W;return e.state=ce,ce.strm=e,ce.wrap=Ee,ce.gzhead=null,ce.w_bits=p,ce.w_size=1<v||M<0)return e?Ce(e,b):b;if(p=e.state,!e.output||!e.input&&e.avail_in!==0||p.status===J&&M!==w)return Ce(e,e.avail_out===0?S:b);if(p.strm=e,D=p.last_flush,p.last_flush=M,p.status===je)if(p.wrap===2)e.adler=0,Z(p,31),Z(p,139),Z(p,8),p.gzhead?(Z(p,(p.gzhead.text?1:0)+(p.gzhead.hcrc?2:0)+(p.gzhead.extra?4:0)+(p.gzhead.name?8:0)+(p.gzhead.comment?16:0)),Z(p,p.gzhead.time&255),Z(p,p.gzhead.time>>8&255),Z(p,p.gzhead.time>>16&255),Z(p,p.gzhead.time>>24&255),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,p.gzhead.os&255),p.gzhead.extra&&p.gzhead.extra.length&&(Z(p,p.gzhead.extra.length&255),Z(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=ze):(Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,fe),p.status=ae);else{var Ee=V+(p.w_bits-8<<4)<<8,ce=-1;p.strategy>=R||p.level<2?ce=0:p.level<6?ce=1:p.level===6?ce=2:ce=3,Ee|=ce<<6,p.strstart!==0&&(Ee|=We),Ee+=31-Ee%31,p.status=ae,z(p,Ee),p.strstart!==0&&(z(p,e.adler>>>16),z(p,e.adler&65535)),e.adler=1}if(p.status===ze)if(p.gzhead.extra){for(X=p.pending;p.gzindex<(p.gzhead.extra.length&65535)&&!(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size));)Z(p,p.gzhead.extra[p.gzindex]&255),p.gzindex++;p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),p.gzindex===p.gzhead.extra.length&&(p.gzindex=0,p.status=oe)}else p.status=oe;if(p.status===oe)if(p.gzhead.name){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.gzindex=0,p.status=ye)}else p.status=ye;if(p.status===ye)if(p.gzhead.comment){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.status=de)}else p.status=de;if(p.status===de&&(p.gzhead.hcrc?(p.pending+2>p.pending_buf_size&&_e(e),p.pending+2<=p.pending_buf_size&&(Z(p,e.adler&255),Z(p,e.adler>>8&255),e.adler=0,p.status=ae)):p.status=ae),p.pending!==0){if(_e(e),e.avail_out===0)return p.last_flush=-1,d}else if(e.avail_in===0&&Q(M)<=Q(D)&&M!==w)return Ce(e,S);if(p.status===J&&e.avail_in!==0)return Ce(e,S);if(e.avail_in!==0||p.lookahead!==0||M!==h&&p.status!==J){var pe=p.strategy===R?ue(p,M):p.strategy===B?te(p,M):Ue[p.level].func(p,M);if((pe===xe||pe===Le)&&(p.status=J),pe===he||pe===xe)return e.avail_out===0&&(p.last_flush=-1),d;if(pe===re&&(M===r?U._tr_align(p):M!==v&&(U._tr_stored_block(p,0,0,!1),M===m&&(ne(p.head),p.lookahead===0&&(p.strstart=0,p.block_start=0,p.insert=0))),_e(e),e.avail_out===0))return p.last_flush=-1,d}return M!==w?d:p.wrap<=0?n:(p.wrap===2?(Z(p,e.adler&255),Z(p,e.adler>>8&255),Z(p,e.adler>>16&255),Z(p,e.adler>>24&255),Z(p,e.total_in&255),Z(p,e.total_in>>8&255),Z(p,e.total_in>>16&255),Z(p,e.total_in>>24&255)):(z(p,e.adler>>>16),z(p,e.adler&65535)),_e(e),p.wrap>0&&(p.wrap=-p.wrap),p.pending!==0?d:n)}function u(e){var M;return!e||!e.state?b:(M=e.state.status,M!==je&&M!==ze&&M!==oe&&M!==ye&&M!==de&&M!==ae&&M!==J?Ce(e,b):(e.state=null,M===ae?Ce(e,g):d))}function $(e,M){var D=M.length,p,X,N,Ee,ce,pe,Oe,tt;if(!e||!e.state)return b;if(p=e.state,Ee=p.wrap,Ee===2||Ee===1&&p.status!==je||p.lookahead)return b;for(Ee===1&&(e.adler=(0,x.default)(e.adler,M,D,0)),p.wrap=0,D>=p.w_size&&(Ee===0&&(ne(p.head),p.strstart=0,p.block_start=0,p.insert=0),tt=new K.Buf8(p.w_size),K.arraySet(tt,M,D-p.w_size,p.w_size,0),M=tt,D=p.w_size),ce=e.avail_in,pe=e.next_in,Oe=e.input,e.avail_in=D,e.next_in=0,e.input=M,a(p);p.lookahead>=ge;){X=p.strstart,N=p.lookahead-(ge-1);do p.ins_h=(p.ins_h<2&&k(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function tt(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!1})}function Ge(){H({type:ae.SET_IS_LARGE,payload:!we})}function Ne(ve){var Se;return me.current&&(Se=new R.default(function(Pe){var He=Object(v.a)(Pe),$e;try{for(He.s();!($e=He.n()).done;){var at,et=$e.value;if((_e==null||((at=_e.shixun)===null||at===void 0)?void 0:at.windows_connection_mode)==="rdp"&&ot(),et.target.offsetHeight>0||et.target.offsetWidth>0){var lt;ve==null||((lt=ve._eventHandlers)===null||lt===void 0)||lt.windowResize()}}}catch(De){He.e(De)}finally{He.f()}}),Se.observe(me.current)),Se}var Ye=function(){var ve=Object(w.a)(g.a.mark(function Se(){var Pe,He,$e,at,et,lt,De,nt,Je,it,rt;return g.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return lt=(Pe=ye())!==null&&Pe!==void 0&&Pe.homework_common_id?{homework_common_id:(He=ye())===null||He===void 0?void 0:He.homework_common_id}:{},Qe.next=3,Object(ke.a)("/api/myshixuns/".concat(($e=_e.myshixun)===null||$e===void 0?void 0:$e.identifier,"/start.json"),{method:"get",params:Object(n.a)(Object(n.a)(Object(n.a)({},Ee),lt),{},{template_id:y||""})});case 3:if(De=Qe.sent,!(De!=null&&(at=De.data)!==null&&at!==void 0&&(et=at.data_list)!==null&&et!==void 0&&et.length)){Qe.next=7;break}return Y.a.publish("pod-restrict-data",{identifier:De==null||((nt=De.data)===null||nt===void 0)?void 0:nt.identifier,data_list:De==null||((Je=De.data)===null||Je===void 0)?void 0:Je.data_list}),Qe.abrupt("return");case 7:if(!((De==null?void 0:De.status)===-3)){Qe.next=9;break}return Qe.abrupt("return",new Promise(function(){var _t=Object(w.a)(g.a.mark(function dt(pt,ct){return g.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:m.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var gt=Object(w.a)(g.a.mark(function vt(){return g.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return clearTimeout(N.current),X(0),ft.next=4,Object(Re.f)(Ee.taskId,De==null?void 0:De.message);case 4:return k(ie+1),ft.abrupt("return");case 6:case"end":return ft.stop()}},vt)}));function bt(){return gt.apply(this,arguments)}return bt}()});case 1:case"end":return ht.stop()}},dt)}));return function(dt,pt){return _t.apply(this,arguments)}}()));case 9:if(!((De==null?void 0:De.status)===-1)){Qe.next=11;break}throw new String(De==null?void 0:De.message);case 11:return Q&&(Object(L.W)("PVEAuthCookie",De==null||((it=De.data)===null||it===void 0||((rt=it.cookie_options)===null||rt===void 0))?void 0:rt.cookies_value,1),Object(L.W)("PVELangCookie","zh_CN",1)),Y.a.publish("vnc-res-data",De==null?void 0:De.data),Y.a.publish("update-windows-time",De==null?void 0:De.data),Qe.abrupt("return",De);case 15:case"end":return Qe.stop()}},Se)}));return function(){return ve.apply(this,arguments)}}();Object(S.useEffect)(function(){var ve,Se;function Pe(nt){fe&&(h.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),H({type:ae.SET_LOADING,payload:!0}),k(ie+1))}Y.a.subscribe("reset-linux-windows-loading",function(){H({type:ae.SET_LOADING,payload:!0})}),Y.a.subscribe("reset-linux-windos-vnc",function(){k(ie+1)});function He(nt){X(100),clearTimeout(N.current),setTimeout(function(){z.current.resizeSession=!1,H({type:ae.SET_LOADING,payload:!1})},1300),Y.a.subscribe("send-ctrl-alt-delete",function(){var Je;(Je=ve)===null||Je===void 0||Je.sendCtrlAltDel()})}function $e(nt){var Je=oe(nt.detail.text);H({type:ae.SET_TRANSFER_CONTENT,payload:Je})}if((fe||Le||Ce||Q&&y)&&me.current){var at;clearTimeout(N.current),(_e==null||((at=_e.shixun)===null||at===void 0)?void 0:at.windows_connection_mode)==="rdp"&&ot(),new Promise(Object(w.a)(g.a.mark(function nt(){var Je,it,rt,mt,Qe,_t,dt,pt,ct,yt,ht,gt,bt,vt,xt;return g.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return it=ye(),rt="",st.next=4,Ye();case 4:if(Qe=st.sent,!(Ce||Q)){st.next=11;break}return j.current.src=(Qe==null||((_t=Qe.data)===null||_t===void 0)?void 0:_t.link_url)+"&time="+Date.now(),H({type:ae.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),st.abrupt("return");case 11:fe?(mt="Edu123",rt=decodeURIComponent(Qe==null||((dt=Qe.data)===null||dt===void 0)?void 0:dt.link_url)):(ct=new URL(decodeURIComponent(Qe==null||((pt=Qe.data)===null||pt===void 0)?void 0:pt.link_url)),yt=ct.protocol,ht=ct.searchParams,gt=ct.host,bt=ct.search,vt=Object(L.T)(bt),mt=ht.get("password"),rt="".concat(yt==="https:"?"wss":"ws","://").concat(gt,"/").concat(vt.path||"websockify"));case 12:if(!((_e==null||((Je=_e.shixun)===null||Je===void 0)?void 0:Je.windows_connection_mode)==="rdp")){st.next=18;break}return Ne(),j.current.style.cssText=j.current.style.cssText+"width:1920px;height:1080px;position:initial",j.current.src="/rdp.html?tpiId=".concat(_e==null||((xt=_e.myshixun)===null||xt===void 0)?void 0:xt.id),H({type:ae.SET_LOADING,payload:!1}),st.abrupt("return");case 18:ve=new V.a(me.current,rt,{credentials:{password:mt},wsProtocols:["binary"],resize:"scale",show_dot:!0}),Se=Ne(ve),ve.viewOnly=it.view_only||!1,fe?ve.scaleViewport=!0:ve.scaleViewport=it.scale||!1,ve.scaleViewport=it.scale||!0,ve.showDotCursor=!0,ve.resizeSession=!0,z.current=ve,ve.addEventListener("disconnect",Pe),ve.addEventListener("connect",He),ve.addEventListener("clipboard",$e);case 29:case"end":return st.stop()}},nt)})));var et=Y.a.subscribe("vnc-reseting",function(){X(0),H({type:ae.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),lt=Y.a.subscribe("vnc-enlarge",function(nt){}),De=Y.a.subscribe("show-clipboard-box",function(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!0})});return X(0),function(){var nt,Je,it,rt;(nt=ve)===null||nt===void 0||nt.removeEventListener("disconnect",Pe),(Je=ve)===null||Je===void 0||Je.removeEventListener("connect",He),(it=ve)===null||it===void 0||it.removeEventListener("clipboard",$e),et(),lt(),De(),(rt=Se)===null||rt===void 0||rt.unobserve(me.current)}}},[Le,fe,Ce,ie,y]),Object(S.useEffect)(function(){var ve,Se;if(Q&&(_e==null||((ve=_e.shixun_virtual_templates)===null||ve===void 0)?void 0:ve.length)===1){var Pe,He;s(_e==null||((Pe=_e.shixun_virtual_templates)===null||Pe===void 0||((He=Pe[0])===null||He===void 0))?void 0:He.template_id)}else Q&&(_e==null||((Se=_e.shixun_virtual_templates)===null||Se===void 0)?void 0:Se.length)>1&&le(!0)},[Q]);function Ze(ve){return qe.apply(this,arguments)}function qe(){return qe=Object(w.a)(g.a.mark(function ve(Se){var Pe,He,$e;return g.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(!Le){et.next=8;break}return Pe=Se,et.next=4,Object(ke.a)("/api/tasks/".concat(Ee.taskId,"/vnc_paste.json"),{method:"post",body:{content:je.Base64.encode(Pe)}});case 4:He=et.sent,(He==null?void 0:He.status)===0&&(H({type:ae.SET_TRANSFER_CONTENT,payload:Se}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),tt()),et.next=12;break;case 8:($e=z.current)===null||$e===void 0||$e.clipboardPasteFrom(Se),H({type:ae.SET_TRANSFER_CONTENT,payload:Se}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),tt();case 12:case"end":return et.stop()}},ve)})),qe.apply(this,arguments)}function ot(){var ve,Se;ve=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),j.current.parentElement.className="wh1080p",j.current.parentElement.style.cssText="transform:scale(".concat(ve,");transform-origin:center center"),me.current.style.cssText="translate(-50%, -50%) scale("+ve+")"}Object(S.useEffect)(function(){p==0&&(clearTimeout(N.current),ut())},[p]);var ut=function ve(){p>99?p=99:(p=p+1,N.current=setTimeout(function(){ve()},1500)),p<100&&X(p)},Ve=Object(S.useMemo)(function(){var ve;return u?"none":Ce||Q||fe&&(_e==null||((ve=_e.shixun)===null||ve===void 0)?void 0:ve.windows_connection_mode)==="rdp"?"block":"none"},[Ce,u,Q,fe]);return A.a.createElement(S.Fragment,null,ue&&A.a.createElement("div",{className:Ae.a.selectImage},A.a.createElement("section",{className:Ae.a.container},A.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),A.a.createElement("aside",null,_e==null||((xe=_e.shixun_virtual_templates)===null||xe===void 0)?void 0:xe.map(function(ve,Se){return A.a.createElement(x.a,{align:"middle",key:Se},A.a.createElement(i.a,{flex:"1"},ve.template_name),A.a.createElement(i.a,null,A.a.createElement(t.a,{type:"primary",onClick:function(){s(ve.template_id),le(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),we&&A.a.createElement("a",{className:"btn-vnc-resize",onClick:Ge},A.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),A.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:Ve==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},A.a.createElement("div",null,A.a.createElement("iframe",{style:{position:we?"fixed":"absolute",left:0,top:we?54:40,width:"100%",height:"calc(100% - ".concat(we?"100px":"45px",")")},frameBorder:"0",ref:j,allowFullScreen:!0}))),A.a.createElement("div",{style:{position:we?"fixed":"absolute",left:0,top:we?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(we?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(we?"full-screen":"")},u?A.a.createElement(O.a,{message:G,style:{color:"#0152d9"}},A.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},A.a.createElement(K.a,{percent:p,format:function(Se){return A.a.createElement("span",{className:"c-white"},Se,"%")}}))):null,A.a.createElement("div",{ref:me,className:"vnc-panel ".concat(u?"hidden zIndexf1":"animated fadeIn")})),A.a.createElement(B.a,null,A.a.createElement(m.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:$,onCancel:tt,footer:null},A.a.createElement(Ke,{onCancel:tt,onSave:Ze,content:e}))))}},rwxt:function(Te,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("GdRQ");function K(c,i){if(!(c instanceof i))throw new TypeError("Cannot call a class as a function")}function U(c,i){for(var o=0;o>>24,b>>>=F,g-=F,F=B>>>16&255,F===0)be[o++]=B&65535;else if(F&16){L=B&65535,F&=15,F&&(g>>=F,g-=F),g<15&&(b+=q[c++]<>>24,b>>>=F,g-=F,F=B>>>16&255,F&16){if(P=B&65535,F&=15,gm){x.msg="invalid distance too far back",t.mode=l;break e}if(b>>>=F,g-=F,F=o-h,P>F){if(F=P-F,F>v&&t.sane){x.msg="invalid distance too far back",t.mode=l;break e}if(V=0,Y=n,d===0){if(V+=w-F,F2;)be[o++]=Y[V++],be[o++]=Y[V++],be[o++]=Y[V++],L-=3;L&&(be[o++]=Y[V++],L>1&&(be[o++]=Y[V++]))}else{V=o-P;do be[o++]=be[V++],be[o++]=be[V++],be[o++]=be[V++],L-=3;while(L>2);L&&(be[o++]=be[V++],L>1&&(be[o++]=be[V++]))}}else if((F&64)===0){B=A[(B&65535)+(b&(1<>3,c-=L,g-=L<<3,b&=(1<0){var w=[m],v=m.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,r=(0,l.deflate)(this.strm,l.Z_FULL_FLUSH),r<0)throw new Error("zlib deflate failed");var d=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);v+=d.length,w.push(d)}while(this.strm.avail_in>0);for(var n=new Uint8Array(v),b=0,g=0;g>>16&65535|0,i=0;x!==0;){i=x>2e3?2e3:x,x-=i;do t=t+U[T++]|0,c=c+t|0;while(--i);t%=65521,c%=65521}return t|c<<16|0}}}]); diff --git a/p__tasks__index.1b37a4bd.async.js b/p__tasks__index.a78d577f.async.js similarity index 86% rename from p__tasks__index.1b37a4bd.async.js rename to p__tasks__index.a78d577f.async.js index 7a31dadc11..10a8fb6467 100644 --- a/p__tasks__index.1b37a4bd.async.js +++ b/p__tasks__index.a78d577f.async.js @@ -7,10 +7,10 @@ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=s.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){c._accessibilityTreeRoot.appendChild(c._liveRegion)},0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&l.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(a){this._clearLiveRegion(),this._charsToConsume.push(a)},t.prototype._refreshRows=function(a,c){this._renderRowsDebouncer.refresh(a,c,this._terminal.rows)},t.prototype._renderRows=function(a,c){for(var d=this._terminal.buffer,f=d.lines.length.toString(),h=a;h<=c;h++){var u=d.translateBufferLineToString(d.ydisp+h,!0),E=(d.ydisp+h+1).toString(),x=this._rowElements[h];x&&(u.length===0?x.innerHTML=" ":x.textContent=u,x.setAttribute("aria-posinset",E),x.setAttribute("aria-setsize",f))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var a=0;a=0;C--)(E=d[C])&&(O=(x<3?E(O):x>3?E(f,h,O):E(f,h))||O);return x>3&&O&&Object.defineProperty(f,h,O),O},_=this&&this.__param||function(d,f){return function(h,u){f(h,u,d)}};Object.defineProperty(v,"__esModule",{value:!0}),v.DomRenderer=void 0;var p=T(58),e=T(9),o=T(2),n=T(5),l=T(1),r=T(0),i=T(10),t=T(17),a=1,c=function(d){function f(h,u,E,x,O,C,w,S,A){var D=d.call(this)||this;return D._colors=h,D._element=u,D._screenElement=E,D._viewportElement=x,D._linkifier=O,D._linkifier2=C,D._charSizeService=w,D._optionsService=S,D._bufferService=A,D._terminalClass=a++,D._rowElements=[],D._rowContainer=document.createElement("div"),D._rowContainer.classList.add("xterm-rows"),D._rowContainer.style.lineHeight="normal",D._rowContainer.setAttribute("aria-hidden","true"),D._refreshRowElements(D._bufferService.cols,D._bufferService.rows),D._selectionContainer=document.createElement("div"),D._selectionContainer.classList.add("xterm-selection"),D._selectionContainer.setAttribute("aria-hidden","true"),D.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},D._updateDimensions(),D._injectCss(),D._rowFactory=new p.DomRendererRowFactory(document,D._optionsService,D._colors),D._element.classList.add("xterm-dom-renderer-owner-"+D._terminalClass),D._screenElement.appendChild(D._rowContainer),D._screenElement.appendChild(D._selectionContainer),D._linkifier.onShowLinkUnderline(function(M){return D._onLinkHover(M)}),D._linkifier.onHideLinkUnderline(function(M){return D._onLinkLeave(M)}),D._linkifier2.onShowLinkUnderline(function(M){return D._onLinkHover(M)}),D._linkifier2.onHideLinkUnderline(function(M){return D._onLinkLeave(M)}),D}return g(f,d),Object.defineProperty(f.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),t.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),d.prototype.dispose.call(this)},f.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var h=0,u=this._rowElements;hu;)this._rowContainer.removeChild(this._rowElements.pop())},f.prototype.onResize=function(h,u){this._refreshRowElements(h,u),this._updateDimensions()},f.prototype.onCharSizeChanged=function(){this._updateDimensions()},f.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},f.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},f.prototype.onSelectionChanged=function(h,u,E){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(h&&u){var x=h[1]-this._bufferService.buffer.ydisp,O=u[1]-this._bufferService.buffer.ydisp,C=Math.max(x,0),w=Math.min(O,this._bufferService.rows-1);if(!(C>=this._bufferService.rows||w<0)){var S=document.createDocumentFragment();if(E)S.appendChild(this._createSelectionElement(C,h[0],u[0],w-C+1));else{var A=x===C?h[0]:0,D=C===w?u[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(C,A,D));var M=w-C-1;if(S.appendChild(this._createSelectionElement(C+1,0,this._bufferService.cols,M)),C!==w){var N=O===w?u[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(w,0,N))}}this._selectionContainer.appendChild(S)}}},f.prototype._createSelectionElement=function(h,u,E,x){x===void 0&&(x=1);var O=document.createElement("div");return O.style.height=x*this.dimensions.actualCellHeight+"px",O.style.top=h*this.dimensions.actualCellHeight+"px",O.style.left=u*this.dimensions.actualCellWidth+"px",O.style.width=this.dimensions.actualCellWidth*(E-u)+"px",O},f.prototype.onCursorMove=function(){},f.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},f.prototype.clear=function(){for(var h=0,u=this._rowElements;h=O&&(h=0,E++)}},f=s([_(6,n.ICharSizeService),_(7,l.IOptionsService),_(8,l.IBufferService)],f)}(o.Disposable);v.DomRenderer=c},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.DomRendererRowFactory=v.CURSOR_STYLE_UNDERLINE_CLASS=v.CURSOR_STYLE_BAR_CLASS=v.CURSOR_STYLE_BLOCK_CLASS=v.CURSOR_BLINK_CLASS=v.CURSOR_CLASS=v.UNDERLINE_CLASS=v.ITALIC_CLASS=v.DIM_CLASS=v.BOLD_CLASS=void 0;var y=T(9),g=T(3),s=T(4),_=T(10);v.BOLD_CLASS="xterm-bold",v.DIM_CLASS="xterm-dim",v.ITALIC_CLASS="xterm-italic",v.UNDERLINE_CLASS="xterm-underline",v.CURSOR_CLASS="xterm-cursor",v.CURSOR_BLINK_CLASS="xterm-cursor-blink",v.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",v.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",v.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var p=function(){function o(n,l,r){this._document=n,this._optionsService=l,this._colors=r,this._workCell=new s.CellData}return o.prototype.setColors=function(n){this._colors=n},o.prototype.createRow=function(n,l,r,i,t,a,c){for(var d=this._document.createDocumentFragment(),f=0,h=Math.min(n.length,c)-1;h>=0;h--)if(n.loadCell(h,this._workCell).getCode()!==g.NULL_CELL_CODE||l&&h===i){f=h+1;break}for(h=0;h1&&(E.style.width=a*u+"px"),l&&h===i)switch(E.classList.add(v.CURSOR_CLASS),t&&E.classList.add(v.CURSOR_BLINK_CLASS),r){case"bar":E.classList.add(v.CURSOR_STYLE_BAR_CLASS);break;case"underline":E.classList.add(v.CURSOR_STYLE_UNDERLINE_CLASS);break;default:E.classList.add(v.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&E.classList.add(v.BOLD_CLASS),this._workCell.isItalic()&&E.classList.add(v.ITALIC_CLASS),this._workCell.isDim()&&E.classList.add(v.DIM_CLASS),this._workCell.isUnderline()&&E.classList.add(v.UNDERLINE_CLASS),this._workCell.isInvisible()?E.textContent=g.WHITESPACE_CELL_CHAR:E.textContent=this._workCell.getChars()||g.WHITESPACE_CELL_CHAR;var x=this._workCell.getFgColor(),O=this._workCell.getFgColorMode(),C=this._workCell.getBgColor(),w=this._workCell.getBgColorMode(),S=!!this._workCell.isInverse();if(S){var A=x;x=C,C=A;var D=O;O=w,w=D}switch(O){case 16777216:case 33554432:this._workCell.isBold()&&x<8&&this._optionsService.options.drawBoldTextInBrightColors&&(x+=8),this._applyMinimumContrast(E,this._colors.background,this._colors.ansi[x])||E.classList.add("xterm-fg-"+x);break;case 50331648:var M=_.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(E,this._colors.background,M)||this._addStyle(E,"color:#"+e(x.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(E,this._colors.background,this._colors.foreground)||S&&E.classList.add("xterm-fg-"+y.INVERTED_DEFAULT_COLOR)}switch(w){case 16777216:case 33554432:E.classList.add("xterm-bg-"+C);break;case 50331648:this._addStyle(E,"background-color:#"+e(C.toString(16),"0",6));break;case 0:default:S&&E.classList.add("xterm-bg-"+y.INVERTED_DEFAULT_COLOR)}d.appendChild(E)}}return d},o.prototype._applyMinimumContrast=function(n,l,r){if(this._optionsService.options.minimumContrastRatio===1)return!1;var i=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return i===void 0&&(i=_.color.ensureContrastRatio(l,r,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,i!=null?i:null)),!!i&&(this._addStyle(n,"color:"+i.css),!0)},o.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},o}();function e(o,n,l){for(;o.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};v.evaluateKeyboardEvent=function(s,_,p,e){var o={type:0,cancel:!1,key:void 0},n=(s.shiftKey?1:0)|(s.altKey?2:0)|(s.ctrlKey?4:0)|(s.metaKey?8:0);switch(s.keyCode){case 0:s.key==="UIKeyInputUpArrow"?o.key=_?y.C0.ESC+"OA":y.C0.ESC+"[A":s.key==="UIKeyInputLeftArrow"?o.key=_?y.C0.ESC+"OD":y.C0.ESC+"[D":s.key==="UIKeyInputRightArrow"?o.key=_?y.C0.ESC+"OC":y.C0.ESC+"[C":s.key==="UIKeyInputDownArrow"&&(o.key=_?y.C0.ESC+"OB":y.C0.ESC+"[B");break;case 8:if(s.shiftKey){o.key=y.C0.BS;break}if(s.altKey){o.key=y.C0.ESC+y.C0.DEL;break}o.key=y.C0.DEL;break;case 9:if(s.shiftKey){o.key=y.C0.ESC+"[Z";break}o.key=y.C0.HT,o.cancel=!0;break;case 13:o.key=s.altKey?y.C0.ESC+y.C0.CR:y.C0.CR,o.cancel=!0;break;case 27:o.key=y.C0.ESC,s.altKey&&(o.key=y.C0.ESC+y.C0.ESC),o.cancel=!0;break;case 37:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"D",o.key===y.C0.ESC+"[1;3D"&&(o.key=y.C0.ESC+(p?"b":"[1;5D"))):o.key=_?y.C0.ESC+"OD":y.C0.ESC+"[D";break;case 39:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"C",o.key===y.C0.ESC+"[1;3C"&&(o.key=y.C0.ESC+(p?"f":"[1;5C"))):o.key=_?y.C0.ESC+"OC":y.C0.ESC+"[C";break;case 38:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"A",p||o.key!==y.C0.ESC+"[1;3A"||(o.key=y.C0.ESC+"[1;5A")):o.key=_?y.C0.ESC+"OA":y.C0.ESC+"[A";break;case 40:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"B",p||o.key!==y.C0.ESC+"[1;3B"||(o.key=y.C0.ESC+"[1;5B")):o.key=_?y.C0.ESC+"OB":y.C0.ESC+"[B";break;case 45:s.shiftKey||s.ctrlKey||(o.key=y.C0.ESC+"[2~");break;case 46:o.key=n?y.C0.ESC+"[3;"+(n+1)+"~":y.C0.ESC+"[3~";break;case 36:o.key=n?y.C0.ESC+"[1;"+(n+1)+"H":_?y.C0.ESC+"OH":y.C0.ESC+"[H";break;case 35:o.key=n?y.C0.ESC+"[1;"+(n+1)+"F":_?y.C0.ESC+"OF":y.C0.ESC+"[F";break;case 33:s.shiftKey?o.type=2:o.key=y.C0.ESC+"[5~";break;case 34:s.shiftKey?o.type=3:o.key=y.C0.ESC+"[6~";break;case 112:o.key=n?y.C0.ESC+"[1;"+(n+1)+"P":y.C0.ESC+"OP";break;case 113:o.key=n?y.C0.ESC+"[1;"+(n+1)+"Q":y.C0.ESC+"OQ";break;case 114:o.key=n?y.C0.ESC+"[1;"+(n+1)+"R":y.C0.ESC+"OR";break;case 115:o.key=n?y.C0.ESC+"[1;"+(n+1)+"S":y.C0.ESC+"OS";break;case 116:o.key=n?y.C0.ESC+"[15;"+(n+1)+"~":y.C0.ESC+"[15~";break;case 117:o.key=n?y.C0.ESC+"[17;"+(n+1)+"~":y.C0.ESC+"[17~";break;case 118:o.key=n?y.C0.ESC+"[18;"+(n+1)+"~":y.C0.ESC+"[18~";break;case 119:o.key=n?y.C0.ESC+"[19;"+(n+1)+"~":y.C0.ESC+"[19~";break;case 120:o.key=n?y.C0.ESC+"[20;"+(n+1)+"~":y.C0.ESC+"[20~";break;case 121:o.key=n?y.C0.ESC+"[21;"+(n+1)+"~":y.C0.ESC+"[21~";break;case 122:o.key=n?y.C0.ESC+"[23;"+(n+1)+"~":y.C0.ESC+"[23~";break;case 123:o.key=n?y.C0.ESC+"[24;"+(n+1)+"~":y.C0.ESC+"[24~";break;default:if(!s.ctrlKey||s.shiftKey||s.altKey||s.metaKey)if(p&&!e||!s.altKey||s.metaKey)p&&!s.altKey&&!s.ctrlKey&&s.metaKey?s.keyCode===65&&(o.type=1):s.key&&!s.ctrlKey&&!s.altKey&&!s.metaKey&&s.keyCode>=48&&s.key.length===1?o.key=s.key:s.key&&s.ctrlKey&&s.key==="_"&&(o.key=y.C0.US);else{var l=g[s.keyCode],r=l&&l[s.shiftKey?1:0];if(r)o.key=y.C0.ESC+r;else if(s.keyCode>=65&&s.keyCode<=90){var i=s.ctrlKey?s.keyCode-64:s.keyCode+32;o.key=y.C0.ESC+String.fromCharCode(i)}}else s.keyCode>=65&&s.keyCode<=90?o.key=String.fromCharCode(s.keyCode-64):s.keyCode===32?o.key=y.C0.NUL:s.keyCode>=51&&s.keyCode<=55?o.key=String.fromCharCode(s.keyCode-51+27):s.keyCode===56?o.key=y.C0.DEL:s.keyCode===219?o.key=y.C0.ESC:s.keyCode===220?o.key=y.C0.FS:s.keyCode===221&&(o.key=y.C0.GS)}return o}},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(a,c){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)f.hasOwnProperty(h)&&(d[h]=f[h])})(a,c)},function(a,c){function d(){this.constructor=a}y(a,c),a.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}),s=this&&this.__decorate||function(a,c,d,f){var h,u=arguments.length,E=u<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(a,c,d,f);else for(var x=a.length-1;x>=0;x--)(h=a[x])&&(E=(u<3?h(E):u>3?h(c,d,E):h(c,d))||E);return u>3&&E&&Object.defineProperty(c,d,E),E},_=this&&this.__param||function(a,c){return function(d,f){c(d,f,a)}};Object.defineProperty(v,"__esModule",{value:!0}),v.RenderService=void 0;var p=T(31),e=T(0),o=T(2),n=T(32),l=T(7),r=T(1),i=T(5),t=function(a){function c(d,f,h,u,E,x){var O=a.call(this)||this;if(O._renderer=d,O._rowCount=f,O._isPaused=!1,O._needsFullRefresh=!1,O._isNextRenderRedrawOnly=!0,O._needsSelectionRefresh=!1,O._canvasWidth=0,O._canvasHeight=0,O._selectionState={start:void 0,end:void 0,columnSelectMode:!1},O._onDimensionsChange=new e.EventEmitter,O._onRender=new e.EventEmitter,O._onRefreshRequest=new e.EventEmitter,O.register({dispose:function(){return O._renderer.dispose()}}),O._renderDebouncer=new p.RenderDebouncer(function(w,S){return O._renderRows(w,S)}),O.register(O._renderDebouncer),O._screenDprMonitor=new n.ScreenDprMonitor,O._screenDprMonitor.setListener(function(){return O.onDevicePixelRatioChange()}),O.register(O._screenDprMonitor),O.register(x.onResize(function(w){return O._fullRefresh()})),O.register(u.onOptionChange(function(){return O._renderer.onOptionsChanged()})),O.register(E.onCharSizeChange(function(){return O.onCharSizeChanged()})),O._renderer.onRequestRedraw(function(w){return O.refreshRows(w.start,w.end,!0)}),O.register(l.addDisposableDomListener(window,"resize",function(){return O.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var C=new IntersectionObserver(function(w){return O._onIntersectionChange(w[w.length-1])},{threshold:0});C.observe(h),O.register({dispose:function(){return C.disconnect()}})}return O}return g(c,a),Object.defineProperty(c.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),c.prototype._onIntersectionChange=function(d){this._isPaused=d.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},c.prototype.refreshRows=function(d,f,h){h===void 0&&(h=!1),this._isPaused?this._needsFullRefresh=!0:(h||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(d,f,this._rowCount))},c.prototype._renderRows=function(d,f){this._renderer.renderRows(d,f),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:d,end:f}),this._isNextRenderRedrawOnly=!0},c.prototype.resize=function(d,f){this._rowCount=f,this._fireOnCanvasResize()},c.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},c.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},c.prototype.dispose=function(){a.prototype.dispose.call(this)},c.prototype.setRenderer=function(d){var f=this;this._renderer.dispose(),this._renderer=d,this._renderer.onRequestRedraw(function(h){return f.refreshRows(h.start,h.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},c.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},c.prototype.setColors=function(d){this._renderer.setColors(d),this._fullRefresh()},c.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},c.prototype.onResize=function(d,f){this._renderer.onResize(d,f),this._fullRefresh()},c.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},c.prototype.onBlur=function(){this._renderer.onBlur()},c.prototype.onFocus=function(){this._renderer.onFocus()},c.prototype.onSelectionChanged=function(d,f,h){this._selectionState.start=d,this._selectionState.end=f,this._selectionState.columnSelectMode=h,this._renderer.onSelectionChanged(d,f,h)},c.prototype.onCursorMove=function(){this._renderer.onCursorMove()},c.prototype.clear=function(){this._renderer.clear()},c.prototype.registerCharacterJoiner=function(d){return this._renderer.registerCharacterJoiner(d)},c.prototype.deregisterCharacterJoiner=function(d){return this._renderer.deregisterCharacterJoiner(d)},c=s([_(3,r.IOptionsService),_(4,i.ICharSizeService),_(5,r.IBufferService)],c)}(o.Disposable);v.RenderService=t},function(I,v,T){"use strict";var y=this&&this.__decorate||function(o,n,l,r){var i,t=arguments.length,a=t<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,l):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,n,l,r);else for(var c=o.length-1;c>=0;c--)(i=o[c])&&(a=(t<3?i(a):t>3?i(n,l,a):i(n,l))||a);return t>3&&a&&Object.defineProperty(n,l,a),a},g=this&&this.__param||function(o,n){return function(l,r){n(l,r,o)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CharSizeService=void 0;var s=T(1),_=T(0),p=function(){function o(n,l,r){this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=new _.EventEmitter,this._measureStrategy=new e(n,l,this._optionsService)}return Object.defineProperty(o.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),o.prototype.measure=function(){var n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())},o=y([g(2,s.IOptionsService)],o)}();v.CharSizeService=p;var e=function(){function o(n,l,r){this._document=n,this._parentElement=l,this._optionsService=r,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return o.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var n=this._measureElement.getBoundingClientRect();return n.width!==0&&n.height!==0&&(this._result.width=n.width,this._result.height=Math.ceil(n.height)),this._result},o}()},function(I,v,T){"use strict";var y=this&&this.__decorate||function(e,o,n,l){var r,i=arguments.length,t=i<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(e,o,n,l);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(t=(i<3?r(t):i>3?r(o,n,t):r(o,n))||t);return i>3&&t&&Object.defineProperty(o,n,t),t},g=this&&this.__param||function(e,o){return function(n,l){o(n,l,e)}};Object.defineProperty(v,"__esModule",{value:!0}),v.MouseService=void 0;var s=T(5),_=T(30),p=function(){function e(o,n){this._renderService=o,this._charSizeService=n}return e.prototype.getCoords=function(o,n,l,r,i){return _.getCoords(o,n,l,r,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,i)},e.prototype.getRawByteCoords=function(o,n,l,r){var i=this.getCoords(o,n,l,r);return _.getRawByteCoords(i)},e=y([g(0,s.IRenderService),g(1,s.ICharSizeService)],e)}();v.MouseService=p},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),s=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.Linkifier2=void 0;var p=T(1),e=T(0),o=T(2),n=T(7),l=function(r){function i(t){var a=r.call(this)||this;return a._bufferService=t,a._linkProviders=[],a._linkCacheDisposables=[],a._isMouseOut=!0,a._activeLine=-1,a._onShowLinkUnderline=a.register(new e.EventEmitter),a._onHideLinkUnderline=a.register(new e.EventEmitter),a.register(o.getDisposeArrayDisposable(a._linkCacheDisposables)),a}return g(i,r),Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),i.prototype.registerLinkProvider=function(t){var a=this;return this._linkProviders.push(t),{dispose:function(){var c=a._linkProviders.indexOf(t);c!==-1&&a._linkProviders.splice(c,1)}}},i.prototype.attachToDom=function(t,a,c){var d=this;this._element=t,this._mouseService=a,this._renderService=c,this.register(n.addDisposableDomListener(this._element,"mouseleave",function(){d._isMouseOut=!0,d._clearCurrentLink()})),this.register(n.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(n.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},i.prototype._onMouseMove=function(t){if(this._lastMouseEvent=t,this._element&&this._mouseService){var a=this._positionFromMouseEvent(t,this._element,this._mouseService);if(a){this._isMouseOut=!1;for(var c=t.composedPath(),d=0;dt?this._bufferService.cols:u.link.range.end.x,O=E;O<=x;O++){if(c.has(O)){f.splice(h--,1);break}c.add(O)}}},i.prototype._checkLinkProviderResult=function(t,a,c){var d,f=this;if(!this._activeProviderReplies)return c;for(var h=this._activeProviderReplies.get(t),u=!1,E=0;E=t&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,o.disposeArray(this._linkCacheDisposables))},i.prototype._handleNewLink=function(t){var a=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(t.link,c)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:t.link.decorations===void 0||t.link.decorations.underline,pointerCursor:t.link.decorations===void 0||t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:function(){var d,f;return(f=(d=a._currentLink)===null||d===void 0?void 0:d.state)===null||f===void 0?void 0:f.decorations.pointerCursor},set:function(d){var f,h;((f=a._currentLink)===null||f===void 0?void 0:f.state)&&a._currentLink.state.decorations.pointerCursor!==d&&(a._currentLink.state.decorations.pointerCursor=d,a._currentLink.state.isHovered&&((h=a._element)===null||h===void 0||h.classList.toggle("xterm-cursor-pointer",d)))}},underline:{get:function(){var d,f;return(f=(d=a._currentLink)===null||d===void 0?void 0:d.state)===null||f===void 0?void 0:f.decorations.underline},set:function(d){var f,h,u;((f=a._currentLink)===null||f===void 0?void 0:f.state)&&((u=(h=a._currentLink)===null||h===void 0?void 0:h.state)===null||u===void 0?void 0:u.decorations.underline)!==d&&(a._currentLink.state.decorations.underline=d,a._currentLink.state.isHovered&&a._fireUnderlineEvent(t.link,d))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(d){var f=d.start===0?0:d.start+1+a._bufferService.buffer.ydisp;a._clearCurrentLink(f,d.end+1+a._bufferService.buffer.ydisp)})))}},i.prototype._linkHover=function(t,a,c){var d;((d=this._currentLink)===null||d===void 0?void 0:d.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&t.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(c,a.text)},i.prototype._fireUnderlineEvent=function(t,a){var c=t.range,d=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-d-1,c.end.x,c.end.y-d-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)},i.prototype._linkLeave=function(t,a,c){var d;((d=this._currentLink)===null||d===void 0?void 0:d.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&t.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(c,a.text)},i.prototype._linkAtPosition=function(t,a){var c=t.range.start.y===t.range.end.y,d=t.range.start.ya.y;return(c&&t.range.start.x<=a.x&&t.range.end.x>=a.x||d&&t.range.end.x>=a.x||f&&t.range.start.x<=a.x||d&&f)&&t.range.start.y<=a.y&&t.range.end.y>=a.y},i.prototype._positionFromMouseEvent=function(t,a,c){var d=c.getCoords(t,a,this._bufferService.cols,this._bufferService.rows);if(d)return{x:d[0],y:d[1]+this._bufferService.buffer.ydisp}},i.prototype._createLinkUnderlineEvent=function(t,a,c,d,f){return{x1:t,y1:a,x2:c,y2:d,cols:this._bufferService.cols,fg:f}},i=s([_(0,p.IBufferService)],i)}(o.Disposable);v.Linkifier2=l},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CoreBrowserService=void 0;var y=function(){function g(s){this._textarea=s}return Object.defineProperty(g.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),g}();v.CoreBrowserService=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(E,x){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,C){O.__proto__=C}||function(O,C){for(var w in C)C.hasOwnProperty(w)&&(O[w]=C[w])})(E,x)},function(E,x){function O(){this.constructor=E}y(E,x),E.prototype=x===null?Object.create(x):(O.prototype=x.prototype,new O)});Object.defineProperty(v,"__esModule",{value:!0}),v.CoreTerminal=void 0;var s=T(2),_=T(1),p=T(66),e=T(67),o=T(68),n=T(74),l=T(75),r=T(0),i=T(76),t=T(77),a=T(78),c=T(80),d=T(81),f=T(19),h=T(82),u=function(E){function x(O){var C=E.call(this)||this;return C._onBinary=new r.EventEmitter,C._onData=new r.EventEmitter,C._onLineFeed=new r.EventEmitter,C._onResize=new r.EventEmitter,C._onScroll=new r.EventEmitter,C._instantiationService=new p.InstantiationService,C.optionsService=new n.OptionsService(O),C._instantiationService.setService(_.IOptionsService,C.optionsService),C._bufferService=C.register(C._instantiationService.createInstance(o.BufferService)),C._instantiationService.setService(_.IBufferService,C._bufferService),C._logService=C._instantiationService.createInstance(e.LogService),C._instantiationService.setService(_.ILogService,C._logService),C._coreService=C.register(C._instantiationService.createInstance(l.CoreService,function(){return C.scrollToBottom()})),C._instantiationService.setService(_.ICoreService,C._coreService),C._coreMouseService=C._instantiationService.createInstance(i.CoreMouseService),C._instantiationService.setService(_.ICoreMouseService,C._coreMouseService),C._dirtyRowService=C._instantiationService.createInstance(t.DirtyRowService),C._instantiationService.setService(_.IDirtyRowService,C._dirtyRowService),C.unicodeService=C._instantiationService.createInstance(a.UnicodeService),C._instantiationService.setService(_.IUnicodeService,C.unicodeService),C._charsetService=C._instantiationService.createInstance(c.CharsetService),C._instantiationService.setService(_.ICharsetService,C._charsetService),C._inputHandler=new f.InputHandler(C._bufferService,C._charsetService,C._coreService,C._dirtyRowService,C._logService,C.optionsService,C._coreMouseService,C.unicodeService),C.register(r.forwardEvent(C._inputHandler.onLineFeed,C._onLineFeed)),C.register(C._inputHandler),C.register(r.forwardEvent(C._bufferService.onResize,C._onResize)),C.register(r.forwardEvent(C._coreService.onData,C._onData)),C.register(r.forwardEvent(C._coreService.onBinary,C._onBinary)),C.register(C.optionsService.onOptionChange(function(w){return C._updateOptions(w)})),C._writeBuffer=new h.WriteBuffer(function(w){return C._inputHandler.parse(w)}),C}return g(x,E),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){var O;this._isDisposed||(E.prototype.dispose.call(this),(O=this._windowsMode)===null||O===void 0||O.dispose(),this._windowsMode=void 0)},x.prototype.write=function(O,C){this._writeBuffer.write(O,C)},x.prototype.writeSync=function(O){this._writeBuffer.writeSync(O)},x.prototype.resize=function(O,C){isNaN(O)||isNaN(C)||(O=Math.max(O,o.MINIMUM_COLS),C=Math.max(C,o.MINIMUM_ROWS),this._bufferService.resize(O,C))},x.prototype.scroll=function(O,C){C===void 0&&(C=!1);var w,S=this._bufferService.buffer;(w=this._cachedBlankLine)&&w.length===this.cols&&w.getFg(0)===O.fg&&w.getBg(0)===O.bg||(w=S.getBlankLine(O,C),this._cachedBlankLine=w),w.isWrapped=C;var A=S.ybase+S.scrollTop,D=S.ybase+S.scrollBottom;if(S.scrollTop===0){var M=S.lines.isFull;D===S.lines.length-1?M?S.lines.recycle().copyFrom(w):S.lines.push(w.clone()):S.lines.splice(D+1,0,w.clone()),M?this._bufferService.isUserScrolling&&(S.ydisp=Math.max(S.ydisp-1,0)):(S.ybase++,this._bufferService.isUserScrolling||S.ydisp++)}else{var N=D-A+1;S.lines.shiftElements(A+1,N-1,-1),S.lines.set(D,w.clone())}this._bufferService.isUserScrolling||(S.ydisp=S.ybase),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom),this._onScroll.fire(S.ydisp)},x.prototype.scrollLines=function(O,C){var w=this._bufferService.buffer;if(O<0){if(w.ydisp===0)return;this._bufferService.isUserScrolling=!0}else O+w.ydisp>=w.ybase&&(this._bufferService.isUserScrolling=!1);var S=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+O,w.ybase),0),S!==w.ydisp&&(C||this._onScroll.fire(w.ydisp))},x.prototype.scrollPages=function(O){this.scrollLines(O*(this.rows-1))},x.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},x.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},x.prototype.scrollToLine=function(O){var C=O-this._bufferService.buffer.ydisp;C!==0&&this.scrollLines(C)},x.prototype.addEscHandler=function(O,C){return this._inputHandler.addEscHandler(O,C)},x.prototype.addDcsHandler=function(O,C){return this._inputHandler.addDcsHandler(O,C)},x.prototype.addCsiHandler=function(O,C){return this._inputHandler.addCsiHandler(O,C)},x.prototype.addOscHandler=function(O,C){return this._inputHandler.addOscHandler(O,C)},x.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},x.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},x.prototype._updateOptions=function(O){var C;switch(O){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((C=this._windowsMode)===null||C===void 0||C.dispose(),this._windowsMode=void 0)}},x.prototype._enableWindowsMode=function(){var O=this;if(!this._windowsMode){var C=[];C.push(this.onLineFeed(d.updateWindowsModeWrappedState.bind(null,this._bufferService))),C.push(this.addCsiHandler({final:"H"},function(){return d.updateWindowsModeWrappedState(O._bufferService),!1})),this._windowsMode={dispose:function(){for(var w=0,S=C;w0?r[0].index:n.length;if(n.length!==f)throw new Error("[createInstance] First service dependency of "+o.name+" at position "+(f+1)+" conflicts with "+n.length+" static arguments");return new(o.bind.apply(o,y([void 0],y(n,i))))},e}();v.InstantiationService=p},function(I,v,T){"use strict";var y=this&&this.__decorate||function(n,l,r,i){var t,a=arguments.length,c=a<3?l:i===null?i=Object.getOwnPropertyDescriptor(l,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,l,r,i);else for(var d=n.length-1;d>=0;d--)(t=n[d])&&(c=(a<3?t(c):a>3?t(l,r,c):t(l,r))||c);return a>3&&c&&Object.defineProperty(l,r,c),c},g=this&&this.__param||function(n,l){return function(r,i){l(r,i,n)}},s=this&&this.__spreadArrays||function(){for(var n=0,l=0,r=arguments.length;l=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.BufferService=v.MINIMUM_ROWS=v.MINIMUM_COLS=void 0;var p=T(1),e=T(69),o=T(0),n=T(2);v.MINIMUM_COLS=2,v.MINIMUM_ROWS=1;var l=function(r){function i(t){var a=r.call(this)||this;return a._optionsService=t,a.isUserScrolling=!1,a._onResize=new o.EventEmitter,a.cols=Math.max(t.options.cols,v.MINIMUM_COLS),a.rows=Math.max(t.options.rows,v.MINIMUM_ROWS),a.buffers=new e.BufferSet(t,a),a}return g(i,r),Object.defineProperty(i.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){r.prototype.dispose.call(this),this.buffers.dispose()},i.prototype.resize=function(t,a){this.cols=t,this.rows=a,this.buffers.resize(t,a),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:t,rows:a})},i.prototype.reset=function(){this.buffers.dispose(),this.buffers=new e.BufferSet(this._optionsService,this),this.isUserScrolling=!1},i=s([_(0,p.IOptionsService)],i)}(n.Disposable);v.BufferService=l},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(e,o){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var r in l)l.hasOwnProperty(r)&&(n[r]=l[r])})(e,o)},function(e,o){function n(){this.constructor=e}y(e,o),e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)});Object.defineProperty(v,"__esModule",{value:!0}),v.BufferSet=void 0;var s=T(70),_=T(0),p=function(e){function o(n,l){var r=e.call(this)||this;return r._onBufferActivate=r.register(new _.EventEmitter),r._normal=new s.Buffer(!0,n,l),r._normal.fillViewportRows(),r._alt=new s.Buffer(!1,n,l),r._activeBuffer=r._normal,r.setupTabStops(),r}return g(o,e),Object.defineProperty(o.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),o.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},o.prototype.activateAltBuffer=function(n){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(n),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},o.prototype.resize=function(n,l){this._normal.resize(n,l),this._alt.resize(n,l)},o.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},o}(T(2).Disposable);v.BufferSet=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.BufferStringIterator=v.Buffer=v.MAX_BUFFER_SIZE=void 0;var y=T(71),g=T(16),s=T(4),_=T(3),p=T(72),e=T(73),o=T(20),n=T(6);v.MAX_BUFFER_SIZE=4294967295;var l=function(){function i(t,a,c){this._hasScrollback=t,this._optionsService=a,this._bufferService=c,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=s.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=s.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return i.prototype.getNullCell=function(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell},i.prototype.getWhitespaceCell=function(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell},i.prototype.getBlankLine=function(t,a){return new g.BufferLine(this._bufferService.cols,this.getNullCell(t),a)},Object.defineProperty(i.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&tv.MAX_BUFFER_SIZE?v.MAX_BUFFER_SIZE:a},i.prototype.fillViewportRows=function(t){if(this.lines.length===0){t===void 0&&(t=g.DEFAULT_ATTR_DATA);for(var a=this._rows;a--;)this.lines.push(this.getBlankLine(t))}},i.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},i.prototype.resize=function(t,a){var c=this.getNullCell(g.DEFAULT_ATTR_DATA),d=this._getCorrectBufferLength(a);if(d>this.lines.maxLength&&(this.lines.maxLength=d),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+h+1?(this.ybase--,h++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(t,c)));else for(u=this._rows;u>a;u--)this.lines.length>a+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(d0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=d}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,a-1),h&&(this.y+=h),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=a-1,this._isReflowEnabled&&(this._reflow(t,a),this._cols>t))for(f=0;fthis._cols?this._reflowLarger(t,a):this._reflowSmaller(t,a))},i.prototype._reflowLarger=function(t,a){var c=p.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(c.length>0){var d=p.reflowLargerCreateNewLayout(this.lines,c);p.reflowLargerApplyNewLayout(this.lines,d.layout),this._reflowLargerAdjustViewport(t,a,d.countRemoved)}},i.prototype._reflowLargerAdjustViewport=function(t,a,c){for(var d=this.getNullCell(g.DEFAULT_ATTR_DATA),f=c;f-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;h--){var u=this.lines.get(h);if(!(!u||!u.isWrapped&&u.getTrimmedLength()<=t)){for(var E=[u];u.isWrapped&&h>0;)u=this.lines.get(--h),E.unshift(u);var x=this.ybase+this.y;if(!(x>=h&&x0&&(d.push({start:h+E.length+f,newLines:A}),f+=A.length),E.push.apply(E,A);var N=C.length-1,P=C[N];P===0&&(P=C[--N]);for(var z=E.length-w-1,X=O;z>=0;){var k=Math.min(X,P);if(E[N].copyCellsFrom(E[z],X-k,P-k,k,!0),(P-=k)===0&&(P=C[--N]),(X-=k)===0){z--;var F=Math.max(z,0);X=p.getWrappedLineTrimmedLength(E,F,this._cols)}}for(D=0;D0;)this.ybase===0?this.y0){var L=[],B=[];for(D=0;D=0;D--)if(Se&&Se.start>re+ke){for(var te=Se.newLines.length-1;te>=0;te--)this.lines.set(D--,Se.newLines[te]);D++,L.push({index:re+1,amount:Se.newLines.length}),ke+=Se.newLines.length,Se=d[++he]}else this.lines.set(D,B[re--]);var Re=0;for(D=L.length-1;D>=0;D--)L[D].index+=Re,this.lines.onInsertEmitter.fire(L[D]),Re+=L[D].amount;var Ce=Math.max(0,Z+f-this.lines.maxLength);Ce>0&&this.lines.onTrimEmitter.fire(Ce)}},i.prototype.stringIndexToBufferIndex=function(t,a,c){for(c===void 0&&(c=!1);a;){var d=this.lines.get(t);if(!d)return[-1,-1];for(var f=c?d.getTrimmedLength():d.length,h=0;h0&&this.lines.get(a).isWrapped;)a--;for(;c+10;);return t>=this._cols?this._cols-1:t<0?0:t},i.prototype.nextStop=function(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t=this._cols?this._cols-1:t<0?0:t},i.prototype.addMarker=function(t){var a=this,c=new e.Marker(t);return this.markers.push(c),c.register(this.lines.onTrim(function(d){c.line-=d,c.line<0&&c.dispose()})),c.register(this.lines.onInsert(function(d){c.line>=d.index&&(c.line+=d.amount)})),c.register(this.lines.onDelete(function(d){c.line>=d.index&&c.lined.index&&(c.line-=d.amount)})),c.register(c.onDispose(function(){return a._removeMarker(c)})),c},i.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},i.prototype.iterator=function(t,a,c,d,f){return new r(this,t,a,c,d,f)},i}();v.Buffer=l;var r=function(){function i(t,a,c,d,f,h){c===void 0&&(c=0),d===void 0&&(d=t.lines.length),f===void 0&&(f=0),h===void 0&&(h=0),this._buffer=t,this._trimRight=a,this._startIndex=c,this._endIndex=d,this._startOverscan=f,this._endOverscan=h,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return i.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(t.last=this._endIndex+this._endOverscan),t.first=Math.max(t.first,0),t.last=Math.min(t.last,this._buffer.lines.length);for(var a="",c=t.first;c<=t.last;++c)a+=this._buffer.translateBufferLineToString(c,this._trimRight);return this._current=t.last+1,{range:t,content:a}},i}();v.BufferStringIterator=r},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CircularList=void 0;var y=T(0),g=function(){function s(_){this._maxLength=_,this.onDeleteEmitter=new y.EventEmitter,this.onInsertEmitter=new y.EventEmitter,this.onTrimEmitter=new y.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(s.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"maxLength",{get:function(){return this._maxLength},set:function(_){if(this._maxLength!==_){for(var p=new Array(_),e=0;ethis._length)for(var p=this._length;p<_;p++)this._array[p]=void 0;this._length=_},enumerable:!1,configurable:!0}),s.prototype.get=function(_){return this._array[this._getCyclicIndex(_)]},s.prototype.set=function(_,p){this._array[this._getCyclicIndex(_)]=p},s.prototype.push=function(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},s.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(s.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),s.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},s.prototype.splice=function(_,p){for(var e=[],o=2;o=_;n--)this._array[this._getCyclicIndex(n+e.length)]=this._array[this._getCyclicIndex(n)];for(n=0;nthis._maxLength){var l=this._length+e.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=e.length},s.prototype.trimStart=function(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)},s.prototype.shiftElements=function(_,p,e){if(!(p<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+e<0)throw new Error("Cannot shift elements in list beyond index 0");if(e>0){for(var o=p-1;o>=0;o--)this.set(_+o+e,this.get(_+o));var n=_+p+e-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(o=0;o=n&&p0&&(O>t||i[O].getTrimmedLength()===0);O--)x++;x>0&&(o.push(n+i.length-x),o.push(x)),n+=i.length-1}}}return o},v.reflowLargerCreateNewLayout=function(g,s){for(var _=[],p=0,e=s[p],o=0,n=0;nr&&(o-=r,n++);var i=g[n].getWidth(o-1)===2;i&&o--;var t=i?_-1:_;p.push(t),l+=t}return p},v.getWrappedLineTrimmedLength=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(p,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var l in n)n.hasOwnProperty(l)&&(o[l]=n[l])})(p,e)},function(p,e){function o(){this.constructor=p}y(p,e),p.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(v,"__esModule",{value:!0}),v.Marker=void 0;var s=T(0),_=function(p){function e(o){var n=p.call(this)||this;return n.line=o,n._id=e._nextId++,n.isDisposed=!1,n._onDispose=new s.EventEmitter,n}return g(e,p),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},e._nextId=1,e}(T(2).Disposable);v.Marker=_},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.OptionsService=v.DEFAULT_OPTIONS=v.DEFAULT_BELL_SOUND=void 0;var y=T(0),g=T(11),s=T(33);v.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",v.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:v.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:g.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var _=["cols","rows"],p=function(){function e(o){this._onOptionChange=new y.EventEmitter,this.options=s.clone(v.DEFAULT_OPTIONS);for(var n=0,l=Object.keys(o);n=0;E--)(f=t[E])&&(u=(h<3?f(u):h>3?f(a,c,u):f(a,c))||u);return h>3&&u&&Object.defineProperty(a,c,u),u},_=this&&this.__param||function(t,a){return function(c,d){a(c,d,t)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CoreService=void 0;var p=T(1),e=T(0),o=T(33),n=T(2),l=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),i=function(t){function a(c,d,f,h){var u=t.call(this)||this;return u._bufferService=d,u._logService=f,u._optionsService=h,u.isCursorInitialized=!1,u.isCursorHidden=!1,u._onData=u.register(new e.EventEmitter),u._onUserInput=u.register(new e.EventEmitter),u._onBinary=u.register(new e.EventEmitter),u._scrollToBottom=c,u.register({dispose:function(){return u._scrollToBottom=void 0}}),u.modes=o.clone(l),u.decPrivateModes=o.clone(r),u}return g(a,t),Object.defineProperty(a.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),a.prototype.reset=function(){this.modes=o.clone(l),this.decPrivateModes=o.clone(r)},a.prototype.triggerDataEvent=function(c,d){if(d===void 0&&(d=!1),!this._optionsService.options.disableStdin){var f=this._bufferService.buffer;f.ybase!==f.ydisp&&this._scrollToBottom(),d&&this._onUserInput.fire(),this._logService.debug('sending data "'+c+'"',function(){return c.split("").map(function(h){return h.charCodeAt(0)})}),this._onData.fire(c)}},a.prototype.triggerBinaryEvent=function(c){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+c+'"',function(){return c.split("").map(function(d){return d.charCodeAt(0)})}),this._onBinary.fire(c))},a=s([_(1,p.IBufferService),_(2,p.ILogService),_(3,p.IOptionsService)],a)}(n.Disposable);v.CoreService=i},function(I,v,T){"use strict";var y=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},g=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CoreMouseService=void 0;var s=T(1),_=T(0),p={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function e(r,i){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||i||(t|=3)),t}var o=String.fromCharCode,n={DEFAULT:function(r){var i=[e(r,!1)+32,r.col+32,r.row+32];return i[0]>255||i[1]>255||i[2]>255?"":""+o(i[0])+o(i[1])+o(i[2])},SGR:function(r){var i=r.action===0&&r.button!==4?"m":"M";return"[<"+e(r,!0)+";"+r.col+";"+r.row+i}},l=function(){function r(i,t){this._bufferService=i,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new _.EventEmitter,this._lastEvent=null;for(var a=0,c=Object.keys(p);a=this._bufferService.cols||i.row<0||i.row>=this._bufferService.rows)return!1;if(i.button===4&&i.action===32)return!1;if(i.button===3&&i.action!==32)return!1;if(i.button!==4&&(i.action===2||i.action===3))return!1;if(i.col++,i.row++,i.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,i))return!1;if(!this._protocols[this._activeProtocol].restrict(i))return!1;var t=this._encodings[this._activeEncoding](i);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=i,!0},r.prototype.explainEvents=function(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}},r.prototype._compareEvents=function(i,t){return i.col===t.col&&(i.row===t.row&&(i.button===t.button&&(i.action===t.action&&(i.ctrl===t.ctrl&&i.alt===t.alt))))&&i.shift===t.shift},r=y([g(0,s.IBufferService),g(1,s.ICoreService)],r)}();v.CoreMouseService=l},function(I,v,T){"use strict";var y=this&&this.__decorate||function(p,e,o,n){var l,r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,e,o,n);else for(var t=p.length-1;t>=0;t--)(l=p[t])&&(i=(r<3?l(i):r>3?l(e,o,i):l(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i},g=this&&this.__param||function(p,e){return function(o,n){e(o,n,p)}};Object.defineProperty(v,"__esModule",{value:!0}),v.DirtyRowService=void 0;var s=T(1),_=function(){function p(e){this._bufferService=e,this.clearRange()}return Object.defineProperty(p.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),p.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},p.prototype.markDirty=function(e){ethis._end&&(this._end=e)},p.prototype.markRangeDirty=function(e,o){if(e>o){var n=e;e=o,o=n}ethis._end&&(this._end=o)},p.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},p=y([g(0,s.IBufferService)],p)}();v.DirtyRowService=_},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.UnicodeService=void 0;var y=T(0),g=T(79),s=function(){function _(){this._providers=Object.create(null),this._active="",this._onChange=new y.EventEmitter;var p=new g.UnicodeV6;this.register(p),this._active=p.version,this._activeProvider=p}return Object.defineProperty(_.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"activeVersion",{get:function(){return this._active},set:function(p){if(!this._providers[p])throw new Error('unknown Unicode version "'+p+'"');this._active=p,this._activeProvider=this._providers[p],this._onChange.fire(p)},enumerable:!1,configurable:!0}),_.prototype.register=function(p){this._providers[p.version]=p},_.prototype.wcwidth=function(p){return this._activeProvider.wcwidth(p)},_.prototype.getStringCellWidth=function(p){for(var e=0,o=p.length,n=0;n=o)return e+this.wcwidth(l);var r=p.charCodeAt(n);56320<=r&&r<=57343?l=1024*(l-55296)+r-56320+65536:e+=this.wcwidth(r)}e+=this.wcwidth(l)}return e},_}();v.UnicodeService=s},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.UnicodeV6=void 0;var y,g=T(15),s=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],p=function(){function e(){if(this.version="6",!y){y=new Uint8Array(65536),g.fill(y,1),y[0]=0,g.fill(y,0,1,32),g.fill(y,0,127,160),g.fill(y,2,4352,4448),y[9001]=2,y[9002]=2,g.fill(y,2,11904,42192),y[12351]=1,g.fill(y,2,44032,55204),g.fill(y,2,63744,64256),g.fill(y,2,65040,65050),g.fill(y,2,65072,65136),g.fill(y,2,65280,65377),g.fill(y,2,65504,65511);for(var o=0;ol[t][1])return!1;for(;t>=i;)if(n>l[r=i+t>>1][1])i=r+1;else{if(!(n=131072&&o<=196605||o>=196608&&o<=262141?2:1},e}();v.UnicodeV6=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CharsetService=void 0;var y=function(){function g(){this.glevel=0,this._charsets=[]}return g.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},g.prototype.setgLevel=function(s){this.glevel=s,this.charset=this._charsets[s]},g.prototype.setgCharset=function(s,_){this._charsets[s]=_,this.glevel===s&&(this.charset=_)},g}();v.CharsetService=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.updateWindowsModeWrappedState=void 0;var y=T(3);v.updateWindowsModeWrappedState=function(g){var s=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),_=s==null?void 0:s.get(g.cols-1),p=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);p&&_&&(p.isWrapped=_[y.CHAR_DATA_CODE_INDEX]!==y.NULL_CELL_CODE&&_[y.CHAR_DATA_CODE_INDEX]!==y.WHITESPACE_CELL_CODE)}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.WriteBuffer=void 0;var y=function(){function g(s){this._action=s,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return g.prototype.writeSync=function(s){if(this._writeBuffer.length){for(var _=this._bufferOffset;_5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return p._innerWrite()})),this._pendingData+=s.length,this._writeBuffer.push(s),this._callbacks.push(_)},g.prototype._innerWrite=function(){for(var s=this,_=Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],e=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(p),this._pendingData-=p.length,e&&e(),Date.now()-_>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return s._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},g}();v.WriteBuffer=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.AddonManager=void 0;var y=function(){function g(){this._addons=[]}return g.prototype.dispose=function(){for(var s=this._addons.length-1;s>=0;s--)this._addons[s].instance.dispose()},g.prototype.loadAddon=function(s,_){var p=this,e={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(e),_.dispose=function(){return p._wrappedAddonDispose(e)},_.activate(s)},g.prototype._wrappedAddonDispose=function(s){if(!s.isDisposed){for(var _=-1,p=0;p{throw l.stack?new Error(l.message+` `+l.stack):l},0)}}emit(l){this.listeners.forEach(r=>{r(l)})}onUnexpectedError(l){this.unexpectedErrorHandler(l),this.emit(l)}onUnexpectedExternalError(l){this.unexpectedErrorHandler(l)}}const v=new I;function T(l){_(l)||v.onUnexpectedError(l);return}function y(l){_(l)||v.onUnexpectedExternalError(l);return}function g(l){if(l instanceof Error){let{name:r,message:i}=l;const t=l.stacktrace||l.stack;return{$isError:!0,name:r,message:i,stack:t}}return l}const s="Canceled";function _(l){return l instanceof Error&&l.name===s&&l.message===s}function p(){const l=new Error(s);return l.name=l.message,l}function e(l){return l?new Error(`Illegal argument: ${l}`):new Error("Illegal argument")}function o(l){return l?new Error(`Illegal state: ${l}`):new Error("Illegal state")}class n extends Error{constructor(l){super("NotSupported");l&&(this.message=l)}}},"/omn":function(j,H,b){},"0/SM":function(j,H,b){j.exports={flex_box_center:"flex_box_center___gv1YF",flex_space_between:"flex_space_between___pJTp_",flex_box_vertical_center:"flex_box_vertical_center___2X-O9",flex_box_center_end:"flex_box_center_end___21hK4",flex_box_column:"flex_box_column___psPJb",wrap:"wrap___QvUDk",full:"full___2gLfk"}},"07cG":function(j,H,b){j.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0i5U":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNEMUNCRTZCNDE1MzExRThBREM4QUVGRUEwQjY3M0FFIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNEMUNCRTZDNDE1MzExRThBREM4QUVGRUEwQjY3M0FFIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0QxQ0JFNjk0MTUzMTFFOEFEQzhBRUZFQTBCNjczQUUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0QxQ0JFNkE0MTUzMTFFOEFEQzhBRUZFQTBCNjczQUUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6xcnMrAAABN0lEQVR42qzTsUtCURTH8fskisZoa4ogcGhpcYuW+gsk+icyGiyEoNVB0i3EWYJwaG2Koj+gBiEqqIasRQlCHCJ8fU+cB4fLldS68BHO755zeQ/vi7L3q4vOuRMsu9HWNTZT/NTHGHY6U5cDMm78lUm5P65/OaDtZXsoB3or2PWythxQ9cInFHBrsjvNHr3eqhxQxIsJS5jAlsl29GlLJpOZooQ979HmsY9zHOMUZ8hjwfTJTC/iIkkR4RIruvmJJXQxhVhfaVr3ryCDcfIvSMM2+lpP4ghveMahGe5rb+z/jTeomXoNG1hH1uQ17f1ZySskaxYPmNH6FR9Ia/0O+XY6gy6SbByYes4MO93r/HYT5V40A3kzcGeCB3whF8hzujfUt3CBhqkbmo30McnFaan8oKZvAQYAarBDzHlRpVIAAAAASUVORK5CYII="},"19Vz":function(j,H,b){(function(I){I(b("VrN/"))})(function(I){I.defineOption("placeholder","",function(p,e,o){var n=o&&o!=I.Init;if(e&&!n)p.on("blur",g),p.on("change",s),p.on("swapDoc",s),I.on(p.getInputField(),"compositionupdate",p.state.placeholderCompose=function(){y(p)}),s(p);else if(!e&&n){p.off("blur",g),p.off("change",s),p.off("swapDoc",s),I.off(p.getInputField(),"compositionupdate",p.state.placeholderCompose),v(p);var l=p.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}e&&!p.hasFocus()&&g(p)});function v(p){p.state.placeholder&&(p.state.placeholder.parentNode.removeChild(p.state.placeholder),p.state.placeholder=null)}function T(p){v(p);var e=p.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=p.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var o=p.getOption("placeholder");typeof o=="string"&&(o=document.createTextNode(o)),e.appendChild(o),p.display.lineSpace.insertBefore(e,p.display.lineSpace.firstChild)}function y(p){setTimeout(function(){var e=!1,o=p.getInputField();o.nodeName=="TEXTAREA"?e=!o.value:p.lineCount()==1&&(e=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),e?T(p):v(p)},20)}function g(p){_(p)&&T(p)}function s(p){var e=p.getWrapperElement(),o=_(p);e.className=e.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?T(p):v(p)}function _(p){return p.lineCount()===1&&p.getLine(0)===""}})},"1A8V":function(j,H,b){},"1Zrr":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABZ0lEQVRYR+2YrU7FQBBGzzwEPAMSi+M6MARDggNJgiIkWLiSBIFCkyCuQECCQFIcEstb8AYf2ZvmhpbuT9ttUpJWdma+OZ3O7k5rRC5Jh8ARsBPzjdhvgXczew75WSyJpCdgP+aXaP8ws63OQJK2gbdSYJ6Y1Od2WRpmZlb4nIIVqgEFhUKwbXTGByRpDzgBdnu+kr7hD8CLSboGLvqqZYp/dEDK1LR9mZZNXwEys6u+ql3iJbm8E5C3eFOFYn2VrUKS1oADYL1M+gW8mtl3DOK3PQuQpE1gAWzUkn8CZ6Hzqg6bC+gcuPFU4s7MTlOrlAvITQFuGijMbOaSS/pzLwXKB+QdCQKiXqAUkJqP06rs1B00liFNFeqqVQEaXYXmbc6ypn7J3UNtgUa3ysa1D5XLfDw7dedl1BCYZWOcgHJWIKb1f15Z7EkGtq+G/NXEP3DCFPl79xnkTln3u+U4JWJAH/czo/gBVkc5pun3NGoAAAAASUVORK5CYII="},"1dTM":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("GQ8N"),v=S(b("Lo0S")),T=b("VSMT"),y=b("GdRQ"),g=b("SZEN"),s=b("vewr"),_=C(b("YJ9k")),p=C(b("MZdM")),e=C(b("ItS6")),o=C(b("whVF")),n=C(b("Fv0C")),l=C(b("LCi9")),r=C(b("rwxt")),i=C(b("Mmt2")),t=C(b("iUHT")),a=C(b("mHUz")),c=C(b("P2ho")),d=b("NBmB");b("mdZa");var f=C(b("34/K")),h=C(b("hXwI")),u=C(b("SgaC")),E=C(b("3690")),x=C(b("8K/p")),O=C(b("xO64"));function C(oe){return oe&&oe.__esModule?oe:{default:oe}}function w(){if(typeof WeakMap!="function")return null;var oe=new WeakMap;return w=function(){return oe},oe}function S(oe){if(oe&&oe.__esModule)return oe;if(oe===null||A(oe)!=="object"&&typeof oe!="function")return{default:oe};var le=w();if(le&&le.has(oe))return le.get(oe);var Ee={},Le=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ge in oe)if(Object.prototype.hasOwnProperty.call(oe,ge)){var De=Le?Object.getOwnPropertyDescriptor(oe,ge):null;De&&(De.get||De.set)?Object.defineProperty(Ee,ge,De):Ee[ge]=oe[ge]}return Ee.default=oe,le&&le.set(oe,Ee),Ee}function A(oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(Ee){return typeof Ee}:A=function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},A(oe)}function D(oe,le){if(!(oe instanceof le))throw new TypeError("Cannot call a class as a function")}function M(oe,le){for(var Ee=0;Ee> RFB.constructor"),_e._screen=document.createElement("div"),_e._screen.style.display="flex",_e._screen.style.width="100%",_e._screen.style.height="100%",_e._screen.style.overflow="auto",_e._screen.style.background=Z,_e._canvas=document.createElement("canvas"),_e._canvas.style.margin="auto",_e._canvas.style.outline="none",_e._canvas.style.flexShrink="0",_e._canvas.width=0,_e._canvas.height=0,_e._canvas.tabIndex=-1,_e._screen.appendChild(_e._canvas),_e._cursor=new r.default,_e._cursorImage=Ee.cursors.none,_e._decoders[d.encodings.encodingRaw]=new f.default,_e._decoders[d.encodings.encodingCopyRect]=new h.default,_e._decoders[d.encodings.encodingRRE]=new u.default,_e._decoders[d.encodings.encodingHextile]=new E.default,_e._decoders[d.encodings.encodingTight]=new x.default,_e._decoders[d.encodings.encodingTightPNG]=new O.default;try{_e._display=new p.default(_e._canvas)}catch(Xe){throw v.Error("Display exception: "+Xe),Xe}return _e._display.onflush=_e._onFlush.bind(F(_e)),_e._keyboard=new n.default(_e._canvas),_e._keyboard.onkeyevent=_e._handleKeyEvent.bind(F(_e)),_e._gestures=new l.default,_e._sock=new i.default,_e._sock.on("message",function(){_e._handleMessage()}),_e._sock.on("open",function(){_e._rfbConnectionState==="connecting"&&_e._rfbInitState===""?(_e._rfbInitState="ProtocolVersion",v.Debug("Starting VNC handshake")):_e._fail("Unexpected server connection while "+_e._rfbConnectionState)}),_e._sock.on("close",function(Xe){v.Debug("WebSocket on-close event");var tt="";Xe.code&&(tt="(code: "+Xe.code,Xe.reason&&(tt+=", reason: "+Xe.reason),tt+=")");switch(_e._rfbConnectionState){case"connecting":_e._fail("Connection closed "+tt);break;case"connected":_e._updateConnectionState("disconnecting"),_e._updateConnectionState("disconnected");break;case"disconnecting":_e._updateConnectionState("disconnected");break;case"disconnected":_e._fail("Unexpected server disconnect when already disconnected "+tt);break;default:_e._fail("Unexpected server disconnect before connecting "+tt);break}_e._sock.off("close")}),_e._sock.on("error",function(Xe){return v.Warn("WebSocket on-error event")}),setTimeout(_e._updateConnectionState.bind(F(_e),"connecting")),v.Debug("<< RFB.constructor"),_e.dragViewport=!1,_e.focusOnClick=!0,_e._viewOnly=!1,_e._clipViewport=!1,_e._scaleViewport=!1,_e._resizeSession=!1,_e._showDotCursor=!1,De.showDotCursor!==void 0&&(v.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),_e._showDotCursor=De.showDotCursor),_e._qualityLevel=6,_e._compressionLevel=2,_e}return N(Ee,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(ge){this._rfbCredentials=ge,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;v.Info("Sending Ctrl-Alt-Del"),this.sendKey(a.default.XK_Control_L,"ControlLeft",!0),this.sendKey(a.default.XK_Alt_L,"AltLeft",!0),this.sendKey(a.default.XK_Delete,"Delete",!0),this.sendKey(a.default.XK_Delete,"Delete",!1),this.sendKey(a.default.XK_Alt_L,"AltLeft",!1),this.sendKey(a.default.XK_Control_L,"ControlLeft",!1)}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(ge,De,_e){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(_e===void 0){this.sendKey(ge,De,!0),this.sendKey(ge,De,!1);return}var Xe=c.default[De];if(this._qemuExtKeyEventSupported&&Xe)ge=ge||0,v.Info("Sending key ("+(_e?"down":"up")+"): keysym "+ge+", scancode "+Xe),Ee.messages.QEMUExtendedKeyEvent(this._sock,ge,_e,Xe);else{if(!ge)return;v.Info("Sending keysym ("+(_e?"down":"up")+"): "+ge),Ee.messages.keyEvent(this._sock,ge,_e?1:0)}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(ge){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(this._clipboardServerCapabilitiesFormats[pe]&&this._clipboardServerCapabilitiesActions[q])this._clipboardText=ge,Ee.messages.extendedClipboardNotify(this._sock,[pe]);else{for(var De=new Uint8Array(ge.length),_e=0;_e> RFB.connect"),v.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(ge){ge.name==="SyntaxError"?this._fail("Invalid host or port ("+ge+")"):this._fail("Error when opening socket ("+ge+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("touchstart",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),v.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){v.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(ge){if(!(ge.name==="NotFoundError"))throw ge}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),v.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(ge){if(!this.focusOnClick)return;this.focus()}},{key:"_setDesktopName",value:function(ge){this._fbName=ge,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(ge){var De=this;window.requestAnimationFrame(function(){De._updateClip(),De._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var ge=this._display.clipViewport,De=this._clipViewport;if(this._scaleViewport&&(De=!1),ge!==De&&(this._display.clipViewport=De),De){var _e=this._screenSize();this._display.viewportChangeSize(_e.w,_e.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var ge=this._screenSize();this._display.autoscale(ge.w,ge.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;var ge=this._screenSize();Ee.messages.setDesktopSize(this._sock,Math.floor(ge.w),Math.floor(ge.h),this._screenID,this._screenFlags),v.Debug("Requested new desktop size: "+ge.w+"x"+ge.h)}},{key:"_screenSize",value:function(){var ge=this._screen.getBoundingClientRect();return{w:ge.width,h:ge.height}}},{key:"_fixScrollbars",value:function(){var ge=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=ge}},{key:"_updateConnectionState",value:function(ge){var De=this,_e=this._rfbConnectionState;if(ge===_e){v.Debug("Already in state '"+ge+"', ignoring");return}if(_e==="disconnected"){v.Error("Tried changing state of a disconnected RFB object");return}switch(ge){case"connected":if(_e!=="connecting"){v.Error("Bad transition to connected state, previous connection state: "+_e);return}break;case"disconnected":if(_e!=="disconnecting"){v.Error("Bad transition to disconnected state, previous connection state: "+_e);return}break;case"connecting":if(_e!==""){v.Error("Bad transition to connecting state, previous connection state: "+_e);return}break;case"disconnecting":if(_e!=="connected"&&_e!=="connecting"){v.Error("Bad transition to disconnecting state, previous connection state: "+_e);return}break;default:v.Error("Unknown connection state: "+ge);return}this._rfbConnectionState=ge,v.Debug("New state '"+ge+"', was '"+_e+"'."),this._disconnTimer&&ge!=="disconnecting"&&(v.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close"));switch(ge){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){v.Error("Disconnection timed out."),De._updateConnectionState("disconnected")},B*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(ge){switch(this._rfbConnectionState){case"disconnecting":v.Error("Failed when disconnecting: "+ge);break;case"connected":v.Error("Failed while connected: "+ge);break;case"connecting":v.Error("Failed when connecting: "+ge);break;default:v.Error("RFB failure: "+ge);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(ge,De){this._capabilities[ge]=De,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){v.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":v.Error("Got data while disconnected");break;case"connected":for(;!this._flushing;){if(!this._normalMsg())break;if(this._sock.rQlen===0)break}break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(ge,De,_e){this.sendKey(ge,De,_e)}},{key:"_handleMouse",value:function(ge){if(ge.type==="click"&&ge.target!==this._canvas)return;if(ge.stopPropagation(),ge.preventDefault(),ge.type==="click"||ge.type==="contextmenu")return;var De=(0,g.clientToElement)(ge.clientX,ge.clientY,this._canvas);switch(ge.type){case"mousedown":(0,s.setCapture)(this._canvas),this._handleMouseButton(De.x,De.y,!0,1<y.dragThreshold||Math.abs(tt)>y.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:ge,y:De},this._display.viewportChangePos(Xe,tt));return}if(this._mousePos={x:ge,y:De},this._mouseMoveTimer==null){var Ge=Date.now()-this._mouseLastMoveTime;Ge>re?(this._sendMouse(ge,De,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){_e._handleDelayedMouseMove()},re-Ge)}}},{key:"_handleDelayedMouseMove",value:function(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}},{key:"_sendMouse",value:function(ge,De,_e){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;Ee.messages.pointerEvent(this._sock,this._display.absX(ge),this._display.absY(De),_e)}},{key:"_handleWheel",value:function(ge){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;ge.stopPropagation(),ge.preventDefault();var De=(0,g.clientToElement)(ge.clientX,ge.clientY,this._canvas),_e=ge.deltaX,Xe=ge.deltaY;ge.deltaMode!==0&&(_e*=Se,Xe*=Se),this._accumulatedWheelDeltaX+=_e,this._accumulatedWheelDeltaY+=Xe,Math.abs(this._accumulatedWheelDeltaX)>=he&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(De.x,De.y,!0,1<<5),this._handleMouseButton(De.x,De.y,!1,1<<5)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(De.x,De.y,!0,1<<6),this._handleMouseButton(De.x,De.y,!1,1<<6)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=he&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(De.x,De.y,!0,1<<3),this._handleMouseButton(De.x,De.y,!1,1<<3)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(De.x,De.y,!0,1<<4),this._handleMouseButton(De.x,De.y,!1,1<<4)),this._accumulatedWheelDeltaY=0)}},{key:"_fakeMouseMove",value:function(ge,De,_e){this._handleMouseMove(De,_e),this._cursor.move(ge.detail.clientX,ge.detail.clientY)}},{key:"_handleTapEvent",value:function(ge,De){var _e=(0,g.clientToElement)(ge.detail.clientX,ge.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTimete;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeY+=te;for(;ge.detail.magnitudeY-this._gestureLastMagnitudeY<-te;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeY-=te;for(;ge.detail.magnitudeX-this._gestureLastMagnitudeX>te;)this._handleMouseButton(_e.x,_e.y,!0,32),this._handleMouseButton(_e.x,_e.y,!1,32),this._gestureLastMagnitudeX+=te;for(;ge.detail.magnitudeX-this._gestureLastMagnitudeX<-te;)this._handleMouseButton(_e.x,_e.y,!0,64),this._handleMouseButton(_e.x,_e.y,!1,64),this._gestureLastMagnitudeX-=te;break;case"pinch":if(this._fakeMouseMove(ge,_e.x,_e.y),De=Math.hypot(ge.detail.magnitudeX,ge.detail.magnitudeY),Math.abs(De-this._gestureLastMagnitudeX)>ke){for(this._handleKeyEvent(a.default.XK_Control_L,"ControlLeft",!0);De-this._gestureLastMagnitudeX>ke;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeX+=ke;for(;De-this._gestureLastMagnitudeX<-ke;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeX-=ke}this._handleKeyEvent(a.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(ge.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(ge,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!1,1);break;case"longpress":this._fakeMouseMove(ge,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var ge=this._sock.rQshiftStr(12).substr(4,7);v.Info("Server ProtocolVersion: "+ge);var De=0;switch(ge){case"000.000":De=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+ge)}if(De){for(var _e="ID:"+this._repeaterID;_e.length<250;)_e+="\0";return this._sock.sendString(_e),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var Xe="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+Xe+` -`),v.Debug("Sent ProtocolVersion: "+Xe),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function ge(Xe,tt){for(var Ge=0;Ge=3.7){var De=this._sock.rQshift8();if(this._sock.rQwait("security type",De,1))return!1;if(De===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var _e=this._sock.rQshiftBytes(De);if(v.Debug("Server security types: "+_e),ge(1,_e))this._rfbAuthScheme=1;else if(ge(22,_e))this._rfbAuthScheme=22;else if(ge(16,_e))this._rfbAuthScheme=16;else if(ge(2,_e))this._rfbAuthScheme=2;else if(ge(19,_e))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+_e+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",v.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var ge=this._sock.rQshift32(),De="";if(ge>0){if(this._sock.rQwait("reason",ge,4))return!1;De=this._sock.rQshiftStr(ge)}return De!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:De}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+De+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var ge=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(ge),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var ge=this._sock.rQshift8(),De=this._sock.rQshift8();if(!(ge==0&&De==2))return this._fail("Unsupported VeNCrypt version "+ge+"."+De);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var _e=this._sock.rQshift8();if(_e!=0)return this._fail("VeNCrypt failure "+_e);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var Xe=this._sock.rQshift8();if(Xe<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Xe,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var tt=[],Ge=0;Ge0&&this._sock.rQwait("tunnel capabilities",16*ge,4))return!1;if(this._rfbTightVNC=!0,ge>0)return this._negotiateTightTunnels(ge),!1}if(this._sock.rQwait("sub auth count",4))return!1;var De=this._sock.rQshift32();if(De===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*De,4))return!1;for(var _e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Xe=[],tt=0;tt=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var ge=this._sock.rQshift32();return ge===0?(this._rfbInitState="ClientInitialisation",v.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=ge,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:ge}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var ge=this._sock.rQshift16(),De=this._sock.rQshift16(),_e=this._sock.rQshift8(),Xe=this._sock.rQshift8(),tt=this._sock.rQshift8(),Ge=this._sock.rQshift8(),Me=this._sock.rQshift16(),bt=this._sock.rQshift16(),Oe=this._sock.rQshift16(),Ve=this._sock.rQshift8(),Je=this._sock.rQshift8(),Ye=this._sock.rQshift8();this._sock.rQskipBytes(3);var Ne=this._sock.rQshift32();if(this._sock.rQwait("server init name",Ne,24))return!1;var He=this._sock.rQshiftStr(Ne);if(He=(0,T.decodeUTF8)(He,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+Ne))return!1;var ve=this._sock.rQshift16(),xe=this._sock.rQshift16(),de=this._sock.rQshift16();this._sock.rQskipBytes(2);var je=(ve+xe+de)*16;if(this._sock.rQwait("TightVNC extended server init header",je,32+Ne))return!1;this._sock.rQskipBytes(16*ve),this._sock.rQskipBytes(16*xe),this._sock.rQskipBytes(16*de)}return v.Info("Screen: "+ge+"x"+De+", bpp: "+_e+", depth: "+Xe+", bigEndian: "+tt+", trueColor: "+Ge+", redMax: "+Me+", greenMax: "+bt+", blueMax: "+Oe+", redShift: "+Ve+", greenShift: "+Je+", blueShift: "+Ye),this._setDesktopName(He),this._resize(ge,De),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(v.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Ee.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Ee.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var ge=[];ge.push(d.encodings.encodingCopyRect),this._fbDepth==24&&(ge.push(d.encodings.encodingTight),ge.push(d.encodings.encodingTightPNG),ge.push(d.encodings.encodingHextile),ge.push(d.encodings.encodingRRE)),ge.push(d.encodings.encodingRaw),ge.push(d.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),ge.push(d.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),ge.push(d.encodings.pseudoEncodingDesktopSize),ge.push(d.encodings.pseudoEncodingLastRect),ge.push(d.encodings.pseudoEncodingQEMUExtendedKeyEvent),ge.push(d.encodings.pseudoEncodingExtendedDesktopSize),ge.push(d.encodings.pseudoEncodingXvp),ge.push(d.encodings.pseudoEncodingFence),ge.push(d.encodings.pseudoEncodingContinuousUpdates),ge.push(d.encodings.pseudoEncodingDesktopName),ge.push(d.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(ge.push(d.encodings.pseudoEncodingVMwareCursor),ge.push(d.encodings.pseudoEncodingCursor)),Ee.messages.clientEncodings(this._sock,ge)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return v.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(v.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var ge=this._sock.rQshift32();if(ge=(0,I.toSigned32bit)(ge),this._sock.rQwait("ServerCutText content",Math.abs(ge),8))return!1;if(ge>=0){var De=this._sock.rQshiftStr(ge);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:De}}))}else{ge=Math.abs(ge);var _e=this._sock.rQshift32(),Xe=_e&65535,tt=_e&4278190080,Ge=!!(tt&fe);if(Ge){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Me=0;Me<=15;Me++){var bt=1<0&&He.charAt(He.length-1)==="\0"&&(He=He.slice(0,-1)),He=He.replace(`\r +`),v.Debug("Sent ProtocolVersion: "+Xe),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function ge(Xe,tt){for(var Ge=0;Ge=3.7){var De=this._sock.rQshift8();if(this._sock.rQwait("security type",De,1))return!1;if(De===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var _e=this._sock.rQshiftBytes(De);if(v.Debug("Server security types: "+_e),ge(1,_e))this._rfbAuthScheme=1;else if(ge(22,_e))this._rfbAuthScheme=22;else if(ge(16,_e))this._rfbAuthScheme=16;else if(ge(2,_e))this._rfbAuthScheme=2;else if(ge(19,_e))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+_e+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",v.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var ge=this._sock.rQshift32(),De="";if(ge>0){if(this._sock.rQwait("reason",ge,4))return!1;De=this._sock.rQshiftStr(ge)}return De!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:De}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+De+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var ge=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(ge),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var ge=this._sock.rQshift8(),De=this._sock.rQshift8();if(!(ge==0&&De==2))return this._fail("Unsupported VeNCrypt version "+ge+"."+De);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var _e=this._sock.rQshift8();if(_e!=0)return this._fail("VeNCrypt failure "+_e);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var Xe=this._sock.rQshift8();if(Xe<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Xe,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var tt=[],Ge=0;Ge0&&this._sock.rQwait("tunnel capabilities",16*ge,4))return!1;if(this._rfbTightVNC=!0,ge>0)return this._negotiateTightTunnels(ge),!1}if(this._sock.rQwait("sub auth count",4))return!1;var De=this._sock.rQshift32();if(De===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*De,4))return!1;for(var _e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Xe=[],tt=0;tt=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var ge=this._sock.rQshift32();return ge===0?(this._rfbInitState="ClientInitialisation",v.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=ge,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:ge}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var ge=this._sock.rQshift16(),De=this._sock.rQshift16(),_e=this._sock.rQshift8(),Xe=this._sock.rQshift8(),tt=this._sock.rQshift8(),Ge=this._sock.rQshift8(),Me=this._sock.rQshift16(),Et=this._sock.rQshift16(),Oe=this._sock.rQshift16(),Ve=this._sock.rQshift8(),Je=this._sock.rQshift8(),Ye=this._sock.rQshift8();this._sock.rQskipBytes(3);var Ne=this._sock.rQshift32();if(this._sock.rQwait("server init name",Ne,24))return!1;var He=this._sock.rQshiftStr(Ne);if(He=(0,T.decodeUTF8)(He,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+Ne))return!1;var ve=this._sock.rQshift16(),xe=this._sock.rQshift16(),de=this._sock.rQshift16();this._sock.rQskipBytes(2);var je=(ve+xe+de)*16;if(this._sock.rQwait("TightVNC extended server init header",je,32+Ne))return!1;this._sock.rQskipBytes(16*ve),this._sock.rQskipBytes(16*xe),this._sock.rQskipBytes(16*de)}return v.Info("Screen: "+ge+"x"+De+", bpp: "+_e+", depth: "+Xe+", bigEndian: "+tt+", trueColor: "+Ge+", redMax: "+Me+", greenMax: "+Et+", blueMax: "+Oe+", redShift: "+Ve+", greenShift: "+Je+", blueShift: "+Ye),this._setDesktopName(He),this._resize(ge,De),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(v.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Ee.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Ee.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var ge=[];ge.push(d.encodings.encodingCopyRect),this._fbDepth==24&&(ge.push(d.encodings.encodingTight),ge.push(d.encodings.encodingTightPNG),ge.push(d.encodings.encodingHextile),ge.push(d.encodings.encodingRRE)),ge.push(d.encodings.encodingRaw),ge.push(d.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),ge.push(d.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),ge.push(d.encodings.pseudoEncodingDesktopSize),ge.push(d.encodings.pseudoEncodingLastRect),ge.push(d.encodings.pseudoEncodingQEMUExtendedKeyEvent),ge.push(d.encodings.pseudoEncodingExtendedDesktopSize),ge.push(d.encodings.pseudoEncodingXvp),ge.push(d.encodings.pseudoEncodingFence),ge.push(d.encodings.pseudoEncodingContinuousUpdates),ge.push(d.encodings.pseudoEncodingDesktopName),ge.push(d.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(ge.push(d.encodings.pseudoEncodingVMwareCursor),ge.push(d.encodings.pseudoEncodingCursor)),Ee.messages.clientEncodings(this._sock,ge)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return v.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(v.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var ge=this._sock.rQshift32();if(ge=(0,I.toSigned32bit)(ge),this._sock.rQwait("ServerCutText content",Math.abs(ge),8))return!1;if(ge>=0){var De=this._sock.rQshiftStr(ge);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:De}}))}else{ge=Math.abs(ge);var _e=this._sock.rQshift32(),Xe=_e&65535,tt=_e&4278190080,Ge=!!(tt&fe);if(Ge){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Me=0;Me<=15;Me++){var Et=1<0&&He.charAt(He.length-1)==="\0"&&(He=He.slice(0,-1)),He=He.replace(`\r `,` -`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:He}}))}}else return this._fail("Unexpected action in extended clipboard message: "+tt)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var ge=this._sock.rQshift32(),De=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",De,9))return!1;De>64&&(v.Warn("Bad payload length ("+De+") in fence response"),De=64);var _e=this._sock.rQshiftStr(De);return this._supportsFence=!0,ge&1<<31?(ge&=1<<0|1<<1,Ee.messages.clientFence(this._sock,ge,_e),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var ge=this._sock.rQshift8(),De=this._sock.rQshift8();switch(De){case 0:v.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=ge,v.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+De+")");break}return!0}},{key:"_normalMsg",value:function(){var ge;this._FBU.rects>0?ge=0:ge=this._sock.rQshift8();var De,_e;switch(ge){case 0:return _e=this._framebufferUpdate(),_e&&!this._enabledContinuousUpdates&&Ee.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),_e;case 1:return this._handleSetColourMapMsg();case 2:return v.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return De=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,De&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),v.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+ge+")"),v.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var ge=this._sock.rQshiftBytes(12);this._FBU.x=(ge[0]<<8)+ge[1],this._FBU.y=(ge[2]<<8)+ge[3],this._FBU.width=(ge[4]<<8)+ge[5],this._FBU.height=(ge[6]<<8)+ge[7],this._FBU.encoding=parseInt((ge[8]<<24)+(ge[9]<<16)+(ge[10]<<8)+ge[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case d.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case d.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case d.encodings.pseudoEncodingCursor:return this._handleCursor();case d.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var ge=document.createEvent("keyboardEvent");ge.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(De){}return!0;case d.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case d.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case d.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var tt=this._sock.rQshift8();this._sock.rQshift8();var Ge,Me=4;if(tt==0){var bt=4294967040|0;if(Ge=new Array(_e*Xe*Me),this._sock.rQwait("VMware cursor classic encoding",_e*Xe*Me*2,2))return!1;for(var Oe=new Array(_e*Xe),Ve=0;Ve<_e*Xe;Ve++)Oe[Ve]=this._sock.rQshift32();for(var Je=new Array(_e*Xe),Ye=0;Ye<_e*Xe;Ye++)Je[Ye]=this._sock.rQshift32();for(var Ne=0;Ne<_e*Xe;Ne++)if(Oe[Ne]==0){var He=Je[Ne],ve=He>>8&255,xe=He>>16&255,de=He>>24&255;Ge[Ne*Me]=ve,Ge[Ne*Me+1]=xe,Ge[Ne*Me+2]=de,Ge[Ne*Me+3]=255}else(Oe[Ne]&bt)==bt?Je[Ne]==0?(Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=0):((Je[Ne]&bt)==bt,Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=255):(Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=255)}else if(tt==1){if(this._sock.rQwait("VMware cursor alpha encoding",_e*Xe*4,2))return!1;Ge=new Array(_e*Xe*Me);for(var je=0;je<_e*Xe;je++){var Qe=this._sock.rQshift32();Ge[je*4]=Qe>>24&255,Ge[je*4+1]=Qe>>16&255,Ge[je*4+2]=Qe>>8&255,Ge[je*4+3]=Qe&255}}else return v.Warn("The given cursor type is not supported: "+tt+" given."),!1;return this._updateCursor(Ge,ge,De,_e,Xe),!0}},{key:"_handleCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height,tt=_e*Xe*4,Ge=Math.ceil(_e/8)*Xe,Me=tt+Ge;if(this._sock.rQwait("cursor encoding",Me))return!1;for(var bt=this._sock.rQshiftBytes(tt),Oe=this._sock.rQshiftBytes(Ge),Ve=new Uint8Array(_e*Xe*4),Je=0,Ye=0;Ye9){v.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===ge)return;this._qualityLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(ge){if(!Number.isInteger(ge)||ge<0||ge>9){v.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===ge)return;this._compressionLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(ge,De){var _e=ge.split("").map(function(Xe){return Xe.charCodeAt(0)});return new t.default(_e).encrypt(De)}}]),Ee}(_.default);H.default=Y,Y.messages={keyEvent:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=4,ge[De+1]=Le,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee,le._sQlen+=8,le.flush()},QEMUExtendedKeyEvent:function(le,Ee,Le,ge){function De(Ge){var Me=ge>>8,bt=ge&255;return Me===224&&bt<127?bt|128:Ge}var _e=le._sQ,Xe=le._sQlen;_e[Xe]=255,_e[Xe+1]=0,_e[Xe+2]=Le>>8,_e[Xe+3]=Le,_e[Xe+4]=Ee>>24,_e[Xe+5]=Ee>>16,_e[Xe+6]=Ee>>8,_e[Xe+7]=Ee;var tt=De(ge);_e[Xe+8]=tt>>24,_e[Xe+9]=tt>>16,_e[Xe+10]=tt>>8,_e[Xe+11]=tt,le._sQlen+=12,le.flush()},pointerEvent:function(le,Ee,Le,ge){var De=le._sQ,_e=le._sQlen;De[_e]=5,De[_e+1]=ge,De[_e+2]=Ee>>8,De[_e+3]=Ee,De[_e+4]=Le>>8,De[_e+5]=Le,le._sQlen+=6,le.flush()},_buildExtendedClipboardFlags:function(le,Ee){for(var Le=new Uint8Array(4),ge=0,De=0,_e=0;_e>24,Le[1]=0,Le[2]=0,Le[3]=ge,Le},extendedClipboardProvide:function(le,Ee,Le){for(var ge=new o.default,De=[],_e=0;_e>24&255,Xe.length>>16&255,Xe.length>>8&255,Xe.length&255);for(var tt=0;tt>24,De[_e+1]=Le[ge[Xe]]>>16,De[_e+2]=Le[ge[Xe]]>>8,De[_e+3]=Le[ge[Xe]]>>0,_e+=4,De[3]|=1<2&&arguments[2]!==void 0?arguments[2]:!1,ge=le._sQ,De=le._sQlen;ge[De]=6,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0;var _e;Le?_e=(0,I.toUnsigned32bit)(-Ee.length):_e=Ee.length,ge[De+4]=_e>>24,ge[De+5]=_e>>16,ge[De+6]=_e>>8,ge[De+7]=_e,le._sQlen+=8;for(var Xe=0,tt=Ee.length;tt>0;){for(var Ge=Math.min(tt,le._sQbufferSize-le._sQlen),Me=0;Me>8,_e[Xe+3]=Ee,_e[Xe+4]=Le>>8,_e[Xe+5]=Le,_e[Xe+6]=1,_e[Xe+7]=0,_e[Xe+8]=ge>>24,_e[Xe+9]=ge>>16,_e[Xe+10]=ge>>8,_e[Xe+11]=ge,_e[Xe+12]=0,_e[Xe+13]=0,_e[Xe+14]=0,_e[Xe+15]=0,_e[Xe+16]=Ee>>8,_e[Xe+17]=Ee,_e[Xe+18]=Le>>8,_e[Xe+19]=Le,_e[Xe+20]=De>>24,_e[Xe+21]=De>>16,_e[Xe+22]=De>>8,_e[Xe+23]=De,le._sQlen+=24,le.flush()},clientFence:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=248,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee;var _e=Le.length;ge[De+8]=_e;for(var Xe=0;Xe<_e;Xe++)ge[De+9+Xe]=Le.charCodeAt(Xe);le._sQlen+=9+_e,le.flush()},enableContinuousUpdates:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;Xe[tt]=150,Xe[tt+1]=Ee,Xe[tt+2]=Le>>8,Xe[tt+3]=Le,Xe[tt+4]=ge>>8,Xe[tt+5]=ge,Xe[tt+6]=De>>8,Xe[tt+7]=De,Xe[tt+8]=_e>>8,Xe[tt+9]=_e,le._sQlen+=10,le.flush()},pixelFormat:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen,_e;Ee>16?_e=32:Ee>8?_e=16:_e=8;var Xe=Math.floor(Ee/3);ge[De]=0,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=_e,ge[De+5]=Ee,ge[De+6]=0,ge[De+7]=Le?1:0,ge[De+8]=0,ge[De+9]=(1<>8,Le[ge+3]=Ee.length;for(var De=ge+4,_e=0;_e>24,Le[De+1]=Xe>>16,Le[De+2]=Xe>>8,Le[De+3]=Xe,De+=4}le._sQlen+=De-ge,le.flush()},fbUpdateRequest:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;typeof Le=="undefined"&&(Le=0),typeof ge=="undefined"&&(ge=0),Xe[tt]=3,Xe[tt+1]=Ee?1:0,Xe[tt+2]=Le>>8&255,Xe[tt+3]=Le&255,Xe[tt+4]=ge>>8&255,Xe[tt+5]=ge&255,Xe[tt+6]=De>>8&255,Xe[tt+7]=De&255,Xe[tt+8]=_e>>8&255,Xe[tt+9]=_e&255,le._sQlen+=10,le.flush()},xvpOp:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=250,ge[De+1]=0,ge[De+2]=Ee,ge[De+3]=Le,le._sQlen+=4,le.flush()}},Y.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},"1eCo":function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};I.defineMode("xml",function(y,g){var s=y.indentUnit,_={},p=g.htmlMode?v:T;for(var e in p)_[e]=p[e];for(var e in g)_[e]=g[e];var o,n;function l(D,M){function N(X){return M.tokenize=X,X(D,M)}var P=D.next();if(P=="<")return D.eat("!")?D.eat("[")?D.match("CDATA[")?N(t("atom","]]>")):null:D.match("--")?N(t("comment","-->")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),N(a(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),M.tokenize=t("meta","?>"),"meta"):(o=D.eat("/")?"closeTag":"openTag",M.tokenize=r,"tag bracket");if(P=="&"){var z;return D.eat("#")?D.eat("x")?z=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):z=D.eatWhile(/[\d]/)&&D.eat(";"):z=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),z?"atom":"error"}else return D.eatWhile(/[^&<]/),null}l.isInText=!0;function r(D,M){var N=D.next();if(N==">"||N=="/"&&D.eat(">"))return M.tokenize=l,o=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return o="equals",null;if(N=="<"){M.tokenize=l,M.state=h,M.tagName=M.tagStart=null;var P=M.tokenize(D,M);return P?P+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=i(N),M.stringStartCol=D.column(),M.tokenize(D,M)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(D){var M=function(N,P){for(;!N.eol();)if(N.next()==D){P.tokenize=r;break}return"string"};return M.isInAttribute=!0,M}function t(D,M){return function(N,P){for(;!N.eol();){if(N.match(M)){P.tokenize=l;break}N.next()}return D}}function a(D){return function(M,N){for(var P;(P=M.next())!=null;){if(P=="<")return N.tokenize=a(D+1),N.tokenize(M,N);if(P==">")if(D==1){N.tokenize=l;break}else return N.tokenize=a(D-1),N.tokenize(M,N)}return"meta"}}function c(D,M,N){this.prev=D.context,this.tagName=M,this.indent=D.indented,this.startOfLine=N,(_.doNotIndent.hasOwnProperty(M)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function d(D){D.context&&(D.context=D.context.prev)}function f(D,M){for(var N;;){if(!D.context)return;if(N=D.context.tagName,!_.contextGrabbers.hasOwnProperty(N)||!_.contextGrabbers[N].hasOwnProperty(M))return;d(D)}}function h(D,M,N){return D=="openTag"?(N.tagStart=M.column(),u):D=="closeTag"?E:h}function u(D,M,N){return D=="word"?(N.tagName=M.current(),n="tag",C):_.allowMissingTagName&&D=="endTag"?(n="tag bracket",C(D,M,N)):(n="error",u)}function E(D,M,N){if(D=="word"){var P=M.current();return N.context&&N.context.tagName!=P&&_.implicitlyClosed.hasOwnProperty(N.context.tagName)&&d(N),N.context&&N.context.tagName==P||_.matchClosing===!1?(n="tag",x):(n="tag error",O)}else return _.allowMissingTagName&&D=="endTag"?(n="tag bracket",x(D,M,N)):(n="error",O)}function x(D,M,N){return D!="endTag"?(n="error",x):(d(N),h)}function O(D,M,N){return n="error",x(D,M,N)}function C(D,M,N){if(D=="word")return n="attribute",w;if(D=="endTag"||D=="selfcloseTag"){var P=N.tagName,z=N.tagStart;return N.tagName=N.tagStart=null,D=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(P)?f(N,P):(f(N,P),N.context=new c(N,P,z==N.indented)),h}return n="error",C}function w(D,M,N){return D=="equals"?S:(_.allowMissing||(n="error"),C(D,M,N))}function S(D,M,N){return D=="string"?A:D=="word"&&_.allowUnquoted?(n="string",C):(n="error",C(D,M,N))}function A(D,M,N){return D=="string"?A:C(D,M,N)}return{startState:function(D){var M={tokenize:l,state:h,indented:D||0,tagName:null,tagStart:null,context:null};return D!=null&&(M.baseIndent=D),M},token:function(D,M){if(!M.tagName&&D.sol()&&(M.indented=D.indentation()),D.eatSpace())return null;o=null;var N=M.tokenize(D,M);return(N||o)&&N!="comment"&&(n=null,M.state=M.state(o||N,D,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(D,M,N){var P=D.context;if(D.tokenize.isInAttribute)return D.tagStart==D.indented?D.stringStartCol+1:D.indented+s;if(P&&P.noIndent)return I.Pass;if(D.tokenize!=r&&D.tokenize!=l)return N?N.match(/^(\s*)/)[0].length:0;if(D.tagName)return _.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+s*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/$/,blockCommentStart:"",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(D){D.state==S&&(D.state=C)},xmlCurrentTag:function(D){return D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var M=[],N=D.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),I.defineMIME("text/xml","xml"),I.defineMIME("application/xml","xml"),I.mimeModes.hasOwnProperty("text/html")||I.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(j,H,b){"use strict";b.d(H,"d",function(){return Le}),b.d(H,"b",function(){return Qe}),b.d(H,"c",function(){return Ze}),b.d(H,"a",function(){return Be});var I=b("VTBJ"),v=b("1OyB"),T=b("vuIU"),y=b("JX7q"),g=b("Ji7U"),s=b("LK+K"),_=b("q1tI"),p=b("I8Z2"),e=b("BGR+"),o=b("wx14"),n=b("rePB"),l=b("4IlW"),r=b("2GS6"),i=b("Gytx"),t=b.n(i),a=b("TSYQ"),c=b.n(a),d=b("U8pU"),f=b("ODXe"),h=/iPhone/i,u=/iPod/i,E=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,O=/Android/i,C=/\bAndroid(?:.+)SD4930UR\b/i,w=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,S=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,M=/BB10/i,N=/Opera Mini/i,P=/\b(CriOS|Chrome)(?:.+)Mobile/i,z=/Mobile(?:.+)Firefox\b/i;function X(it,wt){return it.test(wt)}function k(it){var wt=it||(typeof navigator!="undefined"?navigator.userAgent:""),pt=wt.split("[FBAN");if(typeof pt[1]!="undefined"){var st=pt,Pe=Object(f.a)(st,1);wt=Pe[0]}if(pt=wt.split("Twitter"),typeof pt[1]!="undefined"){var ze=pt,Et=Object(f.a)(ze,1);wt=Et[0]}var ht={apple:{phone:X(h,wt)&&!X(S,wt),ipod:X(u,wt),tablet:!X(h,wt)&&X(E,wt)&&!X(S,wt),device:(X(h,wt)||X(u,wt)||X(E,wt))&&!X(S,wt)},amazon:{phone:X(C,wt),tablet:!X(C,wt)&&X(w,wt),device:X(C,wt)||X(w,wt)},android:{phone:!X(S,wt)&&X(C,wt)||!X(S,wt)&&X(x,wt),tablet:!X(S,wt)&&!X(C,wt)&&!X(x,wt)&&(X(w,wt)||X(O,wt)),device:!X(S,wt)&&(X(C,wt)||X(w,wt)||X(x,wt)||X(O,wt))||X(/\bokhttp\b/i,wt)},windows:{phone:X(S,wt),tablet:X(A,wt),device:X(S,wt)||X(A,wt)},other:{blackberry:X(D,wt),blackberry10:X(M,wt),opera:X(N,wt),firefox:X(z,wt),chrome:X(P,wt),device:X(D,wt)||X(M,wt)||X(N,wt)||X(z,wt)||X(P,wt)},any:null,phone:null,tablet:null};return ht.any=ht.apple.device||ht.android.device||ht.windows.device||ht.other.device,ht.phone=ht.apple.phone||ht.android.phone||ht.windows.phone,ht.tablet=ht.apple.tablet||ht.android.tablet||ht.windows.tablet,ht}var F=Object(I.a)(Object(I.a)({},k()),{},{isMobile:k}),U=F;function L(){}function B(it,wt,pt){var st=wt||"";return it.key||"".concat(st,"item_").concat(pt)}function Z(it){return"".concat(it,"-menu-")}function re(it,wt){var pt=-1;_.Children.forEach(it,function(st){pt+=1,st&&st.type&&st.type.isMenuItemGroup?_.Children.forEach(st.props.children,function(Pe){pt+=1,wt(Pe,pt)}):wt(st,pt)})}function he(it,wt,pt){if(!it||pt.find)return;_.Children.forEach(it,function(st){if(st){var Pe=st.type;if(!Pe||!(Pe.isSubMenu||Pe.isMenuItem||Pe.isMenuItemGroup))return;wt.indexOf(st.key)!==-1?pt.find=!0:st.props.children&&he(st.props.children,wt,pt)}})}var Se=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ke=function(wt){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st=wt&&typeof wt.getBoundingClientRect=="function"&&wt.getBoundingClientRect().width;if(st){if(pt){var Pe=getComputedStyle(wt),ze=Pe.marginLeft,Et=Pe.marginRight;st+=+ze.replace("px","")+ +Et.replace("px","")}st=+st.toFixed(6)}return st||0},te=function(wt,pt,st){wt&&Object(d.a)(wt.style)==="object"&&(wt.style[pt]=st)},Re=function(){return U.any},Ce=b("KQm4"),pe=b("Ff2n"),me=b("i8i4"),se=b("bdgK"),be=b("uciX"),ae=b("8XRh"),fe={adjustX:1,adjustY:1},Fe={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},ie={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},q=Fe,Q=0,Y={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},oe=function(wt,pt,st){var Pe=Z(pt),ze=wt.getState();wt.setState({defaultActiveFirst:Object(I.a)(Object(I.a)({},ze.defaultActiveFirst),{},Object(n.a)({},Pe,st))})},le=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(st){var Pe;Object(v.a)(this,pt),Pe=wt.call(this,st),Pe.onDestroy=function(mt){Pe.props.onDestroy(mt)},Pe.onKeyDown=function(mt){var Xt=mt.keyCode,jt=Pe.menuInstance,Ut=Pe.props,kt=Ut.isOpen,Kt=Ut.store;if(Xt===l.a.ENTER)return Pe.onTitleClick(mt),oe(Kt,Pe.props.eventKey,!0),!0;if(Xt===l.a.RIGHT)return kt?jt.onKeyDown(mt):(Pe.triggerOpenChange(!0),oe(Kt,Pe.props.eventKey,!0)),!0;if(Xt===l.a.LEFT){var rn;if(kt)rn=jt.onKeyDown(mt);else return;return rn||(Pe.triggerOpenChange(!1),rn=!0),rn}return kt&&(Xt===l.a.UP||Xt===l.a.DOWN)?jt.onKeyDown(mt):void 0},Pe.onOpenChange=function(mt){Pe.props.onOpenChange(mt)},Pe.onPopupVisibleChange=function(mt){Pe.triggerOpenChange(mt,mt?"mouseenter":"mouseleave")},Pe.onMouseEnter=function(mt){var Xt=Pe.props,jt=Xt.eventKey,Ut=Xt.onMouseEnter,kt=Xt.store;oe(kt,Pe.props.eventKey,!1),Ut({key:jt,domEvent:mt})},Pe.onMouseLeave=function(mt){var Xt=Pe.props,jt=Xt.parentMenu,Ut=Xt.eventKey,kt=Xt.onMouseLeave;jt.subMenuInstance=Object(y.a)(Pe),kt({key:Ut,domEvent:mt})},Pe.onTitleMouseEnter=function(mt){var Xt=Pe.props,jt=Xt.eventKey,Ut=Xt.onItemHover,kt=Xt.onTitleMouseEnter;Ut({key:jt,hover:!0}),kt({key:jt,domEvent:mt})},Pe.onTitleMouseLeave=function(mt){var Xt=Pe.props,jt=Xt.parentMenu,Ut=Xt.eventKey,kt=Xt.onItemHover,Kt=Xt.onTitleMouseLeave;jt.subMenuInstance=Object(y.a)(Pe),kt({key:Ut,hover:!1}),Kt({key:Ut,domEvent:mt})},Pe.onTitleClick=function(mt){var Xt=Object(y.a)(Pe),jt=Xt.props;if(jt.onTitleClick({key:jt.eventKey,domEvent:mt}),jt.triggerSubMenuAction==="hover")return;Pe.triggerOpenChange(!jt.isOpen,"click"),oe(jt.store,Pe.props.eventKey,!1)},Pe.onSubMenuClick=function(mt){typeof Pe.props.onClick=="function"&&Pe.props.onClick(Pe.addKeyPath(mt))},Pe.onSelect=function(mt){Pe.props.onSelect(mt)},Pe.onDeselect=function(mt){Pe.props.onDeselect(mt)},Pe.getPrefixCls=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu")},Pe.getActiveClassName=function(){return"".concat(Pe.getPrefixCls(),"-active")},Pe.getDisabledClassName=function(){return"".concat(Pe.getPrefixCls(),"-disabled")},Pe.getSelectedClassName=function(){return"".concat(Pe.getPrefixCls(),"-selected")},Pe.getOpenClassName=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu-open")},Pe.saveMenuInstance=function(mt){Pe.menuInstance=mt},Pe.addKeyPath=function(mt){return Object(I.a)(Object(I.a)({},mt),{},{keyPath:(mt.keyPath||[]).concat(Pe.props.eventKey)})},Pe.triggerOpenChange=function(mt,Xt){var jt=Pe.props.eventKey,Ut=function(){Pe.onOpenChange({key:jt,item:Object(y.a)(Pe),trigger:Xt,open:mt})};Xt==="mouseenter"?Pe.mouseenterTimeout=setTimeout(function(){Ut()},0):Ut()},Pe.isChildrenSelected=function(){var mt={find:!1};return he(Pe.props.children,Pe.props.selectedKeys,mt),mt.find},Pe.isOpen=function(){return Pe.props.openKeys.indexOf(Pe.props.eventKey)!==-1},Pe.adjustWidth=function(){if(!Pe.subMenuTitle||!Pe.menuInstance)return;var mt=me.findDOMNode(Pe.menuInstance);if(mt.offsetWidth>=Pe.subMenuTitle.offsetWidth)return;mt.style.minWidth="".concat(Pe.subMenuTitle.offsetWidth,"px")},Pe.saveSubMenuTitle=function(mt){Pe.subMenuTitle=mt},Pe.getBaseProps=function(){var mt=Object(y.a)(Pe),Xt=mt.props;return{mode:Xt.mode==="horizontal"?"vertical":Xt.mode,visible:Pe.props.isOpen,level:Xt.level+1,inlineIndent:Xt.inlineIndent,focusable:!1,onClick:Pe.onSubMenuClick,onSelect:Pe.onSelect,onDeselect:Pe.onDeselect,onDestroy:Pe.onDestroy,selectedKeys:Xt.selectedKeys,eventKey:"".concat(Xt.eventKey,"-menu-"),openKeys:Xt.openKeys,motion:Xt.motion,onOpenChange:Pe.onOpenChange,subMenuOpenDelay:Xt.subMenuOpenDelay,parentMenu:Object(y.a)(Pe),subMenuCloseDelay:Xt.subMenuCloseDelay,forceSubMenuRender:Xt.forceSubMenuRender,triggerSubMenuAction:Xt.triggerSubMenuAction,builtinPlacements:Xt.builtinPlacements,defaultActiveFirst:Xt.store.getState().defaultActiveFirst[Z(Xt.eventKey)],multiple:Xt.multiple,prefixCls:Xt.rootPrefixCls,id:Pe.internalMenuId,manualRef:Pe.saveMenuInstance,itemIcon:Xt.itemIcon,expandIcon:Xt.expandIcon,direction:Xt.direction}},Pe.getMotion=function(mt,Xt){var jt=Object(y.a)(Pe),Ut=jt.haveRendered,kt=Pe.props,Kt=kt.motion,rn=kt.rootPrefixCls,Gt=Object(I.a)(Object(I.a)({},Kt),{},{leavedClassName:"".concat(rn,"-hidden"),removeOnLeave:!1,motionAppear:Ut||!Xt||mt!=="inline"});return Gt};var ze=st.store,Et=st.eventKey,ht=ze.getState(),Bt=ht.defaultActiveFirst;Pe.isRootMenu=!1;var Ht=!1;return Bt&&(Ht=Bt[Et]),oe(ze,Et,Ht),Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Pe=this,ze=this.props,Et=ze.mode,ht=ze.parentMenu,Bt=ze.manualRef;if(Bt&&Bt(this),Et!=="horizontal"||!ht.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Pe=this.props,ze=Pe.onDestroy,Et=Pe.eventKey;ze&&ze(Et),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Pe){var ze=this,Et=this.getBaseProps(),ht=this.getMotion(Et.mode,Et.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Et.visible||Et.forceSubMenuRender,!this.haveOpened)return _.createElement("div",null);var Bt=Et.direction;return _.createElement(ae.default,Object.assign({visible:Et.visible},ht),function(Ht){var mt=Ht.className,Xt=Ht.style,jt=c()("".concat(Et.prefixCls,"-sub"),mt,Object(n.a)({},"".concat(Et.prefixCls,"-rtl"),Bt==="rtl"));return _.createElement(Ye,Object.assign({},Et,{id:ze.internalMenuId,className:jt,style:Xt}),Pe)})}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),Et=ze.isOpen,ht=this.getPrefixCls(),Bt=ze.mode==="inline",Ht=c()(ht,"".concat(ht,"-").concat(ze.mode),(Pe={},Object(n.a)(Pe,ze.className,!!ze.className),Object(n.a)(Pe,this.getOpenClassName(),Et),Object(n.a)(Pe,this.getActiveClassName(),ze.active||Et&&!Bt),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Object(n.a)(Pe,this.getSelectedClassName(),this.isChildrenSelected()),Pe));this.internalMenuId||(ze.eventKey?this.internalMenuId="".concat(ze.eventKey,"$Menu"):(Q+=1,this.internalMenuId="$__$".concat(Q,"$Menu")));var mt={},Xt={},jt={};ze.disabled||(mt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Xt={onClick:this.onTitleClick},jt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ut={},kt=ze.direction;Bt&&(kt==="rtl"?Ut.paddingRight=ze.inlineIndent*ze.level:Ut.paddingLeft=ze.inlineIndent*ze.level);var Kt={};this.props.isOpen&&(Kt={"aria-owns":this.internalMenuId});var rn=null;ze.mode!=="horizontal"&&(rn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(rn=_.createElement(this.props.expandIcon,Object(I.a)({},this.props))));var Gt=_.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Ut,className:"".concat(ht,"-title"),role:"button"},jt,Xt,{"aria-expanded":Et},Kt,{"aria-haspopup":"true",title:typeof ze.title=="string"?ze.title:void 0}),ze.title,rn||_.createElement("i",{className:"".concat(ht,"-arrow")})),$t=this.renderChildren(ze.children),Ln=ze.parentMenu.isRootMenu?ze.parentMenu.props.getPopupContainer:function(Tr){return Tr.parentNode},pn=Y[ze.mode],Dn=ze.popupOffset?{offset:ze.popupOffset}:{},sn=ze.mode==="inline"?"":ze.popupClassName;sn+=kt==="rtl"?" ".concat(ht,"-rtl"):"";var Sn=ze.disabled,Kn=ze.triggerSubMenuAction,Qn=ze.subMenuOpenDelay,Vt=ze.forceSubMenuRender,wn=ze.subMenuCloseDelay,$n=ze.builtinPlacements;Se.forEach(function(Tr){return delete ze[Tr]}),delete ze.onClick;var ir=kt==="rtl"?Object.assign({},ie,$n):Object.assign({},Fe,$n);return delete ze.direction,_.createElement("li",Object.assign({},ze,mt,{className:Ht,role:"menuitem"}),Bt&&Gt,Bt&&$t,!Bt&&_.createElement(be.a,{prefixCls:ht,popupClassName:c()("".concat(ht,"-popup"),sn),getPopupContainer:Ln,builtinPlacements:ir,popupPlacement:pn,popupVisible:Et,popupAlign:Dn,popup:$t,action:Sn?[]:[Kn],mouseEnterDelay:Qn,mouseLeaveDelay:wn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Vt},Gt))}}]),pt}(_.Component);le.defaultProps={onMouseEnter:L,onMouseLeave:L,onTitleMouseEnter:L,onTitleMouseLeave:L,onTitleClick:L,manualRef:L,mode:"vertical",title:""};var Ee=Object(p.b)(function(it,wt){var pt=it.openKeys,st=it.activeKey,Pe=it.selectedKeys,ze=wt.eventKey,Et=wt.subMenuKey;return{isOpen:pt.indexOf(ze)>-1,active:st[Et]===ze,selectedKeys:Pe}})(le);Ee.isSubMenu=!0;var Le=Ee,ge="menuitem-overflowed",De=.5,_e=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=wt.apply(this,arguments),st.resizeObserver=null,st.mutationObserver=null,st.originalTotalWidth=0,st.overflowedItems=[],st.menuItemSizes=[],st.cancelFrameId=null,st.state={lastVisibleIndex:void 0},st.getMenuItemNodes=function(){var Pe=st.props.prefixCls,ze=me.findDOMNode(Object(y.a)(st));return ze?[].slice.call(ze.children).filter(function(Et){return Et.className.split(" ").indexOf("".concat(Pe,"-overflowed-submenu"))<0}):[]},st.getOverflowedSubMenuItem=function(Pe,ze,Et){var ht=st.props,Bt=ht.overflowedIndicator,Ht=ht.level,mt=ht.mode,Xt=ht.prefixCls,jt=ht.theme;if(Ht!==1||mt!=="horizontal")return null;var Ut=st.props.children[0],kt=Ut.props,Kt=kt.children,rn=kt.title,Gt=kt.style,$t=Object(pe.a)(kt,["children","title","style"]),Ln=Object(I.a)({},Gt),pn="".concat(Pe,"-overflowed-indicator"),Dn="".concat(Pe,"-overflowed-indicator");ze.length===0&&Et!==!0?Ln=Object(I.a)(Object(I.a)({},Ln),{},{display:"none"}):Et&&(Ln=Object(I.a)(Object(I.a)({},Ln),{},{visibility:"hidden",position:"absolute"}),pn="".concat(pn,"-placeholder"),Dn="".concat(Dn,"-placeholder"));var sn=jt?"".concat(Xt,"-").concat(jt):"",Sn={};return Se.forEach(function(Kn){$t[Kn]!==void 0&&(Sn[Kn]=$t[Kn])}),_.createElement(Le,Object.assign({title:Bt,className:"".concat(Xt,"-overflowed-submenu"),popupClassName:sn},Sn,{key:pn,eventKey:Dn,disabled:!1,style:Ln}),ze)},st.setChildrenWidthAndResize=function(){if(st.props.mode!=="horizontal")return;var Pe=me.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=Pe.children;if(!ze||ze.length===0)return;var Et=Pe.children[ze.length-1];te(Et,"display","inline-block");var ht=st.getMenuItemNodes(),Bt=ht.filter(function(Ht){return Ht.className.split(" ").indexOf(ge)>=0});Bt.forEach(function(Ht){te(Ht,"display","inline-block")}),st.menuItemSizes=ht.map(function(Ht){return ke(Ht,!0)}),Bt.forEach(function(Ht){te(Ht,"display","none")}),st.overflowedIndicatorWidth=ke(Pe.children[Pe.children.length-1],!0),st.originalTotalWidth=st.menuItemSizes.reduce(function(Ht,mt){return Ht+mt},0),st.handleResize(),te(Et,"display","none")},st.handleResize=function(){if(st.props.mode!=="horizontal")return;var Pe=me.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=ke(Pe);st.overflowedItems=[];var Et=0,ht;st.originalTotalWidth>ze+De&&(ht=-1,st.menuItemSizes.forEach(function(Bt){Et+=Bt,Et+st.overflowedIndicatorWidth<=ze&&(ht+=1)})),st.setState({lastVisibleIndex:ht})},st}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){var Pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ze=me.findDOMNode(this);if(!ze)return;this.resizeObserver=new se.default(function(Et){Et.forEach(function(){var ht=Pe.cancelFrameId;cancelAnimationFrame(ht),Pe.cancelFrameId=requestAnimationFrame(Pe.setChildrenWidthAndResize)})}),[].slice.call(ze.children).concat(ze).forEach(function(Et){Pe.resizeObserver.observe(Et)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Pe.resizeObserver.disconnect(),[].slice.call(ze.children).concat(ze).forEach(function(Et){Pe.resizeObserver.observe(Et)}),Pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(ze,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Pe){var ze=this,Et=this.state.lastVisibleIndex;return(Pe||[]).reduce(function(ht,Bt,Ht){var mt=Bt;if(ze.props.mode==="horizontal"){var Xt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,[]);Et!==void 0&&ze.props.className.indexOf("".concat(ze.props.prefixCls,"-root"))!==-1&&(Ht>Et&&(mt=_.cloneElement(Bt,{style:{display:"none"},eventKey:"".concat(Bt.props.eventKey,"-hidden"),className:"".concat(ge)})),Ht===Et+1&&(ze.overflowedItems=Pe.slice(Et+1).map(function(Ut){return _.cloneElement(Ut,{key:Ut.props.eventKey,mode:"vertical-left"})}),Xt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,ze.overflowedItems)));var jt=[].concat(Object(Ce.a)(ht),[Xt,mt]);return Ht===Pe.length-1&&jt.push(ze.getOverflowedSubMenuItem(Bt.props.eventKey,[],!0)),jt}return[].concat(Object(Ce.a)(ht),[mt])},[])}},{key:"render",value:function(){var Pe=this.props,ze=Pe.visible,Et=Pe.prefixCls,ht=Pe.overflowedIndicator,Bt=Pe.mode,Ht=Pe.level,mt=Pe.tag,Xt=Pe.children,jt=Pe.theme,Ut=Object(pe.a)(Pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),kt=mt;return _.createElement(kt,Object.assign({},Ut),this.renderChildren(Xt))}}]),pt}(_.Component);_e.defaultProps={tag:"div",className:""};var Xe=_e;function tt(it){return it.length?it.every(function(wt){return!!wt.props.disabled}):!0}function Ge(it,wt,pt){var st=it.getState();it.setState({activeKey:Object(I.a)(Object(I.a)({},st.activeKey),{},Object(n.a)({},wt,pt))})}function Me(it){return it.eventKey||"0-menu-"}function bt(it,wt){var pt=wt,st=it.children,Pe=it.eventKey;if(pt){var ze;if(re(st,function(Et,ht){Et&&Et.props&&!Et.props.disabled&&pt===B(Et,Pe,ht)&&(ze=!0)}),ze)return pt}return pt=null,it.defaultActiveFirst&&re(st,function(Et,ht){!pt&&Et&&!Et.props.disabled&&(pt=B(Et,Pe,ht))}),pt}function Oe(it){if(it){var wt=this.instanceArray.indexOf(it);wt!==-1?this.instanceArray[wt]=it:this.instanceArray.push(it)}}var Ve=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(st){var Pe;return Object(v.a)(this,pt),Pe=wt.call(this,st),Pe.onKeyDown=function(ze,Et){var ht=ze.keyCode,Bt;if(Pe.getFlatInstanceArray().forEach(function(mt){mt&&mt.props.active&&mt.onKeyDown&&(Bt=mt.onKeyDown(ze))}),Bt)return 1;var Ht=null;return(ht===l.a.UP||ht===l.a.DOWN)&&(Ht=Pe.step(ht===l.a.UP?-1:1)),Ht?(ze.preventDefault(),Ge(Pe.props.store,Me(Pe.props),Ht.props.eventKey),typeof Et=="function"&&Et(Ht),1):void 0},Pe.onItemHover=function(ze){var Et=ze.key,ht=ze.hover;Ge(Pe.props.store,Me(Pe.props),ht?Et:null)},Pe.onDeselect=function(ze){Pe.props.onDeselect(ze)},Pe.onSelect=function(ze){Pe.props.onSelect(ze)},Pe.onClick=function(ze){Pe.props.onClick(ze)},Pe.onOpenChange=function(ze){Pe.props.onOpenChange(ze)},Pe.onDestroy=function(ze){Pe.props.onDestroy(ze)},Pe.getFlatInstanceArray=function(){return Pe.instanceArray},Pe.step=function(ze){var Et=Pe.getFlatInstanceArray(),ht=Pe.props.store.getState().activeKey[Me(Pe.props)],Bt=Et.length;if(!Bt)return null;ze<0&&(Et=Et.concat().reverse());var Ht=-1;if(Et.every(function(Ut,kt){return Ut&&Ut.props.eventKey===ht?(Ht=kt,!1):!0}),!Pe.props.defaultActiveFirst&&Ht!==-1&&tt(Et.slice(Ht,Bt-1)))return;var mt=(Ht+1)%Bt,Xt=mt;do{var jt=Et[Xt];if(!jt||jt.props.disabled)Xt=(Xt+1)%Bt;else return jt}while(Xt!==mt);return null},Pe.renderCommonMenuItem=function(ze,Et,ht){var Bt=Pe.props.store.getState(),Ht=Object(y.a)(Pe),mt=Ht.props,Xt=B(ze,mt.eventKey,Et),jt=ze.props;if(!jt||typeof ze.type=="string")return ze;var Ut=Xt===Bt.activeKey,kt=Object(I.a)(Object(I.a)({mode:jt.mode||mt.mode,level:mt.level,inlineIndent:mt.inlineIndent,renderMenuItem:Pe.renderMenuItem,rootPrefixCls:mt.prefixCls,index:Et,parentMenu:mt.parentMenu,manualRef:jt.disabled?void 0:Object(r.a)(ze.ref,Oe.bind(Object(y.a)(Pe))),eventKey:Xt,active:!jt.disabled&&Ut,multiple:mt.multiple,onClick:function(rn){(jt.onClick||L)(rn),Pe.onClick(rn)},onItemHover:Pe.onItemHover,motion:mt.motion,subMenuOpenDelay:mt.subMenuOpenDelay,subMenuCloseDelay:mt.subMenuCloseDelay,forceSubMenuRender:mt.forceSubMenuRender,onOpenChange:Pe.onOpenChange,onDeselect:Pe.onDeselect,onSelect:Pe.onSelect,builtinPlacements:mt.builtinPlacements,itemIcon:jt.itemIcon||Pe.props.itemIcon,expandIcon:jt.expandIcon||Pe.props.expandIcon},ht),{},{direction:mt.direction});return(mt.mode==="inline"||Re())&&(kt.triggerSubMenuAction="click"),_.cloneElement(ze,kt)},Pe.renderMenuItem=function(ze,Et,ht){if(!ze)return null;var Bt=Pe.props.store.getState(),Ht={openKeys:Bt.openKeys,selectedKeys:Bt.selectedKeys,triggerSubMenuAction:Pe.props.triggerSubMenuAction,subMenuKey:ht};return Pe.renderCommonMenuItem(ze,Et,Ht)},st.store.setState({activeKey:Object(I.a)(Object(I.a)({},st.store.getState().activeKey),{},Object(n.a)({},st.eventKey,bt(st,st.activeKey)))}),Pe.instanceArray=[],Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Pe){return this.props.visible||Pe.visible||this.props.className!==Pe.className||!t()(this.props.style,Pe.style)}},{key:"componentDidUpdate",value:function(Pe){var ze=this.props,Et="activeKey"in ze?ze.activeKey:ze.store.getState().activeKey[Me(ze)],ht=bt(ze,Et);if(ht!==Et)Ge(ze.store,Me(ze),ht);else if("activeKey"in Pe){var Bt=bt(Pe,Pe.activeKey);ht!==Bt&&Ge(ze.store,Me(ze),ht)}}},{key:"render",value:function(){var Pe=this,ze=Object(o.a)({},this.props);this.instanceArray=[];var Et=c()(ze.prefixCls,ze.className,"".concat(ze.prefixCls,"-").concat(ze.mode)),ht={className:Et,role:ze.role||"menu"};ze.id&&(ht.id=ze.id),ze.focusable&&(ht.tabIndex=0,ht.onKeyDown=this.onKeyDown);var Bt=ze.prefixCls,Ht=ze.eventKey,mt=ze.visible,Xt=ze.level,jt=ze.mode,Ut=ze.overflowedIndicator,kt=ze.theme;return Se.forEach(function(Kt){return delete ze[Kt]}),delete ze.onClick,_.createElement(Xe,Object.assign({},ze,{prefixCls:Bt,mode:jt,tag:"ul",level:Xt,theme:kt,visible:mt,overflowedIndicator:Ut},ht),_.Children.map(ze.children,function(Kt,rn){return Pe.renderMenuItem(Kt,rn,Ht||"0-menu-")}))}}]),pt}(_.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:L};var Je=Object(p.b)()(Ve),Ye=Je,Ne=b("Kwbf");function He(it,wt,pt){var st=it.prefixCls,Pe=it.motion,ze=it.defaultMotions,Et=ze===void 0?{}:ze,ht=it.openAnimation,Bt=it.openTransitionName,Ht=wt.switchingModeFromInline;if(Pe)return Pe;if(Object(d.a)(ht)==="object"&&ht)Object(Ne.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ht=="string")return{motionName:"".concat(st,"-open-").concat(ht)};if(Bt)return{motionName:Bt};var mt=Et[pt];return mt||(Ht?null:Et.other)}var ve=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(st){var Pe;Object(v.a)(this,pt),Pe=wt.call(this,st),Pe.inlineOpenKeys=[],Pe.onSelect=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var mt=Pe.store.getState(),Xt=mt.selectedKeys,jt=ht.key;Ht.multiple?Xt=Xt.concat([jt]):Xt=[jt],"selectedKeys"in Ht||Pe.store.setState({selectedKeys:Xt}),Ht.onSelect(Object(I.a)(Object(I.a)({},ht),{},{selectedKeys:Xt}))}},Pe.onClick=function(ht){var Bt=Pe.getRealMenuMode(),Ht=Object(y.a)(Pe),mt=Ht.store,Xt=Ht.props.onOpenChange;Bt!=="inline"&&!("openKeys"in Pe.props)&&(mt.setState({openKeys:[]}),Xt([])),Pe.props.onClick(ht)},Pe.onKeyDown=function(ht,Bt){Pe.innerMenu.getWrappedInstance().onKeyDown(ht,Bt)},Pe.onOpenChange=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props,mt=Pe.store.getState().openKeys.concat(),Xt=!1,jt=function(kt){var Kt=!1;if(kt.open)Kt=mt.indexOf(kt.key)===-1,Kt&&mt.push(kt.key);else{var rn=mt.indexOf(kt.key);Kt=rn!==-1,Kt&&mt.splice(rn,1)}Xt=Xt||Kt};Array.isArray(ht)?ht.forEach(jt):jt(ht),Xt&&("openKeys"in Pe.props||Pe.store.setState({openKeys:mt}),Ht.onOpenChange(mt))},Pe.onDeselect=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var mt=Pe.store.getState().selectedKeys.concat(),Xt=ht.key,jt=mt.indexOf(Xt);jt!==-1&&mt.splice(jt,1),"selectedKeys"in Ht||Pe.store.setState({selectedKeys:mt}),Ht.onDeselect(Object(I.a)(Object(I.a)({},ht),{},{selectedKeys:mt}))}},Pe.onMouseEnter=function(ht){Pe.restoreModeVerticalFromInline();var Bt=Pe.props.onMouseEnter;Bt&&Bt(ht)},Pe.onTransitionEnd=function(ht){var Bt=ht.propertyName==="width"&&ht.target===ht.currentTarget,Ht=ht.target.className,mt=Object.prototype.toString.call(Ht)==="[object SVGAnimatedString]"?Ht.animVal:Ht,Xt=ht.propertyName==="font-size"&&mt.indexOf("anticon")>=0;(Bt||Xt)&&Pe.restoreModeVerticalFromInline()},Pe.setInnerMenu=function(ht){Pe.innerMenu=ht},Pe.isRootMenu=!0;var ze=st.defaultSelectedKeys,Et=st.defaultOpenKeys;return"selectedKeys"in st&&(ze=st.selectedKeys||[]),"openKeys"in st&&(Et=st.openKeys||[]),Pe.store=Object(p.c)({selectedKeys:ze,openKeys:Et,activeKey:{"0-menu-":bt(st,st.activeKey)}}),Pe.state={switchingModeFromInline:!1},Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Pe){this.updateOpentKeysWhenSwitchMode(Pe),this.updateMiniStore();var ze=this.props,Et=ze.siderCollapsed,ht=ze.inlineCollapsed,Bt=ze.onOpenChange;(!Pe.inlineCollapsed&&ht||!Pe.siderCollapsed&&Et)&&Bt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Pe){var ze=this.props,Et=this.store,ht=this.inlineOpenKeys,Bt=Et.getState(),Ht={};Pe.mode==="inline"&&ze.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in ze||((ze.inlineCollapsed&&!Pe.inlineCollapsed||ze.siderCollapsed&&!Pe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Bt.openKeys.concat(),Ht.openKeys=[]),(!ze.inlineCollapsed&&Pe.inlineCollapsed||!ze.siderCollapsed&&Pe.siderCollapsed)&&(Ht.openKeys=ht,this.inlineOpenKeys=[])),Object.keys(Ht).length&&Et.setState(Ht)}},{key:"updateMenuDisplay",value:function(){var Pe=this.props.collapsedWidth,ze=this.store,Et=this.prevOpenKeys,ht=this.getInlineCollapsed()&&(Pe===0||Pe==="0"||Pe==="0px");ht?(this.prevOpenKeys=ze.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Et&&(this.store.setState({openKeys:Et}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Pe=this.props.mode,ze=this.state.switchingModeFromInline,Et=this.getInlineCollapsed();return ze&&Et?"inline":Et?"vertical":Pe}},{key:"getInlineCollapsed",value:function(){var Pe=this.props,ze=Pe.inlineCollapsed,Et=Pe.siderCollapsed;return Et!==void 0?Et:ze}},{key:"restoreModeVerticalFromInline",value:function(){var Pe=this.state.switchingModeFromInline;Pe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Pe=Object(I.a)({},Object(e.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ze=this.getRealMenuMode();return Pe.className+=" ".concat(Pe.prefixCls,"-root"),Pe.direction==="rtl"&&(Pe.className+=" ".concat(Pe.prefixCls,"-rtl")),Pe=Object(I.a)(Object(I.a)({},Pe),{},{mode:ze,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:He(this.props,this.state,ze)}),delete Pe.openAnimation,delete Pe.openTransitionName,_.createElement(p.a,{store:this.store},_.createElement(Ye,Object.assign({},Pe,{ref:this.setInnerMenu}),this.props.children))}}]),pt}(_.Component);ve.defaultProps={selectable:!0,onClick:L,onSelect:L,onOpenChange:L,onDeselect:L,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:_.createElement("span",null,"\xB7\xB7\xB7")};var xe=ve,de=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=wt.apply(this,arguments),st.onKeyDown=function(Pe){var ze=Pe.keyCode;return ze===l.a.ENTER?(st.onClick(Pe),!0):void 0},st.onMouseLeave=function(Pe){var ze=st.props,Et=ze.eventKey,ht=ze.onItemHover,Bt=ze.onMouseLeave;ht({key:Et,hover:!1}),Bt({key:Et,domEvent:Pe})},st.onMouseEnter=function(Pe){var ze=st.props,Et=ze.eventKey,ht=ze.onItemHover,Bt=ze.onMouseEnter;ht({key:Et,hover:!0}),Bt({key:Et,domEvent:Pe})},st.onClick=function(Pe){var ze=st.props,Et=ze.eventKey,ht=ze.multiple,Bt=ze.onClick,Ht=ze.onSelect,mt=ze.onDeselect,Xt=ze.isSelected,jt={key:Et,keyPath:[Et],item:Object(y.a)(st),domEvent:Pe};Bt(jt),ht?Xt?mt(jt):Ht(jt):Xt||Ht(jt)},st.saveNode=function(Pe){st.node=Pe},st}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Pe=this.props;Pe.onDestroy&&Pe.onDestroy(Pe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),Et=c()(this.getPrefixCls(),ze.className,(Pe={},Object(n.a)(Pe,this.getActiveClassName(),!ze.disabled&&ze.active),Object(n.a)(Pe,this.getSelectedClassName(),ze.isSelected),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Pe)),ht=Object(I.a)(Object(I.a)({},ze.attribute),{},{title:typeof ze.title=="string"?ze.title:void 0,className:Et,role:ze.role||"menuitem","aria-disabled":ze.disabled});ze.role==="option"?ht=Object(I.a)(Object(I.a)({},ht),{},{role:"option","aria-selected":ze.isSelected}):(ze.role===null||ze.role==="none")&&(ht.role="none");var Bt={onClick:ze.disabled?null:this.onClick,onMouseLeave:ze.disabled?null:this.onMouseLeave,onMouseEnter:ze.disabled?null:this.onMouseEnter},Ht=Object(I.a)({},ze.style);ze.mode==="inline"&&(ze.direction==="rtl"?Ht.paddingRight=ze.inlineIndent*ze.level:Ht.paddingLeft=ze.inlineIndent*ze.level),Se.forEach(function(Xt){return delete ze[Xt]}),delete ze.direction;var mt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(mt=_.createElement(this.props.itemIcon,this.props)),_.createElement("li",Object.assign({},Object(e.default)(ze,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ht,Bt,{style:Ht,ref:this.saveNode}),ze.children,mt)}}]),pt}(_.Component);de.isMenuItem=!0,de.defaultProps={onSelect:L,onMouseEnter:L,onMouseLeave:L,manualRef:L};var je=Object(p.b)(function(it,wt){var pt=it.activeKey,st=it.selectedKeys,Pe=wt.eventKey,ze=wt.subMenuKey;return{active:pt[ze]===Pe,isSelected:st.indexOf(Pe)!==-1}})(de),Qe=je,ne=function(it){Object(g.a)(pt,it);var wt=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=wt.apply(this,arguments),st.renderInnerMenuItem=function(Pe){var ze=st.props,Et=ze.renderMenuItem,ht=ze.index;return Et(Pe,ht,st.props.subMenuKey)},st}return Object(T.a)(pt,[{key:"render",value:function(){var Pe=Object(o.a)({},this.props),ze=Pe.className,Et=ze===void 0?"":ze,ht=Pe.rootPrefixCls,Bt="".concat(ht,"-item-group-title"),Ht="".concat(ht,"-item-group-list"),mt=Pe.title,Xt=Pe.children;return Se.forEach(function(jt){return delete Pe[jt]}),delete Pe.onClick,delete Pe.direction,_.createElement("li",Object.assign({},Pe,{className:"".concat(Et," ").concat(ht,"-item-group")}),_.createElement("div",{className:Bt,title:typeof mt=="string"?mt:void 0},mt),_.createElement("ul",{className:Ht},_.Children.map(Xt,this.renderInnerMenuItem)))}}]),pt}(_.Component);ne.isMenuItemGroup=!0,ne.defaultProps={disabled:!0};var Ze=ne,lt=function(wt){var pt=wt.className,st=wt.rootPrefixCls,Pe=wt.style;return _.createElement("li",{className:"".concat(pt," ").concat(st,"-item-divider"),style:Pe})};lt.defaultProps={disabled:!0,className:"",style:{}};var Be=lt,$e=H.e=xe},"1q3G":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"1uat":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Hasher,g=v.x64,s=g.Word,_=g.WordArray,p=v.algo;function e(){return s.create.apply(s,arguments)}var o=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],n=[];(function(){for(var r=0;r<80;r++)n[r]=e()})();var l=p.SHA512=y.extend({_doReset:function(){this._hash=new _.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var t=this._hash.words,a=t[0],c=t[1],d=t[2],f=t[3],h=t[4],u=t[5],E=t[6],x=t[7],O=a.high,C=a.low,w=c.high,S=c.low,A=d.high,D=d.low,M=f.high,N=f.low,P=h.high,z=h.low,X=u.high,k=u.low,F=E.high,U=E.low,L=x.high,B=x.low,Z=O,re=C,he=w,Se=S,ke=A,te=D,Re=M,Ce=N,pe=P,me=z,se=X,be=k,ae=F,fe=U,Fe=L,ie=B,q=0;q<80;q++){var Q,Y,oe=n[q];if(q<16)Y=oe.high=r[i+q*2]|0,Q=oe.low=r[i+q*2+1]|0;else{var le=n[q-15],Ee=le.high,Le=le.low,ge=(Ee>>>1|Le<<31)^(Ee>>>8|Le<<24)^Ee>>>7,De=(Le>>>1|Ee<<31)^(Le>>>8|Ee<<24)^(Le>>>7|Ee<<25),_e=n[q-2],Xe=_e.high,tt=_e.low,Ge=(Xe>>>19|tt<<13)^(Xe<<3|tt>>>29)^Xe>>>6,Me=(tt>>>19|Xe<<13)^(tt<<3|Xe>>>29)^(tt>>>6|Xe<<26),bt=n[q-7],Oe=bt.high,Ve=bt.low,Je=n[q-16],Ye=Je.high,Ne=Je.low;Q=De+Ve,Y=ge+Oe+(Q>>>0>>0?1:0),Q=Q+Me,Y=Y+Ge+(Q>>>0>>0?1:0),Q=Q+Ne,Y=Y+Ye+(Q>>>0>>0?1:0),oe.high=Y,oe.low=Q}var He=pe&se^~pe&ae,ve=me&be^~me&fe,xe=Z&he^Z&ke^he&ke,de=re&Se^re&te^Se&te,je=(Z>>>28|re<<4)^(Z<<30|re>>>2)^(Z<<25|re>>>7),Qe=(re>>>28|Z<<4)^(re<<30|Z>>>2)^(re<<25|Z>>>7),ne=(pe>>>14|me<<18)^(pe>>>18|me<<14)^(pe<<23|me>>>9),Ze=(me>>>14|pe<<18)^(me>>>18|pe<<14)^(me<<23|pe>>>9),lt=o[q],Be=lt.high,$e=lt.low,it=ie+Ze,wt=Fe+ne+(it>>>0>>0?1:0),it=it+ve,wt=wt+He+(it>>>0>>0?1:0),it=it+$e,wt=wt+Be+(it>>>0<$e>>>0?1:0),it=it+Q,wt=wt+Y+(it>>>0>>0?1:0),pt=Qe+de,st=je+xe+(pt>>>0>>0?1:0);Fe=ae,ie=fe,ae=se,fe=be,se=pe,be=me,me=Ce+it|0,pe=Re+wt+(me>>>0>>0?1:0)|0,Re=ke,Ce=te,ke=he,te=Se,he=Z,Se=re,re=it+pt|0,Z=wt+st+(re>>>0>>0?1:0)|0}C=a.low=C+re,a.high=O+Z+(C>>>0>>0?1:0),S=c.low=S+Se,c.high=w+he+(S>>>0>>0?1:0),D=d.low=D+te,d.high=A+ke+(D>>>0>>0?1:0),N=f.low=N+Ce,f.high=M+Re+(N>>>0>>0?1:0),z=h.low=z+me,h.high=P+pe+(z>>>0>>0?1:0),k=u.low=k+be,u.high=X+se+(k>>>0>>0?1:0),U=E.low=U+fe,E.high=F+ae+(U>>>0>>0?1:0),B=x.low=B+ie,x.high=L+Fe+(B>>>0>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,t=this._nDataBytes*8,a=r.sigBytes*8;i[a>>>5]|=128<<24-a%32,i[(a+128>>>10<<5)+30]=Math.floor(t/4294967296),i[(a+128>>>10<<5)+31]=t,r.sigBytes=i.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var r=y.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=y._createHelper(l),v.HmacSHA512=y._createHmacHelper(l)}(),I.SHA512})},"24hK":function(j,H,b){"use strict";b.d(H,"a",function(){return v});class I{constructor(T){this.element=T,this.next=I.Undefined,this.prev=I.Undefined}}I.Undefined=new I(void 0);class v{constructor(){this._first=I.Undefined,this._last=I.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===I.Undefined}clear(){let T=this._first;for(;T!==I.Undefined;){const y=T.next;T.prev=I.Undefined,T.next=I.Undefined,T=y}this._first=I.Undefined,this._last=I.Undefined,this._size=0}unshift(T){return this._insert(T,!1)}push(T){return this._insert(T,!0)}_insert(T,y){const g=new I(T);if(this._first===I.Undefined)this._first=g,this._last=g;else if(y){const _=this._last;this._last=g,g.prev=_,_.next=g}else{const _=this._first;this._first=g,g.next=_,_.prev=g}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(g))}}shift(){if(this._first===I.Undefined)return;{const T=this._first.element;return this._remove(this._first),T}}pop(){if(this._last===I.Undefined)return;{const T=this._last.element;return this._remove(this._last),T}}_remove(T){if(T.prev!==I.Undefined&&T.next!==I.Undefined){const y=T.prev;y.next=T.next,T.next.prev=y}else T.prev===I.Undefined&&T.next===I.Undefined?(this._first=I.Undefined,this._last=I.Undefined):T.next===I.Undefined?(this._last=this._last.prev,this._last.next=I.Undefined):T.prev===I.Undefined&&(this._first=this._first.next,this._first.prev=I.Undefined);this._size-=1}*[Symbol.iterator](){let T=this._first;for(;T!==I.Undefined;)yield T.element,T=T.next}}},"25Vc":function(j,H,b){j.exports={wrap:"wrap___3gf4v",title:"title___BnbVm",path:"path___1Prpu",colorBlue:"colorBlue___1sUTa"}},"3/fG":function(j,H,b){"use strict";b.d(H,"a",function(){return v});function I(T,y){let g;return y.length===0?g=T:g=T.replace(/\{(\d+)\}/g,function(s,_){const p=_[0];return typeof y[p]!="undefined"?y[p]:s}),g}function v(T,y,...g){return I(y,g)}},"34/K":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_>0&3)*255/3,u[E*4+1]=(d[f+E]>>2&3)*255/3,u[E*4+2]=(d[f+E]>>4&3)*255/3,u[E*4+4]=0;d=u,f=0}return l.blitImage(_,a,e,c,d,f),n.rQskipBytes(c*t),this._lines-=c,!(this._lines>0)}}]),g}();H.default=y},"362i":function(j,H,b){j.exports=b.p+"static/passpart.cc679602.png"},"3690":function(j,H,b){"use strict";function I(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(n){return typeof n}:I=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I(e)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return T=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(e===null||I(e)!=="object"&&typeof e!="function")return{default:e};var o=T();if(o&&o.has(e))return o.get(e);var n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=l?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,o&&o.set(e,n),n}function g(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function s(e,o){for(var n=0;n0;){var d=1;if(t.rQwait("HEXTILE",d))return!1;var f=t.rQ,h=t.rQi,u=f[h];if(u>30)throw new Error("Illegal hextile subencoding (subencoding: "+u+")");var E=this._totalTiles-this._tiles,x=E%this._tilesX,O=Math.floor(E/this._tilesX),C=n+x*16,w=l+O*16,S=Math.min(16,n+r-C),A=Math.min(16,l+i-w);if(u&1)d+=S*A*4;else if(u&2&&(d+=4),u&4&&(d+=4),u&8){if(d++,t.rQwait("HEXTILE",d))return!1;var D=f[h+d-1];u&16?d+=D*(4+2):d+=D*2}if(t.rQwait("HEXTILE",d))return!1;if(h++,u===0)this._lastsubencoding&1?v.Debug(" Ignoring blank after RAW"):a.fillRect(C,w,S,A,this._background);else if(u&1)a.blitImage(C,w,S,A,f,h),h+=d-1;else{if(u&2&&(this._background=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),u&4&&(this._foreground=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),a.startTile(C,w,S,A,this._background),u&8){var M=f[h];h++;for(var N=0;N>4,k=z&15,F=f[h];h++;var U=(F>>4)+1,L=(F&15)+1;a.subTile(X,k,U,L,P)}}a.finishTile()}t.rQi=h,this._lastsubencoding=u,this._tiles--}return!0}}]),e}();H.default=p},"3y9D":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.Hasher,s=v.algo,_=[],p=s.SHA1=g.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,o){for(var n=this._hash.words,l=n[0],r=n[1],i=n[2],t=n[3],a=n[4],c=0;c<80;c++){if(c<16)_[c]=e[o+c]|0;else{var d=_[c-3]^_[c-8]^_[c-14]^_[c-16];_[c]=d<<1|d>>>31}var f=(l<<5|l>>>27)+a+_[c];c<20?f+=(r&i|~r&t)+1518500249:c<40?f+=(r^i^t)+1859775393:c<60?f+=(r&i|r&t|i&t)-1894007588:f+=(r^i^t)-899497514,a=t,t=i,i=r<<30|r>>>2,r=l,l=f}n[0]=n[0]+l|0,n[1]=n[1]+r|0,n[2]=n[2]+i|0,n[3]=n[3]+t|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,o=e.words,n=this._nDataBytes*8,l=e.sigBytes*8;return o[l>>>5]|=128<<24-l%32,o[(l+64>>>9<<4)+14]=Math.floor(n/4294967296),o[(l+64>>>9<<4)+15]=n,e.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var e=g.clone.call(this);return e._hash=this._hash.clone(),e}});v.SHA1=g._createHelper(p),v.HmacSHA1=g._createHmacHelper(p)}(),I.SHA1})},4:function(j,H){},"4K8j":function(j,H,b){"use strict";b.r(H);var I=b("14J3"),v=b("BMrR"),T=b("jCWc"),y=b("kPKH"),g=b("q1tI"),s=b.n(g),_=b("bntm"),p=b("1vsH"),e=b("0/SM"),o=b.n(e),n=b("2qtc"),l=b("kLXV"),r=b("+L6B"),i=b("2/Rp"),t=b("T2oS"),a=b("W9HT"),c=b("lUTK"),d=b("BvKs"),f=b("miYZ"),h=b("tsqr"),u=b("9og8"),E=b("5Dmo"),x=b("3S7+"),O=b("k1fw"),C=b("tJVT"),w=b("PpiC"),S=b("Znn+"),A=b("ZTPi"),D=b("WmNS"),M=b.n(D),N=b("5DcX"),P=b.n(N),z=b("Ty5D"),X=b("9kvl"),k=b("oBTY"),F=b("qVdP"),U=b("jsC+"),L=b("ozfa"),B=b("MJZm"),Z=b("IZBM"),re=b("P5Jw"),he=b("5NDa"),Se=b("5rEg"),ke=b("y8nQ"),te=b("Vl3Y"),Re=b("FfZY"),Ce=b.n(Re),pe=function(ze){var Et=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,mt=ze.dispatch,Xt=ze.taskData,jt=ze.isRepository,Ut=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","taskData","isRepository"]),kt=Object(z.h)(),Kt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),rn=Object(g.useState)({}),Gt=Object(C.a)(rn,2),$t=Gt[0],Ln=Gt[1],pn=Object(g.useRef)(),Dn=te.a.useForm(),sn=Object(C.a)(Dn,1),Sn=sn[0],Kn=Object(g.useState)(""),Qn=Object(C.a)(Kn,2),Vt=Qn[0],wn=Qn[1];Object(g.useEffect)(function(){Ut.visible&&Sn.resetFields()},[Ut.visible]),Object(g.useEffect)(function(){var Tr=sessionStorage.getItem("pathArray");if(Tr){var qn=Tr.split(",").join("/"),ce=qn.indexOf("/")===0?qn.substr(1):qn;wn(ce)}},[]),Object(g.useEffect)(function(){var Tr,qn;pn.current=(Tr=kt.pathname)===null||Tr===void 0||((qn=Tr.split("/"))===null||qn===void 0)?void 0:qn[2]},[]);var $n=function(){var Tr=Object(u.a)(M.a.mark(function qn(){var ce,V,J=arguments;return M.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return ce=J.length>0&&J[0]!==void 0?J[0]:{},Te.next=3,mt({type:"shixunsDetail/addRepositoryFile",payload:{id:Xt.myshixun.identifier,message:ce.commitMessage,content:"",path:(Ut.defaultPath?Ut.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),secret_repository:jt?void 0:!0}});case 3:V=Te.sent,(V==null?void 0:V.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),Ut.onOK({path:(Ut.defaultPath?Ut.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),name:ce.path.split("/")[ce.path.split("/").length-1]}),Ut.onClose());case 5:case"end":return Te.stop()}},qn)}));return function(){return Tr.apply(this,arguments)}}(),ir=function(){var qn,ce;X.d.push("/shixuns/".concat(pn.current,"/").concat((qn=kt.pathname)===null||qn===void 0||((ce=qn.split("/"))===null||ce===void 0)?void 0:ce[3]).concat(Vt?"/master/shixun_show/".concat(Vt):""))};return s.a.createElement(l.a,{width:"60%",centered:!0,visible:Ut.visible,wrapClassName:Ce.a.modal,onOk:function(){Sn.submit()},onCancel:Ut.onClose,title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Sn,scrollToFirstError:!0,layout:"vertical",onFinish:$n,onChange:function(){var qn,ce,V,J,ee=Object(O.a)({},Sn.getFieldsValue()),Te=ee==null||((qn=ee.path)===null||qn===void 0)?void 0:qn.split(""),ue=ee==null||((ce=ee.file)===null||ce===void 0)?void 0:ce.split("");Te!=null&&(V=Te.filter(function(nt){return nt=="/"}))!==null&&V!==void 0&&V.length&&(ee.path=ee.path.substring(0,ee.path.length-1)),ue!=null&&(J=ue.filter(function(nt){return nt=="/"}))!==null&&J!==void 0&&J.length&&(ee.file=ee.file.substring(0,ee.path.length-1)),Sn.setFieldsValue(Object(O.a)({},ee)),Ln(ee)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Ce.a.filePath},Ut.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0",size:"large"}))))),s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\uFF1A",name:"file"},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\uFF0C\u5982\u679C\u4E0D\u586B\u5199\u7CFB\u7EDF\u5C06\u5728\u6587\u4EF6\u5939\u4E0B\u521B\u5EFA.gitkeep\u7684\u9ED8\u8BA4\u6587\u4EF6",size:"large"})),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"}))))))},me=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:Et.models.index}})(pe),se=b("7ahc"),be=function(ze){var Et=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,mt=ze.taskData,Xt=ze.dispatch,jt=ze.isRepository,Ut=ze.onClose,kt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository","onClose"]),Kt=Object(z.h)(),rn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),Gt=Object(g.useState)({}),$t=Object(C.a)(Gt,2),Ln=$t[0],pn=$t[1],Dn=Object(g.useRef)(),sn=te.a.useForm(),Sn=Object(C.a)(sn,1),Kn=Sn[0],Qn=Object(g.useState)(""),Vt=Object(C.a)(Qn,2),wn=Vt[0],$n=Vt[1];Object(g.useEffect)(function(){kt.visible&&Kn.resetFields()},[kt.visible]),Object(g.useEffect)(function(){var qn=sessionStorage.getItem("pathArray");if(qn){var ce=qn.split(",").join("/"),V=ce.indexOf("/")===0?ce.substr(1):ce;$n(V)}},[]),Object(g.useEffect)(function(){var qn,ce;Dn.current=(qn=Kt.pathname)===null||qn===void 0||((ce=qn.split("/"))===null||ce===void 0)?void 0:ce[2]},[]);var ir=function(){var qn=Object(u.a)(M.a.mark(function ce(){var V,J,ee=arguments;return M.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return V=ee.length>0&&ee[0]!==void 0?ee[0]:{},ue.next=3,Object(Z.b)({id:mt.myshixun.identifier,message:V.commitMessage,content:V.codeMirror,path:(kt.defaultPath?kt.defaultPath+"/":"")+V.path,secret_repository:jt?void 0:!0});case 3:J=ue.sent,(J==null?void 0:J.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),kt.onOK({path:(kt.defaultPath?kt.defaultPath+"/":"")+V.path,name:V.path.split("/")[V.path.split("/").length-1]}),Ut());case 5:case"end":return ue.stop()}},ce)}));return function(){return qn.apply(this,arguments)}}(),Tr=function(){var ce,V;X.d.push("/shixuns/".concat(Dn.current,"/").concat((ce=Kt.pathname)===null||ce===void 0||((V=ce.split("/"))===null||V===void 0)?void 0:V[3]).concat(wn?"/master/shixun_show/".concat(wn):""))};return s.a.createElement(l.a,{width:"60%",visible:kt.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Kn.submit()},onCancel:Ut,title:"\u65B0\u5EFA\u6587\u4EF6"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Kn,scrollToFirstError:!0,layout:"vertical",onFinish:ir,onChange:function(){var ce,V,J=Object(O.a)({},Kn.getFieldsValue()),ee=J==null||((ce=J.path)===null||ce===void 0)?void 0:ce.split("");(ee==null||((V=ee.filter(function(Te){return Te=="/"}))===null||V===void 0)?void 0:V.length)>1&&(J.path=J.path.substring(0,J.path.length-1)),Kn.setFieldsValue(Object(O.a)({},J)),pn(J)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Ce.a.filePath},kt.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large"}))))),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"})),s.a.createElement("div",{className:"mt10 mb20"},s.a.createElement(te.a.Item,{name:"codeMirror",label:"\u6587\u4EF6\u5185\u5BB9\uFF1A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},s.a.createElement(se.a,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}})))))))},ae=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:Et.models.index}})(be),fe=function(ze){var Et=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,mt=ze.dispatch,Xt=ze.isRepository,jt=ze.taskData,Ut=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository","taskData"]),kt=Object(z.h)(),Kt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),rn=Object(g.useState)({}),Gt=Object(C.a)(rn,2),$t=Gt[0],Ln=Gt[1],pn=Object(g.useRef)(),Dn=te.a.useForm(),sn=Object(C.a)(Dn,1),Sn=sn[0],Kn=Object(g.useState)(""),Qn=Object(C.a)(Kn,2),Vt=Qn[0],wn=Qn[1],$n=Object(g.useState)(""),ir=Object(C.a)($n,2),Tr=ir[0],qn=ir[1];Object(g.useEffect)(function(){Ut.visible&&Sn.resetFields()},[Ut.visible]),Object(g.useEffect)(function(){var J=Ut.defaultPath.split("/");J.length===1?(wn(""),qn(Ut.defaultPath)):(qn(J.pop()),wn(J.join("/")+"/"))},[Ut.defaultPath]),Object(g.useEffect)(function(){var J,ee;pn.current=(J=kt.pathname)===null||J===void 0||((ee=J.split("/"))===null||ee===void 0)?void 0:ee[2]},[]);var ce=function(){var J=Object(u.a)(M.a.mark(function ee(){var Te,ue,nt,Lt=arguments;return M.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return ue=Lt.length>0&&Lt[0]!==void 0?Lt[0]:{},on.next=3,Object(Z.w)({id:jt==null||((Te=jt.shixun)===null||Te===void 0)?void 0:Te.identifier,from:Ut.defaultPath,to:Vt+ue.path,message:ue.commitMessage||"".concat(Ut.defaultPath," rename to ").concat(Vt).concat(ue.path," ")});case 3:nt=on.sent,(nt==null?void 0:nt.status)===0&&(h.b.success("\u64CD\u4F5C\u6210\u529F"),Ut.onOK({path:ue.path,name:ue.path}),Ut.onClose());case 5:case"end":return on.stop()}},ee)}));return function(){return J.apply(this,arguments)}}(),V=function(){var ee,Te;X.d.push("/shixuns/".concat(pn.current,"/").concat((ee=kt.pathname)===null||ee===void 0||((Te=ee.split("/"))===null||Te===void 0)?void 0:Te[3]).concat(Vt?"/master/shixun_show/".concat(Vt):""))};return s.a.createElement(l.a,{width:"40%",visible:Ut.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Sn.submit()},onCancel:Ut.onClose,title:"\u63D0\u4EA4\u8BF4\u660E"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Sn,scrollToFirstError:!0,layout:"vertical",onFinish:ce,onChange:function(){var ee,Te,ue=Object(O.a)({},Sn.getFieldsValue()),nt=ue==null||((ee=ue.path)===null||ee===void 0)?void 0:ee.split("");(nt==null||((Te=nt.filter(function(Lt){return Lt=="/"}))===null||Te===void 0)?void 0:Te.length)>1&&(ue.path=ue.path.substring(0,ue.path.length-1)),Sn.setFieldsValue(Object(O.a)({},ue)),Ln(ue)}},s.a.createElement(te.a.Item,{label:"\u91CD\u547D\u540D\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large",defaultValue:Tr}))))),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage"},s.a.createElement(Se.a,{placeholder:"\u5982\u4E0D\u586B\u5199\uFF0C\u9ED8\u8BA4\u63D0\u4EA4\u4FE1\u606F\u662F\uFF08".concat(Ut.defaultPath," rename to \u65B0\u7684\u540D\u79F0 \uFF09"),size:"large"}))))))},Fe=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:Et.models.index}})(fe),ie=b("DZo9"),q=b("8z0m"),Q=b("m3rI"),Y=b("8j3D"),oe=b("25Vc"),le=b.n(oe),Ee=q.a.Dragger,Le=function(ze){var Et,ht=ze.shixunsDetail,Bt=ze.globalSetting,Ht=ze.loading,mt=ze.user,Xt=ze.taskData,jt=ze.dispatch,Ut=ze.isRepository,kt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository"]),Kt=Object(z.h)(),rn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),Gt=Object(g.useState)({}),$t=Object(C.a)(Gt,2),Ln=$t[0],pn=$t[1],Dn=Object(g.useRef)(),sn=te.a.useForm(),Sn=Object(C.a)(sn,1),Kn=Sn[0],Qn=Object(g.useState)([]),Vt=Object(C.a)(Qn,2),wn=Vt[0],$n=Vt[1],ir=Object(g.useState)(),Tr=Object(C.a)(ir,2),qn=Tr[0],ce=Tr[1],V;Object(g.useEffect)(function(){kt.visible&&(Kn.resetFields(),$n([]))},[kt.visible]),Object(g.useEffect)(function(){Dn.current=rn.id},[]),Object(g.useEffect)(function(){var Lt=sessionStorage.getItem("pathArray");if(Lt){var Yt=Lt.split(",").join("/"),on=Yt.indexOf("/")===0?Yt.substr(1):Yt;ce(on)}},[]);var J=function(Yt){if(V=Yt.file.name,Yt.file.status==="done"||Yt.file.status==="uploading"){var on,Qt,In;if($n(Yt.fileList),!Yt.file.response)return;if(((on=Yt.file.response)===null||on===void 0?void 0:on.status)===0){h.b.success("\u4E0A\u4F20\u6210\u529F\uFF01");return}$n(wn.filter(function(Gn){return Gn.uid!==Yt.file.uid})),((Qt=Yt.file.response)===null||Qt===void 0?void 0:Qt.message)&&h.b.info((In=Yt.file.response)===null||In===void 0?void 0:In.message)}},ee=function(){var Lt=Object(u.a)(M.a.mark(function Yt(on){var Qt;return M.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:if(on.response){Gn.next=3;break}return h.b.info("\u8FD8\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u65E0\u6CD5\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF01"),Gn.abrupt("return");case 3:return Gn.next=5,jt({type:"shixunsDetail/deleteGitFile",payload:{id:rn.id,path:qn?"".concat(qn,"/").concat(on.name):on.name,message:Kn.getFieldValue("commitMessage")||"\u5220\u9664\u4E86".concat(qn?"".concat(qn,"/").concat(on.name):on.name),secret_repository:Ut?null:!0}});case 5:Qt=Gn.sent,Qt.status===0&&($n(wn.filter(function(lr){return lr.uid!==on.uid})),h.b.info("\u5220\u9664\u6210\u529F"));case 7:case"end":return Gn.stop()}},Yt)}));return function(on){return Lt.apply(this,arguments)}}(),Te={height:300,multiple:!0,withCredentials:!0,data:function(){var Lt=Object(u.a)(M.a.mark(function on(){return M.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.abrupt("return",new Promise(function(){var Gn=Object(u.a)(M.a.mark(function lr(Ar,vr){return M.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:setTimeout(Object(u.a)(M.a.mark(function qi(){var Gr,ai;return M.a.wrap(function(Fi){for(;;)switch(Fi.prev=Fi.next){case 0:return Fi.next=2,Kn.getFieldsValue();case 2:Gr=Fi.sent,ai=Object(O.a)(Object(O.a)({},{path:kt.defaultPath?kt.defaultPath:"",message:Ln.commitMessage||"\u4E0A\u4F20\u4E86".concat(V)}),Ut?{}:{secret_repository:!0}),Ar(ai);case 5:case"end":return Fi.stop()}},qi)})),200);case 1:case"end":return xr.stop()}},lr)}));return function(lr,Ar){return Gn.apply(this,arguments)}}()));case 1:case"end":return In.stop()}},on)}));function Yt(){return Lt.apply(this,arguments)}return Yt}(),fileList:wn,method:"post",action:"".concat(Q.a.API_SERVER,"/api/myshixuns/").concat(Xt==null||((Et=Xt.myshixun)===null||Et===void 0)?void 0:Et.identifier,"/upload_git_file.json"),onChange:J,onRemove:ee,beforeUpload:function(Yt){V=Yt.name}},ue=function(){var Lt=Object(u.a)(M.a.mark(function Yt(on){return M.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Kn.validateFields();case 2:kt.onClose(),kt.onOK({path:kt.defaultPath}),nt();case 5:case"end":return In.stop()}},Yt)}));return function(on){return Lt.apply(this,arguments)}}(),nt=function(){};return s.a.createElement(l.a,{visible:kt.visible,onOk:ue,centered:!0,onCancel:kt.onClose,width:"70%"},s.a.createElement("section",{className:le.a.bg},s.a.createElement("div",{className:le.a.wrap},s.a.createElement("div",{className:le.a.title},"\u4E0A\u4F20\u6587\u4EF6"),s.a.createElement(te.a,{className:"mt10",form:Kn,scrollToFirstError:!0,layout:"vertical",onFinish:ue,onValuesChange:function(){return pn(Object(O.a)({},Kn.getFieldsValue()))}},s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u5FC5\u586B\uFF0C\u63CF\u8FF0\u4E3B\u8981\u4FEE\u6539\u5185\u5BB9\uFF08\u76F8\u5F53\u4E8EGit Commit message\u7684Header\uFF09"})),s.a.createElement(te.a.Item,{label:"\u9009\u62E9\u6587\u4EF6",name:"file",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6"}]},s.a.createElement(Ee,Te,s.a.createElement("div",null,s.a.createElement("i",{className:"iconfont icon-shangchuan font50 ".concat(le.a.colorBlue)})),s.a.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",s.a.createElement("span",{className:"".concat(le.a.colorBlue," ml5")},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))))),s.a.createElement(Y.a,{onFinish:function(Yt){return ce(Yt)}})))},ge=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:Et.models.index}})(Le),De=b("aVK0"),_e=b.n(De),Xe=b("TXba"),tt=b.n(Xe),Ge=function(ze){var Et=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.dispatch,mt=ze.title,Xt=ze.pathList,jt=Xt===void 0?[]:Xt,Ut=ze.showInputPath,kt=Ut===void 0?!1:Ut,Kt=ze.isMergeSelectFile,rn=Kt===void 0?!1:Kt,Gt=ze.onFinish,$t=Gt===void 0?function(){}:Gt,Ln=te.a.useForm(),pn=Object(C.a)(Ln,1),Dn=pn[0],sn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),Sn=Object(z.h)(),Kn=Object(g.useRef)(),Qn=Object(g.useState)(""),Vt=Object(C.a)(Qn,2),wn=Vt[0],$n=Vt[1],ir=Object(g.useState)(""),Tr=Object(C.a)(ir,2),qn=Tr[0],ce=Tr[1],V=Object(g.useState)([]),J=Object(C.a)(V,2),ee=J[0],Te=J[1],ue=Object(g.useState)([]),nt=Object(C.a)(ue,2),Lt=nt[0],Yt=nt[1];Object(g.useEffect)(function(){var Ar,vr;Kn.current=((Ar=Sn.pathname)===null||Ar===void 0||((vr=Ar.split("/"))===null||vr===void 0)?void 0:vr[3])==="repository"},[]),Object(g.useEffect)(function(){if(Et.actionTabs.key!=="Repository-SelectFilePath")return;var Ar=jt.join("/"),vr=[];jt.map(function(ar,xr){xr===0?vr.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(ar),path:Ar}):vr.push({val:"/".concat(ar),path:Ar})}),Te(vr),$n(Ar),ce(Ar),on(Ar)},[Et.actionTabs.key]);var on=function(){var Ar=Object(u.a)(M.a.mark(function vr(ar){var xr;return M.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return Gr.next=2,Ht({type:Kn.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:sn.id,path:ar}});case 2:xr=Gr.sent,xr&&Yt(xr.trees||[]);case 4:case"end":return Gr.stop()}},vr)}));return function(ar){return Ar.apply(this,arguments)}}(),Qt=function(vr){var ar=wn;vr.type==="tree"&&(ee.length?ee.push({val:"/".concat(vr.name),path:vr.name}):ee.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(vr.name),path:vr.name}),Te(ee),ar=wn?"".concat(wn,"/").concat(vr.name):vr.name,$n(ar)),on(ar)},In=function(vr,ar){var xr=ee.filter(function(Gr,ai){return ai<=ar});Te(xr);var qi=xr.filter(function(Gr,ai){return ai!==0}).map(function(Gr){return Gr.val}).join("").substr(1);$n(qi),on(qi)},Gn=function(){var Ar=Object(u.a)(M.a.mark(function vr(){var ar,xr,qi;return M.a.wrap(function(ai){for(;;)switch(ai.prev=ai.next){case 0:if(ar=Dn==null?void 0:Dn.getFieldsValue(),xr=wn?"".concat(wn).concat(ar!=null&&ar.name?"/".concat(ar==null?void 0:ar.name):""):ar==null?void 0:ar.name,!rn){ai.next=6;break}return $t(xr),lr(),ai.abrupt("return");case 6:if(!kt){ai.next=16;break}return ai.next=9,Dn.validateFields();case 9:return ai.next=11,Ht({type:"shixunsDetail/uploadGitFolder",payload:Object(O.a)(Object(O.a)({},{id:sn.id,path:xr}),Kn.current?{}:{secret_repository:!0})});case 11:qi=ai.sent,$t(qn),qi.status===0&&h.b.info("\u65B0\u5EFA\u6210\u529F"),ai.next=18;break;case 16:$t(xr),h.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:lr();case 19:case"end":return ai.stop()}},vr)}));return function(){return Ar.apply(this,arguments)}}(),lr=function(){Ht({type:"shixunsDetail/setActionTabs",payload:{}}),Dn.resetFields()};return s.a.createElement(l.a,{centered:!0,title:mt||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:Et.actionTabs.key==="Repository-SelectFilePath",onOk:Gn,onCancel:lr},s.a.createElement("div",{className:tt.a.wrap},s.a.createElement("div",{className:tt.a.content},s.a.createElement("div",{className:tt.a.mainPathWrap},!!(ee!=null&&ee.length)&&ee.map(function(Ar,vr){return s.a.createElement("a",{key:vr,onClick:function(){return In(Ar,vr)}},Ar.val)})),!!(Lt!=null&&Lt.length)&&Lt.map(function(Ar,vr){return Ar.type==="tree"&&s.a.createElement("a",{key:vr,onClick:function(){return Qt(Ar)}},s.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(tt.a.colorBlue)}),Ar.name)})),s.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),s.a.createElement("div",{className:"mt5 mb5"},wn),kt&&s.a.createElement(te.a,{form:Dn,scrollToFirstError:!0,className:"mt20"},s.a.createElement(te.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))},Me=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting;return{shixunsDetail:ze,globalSetting:ht,loading:Et.models.index}})(Ge),bt=b("GZ0F"),Oe=b("8Skl"),Ve=b("HBuW"),Je=b("LvDl"),Ye=b("NLgs"),Ne=b("lzim"),He=B.a.DirectoryTree,ve=function(ze){var Et,ht,Bt,Ht=ze.shixunsDetail,mt=ze.globalSetting,Xt=ze.loading,jt=ze.user,Ut=ze.activeKey,kt=ze.dispatch,Kt=ze.taskData,rn=ze.practiceSetting,Gt=ze.isRepository,$t=ze.treeData,Ln=ze.setTreeData,pn=ze.params,Dn=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","activeKey","dispatch","taskData","practiceSetting","isRepository","treeData","setTreeData","params"]),sn=Object(z.h)(),Sn=Object(g.useState)(),Kn=Object(C.a)(Sn,2),Qn=Kn[0],Vt=Kn[1],wn=Object(g.useState)(!1),$n=Object(C.a)(wn,2),ir=$n[0],Tr=$n[1],qn=Object(g.useState)(!1),ce=Object(C.a)(qn,2),V=ce[0],J=ce[1],ee=Object(g.useState)(!1),Te=Object(C.a)(ee,2),ue=Te[0],nt=Te[1],Lt=Object(g.useState)(!1),Yt=Object(C.a)(Lt,2),on=Yt[0],Qt=Yt[1],In=Object(g.useState)(""),Gn=Object(C.a)(In,2),lr=Gn[0],Ar=Gn[1],vr=Object(g.useState)([]),ar=Object(C.a)(vr,2),xr=ar[0],qi=ar[1],Gr=Object(g.useState)([]),ai=Object(C.a)(Gr,2),da=ai[0],Fi=ai[1],ia=Object(g.useState)([]),Ca=Object(C.a)(ia,2),po=Ca[0],so=Ca[1],xo=Object(g.useState)(!1),ka=Object(C.a)(xo,2),Yi=ka[0],Nr=ka[1],Qr=Object(g.useState)(),yi=Object(C.a)(Qr,2),Fr=yi[0],wr=yi[1],ei=Object(g.useState)(),_r=Object(C.a)(ei,2),oi=_r[0],or=_r[1],Wi=Object(g.useState)(""),Mi=Object(C.a)(Wi,2),$i=Mi[0],mo=Mi[1],Qi=Object(g.useState)(),Ka=Object(C.a)(Qi,2),La=Ka[0],ti=Ka[1],Bo=Object(g.useState)(!1),Ha=Object(C.a)(Bo,2),go=Ha[0],So=Ha[1];Object(g.useEffect)(function(){Ln([]),dr(""),localStorage.warehouseHideTip||Nr(!0)},[sn.pathname,Gt]),Object(g.useEffect)(function(){var An;if(Kt!=null&&(An=Kt.challenge)!==null&&An!==void 0&&An.path&&$t!==null&&$t!==void 0&&$t.length){var tn,kn,_n,nr=Kt==null||((tn=Kt.challenge)===null||tn===void 0||((kn=tn.path)===null||kn===void 0))?void 0:kn.replaceAll("\uFF1B",""),Or=(_n=Object(Je.cloneDeep)($t))===null||_n===void 0?void 0:_n.filter(function(fi){var bi;return fi.name===(nr==null||((bi=nr.split("/"))===null||bi===void 0)?void 0:bi[0])});Wa(nr),($t==null?void 0:$t.length)!==1&&(console.log(Or,"filterTreeData"),Ln(Or))}},[Kt==null||((Et=Kt.challenge)===null||Et===void 0)?void 0:Et.path,$t]);var Wa=function(tn){Zn(tn),da=[tn],Fi([tn])},Ko=function(){var An=Object(u.a)(M.a.mark(function tn(){var kn,_n,nr=arguments;return M.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return kn=nr.length>0&&nr[0]!==void 0?nr[0]:"",fi.next=3,Object(Ve.Gb)({id:pn.id,secret_dir_path:kn});case 3:_n=fi.sent,_n&&ti(kn);case 5:case"end":return fi.stop()}},tn)}));return function(){return An.apply(this,arguments)}}(),Jn=function(tn){return s.a.createElement(d.a,{className:_e.a.menu,onClick:function(_n){Ar(tn.path||"");switch(_n.key){case"1":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6"]),Tr(!0);break;case"2":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6\u5939"]),nt(!0);break;case"3":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u4E0A\u4F20"]),Qt(!0);break;case"4":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u91CD\u547D\u540D"]),J(!0);break;case"5":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u5220\u9664"]),jr(tn.path,tn.name,tn);break;case"6":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u590D\u5236\u8DEF\u5F84"]),qa(tn);break}}},(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"1"},"\u65B0\u5EFA\u6587\u4EF6"),(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"2"},"\u65B0\u5EFA\u6587\u4EF6\u5939"),(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"3"},"\u4E0A\u4F20"),tn.type!=="topTree"&&tn.type!=="tree"&&s.a.createElement(d.a.Item,{key:"4"},"\u91CD\u547D\u540D"),tn.type!=="topTree"&&s.a.createElement(re.CopyToClipboard,{text:"/data/workspace/myshixun/".concat(Gt?"":"secret/").concat(tn==null?void 0:tn.path),onCopy:function(){return h.b.success("\u590D\u5236\u6210\u529F")}},s.a.createElement(d.a.Item,{key:"6"},s.a.createElement(s.a.Fragment,null,"\u590D\u5236\u8DEF\u5F84"))),tn.type!=="topTree"&&s.a.createElement(d.a.Item,{key:"5"},"\u5220\u9664"))},gr=function(tn,kn){return tn.map(function(_n){return kn==""?_n.path=kn+_n.name:_n.path=kn+"/"+_n.name,_n.title=s.a.createElement(v.a,{className:"font14"},s.a.createElement(y.a,{flex:"1"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"20px"},_n.type==="blob"&&s.a.createElement("span",{className:"iconfont icon-wenjian11 font12"})),s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:" multi_ellipsis1"},_n.name)))),s.a.createElement(y.a,null,(_n.type==="blob"||_n.type==="tree")&&s.a.createElement(U.a,{overlay:Jn(_n),className:_e.a.ellipsis},s.a.createElement("i",{className:"iconfont icon-gengduo2 c-555a88"})))),_n.disableCheckbox=Qn&&Qn!==_n.name,_n.className=_n.type==="tree"?_e.a.pl23:"",_n.checkable=_n.type!=="tree",_n.isLeaf=_n.type!=="tree",_n.children=_n.type==="tree"&&[],_n.key=_n.path,_n})},Zn=function(tn){kt({type:"practiceSetting/setSideBarTabs",payload:{selectPath:tn}})},Lr=function(){var An=Object(u.a)(M.a.mark(function tn(kn,_n){var nr;return M.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return nr=kn.split("/"),fi.next=3,dr(lr);case 3:setTimeout(function(){Zn(kn),xr=[nr[0]||""],da=[kn],Fi(Object(k.a)(da)),qi(Object(k.a)(xr))},150);case 4:case"end":return fi.stop()}},tn)}));return function(kn,_n){return An.apply(this,arguments)}}(),Hr=function(tn,kn){if(console.log(tn,"data"),kn=="")Ln(Object(k.a)(tn));else{var _n=gi($t,kn,tn);Ln(Object(k.a)(_n))}};function gi(An,tn,kn){return An.map(function(_n){return _n.key===tn?(_n.children=Object(k.a)(kn),Object(O.a)({},_n)):_n.children?Object(O.a)(Object(O.a)({},_n),{},{children:gi(_n.children,tn,kn)}):_n})}var dr=function(){var An=Object(u.a)(M.a.mark(function tn(){var kn,_n,nr,Or,fi,bi,Ji=arguments;return M.a.wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:return _n=Ji.length>0&&Ji[0]!==void 0?Ji[0]:"",console.log("location:",sn),zi.next=4,Object(Z.m)(Kt==null||((kn=Kt.myshixun)===null||kn===void 0)?void 0:kn.identifier,{path:_n});case 4:return nr=zi.sent,nr&&((Or=nr.trees)!==null&&Or!==void 0&&Or.length?(bi=gr(Object(k.a)(nr.trees),_n),Hr(bi,_n),so(nr.trees||[]),or((nr==null?void 0:nr.secret_dir_path)||""),console.log("handleGetRepository:",bi,_n),setTimeout(function(){return console.log($t)},2e3)):_n==""&&Ln([]),wr(((fi=nr.commits)===null||fi===void 0?void 0:fi[0])||{})),zi.abrupt("return",nr);case 7:case"end":return zi.stop()}},tn)}));return function(){return An.apply(this,arguments)}}(),Xi=function(){var An=Object(u.a)(M.a.mark(function tn(kn){return M.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.abrupt("return",new Promise(function(){var Or=Object(u.a)(M.a.mark(function fi(bi,Ji){return M.a.wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:return kn.children.length&&bi(),mo(kn.path),zi.next=4,dr(kn.path);case 4:bi();case 5:case"end":return zi.stop()}},fi)}));return function(fi,bi){return Or.apply(this,arguments)}}()));case 1:case"end":return nr.stop()}},tn)}));return function(kn){return An.apply(this,arguments)}}(),ga=function(){var An=Object(u.a)(M.a.mark(function tn(kn,_n){var nr,Or;return M.a.wrap(function(bi){for(;;)switch(bi.prev=bi.next){case 0:if(console.log("handleSelectTree",kn,_n.nativeEvent.target.nodeName,_n),nr=function(){Zn(_n.node.path),kn=[_n.node.path],Fi(Object(k.a)(kn))},!(_n.nativeEvent.target.nodeName==="svg"||_n.nativeEvent.target.nodeName==="LI"||_n.nativeEvent.target.nodeName==="I")){bi.next=4;break}return bi.abrupt("return");case 4:_n.node.type==="blob"&&(rn!=null&&(Or=rn.sideBar)!==null&&Or!==void 0&&Or.confirmLeave?l.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){nr(),kt({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})}}):nr());case 5:case"end":return bi.stop()}},tn)}));return function(kn,_n){return An.apply(this,arguments)}}(),jr=function(tn,kn,_n){l.a.confirm({centered:!0,title:"\u786E\u8BA4\u9700\u8981\u5220\u9664\u8BE5\u6587\u4EF6".concat(_n.children?"\u5939":"","?"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var nr=Object(u.a)(M.a.mark(function fi(){var bi,Ji,Pi,zi;return M.a.wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:return Ea.next=2,Object(Z.h)({id:Kt==null||((bi=Kt.myshixun)===null||bi===void 0)?void 0:bi.identifier,path:tn,message:"\u5220\u9664".concat(tn)});case 2:if(Ji=Ea.sent,Pi=tn.split("/"),!((Ji==null?void 0:Ji.status)===0)){Ea.next=20;break}return h.b.info("\u5220\u9664\u6210\u529F"),Pi.splice(Pi.length-1,1),Ea.next=9,dr(Pi.length>1?Pi.join("/"):"");case 9:if(zi=Ea.sent,!(zi!=null&&zi.trees)){Ea.next=13;break}Ea.next=16;break;case 13:return Pi.splice(Pi.length-1,1),Ea.next=16,dr(Pi.length>1?Pi.join("/"):"");case 16:return Zn(""),Ea.abrupt("return",!0);case 20:(Ji==null?void 0:Ji.status)===-3&&l.a.info({title:"\u5220\u9664\u5931\u8D25",content:s.a.createElement("div",null,"\u8BE5\u6587\u4EF6\u201C",tn,"\u201D\u5DF2\u7ECF\u88AB\u4EFB\u52A1\u5173\u5361\u7684\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u6216\u8BC4\u6D4B\u6267\u884C\u6587\u4EF6\u4F7F\u7528\uFF0C\u8BF7\u5148\u4FEE\u6539\u4EFB\u52A1\u5173\u5361\u4E2D\u8BC4\u6D4B\u8BBE\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u540E\u518D\u5220\u9664\u3002"),okText:"\u6211\u77E5\u9053\u4E86",onOk:function(){}});case 21:case"end":return Ea.stop()}},fi)}));function Or(){return nr.apply(this,arguments)}return Or}()})},qa=function(tn){console.log(tn,"item")},di=function(){var An=Object(u.a)(M.a.mark(function tn(kn,_n){return M.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:if(console.log("handleExpand",_n),!(_n.nativeEvent.target.nodeName==="svg"||_n.nativeEvent.target.nodeName==="path"||_n.nativeEvent.target.nodeName==="LI")){Or.next=5;break}return Or.abrupt("return",!0);case 5:return Or.next=7,Xi(_n.node);case 7:xr.includes(_n.node.path)?xr.splice(xr.indexOf(_n.node.path),1):xr.push(_n.node.path);case 8:qi(Object(k.a)(xr));case 9:case"end":return Or.stop()}},tn)}));return function(kn,_n){return An.apply(this,arguments)}}(),Ai=function(){Nr(!1),localStorage.warehouseHideTip=!0},va=function(){var An=Object(u.a)(M.a.mark(function tn(kn){var _n,nr,Or,fi,bi;return M.a.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:Or="",Pi.t0=Gt,Pi.next=Pi.t0===!0?4:Pi.t0===!1?9:11;break;case 4:return Or="\u5F00\u542F\u7248\u672C\u5E93",fi="\u5F00\u542F",bi="\u4E0D\u5F00\u542F",nr=s.a.createElement("div",null,"\u65B0\u5EFA\u5B9E\u8DF5\u9898\u5173\u5361\u65F6\uFF0C\u9700\u8981\u4F7F\u7528\u4EE3\u7801\u4ED3\u5E93\uFF1B\u5982\u679C\u53EA\u6709\u9009\u62E9\u9898\u5173\u5361\uFF0C\u5219\u4E0D\u9700\u8981\u4EE3\u7801\u4ED3\u5E93\u3002\u4EE3\u7801\u4ED3\u5E93\u542F\u7528\u540E\uFF0C\u5C06\u65E0\u6CD5\u5173\u95ED\u3002"),Pi.abrupt("break",11);case 9:return Ht!=null&&(_n=Ht.detail)!==null&&_n!==void 0&&_n.secret_repository?(Or="\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",fi="\u786E\u5B9A",bi="\u53D6\u6D88",nr=s.a.createElement("div",null,"\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u540E\uFF0C\u5DF2\u521B\u5EFA\u7684\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u53CA\u5176\u5185\u5BB9\uFF0C\u5C06\u88AB\u5220\u9664\u3002\u786E\u8BA4\u8981\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\uFF1F")):(Or="\u5F00\u542F\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",fi="\u4E0D\u4F7F\u7528",bi="\u4F7F\u7528",nr=s.a.createElement("div",null,"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002\u9002\u7528\u4E8E\u547D\u4EE4\u884C\u3001\u56FE\u5F62\u5316\u684C\u9762\u4E24\u7C7B\u5B9E\u8BAD\uFF0C\u5176\u4ED6\u7C7B\u578B\u5B9E\u8BAD\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u79C1\u5BC6\u7248\u672C\u5E93\u3002")),Pi.abrupt("break",11);case 11:if(!(!Gt&&Object(Ye.b)(kt,"\u4E0D\u80FD\u5F00\u542F/\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"))){Pi.next=13;break}return Pi.abrupt("return");case 13:l.a.confirm({title:Or,okText:fi,cancelText:bi,content:nr,onOk:function(){var Co;Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93",Or]),!Gt&&!(Ht!=null&&(Co=Ht.detail)!==null&&Co!==void 0&&Co.secret_repository)||Ma(kn)},onCancel:function(){var Co;!Gt&&!(Ht!=null&&(Co=Ht.detail)!==null&&Co!==void 0&&Co.secret_repository)&&Ma(kn)}});case 14:case"end":return Pi.stop()}},tn)}));return function(kn){return An.apply(this,arguments)}}(),Ma=function(){var An=Object(u.a)(M.a.mark(function tn(kn){return M.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(!Gt){nr.next=6;break}return nr.next=3,Object(Ve.r)(Object(O.a)({},pn));case 3:kt({type:"practiceSetting/getCommonData",payload:Object(O.a)({},pn)}),nr.next=8;break;case 6:return nr.next=8,Object(Ve.t)(Object(O.a)(Object(O.a)({},pn),{},{is_secret_repository:kn}));case 8:dr(),kt({type:"shixunsDetail/getShixunsDetail",payload:{id:pn.id}});case 10:case"end":return nr.stop()}},tn)}));return function(kn){return An.apply(this,arguments)}}(),Ho=function(tn){console.log(tn)},hi=function(){var An=Object(u.a)(M.a.mark(function tn(kn){var _n,nr,Or,fi,bi,Ji,Pi,zi,Co,Ea,Is;return M.a.wrap(function(xa){for(;;)switch(xa.prev=xa.next){case 0:if(console.log(kn),_n=kn.node.key,nr=kn.dragNode.key,Or=kn.node.pos.split("-"),fi=kn.dropPosition-Number(Or[Or.length-1]),!(kn.node.type!=="tree"||kn.dragNode.path.split("/").length===1)){xa.next=8;break}return h.b.warn("\u672A\u79FB\u52A8\u6587\u4EF6\u76EE\u5F55\u4F4D\u7F6E"),xa.abrupt("return");case 8:return xa.next=10,kt({type:"shixunsDetail/moveGitFile",payload:{id:pn.id,from:kn.dragNode.path,to:kn.node.path+"/"+kn.dragNode.name,message:"".concat(kn.dragNode.path," move to ").concat(kn.node.path+"/"+kn.dragNode.name," ")}});case 10:if(bi=xa.sent,!(bi.status===0)){xa.next=22;break}return Zn(""),Ji=kn.dragNode.path.split("/"),Ji.pop(),xa.next=17,dr(kn.node.path);case 17:return xa.next=19,dr(Ji.join("/"));case 19:return Ji.pop(),xa.next=22,dr(Ji.join("/"));case 22:return xa.abrupt("return");case 28:case"end":return xa.stop()}},tn)}));return function(kn){return An.apply(this,arguments)}}();return s.a.createElement("section",{className:_e.a.bg},s.a.createElement("div",{className:_e.a.contentbg},s.a.createElement("div",{className:_e.a.wrap},s.a.createElement(v.a,{className:_e.a.gitCode},s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:"iconfont icon-daimacangku2 mr8"}),Gt?"\u4EE3\u7801\u4ED3\u5E93":"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(y.a,null,s.a.createElement(U.a,{overlay:Jn({type:"topTree"}),className:"current"},s.a.createElement(x.a,{visible:Yi,title:s.a.createElement("div",{className:"font16"},s.a.createElement(bt.a,{style:{position:"relative",left:-35},onClick:function(){return Ai()}}),"\u70B9\u51FB\u6B64\u5904\u65B0\u5EFA\u6587\u4EF6\u3001\u65B0\u5EFA\u6587\u4EF6\u5939\u3001\u4E0A\u4F20\u6587\u4EF6\u3002",s.a.createElement("span",{onClick:function(){return Ai()},className:"iconfont icon-guanbi1 ml8 current font14"})),overlayClassName:_e.a.overlayClass,overlayStyle:{maxWidth:500},arrowPointAtCenter:!0,placement:"right",color:"#F7B500"})))),!!$t.length&&!Gt&&s.a.createElement("div",{className:"mt20 pl20 pr20 font14 c-white"},s.a.createElement("div",null,"\u5B9E\u8BAD\u8BC4\u6D4B\u7684\u65F6\u5019\uFF0C\u7CFB\u7EDF\u4F1A\u4E34\u65F6\u5C06\u79C1\u5BC6\u4EE3\u7801\u5E93\u79FB\u52A8\u666E\u901A\u4EE3\u7801\u5E93\u7684secret\u76EE\u5F55\u4E0B\u9762\uFF0C\u8BC4\u6D4B\u7ED3\u675F\u4F1A\u6E05\u7A7Asecret\u76EE\u5F55\u5185\u5BB9\u3002\u5982\u679C\u79C1\u5BC6\u4EE3\u7801\u5E93\u4E2D\u5B58\u5728\u6587\u4EF6src/test.sh\uFF0C\u5728\u666E\u901A\u4EE3\u7801\u5E93\u8C03\u7528\u8BE5\u6587\u4EF6\u5219\u4F7F\u7528\u8DEF\u5F84\uFF1Asecret/src/test.sh")),$t.length?s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:_e.a.content},s.a.createElement(He,{disabled:!!Xt.effects["shixunsDetail/getFileContent"],multiple:!0,showIcon:!1,treeData:$t,switcherIcon:s.a.createElement(Oe.a,{style:{fontWeight:"bold",fontSize:14,position:"relative",top:3,marginLeft:22}}),onExpand:di,expandedKeys:xr,selectedKeys:da,onSelect:ga,draggable:!0,onDragEnter:Ho,onDrop:hi,allowDrop:function(tn){var kn=tn.dropNode,_n=tn.dropPosition;return!1}}))):"",!$t.length&&Gt&&(Ht==null||((ht=Ht.detail)===null||ht===void 0)?void 0:ht.init_repository)&&s.a.createElement(xe,null),!$t.length&&!Gt&&(Ht==null||((Bt=Ht.detail)===null||Bt===void 0)?void 0:Bt.secret_repository)&&s.a.createElement(xe,null))),s.a.createElement(Fe,{taskData:Kt,visible:V,defaultPath:lr,onClose:function(){return J(!1)},isRepository:!Gt,onOK:function(){var An=Object(u.a)(M.a.mark(function tn(kn){var _n;return M.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return _n=lr.split("/"),_n.pop(),Or.next=4,dr(_n.join("/"));case 4:Zn("");case 5:case"end":return Or.stop()}},tn)}));return function(tn){return An.apply(this,arguments)}}()}),s.a.createElement(ae,{taskData:Kt,visible:ir,defaultPath:lr,onClose:function(){return Tr(!1)},isRepository:Gt,onOK:function(tn){Lr(tn.path,tn.name)}}),s.a.createElement(me,{taskData:Kt,visible:ue,defaultPath:lr,onClose:function(){return nt(!1)},isRepository:Gt,onOK:function(tn){Lr(tn.path,tn.name)}}),s.a.createElement(ge,{taskData:Kt,defaultPath:lr,visible:on,isRepository:Gt,onClose:function(){return Qt(!1)},onOK:function(){var An=Object(u.a)(M.a.mark(function tn(kn){var _n;return M.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return _n=lr.split("/"),Or.next=3,dr(lr);case 3:xr=[_n[0]||""],da=[lr],Fi(Object(k.a)(da)),qi(Object(k.a)(xr));case 7:case"end":return Or.stop()}},tn)}));return function(tn){return An.apply(this,arguments)}}()}),s.a.createElement(Me,{pathList:lr==null?void 0:lr.split("/"),showInputPath:!0,isMergeSelectFile:go,onFinish:function(tn){go?Ko(tn):dr(tn),So(!1)}}))},xe=function(){return s.a.createElement("div",{className:"mt20 pb50 ".concat(_e.a.nodata)},s.a.createElement("div",{className:_e.a.headLeft},"\u63D0\u793A\uFF1A",s.a.createElement("br",null),"\u6B64\u5904\u5B58\u653E\u672C\u5B9E\u8BAD\u6240\u9700\u7684\u6240\u6709\u4EE3\u7801\u7B49\u76F8\u5173\u6587\u4EF6\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B",s.a.createElement("br",null),"\u4E24\u79CD\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A",s.a.createElement("br",null),"1\u3001",s.a.createElement("a",{href:"/forums/2784",target:"_blank"},"Git\u5BA2\u6237\u7AEF")," ","\u4E0A\u4F20\u5DF2\u6709\u6587\u4EF6\u6765\u5F00\u59CB\u4F7F\u7528\u3002",s.a.createElement("br",null),"2\u3001\u76F4\u63A5\u5728\u5E73\u53F0\u4E0A\u521B\u5EFA\u6587\u4EF6\u76EE\u5F55\u4EE5\u53CA\u76F8\u5173\u4EE3\u7801\u6587\u4EF6\u3002"),s.a.createElement("img",{width:"100%",src:Ne.u}))},de=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.practiceSetting,Ht=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Ht,practiceSetting:Bt,loading:Et}})(ve),je=b("/zsF"),Qe=b("PArb"),ne=b("5GGG"),Ze=b.n(ne),lt=function(ze){var Et=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,mt=ze.dispatch,Xt=ze.isRepository,jt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository"]),Ut=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),kt=Object(g.useState)([]),Kt=Object(C.a)(kt,2),rn=Kt[0],Gt=Kt[1];Object(g.useEffect)(function(){$t()},[Xt]);var $t=function(){var Ln=Object(u.a)(M.a.mark(function pn(){var Dn;return M.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:return Sn.next=2,mt({type:"shixunsDetail/getRepositoryCommit",payload:{id:Ut.id,secret_repository:Xt?void 0:!0}});case 2:Dn=Sn.sent,Dn&&Gt(Dn.commits||[]);case 4:case"end":return Sn.stop()}},pn)}));return function(){return Ln.apply(this,arguments)}}();return s.a.createElement(s.a.Fragment,null,rn==""&&s.a.createElement("div",{className:Ze.a.empty},s.a.createElement("img",{src:Ne.k,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c font14"},"\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55")),rn!=""&&s.a.createElement("section",{className:Ze.a.bg},s.a.createElement("div",{className:Ze.a.wrap},s.a.createElement("div",{className:Ze.a.content},rn==null?void 0:rn.map(function(Ln){var pn,Dn;return s.a.createElement("div",null,s.a.createElement(v.a,{align:"middle",className:"c-white font16"},s.a.createElement(y.a,null,Ln.title)),s.a.createElement(v.a,{align:"middle",className:"mt20 "},s.a.createElement(y.a,null,s.a.createElement("img",{className:Ze.a.imageUrl,src:Q.a.IMG_SERVER+"/"+((pn=Ln.author)===null||pn===void 0?void 0:pn.image_url)})),s.a.createElement(y.a,{className:Ze.a.blueLight},s.a.createElement("span",{className:"ml20"},(Dn=Ln.author)===null||Dn===void 0?void 0:Dn.username)),s.a.createElement(y.a,null,s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},"\u63D0\u4EA4\u4E8E"),s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},Ln.time))),s.a.createElement(Qe.a,{className:Ze.a.divider}))})))))},Be=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,Et=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:Et.models.index}})(lt),$e=b("p5ED"),it=A.a.TabPane,wt=function(ze){var Et,ht,Bt,Ht,mt,Xt,jt=ze.globalSetting,Ut=ze.loading,kt=ze.dispatch,Kt=ze.practiceSetting,rn=ze.shixunsDetail,Gt=ze.taskData,$t=ze.taskId,Ln=ze.onEditRepCode,pn=Object(w.a)(ze,["globalSetting","loading","dispatch","practiceSetting","shixunsDetail","taskData","taskId","onEditRepCode"]),Dn=!(Gt!=null&&Gt.is_last_game)&&((Gt==null?void 0:Gt.shixun.status)>0||(Gt==null||((Et=Gt.user)===null||Et===void 0)?void 0:Et.identity)<5),sn=Object(g.useState)("1"),Sn=Object(C.a)(sn,2),Kn=Sn[0],Qn=Sn[1],Vt=Object(g.useState)("1"),wn=Object(C.a)(Vt,2),$n=wn[0],ir=wn[1],Tr=Object(g.useState)(!0),qn=Object(C.a)(Tr,2),ce=qn[0],V=qn[1],J=Object(g.useState)({}),ee=Object(C.a)(J,2),Te=ee[0],ue=ee[1],nt=Object(g.useRef)(),Lt=Object(g.useState)(!0),Yt=Object(C.a)(Lt,2),on=Yt[0],Qt=Yt[1],In=Object(g.useState)(["2","1"]),Gn=Object(C.a)(In,2),lr=Gn[0],Ar=Gn[1],vr=Object(g.useState)([]),ar=Object(C.a)(vr,2),xr=ar[0],qi=ar[1],Gr=Object(g.useRef)(),ai=Object(O.a)(Object(O.a)({},Object(z.i)()),{},{taskId:$t}),da=Object(g.useState)(!1),Fi=Object(C.a)(da,2),ia=Fi[0],Ca=Fi[1],po=[{id:"1",name:"\u4EE3\u7801\u4ED3\u5E93"},{id:"2",name:s.a.createElement("span",null,s.a.createElement("span",null,"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(x.a,{title:"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002"},s.a.createElement("i",{className:"iconfont icon-xiaowenhao",style:{marginLeft:2,fontSize:14}})))}];Object(g.useEffect)(function(){var Nr,Qr=Kt==null||((Nr=Kt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath.split("/");Ar(Qr)},[Kt==null||((ht=Kt.sideBar)===null||ht===void 0)?void 0:ht.selectPath]);var so=function(Qr){Qr.data==="compileResltDone"&&Ca(!1)};Object(g.useEffect)(function(){return window.addEventListener("message",so),function(){window.removeEventListener("message",so)}},[]);var xo=function(Qr){(Te==null?void 0:Te.file_type)==="txt"&&(Te.content=Qr,ue(Object(O.a)({},Te)),Ln(Qr))};Object(g.useEffect)(function(){var Nr;console.log(Kt==null||((Nr=Kt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath,"sideBar"),new Promise(function(){var Qr=Object(u.a)(M.a.mark(function yi(Fr,wr){var ei,_r,oi,or,Wi,Mi,$i;return M.a.wrap(function(Qi){for(;;)switch(Qi.prev=Qi.next){case 0:if(!((Kt==null||((ei=Kt.sideBar)===null||ei===void 0)?void 0:ei.selectPath)!==""&&Kt!==null&&Kt!==void 0&&(_r=Kt.sideBar)!==null&&_r!==void 0&&_r.selectPath)){Qi.next=5;break}return Qi.next=3,Object(Z.j)($t,{path:Kt==null||((oi=Kt.sideBar)===null||oi===void 0)?void 0:oi.selectPath});case 3:if(or=Qi.sent,or!=null&&or.content||(or==null?void 0:or.content)=="")try{(or==null?void 0:or.file_type)==="txt"?(or.content=window.decodeURIComponent(escape(window.atob((Wi=or.content)===null||Wi===void 0?void 0:Wi.content))),ue(Object(O.a)({},or))):(or.content=(Mi=or.content)===null||Mi===void 0?void 0:Mi.content,ue(Object(O.a)({},or)))}catch(Ka){Te.content&&(or.content=window.atob(($i=or.content)===null||$i===void 0?void 0:$i.content)),ue(Object(O.a)({},or)),h.b.warn("\u8BF7\u786E\u8BA4\u6587\u4EF6\u5B57\u7B26\u96C6\u7F16\u7801\u662F\u5426\u4E3AUTF-8")}else kt({type:"practiceSetting/setSideBarTabs",payload:{selectPath:""}});case 5:case"end":return Qi.stop()}},yi)}));return function(yi,Fr){return Qr.apply(this,arguments)}}())},[Kt==null||((Bt=Kt.sideBar)===null||Bt===void 0)?void 0:Bt.selectPath]);var ka=s.a.createElement(d.a,{className:P.a.menu,onClick:function(Qr){var yi;!(rn!=null&&(yi=rn.detail)!==null&&yi!==void 0&&yi.secret_repository)&&Qr.key==="2"&&ir("1"),Qn(Qr.key),Qr.key==="1"?Qt(!0):Qt(!1)}},s.a.createElement(d.a.Item,{disabled:!0,key:"0"},"\u5207\u6362\u4ED3\u5E93"),po.filter(function(Nr){var Qr,yi;return!(rn!=null&&(Qr=rn.detail)!==null&&Qr!==void 0&&Qr.init_repository)||rn!=null&&(yi=rn.detail)!==null&&yi!==void 0&&yi.is_jupyter_lab?Nr.id!=="2":Nr}).map(function(Nr,Qr){return s.a.createElement(d.a.Item,{className:"leaveClick",key:Nr.id},Nr.name)})),Yi=function(){var Nr=Object(u.a)(M.a.mark(function Qr(){var yi,Fr,wr,ei,_r,oi;return M.a.wrap(function(Wi){for(;;)switch(Wi.prev=Wi.next){case 0:return Ca(!0),Wi.next=3,Object(Z.L)(Gt==null||((yi=Gt.myshixun)===null||yi===void 0)?void 0:yi.identifier,Object(O.a)(Object(O.a)({path:Kt==null||((Fr=Kt.sideBar)===null||Fr===void 0)?void 0:Fr.selectPath},Te),{},{evaluate:0,game_id:Gt==null||((wr=Gt.game)===null||wr===void 0)?void 0:wr.id}));case 3:oi=Wi.sent,(ei=document.getElementById("latexIframeRef"))===null||ei===void 0||((_r=ei.contentWindow)===null||_r===void 0)||_r.postMessage("compile","*"),oi!=null&&oi.content&&kt({type:"practiceSetting/setSideBarTabs",payload:Object(O.a)(Object(O.a)({},Kt.sideBar),{},{confirmLeave:!1})});case 6:case"end":return Wi.stop()}},Qr)}));return function(){return Nr.apply(this,arguments)}}();return s.a.createElement("div",{className:P.a.warehouse},s.a.createElement("div",{className:P.a.content},$n==="1"&&s.a.createElement(s.a.Fragment,null,s.a.createElement("aside",{className:P.a.left,id:"latex-drawer",style:{width:ce?"36%":"0%"}},s.a.createElement(a.a,{spinning:!!Ut.effects["shixunsDetail/getRepository"],wrapperClassName:"".concat(P.a.loading," ").concat(P.a.bottom0)},s.a.createElement(de,{taskData:Gt,params:ai,setTreeData:qi,treeData:xr,activeKey:Kn,isRepository:on})),s.a.createElement("span",{onClick:function(){return V(!1)},className:"".concat(P.a.close," iconfont icon-quxiao")})),s.a.createElement("aside",{className:P.a.right,ref:Gr},(Kt==null||((Ht=Kt.sideBar)===null||Ht===void 0)?void 0:Ht.selectPath)!==""&&s.a.createElement(s.a.Fragment,null,s.a.createElement(a.a,{spinning:!!Ut.effects["shixunsDetail/getFileContent"],wrapperClassName:P.a.loading},s.a.createElement("div",{className:P.a.filePathWrp},s.a.createElement(v.a,{align:"middle",className:"w100"},s.a.createElement(y.a,null,s.a.createElement("span",{onClick:function(){return V(!0)},className:"iconfont icon-daimacangku2 c-white current"})),s.a.createElement(y.a,{flex:"40px"},s.a.createElement("div",{className:P.a.line,style:{marginLeft:20}})),s.a.createElement(y.a,{className:P.a.filePath},lr.map(function(Nr,Qr){return s.a.createElement("span",{className:"c-blue"},Nr)})))),s.a.createElement("div",{className:Ut.effects["shixunsDetail/getFileContent"]?"hide":"show"},s.a.createElement($e.a,{className:"darkBlue",style:{top:66,height:"calc(100% - 60px)",position:"absolute"},filename:Te.filename,type:Te.file_type==="office"?"download":Te.file_type,data:Te.content,monacoEditor:{value:Te.content,language:Te.language,onChange:function(Qr){return xo(Qr)},options:{fontSize:14,minimap:{enabled:!1}}}}))),(Te==null?void 0:Te.file_type)==="txt"&&s.a.createElement("div",{className:P.a.footer},(Gt==null?void 0:Gt.prev_game)&&s.a.createElement("a",{href:"/tasks/".concat(Gt==null?void 0:Gt.prev_game).concat(location.search),style:{marginRight:"auto"},onClick:function(Qr){Qr.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(Gt==null?void 0:Gt.prev_game).concat(location.search)},300)}},"\u4E0A\u4E00\u5173"),s.a.createElement(i.a,{type:"primary",size:"large",loading:ia,onClick:Yi},"\u5F00\u59CB\u7F16\u8BD1"),Dn&&s.a.createElement("a",{href:"/tasks/".concat(Gt==null?void 0:Gt.next_game).concat(location.search),style:{marginLeft:"auto"},onClick:function(Qr){var yi,Fr;if(Qr.preventDefault(),Gt!=null&&(yi=Gt.shixun)!==null&&yi!==void 0&&yi.task_pass||(Gt==null?void 0:Gt.game.status)===2||(Gt==null||((Fr=Gt.user)===null||Fr===void 0)?void 0:Fr.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(Gt==null?void 0:Gt.next_game).concat(location.search)},300);return}l.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:s.a.createElement("p",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002")})}},"\u4E0B\u4E00\u5173"))),(Kt==null||((mt=Kt.sideBar)===null||mt===void 0)?void 0:mt.selectPath)==""&&(rn==null||((Xt=rn.detail)===null||Xt===void 0)?void 0:Xt.init_repository)&&s.a.createElement("div",{className:P.a.empty},s.a.createElement("img",{src:Ne.j,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c"},!!(xr!=null&&xr.length)&&"\u5728\u5DE6\u4FA7\u4EE3\u7801\u4ED3\u5E93\u533A\u57DF\u70B9\u51FB\u76EE\u5F55\u6253\u5F00\u6587\u4EF6",!(xr!=null&&xr.length)&&"\u8BF7\u5148\u5728\u5DE6\u4FA7\u4E0A\u4F20\u6587\u4EF6\u6216\u65B0\u5EFA\u6587\u4EF6\uFF01")))),$n==="2"&&s.a.createElement("div",{className:P.a.commit},s.a.createElement(Be,{isRepository:on}))))},pt=Object(X.a)(function(Pe){var ze=Pe.loading,Et=Pe.globalSetting,ht=Pe.practiceSetting,Bt=Pe.shixunsDetail;return{globalSetting:Et,loading:ze,practiceSetting:ht,shixunsDetail:Bt}})(wt),st=H.default=function(Pe){var ze=Pe.taskId,Et=Pe.taskData,ht=Pe.onEditRepCode,Bt=Object(g.useRef)(),Ht=Object(g.useRef)(),mt=Object(g.useMemo)(function(){if(Et){var Xt,jt,Ut,kt,Kt,rn=Et==null||((Xt=Et.challenge)===null||Xt===void 0||((jt=Xt.path)===null||jt===void 0||((Ut=jt.replace("\uFF1B",";"))===null||Ut===void 0)))?void 0:Ut.split(";")[0];return"https://latexjs.educoder.net/index.html?id=".concat(Et==null||((kt=Et.shixun)===null||kt===void 0)?void 0:kt.identifier,"&path=").concat(rn,"&taskId=").concat(ze,"&myshixunId=").concat(Et==null||((Kt=Et.myshixun)===null||Kt===void 0)?void 0:Kt.identifier,"&token=").concat(Object(p.F)("_educoder_session"))}},[Et]);return s.a.createElement(v.a,{style:{height:"100vh"},ref:Ht},s.a.createElement(y.a,{flex:"1"},(Et==null?void 0:Et.shixun)&&s.a.createElement(pt,{taskId:ze,taskData:Et,onEditRepCode:ht})),s.a.createElement(y.a,{flex:"1",className:o.a.wrap},s.a.createElement("iframe",{ref:Bt,id:"latexIframeRef",style:{width:"100%",border:"none",height:"100%"},src:mt}),s.a.createElement("span",{className:o.a.full,onClick:function(){Object(_.a)()?Object(_.b)():Object(_.d)(Ht.current)}},s.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F")))}},"4qgm":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"500L":function(j,H,b){"use strict";b.d(H,"a",function(){return E});var I=b("+L6B"),v=b("2/Rp"),T=b("2qtc"),y=b("kLXV"),g=b("9og8"),s=b("k1fw"),_=b("miYZ"),p=b("tsqr"),e=b("oBTY"),o=b("tJVT"),n=b("DZo9"),l=b("8z0m"),r=b("WmNS"),i=b.n(r),t=b("q1tI"),a=b.n(t),c=b("m3rI"),d=b("wzkS"),f=b("y5JW"),h=b("LtfV"),u=l.a.Dragger;function E(x){var O=[];return x&&x.length>0&&(O=x.map(function(C){return{uid:C.id,id:C.id,name:C.title+f.c+C.filesize,url:C.url,filesize:C.filesize,status:"done",response:{id:C.id}}})),O}H.b=function(x){var O=x.value,C=x.onChange,w=x.action,S=x.className,A=x.maxSize,D=A===void 0?150:A,M=x.title,N=M===void 0?"\u4E0A\u4F20\u9644\u4EF6":M,P=x.showRemoveModal,z=P===void 0?!1:P,X=x.accept,k=X===void 0?"":X,F=x.additionalText,U=x.isDragger,L=x.number,B=L===void 0?1e3:L,Z=x.aloneClear,re=Z===void 0?!1:Z,he=Object(t.useState)(!1),Se=Object(o.a)(he,2),ke=Se[0],te=Se[1],Re=Object(t.useState)(O||[]),Ce=Object(o.a)(Re,2),pe=Ce[0],me=Ce[1];Object(t.useEffect)(function(){O&&(me(Object(e.a)(O)),B===(O==null?void 0:O.length)&&te(!0))},[O]);var se=function(){setTimeout(function(){pe.pop(),me(Object(e.a)(pe))},500)},be={multiple:!0,disabled:ke,accept:k,withCredentials:!0,fileList:pe,beforeUpload:function(Fe,ie){var q=Fe.size/1024/1024;return pe.concat(ie).length>B?(pe.pop(),me(Object(e.a)(pe)),p.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(B,"\u4E2A\u6587\u4EF6")),re?Promise.reject():(se(),!1)):!0},action:w||"".concat(c.a.API_SERVER,"/api/attachments.json"),onChange:function(Fe){var ie,q,Q=Object(e.a)(Fe.fileList);if(Fe.file.status==="done"&&((ie=Fe.file)===null||ie===void 0||((q=ie.response)===null||q===void 0)?void 0:q.status)===-1){var Y,oe;p.b.error((Y=Fe.file)===null||Y===void 0||((oe=Y.response)===null||oe===void 0)?void 0:oe.message);return}Q.length>=B?te(!0):te(!1),me(Object(e.a)(Q)),Q=Q.map(function(le){var Ee;if(le!=null&&(Ee=le.response)!==null&&Ee!==void 0&&Ee.id){var Le;le.url="/api/attachments/".concat(le==null||((Le=le.response)===null||Le===void 0)?void 0:Le.id)}return le.name.indexOf(f.c)===-1&&(le.name="".concat(le.name).concat(f.c).concat(Object(f.a)(le.size))),Object(s.a)({},le)}),console.log("info:",Fe),C(Q)},onRemove:function(){var fe=Object(g.a)(i.a.mark(function ie(q){var Q;return i.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(Q=function(){var le=Object(g.a)(i.a.mark(function Ee(){var Le,ge;return i.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(Le=q.response?q.response.id:q.id,!Le){_e.next=8;break}return _e.next=4,Object(d.d)(q.response?q.response.id:q.uid);case 4:return ge=_e.sent,_e.abrupt("return",ge);case 8:return _e.abrupt("return",!0);case 9:case"end":return _e.stop()}},Ee)}));return function(){return le.apply(this,arguments)}}(),!z){oe.next=5;break}return oe.abrupt("return",new Promise(function(le,Ee){y.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:a.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Le=Object(g.a)(i.a.mark(function De(){var _e;return i.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,Q();case 2:_e=tt.sent,p.b.success("\u5220\u9664\u6210\u529F"),le(!0);case 5:case"end":return tt.stop()}},De)}));function ge(){return Le.apply(this,arguments)}return ge}(),onCancel:function(){return le(!1)}})}));case 5:return oe.next=7,Q();case 7:return oe.abrupt("return",oe.sent);case 8:case"end":return oe.stop()}},ie)}));function Fe(ie){return fe.apply(this,arguments)}return Fe}()};function ae(fe){fe.preventDefault(),fe.stopPropagation()}return a.a.createElement("div",{className:"multi-upload ".concat(S||"")},U&&a.a.createElement(u,be,a.a.createElement("p",{className:"ant-upload-drag-icon"},a.a.createElement(h.a,null)),a.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",a.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",D,"MB)"," "),F),!U&&a.a.createElement(l.a,be,a.a.createElement(v.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:a.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:ke},N),a.a.createElement("span",{onClick:ae,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",D,"MB)"," ")))}},"55Ip":function(j,H,b){"use strict";b.d(H,"a",function(){return f});var I=b("Ty5D"),v=b("dI71"),T=b("q1tI"),y=b.n(T),g=b("YS25"),s=b("17x9"),_=b.n(s),p=b("wx14"),e=b("zLVn"),o=b("9R94"),n=function(S){Object(v.a)(A,S);function A(){for(var M,N=arguments.length,P=new Array(N),z=0;z>>24)&16711935|(h<<24|h>>>8)&4278255360,u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360;var E=c[f];E.high^=u,E.low^=h}for(var x=0;x<24;x++){for(var O=0;O<5;O++){for(var C=0,w=0,S=0;S<5;S++){var E=c[O+5*S];C^=E.high,w^=E.low}var A=r[O];A.high=C,A.low=w}for(var O=0;O<5;O++)for(var D=r[(O+4)%5],M=r[(O+1)%5],N=M.high,P=M.low,C=D.high^(N<<1|P>>>31),w=D.low^(P<<1|N>>>31),S=0;S<5;S++){var E=c[O+5*S];E.high^=C,E.low^=w}for(var z=1;z<25;z++){var C,w,E=c[z],X=E.high,k=E.low,F=o[z];F<32?(C=X<>>32-F,w=k<>>32-F):(C=k<>>64-F,w=X<>>64-F);var U=r[n[z]];U.high=C,U.low=w}var L=r[0],B=c[0];L.high=B.high,L.low=B.low;for(var O=0;O<5;O++)for(var S=0;S<5;S++){var z=O+5*S,E=c[z],Z=r[z],re=r[(O+1)%5+5*S],he=r[(O+2)%5+5*S];E.high=Z.high^~re.high&he.high,E.low=Z.low^~re.low&he.low}var E=c[0],Se=l[x];E.high^=Se.high,E.low^=Se.low}},_doFinalize:function(){var t=this._data,a=t.words,c=this._nDataBytes*8,d=t.sigBytes*8,f=this.blockSize*32;a[d>>>5]|=1<<24-d%32,a[(v.ceil((d+1)/f)*f>>>5)-1]|=128,t.sigBytes=a.length*4,this._process();for(var h=this._state,u=this.cfg.outputLength/8,E=u/8,x=[],O=0;O>>24)&16711935|(w<<24|w>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,x.push(S),x.push(w)}return new g.init(x,u)},clone:function(){for(var t=s.clone.call(this),a=t._state=this._state.slice(0),c=0;c<25;c++)a[c]=a[c].clone();return t}});T.SHA3=s._createHelper(i),T.HmacSHA3=s._createHmacHelper(i)}(Math),I.SHA3})},"5nXd":function(j,H,b){var I=b("MFOe"),v=I.slice,T=I.pluck,y=I.each,g=I.bind,s=I.create,_=I.isList,p=I.isFunction,e=I.isObject;j.exports={createStore:l};var o={version:"2.0.12",enabled:!1,get:function(r,i){var t=this.storage.read(this._namespacePrefix+r);return this._deserialize(t,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(t,a){r.call(i,i._deserialize(t),(a||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function n(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,t){t||(t=""),r&&!_(r)&&(r=[r]),i&&!_(i)&&(i=[i]);var a=t?"__storejs_"+t+"_":"",c=t?new RegExp("^"+a):null,d=/^[a-zA-Z0-9_\-]*$/;if(!d.test(t))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var f={_namespacePrefix:a,_namespaceRegexp:c,_testStorage:function(u){try{var E="__storejs__test__";u.write(E,E);var x=u.read(E)===E;return u.remove(E),x}catch(O){return!1}},_assignPluginFnProp:function(u,E){var x=this[E];this[E]=function(){var C=v(arguments,0),w=this;function S(){return x?(y(arguments,function(D,M){C[M]=D}),x.apply(w,C)):void 0}var A=[S].concat(C);return u.apply(w,A)}},_serialize:function(u){return JSON.stringify(u)},_deserialize:function(u,E){if(!u)return E;var x="";try{x=JSON.parse(u)}catch(O){x=u}return x!==void 0?x:E},_addStorage:function(u){if(this.enabled)return;this._testStorage(u)&&(this.storage=u,this.enabled=!0)},_addPlugin:function(u){var E=this;if(_(u)){y(u,function(C){E._addPlugin(C)});return}var x=T(this.plugins,function(C){return u===C});if(x)return;if(this.plugins.push(u),!p(u))throw new Error("Plugins must be function values that return objects");var O=u.call(this);if(!e(O))throw new Error("Plugins must return an object of function properties");y(O,function(C,w){if(!p(C))throw new Error("Bad plugin property: "+w+" from plugin "+u.name+". Plugins should only return functions.");E._assignPluginFnProp(C,w)})},addStorage:function(u){n("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(u)}},h=s(f,o,{plugins:[]});return h.raw={},y(h,function(u,E){p(u)&&(h.raw[E]=g(h,u))}),y(r,function(u){h._addStorage(u)}),y(i,function(u){h._addPlugin(u)}),h}},"6+eU":function(j,H,b){"use strict";b.d(H,"a",function(){return x});var I=b("wx14"),v=b("rePB"),T=b("VTBJ"),y=b("1OyB"),g=b("vuIU"),s=b("Ji7U"),_=b("LK+K"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=function(C){var w,S="".concat(C.rootPrefixCls,"-item"),A=n()(S,"".concat(S,"-").concat(C.page),(w={},Object(v.a)(w,"".concat(S,"-active"),C.active),Object(v.a)(w,C.className,!!C.className),Object(v.a)(w,"".concat(S,"-disabled"),!C.page),w)),D=function(){C.onClick(C.page)},M=function(P){C.onKeyPress(P,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:A,onClick:D,onKeyPress:M,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},t=function(O){Object(s.a)(w,O);var C=Object(_.a)(w);function w(){var S;Object(y.a)(this,w);for(var A=arguments.length,D=new Array(A),M=0;M=0||N.relatedTarget.className.indexOf("".concat(k,"-next"))>=0))return;S.setState({goInputText:""}),X(S.getValidValue())},S.go=function(N){var P=S.state.goInputText;if(P==="")return;(N.keyCode===i.ENTER||N.type==="click")&&(S.setState({goInputText:""}),S.props.quickGo(S.getValidValue()))},S}return Object(g.a)(w,[{key:"getValidValue",value:function(){var A=this.state,D=A.goInputText,M=A.current;return!D||isNaN(D)?M:Number(D)}},{key:"getPageSizeOptions",value:function(){var A=this.props,D=A.pageSize,M=A.pageSizeOptions;return M.some(function(N){return N.toString()===D.toString()})?M:M.concat([D.toString()]).sort(function(N,P){var z=isNaN(Number(N))?0:Number(N),X=isNaN(Number(P))?0:Number(P);return z-X})}},{key:"render",value:function(){var A=this,D=this.props,M=D.pageSize,N=D.locale,P=D.rootPrefixCls,z=D.changeSize,X=D.quickGo,k=D.goButton,F=D.selectComponentClass,U=D.buildOptionText,L=D.selectPrefixCls,B=D.disabled,Z=this.state.goInputText,re="".concat(P,"-options"),he=F,Se=null,ke=null,te=null;if(!z&&!X)return null;var Re=this.getPageSizeOptions();if(z&&he){var Ce=Re.map(function(pe,me){return e.a.createElement(he.Option,{key:me,value:pe.toString()},(U||A.buildOptionText)(pe))});Se=e.a.createElement(he,{disabled:B,prefixCls:L,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(me){return me.parentNode}},Ce)}return X&&(k&&(te=typeof k=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:B,className:"".concat(re,"-quick-jumper-button")},N.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},k)),ke=e.a.createElement("div",{className:"".concat(re,"-quick-jumper")},N.jump_to,e.a.createElement("input",{disabled:B,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,te)),e.a.createElement("li",{className:"".concat(re)},Se,ke)}}]),w}(e.a.Component);t.defaultProps={pageSizeOptions:["10","20","50","100"]};var a=t,c=b("N2Kk");function d(){}function f(O){return typeof O=="number"&&isFinite(O)&&Math.floor(O)===O}function h(O,C,w){return w}function u(O,C,w){var S=typeof O=="undefined"?C.pageSize:O;return Math.floor((w.total-1)/S)+1}var E=function(O){Object(s.a)(w,O);var C=Object(_.a)(w);function w(S){var A;Object(y.a)(this,w),A=C.call(this,S),A.getJumpPrevPage=function(){return Math.max(1,A.state.current-(A.props.showLessItems?3:5))},A.getJumpNextPage=function(){return Math.min(u(void 0,A.state,A.props),A.state.current+(A.props.showLessItems?3:5))},A.getItemIcon=function(z,X){var k=A.props.prefixCls,F=z||e.a.createElement("button",{type:"button","aria-label":X,className:"".concat(k,"-item-link")});return typeof z=="function"&&(F=e.a.createElement(z,Object(T.a)({},A.props))),F},A.savePaginationNode=function(z){A.paginationNode=z},A.isValid=function(z){return f(z)&&z!==A.state.current},A.shouldDisplayQuickJumper=function(){var z=A.props,X=z.showQuickJumper,k=z.pageSize,F=z.total;return F<=k?!1:X},A.handleKeyDown=function(z){(z.keyCode===i.ARROW_UP||z.keyCode===i.ARROW_DOWN)&&z.preventDefault()},A.handleKeyUp=function(z){var X=A.getValidValue(z),k=A.state.currentInputValue;X!==k&&A.setState({currentInputValue:X}),z.keyCode===i.ENTER?A.handleChange(X):z.keyCode===i.ARROW_UP?A.handleChange(X-1):z.keyCode===i.ARROW_DOWN&&A.handleChange(X+1)},A.changePageSize=function(z){var X=A.state.current,k=u(z,A.state,A.props);X=X>k?k:X,k===0&&(X=A.state.current),typeof z=="number"&&("pageSize"in A.props||A.setState({pageSize:z}),"current"in A.props||A.setState({current:X,currentInputValue:X})),A.props.onShowSizeChange(X,z),"onChange"in A.props&&A.props.onChange&&A.props.onChange(X,z)},A.handleChange=function(z){var X=A.props.disabled,k=z;if(A.isValid(k)&&!X){var F=u(void 0,A.state,A.props);k>F?k=F:k<1&&(k=1),"current"in A.props||A.setState({current:k,currentInputValue:k});var U=A.state.pageSize;return A.props.onChange(k,U),k}return A.state.current},A.prev=function(){A.hasPrev()&&A.handleChange(A.state.current-1)},A.next=function(){A.hasNext()&&A.handleChange(A.state.current+1)},A.jumpPrev=function(){A.handleChange(A.getJumpPrevPage())},A.jumpNext=function(){A.handleChange(A.getJumpNextPage())},A.hasPrev=function(){return A.state.current>1},A.hasNext=function(){return A.state.current2?k-2:0),U=2;U=M?P=M:P=Number(D),P}},{key:"getShowSizeChanger",value:function(){var A=this.props,D=A.showSizeChanger,M=A.total,N=A.totalBoundaryShowSizeChanger;return typeof D!="undefined"?D:M>N}},{key:"renderPrev",value:function(A){var D=this.props,M=D.prevIcon,N=D.itemRender,P=N(A,"prev",this.getItemIcon(M,"prev page")),z=!this.hasPrev();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"renderNext",value:function(A){var D=this.props,M=D.nextIcon,N=D.itemRender,P=N(A,"next",this.getItemIcon(M,"next page")),z=!this.hasNext();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"render",value:function(){var A=this,D=this.props,M=D.prefixCls,N=D.className,P=D.style,z=D.disabled,X=D.hideOnSinglePage,k=D.total,F=D.locale,U=D.showQuickJumper,L=D.showLessItems,B=D.showTitle,Z=D.showTotal,re=D.simple,he=D.itemRender,Se=D.showPrevNextJumpers,ke=D.jumpPrevIcon,te=D.jumpNextIcon,Re=D.selectComponentClass,Ce=D.selectPrefixCls,pe=D.pageSizeOptions,me=this.state,se=me.current,be=me.pageSize,ae=me.currentInputValue;if(X===!0&&k<=be)return null;var fe=u(void 0,this.state,this.props),Fe=[],ie=null,q=null,Q=null,Y=null,oe=null,le=U&&U.goButton,Ee=L?1:2,Le=se-1>0?se-1:0,ge=se+1=Ee*2&&se!==1+2&&(Fe[0]=Object(p.cloneElement)(Fe[0],{className:"".concat(M,"-item-after-jump-prev")}),Fe.unshift(ie)),fe-se>=Ee*2&&se!==fe-2&&(Fe[Fe.length-1]=Object(p.cloneElement)(Fe[Fe.length-1],{className:"".concat(M,"-item-before-jump-next")}),Fe.push(q)),bt!==1&&Fe.unshift(Q),Oe!==fe&&Fe.push(Y)}var Ye=null;Z&&(Ye=e.a.createElement("li",{className:"".concat(M,"-total-text")},Z(k,[k===0?0:(se-1)*be+1,se*be>k?k:se*be])));var Ne=!this.hasPrev()||!fe,He=!this.hasNext()||!fe;return e.a.createElement("ul",Object(I.a)({className:n()(M,N,Object(v.a)({},"".concat(M,"-disabled"),z)),style:P,unselectable:"unselectable",ref:this.savePaginationNode},De),Ye,e.a.createElement("li",{title:B?F.prev_page:null,onClick:this.prev,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(v.a)({},"".concat(M,"-disabled"),Ne)),"aria-disabled":Ne},this.renderPrev(Le)),Fe,e.a.createElement("li",{title:B?F.next_page:null,onClick:this.next,tabIndex:He?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(v.a)({},"".concat(M,"-disabled"),He)),"aria-disabled":He},this.renderNext(ge)),e.a.createElement(a,{disabled:z,locale:F,rootPrefixCls:M,selectComponentClass:Re,selectPrefixCls:Ce,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:se,pageSize:be,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:le}))}}],[{key:"getDerivedStateFromProps",value:function(A,D){var M={};if("current"in A&&(M.current=A.current,A.current!==D.current&&(M.currentInputValue=M.current)),"pageSize"in A&&A.pageSize!==D.pageSize){var N=D.current,P=u(A.pageSize,D,A);N=N>P?P:N,"current"in A||(M.current=N,M.currentInputValue=N),M.pageSize=A.pageSize}return M}}]),w}(e.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:d,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:d,locale:c.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var x=E},"6/vW":function(j,H,b){"use strict";b.d(H,"b",function(){return _});var I=b("tJVT"),v=b("q1tI"),T=b.n(v),y=b("9VGf"),g=b("dhSg");function s(p){return p.toString().padStart(2,"0")}function _(p){var e=Math.floor(p/60),o=p%60,n=Math.floor(e/60);return"".concat(s(n),":").concat(s(e-n*60),":").concat(s(o))}H.a=function(p){var e=p.defaultTime,o=p.status,n=p.onUpdateCostTime,l=p.lastedGetTaskInfoTime,r=p.title,i=r===void 0?"":r,t=Object(v.useState)(e||0),a=Object(I.a)(t,2),c=a[0],d=a[1],f=Object(v.useRef)();return Object(v.useEffect)(function(){l&&(d(e),f.current=e)},[e,l]),Object(v.useEffect)(function(){if(l){var h=g.a.subscribe("update-cost-time",function(){o!==2&&n(f.current)});return h}},[l]),Object(y.a)(function(){d(c+1),f.current=f.current+1},o===2?null:1e3),T.a.createElement("span",null,i?"".concat(i,"\uFF1A"):null,_(c))}},"6BzB":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.shrinkBuf=I,H.arraySet=v,H.flattenChunks=T,H.Buf32=H.Buf16=H.Buf8=void 0;function I(_,p){return _.length===p?_:_.subarray?_.subarray(0,p):(_.length=p,_)}function v(_,p,e,o,n){if(p.subarray&&_.subarray){_.set(p.subarray(e,e+o),n);return}for(var l=0;l64&&(v.Warn("Bad payload length ("+De+") in fence response"),De=64);var _e=this._sock.rQshiftStr(De);return this._supportsFence=!0,ge&1<<31?(ge&=1<<0|1<<1,Ee.messages.clientFence(this._sock,ge,_e),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var ge=this._sock.rQshift8(),De=this._sock.rQshift8();switch(De){case 0:v.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=ge,v.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+De+")");break}return!0}},{key:"_normalMsg",value:function(){var ge;this._FBU.rects>0?ge=0:ge=this._sock.rQshift8();var De,_e;switch(ge){case 0:return _e=this._framebufferUpdate(),_e&&!this._enabledContinuousUpdates&&Ee.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),_e;case 1:return this._handleSetColourMapMsg();case 2:return v.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return De=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,De&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),v.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+ge+")"),v.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var ge=this._sock.rQshiftBytes(12);this._FBU.x=(ge[0]<<8)+ge[1],this._FBU.y=(ge[2]<<8)+ge[3],this._FBU.width=(ge[4]<<8)+ge[5],this._FBU.height=(ge[6]<<8)+ge[7],this._FBU.encoding=parseInt((ge[8]<<24)+(ge[9]<<16)+(ge[10]<<8)+ge[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case d.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case d.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case d.encodings.pseudoEncodingCursor:return this._handleCursor();case d.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var ge=document.createEvent("keyboardEvent");ge.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(De){}return!0;case d.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case d.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case d.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var tt=this._sock.rQshift8();this._sock.rQshift8();var Ge,Me=4;if(tt==0){var Et=4294967040|0;if(Ge=new Array(_e*Xe*Me),this._sock.rQwait("VMware cursor classic encoding",_e*Xe*Me*2,2))return!1;for(var Oe=new Array(_e*Xe),Ve=0;Ve<_e*Xe;Ve++)Oe[Ve]=this._sock.rQshift32();for(var Je=new Array(_e*Xe),Ye=0;Ye<_e*Xe;Ye++)Je[Ye]=this._sock.rQshift32();for(var Ne=0;Ne<_e*Xe;Ne++)if(Oe[Ne]==0){var He=Je[Ne],ve=He>>8&255,xe=He>>16&255,de=He>>24&255;Ge[Ne*Me]=ve,Ge[Ne*Me+1]=xe,Ge[Ne*Me+2]=de,Ge[Ne*Me+3]=255}else(Oe[Ne]&Et)==Et?Je[Ne]==0?(Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=0):((Je[Ne]&Et)==Et,Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=255):(Ge[Ne*Me]=0,Ge[Ne*Me+1]=0,Ge[Ne*Me+2]=0,Ge[Ne*Me+3]=255)}else if(tt==1){if(this._sock.rQwait("VMware cursor alpha encoding",_e*Xe*4,2))return!1;Ge=new Array(_e*Xe*Me);for(var je=0;je<_e*Xe;je++){var Qe=this._sock.rQshift32();Ge[je*4]=Qe>>24&255,Ge[je*4+1]=Qe>>16&255,Ge[je*4+2]=Qe>>8&255,Ge[je*4+3]=Qe&255}}else return v.Warn("The given cursor type is not supported: "+tt+" given."),!1;return this._updateCursor(Ge,ge,De,_e,Xe),!0}},{key:"_handleCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height,tt=_e*Xe*4,Ge=Math.ceil(_e/8)*Xe,Me=tt+Ge;if(this._sock.rQwait("cursor encoding",Me))return!1;for(var Et=this._sock.rQshiftBytes(tt),Oe=this._sock.rQshiftBytes(Ge),Ve=new Uint8Array(_e*Xe*4),Je=0,Ye=0;Ye9){v.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===ge)return;this._qualityLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(ge){if(!Number.isInteger(ge)||ge<0||ge>9){v.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===ge)return;this._compressionLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(ge,De){var _e=ge.split("").map(function(Xe){return Xe.charCodeAt(0)});return new t.default(_e).encrypt(De)}}]),Ee}(_.default);H.default=Y,Y.messages={keyEvent:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=4,ge[De+1]=Le,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee,le._sQlen+=8,le.flush()},QEMUExtendedKeyEvent:function(le,Ee,Le,ge){function De(Ge){var Me=ge>>8,Et=ge&255;return Me===224&&Et<127?Et|128:Ge}var _e=le._sQ,Xe=le._sQlen;_e[Xe]=255,_e[Xe+1]=0,_e[Xe+2]=Le>>8,_e[Xe+3]=Le,_e[Xe+4]=Ee>>24,_e[Xe+5]=Ee>>16,_e[Xe+6]=Ee>>8,_e[Xe+7]=Ee;var tt=De(ge);_e[Xe+8]=tt>>24,_e[Xe+9]=tt>>16,_e[Xe+10]=tt>>8,_e[Xe+11]=tt,le._sQlen+=12,le.flush()},pointerEvent:function(le,Ee,Le,ge){var De=le._sQ,_e=le._sQlen;De[_e]=5,De[_e+1]=ge,De[_e+2]=Ee>>8,De[_e+3]=Ee,De[_e+4]=Le>>8,De[_e+5]=Le,le._sQlen+=6,le.flush()},_buildExtendedClipboardFlags:function(le,Ee){for(var Le=new Uint8Array(4),ge=0,De=0,_e=0;_e>24,Le[1]=0,Le[2]=0,Le[3]=ge,Le},extendedClipboardProvide:function(le,Ee,Le){for(var ge=new o.default,De=[],_e=0;_e>24&255,Xe.length>>16&255,Xe.length>>8&255,Xe.length&255);for(var tt=0;tt>24,De[_e+1]=Le[ge[Xe]]>>16,De[_e+2]=Le[ge[Xe]]>>8,De[_e+3]=Le[ge[Xe]]>>0,_e+=4,De[3]|=1<2&&arguments[2]!==void 0?arguments[2]:!1,ge=le._sQ,De=le._sQlen;ge[De]=6,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0;var _e;Le?_e=(0,I.toUnsigned32bit)(-Ee.length):_e=Ee.length,ge[De+4]=_e>>24,ge[De+5]=_e>>16,ge[De+6]=_e>>8,ge[De+7]=_e,le._sQlen+=8;for(var Xe=0,tt=Ee.length;tt>0;){for(var Ge=Math.min(tt,le._sQbufferSize-le._sQlen),Me=0;Me>8,_e[Xe+3]=Ee,_e[Xe+4]=Le>>8,_e[Xe+5]=Le,_e[Xe+6]=1,_e[Xe+7]=0,_e[Xe+8]=ge>>24,_e[Xe+9]=ge>>16,_e[Xe+10]=ge>>8,_e[Xe+11]=ge,_e[Xe+12]=0,_e[Xe+13]=0,_e[Xe+14]=0,_e[Xe+15]=0,_e[Xe+16]=Ee>>8,_e[Xe+17]=Ee,_e[Xe+18]=Le>>8,_e[Xe+19]=Le,_e[Xe+20]=De>>24,_e[Xe+21]=De>>16,_e[Xe+22]=De>>8,_e[Xe+23]=De,le._sQlen+=24,le.flush()},clientFence:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=248,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee;var _e=Le.length;ge[De+8]=_e;for(var Xe=0;Xe<_e;Xe++)ge[De+9+Xe]=Le.charCodeAt(Xe);le._sQlen+=9+_e,le.flush()},enableContinuousUpdates:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;Xe[tt]=150,Xe[tt+1]=Ee,Xe[tt+2]=Le>>8,Xe[tt+3]=Le,Xe[tt+4]=ge>>8,Xe[tt+5]=ge,Xe[tt+6]=De>>8,Xe[tt+7]=De,Xe[tt+8]=_e>>8,Xe[tt+9]=_e,le._sQlen+=10,le.flush()},pixelFormat:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen,_e;Ee>16?_e=32:Ee>8?_e=16:_e=8;var Xe=Math.floor(Ee/3);ge[De]=0,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=_e,ge[De+5]=Ee,ge[De+6]=0,ge[De+7]=Le?1:0,ge[De+8]=0,ge[De+9]=(1<>8,Le[ge+3]=Ee.length;for(var De=ge+4,_e=0;_e>24,Le[De+1]=Xe>>16,Le[De+2]=Xe>>8,Le[De+3]=Xe,De+=4}le._sQlen+=De-ge,le.flush()},fbUpdateRequest:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;typeof Le=="undefined"&&(Le=0),typeof ge=="undefined"&&(ge=0),Xe[tt]=3,Xe[tt+1]=Ee?1:0,Xe[tt+2]=Le>>8&255,Xe[tt+3]=Le&255,Xe[tt+4]=ge>>8&255,Xe[tt+5]=ge&255,Xe[tt+6]=De>>8&255,Xe[tt+7]=De&255,Xe[tt+8]=_e>>8&255,Xe[tt+9]=_e&255,le._sQlen+=10,le.flush()},xvpOp:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=250,ge[De+1]=0,ge[De+2]=Ee,ge[De+3]=Le,le._sQlen+=4,le.flush()}},Y.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},"1eCo":function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};I.defineMode("xml",function(y,g){var s=y.indentUnit,_={},p=g.htmlMode?v:T;for(var e in p)_[e]=p[e];for(var e in g)_[e]=g[e];var o,n;function l(D,M){function N(X){return M.tokenize=X,X(D,M)}var P=D.next();if(P=="<")return D.eat("!")?D.eat("[")?D.match("CDATA[")?N(t("atom","]]>")):null:D.match("--")?N(t("comment","-->")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),N(a(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),M.tokenize=t("meta","?>"),"meta"):(o=D.eat("/")?"closeTag":"openTag",M.tokenize=r,"tag bracket");if(P=="&"){var z;return D.eat("#")?D.eat("x")?z=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):z=D.eatWhile(/[\d]/)&&D.eat(";"):z=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),z?"atom":"error"}else return D.eatWhile(/[^&<]/),null}l.isInText=!0;function r(D,M){var N=D.next();if(N==">"||N=="/"&&D.eat(">"))return M.tokenize=l,o=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return o="equals",null;if(N=="<"){M.tokenize=l,M.state=h,M.tagName=M.tagStart=null;var P=M.tokenize(D,M);return P?P+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=i(N),M.stringStartCol=D.column(),M.tokenize(D,M)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(D){var M=function(N,P){for(;!N.eol();)if(N.next()==D){P.tokenize=r;break}return"string"};return M.isInAttribute=!0,M}function t(D,M){return function(N,P){for(;!N.eol();){if(N.match(M)){P.tokenize=l;break}N.next()}return D}}function a(D){return function(M,N){for(var P;(P=M.next())!=null;){if(P=="<")return N.tokenize=a(D+1),N.tokenize(M,N);if(P==">")if(D==1){N.tokenize=l;break}else return N.tokenize=a(D-1),N.tokenize(M,N)}return"meta"}}function c(D,M,N){this.prev=D.context,this.tagName=M,this.indent=D.indented,this.startOfLine=N,(_.doNotIndent.hasOwnProperty(M)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function d(D){D.context&&(D.context=D.context.prev)}function f(D,M){for(var N;;){if(!D.context)return;if(N=D.context.tagName,!_.contextGrabbers.hasOwnProperty(N)||!_.contextGrabbers[N].hasOwnProperty(M))return;d(D)}}function h(D,M,N){return D=="openTag"?(N.tagStart=M.column(),u):D=="closeTag"?E:h}function u(D,M,N){return D=="word"?(N.tagName=M.current(),n="tag",C):_.allowMissingTagName&&D=="endTag"?(n="tag bracket",C(D,M,N)):(n="error",u)}function E(D,M,N){if(D=="word"){var P=M.current();return N.context&&N.context.tagName!=P&&_.implicitlyClosed.hasOwnProperty(N.context.tagName)&&d(N),N.context&&N.context.tagName==P||_.matchClosing===!1?(n="tag",x):(n="tag error",O)}else return _.allowMissingTagName&&D=="endTag"?(n="tag bracket",x(D,M,N)):(n="error",O)}function x(D,M,N){return D!="endTag"?(n="error",x):(d(N),h)}function O(D,M,N){return n="error",x(D,M,N)}function C(D,M,N){if(D=="word")return n="attribute",w;if(D=="endTag"||D=="selfcloseTag"){var P=N.tagName,z=N.tagStart;return N.tagName=N.tagStart=null,D=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(P)?f(N,P):(f(N,P),N.context=new c(N,P,z==N.indented)),h}return n="error",C}function w(D,M,N){return D=="equals"?S:(_.allowMissing||(n="error"),C(D,M,N))}function S(D,M,N){return D=="string"?A:D=="word"&&_.allowUnquoted?(n="string",C):(n="error",C(D,M,N))}function A(D,M,N){return D=="string"?A:C(D,M,N)}return{startState:function(D){var M={tokenize:l,state:h,indented:D||0,tagName:null,tagStart:null,context:null};return D!=null&&(M.baseIndent=D),M},token:function(D,M){if(!M.tagName&&D.sol()&&(M.indented=D.indentation()),D.eatSpace())return null;o=null;var N=M.tokenize(D,M);return(N||o)&&N!="comment"&&(n=null,M.state=M.state(o||N,D,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(D,M,N){var P=D.context;if(D.tokenize.isInAttribute)return D.tagStart==D.indented?D.stringStartCol+1:D.indented+s;if(P&&P.noIndent)return I.Pass;if(D.tokenize!=r&&D.tokenize!=l)return N?N.match(/^(\s*)/)[0].length:0;if(D.tagName)return _.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+s*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/$/,blockCommentStart:"",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(D){D.state==S&&(D.state=C)},xmlCurrentTag:function(D){return D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var M=[],N=D.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),I.defineMIME("text/xml","xml"),I.defineMIME("application/xml","xml"),I.mimeModes.hasOwnProperty("text/html")||I.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(j,H,b){"use strict";b.d(H,"d",function(){return Le}),b.d(H,"b",function(){return Qe}),b.d(H,"c",function(){return Ze}),b.d(H,"a",function(){return Be});var I=b("VTBJ"),v=b("1OyB"),T=b("vuIU"),y=b("JX7q"),g=b("Ji7U"),s=b("LK+K"),_=b("q1tI"),p=b("I8Z2"),e=b("BGR+"),o=b("wx14"),n=b("rePB"),l=b("4IlW"),r=b("2GS6"),i=b("Gytx"),t=b.n(i),a=b("TSYQ"),c=b.n(a),d=b("U8pU"),f=b("ODXe"),h=/iPhone/i,u=/iPod/i,E=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,O=/Android/i,C=/\bAndroid(?:.+)SD4930UR\b/i,w=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,S=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,M=/BB10/i,N=/Opera Mini/i,P=/\b(CriOS|Chrome)(?:.+)Mobile/i,z=/Mobile(?:.+)Firefox\b/i;function X(rt,St){return rt.test(St)}function k(rt){var St=rt||(typeof navigator!="undefined"?navigator.userAgent:""),pt=St.split("[FBAN");if(typeof pt[1]!="undefined"){var st=pt,Pe=Object(f.a)(st,1);St=Pe[0]}if(pt=St.split("Twitter"),typeof pt[1]!="undefined"){var ze=pt,xt=Object(f.a)(ze,1);St=xt[0]}var ht={apple:{phone:X(h,St)&&!X(S,St),ipod:X(u,St),tablet:!X(h,St)&&X(E,St)&&!X(S,St),device:(X(h,St)||X(u,St)||X(E,St))&&!X(S,St)},amazon:{phone:X(C,St),tablet:!X(C,St)&&X(w,St),device:X(C,St)||X(w,St)},android:{phone:!X(S,St)&&X(C,St)||!X(S,St)&&X(x,St),tablet:!X(S,St)&&!X(C,St)&&!X(x,St)&&(X(w,St)||X(O,St)),device:!X(S,St)&&(X(C,St)||X(w,St)||X(x,St)||X(O,St))||X(/\bokhttp\b/i,St)},windows:{phone:X(S,St),tablet:X(A,St),device:X(S,St)||X(A,St)},other:{blackberry:X(D,St),blackberry10:X(M,St),opera:X(N,St),firefox:X(z,St),chrome:X(P,St),device:X(D,St)||X(M,St)||X(N,St)||X(z,St)||X(P,St)},any:null,phone:null,tablet:null};return ht.any=ht.apple.device||ht.android.device||ht.windows.device||ht.other.device,ht.phone=ht.apple.phone||ht.android.phone||ht.windows.phone,ht.tablet=ht.apple.tablet||ht.android.tablet||ht.windows.tablet,ht}var F=Object(I.a)(Object(I.a)({},k()),{},{isMobile:k}),U=F;function L(){}function B(rt,St,pt){var st=St||"";return rt.key||"".concat(st,"item_").concat(pt)}function Z(rt){return"".concat(rt,"-menu-")}function re(rt,St){var pt=-1;_.Children.forEach(rt,function(st){pt+=1,st&&st.type&&st.type.isMenuItemGroup?_.Children.forEach(st.props.children,function(Pe){pt+=1,St(Pe,pt)}):St(st,pt)})}function he(rt,St,pt){if(!rt||pt.find)return;_.Children.forEach(rt,function(st){if(st){var Pe=st.type;if(!Pe||!(Pe.isSubMenu||Pe.isMenuItem||Pe.isMenuItemGroup))return;St.indexOf(st.key)!==-1?pt.find=!0:st.props.children&&he(st.props.children,St,pt)}})}var Se=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ke=function(St){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st=St&&typeof St.getBoundingClientRect=="function"&&St.getBoundingClientRect().width;if(st){if(pt){var Pe=getComputedStyle(St),ze=Pe.marginLeft,xt=Pe.marginRight;st+=+ze.replace("px","")+ +xt.replace("px","")}st=+st.toFixed(6)}return st||0},te=function(St,pt,st){St&&Object(d.a)(St.style)==="object"&&(St.style[pt]=st)},Re=function(){return U.any},Ce=b("KQm4"),pe=b("Ff2n"),me=b("i8i4"),se=b("bdgK"),be=b("uciX"),ae=b("8XRh"),fe={adjustX:1,adjustY:1},Fe={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},ie={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},q=Fe,Q=0,Y={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},oe=function(St,pt,st){var Pe=Z(pt),ze=St.getState();St.setState({defaultActiveFirst:Object(I.a)(Object(I.a)({},ze.defaultActiveFirst),{},Object(n.a)({},Pe,st))})},le=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(st){var Pe;Object(v.a)(this,pt),Pe=St.call(this,st),Pe.onDestroy=function(gt){Pe.props.onDestroy(gt)},Pe.onKeyDown=function(gt){var Xt=gt.keyCode,jt=Pe.menuInstance,Ut=Pe.props,It=Ut.isOpen,Kt=Ut.store;if(Xt===l.a.ENTER)return Pe.onTitleClick(gt),oe(Kt,Pe.props.eventKey,!0),!0;if(Xt===l.a.RIGHT)return It?jt.onKeyDown(gt):(Pe.triggerOpenChange(!0),oe(Kt,Pe.props.eventKey,!0)),!0;if(Xt===l.a.LEFT){var rn;if(It)rn=jt.onKeyDown(gt);else return;return rn||(Pe.triggerOpenChange(!1),rn=!0),rn}return It&&(Xt===l.a.UP||Xt===l.a.DOWN)?jt.onKeyDown(gt):void 0},Pe.onOpenChange=function(gt){Pe.props.onOpenChange(gt)},Pe.onPopupVisibleChange=function(gt){Pe.triggerOpenChange(gt,gt?"mouseenter":"mouseleave")},Pe.onMouseEnter=function(gt){var Xt=Pe.props,jt=Xt.eventKey,Ut=Xt.onMouseEnter,It=Xt.store;oe(It,Pe.props.eventKey,!1),Ut({key:jt,domEvent:gt})},Pe.onMouseLeave=function(gt){var Xt=Pe.props,jt=Xt.parentMenu,Ut=Xt.eventKey,It=Xt.onMouseLeave;jt.subMenuInstance=Object(y.a)(Pe),It({key:Ut,domEvent:gt})},Pe.onTitleMouseEnter=function(gt){var Xt=Pe.props,jt=Xt.eventKey,Ut=Xt.onItemHover,It=Xt.onTitleMouseEnter;Ut({key:jt,hover:!0}),It({key:jt,domEvent:gt})},Pe.onTitleMouseLeave=function(gt){var Xt=Pe.props,jt=Xt.parentMenu,Ut=Xt.eventKey,It=Xt.onItemHover,Kt=Xt.onTitleMouseLeave;jt.subMenuInstance=Object(y.a)(Pe),It({key:Ut,hover:!1}),Kt({key:Ut,domEvent:gt})},Pe.onTitleClick=function(gt){var Xt=Object(y.a)(Pe),jt=Xt.props;if(jt.onTitleClick({key:jt.eventKey,domEvent:gt}),jt.triggerSubMenuAction==="hover")return;Pe.triggerOpenChange(!jt.isOpen,"click"),oe(jt.store,Pe.props.eventKey,!1)},Pe.onSubMenuClick=function(gt){typeof Pe.props.onClick=="function"&&Pe.props.onClick(Pe.addKeyPath(gt))},Pe.onSelect=function(gt){Pe.props.onSelect(gt)},Pe.onDeselect=function(gt){Pe.props.onDeselect(gt)},Pe.getPrefixCls=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu")},Pe.getActiveClassName=function(){return"".concat(Pe.getPrefixCls(),"-active")},Pe.getDisabledClassName=function(){return"".concat(Pe.getPrefixCls(),"-disabled")},Pe.getSelectedClassName=function(){return"".concat(Pe.getPrefixCls(),"-selected")},Pe.getOpenClassName=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu-open")},Pe.saveMenuInstance=function(gt){Pe.menuInstance=gt},Pe.addKeyPath=function(gt){return Object(I.a)(Object(I.a)({},gt),{},{keyPath:(gt.keyPath||[]).concat(Pe.props.eventKey)})},Pe.triggerOpenChange=function(gt,Xt){var jt=Pe.props.eventKey,Ut=function(){Pe.onOpenChange({key:jt,item:Object(y.a)(Pe),trigger:Xt,open:gt})};Xt==="mouseenter"?Pe.mouseenterTimeout=setTimeout(function(){Ut()},0):Ut()},Pe.isChildrenSelected=function(){var gt={find:!1};return he(Pe.props.children,Pe.props.selectedKeys,gt),gt.find},Pe.isOpen=function(){return Pe.props.openKeys.indexOf(Pe.props.eventKey)!==-1},Pe.adjustWidth=function(){if(!Pe.subMenuTitle||!Pe.menuInstance)return;var gt=me.findDOMNode(Pe.menuInstance);if(gt.offsetWidth>=Pe.subMenuTitle.offsetWidth)return;gt.style.minWidth="".concat(Pe.subMenuTitle.offsetWidth,"px")},Pe.saveSubMenuTitle=function(gt){Pe.subMenuTitle=gt},Pe.getBaseProps=function(){var gt=Object(y.a)(Pe),Xt=gt.props;return{mode:Xt.mode==="horizontal"?"vertical":Xt.mode,visible:Pe.props.isOpen,level:Xt.level+1,inlineIndent:Xt.inlineIndent,focusable:!1,onClick:Pe.onSubMenuClick,onSelect:Pe.onSelect,onDeselect:Pe.onDeselect,onDestroy:Pe.onDestroy,selectedKeys:Xt.selectedKeys,eventKey:"".concat(Xt.eventKey,"-menu-"),openKeys:Xt.openKeys,motion:Xt.motion,onOpenChange:Pe.onOpenChange,subMenuOpenDelay:Xt.subMenuOpenDelay,parentMenu:Object(y.a)(Pe),subMenuCloseDelay:Xt.subMenuCloseDelay,forceSubMenuRender:Xt.forceSubMenuRender,triggerSubMenuAction:Xt.triggerSubMenuAction,builtinPlacements:Xt.builtinPlacements,defaultActiveFirst:Xt.store.getState().defaultActiveFirst[Z(Xt.eventKey)],multiple:Xt.multiple,prefixCls:Xt.rootPrefixCls,id:Pe.internalMenuId,manualRef:Pe.saveMenuInstance,itemIcon:Xt.itemIcon,expandIcon:Xt.expandIcon,direction:Xt.direction}},Pe.getMotion=function(gt,Xt){var jt=Object(y.a)(Pe),Ut=jt.haveRendered,It=Pe.props,Kt=It.motion,rn=It.rootPrefixCls,zt=Object(I.a)(Object(I.a)({},Kt),{},{leavedClassName:"".concat(rn,"-hidden"),removeOnLeave:!1,motionAppear:Ut||!Xt||gt!=="inline"});return zt};var ze=st.store,xt=st.eventKey,ht=ze.getState(),Bt=ht.defaultActiveFirst;Pe.isRootMenu=!1;var Ht=!1;return Bt&&(Ht=Bt[xt]),oe(ze,xt,Ht),Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Pe=this,ze=this.props,xt=ze.mode,ht=ze.parentMenu,Bt=ze.manualRef;if(Bt&&Bt(this),xt!=="horizontal"||!ht.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Pe=this.props,ze=Pe.onDestroy,xt=Pe.eventKey;ze&&ze(xt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Pe){var ze=this,xt=this.getBaseProps(),ht=this.getMotion(xt.mode,xt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||xt.visible||xt.forceSubMenuRender,!this.haveOpened)return _.createElement("div",null);var Bt=xt.direction;return _.createElement(ae.default,Object.assign({visible:xt.visible},ht),function(Ht){var gt=Ht.className,Xt=Ht.style,jt=c()("".concat(xt.prefixCls,"-sub"),gt,Object(n.a)({},"".concat(xt.prefixCls,"-rtl"),Bt==="rtl"));return _.createElement(Ye,Object.assign({},xt,{id:ze.internalMenuId,className:jt,style:Xt}),Pe)})}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),xt=ze.isOpen,ht=this.getPrefixCls(),Bt=ze.mode==="inline",Ht=c()(ht,"".concat(ht,"-").concat(ze.mode),(Pe={},Object(n.a)(Pe,ze.className,!!ze.className),Object(n.a)(Pe,this.getOpenClassName(),xt),Object(n.a)(Pe,this.getActiveClassName(),ze.active||xt&&!Bt),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Object(n.a)(Pe,this.getSelectedClassName(),this.isChildrenSelected()),Pe));this.internalMenuId||(ze.eventKey?this.internalMenuId="".concat(ze.eventKey,"$Menu"):(Q+=1,this.internalMenuId="$__$".concat(Q,"$Menu")));var gt={},Xt={},jt={};ze.disabled||(gt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Xt={onClick:this.onTitleClick},jt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ut={},It=ze.direction;Bt&&(It==="rtl"?Ut.paddingRight=ze.inlineIndent*ze.level:Ut.paddingLeft=ze.inlineIndent*ze.level);var Kt={};this.props.isOpen&&(Kt={"aria-owns":this.internalMenuId});var rn=null;ze.mode!=="horizontal"&&(rn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(rn=_.createElement(this.props.expandIcon,Object(I.a)({},this.props))));var zt=_.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Ut,className:"".concat(ht,"-title"),role:"button"},jt,Xt,{"aria-expanded":xt},Kt,{"aria-haspopup":"true",title:typeof ze.title=="string"?ze.title:void 0}),ze.title,rn||_.createElement("i",{className:"".concat(ht,"-arrow")})),$t=this.renderChildren(ze.children),Pn=ze.parentMenu.isRootMenu?ze.parentMenu.props.getPopupContainer:function(Ar){return Ar.parentNode},fn=Y[ze.mode],In=ze.popupOffset?{offset:ze.popupOffset}:{},on=ze.mode==="inline"?"":ze.popupClassName;on+=It==="rtl"?" ".concat(ht,"-rtl"):"";var Cn=ze.disabled,Hn=ze.triggerSubMenuAction,Qn=ze.subMenuOpenDelay,Vt=ze.forceSubMenuRender,xn=ze.subMenuCloseDelay,er=ze.builtinPlacements;Se.forEach(function(Ar){return delete ze[Ar]}),delete ze.onClick;var ar=It==="rtl"?Object.assign({},ie,er):Object.assign({},Fe,er);return delete ze.direction,_.createElement("li",Object.assign({},ze,gt,{className:Ht,role:"menuitem"}),Bt&&zt,Bt&&$t,!Bt&&_.createElement(be.a,{prefixCls:ht,popupClassName:c()("".concat(ht,"-popup"),on),getPopupContainer:Pn,builtinPlacements:ar,popupPlacement:fn,popupVisible:xt,popupAlign:In,popup:$t,action:Cn?[]:[Hn],mouseEnterDelay:Qn,mouseLeaveDelay:xn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Vt},zt))}}]),pt}(_.Component);le.defaultProps={onMouseEnter:L,onMouseLeave:L,onTitleMouseEnter:L,onTitleMouseLeave:L,onTitleClick:L,manualRef:L,mode:"vertical",title:""};var Ee=Object(p.b)(function(rt,St){var pt=rt.openKeys,st=rt.activeKey,Pe=rt.selectedKeys,ze=St.eventKey,xt=St.subMenuKey;return{isOpen:pt.indexOf(ze)>-1,active:st[xt]===ze,selectedKeys:Pe}})(le);Ee.isSubMenu=!0;var Le=Ee,ge="menuitem-overflowed",De=.5,_e=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=St.apply(this,arguments),st.resizeObserver=null,st.mutationObserver=null,st.originalTotalWidth=0,st.overflowedItems=[],st.menuItemSizes=[],st.cancelFrameId=null,st.state={lastVisibleIndex:void 0},st.getMenuItemNodes=function(){var Pe=st.props.prefixCls,ze=me.findDOMNode(Object(y.a)(st));return ze?[].slice.call(ze.children).filter(function(xt){return xt.className.split(" ").indexOf("".concat(Pe,"-overflowed-submenu"))<0}):[]},st.getOverflowedSubMenuItem=function(Pe,ze,xt){var ht=st.props,Bt=ht.overflowedIndicator,Ht=ht.level,gt=ht.mode,Xt=ht.prefixCls,jt=ht.theme;if(Ht!==1||gt!=="horizontal")return null;var Ut=st.props.children[0],It=Ut.props,Kt=It.children,rn=It.title,zt=It.style,$t=Object(pe.a)(It,["children","title","style"]),Pn=Object(I.a)({},zt),fn="".concat(Pe,"-overflowed-indicator"),In="".concat(Pe,"-overflowed-indicator");ze.length===0&&xt!==!0?Pn=Object(I.a)(Object(I.a)({},Pn),{},{display:"none"}):xt&&(Pn=Object(I.a)(Object(I.a)({},Pn),{},{visibility:"hidden",position:"absolute"}),fn="".concat(fn,"-placeholder"),In="".concat(In,"-placeholder"));var on=jt?"".concat(Xt,"-").concat(jt):"",Cn={};return Se.forEach(function(Hn){$t[Hn]!==void 0&&(Cn[Hn]=$t[Hn])}),_.createElement(Le,Object.assign({title:Bt,className:"".concat(Xt,"-overflowed-submenu"),popupClassName:on},Cn,{key:fn,eventKey:In,disabled:!1,style:Pn}),ze)},st.setChildrenWidthAndResize=function(){if(st.props.mode!=="horizontal")return;var Pe=me.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=Pe.children;if(!ze||ze.length===0)return;var xt=Pe.children[ze.length-1];te(xt,"display","inline-block");var ht=st.getMenuItemNodes(),Bt=ht.filter(function(Ht){return Ht.className.split(" ").indexOf(ge)>=0});Bt.forEach(function(Ht){te(Ht,"display","inline-block")}),st.menuItemSizes=ht.map(function(Ht){return ke(Ht,!0)}),Bt.forEach(function(Ht){te(Ht,"display","none")}),st.overflowedIndicatorWidth=ke(Pe.children[Pe.children.length-1],!0),st.originalTotalWidth=st.menuItemSizes.reduce(function(Ht,gt){return Ht+gt},0),st.handleResize(),te(xt,"display","none")},st.handleResize=function(){if(st.props.mode!=="horizontal")return;var Pe=me.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=ke(Pe);st.overflowedItems=[];var xt=0,ht;st.originalTotalWidth>ze+De&&(ht=-1,st.menuItemSizes.forEach(function(Bt){xt+=Bt,xt+st.overflowedIndicatorWidth<=ze&&(ht+=1)})),st.setState({lastVisibleIndex:ht})},st}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){var Pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ze=me.findDOMNode(this);if(!ze)return;this.resizeObserver=new se.default(function(xt){xt.forEach(function(){var ht=Pe.cancelFrameId;cancelAnimationFrame(ht),Pe.cancelFrameId=requestAnimationFrame(Pe.setChildrenWidthAndResize)})}),[].slice.call(ze.children).concat(ze).forEach(function(xt){Pe.resizeObserver.observe(xt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Pe.resizeObserver.disconnect(),[].slice.call(ze.children).concat(ze).forEach(function(xt){Pe.resizeObserver.observe(xt)}),Pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(ze,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Pe){var ze=this,xt=this.state.lastVisibleIndex;return(Pe||[]).reduce(function(ht,Bt,Ht){var gt=Bt;if(ze.props.mode==="horizontal"){var Xt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,[]);xt!==void 0&&ze.props.className.indexOf("".concat(ze.props.prefixCls,"-root"))!==-1&&(Ht>xt&&(gt=_.cloneElement(Bt,{style:{display:"none"},eventKey:"".concat(Bt.props.eventKey,"-hidden"),className:"".concat(ge)})),Ht===xt+1&&(ze.overflowedItems=Pe.slice(xt+1).map(function(Ut){return _.cloneElement(Ut,{key:Ut.props.eventKey,mode:"vertical-left"})}),Xt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,ze.overflowedItems)));var jt=[].concat(Object(Ce.a)(ht),[Xt,gt]);return Ht===Pe.length-1&&jt.push(ze.getOverflowedSubMenuItem(Bt.props.eventKey,[],!0)),jt}return[].concat(Object(Ce.a)(ht),[gt])},[])}},{key:"render",value:function(){var Pe=this.props,ze=Pe.visible,xt=Pe.prefixCls,ht=Pe.overflowedIndicator,Bt=Pe.mode,Ht=Pe.level,gt=Pe.tag,Xt=Pe.children,jt=Pe.theme,Ut=Object(pe.a)(Pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),It=gt;return _.createElement(It,Object.assign({},Ut),this.renderChildren(Xt))}}]),pt}(_.Component);_e.defaultProps={tag:"div",className:""};var Xe=_e;function tt(rt){return rt.length?rt.every(function(St){return!!St.props.disabled}):!0}function Ge(rt,St,pt){var st=rt.getState();rt.setState({activeKey:Object(I.a)(Object(I.a)({},st.activeKey),{},Object(n.a)({},St,pt))})}function Me(rt){return rt.eventKey||"0-menu-"}function Et(rt,St){var pt=St,st=rt.children,Pe=rt.eventKey;if(pt){var ze;if(re(st,function(xt,ht){xt&&xt.props&&!xt.props.disabled&&pt===B(xt,Pe,ht)&&(ze=!0)}),ze)return pt}return pt=null,rt.defaultActiveFirst&&re(st,function(xt,ht){!pt&&xt&&!xt.props.disabled&&(pt=B(xt,Pe,ht))}),pt}function Oe(rt){if(rt){var St=this.instanceArray.indexOf(rt);St!==-1?this.instanceArray[St]=rt:this.instanceArray.push(rt)}}var Ve=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(st){var Pe;return Object(v.a)(this,pt),Pe=St.call(this,st),Pe.onKeyDown=function(ze,xt){var ht=ze.keyCode,Bt;if(Pe.getFlatInstanceArray().forEach(function(gt){gt&>.props.active&>.onKeyDown&&(Bt=gt.onKeyDown(ze))}),Bt)return 1;var Ht=null;return(ht===l.a.UP||ht===l.a.DOWN)&&(Ht=Pe.step(ht===l.a.UP?-1:1)),Ht?(ze.preventDefault(),Ge(Pe.props.store,Me(Pe.props),Ht.props.eventKey),typeof xt=="function"&&xt(Ht),1):void 0},Pe.onItemHover=function(ze){var xt=ze.key,ht=ze.hover;Ge(Pe.props.store,Me(Pe.props),ht?xt:null)},Pe.onDeselect=function(ze){Pe.props.onDeselect(ze)},Pe.onSelect=function(ze){Pe.props.onSelect(ze)},Pe.onClick=function(ze){Pe.props.onClick(ze)},Pe.onOpenChange=function(ze){Pe.props.onOpenChange(ze)},Pe.onDestroy=function(ze){Pe.props.onDestroy(ze)},Pe.getFlatInstanceArray=function(){return Pe.instanceArray},Pe.step=function(ze){var xt=Pe.getFlatInstanceArray(),ht=Pe.props.store.getState().activeKey[Me(Pe.props)],Bt=xt.length;if(!Bt)return null;ze<0&&(xt=xt.concat().reverse());var Ht=-1;if(xt.every(function(Ut,It){return Ut&&Ut.props.eventKey===ht?(Ht=It,!1):!0}),!Pe.props.defaultActiveFirst&&Ht!==-1&&tt(xt.slice(Ht,Bt-1)))return;var gt=(Ht+1)%Bt,Xt=gt;do{var jt=xt[Xt];if(!jt||jt.props.disabled)Xt=(Xt+1)%Bt;else return jt}while(Xt!==gt);return null},Pe.renderCommonMenuItem=function(ze,xt,ht){var Bt=Pe.props.store.getState(),Ht=Object(y.a)(Pe),gt=Ht.props,Xt=B(ze,gt.eventKey,xt),jt=ze.props;if(!jt||typeof ze.type=="string")return ze;var Ut=Xt===Bt.activeKey,It=Object(I.a)(Object(I.a)({mode:jt.mode||gt.mode,level:gt.level,inlineIndent:gt.inlineIndent,renderMenuItem:Pe.renderMenuItem,rootPrefixCls:gt.prefixCls,index:xt,parentMenu:gt.parentMenu,manualRef:jt.disabled?void 0:Object(r.a)(ze.ref,Oe.bind(Object(y.a)(Pe))),eventKey:Xt,active:!jt.disabled&&Ut,multiple:gt.multiple,onClick:function(rn){(jt.onClick||L)(rn),Pe.onClick(rn)},onItemHover:Pe.onItemHover,motion:gt.motion,subMenuOpenDelay:gt.subMenuOpenDelay,subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,onOpenChange:Pe.onOpenChange,onDeselect:Pe.onDeselect,onSelect:Pe.onSelect,builtinPlacements:gt.builtinPlacements,itemIcon:jt.itemIcon||Pe.props.itemIcon,expandIcon:jt.expandIcon||Pe.props.expandIcon},ht),{},{direction:gt.direction});return(gt.mode==="inline"||Re())&&(It.triggerSubMenuAction="click"),_.cloneElement(ze,It)},Pe.renderMenuItem=function(ze,xt,ht){if(!ze)return null;var Bt=Pe.props.store.getState(),Ht={openKeys:Bt.openKeys,selectedKeys:Bt.selectedKeys,triggerSubMenuAction:Pe.props.triggerSubMenuAction,subMenuKey:ht};return Pe.renderCommonMenuItem(ze,xt,Ht)},st.store.setState({activeKey:Object(I.a)(Object(I.a)({},st.store.getState().activeKey),{},Object(n.a)({},st.eventKey,Et(st,st.activeKey)))}),Pe.instanceArray=[],Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Pe){return this.props.visible||Pe.visible||this.props.className!==Pe.className||!t()(this.props.style,Pe.style)}},{key:"componentDidUpdate",value:function(Pe){var ze=this.props,xt="activeKey"in ze?ze.activeKey:ze.store.getState().activeKey[Me(ze)],ht=Et(ze,xt);if(ht!==xt)Ge(ze.store,Me(ze),ht);else if("activeKey"in Pe){var Bt=Et(Pe,Pe.activeKey);ht!==Bt&&Ge(ze.store,Me(ze),ht)}}},{key:"render",value:function(){var Pe=this,ze=Object(o.a)({},this.props);this.instanceArray=[];var xt=c()(ze.prefixCls,ze.className,"".concat(ze.prefixCls,"-").concat(ze.mode)),ht={className:xt,role:ze.role||"menu"};ze.id&&(ht.id=ze.id),ze.focusable&&(ht.tabIndex=0,ht.onKeyDown=this.onKeyDown);var Bt=ze.prefixCls,Ht=ze.eventKey,gt=ze.visible,Xt=ze.level,jt=ze.mode,Ut=ze.overflowedIndicator,It=ze.theme;return Se.forEach(function(Kt){return delete ze[Kt]}),delete ze.onClick,_.createElement(Xe,Object.assign({},ze,{prefixCls:Bt,mode:jt,tag:"ul",level:Xt,theme:It,visible:gt,overflowedIndicator:Ut},ht),_.Children.map(ze.children,function(Kt,rn){return Pe.renderMenuItem(Kt,rn,Ht||"0-menu-")}))}}]),pt}(_.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:L};var Je=Object(p.b)()(Ve),Ye=Je,Ne=b("Kwbf");function He(rt,St,pt){var st=rt.prefixCls,Pe=rt.motion,ze=rt.defaultMotions,xt=ze===void 0?{}:ze,ht=rt.openAnimation,Bt=rt.openTransitionName,Ht=St.switchingModeFromInline;if(Pe)return Pe;if(Object(d.a)(ht)==="object"&&ht)Object(Ne.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ht=="string")return{motionName:"".concat(st,"-open-").concat(ht)};if(Bt)return{motionName:Bt};var gt=xt[pt];return gt||(Ht?null:xt.other)}var ve=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(st){var Pe;Object(v.a)(this,pt),Pe=St.call(this,st),Pe.inlineOpenKeys=[],Pe.onSelect=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var gt=Pe.store.getState(),Xt=gt.selectedKeys,jt=ht.key;Ht.multiple?Xt=Xt.concat([jt]):Xt=[jt],"selectedKeys"in Ht||Pe.store.setState({selectedKeys:Xt}),Ht.onSelect(Object(I.a)(Object(I.a)({},ht),{},{selectedKeys:Xt}))}},Pe.onClick=function(ht){var Bt=Pe.getRealMenuMode(),Ht=Object(y.a)(Pe),gt=Ht.store,Xt=Ht.props.onOpenChange;Bt!=="inline"&&!("openKeys"in Pe.props)&&(gt.setState({openKeys:[]}),Xt([])),Pe.props.onClick(ht)},Pe.onKeyDown=function(ht,Bt){Pe.innerMenu.getWrappedInstance().onKeyDown(ht,Bt)},Pe.onOpenChange=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props,gt=Pe.store.getState().openKeys.concat(),Xt=!1,jt=function(It){var Kt=!1;if(It.open)Kt=gt.indexOf(It.key)===-1,Kt&>.push(It.key);else{var rn=gt.indexOf(It.key);Kt=rn!==-1,Kt&>.splice(rn,1)}Xt=Xt||Kt};Array.isArray(ht)?ht.forEach(jt):jt(ht),Xt&&("openKeys"in Pe.props||Pe.store.setState({openKeys:gt}),Ht.onOpenChange(gt))},Pe.onDeselect=function(ht){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var gt=Pe.store.getState().selectedKeys.concat(),Xt=ht.key,jt=gt.indexOf(Xt);jt!==-1&>.splice(jt,1),"selectedKeys"in Ht||Pe.store.setState({selectedKeys:gt}),Ht.onDeselect(Object(I.a)(Object(I.a)({},ht),{},{selectedKeys:gt}))}},Pe.onMouseEnter=function(ht){Pe.restoreModeVerticalFromInline();var Bt=Pe.props.onMouseEnter;Bt&&Bt(ht)},Pe.onTransitionEnd=function(ht){var Bt=ht.propertyName==="width"&&ht.target===ht.currentTarget,Ht=ht.target.className,gt=Object.prototype.toString.call(Ht)==="[object SVGAnimatedString]"?Ht.animVal:Ht,Xt=ht.propertyName==="font-size"&>.indexOf("anticon")>=0;(Bt||Xt)&&Pe.restoreModeVerticalFromInline()},Pe.setInnerMenu=function(ht){Pe.innerMenu=ht},Pe.isRootMenu=!0;var ze=st.defaultSelectedKeys,xt=st.defaultOpenKeys;return"selectedKeys"in st&&(ze=st.selectedKeys||[]),"openKeys"in st&&(xt=st.openKeys||[]),Pe.store=Object(p.c)({selectedKeys:ze,openKeys:xt,activeKey:{"0-menu-":Et(st,st.activeKey)}}),Pe.state={switchingModeFromInline:!1},Pe}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Pe){this.updateOpentKeysWhenSwitchMode(Pe),this.updateMiniStore();var ze=this.props,xt=ze.siderCollapsed,ht=ze.inlineCollapsed,Bt=ze.onOpenChange;(!Pe.inlineCollapsed&&ht||!Pe.siderCollapsed&&xt)&&Bt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Pe){var ze=this.props,xt=this.store,ht=this.inlineOpenKeys,Bt=xt.getState(),Ht={};Pe.mode==="inline"&&ze.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in ze||((ze.inlineCollapsed&&!Pe.inlineCollapsed||ze.siderCollapsed&&!Pe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Bt.openKeys.concat(),Ht.openKeys=[]),(!ze.inlineCollapsed&&Pe.inlineCollapsed||!ze.siderCollapsed&&Pe.siderCollapsed)&&(Ht.openKeys=ht,this.inlineOpenKeys=[])),Object.keys(Ht).length&&xt.setState(Ht)}},{key:"updateMenuDisplay",value:function(){var Pe=this.props.collapsedWidth,ze=this.store,xt=this.prevOpenKeys,ht=this.getInlineCollapsed()&&(Pe===0||Pe==="0"||Pe==="0px");ht?(this.prevOpenKeys=ze.getState().openKeys.concat(),this.store.setState({openKeys:[]})):xt&&(this.store.setState({openKeys:xt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Pe=this.props.mode,ze=this.state.switchingModeFromInline,xt=this.getInlineCollapsed();return ze&&xt?"inline":xt?"vertical":Pe}},{key:"getInlineCollapsed",value:function(){var Pe=this.props,ze=Pe.inlineCollapsed,xt=Pe.siderCollapsed;return xt!==void 0?xt:ze}},{key:"restoreModeVerticalFromInline",value:function(){var Pe=this.state.switchingModeFromInline;Pe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Pe=Object(I.a)({},Object(e.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ze=this.getRealMenuMode();return Pe.className+=" ".concat(Pe.prefixCls,"-root"),Pe.direction==="rtl"&&(Pe.className+=" ".concat(Pe.prefixCls,"-rtl")),Pe=Object(I.a)(Object(I.a)({},Pe),{},{mode:ze,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:He(this.props,this.state,ze)}),delete Pe.openAnimation,delete Pe.openTransitionName,_.createElement(p.a,{store:this.store},_.createElement(Ye,Object.assign({},Pe,{ref:this.setInnerMenu}),this.props.children))}}]),pt}(_.Component);ve.defaultProps={selectable:!0,onClick:L,onSelect:L,onOpenChange:L,onDeselect:L,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:_.createElement("span",null,"\xB7\xB7\xB7")};var xe=ve,de=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=St.apply(this,arguments),st.onKeyDown=function(Pe){var ze=Pe.keyCode;return ze===l.a.ENTER?(st.onClick(Pe),!0):void 0},st.onMouseLeave=function(Pe){var ze=st.props,xt=ze.eventKey,ht=ze.onItemHover,Bt=ze.onMouseLeave;ht({key:xt,hover:!1}),Bt({key:xt,domEvent:Pe})},st.onMouseEnter=function(Pe){var ze=st.props,xt=ze.eventKey,ht=ze.onItemHover,Bt=ze.onMouseEnter;ht({key:xt,hover:!0}),Bt({key:xt,domEvent:Pe})},st.onClick=function(Pe){var ze=st.props,xt=ze.eventKey,ht=ze.multiple,Bt=ze.onClick,Ht=ze.onSelect,gt=ze.onDeselect,Xt=ze.isSelected,jt={key:xt,keyPath:[xt],item:Object(y.a)(st),domEvent:Pe};Bt(jt),ht?Xt?gt(jt):Ht(jt):Xt||Ht(jt)},st.saveNode=function(Pe){st.node=Pe},st}return Object(T.a)(pt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Pe=this.props;Pe.onDestroy&&Pe.onDestroy(Pe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),xt=c()(this.getPrefixCls(),ze.className,(Pe={},Object(n.a)(Pe,this.getActiveClassName(),!ze.disabled&&ze.active),Object(n.a)(Pe,this.getSelectedClassName(),ze.isSelected),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Pe)),ht=Object(I.a)(Object(I.a)({},ze.attribute),{},{title:typeof ze.title=="string"?ze.title:void 0,className:xt,role:ze.role||"menuitem","aria-disabled":ze.disabled});ze.role==="option"?ht=Object(I.a)(Object(I.a)({},ht),{},{role:"option","aria-selected":ze.isSelected}):(ze.role===null||ze.role==="none")&&(ht.role="none");var Bt={onClick:ze.disabled?null:this.onClick,onMouseLeave:ze.disabled?null:this.onMouseLeave,onMouseEnter:ze.disabled?null:this.onMouseEnter},Ht=Object(I.a)({},ze.style);ze.mode==="inline"&&(ze.direction==="rtl"?Ht.paddingRight=ze.inlineIndent*ze.level:Ht.paddingLeft=ze.inlineIndent*ze.level),Se.forEach(function(Xt){return delete ze[Xt]}),delete ze.direction;var gt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(gt=_.createElement(this.props.itemIcon,this.props)),_.createElement("li",Object.assign({},Object(e.default)(ze,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ht,Bt,{style:Ht,ref:this.saveNode}),ze.children,gt)}}]),pt}(_.Component);de.isMenuItem=!0,de.defaultProps={onSelect:L,onMouseEnter:L,onMouseLeave:L,manualRef:L};var je=Object(p.b)(function(rt,St){var pt=rt.activeKey,st=rt.selectedKeys,Pe=St.eventKey,ze=St.subMenuKey;return{active:pt[ze]===Pe,isSelected:st.indexOf(Pe)!==-1}})(de),Qe=je,ne=function(rt){Object(g.a)(pt,rt);var St=Object(s.a)(pt);function pt(){var st;return Object(v.a)(this,pt),st=St.apply(this,arguments),st.renderInnerMenuItem=function(Pe){var ze=st.props,xt=ze.renderMenuItem,ht=ze.index;return xt(Pe,ht,st.props.subMenuKey)},st}return Object(T.a)(pt,[{key:"render",value:function(){var Pe=Object(o.a)({},this.props),ze=Pe.className,xt=ze===void 0?"":ze,ht=Pe.rootPrefixCls,Bt="".concat(ht,"-item-group-title"),Ht="".concat(ht,"-item-group-list"),gt=Pe.title,Xt=Pe.children;return Se.forEach(function(jt){return delete Pe[jt]}),delete Pe.onClick,delete Pe.direction,_.createElement("li",Object.assign({},Pe,{className:"".concat(xt," ").concat(ht,"-item-group")}),_.createElement("div",{className:Bt,title:typeof gt=="string"?gt:void 0},gt),_.createElement("ul",{className:Ht},_.Children.map(Xt,this.renderInnerMenuItem)))}}]),pt}(_.Component);ne.isMenuItemGroup=!0,ne.defaultProps={disabled:!0};var Ze=ne,lt=function(St){var pt=St.className,st=St.rootPrefixCls,Pe=St.style;return _.createElement("li",{className:"".concat(pt," ").concat(st,"-item-divider"),style:Pe})};lt.defaultProps={disabled:!0,className:"",style:{}};var Be=lt,$e=H.e=xe},"1q3G":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"1uat":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Hasher,g=v.x64,s=g.Word,_=g.WordArray,p=v.algo;function e(){return s.create.apply(s,arguments)}var o=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],n=[];(function(){for(var r=0;r<80;r++)n[r]=e()})();var l=p.SHA512=y.extend({_doReset:function(){this._hash=new _.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var t=this._hash.words,a=t[0],c=t[1],d=t[2],f=t[3],h=t[4],u=t[5],E=t[6],x=t[7],O=a.high,C=a.low,w=c.high,S=c.low,A=d.high,D=d.low,M=f.high,N=f.low,P=h.high,z=h.low,X=u.high,k=u.low,F=E.high,U=E.low,L=x.high,B=x.low,Z=O,re=C,he=w,Se=S,ke=A,te=D,Re=M,Ce=N,pe=P,me=z,se=X,be=k,ae=F,fe=U,Fe=L,ie=B,q=0;q<80;q++){var Q,Y,oe=n[q];if(q<16)Y=oe.high=r[i+q*2]|0,Q=oe.low=r[i+q*2+1]|0;else{var le=n[q-15],Ee=le.high,Le=le.low,ge=(Ee>>>1|Le<<31)^(Ee>>>8|Le<<24)^Ee>>>7,De=(Le>>>1|Ee<<31)^(Le>>>8|Ee<<24)^(Le>>>7|Ee<<25),_e=n[q-2],Xe=_e.high,tt=_e.low,Ge=(Xe>>>19|tt<<13)^(Xe<<3|tt>>>29)^Xe>>>6,Me=(tt>>>19|Xe<<13)^(tt<<3|Xe>>>29)^(tt>>>6|Xe<<26),Et=n[q-7],Oe=Et.high,Ve=Et.low,Je=n[q-16],Ye=Je.high,Ne=Je.low;Q=De+Ve,Y=ge+Oe+(Q>>>0>>0?1:0),Q=Q+Me,Y=Y+Ge+(Q>>>0>>0?1:0),Q=Q+Ne,Y=Y+Ye+(Q>>>0>>0?1:0),oe.high=Y,oe.low=Q}var He=pe&se^~pe&ae,ve=me&be^~me&fe,xe=Z&he^Z&ke^he&ke,de=re&Se^re&te^Se&te,je=(Z>>>28|re<<4)^(Z<<30|re>>>2)^(Z<<25|re>>>7),Qe=(re>>>28|Z<<4)^(re<<30|Z>>>2)^(re<<25|Z>>>7),ne=(pe>>>14|me<<18)^(pe>>>18|me<<14)^(pe<<23|me>>>9),Ze=(me>>>14|pe<<18)^(me>>>18|pe<<14)^(me<<23|pe>>>9),lt=o[q],Be=lt.high,$e=lt.low,rt=ie+Ze,St=Fe+ne+(rt>>>0>>0?1:0),rt=rt+ve,St=St+He+(rt>>>0>>0?1:0),rt=rt+$e,St=St+Be+(rt>>>0<$e>>>0?1:0),rt=rt+Q,St=St+Y+(rt>>>0>>0?1:0),pt=Qe+de,st=je+xe+(pt>>>0>>0?1:0);Fe=ae,ie=fe,ae=se,fe=be,se=pe,be=me,me=Ce+rt|0,pe=Re+St+(me>>>0>>0?1:0)|0,Re=ke,Ce=te,ke=he,te=Se,he=Z,Se=re,re=rt+pt|0,Z=St+st+(re>>>0>>0?1:0)|0}C=a.low=C+re,a.high=O+Z+(C>>>0>>0?1:0),S=c.low=S+Se,c.high=w+he+(S>>>0>>0?1:0),D=d.low=D+te,d.high=A+ke+(D>>>0>>0?1:0),N=f.low=N+Ce,f.high=M+Re+(N>>>0>>0?1:0),z=h.low=z+me,h.high=P+pe+(z>>>0>>0?1:0),k=u.low=k+be,u.high=X+se+(k>>>0>>0?1:0),U=E.low=U+fe,E.high=F+ae+(U>>>0>>0?1:0),B=x.low=B+ie,x.high=L+Fe+(B>>>0>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,t=this._nDataBytes*8,a=r.sigBytes*8;i[a>>>5]|=128<<24-a%32,i[(a+128>>>10<<5)+30]=Math.floor(t/4294967296),i[(a+128>>>10<<5)+31]=t,r.sigBytes=i.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var r=y.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=y._createHelper(l),v.HmacSHA512=y._createHmacHelper(l)}(),I.SHA512})},"24hK":function(j,H,b){"use strict";b.d(H,"a",function(){return v});class I{constructor(T){this.element=T,this.next=I.Undefined,this.prev=I.Undefined}}I.Undefined=new I(void 0);class v{constructor(){this._first=I.Undefined,this._last=I.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===I.Undefined}clear(){let T=this._first;for(;T!==I.Undefined;){const y=T.next;T.prev=I.Undefined,T.next=I.Undefined,T=y}this._first=I.Undefined,this._last=I.Undefined,this._size=0}unshift(T){return this._insert(T,!1)}push(T){return this._insert(T,!0)}_insert(T,y){const g=new I(T);if(this._first===I.Undefined)this._first=g,this._last=g;else if(y){const _=this._last;this._last=g,g.prev=_,_.next=g}else{const _=this._first;this._first=g,g.next=_,_.prev=g}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(g))}}shift(){if(this._first===I.Undefined)return;{const T=this._first.element;return this._remove(this._first),T}}pop(){if(this._last===I.Undefined)return;{const T=this._last.element;return this._remove(this._last),T}}_remove(T){if(T.prev!==I.Undefined&&T.next!==I.Undefined){const y=T.prev;y.next=T.next,T.next.prev=y}else T.prev===I.Undefined&&T.next===I.Undefined?(this._first=I.Undefined,this._last=I.Undefined):T.next===I.Undefined?(this._last=this._last.prev,this._last.next=I.Undefined):T.prev===I.Undefined&&(this._first=this._first.next,this._first.prev=I.Undefined);this._size-=1}*[Symbol.iterator](){let T=this._first;for(;T!==I.Undefined;)yield T.element,T=T.next}}},"25Vc":function(j,H,b){j.exports={wrap:"wrap___3gf4v",title:"title___BnbVm",path:"path___1Prpu",colorBlue:"colorBlue___1sUTa"}},"3/fG":function(j,H,b){"use strict";b.d(H,"a",function(){return v});function I(T,y){let g;return y.length===0?g=T:g=T.replace(/\{(\d+)\}/g,function(s,_){const p=_[0];return typeof y[p]!="undefined"?y[p]:s}),g}function v(T,y,...g){return I(y,g)}},"34/K":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_>0&3)*255/3,u[E*4+1]=(d[f+E]>>2&3)*255/3,u[E*4+2]=(d[f+E]>>4&3)*255/3,u[E*4+4]=0;d=u,f=0}return l.blitImage(_,a,e,c,d,f),n.rQskipBytes(c*t),this._lines-=c,!(this._lines>0)}}]),g}();H.default=y},"362i":function(j,H,b){j.exports=b.p+"static/passpart.cc679602.png"},"3690":function(j,H,b){"use strict";function I(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(n){return typeof n}:I=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I(e)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return T=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(e===null||I(e)!=="object"&&typeof e!="function")return{default:e};var o=T();if(o&&o.has(e))return o.get(e);var n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=l?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,o&&o.set(e,n),n}function g(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function s(e,o){for(var n=0;n0;){var d=1;if(t.rQwait("HEXTILE",d))return!1;var f=t.rQ,h=t.rQi,u=f[h];if(u>30)throw new Error("Illegal hextile subencoding (subencoding: "+u+")");var E=this._totalTiles-this._tiles,x=E%this._tilesX,O=Math.floor(E/this._tilesX),C=n+x*16,w=l+O*16,S=Math.min(16,n+r-C),A=Math.min(16,l+i-w);if(u&1)d+=S*A*4;else if(u&2&&(d+=4),u&4&&(d+=4),u&8){if(d++,t.rQwait("HEXTILE",d))return!1;var D=f[h+d-1];u&16?d+=D*(4+2):d+=D*2}if(t.rQwait("HEXTILE",d))return!1;if(h++,u===0)this._lastsubencoding&1?v.Debug(" Ignoring blank after RAW"):a.fillRect(C,w,S,A,this._background);else if(u&1)a.blitImage(C,w,S,A,f,h),h+=d-1;else{if(u&2&&(this._background=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),u&4&&(this._foreground=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),a.startTile(C,w,S,A,this._background),u&8){var M=f[h];h++;for(var N=0;N>4,k=z&15,F=f[h];h++;var U=(F>>4)+1,L=(F&15)+1;a.subTile(X,k,U,L,P)}}a.finishTile()}t.rQi=h,this._lastsubencoding=u,this._tiles--}return!0}}]),e}();H.default=p},"3y9D":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.Hasher,s=v.algo,_=[],p=s.SHA1=g.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,o){for(var n=this._hash.words,l=n[0],r=n[1],i=n[2],t=n[3],a=n[4],c=0;c<80;c++){if(c<16)_[c]=e[o+c]|0;else{var d=_[c-3]^_[c-8]^_[c-14]^_[c-16];_[c]=d<<1|d>>>31}var f=(l<<5|l>>>27)+a+_[c];c<20?f+=(r&i|~r&t)+1518500249:c<40?f+=(r^i^t)+1859775393:c<60?f+=(r&i|r&t|i&t)-1894007588:f+=(r^i^t)-899497514,a=t,t=i,i=r<<30|r>>>2,r=l,l=f}n[0]=n[0]+l|0,n[1]=n[1]+r|0,n[2]=n[2]+i|0,n[3]=n[3]+t|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,o=e.words,n=this._nDataBytes*8,l=e.sigBytes*8;return o[l>>>5]|=128<<24-l%32,o[(l+64>>>9<<4)+14]=Math.floor(n/4294967296),o[(l+64>>>9<<4)+15]=n,e.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var e=g.clone.call(this);return e._hash=this._hash.clone(),e}});v.SHA1=g._createHelper(p),v.HmacSHA1=g._createHmacHelper(p)}(),I.SHA1})},4:function(j,H){},"4K8j":function(j,H,b){"use strict";b.r(H);var I=b("14J3"),v=b("BMrR"),T=b("jCWc"),y=b("kPKH"),g=b("q1tI"),s=b.n(g),_=b("bntm"),p=b("1vsH"),e=b("0/SM"),o=b.n(e),n=b("2qtc"),l=b("kLXV"),r=b("+L6B"),i=b("2/Rp"),t=b("T2oS"),a=b("W9HT"),c=b("lUTK"),d=b("BvKs"),f=b("miYZ"),h=b("tsqr"),u=b("9og8"),E=b("5Dmo"),x=b("3S7+"),O=b("k1fw"),C=b("tJVT"),w=b("PpiC"),S=b("Znn+"),A=b("ZTPi"),D=b("WmNS"),M=b.n(D),N=b("5DcX"),P=b.n(N),z=b("Ty5D"),X=b("9kvl"),k=b("oBTY"),F=b("qVdP"),U=b("jsC+"),L=b("ozfa"),B=b("MJZm"),Z=b("IZBM"),re=b("P5Jw"),he=b("5NDa"),Se=b("5rEg"),ke=b("y8nQ"),te=b("Vl3Y"),Re=b("FfZY"),Ce=b.n(Re),pe=function(ze){var xt=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,gt=ze.dispatch,Xt=ze.taskData,jt=ze.isRepository,Ut=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","taskData","isRepository"]),It=Object(z.h)(),Kt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),rn=Object(g.useState)({}),zt=Object(C.a)(rn,2),$t=zt[0],Pn=zt[1],fn=Object(g.useRef)(),In=te.a.useForm(),on=Object(C.a)(In,1),Cn=on[0],Hn=Object(g.useState)(""),Qn=Object(C.a)(Hn,2),Vt=Qn[0],xn=Qn[1];Object(g.useEffect)(function(){Ut.visible&&Cn.resetFields()},[Ut.visible]),Object(g.useEffect)(function(){var Ar=sessionStorage.getItem("pathArray");if(Ar){var $n=Ar.split(",").join("/"),ce=$n.indexOf("/")===0?$n.substr(1):$n;xn(ce)}},[]),Object(g.useEffect)(function(){var Ar,$n;fn.current=(Ar=It.pathname)===null||Ar===void 0||(($n=Ar.split("/"))===null||$n===void 0)?void 0:$n[2]},[]);var er=function(){var Ar=Object(u.a)(M.a.mark(function $n(){var ce,V,J=arguments;return M.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return ce=J.length>0&&J[0]!==void 0?J[0]:{},Te.next=3,gt({type:"shixunsDetail/addRepositoryFile",payload:{id:Xt.myshixun.identifier,message:ce.commitMessage,content:"",path:(Ut.defaultPath?Ut.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),secret_repository:jt?void 0:!0}});case 3:V=Te.sent,(V==null?void 0:V.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),Ut.onOK({path:(Ut.defaultPath?Ut.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),name:ce.path.split("/")[ce.path.split("/").length-1]}),Ut.onClose());case 5:case"end":return Te.stop()}},$n)}));return function(){return Ar.apply(this,arguments)}}(),ar=function(){var $n,ce;X.d.push("/shixuns/".concat(fn.current,"/").concat(($n=It.pathname)===null||$n===void 0||((ce=$n.split("/"))===null||ce===void 0)?void 0:ce[3]).concat(Vt?"/master/shixun_show/".concat(Vt):""))};return s.a.createElement(l.a,{width:"60%",centered:!0,visible:Ut.visible,wrapClassName:Ce.a.modal,onOk:function(){Cn.submit()},onCancel:Ut.onClose,title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Cn,scrollToFirstError:!0,layout:"vertical",onFinish:er,onChange:function(){var $n,ce,V,J,ee=Object(O.a)({},Cn.getFieldsValue()),Te=ee==null||(($n=ee.path)===null||$n===void 0)?void 0:$n.split(""),ue=ee==null||((ce=ee.file)===null||ce===void 0)?void 0:ce.split("");Te!=null&&(V=Te.filter(function(nt){return nt=="/"}))!==null&&V!==void 0&&V.length&&(ee.path=ee.path.substring(0,ee.path.length-1)),ue!=null&&(J=ue.filter(function(nt){return nt=="/"}))!==null&&J!==void 0&&J.length&&(ee.file=ee.file.substring(0,ee.path.length-1)),Cn.setFieldsValue(Object(O.a)({},ee)),Pn(ee)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Ce.a.filePath},Ut.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0",size:"large"}))))),s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\uFF1A",name:"file"},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\uFF0C\u5982\u679C\u4E0D\u586B\u5199\u7CFB\u7EDF\u5C06\u5728\u6587\u4EF6\u5939\u4E0B\u521B\u5EFA.gitkeep\u7684\u9ED8\u8BA4\u6587\u4EF6",size:"large"})),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"}))))))},me=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:xt.models.index}})(pe),se=b("7ahc"),be=function(ze){var xt=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,gt=ze.taskData,Xt=ze.dispatch,jt=ze.isRepository,Ut=ze.onClose,It=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository","onClose"]),Kt=Object(z.h)(),rn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),zt=Object(g.useState)({}),$t=Object(C.a)(zt,2),Pn=$t[0],fn=$t[1],In=Object(g.useRef)(),on=te.a.useForm(),Cn=Object(C.a)(on,1),Hn=Cn[0],Qn=Object(g.useState)(""),Vt=Object(C.a)(Qn,2),xn=Vt[0],er=Vt[1];Object(g.useEffect)(function(){It.visible&&Hn.resetFields()},[It.visible]),Object(g.useEffect)(function(){var $n=sessionStorage.getItem("pathArray");if($n){var ce=$n.split(",").join("/"),V=ce.indexOf("/")===0?ce.substr(1):ce;er(V)}},[]),Object(g.useEffect)(function(){var $n,ce;In.current=($n=Kt.pathname)===null||$n===void 0||((ce=$n.split("/"))===null||ce===void 0)?void 0:ce[2]},[]);var ar=function(){var $n=Object(u.a)(M.a.mark(function ce(){var V,J,ee=arguments;return M.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return V=ee.length>0&&ee[0]!==void 0?ee[0]:{},ue.next=3,Object(Z.b)({id:gt.myshixun.identifier,message:V.commitMessage,content:V.codeMirror,path:(It.defaultPath?It.defaultPath+"/":"")+V.path,secret_repository:jt?void 0:!0});case 3:J=ue.sent,(J==null?void 0:J.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),It.onOK({path:(It.defaultPath?It.defaultPath+"/":"")+V.path,name:V.path.split("/")[V.path.split("/").length-1]}),Ut());case 5:case"end":return ue.stop()}},ce)}));return function(){return $n.apply(this,arguments)}}(),Ar=function(){var ce,V;X.d.push("/shixuns/".concat(In.current,"/").concat((ce=Kt.pathname)===null||ce===void 0||((V=ce.split("/"))===null||V===void 0)?void 0:V[3]).concat(xn?"/master/shixun_show/".concat(xn):""))};return s.a.createElement(l.a,{width:"60%",visible:It.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Hn.submit()},onCancel:Ut,title:"\u65B0\u5EFA\u6587\u4EF6"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Hn,scrollToFirstError:!0,layout:"vertical",onFinish:ar,onChange:function(){var ce,V,J=Object(O.a)({},Hn.getFieldsValue()),ee=J==null||((ce=J.path)===null||ce===void 0)?void 0:ce.split("");(ee==null||((V=ee.filter(function(Te){return Te=="/"}))===null||V===void 0)?void 0:V.length)>1&&(J.path=J.path.substring(0,J.path.length-1)),Hn.setFieldsValue(Object(O.a)({},J)),fn(J)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Ce.a.filePath},It.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large"}))))),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"})),s.a.createElement("div",{className:"mt10 mb20"},s.a.createElement(te.a.Item,{name:"codeMirror",label:"\u6587\u4EF6\u5185\u5BB9\uFF1A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},s.a.createElement(se.a,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}})))))))},ae=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:xt.models.index}})(be),fe=function(ze){var xt=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,gt=ze.dispatch,Xt=ze.isRepository,jt=ze.taskData,Ut=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository","taskData"]),It=Object(z.h)(),Kt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),rn=Object(g.useState)({}),zt=Object(C.a)(rn,2),$t=zt[0],Pn=zt[1],fn=Object(g.useRef)(),In=te.a.useForm(),on=Object(C.a)(In,1),Cn=on[0],Hn=Object(g.useState)(""),Qn=Object(C.a)(Hn,2),Vt=Qn[0],xn=Qn[1],er=Object(g.useState)(""),ar=Object(C.a)(er,2),Ar=ar[0],$n=ar[1];Object(g.useEffect)(function(){Ut.visible&&Cn.resetFields()},[Ut.visible]),Object(g.useEffect)(function(){var J=Ut.defaultPath.split("/");J.length===1?(xn(""),$n(Ut.defaultPath)):($n(J.pop()),xn(J.join("/")+"/"))},[Ut.defaultPath]),Object(g.useEffect)(function(){var J,ee;fn.current=(J=It.pathname)===null||J===void 0||((ee=J.split("/"))===null||ee===void 0)?void 0:ee[2]},[]);var ce=function(){var J=Object(u.a)(M.a.mark(function ee(){var Te,ue,nt,kt=arguments;return M.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ue=kt.length>0&&kt[0]!==void 0?kt[0]:{},sn.next=3,Object(Z.w)({id:jt==null||((Te=jt.shixun)===null||Te===void 0)?void 0:Te.identifier,from:Ut.defaultPath,to:Vt+ue.path,message:ue.commitMessage||"".concat(Ut.defaultPath," rename to ").concat(Vt).concat(ue.path," ")});case 3:nt=sn.sent,(nt==null?void 0:nt.status)===0&&(h.b.success("\u64CD\u4F5C\u6210\u529F"),Ut.onOK({path:ue.path,name:ue.path}),Ut.onClose());case 5:case"end":return sn.stop()}},ee)}));return function(){return J.apply(this,arguments)}}(),V=function(){var ee,Te;X.d.push("/shixuns/".concat(fn.current,"/").concat((ee=It.pathname)===null||ee===void 0||((Te=ee.split("/"))===null||Te===void 0)?void 0:Te[3]).concat(Vt?"/master/shixun_show/".concat(Vt):""))};return s.a.createElement(l.a,{width:"40%",visible:Ut.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Cn.submit()},onCancel:Ut.onClose,title:"\u63D0\u4EA4\u8BF4\u660E"},s.a.createElement("section",{className:Ce.a.bg},s.a.createElement("div",{className:Ce.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Cn,scrollToFirstError:!0,layout:"vertical",onFinish:ce,onChange:function(){var ee,Te,ue=Object(O.a)({},Cn.getFieldsValue()),nt=ue==null||((ee=ue.path)===null||ee===void 0)?void 0:ee.split("");(nt==null||((Te=nt.filter(function(kt){return kt=="/"}))===null||Te===void 0)?void 0:Te.length)>1&&(ue.path=ue.path.substring(0,ue.path.length-1)),Cn.setFieldsValue(Object(O.a)({},ue)),Pn(ue)}},s.a.createElement(te.a.Item,{label:"\u91CD\u547D\u540D\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large",defaultValue:Ar}))))),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage"},s.a.createElement(Se.a,{placeholder:"\u5982\u4E0D\u586B\u5199\uFF0C\u9ED8\u8BA4\u63D0\u4EA4\u4FE1\u606F\u662F\uFF08".concat(Ut.defaultPath," rename to \u65B0\u7684\u540D\u79F0 \uFF09"),size:"large"}))))))},Fe=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:xt.models.index}})(fe),ie=b("DZo9"),q=b("8z0m"),Q=b("m3rI"),Y=b("8j3D"),oe=b("25Vc"),le=b.n(oe),Ee=q.a.Dragger,Le=function(ze){var xt,ht=ze.shixunsDetail,Bt=ze.globalSetting,Ht=ze.loading,gt=ze.user,Xt=ze.taskData,jt=ze.dispatch,Ut=ze.isRepository,It=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository"]),Kt=Object(z.h)(),rn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),zt=Object(g.useState)({}),$t=Object(C.a)(zt,2),Pn=$t[0],fn=$t[1],In=Object(g.useRef)(),on=te.a.useForm(),Cn=Object(C.a)(on,1),Hn=Cn[0],Qn=Object(g.useState)([]),Vt=Object(C.a)(Qn,2),xn=Vt[0],er=Vt[1],ar=Object(g.useState)(),Ar=Object(C.a)(ar,2),$n=Ar[0],ce=Ar[1],V;Object(g.useEffect)(function(){It.visible&&(Hn.resetFields(),er([]))},[It.visible]),Object(g.useEffect)(function(){In.current=rn.id},[]),Object(g.useEffect)(function(){var kt=sessionStorage.getItem("pathArray");if(kt){var Yt=kt.split(",").join("/"),sn=Yt.indexOf("/")===0?Yt.substr(1):Yt;ce(sn)}},[]);var J=function(Yt){if(V=Yt.file.name,Yt.file.status==="done"||Yt.file.status==="uploading"){var sn,Qt,kn;if(er(Yt.fileList),!Yt.file.response)return;if(((sn=Yt.file.response)===null||sn===void 0?void 0:sn.status)===0){h.b.success("\u4E0A\u4F20\u6210\u529F\uFF01");return}er(xn.filter(function(Vn){return Vn.uid!==Yt.file.uid})),((Qt=Yt.file.response)===null||Qt===void 0?void 0:Qt.message)&&h.b.info((kn=Yt.file.response)===null||kn===void 0?void 0:kn.message)}},ee=function(){var kt=Object(u.a)(M.a.mark(function Yt(sn){var Qt;return M.a.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:if(sn.response){Vn.next=3;break}return h.b.info("\u8FD8\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u65E0\u6CD5\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF01"),Vn.abrupt("return");case 3:return Vn.next=5,jt({type:"shixunsDetail/deleteGitFile",payload:{id:rn.id,path:$n?"".concat($n,"/").concat(sn.name):sn.name,message:Hn.getFieldValue("commitMessage")||"\u5220\u9664\u4E86".concat($n?"".concat($n,"/").concat(sn.name):sn.name),secret_repository:Ut?null:!0}});case 5:Qt=Vn.sent,Qt.status===0&&(er(xn.filter(function(lr){return lr.uid!==sn.uid})),h.b.info("\u5220\u9664\u6210\u529F"));case 7:case"end":return Vn.stop()}},Yt)}));return function(sn){return kt.apply(this,arguments)}}(),Te={height:300,multiple:!0,withCredentials:!0,data:function(){var kt=Object(u.a)(M.a.mark(function sn(){return M.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.abrupt("return",new Promise(function(){var Vn=Object(u.a)(M.a.mark(function lr(Or,vr){return M.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:setTimeout(Object(u.a)(M.a.mark(function Ji(){var Gr,si;return M.a.wrap(function(Fi){for(;;)switch(Fi.prev=Fi.next){case 0:return Fi.next=2,Hn.getFieldsValue();case 2:Gr=Fi.sent,si=Object(O.a)(Object(O.a)({},{path:It.defaultPath?It.defaultPath:"",message:Pn.commitMessage||"\u4E0A\u4F20\u4E86".concat(V)}),Ut?{}:{secret_repository:!0}),Or(si);case 5:case"end":return Fi.stop()}},Ji)})),200);case 1:case"end":return Sr.stop()}},lr)}));return function(lr,Or){return Vn.apply(this,arguments)}}()));case 1:case"end":return kn.stop()}},sn)}));function Yt(){return kt.apply(this,arguments)}return Yt}(),fileList:xn,method:"post",action:"".concat(Q.a.API_SERVER,"/api/myshixuns/").concat(Xt==null||((xt=Xt.myshixun)===null||xt===void 0)?void 0:xt.identifier,"/upload_git_file.json"),onChange:J,onRemove:ee,beforeUpload:function(Yt){V=Yt.name}},ue=function(){var kt=Object(u.a)(M.a.mark(function Yt(sn){return M.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Hn.validateFields();case 2:It.onClose(),It.onOK({path:It.defaultPath}),nt();case 5:case"end":return kn.stop()}},Yt)}));return function(sn){return kt.apply(this,arguments)}}(),nt=function(){};return s.a.createElement(l.a,{visible:It.visible,onOk:ue,centered:!0,onCancel:It.onClose,width:"70%"},s.a.createElement("section",{className:le.a.bg},s.a.createElement("div",{className:le.a.wrap},s.a.createElement("div",{className:le.a.title},"\u4E0A\u4F20\u6587\u4EF6"),s.a.createElement(te.a,{className:"mt10",form:Hn,scrollToFirstError:!0,layout:"vertical",onFinish:ue,onValuesChange:function(){return fn(Object(O.a)({},Hn.getFieldsValue()))}},s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u5FC5\u586B\uFF0C\u63CF\u8FF0\u4E3B\u8981\u4FEE\u6539\u5185\u5BB9\uFF08\u76F8\u5F53\u4E8EGit Commit message\u7684Header\uFF09"})),s.a.createElement(te.a.Item,{label:"\u9009\u62E9\u6587\u4EF6",name:"file",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6"}]},s.a.createElement(Ee,Te,s.a.createElement("div",null,s.a.createElement("i",{className:"iconfont icon-shangchuan font50 ".concat(le.a.colorBlue)})),s.a.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",s.a.createElement("span",{className:"".concat(le.a.colorBlue," ml5")},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))))),s.a.createElement(Y.a,{onFinish:function(Yt){return ce(Yt)}})))},ge=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:xt.models.index}})(Le),De=b("aVK0"),_e=b.n(De),Xe=b("TXba"),tt=b.n(Xe),Ge=function(ze){var xt=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.dispatch,gt=ze.title,Xt=ze.pathList,jt=Xt===void 0?[]:Xt,Ut=ze.showInputPath,It=Ut===void 0?!1:Ut,Kt=ze.isMergeSelectFile,rn=Kt===void 0?!1:Kt,zt=ze.onFinish,$t=zt===void 0?function(){}:zt,Pn=te.a.useForm(),fn=Object(C.a)(Pn,1),In=fn[0],on=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),Cn=Object(z.h)(),Hn=Object(g.useRef)(),Qn=Object(g.useState)(""),Vt=Object(C.a)(Qn,2),xn=Vt[0],er=Vt[1],ar=Object(g.useState)(""),Ar=Object(C.a)(ar,2),$n=Ar[0],ce=Ar[1],V=Object(g.useState)([]),J=Object(C.a)(V,2),ee=J[0],Te=J[1],ue=Object(g.useState)([]),nt=Object(C.a)(ue,2),kt=nt[0],Yt=nt[1];Object(g.useEffect)(function(){var Or,vr;Hn.current=((Or=Cn.pathname)===null||Or===void 0||((vr=Or.split("/"))===null||vr===void 0)?void 0:vr[3])==="repository"},[]),Object(g.useEffect)(function(){if(xt.actionTabs.key!=="Repository-SelectFilePath")return;var Or=jt.join("/"),vr=[];jt.map(function(or,Sr){Sr===0?vr.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(or),path:Or}):vr.push({val:"/".concat(or),path:Or})}),Te(vr),er(Or),ce(Or),sn(Or)},[xt.actionTabs.key]);var sn=function(){var Or=Object(u.a)(M.a.mark(function vr(or){var Sr;return M.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return Gr.next=2,Ht({type:Hn.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:on.id,path:or}});case 2:Sr=Gr.sent,Sr&&Yt(Sr.trees||[]);case 4:case"end":return Gr.stop()}},vr)}));return function(or){return Or.apply(this,arguments)}}(),Qt=function(vr){var or=xn;vr.type==="tree"&&(ee.length?ee.push({val:"/".concat(vr.name),path:vr.name}):ee.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(vr.name),path:vr.name}),Te(ee),or=xn?"".concat(xn,"/").concat(vr.name):vr.name,er(or)),sn(or)},kn=function(vr,or){var Sr=ee.filter(function(Gr,si){return si<=or});Te(Sr);var Ji=Sr.filter(function(Gr,si){return si!==0}).map(function(Gr){return Gr.val}).join("").substr(1);er(Ji),sn(Ji)},Vn=function(){var Or=Object(u.a)(M.a.mark(function vr(){var or,Sr,Ji;return M.a.wrap(function(si){for(;;)switch(si.prev=si.next){case 0:if(or=In==null?void 0:In.getFieldsValue(),Sr=xn?"".concat(xn).concat(or!=null&&or.name?"/".concat(or==null?void 0:or.name):""):or==null?void 0:or.name,!rn){si.next=6;break}return $t(Sr),lr(),si.abrupt("return");case 6:if(!It){si.next=16;break}return si.next=9,In.validateFields();case 9:return si.next=11,Ht({type:"shixunsDetail/uploadGitFolder",payload:Object(O.a)(Object(O.a)({},{id:on.id,path:Sr}),Hn.current?{}:{secret_repository:!0})});case 11:Ji=si.sent,$t($n),Ji.status===0&&h.b.info("\u65B0\u5EFA\u6210\u529F"),si.next=18;break;case 16:$t(Sr),h.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:lr();case 19:case"end":return si.stop()}},vr)}));return function(){return Or.apply(this,arguments)}}(),lr=function(){Ht({type:"shixunsDetail/setActionTabs",payload:{}}),In.resetFields()};return s.a.createElement(l.a,{centered:!0,title:gt||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:xt.actionTabs.key==="Repository-SelectFilePath",onOk:Vn,onCancel:lr},s.a.createElement("div",{className:tt.a.wrap},s.a.createElement("div",{className:tt.a.content},s.a.createElement("div",{className:tt.a.mainPathWrap},!!(ee!=null&&ee.length)&&ee.map(function(Or,vr){return s.a.createElement("a",{key:vr,onClick:function(){return kn(Or,vr)}},Or.val)})),!!(kt!=null&&kt.length)&&kt.map(function(Or,vr){return Or.type==="tree"&&s.a.createElement("a",{key:vr,onClick:function(){return Qt(Or)}},s.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(tt.a.colorBlue)}),Or.name)})),s.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),s.a.createElement("div",{className:"mt5 mb5"},xn),It&&s.a.createElement(te.a,{form:In,scrollToFirstError:!0,className:"mt20"},s.a.createElement(te.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Se.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))},Me=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting;return{shixunsDetail:ze,globalSetting:ht,loading:xt.models.index}})(Ge),Et=b("GZ0F"),Oe=b("8Skl"),Ve=b("HBuW"),Je=b("LvDl"),Ye=b("NLgs"),Ne=b("lzim"),He=B.a.DirectoryTree,ve=function(ze){var xt,ht,Bt,Ht=ze.shixunsDetail,gt=ze.globalSetting,Xt=ze.loading,jt=ze.user,Ut=ze.activeKey,It=ze.dispatch,Kt=ze.taskData,rn=ze.practiceSetting,zt=ze.isRepository,$t=ze.treeData,Pn=ze.setTreeData,fn=ze.params,In=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","activeKey","dispatch","taskData","practiceSetting","isRepository","treeData","setTreeData","params"]),on=Object(z.h)(),Cn=Object(g.useState)(),Hn=Object(C.a)(Cn,2),Qn=Hn[0],Vt=Hn[1],xn=Object(g.useState)(!1),er=Object(C.a)(xn,2),ar=er[0],Ar=er[1],$n=Object(g.useState)(!1),ce=Object(C.a)($n,2),V=ce[0],J=ce[1],ee=Object(g.useState)(!1),Te=Object(C.a)(ee,2),ue=Te[0],nt=Te[1],kt=Object(g.useState)(!1),Yt=Object(C.a)(kt,2),sn=Yt[0],Qt=Yt[1],kn=Object(g.useState)(""),Vn=Object(C.a)(kn,2),lr=Vn[0],Or=Vn[1],vr=Object(g.useState)([]),or=Object(C.a)(vr,2),Sr=or[0],Ji=or[1],Gr=Object(g.useState)([]),si=Object(C.a)(Gr,2),ca=si[0],Fi=si[1],ra=Object(g.useState)([]),Ta=Object(C.a)(ra,2),po=Ta[0],io=Ta[1],wo=Object(g.useState)(!1),La=Object(C.a)(wo,2),Gi=La[0],Nr=La[1],Jr=Object(g.useState)(),bi=Object(C.a)(Jr,2),Fr=bi[0],Cr=bi[1],ti=Object(g.useState)(),_r=Object(C.a)(ti,2),li=_r[0],sr=_r[1],Hi=Object(g.useState)(""),Pi=Object(C.a)(Hi,2),Zi=Pi[0],mo=Pi[1],Vi=Object(g.useState)(),Wa=Object(C.a)(Vi,2),Ma=Wa[0],ni=Wa[1],Ho=Object(g.useState)(!1),Xa=Object(C.a)(Ho,2),go=Xa[0],To=Xa[1];Object(g.useEffect)(function(){Pn([]),cr(""),localStorage.warehouseHideTip||Nr(!0)},[on.pathname,zt]),Object(g.useEffect)(function(){var On;if(Kt!=null&&(On=Kt.challenge)!==null&&On!==void 0&&On.path&&$t!==null&&$t!==void 0&&$t.length){var tn,Mn,gn,rr=Kt==null||((tn=Kt.challenge)===null||tn===void 0||((Mn=tn.path)===null||Mn===void 0))?void 0:Mn.replaceAll("\uFF1B",""),Rr=(gn=Object(Je.cloneDeep)($t))===null||gn===void 0?void 0:gn.filter(function(hi){var Ei;return hi.name===(rr==null||((Ei=rr.split("/"))===null||Ei===void 0)?void 0:Ei[0])});za(rr),($t==null?void 0:$t.length)!==1&&(console.log(Rr,"filterTreeData"),Pn(Rr))}},[Kt==null||((xt=Kt.challenge)===null||xt===void 0)?void 0:xt.path,$t]);var za=function(tn){Zn(tn),ca=[tn],Fi([tn])},Wo=function(){var On=Object(u.a)(M.a.mark(function tn(){var Mn,gn,rr=arguments;return M.a.wrap(function(hi){for(;;)switch(hi.prev=hi.next){case 0:return Mn=rr.length>0&&rr[0]!==void 0?rr[0]:"",hi.next=3,Object(Ve.Gb)({id:fn.id,secret_dir_path:Mn});case 3:gn=hi.sent,gn&&ni(Mn);case 5:case"end":return hi.stop()}},tn)}));return function(){return On.apply(this,arguments)}}(),Jn=function(tn){return s.a.createElement(d.a,{className:_e.a.menu,onClick:function(gn){Or(tn.path||"");switch(gn.key){case"1":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6"]),Ar(!0);break;case"2":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6\u5939"]),nt(!0);break;case"3":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u4E0A\u4F20"]),Qt(!0);break;case"4":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u91CD\u547D\u540D"]),J(!0);break;case"5":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u5220\u9664"]),Br(tn.path,tn.name,tn);break;case"6":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u590D\u5236\u8DEF\u5F84"]),qa(tn);break}}},(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"1"},"\u65B0\u5EFA\u6587\u4EF6"),(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"2"},"\u65B0\u5EFA\u6587\u4EF6\u5939"),(tn.type==="topTree"||tn.type==="tree")&&s.a.createElement(d.a.Item,{key:"3"},"\u4E0A\u4F20"),tn.type!=="topTree"&&tn.type!=="tree"&&s.a.createElement(d.a.Item,{key:"4"},"\u91CD\u547D\u540D"),tn.type!=="topTree"&&s.a.createElement(re.CopyToClipboard,{text:"/data/workspace/myshixun/".concat(zt?"":"secret/").concat(tn==null?void 0:tn.path),onCopy:function(){return h.b.success("\u590D\u5236\u6210\u529F")}},s.a.createElement(d.a.Item,{key:"6"},s.a.createElement(s.a.Fragment,null,"\u590D\u5236\u8DEF\u5F84"))),tn.type!=="topTree"&&s.a.createElement(d.a.Item,{key:"5"},"\u5220\u9664"))},gr=function(tn,Mn){return tn.map(function(gn){return Mn==""?gn.path=Mn+gn.name:gn.path=Mn+"/"+gn.name,gn.title=s.a.createElement(v.a,{className:"font14"},s.a.createElement(y.a,{flex:"1"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"20px"},gn.type==="blob"&&s.a.createElement("span",{className:"iconfont icon-wenjian11 font12"})),s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:" multi_ellipsis1"},gn.name)))),s.a.createElement(y.a,null,(gn.type==="blob"||gn.type==="tree")&&s.a.createElement(U.a,{overlay:Jn(gn),className:_e.a.ellipsis},s.a.createElement("i",{className:"iconfont icon-gengduo2 c-555a88"})))),gn.disableCheckbox=Qn&&Qn!==gn.name,gn.className=gn.type==="tree"?_e.a.pl23:"",gn.checkable=gn.type!=="tree",gn.isLeaf=gn.type!=="tree",gn.children=gn.type==="tree"&&[],gn.key=gn.path,gn})},Zn=function(tn){It({type:"practiceSetting/setSideBarTabs",payload:{selectPath:tn}})},Mr=function(){var On=Object(u.a)(M.a.mark(function tn(Mn,gn){var rr;return M.a.wrap(function(hi){for(;;)switch(hi.prev=hi.next){case 0:return rr=Mn.split("/"),hi.next=3,cr(lr);case 3:setTimeout(function(){Zn(Mn),Sr=[rr[0]||""],ca=[Mn],Fi(Object(k.a)(ca)),Ji(Object(k.a)(Sr))},150);case 4:case"end":return hi.stop()}},tn)}));return function(Mn,gn){return On.apply(this,arguments)}}(),Kr=function(tn,Mn){if(console.log(tn,"data"),Mn=="")Pn(Object(k.a)(tn));else{var gn=gi($t,Mn,tn);Pn(Object(k.a)(gn))}};function gi(On,tn,Mn){return On.map(function(gn){return gn.key===tn?(gn.children=Object(k.a)(Mn),Object(O.a)({},gn)):gn.children?Object(O.a)(Object(O.a)({},gn),{},{children:gi(gn.children,tn,Mn)}):gn})}var cr=function(){var On=Object(u.a)(M.a.mark(function tn(){var Mn,gn,rr,Rr,hi,Ei,Yi=arguments;return M.a.wrap(function(Xi){for(;;)switch(Xi.prev=Xi.next){case 0:return gn=Yi.length>0&&Yi[0]!==void 0?Yi[0]:"",console.log("location:",on),Xi.next=4,Object(Z.m)(Kt==null||((Mn=Kt.myshixun)===null||Mn===void 0)?void 0:Mn.identifier,{path:gn});case 4:return rr=Xi.sent,rr&&((Rr=rr.trees)!==null&&Rr!==void 0&&Rr.length?(Ei=gr(Object(k.a)(rr.trees),gn),Kr(Ei,gn),io(rr.trees||[]),sr((rr==null?void 0:rr.secret_dir_path)||""),console.log("handleGetRepository:",Ei,gn),setTimeout(function(){return console.log($t)},2e3)):gn==""&&Pn([]),Cr(((hi=rr.commits)===null||hi===void 0?void 0:hi[0])||{})),Xi.abrupt("return",rr);case 7:case"end":return Xi.stop()}},tn)}));return function(){return On.apply(this,arguments)}}(),Wi=function(){var On=Object(u.a)(M.a.mark(function tn(Mn){return M.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.abrupt("return",new Promise(function(){var Rr=Object(u.a)(M.a.mark(function hi(Ei,Yi){return M.a.wrap(function(Xi){for(;;)switch(Xi.prev=Xi.next){case 0:return Mn.children.length&&Ei(),mo(Mn.path),Xi.next=4,cr(Mn.path);case 4:Ei();case 5:case"end":return Xi.stop()}},hi)}));return function(hi,Ei){return Rr.apply(this,arguments)}}()));case 1:case"end":return rr.stop()}},tn)}));return function(Mn){return On.apply(this,arguments)}}(),ma=function(){var On=Object(u.a)(M.a.mark(function tn(Mn,gn){var rr,Rr;return M.a.wrap(function(Ei){for(;;)switch(Ei.prev=Ei.next){case 0:if(console.log("handleSelectTree",Mn,gn.nativeEvent.target.nodeName,gn),rr=function(){Zn(gn.node.path),Mn=[gn.node.path],Fi(Object(k.a)(Mn))},!(gn.nativeEvent.target.nodeName==="svg"||gn.nativeEvent.target.nodeName==="LI"||gn.nativeEvent.target.nodeName==="I")){Ei.next=4;break}return Ei.abrupt("return");case 4:gn.node.type==="blob"&&(rn!=null&&(Rr=rn.sideBar)!==null&&Rr!==void 0&&Rr.confirmLeave?l.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){rr(),It({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})}}):rr());case 5:case"end":return Ei.stop()}},tn)}));return function(Mn,gn){return On.apply(this,arguments)}}(),Br=function(tn,Mn,gn){l.a.confirm({centered:!0,title:"\u786E\u8BA4\u9700\u8981\u5220\u9664\u8BE5\u6587\u4EF6".concat(gn.children?"\u5939":"","?"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var rr=Object(u.a)(M.a.mark(function hi(){var Ei,Yi,Ni,Xi;return M.a.wrap(function(xa){for(;;)switch(xa.prev=xa.next){case 0:return xa.next=2,Object(Z.h)({id:Kt==null||((Ei=Kt.myshixun)===null||Ei===void 0)?void 0:Ei.identifier,path:tn,message:"\u5220\u9664".concat(tn)});case 2:if(Yi=xa.sent,Ni=tn.split("/"),!((Yi==null?void 0:Yi.status)===0)){xa.next=20;break}return h.b.info("\u5220\u9664\u6210\u529F"),Ni.splice(Ni.length-1,1),xa.next=9,cr(Ni.length>1?Ni.join("/"):"");case 9:if(Xi=xa.sent,!(Xi!=null&&Xi.trees)){xa.next=13;break}xa.next=16;break;case 13:return Ni.splice(Ni.length-1,1),xa.next=16,cr(Ni.length>1?Ni.join("/"):"");case 16:return Zn(""),xa.abrupt("return",!0);case 20:(Yi==null?void 0:Yi.status)===-3&&l.a.info({title:"\u5220\u9664\u5931\u8D25",content:s.a.createElement("div",null,"\u8BE5\u6587\u4EF6\u201C",tn,"\u201D\u5DF2\u7ECF\u88AB\u4EFB\u52A1\u5173\u5361\u7684\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u6216\u8BC4\u6D4B\u6267\u884C\u6587\u4EF6\u4F7F\u7528\uFF0C\u8BF7\u5148\u4FEE\u6539\u4EFB\u52A1\u5173\u5361\u4E2D\u8BC4\u6D4B\u8BBE\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u540E\u518D\u5220\u9664\u3002"),okText:"\u6211\u77E5\u9053\u4E86",onOk:function(){}});case 21:case"end":return xa.stop()}},hi)}));function Rr(){return rr.apply(this,arguments)}return Rr}()})},qa=function(tn){console.log(tn,"item")},ci=function(){var On=Object(u.a)(M.a.mark(function tn(Mn,gn){return M.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:if(console.log("handleExpand",gn),!(gn.nativeEvent.target.nodeName==="svg"||gn.nativeEvent.target.nodeName==="path"||gn.nativeEvent.target.nodeName==="LI")){Rr.next=5;break}return Rr.abrupt("return",!0);case 5:return Rr.next=7,Wi(gn.node);case 7:Sr.includes(gn.node.path)?Sr.splice(Sr.indexOf(gn.node.path),1):Sr.push(gn.node.path);case 8:Ji(Object(k.a)(Sr));case 9:case"end":return Rr.stop()}},tn)}));return function(Mn,gn){return On.apply(this,arguments)}}(),Oi=function(){Nr(!1),localStorage.warehouseHideTip=!0},ga=function(){var On=Object(u.a)(M.a.mark(function tn(Mn){var gn,rr,Rr,hi,Ei;return M.a.wrap(function(Ni){for(;;)switch(Ni.prev=Ni.next){case 0:Rr="",Ni.t0=zt,Ni.next=Ni.t0===!0?4:Ni.t0===!1?9:11;break;case 4:return Rr="\u5F00\u542F\u7248\u672C\u5E93",hi="\u5F00\u542F",Ei="\u4E0D\u5F00\u542F",rr=s.a.createElement("div",null,"\u65B0\u5EFA\u5B9E\u8DF5\u9898\u5173\u5361\u65F6\uFF0C\u9700\u8981\u4F7F\u7528\u4EE3\u7801\u4ED3\u5E93\uFF1B\u5982\u679C\u53EA\u6709\u9009\u62E9\u9898\u5173\u5361\uFF0C\u5219\u4E0D\u9700\u8981\u4EE3\u7801\u4ED3\u5E93\u3002\u4EE3\u7801\u4ED3\u5E93\u542F\u7528\u540E\uFF0C\u5C06\u65E0\u6CD5\u5173\u95ED\u3002"),Ni.abrupt("break",11);case 9:return Ht!=null&&(gn=Ht.detail)!==null&&gn!==void 0&&gn.secret_repository?(Rr="\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",hi="\u786E\u5B9A",Ei="\u53D6\u6D88",rr=s.a.createElement("div",null,"\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u540E\uFF0C\u5DF2\u521B\u5EFA\u7684\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u53CA\u5176\u5185\u5BB9\uFF0C\u5C06\u88AB\u5220\u9664\u3002\u786E\u8BA4\u8981\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\uFF1F")):(Rr="\u5F00\u542F\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",hi="\u4E0D\u4F7F\u7528",Ei="\u4F7F\u7528",rr=s.a.createElement("div",null,"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002\u9002\u7528\u4E8E\u547D\u4EE4\u884C\u3001\u56FE\u5F62\u5316\u684C\u9762\u4E24\u7C7B\u5B9E\u8BAD\uFF0C\u5176\u4ED6\u7C7B\u578B\u5B9E\u8BAD\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u79C1\u5BC6\u7248\u672C\u5E93\u3002")),Ni.abrupt("break",11);case 11:if(!(!zt&&Object(Ye.b)(It,"\u4E0D\u80FD\u5F00\u542F/\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"))){Ni.next=13;break}return Ni.abrupt("return");case 13:l.a.confirm({title:Rr,okText:hi,cancelText:Ei,content:rr,onOk:function(){var Ao;Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93",Rr]),!zt&&!(Ht!=null&&(Ao=Ht.detail)!==null&&Ao!==void 0&&Ao.secret_repository)||Pa(Mn)},onCancel:function(){var Ao;!zt&&!(Ht!=null&&(Ao=Ht.detail)!==null&&Ao!==void 0&&Ao.secret_repository)&&Pa(Mn)}});case 14:case"end":return Ni.stop()}},tn)}));return function(Mn){return On.apply(this,arguments)}}(),Pa=function(){var On=Object(u.a)(M.a.mark(function tn(Mn){return M.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(!zt){rr.next=6;break}return rr.next=3,Object(Ve.r)(Object(O.a)({},fn));case 3:It({type:"practiceSetting/getCommonData",payload:Object(O.a)({},fn)}),rr.next=8;break;case 6:return rr.next=8,Object(Ve.t)(Object(O.a)(Object(O.a)({},fn),{},{is_secret_repository:Mn}));case 8:cr(),It({type:"shixunsDetail/getShixunsDetail",payload:{id:fn.id}});case 10:case"end":return rr.stop()}},tn)}));return function(Mn){return On.apply(this,arguments)}}(),Xo=function(tn){console.log(tn)},di=function(){var On=Object(u.a)(M.a.mark(function tn(Mn){var gn,rr,Rr,hi,Ei,Yi,Ni,Xi,Ao,xa,Ls;return M.a.wrap(function(wa){for(;;)switch(wa.prev=wa.next){case 0:if(console.log(Mn),gn=Mn.node.key,rr=Mn.dragNode.key,Rr=Mn.node.pos.split("-"),hi=Mn.dropPosition-Number(Rr[Rr.length-1]),!(Mn.node.type!=="tree"||Mn.dragNode.path.split("/").length===1)){wa.next=8;break}return h.b.warn("\u672A\u79FB\u52A8\u6587\u4EF6\u76EE\u5F55\u4F4D\u7F6E"),wa.abrupt("return");case 8:return wa.next=10,It({type:"shixunsDetail/moveGitFile",payload:{id:fn.id,from:Mn.dragNode.path,to:Mn.node.path+"/"+Mn.dragNode.name,message:"".concat(Mn.dragNode.path," move to ").concat(Mn.node.path+"/"+Mn.dragNode.name," ")}});case 10:if(Ei=wa.sent,!(Ei.status===0)){wa.next=22;break}return Zn(""),Yi=Mn.dragNode.path.split("/"),Yi.pop(),wa.next=17,cr(Mn.node.path);case 17:return wa.next=19,cr(Yi.join("/"));case 19:return Yi.pop(),wa.next=22,cr(Yi.join("/"));case 22:return wa.abrupt("return");case 28:case"end":return wa.stop()}},tn)}));return function(Mn){return On.apply(this,arguments)}}();return s.a.createElement("section",{className:_e.a.bg},s.a.createElement("div",{className:_e.a.contentbg},s.a.createElement("div",{className:_e.a.wrap},s.a.createElement(v.a,{className:_e.a.gitCode},s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:"iconfont icon-daimacangku2 mr8"}),zt?"\u4EE3\u7801\u4ED3\u5E93":"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(y.a,null,s.a.createElement(U.a,{overlay:Jn({type:"topTree"}),className:"current"},s.a.createElement(x.a,{visible:Gi,title:s.a.createElement("div",{className:"font16"},s.a.createElement(Et.a,{style:{position:"relative",left:-35},onClick:function(){return Oi()}}),"\u70B9\u51FB\u6B64\u5904\u65B0\u5EFA\u6587\u4EF6\u3001\u65B0\u5EFA\u6587\u4EF6\u5939\u3001\u4E0A\u4F20\u6587\u4EF6\u3002",s.a.createElement("span",{onClick:function(){return Oi()},className:"iconfont icon-guanbi1 ml8 current font14"})),overlayClassName:_e.a.overlayClass,overlayStyle:{maxWidth:500},arrowPointAtCenter:!0,placement:"right",color:"#F7B500"})))),!!$t.length&&!zt&&s.a.createElement("div",{className:"mt20 pl20 pr20 font14 c-white"},s.a.createElement("div",null,"\u5B9E\u8BAD\u8BC4\u6D4B\u7684\u65F6\u5019\uFF0C\u7CFB\u7EDF\u4F1A\u4E34\u65F6\u5C06\u79C1\u5BC6\u4EE3\u7801\u5E93\u79FB\u52A8\u666E\u901A\u4EE3\u7801\u5E93\u7684secret\u76EE\u5F55\u4E0B\u9762\uFF0C\u8BC4\u6D4B\u7ED3\u675F\u4F1A\u6E05\u7A7Asecret\u76EE\u5F55\u5185\u5BB9\u3002\u5982\u679C\u79C1\u5BC6\u4EE3\u7801\u5E93\u4E2D\u5B58\u5728\u6587\u4EF6src/test.sh\uFF0C\u5728\u666E\u901A\u4EE3\u7801\u5E93\u8C03\u7528\u8BE5\u6587\u4EF6\u5219\u4F7F\u7528\u8DEF\u5F84\uFF1Asecret/src/test.sh")),$t.length?s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:_e.a.content},s.a.createElement(He,{disabled:!!Xt.effects["shixunsDetail/getFileContent"],multiple:!0,showIcon:!1,treeData:$t,switcherIcon:s.a.createElement(Oe.a,{style:{fontWeight:"bold",fontSize:14,position:"relative",top:3,marginLeft:22}}),onExpand:ci,expandedKeys:Sr,selectedKeys:ca,onSelect:ma,draggable:!0,onDragEnter:Xo,onDrop:di,allowDrop:function(tn){var Mn=tn.dropNode,gn=tn.dropPosition;return!1}}))):"",!$t.length&&zt&&(Ht==null||((ht=Ht.detail)===null||ht===void 0)?void 0:ht.init_repository)&&s.a.createElement(xe,null),!$t.length&&!zt&&(Ht==null||((Bt=Ht.detail)===null||Bt===void 0)?void 0:Bt.secret_repository)&&s.a.createElement(xe,null))),s.a.createElement(Fe,{taskData:Kt,visible:V,defaultPath:lr,onClose:function(){return J(!1)},isRepository:!zt,onOK:function(){var On=Object(u.a)(M.a.mark(function tn(Mn){var gn;return M.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return gn=lr.split("/"),gn.pop(),Rr.next=4,cr(gn.join("/"));case 4:Zn("");case 5:case"end":return Rr.stop()}},tn)}));return function(tn){return On.apply(this,arguments)}}()}),s.a.createElement(ae,{taskData:Kt,visible:ar,defaultPath:lr,onClose:function(){return Ar(!1)},isRepository:zt,onOK:function(tn){Mr(tn.path,tn.name)}}),s.a.createElement(me,{taskData:Kt,visible:ue,defaultPath:lr,onClose:function(){return nt(!1)},isRepository:zt,onOK:function(tn){Mr(tn.path,tn.name)}}),s.a.createElement(ge,{taskData:Kt,defaultPath:lr,visible:sn,isRepository:zt,onClose:function(){return Qt(!1)},onOK:function(){var On=Object(u.a)(M.a.mark(function tn(Mn){var gn;return M.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return gn=lr.split("/"),Rr.next=3,cr(lr);case 3:Sr=[gn[0]||""],ca=[lr],Fi(Object(k.a)(ca)),Ji(Object(k.a)(Sr));case 7:case"end":return Rr.stop()}},tn)}));return function(tn){return On.apply(this,arguments)}}()}),s.a.createElement(Me,{pathList:lr==null?void 0:lr.split("/"),showInputPath:!0,isMergeSelectFile:go,onFinish:function(tn){go?Wo(tn):cr(tn),To(!1)}}))},xe=function(){return s.a.createElement("div",{className:"mt20 pb50 ".concat(_e.a.nodata)},s.a.createElement("div",{className:_e.a.headLeft},"\u63D0\u793A\uFF1A",s.a.createElement("br",null),"\u6B64\u5904\u5B58\u653E\u672C\u5B9E\u8BAD\u6240\u9700\u7684\u6240\u6709\u4EE3\u7801\u7B49\u76F8\u5173\u6587\u4EF6\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B",s.a.createElement("br",null),"\u4E24\u79CD\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A",s.a.createElement("br",null),"1\u3001",s.a.createElement("a",{href:"/forums/2784",target:"_blank"},"Git\u5BA2\u6237\u7AEF")," ","\u4E0A\u4F20\u5DF2\u6709\u6587\u4EF6\u6765\u5F00\u59CB\u4F7F\u7528\u3002",s.a.createElement("br",null),"2\u3001\u76F4\u63A5\u5728\u5E73\u53F0\u4E0A\u521B\u5EFA\u6587\u4EF6\u76EE\u5F55\u4EE5\u53CA\u76F8\u5173\u4EE3\u7801\u6587\u4EF6\u3002"),s.a.createElement("img",{width:"100%",src:Ne.u}))},de=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.practiceSetting,Ht=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Ht,practiceSetting:Bt,loading:xt}})(ve),je=b("/zsF"),Qe=b("PArb"),ne=b("5GGG"),Ze=b.n(ne),lt=function(ze){var xt=ze.shixunsDetail,ht=ze.globalSetting,Bt=ze.loading,Ht=ze.user,gt=ze.dispatch,Xt=ze.isRepository,jt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository"]),Ut=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),It=Object(g.useState)([]),Kt=Object(C.a)(It,2),rn=Kt[0],zt=Kt[1];Object(g.useEffect)(function(){$t()},[Xt]);var $t=function(){var Pn=Object(u.a)(M.a.mark(function fn(){var In;return M.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,gt({type:"shixunsDetail/getRepositoryCommit",payload:{id:Ut.id,secret_repository:Xt?void 0:!0}});case 2:In=Cn.sent,In&&zt(In.commits||[]);case 4:case"end":return Cn.stop()}},fn)}));return function(){return Pn.apply(this,arguments)}}();return s.a.createElement(s.a.Fragment,null,rn==""&&s.a.createElement("div",{className:Ze.a.empty},s.a.createElement("img",{src:Ne.k,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c font14"},"\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55")),rn!=""&&s.a.createElement("section",{className:Ze.a.bg},s.a.createElement("div",{className:Ze.a.wrap},s.a.createElement("div",{className:Ze.a.content},rn==null?void 0:rn.map(function(Pn){var fn,In;return s.a.createElement("div",null,s.a.createElement(v.a,{align:"middle",className:"c-white font16"},s.a.createElement(y.a,null,Pn.title)),s.a.createElement(v.a,{align:"middle",className:"mt20 "},s.a.createElement(y.a,null,s.a.createElement("img",{className:Ze.a.imageUrl,src:Q.a.IMG_SERVER+"/"+((fn=Pn.author)===null||fn===void 0?void 0:fn.image_url)})),s.a.createElement(y.a,{className:Ze.a.blueLight},s.a.createElement("span",{className:"ml20"},(In=Pn.author)===null||In===void 0?void 0:In.username)),s.a.createElement(y.a,null,s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},"\u63D0\u4EA4\u4E8E"),s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},Pn.time))),s.a.createElement(Qe.a,{className:Ze.a.divider}))})))))},Be=Object(X.a)(function(Pe){var ze=Pe.shixunsDetail,xt=Pe.loading,ht=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:ht,user:Bt,loading:xt.models.index}})(lt),$e=b("p5ED"),rt=A.a.TabPane,St=function(ze){var xt,ht,Bt,Ht,gt,Xt,jt=ze.globalSetting,Ut=ze.loading,It=ze.dispatch,Kt=ze.practiceSetting,rn=ze.shixunsDetail,zt=ze.taskData,$t=ze.taskId,Pn=ze.onEditRepCode,fn=Object(w.a)(ze,["globalSetting","loading","dispatch","practiceSetting","shixunsDetail","taskData","taskId","onEditRepCode"]),In=!(zt!=null&&zt.is_last_game)&&((zt==null?void 0:zt.shixun.status)>0||(zt==null||((xt=zt.user)===null||xt===void 0)?void 0:xt.identity)<5),on=Object(g.useState)("1"),Cn=Object(C.a)(on,2),Hn=Cn[0],Qn=Cn[1],Vt=Object(g.useState)("1"),xn=Object(C.a)(Vt,2),er=xn[0],ar=xn[1],Ar=Object(g.useState)(!0),$n=Object(C.a)(Ar,2),ce=$n[0],V=$n[1],J=Object(g.useState)({}),ee=Object(C.a)(J,2),Te=ee[0],ue=ee[1],nt=Object(g.useRef)(),kt=Object(g.useState)(!0),Yt=Object(C.a)(kt,2),sn=Yt[0],Qt=Yt[1],kn=Object(g.useState)(["2","1"]),Vn=Object(C.a)(kn,2),lr=Vn[0],Or=Vn[1],vr=Object(g.useState)([]),or=Object(C.a)(vr,2),Sr=or[0],Ji=or[1],Gr=Object(g.useRef)(),si=Object(O.a)(Object(O.a)({},Object(z.i)()),{},{taskId:$t}),ca=Object(g.useState)(!1),Fi=Object(C.a)(ca,2),ra=Fi[0],Ta=Fi[1],po=[{id:"1",name:"\u4EE3\u7801\u4ED3\u5E93"},{id:"2",name:s.a.createElement("span",null,s.a.createElement("span",null,"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(x.a,{title:"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002"},s.a.createElement("i",{className:"iconfont icon-xiaowenhao",style:{marginLeft:2,fontSize:14}})))}];Object(g.useEffect)(function(){var Nr,Jr=Kt==null||((Nr=Kt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath.split("/");Or(Jr)},[Kt==null||((ht=Kt.sideBar)===null||ht===void 0)?void 0:ht.selectPath]);var io=function(Jr){Jr.data==="compileResltDone"&&Ta(!1)};Object(g.useEffect)(function(){return window.addEventListener("message",io),function(){window.removeEventListener("message",io)}},[]);var wo=function(Jr){(Te==null?void 0:Te.file_type)==="txt"&&(Te.content=Jr,ue(Object(O.a)({},Te)),Pn(Jr))};Object(g.useEffect)(function(){var Nr;console.log(Kt==null||((Nr=Kt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath,"sideBar"),new Promise(function(){var Jr=Object(u.a)(M.a.mark(function bi(Fr,Cr){var ti,_r,li,sr,Hi,Pi,Zi;return M.a.wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:if(!((Kt==null||((ti=Kt.sideBar)===null||ti===void 0)?void 0:ti.selectPath)!==""&&Kt!==null&&Kt!==void 0&&(_r=Kt.sideBar)!==null&&_r!==void 0&&_r.selectPath)){Vi.next=5;break}return Vi.next=3,Object(Z.j)($t,{path:Kt==null||((li=Kt.sideBar)===null||li===void 0)?void 0:li.selectPath});case 3:if(sr=Vi.sent,sr!=null&&sr.content||(sr==null?void 0:sr.content)=="")try{(sr==null?void 0:sr.file_type)==="txt"?(sr.content=window.decodeURIComponent(escape(window.atob((Hi=sr.content)===null||Hi===void 0?void 0:Hi.content))),ue(Object(O.a)({},sr))):(sr.content=(Pi=sr.content)===null||Pi===void 0?void 0:Pi.content,ue(Object(O.a)({},sr)))}catch(Wa){Te.content&&(sr.content=window.atob((Zi=sr.content)===null||Zi===void 0?void 0:Zi.content)),ue(Object(O.a)({},sr)),h.b.warn("\u8BF7\u786E\u8BA4\u6587\u4EF6\u5B57\u7B26\u96C6\u7F16\u7801\u662F\u5426\u4E3AUTF-8")}else It({type:"practiceSetting/setSideBarTabs",payload:{selectPath:""}});case 5:case"end":return Vi.stop()}},bi)}));return function(bi,Fr){return Jr.apply(this,arguments)}}())},[Kt==null||((Bt=Kt.sideBar)===null||Bt===void 0)?void 0:Bt.selectPath]);var La=s.a.createElement(d.a,{className:P.a.menu,onClick:function(Jr){var bi;!(rn!=null&&(bi=rn.detail)!==null&&bi!==void 0&&bi.secret_repository)&&Jr.key==="2"&&ar("1"),Qn(Jr.key),Jr.key==="1"?Qt(!0):Qt(!1)}},s.a.createElement(d.a.Item,{disabled:!0,key:"0"},"\u5207\u6362\u4ED3\u5E93"),po.filter(function(Nr){var Jr,bi;return!(rn!=null&&(Jr=rn.detail)!==null&&Jr!==void 0&&Jr.init_repository)||rn!=null&&(bi=rn.detail)!==null&&bi!==void 0&&bi.is_jupyter_lab?Nr.id!=="2":Nr}).map(function(Nr,Jr){return s.a.createElement(d.a.Item,{className:"leaveClick",key:Nr.id},Nr.name)})),Gi=function(){var Nr=Object(u.a)(M.a.mark(function Jr(){var bi,Fr,Cr,ti,_r,li;return M.a.wrap(function(Hi){for(;;)switch(Hi.prev=Hi.next){case 0:return Ta(!0),Hi.next=3,Object(Z.L)(zt==null||((bi=zt.myshixun)===null||bi===void 0)?void 0:bi.identifier,Object(O.a)(Object(O.a)({path:Kt==null||((Fr=Kt.sideBar)===null||Fr===void 0)?void 0:Fr.selectPath},Te),{},{evaluate:0,game_id:zt==null||((Cr=zt.game)===null||Cr===void 0)?void 0:Cr.id}));case 3:li=Hi.sent,(ti=document.getElementById("latexIframeRef"))===null||ti===void 0||((_r=ti.contentWindow)===null||_r===void 0)||_r.postMessage("compile","*"),li!=null&&li.content&&It({type:"practiceSetting/setSideBarTabs",payload:Object(O.a)(Object(O.a)({},Kt.sideBar),{},{confirmLeave:!1})});case 6:case"end":return Hi.stop()}},Jr)}));return function(){return Nr.apply(this,arguments)}}();return s.a.createElement("div",{className:P.a.warehouse},s.a.createElement("div",{className:P.a.content},er==="1"&&s.a.createElement(s.a.Fragment,null,s.a.createElement("aside",{className:P.a.left,id:"latex-drawer",style:{width:ce?"36%":"0%"}},s.a.createElement(a.a,{spinning:!!Ut.effects["shixunsDetail/getRepository"],wrapperClassName:"".concat(P.a.loading," ").concat(P.a.bottom0)},s.a.createElement(de,{taskData:zt,params:si,setTreeData:Ji,treeData:Sr,activeKey:Hn,isRepository:sn})),s.a.createElement("span",{onClick:function(){return V(!1)},className:"".concat(P.a.close," iconfont icon-quxiao")})),s.a.createElement("aside",{className:P.a.right,ref:Gr},(Kt==null||((Ht=Kt.sideBar)===null||Ht===void 0)?void 0:Ht.selectPath)!==""&&s.a.createElement(s.a.Fragment,null,s.a.createElement(a.a,{spinning:!!Ut.effects["shixunsDetail/getFileContent"],wrapperClassName:P.a.loading},s.a.createElement("div",{className:P.a.filePathWrp},s.a.createElement(v.a,{align:"middle",className:"w100"},s.a.createElement(y.a,null,s.a.createElement("span",{onClick:function(){return V(!0)},className:"iconfont icon-daimacangku2 c-white current"})),s.a.createElement(y.a,{flex:"40px"},s.a.createElement("div",{className:P.a.line,style:{marginLeft:20}})),s.a.createElement(y.a,{className:P.a.filePath},lr.map(function(Nr,Jr){return s.a.createElement("span",{className:"c-blue"},Nr)})))),s.a.createElement("div",{className:Ut.effects["shixunsDetail/getFileContent"]?"hide":"show"},s.a.createElement($e.a,{className:"darkBlue",style:{top:66,height:"calc(100% - 60px)",position:"absolute"},filename:Te.filename,type:Te.file_type==="office"?"download":Te.file_type,data:Te.content,monacoEditor:{value:Te.content,language:Te.language,onChange:function(Jr){return wo(Jr)},options:{fontSize:14,minimap:{enabled:!1}}}}))),(Te==null?void 0:Te.file_type)==="txt"&&s.a.createElement("div",{className:P.a.footer},(zt==null?void 0:zt.prev_game)&&s.a.createElement("a",{href:"/tasks/".concat(zt==null?void 0:zt.prev_game).concat(location.search),style:{marginRight:"auto"},onClick:function(Jr){Jr.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(zt==null?void 0:zt.prev_game).concat(location.search)},300)}},"\u4E0A\u4E00\u5173"),s.a.createElement(i.a,{type:"primary",size:"large",loading:ra,onClick:Gi},"\u5F00\u59CB\u7F16\u8BD1"),In&&s.a.createElement("a",{href:"/tasks/".concat(zt==null?void 0:zt.next_game).concat(location.search),style:{marginLeft:"auto"},onClick:function(Jr){var bi,Fr;if(Jr.preventDefault(),zt!=null&&(bi=zt.shixun)!==null&&bi!==void 0&&bi.task_pass||(zt==null?void 0:zt.game.status)===2||(zt==null||((Fr=zt.user)===null||Fr===void 0)?void 0:Fr.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(zt==null?void 0:zt.next_game).concat(location.search)},300);return}l.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:s.a.createElement("p",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002")})}},"\u4E0B\u4E00\u5173"))),(Kt==null||((gt=Kt.sideBar)===null||gt===void 0)?void 0:gt.selectPath)==""&&(rn==null||((Xt=rn.detail)===null||Xt===void 0)?void 0:Xt.init_repository)&&s.a.createElement("div",{className:P.a.empty},s.a.createElement("img",{src:Ne.j,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c"},!!(Sr!=null&&Sr.length)&&"\u5728\u5DE6\u4FA7\u4EE3\u7801\u4ED3\u5E93\u533A\u57DF\u70B9\u51FB\u76EE\u5F55\u6253\u5F00\u6587\u4EF6",!(Sr!=null&&Sr.length)&&"\u8BF7\u5148\u5728\u5DE6\u4FA7\u4E0A\u4F20\u6587\u4EF6\u6216\u65B0\u5EFA\u6587\u4EF6\uFF01")))),er==="2"&&s.a.createElement("div",{className:P.a.commit},s.a.createElement(Be,{isRepository:sn}))))},pt=Object(X.a)(function(Pe){var ze=Pe.loading,xt=Pe.globalSetting,ht=Pe.practiceSetting,Bt=Pe.shixunsDetail;return{globalSetting:xt,loading:ze,practiceSetting:ht,shixunsDetail:Bt}})(St),st=H.default=function(Pe){var ze=Pe.taskId,xt=Pe.taskData,ht=Pe.onEditRepCode,Bt=Object(g.useRef)(),Ht=Object(g.useRef)(),gt=Object(g.useMemo)(function(){if(xt){var Xt,jt,Ut,It,Kt,rn=xt==null||((Xt=xt.challenge)===null||Xt===void 0||((jt=Xt.path)===null||jt===void 0||((Ut=jt.replace("\uFF1B",";"))===null||Ut===void 0)))?void 0:Ut.split(";")[0];return"https://latexjs.educoder.net/index.html?id=".concat(xt==null||((It=xt.shixun)===null||It===void 0)?void 0:It.identifier,"&path=").concat(rn,"&taskId=").concat(ze,"&myshixunId=").concat(xt==null||((Kt=xt.myshixun)===null||Kt===void 0)?void 0:Kt.identifier,"&token=").concat(Object(p.F)("_educoder_session"))}},[xt]);return s.a.createElement(v.a,{style:{height:"100vh"},ref:Ht},s.a.createElement(y.a,{flex:"1"},(xt==null?void 0:xt.shixun)&&s.a.createElement(pt,{taskId:ze,taskData:xt,onEditRepCode:ht})),s.a.createElement(y.a,{flex:"1",className:o.a.wrap},s.a.createElement("iframe",{ref:Bt,id:"latexIframeRef",style:{width:"100%",border:"none",height:"100%"},src:gt}),s.a.createElement("span",{className:o.a.full,onClick:function(){Object(_.a)()?Object(_.b)():Object(_.d)(Ht.current)}},s.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F")))}},"4qgm":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"500L":function(j,H,b){"use strict";b.d(H,"a",function(){return E});var I=b("+L6B"),v=b("2/Rp"),T=b("2qtc"),y=b("kLXV"),g=b("9og8"),s=b("k1fw"),_=b("miYZ"),p=b("tsqr"),e=b("oBTY"),o=b("tJVT"),n=b("DZo9"),l=b("8z0m"),r=b("WmNS"),i=b.n(r),t=b("q1tI"),a=b.n(t),c=b("m3rI"),d=b("wzkS"),f=b("y5JW"),h=b("LtfV"),u=l.a.Dragger;function E(x){var O=[];return x&&x.length>0&&(O=x.map(function(C){return{uid:C.id,id:C.id,name:C.title+f.c+C.filesize,url:C.url,filesize:C.filesize,status:"done",response:{id:C.id}}})),O}H.b=function(x){var O=x.value,C=x.onChange,w=x.action,S=x.className,A=x.maxSize,D=A===void 0?150:A,M=x.title,N=M===void 0?"\u4E0A\u4F20\u9644\u4EF6":M,P=x.showRemoveModal,z=P===void 0?!1:P,X=x.accept,k=X===void 0?"":X,F=x.additionalText,U=x.isDragger,L=x.number,B=L===void 0?1e3:L,Z=x.aloneClear,re=Z===void 0?!1:Z,he=Object(t.useState)(!1),Se=Object(o.a)(he,2),ke=Se[0],te=Se[1],Re=Object(t.useState)(O||[]),Ce=Object(o.a)(Re,2),pe=Ce[0],me=Ce[1];Object(t.useEffect)(function(){O&&(me(Object(e.a)(O)),B===(O==null?void 0:O.length)&&te(!0))},[O]);var se=function(){setTimeout(function(){pe.pop(),me(Object(e.a)(pe))},500)},be={multiple:!0,disabled:ke,accept:k,withCredentials:!0,fileList:pe,beforeUpload:function(Fe,ie){var q=Fe.size/1024/1024;return pe.concat(ie).length>B?(pe.pop(),me(Object(e.a)(pe)),p.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(B,"\u4E2A\u6587\u4EF6")),re?Promise.reject():(se(),!1)):!0},action:w||"".concat(c.a.API_SERVER,"/api/attachments.json"),onChange:function(Fe){var ie,q,Q=Object(e.a)(Fe.fileList);if(Fe.file.status==="done"&&((ie=Fe.file)===null||ie===void 0||((q=ie.response)===null||q===void 0)?void 0:q.status)===-1){var Y,oe;p.b.error((Y=Fe.file)===null||Y===void 0||((oe=Y.response)===null||oe===void 0)?void 0:oe.message);return}Q.length>=B?te(!0):te(!1),me(Object(e.a)(Q)),Q=Q.map(function(le){var Ee;if(le!=null&&(Ee=le.response)!==null&&Ee!==void 0&&Ee.id){var Le;le.url="/api/attachments/".concat(le==null||((Le=le.response)===null||Le===void 0)?void 0:Le.id)}return le.name.indexOf(f.c)===-1&&(le.name="".concat(le.name).concat(f.c).concat(Object(f.a)(le.size))),Object(s.a)({},le)}),console.log("info:",Fe),C(Q)},onRemove:function(){var fe=Object(g.a)(i.a.mark(function ie(q){var Q;return i.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(Q=function(){var le=Object(g.a)(i.a.mark(function Ee(){var Le,ge;return i.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(Le=q.response?q.response.id:q.id,!Le){_e.next=8;break}return _e.next=4,Object(d.d)(q.response?q.response.id:q.uid);case 4:return ge=_e.sent,_e.abrupt("return",ge);case 8:return _e.abrupt("return",!0);case 9:case"end":return _e.stop()}},Ee)}));return function(){return le.apply(this,arguments)}}(),!z){oe.next=5;break}return oe.abrupt("return",new Promise(function(le,Ee){y.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:a.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Le=Object(g.a)(i.a.mark(function De(){var _e;return i.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,Q();case 2:_e=tt.sent,p.b.success("\u5220\u9664\u6210\u529F"),le(!0);case 5:case"end":return tt.stop()}},De)}));function ge(){return Le.apply(this,arguments)}return ge}(),onCancel:function(){return le(!1)}})}));case 5:return oe.next=7,Q();case 7:return oe.abrupt("return",oe.sent);case 8:case"end":return oe.stop()}},ie)}));function Fe(ie){return fe.apply(this,arguments)}return Fe}()};function ae(fe){fe.preventDefault(),fe.stopPropagation()}return a.a.createElement("div",{className:"multi-upload ".concat(S||"")},U&&a.a.createElement(u,be,a.a.createElement("p",{className:"ant-upload-drag-icon"},a.a.createElement(h.a,null)),a.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",a.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",D,"MB)"," "),F),!U&&a.a.createElement(l.a,be,a.a.createElement(v.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:a.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:ke},N),a.a.createElement("span",{onClick:ae,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",D,"MB)"," ")))}},"55Ip":function(j,H,b){"use strict";b.d(H,"a",function(){return f});var I=b("Ty5D"),v=b("dI71"),T=b("q1tI"),y=b.n(T),g=b("YS25"),s=b("17x9"),_=b.n(s),p=b("wx14"),e=b("zLVn"),o=b("9R94"),n=function(S){Object(v.a)(A,S);function A(){for(var M,N=arguments.length,P=new Array(N),z=0;z>>24)&16711935|(h<<24|h>>>8)&4278255360,u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360;var E=c[f];E.high^=u,E.low^=h}for(var x=0;x<24;x++){for(var O=0;O<5;O++){for(var C=0,w=0,S=0;S<5;S++){var E=c[O+5*S];C^=E.high,w^=E.low}var A=r[O];A.high=C,A.low=w}for(var O=0;O<5;O++)for(var D=r[(O+4)%5],M=r[(O+1)%5],N=M.high,P=M.low,C=D.high^(N<<1|P>>>31),w=D.low^(P<<1|N>>>31),S=0;S<5;S++){var E=c[O+5*S];E.high^=C,E.low^=w}for(var z=1;z<25;z++){var C,w,E=c[z],X=E.high,k=E.low,F=o[z];F<32?(C=X<>>32-F,w=k<>>32-F):(C=k<>>64-F,w=X<>>64-F);var U=r[n[z]];U.high=C,U.low=w}var L=r[0],B=c[0];L.high=B.high,L.low=B.low;for(var O=0;O<5;O++)for(var S=0;S<5;S++){var z=O+5*S,E=c[z],Z=r[z],re=r[(O+1)%5+5*S],he=r[(O+2)%5+5*S];E.high=Z.high^~re.high&he.high,E.low=Z.low^~re.low&he.low}var E=c[0],Se=l[x];E.high^=Se.high,E.low^=Se.low}},_doFinalize:function(){var t=this._data,a=t.words,c=this._nDataBytes*8,d=t.sigBytes*8,f=this.blockSize*32;a[d>>>5]|=1<<24-d%32,a[(v.ceil((d+1)/f)*f>>>5)-1]|=128,t.sigBytes=a.length*4,this._process();for(var h=this._state,u=this.cfg.outputLength/8,E=u/8,x=[],O=0;O>>24)&16711935|(w<<24|w>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,x.push(S),x.push(w)}return new g.init(x,u)},clone:function(){for(var t=s.clone.call(this),a=t._state=this._state.slice(0),c=0;c<25;c++)a[c]=a[c].clone();return t}});T.SHA3=s._createHelper(i),T.HmacSHA3=s._createHmacHelper(i)}(Math),I.SHA3})},"5nXd":function(j,H,b){var I=b("MFOe"),v=I.slice,T=I.pluck,y=I.each,g=I.bind,s=I.create,_=I.isList,p=I.isFunction,e=I.isObject;j.exports={createStore:l};var o={version:"2.0.12",enabled:!1,get:function(r,i){var t=this.storage.read(this._namespacePrefix+r);return this._deserialize(t,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(t,a){r.call(i,i._deserialize(t),(a||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function n(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,t){t||(t=""),r&&!_(r)&&(r=[r]),i&&!_(i)&&(i=[i]);var a=t?"__storejs_"+t+"_":"",c=t?new RegExp("^"+a):null,d=/^[a-zA-Z0-9_\-]*$/;if(!d.test(t))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var f={_namespacePrefix:a,_namespaceRegexp:c,_testStorage:function(u){try{var E="__storejs__test__";u.write(E,E);var x=u.read(E)===E;return u.remove(E),x}catch(O){return!1}},_assignPluginFnProp:function(u,E){var x=this[E];this[E]=function(){var C=v(arguments,0),w=this;function S(){return x?(y(arguments,function(D,M){C[M]=D}),x.apply(w,C)):void 0}var A=[S].concat(C);return u.apply(w,A)}},_serialize:function(u){return JSON.stringify(u)},_deserialize:function(u,E){if(!u)return E;var x="";try{x=JSON.parse(u)}catch(O){x=u}return x!==void 0?x:E},_addStorage:function(u){if(this.enabled)return;this._testStorage(u)&&(this.storage=u,this.enabled=!0)},_addPlugin:function(u){var E=this;if(_(u)){y(u,function(C){E._addPlugin(C)});return}var x=T(this.plugins,function(C){return u===C});if(x)return;if(this.plugins.push(u),!p(u))throw new Error("Plugins must be function values that return objects");var O=u.call(this);if(!e(O))throw new Error("Plugins must return an object of function properties");y(O,function(C,w){if(!p(C))throw new Error("Bad plugin property: "+w+" from plugin "+u.name+". Plugins should only return functions.");E._assignPluginFnProp(C,w)})},addStorage:function(u){n("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(u)}},h=s(f,o,{plugins:[]});return h.raw={},y(h,function(u,E){p(u)&&(h.raw[E]=g(h,u))}),y(r,function(u){h._addStorage(u)}),y(i,function(u){h._addPlugin(u)}),h}},"6+eU":function(j,H,b){"use strict";b.d(H,"a",function(){return x});var I=b("wx14"),v=b("rePB"),T=b("VTBJ"),y=b("1OyB"),g=b("vuIU"),s=b("Ji7U"),_=b("LK+K"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=function(C){var w,S="".concat(C.rootPrefixCls,"-item"),A=n()(S,"".concat(S,"-").concat(C.page),(w={},Object(v.a)(w,"".concat(S,"-active"),C.active),Object(v.a)(w,C.className,!!C.className),Object(v.a)(w,"".concat(S,"-disabled"),!C.page),w)),D=function(){C.onClick(C.page)},M=function(P){C.onKeyPress(P,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:A,onClick:D,onKeyPress:M,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},t=function(O){Object(s.a)(w,O);var C=Object(_.a)(w);function w(){var S;Object(y.a)(this,w);for(var A=arguments.length,D=new Array(A),M=0;M=0||N.relatedTarget.className.indexOf("".concat(k,"-next"))>=0))return;S.setState({goInputText:""}),X(S.getValidValue())},S.go=function(N){var P=S.state.goInputText;if(P==="")return;(N.keyCode===i.ENTER||N.type==="click")&&(S.setState({goInputText:""}),S.props.quickGo(S.getValidValue()))},S}return Object(g.a)(w,[{key:"getValidValue",value:function(){var A=this.state,D=A.goInputText,M=A.current;return!D||isNaN(D)?M:Number(D)}},{key:"getPageSizeOptions",value:function(){var A=this.props,D=A.pageSize,M=A.pageSizeOptions;return M.some(function(N){return N.toString()===D.toString()})?M:M.concat([D.toString()]).sort(function(N,P){var z=isNaN(Number(N))?0:Number(N),X=isNaN(Number(P))?0:Number(P);return z-X})}},{key:"render",value:function(){var A=this,D=this.props,M=D.pageSize,N=D.locale,P=D.rootPrefixCls,z=D.changeSize,X=D.quickGo,k=D.goButton,F=D.selectComponentClass,U=D.buildOptionText,L=D.selectPrefixCls,B=D.disabled,Z=this.state.goInputText,re="".concat(P,"-options"),he=F,Se=null,ke=null,te=null;if(!z&&!X)return null;var Re=this.getPageSizeOptions();if(z&&he){var Ce=Re.map(function(pe,me){return e.a.createElement(he.Option,{key:me,value:pe.toString()},(U||A.buildOptionText)(pe))});Se=e.a.createElement(he,{disabled:B,prefixCls:L,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(me){return me.parentNode}},Ce)}return X&&(k&&(te=typeof k=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:B,className:"".concat(re,"-quick-jumper-button")},N.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},k)),ke=e.a.createElement("div",{className:"".concat(re,"-quick-jumper")},N.jump_to,e.a.createElement("input",{disabled:B,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,te)),e.a.createElement("li",{className:"".concat(re)},Se,ke)}}]),w}(e.a.Component);t.defaultProps={pageSizeOptions:["10","20","50","100"]};var a=t,c=b("N2Kk");function d(){}function f(O){return typeof O=="number"&&isFinite(O)&&Math.floor(O)===O}function h(O,C,w){return w}function u(O,C,w){var S=typeof O=="undefined"?C.pageSize:O;return Math.floor((w.total-1)/S)+1}var E=function(O){Object(s.a)(w,O);var C=Object(_.a)(w);function w(S){var A;Object(y.a)(this,w),A=C.call(this,S),A.getJumpPrevPage=function(){return Math.max(1,A.state.current-(A.props.showLessItems?3:5))},A.getJumpNextPage=function(){return Math.min(u(void 0,A.state,A.props),A.state.current+(A.props.showLessItems?3:5))},A.getItemIcon=function(z,X){var k=A.props.prefixCls,F=z||e.a.createElement("button",{type:"button","aria-label":X,className:"".concat(k,"-item-link")});return typeof z=="function"&&(F=e.a.createElement(z,Object(T.a)({},A.props))),F},A.savePaginationNode=function(z){A.paginationNode=z},A.isValid=function(z){return f(z)&&z!==A.state.current},A.shouldDisplayQuickJumper=function(){var z=A.props,X=z.showQuickJumper,k=z.pageSize,F=z.total;return F<=k?!1:X},A.handleKeyDown=function(z){(z.keyCode===i.ARROW_UP||z.keyCode===i.ARROW_DOWN)&&z.preventDefault()},A.handleKeyUp=function(z){var X=A.getValidValue(z),k=A.state.currentInputValue;X!==k&&A.setState({currentInputValue:X}),z.keyCode===i.ENTER?A.handleChange(X):z.keyCode===i.ARROW_UP?A.handleChange(X-1):z.keyCode===i.ARROW_DOWN&&A.handleChange(X+1)},A.changePageSize=function(z){var X=A.state.current,k=u(z,A.state,A.props);X=X>k?k:X,k===0&&(X=A.state.current),typeof z=="number"&&("pageSize"in A.props||A.setState({pageSize:z}),"current"in A.props||A.setState({current:X,currentInputValue:X})),A.props.onShowSizeChange(X,z),"onChange"in A.props&&A.props.onChange&&A.props.onChange(X,z)},A.handleChange=function(z){var X=A.props.disabled,k=z;if(A.isValid(k)&&!X){var F=u(void 0,A.state,A.props);k>F?k=F:k<1&&(k=1),"current"in A.props||A.setState({current:k,currentInputValue:k});var U=A.state.pageSize;return A.props.onChange(k,U),k}return A.state.current},A.prev=function(){A.hasPrev()&&A.handleChange(A.state.current-1)},A.next=function(){A.hasNext()&&A.handleChange(A.state.current+1)},A.jumpPrev=function(){A.handleChange(A.getJumpPrevPage())},A.jumpNext=function(){A.handleChange(A.getJumpNextPage())},A.hasPrev=function(){return A.state.current>1},A.hasNext=function(){return A.state.current2?k-2:0),U=2;U=M?P=M:P=Number(D),P}},{key:"getShowSizeChanger",value:function(){var A=this.props,D=A.showSizeChanger,M=A.total,N=A.totalBoundaryShowSizeChanger;return typeof D!="undefined"?D:M>N}},{key:"renderPrev",value:function(A){var D=this.props,M=D.prevIcon,N=D.itemRender,P=N(A,"prev",this.getItemIcon(M,"prev page")),z=!this.hasPrev();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"renderNext",value:function(A){var D=this.props,M=D.nextIcon,N=D.itemRender,P=N(A,"next",this.getItemIcon(M,"next page")),z=!this.hasNext();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"render",value:function(){var A=this,D=this.props,M=D.prefixCls,N=D.className,P=D.style,z=D.disabled,X=D.hideOnSinglePage,k=D.total,F=D.locale,U=D.showQuickJumper,L=D.showLessItems,B=D.showTitle,Z=D.showTotal,re=D.simple,he=D.itemRender,Se=D.showPrevNextJumpers,ke=D.jumpPrevIcon,te=D.jumpNextIcon,Re=D.selectComponentClass,Ce=D.selectPrefixCls,pe=D.pageSizeOptions,me=this.state,se=me.current,be=me.pageSize,ae=me.currentInputValue;if(X===!0&&k<=be)return null;var fe=u(void 0,this.state,this.props),Fe=[],ie=null,q=null,Q=null,Y=null,oe=null,le=U&&U.goButton,Ee=L?1:2,Le=se-1>0?se-1:0,ge=se+1=Ee*2&&se!==1+2&&(Fe[0]=Object(p.cloneElement)(Fe[0],{className:"".concat(M,"-item-after-jump-prev")}),Fe.unshift(ie)),fe-se>=Ee*2&&se!==fe-2&&(Fe[Fe.length-1]=Object(p.cloneElement)(Fe[Fe.length-1],{className:"".concat(M,"-item-before-jump-next")}),Fe.push(q)),Et!==1&&Fe.unshift(Q),Oe!==fe&&Fe.push(Y)}var Ye=null;Z&&(Ye=e.a.createElement("li",{className:"".concat(M,"-total-text")},Z(k,[k===0?0:(se-1)*be+1,se*be>k?k:se*be])));var Ne=!this.hasPrev()||!fe,He=!this.hasNext()||!fe;return e.a.createElement("ul",Object(I.a)({className:n()(M,N,Object(v.a)({},"".concat(M,"-disabled"),z)),style:P,unselectable:"unselectable",ref:this.savePaginationNode},De),Ye,e.a.createElement("li",{title:B?F.prev_page:null,onClick:this.prev,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(v.a)({},"".concat(M,"-disabled"),Ne)),"aria-disabled":Ne},this.renderPrev(Le)),Fe,e.a.createElement("li",{title:B?F.next_page:null,onClick:this.next,tabIndex:He?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(v.a)({},"".concat(M,"-disabled"),He)),"aria-disabled":He},this.renderNext(ge)),e.a.createElement(a,{disabled:z,locale:F,rootPrefixCls:M,selectComponentClass:Re,selectPrefixCls:Ce,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:se,pageSize:be,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:le}))}}],[{key:"getDerivedStateFromProps",value:function(A,D){var M={};if("current"in A&&(M.current=A.current,A.current!==D.current&&(M.currentInputValue=M.current)),"pageSize"in A&&A.pageSize!==D.pageSize){var N=D.current,P=u(A.pageSize,D,A);N=N>P?P:N,"current"in A||(M.current=N,M.currentInputValue=N),M.pageSize=A.pageSize}return M}}]),w}(e.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:d,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:d,locale:c.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var x=E},"6/vW":function(j,H,b){"use strict";b.d(H,"b",function(){return _});var I=b("tJVT"),v=b("q1tI"),T=b.n(v),y=b("9VGf"),g=b("dhSg");function s(p){return p.toString().padStart(2,"0")}function _(p){var e=Math.floor(p/60),o=p%60,n=Math.floor(e/60);return"".concat(s(n),":").concat(s(e-n*60),":").concat(s(o))}H.a=function(p){var e=p.defaultTime,o=p.status,n=p.onUpdateCostTime,l=p.lastedGetTaskInfoTime,r=p.title,i=r===void 0?"":r,t=Object(v.useState)(e||0),a=Object(I.a)(t,2),c=a[0],d=a[1],f=Object(v.useRef)();return Object(v.useEffect)(function(){l&&(d(e),f.current=e)},[e,l]),Object(v.useEffect)(function(){if(l){var h=g.a.subscribe("update-cost-time",function(){o!==2&&n(f.current)});return h}},[l]),Object(y.a)(function(){d(c+1),f.current=f.current+1},o===2?null:1e3),T.a.createElement("span",null,i?"".concat(i,"\uFF1A"):null,_(c))}},"6BzB":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.shrinkBuf=I,H.arraySet=v,H.flattenChunks=T,H.Buf32=H.Buf16=H.Buf8=void 0;function I(_,p){return _.length===p?_:_.subarray?_.subarray(0,p):(_.length=p,_)}function v(_,p,e,o,n){if(p.subarray&&_.subarray){_.set(p.subarray(e,e+o),n);return}for(var l=0;lZ&&(Z=L.line_indent_level));var re={mode:B,parent:L,last_token:L?L.last_token:new r(f.START_BLOCK,""),last_word:L?L.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Z,alignment:0,line_indent_level:L?L.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},F.prototype._reset=function(L){var B=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new l(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(D.BlockStatement);var Z=new a(L,this._options);return this._tokens=Z.tokenize(),L},F.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,B=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=` @@ -33,8 +33,8 @@ You passed in: '`+this.raw_options[r]+"'");return a},o.prototype._is_valid_selec `),this._create_token(h.STRING,k)}return null},P.prototype._allow_regexp_or_xml=function(X){return X.type===h.RESERVED&&f(X.text,["return","case","throw","else","do","typeof","yield"])||X.type===h.END_EXPR&&X.text===")"&&X.opened.previous.type===h.RESERVED&&f(X.opened.previous.text,["if","while","for"])||f(X.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},P.prototype._read_regexp=function(X,k){if(X==="/"&&this._allow_regexp_or_xml(k)){for(var F=this._input.next(),U=!1,L=!1;this._input.hasNext()&&(U||L||this._input.peek()!==X)&&!this._input.testChar(a.newline);)F+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===X&&(F+=this._input.next(),F+=this._input.read(a.identifier)),this._create_token(h.STRING,F)}return null},P.prototype._read_xml=function(X,k){if(this._options.e4x&&X==="<"&&this._allow_regexp_or_xml(k)){var F="",U=this.__patterns.xml.read_match();if(U){for(var L=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=L.indexOf("{")===0,Z=0;U;){var re=!!U[1],he=U[2],Se=!!U[U.length-1]||he.slice(0,8)==="![CDATA[";if(!Se&&(he===L||B&&he.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Z:++Z),F+=U[0],Z<=0)break;U=this.__patterns.xml.read_match()}return U||(F+=this._input.match(/[\s\S]*/g)[0]),F=F.replace(a.allLineBreaks,` `),this._create_token(h.STRING,F)}}return null};function z(X){for(var k="",F=0,U=new l(X),L=null;U.hasNext();)if(L=U.match(/([\s]|[^\\]|\\\\)+/g),L&&(k+=L[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")L=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")L=U.match(/u([0-9A-Fa-f]{4})/g);else{k+="\\",U.hasNext()&&(k+=U.next());continue}if(!L)return X;if(F=parseInt(L[1],16),F>126&&F<=255&&L[0].indexOf("x")===0)return X;if(F>=0&&F<32){k+="\\"+L[0];continue}else F===34||F===39||F===92?k+="\\"+String.fromCharCode(F):k+=String.fromCharCode(F)}return k}P.prototype._read_string_recursive=function(X,k,F){var U,L;X==="'"?L=this.__patterns.single_quote:X==='"'?L=this.__patterns.double_quote:X==="`"?L=this.__patterns.template_text:X==="}"&&(L=this.__patterns.template_expression);for(var B=L.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===X||!k&&a.newline.test(Z)){this._input.back();break}else Z==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===` `&&this._input.next(),Z+=this._input.next()):F&&(F==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),F===Z&&(X==="`"?Z+=this._read_string_recursive("}",k,"`"):Z+=this._read_string_recursive("`",k,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=L.read(),B+=Z}return B},e.exports.Tokenizer=P,e.exports.TOKEN=h,e.exports.positionable_operators=C.slice(),e.exports.line_starters=A.slice()},function(e){var o=RegExp.prototype.hasOwnProperty("sticky");function n(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&l=0&&r=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},e.exports.InputScanner=n},function(e,o,n){var l=n(8).InputScanner,r=n(3).Token,i=n(10).TokenStream,t=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(d,f){this._input=new l(d),this._options=f||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new t(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var d,f=new r(a.START,""),h=null,u=[],E=new i;f.type!==a.EOF;){for(d=this._get_next_token(f,h);this._is_comment(d);)E.add(d),d=this._get_next_token(f,h);E.isEmpty()||(d.comments_before=E,E=new i),d.parent=h,this._is_opening(d)?(u.push(h),h=d):h&&this._is_closing(d,h)&&(d.opened=h,h.closed=d,h=u.pop(),d.parent=h),d.previous=f,f.next=d,this.__tokens.add(d),f=d}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(d,f){this._readWhitespace();var h=this._input.read(/.+/g);return h?this._create_token(a.RAW,h):this._create_token(a.EOF,"")},c.prototype._is_comment=function(d){return!1},c.prototype._is_opening=function(d){return!1},c.prototype._is_closing=function(d,f){return!1},c.prototype._create_token=function(d,f){var h=new r(d,f,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return h},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=c,e.exports.TOKEN=a},function(e){function o(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position=0&&n/),erb:c.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:c.starting_with(/{%/).until_after(/%}/),django_value:c.starting_with(/{{/).until_after(/}}/),django_comment:c.starting_with(/{#/).until_after(/#}/),smarty:c.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:c.starting_with(/{\*/).until_after(/\*}/),smarty_literal:c.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new l,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(t){var a=this._create();return a._disabled[t]=!0,a._update(),a},i.prototype.read_options=function(t){var a=this._create();for(var c in r)a._disabled[c]=t.templating.indexOf(c)===-1;return a._update(),a},i.prototype.exclude=function(t){var a=this._create();return a._excluded[t]=!0,a._update(),a},i.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),t+=a,a=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},i.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},i.prototype._read_template=function(){var t="",a=this._input.peek();if(a==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(t=t||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},e.exports.TemplatablePattern=i}],s={};function _(e){var o=s[e];if(o!==void 0)return o.exports;var n=s[e]={exports:{}};return g[e](n,n.exports,_),n.exports}var p=_(0);T=p})();var y=T;!(I=[],v=function(){return{js_beautify:y}}.apply(H,I),v!==void 0&&(j.exports=v))})()},"6eGT":function(j,H,b){"use strict";function I(v){return null}H.a=I},"6lC8":function(j,H,b){},"746U":function(j,H,b){"use strict";b.d(H,"f",function(){return I}),b.d(H,"l",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"j",function(){return y}),b.d(H,"g",function(){return g}),b.d(H,"m",function(){return s}),b.d(H,"h",function(){return _}),b.d(H,"n",function(){return p}),b.d(H,"c",function(){return e}),b.d(H,"a",function(){return o}),b.d(H,"i",function(){return n}),b.d(H,"o",function(){return l}),b.d(H,"e",function(){return t}),b.d(H,"d",function(){return a}),b.d(H,"p",function(){return c}),b.d(H,"b",function(){return d});function I(f){return Array.isArray(f)}function v(f){return typeof f=="string"}function T(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&!(f instanceof RegExp)&&!(f instanceof Date)}function y(f){return typeof f=="number"&&!isNaN(f)}function g(f){return f===!0||f===!1}function s(f){return typeof f=="undefined"}function _(f){return!p(f)}function p(f){return s(f)||f===null}function e(f,h){if(!f)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}function o(f){if(p(f))throw new Error("Assertion Failed: argument is undefined or null");return f}function n(f){return typeof f=="function"}function l(f,h){const u=Math.min(f.length,h.length);for(let E=0;Efunction(){const O=Array.prototype.slice.call(arguments,0);return h(x,O)};let E={};for(const x of f)E[x]=u(x);return E}function c(f){return f===null?void 0:f}function d(f,h="Unreachable"){throw new Error(h)}},"7Cbv":function(j,H,b){"use strict";var I=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function T(){if(!I)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(v)}var y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function g(r){return typeof r=="string"&&y.test(r)}for(var s=g,_=[],p=0;p<256;++p)_.push((p+256).toString(16).substr(1));function e(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(_[r[i+0]]+_[r[i+1]]+_[r[i+2]]+_[r[i+3]]+"-"+_[r[i+4]]+_[r[i+5]]+"-"+_[r[i+6]]+_[r[i+7]]+"-"+_[r[i+8]]+_[r[i+9]]+"-"+_[r[i+10]]+_[r[i+11]]+_[r[i+12]]+_[r[i+13]]+_[r[i+14]]+_[r[i+15]]).toLowerCase();if(!s(t))throw TypeError("Stringified UUID is invalid");return t}var o=e;function n(r,i,t){r=r||{};var a=r.random||(r.rng||T)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,i){t=t||0;for(var c=0;c<16;++c)i[t+c]=a[c];return i}return o(a)}var l=H.a=n},"7ZXX":function(j,H,b){j.exports=b.p+"static/err.6e7c5817.png"},"7ahc":function(j,H,b){"use strict";b.d(H,"a",function(){return u});var I=b("k1fw"),v=b("0Owb"),T=b("+L6B"),y=b("2/Rp"),g=b("y8nQ"),s=b("Vl3Y"),_=b("tJVT"),p=b("OaEy"),e=b("2fM7"),o=b("q1tI"),n=b.n(o),l=b("VrN/"),r=b.n(l),i=b("p77/"),t=b.n(i),a=b("c5Ni"),c=b.n(a),d=e.a.Option,f={labelCol:{span:4},wrapperCol:{span:20}},h={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};H.b=function(E){var x=E.callback,O=E.onCancel,C=Object(o.useState)("python"),w=Object(_.a)(C,2),S=w[0],A=w[1];function D(N){A(h[N][1])}function M(N){x(N)}return n.a.createElement(s.a,Object(v.a)({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(e.a,{onChange:D},Object.keys(h).map(function(N){return n.a.createElement(d,{key:N,value:N},h[N][0])}))),n.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(u,{mode:S})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(y.a,{type:"ghost",onClick:O},"\u53D6\u6D88")))};function u(E){var x=E.value,O=E.onChange,C=E.mode,w=E.options,S=w===void 0?{}:w,A=Object(o.useRef)(),D=Object(o.useState)(),M=Object(_.a)(D,2),N=M[0],P=M[1];return Object(o.useEffect)(function(){if(N){function z(X){var k=X.getValue();O&&O(k)}return N.on("change",z),function(){N.off("change",z)}}},[N,O]),Object(o.useEffect)(function(){N&&N.setOption("mode",C)},[N,C]),Object(o.useEffect)(function(){N&&((x!==N.getValue()||x==="")&&setTimeout(function(){N.setValue(x||" ")},300))},[N,x]),Object(o.useEffect)(function(){if(A.current&&!N){var z=r.a.fromTextArea(A.current,Object(I.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},S));P(z)}},[A.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:A}))}},"7ixt":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I={adjustX:1,adjustY:1},v=[0,0],T={left:{points:["cr","cl"],overflow:I,offset:[-4,0],targetOffset:v},right:{points:["cl","cr"],overflow:I,offset:[4,0],targetOffset:v},top:{points:["bc","tc"],overflow:I,offset:[0,-4],targetOffset:v},bottom:{points:["tc","bc"],overflow:I,offset:[0,4],targetOffset:v},topLeft:{points:["bl","tl"],overflow:I,offset:[0,-4],targetOffset:v},leftTop:{points:["tr","tl"],overflow:I,offset:[-4,0],targetOffset:v},topRight:{points:["br","tr"],overflow:I,offset:[0,-4],targetOffset:v},rightTop:{points:["tl","tr"],overflow:I,offset:[4,0],targetOffset:v},bottomRight:{points:["tr","br"],overflow:I,offset:[0,4],targetOffset:v},rightBottom:{points:["bl","br"],overflow:I,offset:[4,0],targetOffset:v},bottomLeft:{points:["tl","bl"],overflow:I,offset:[0,4],targetOffset:v},leftBottom:{points:["br","bl"],overflow:I,offset:[-4,0],targetOffset:v}},y=T},"7v3h":function(j,H,b){j.exports=b.p+"static/empty2.dd73f390.png"},"8+yF":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,402:2294,466:16777681,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8361:3839,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8711:2245,8728:3018,8730:2262,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8756:2240,8764:2248,8771:2249,8773:16785992,8800:2237,8801:2255,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,12289:1188,12290:1185,12300:1186,12301:1187,12443:1246,12444:1247,12449:1191,12450:1201,12451:1192,12452:1202,12453:1193,12454:1203,12455:1194,12456:1204,12457:1195,12458:1205,12459:1206,12461:1207,12463:1208,12465:1209,12467:1210,12469:1211,12471:1212,12473:1213,12475:1214,12477:1215,12479:1216,12481:1217,12483:1199,12484:1218,12486:1219,12488:1220,12490:1221,12491:1222,12492:1223,12493:1224,12494:1225,12495:1226,12498:1227,12501:1228,12504:1229,12507:1230,12510:1231,12511:1232,12512:1233,12513:1234,12514:1235,12515:1196,12516:1236,12517:1197,12518:1237,12519:1198,12520:1238,12521:1239,12522:1240,12523:1241,12524:1242,12525:1243,12527:1244,12530:1190,12531:1245,12539:1189,12540:1200},v={lookup:function(y){if(y>=32&&y<=255)return y;var g=I[y];return g!==void 0?g:16777216|y}};H.default=v},"8/bI":function(j,H,b){j.exports=b.p+"static/empty.8918e228.png"},"815F":function(j,H,b){"use strict";b.d(H,"e",function(){return _}),b.d(H,"c",function(){return e}),b.d(H,"d",function(){return o}),b.d(H,"a",function(){return l}),b.d(H,"f",function(){return r}),b.d(H,"b",function(){return i});var I=b("KQm4"),v=b("VTBJ"),T=b("Ff2n"),y=b("Zm9Q"),g=b("Kwbf"),s=b("OZM5");function _(t,a){return t!=null?t:a}function p(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=new Map;function c(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(d||[]).forEach(function(h){var u=h.key,E=h.children;Object(g.a)(u!=null,"Tree node must have a certain key: [".concat(f).concat(u,"]"));var x=String(u);Object(g.a)(!a.has(x)||u===null||u===void 0,"Same 'key' exist in the Tree: ".concat(x)),a.set(x,!0),c(E,"".concat(f).concat(x," > "))})}c(t)}function e(t){function a(c){var d=Object(y.a)(c);return d.map(function(f){if(!Object(s.i)(f))return Object(g.a)(!f,"Tree/TreeNode can only accept TreeNode as children."),null;var h=f.key,u=f.props,E=u.children,x=Object(T.a)(u,["children"]),O=Object(v.a)({key:h},x),C=a(E);return C.length&&(O.children=C),O}).filter(function(f){return f})}return a(t)}function o(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(a===!0?[]:a),d=[];function f(h){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(E,x){var O=Object(s.h)(u?u.pos:"0",x),C=_(E.key,O),w=Object(v.a)(Object(v.a)({},E),{},{parent:u,pos:O,children:null,data:E,isStart:[].concat(Object(I.a)(u?u.isStart:[]),[x===0]),isEnd:[].concat(Object(I.a)(u?u.isEnd:[]),[x===h.length-1])});return d.push(w),a===!0||c.has(C)?w.children=f(E.children||[],w):w.children=[],w})}return f(t),d}function n(t,a,c){var d;c?typeof c=="string"?d=function(u){return u[c]}:typeof c=="function"&&(d=function(u){return c(u)}):d=function(u,E){return _(u.key,E)};function f(h,u,E){var x=h?h.children:t,O=h?Object(s.h)(E.pos,u):"0";if(h){var C=d(h,O),w={node:h,index:u,pos:O,key:C,parentPos:E.node?E.pos:null,level:E.level+1};a(w)}x&&x.forEach(function(S,A){f(S,A,{node:h,pos:O,level:E?E.level+1:-1})})}f(null)}function l(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=a.initWrapper,d=a.processEntity,f=a.onProcessFinished,h=arguments.length>2?arguments[2]:void 0,u={},E={},x={posEntities:u,keyEntities:E};return c&&(x=c(x)||x),n(t,function(O){var C=O.node,w=O.index,S=O.pos,A=O.key,D=O.parentPos,M=O.level,N={node:C,index:w,key:A,pos:S,level:M},P=_(A,S);u[S]=N,E[P]=N,N.parent=u[D],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),d&&d(N,x)},h),f&&f(x),x}function r(t,a){var c=a.expandedKeys,d=a.selectedKeys,f=a.loadedKeys,h=a.loadingKeys,u=a.checkedKeys,E=a.halfCheckedKeys,x=a.dragOverNodeKey,O=a.dropPosition,C=a.keyEntities,w=C[t],S={eventKey:t,expanded:c.indexOf(t)!==-1,selected:d.indexOf(t)!==-1,loaded:f.indexOf(t)!==-1,loading:h.indexOf(t)!==-1,checked:u.indexOf(t)!==-1,halfChecked:E.indexOf(t)!==-1,pos:String(w?w.pos:""),dragOver:x===t&&O===0,dragOverGapTop:x===t&&O===-1,dragOverGapBottom:x===t&&O===1};return S}function i(t){var a=t.data,c=t.expanded,d=t.selected,f=t.checked,h=t.loaded,u=t.loading,E=t.halfChecked,x=t.dragOver,O=t.dragOverGapTop,C=t.dragOverGapBottom,w=t.pos,S=t.active,A=Object(v.a)(Object(v.a)({},a),{},{expanded:c,selected:d,checked:f,loaded:h,loading:u,halfChecked:E,dragOver:x,dragOverGapTop:O,dragOverGapBottom:C,pos:w,active:S});return"props"in A||Object.defineProperty(A,"props",{get:function(){return Object(g.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),A}},"88g3":function(j,H,b){j.exports={tree:"tree___noxec"}},"8Abk":function(j,H,b){},"8CQX":function(j,H,b){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(a){return typeof a}:I=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},I(i)}Object.defineProperty(H,"__esModule",{value:!0}),H.getKeycode=n,H.getKey=l,H.getKeysym=r;var v=o(b("mHUz")),T=o(b("8+yF")),y=o(b("6Qwc")),g=o(b("gIYZ")),s=o(b("mTgk")),_=e(b("GdRQ"));function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function e(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var t=p();if(t&&t.has(i))return t.get(i);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in i)if(Object.prototype.hasOwnProperty.call(i,d)){var f=c?Object.getOwnPropertyDescriptor(i,d):null;f&&(f.get||f.set)?Object.defineProperty(a,d,f):a[d]=i[d]}return a.default=i,t&&t.set(i,a),a}function o(i){return i&&i.__esModule?i:{default:i}}function n(i){if(i.code){switch(i.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return i.code}if(i.type!=="keypress"&&i.keyCode in y.default){var t=y.default[i.keyCode];if(_.isMac()&&t==="ContextMenu"&&(t="MetaRight"),i.location===2)switch(t){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(i.location===3)switch(t){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return t}return"Unidentified"}function l(i){if(i.key!==void 0){switch(i.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return i.char}switch(i.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(i.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(i.key==="\0"&&i.code==="NumpadDecimal")return"Delete";if(!_.isIE()&&!_.isEdge())return i.key;if(i.key.length!==1&&i.key!=="Unidentified")return i.key}var t=n(i);return t in g.default?g.default[t]:i.charCode?String.fromCharCode(i.charCode):"Unidentified"}function r(i){var t=l(i);if(t==="Unidentified")return null;if(t in s.default){var a=i.location;if(t==="Meta"&&a===0&&(a=2),t==="Clear"&&a===3){var c=n(i);c==="NumLock"&&(a=0)}if((a===void 0||a>3)&&(a=0),t==="Meta"){var d=n(i);if(d==="AltLeft")return v.default.XK_Meta_L;if(d==="AltRight")return v.default.XK_Meta_R}if(t==="Clear"){var f=n(i);if(f==="NumLock")return v.default.XK_Num_Lock}return s.default[t][a]}if(t.length!==1)return null;var h=t.charCodeAt();return h?T.default.lookup(h):null}},"8EBN":function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";I.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var v=0;v-1&&y.substring(_+1,y.length);if(p)return I.findModeByExtension(p)},I.findModeByName=function(y){y=y.toLowerCase();for(var g=0;g>h&1&&(this._zlibs[h].reset(),v.Info("Reset zlib stream "+h));this._ctl=this._ctl>>4}var u;if(this._ctl===8)u=this._fillRect(r,i,t,a,c,d,f);else if(this._ctl===9)u=this._jpegRect(r,i,t,a,c,d,f);else if(this._ctl===10)u=this._pngRect(r,i,t,a,c,d,f);else if((this._ctl&128)==0)u=this._basicRect(this._ctl,r,i,t,a,c,d,f);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return u&&(this._ctl=null),u}},{key:"_fillRect",value:function(r,i,t,a,c,d,f){if(c.rQwait("TIGHT",3))return!1;var h=c.rQi,u=c.rQ;return d.fillRect(r,i,t,a,[u[h+2],u[h+1],u[h]],!1),c.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(r,i,t,a,c,d,f){var h=this._readData(c);return h===null?!1:(d.imageRect(r,i,t,a,"image/jpeg",h),!0)}},{key:"_pngRect",value:function(r,i,t,a,c,d,f){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(r,i,t,a,c,d,f,h){if(this._filter===null)if(r&4){if(d.rQwait("TIGHT",1))return!1;this._filter=d.rQshift8()}else this._filter=0;var u=r&3,E;switch(this._filter){case 0:E=this._copyFilter(u,i,t,a,c,d,f,h);break;case 1:E=this._paletteFilter(u,i,t,a,c,d,f,h);break;case 2:E=this._gradientFilter(u,i,t,a,c,d,f,h);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return E&&(this._filter=null),E}},{key:"_copyFilter",value:function(r,i,t,a,c,d,f,h){var u=a*c*3,E;if(u<12){if(d.rQwait("TIGHT",u))return!1;E=d.rQshiftBytes(u)}else{if(E=this._readData(d),E===null)return!1;this._zlibs[r].setInput(E),E=this._zlibs[r].inflate(u),this._zlibs[r].setInput(null)}return f.blitRgbImage(i,t,a,c,E,0,!1),!0}},{key:"_paletteFilter",value:function(r,i,t,a,c,d,f,h){if(this._numColors===0){if(d.rQwait("TIGHT palette",1))return!1;var u=d.rQpeek8()+1,E=u*3;if(d.rQwait("TIGHT palette",1+E))return!1;this._numColors=u,d.rQskipBytes(1),d.rQshiftTo(this._palette,E)}var x=this._numColors<=2?1:8,O=Math.floor((a*x+7)/8),C=O*c,w;if(C<12){if(d.rQwait("TIGHT",C))return!1;w=d.rQshiftBytes(C)}else{if(w=this._readData(d),w===null)return!1;this._zlibs[r].setInput(w),w=this._zlibs[r].inflate(C),this._zlibs[r].setInput(null)}return this._numColors==2?this._monoRect(i,t,a,c,w,this._palette,f):this._paletteRect(i,t,a,c,w,this._palette,f),this._numColors=0,!0}},{key:"_monoRect",value:function(r,i,t,a,c,d,f){for(var h=this._getScratchBuffer(t*a*4),u=Math.floor((t+7)/8),E=Math.floor(t/8),x=0;x=0;S--)O=(x*t+w*8+7-S)*4,C=(c[x*u+w]>>S&1)*3,h[O]=d[C],h[O+1]=d[C+1],h[O+2]=d[C+2],h[O+3]=255;for(var A=7;A>=8-t%8;A--)O=(x*t+w*8+7-A)*4,C=(c[x*u+w]>>A&1)*3,h[O]=d[C],h[O+1]=d[C+1],h[O+2]=d[C+2],h[O+3]=255}f.blitRgbxImage(r,i,t,a,h,0,!1)}},{key:"_paletteRect",value:function(r,i,t,a,c,d,f){for(var h=this._getScratchBuffer(t*a*4),u=t*a*4,E=0,x=0;E=U&&XB?"true":"false","aria-posinset":B+1,"aria-setsize":Z,tabIndex:k?-1:0},p.a.createElement("div",{className:"".concat(F,"-first")},he),p.a.createElement("div",{className:"".concat(F,"-second")},he)));return L&&(Se=L(Se,this.props)),Se}}]),D}(p.a.Component);function f(S,A){var D=Object.keys(S);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(S);A&&(M=M.filter(function(N){return Object.getOwnPropertyDescriptor(S,N).enumerable})),D.push.apply(D,M)}return D}function h(S){for(var A=1;A0&&!Z||X===l.a.RIGHT&&re>0&&Z?(U?re-=.5:re-=1,N.changeValue(re),z.preventDefault()):X===l.a.LEFT&&reZ/2||!F&&P-B=ee.length?Te.slice(ee.length):Te}).join(` -`)}var c=[],d=["
        "],f=new i.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){c.length=0,d=["
          "]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ce,V,J,ee){if(V>=ce.length||ce[V].level<=J)return V;var Te=ce[V];ee.push("
        • "+Te.text+""),V++;var ue=[];return V=x(ce,V,Te.level,ue),ue.length>0&&(ee.push("
            "),ue.forEach(function(nt){ee.push(nt)}),ee.push("
          ")),ee.push("
        • "),V=x(ce,V,J,ee),V}function O(){return x(c,0,0,d),d.push("
        "),d.join("")}var C={heading:function(V){var J=h.exec(V);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},fences:function(V){var J=this.rules.block.fences.exec(V);if(J){var ee=J[0],Te=a(ee,J[3]||""),ue=J[2]?J[2].trim():J[2];if(["latex","katex","math"].indexOf(ue)>=0){var nt=A(),Lt=Te;Te=nt,D[nt]={type:"block",expression:Lt}}return{type:"code",raw:ee,lang:ue,text:Te}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,A=function(){return"__special_katext_id_".concat(S++,"__")},D={};function M(){return D}function N(){S=0,D={}}function P(ce){return ce=ce.replace(w,function(V,J){var ee=A();return D[ee]={type:"inline",expression:J},ee}),ce}var z=f.listitem;f.listitem=function(ce){return z(P(ce))};var X=f.paragraph;f.paragraph=function(ce){return X(P(ce))};var k=f.tablecell;f.tablecell=function(ce,V){return k(P(ce),V)},f.code=function(ce,V,J){var ee=(V||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"

        ".concat(ce,"

        "):'
        ').concat(J?ce:Object(t.escape)(ce,!0),`
        +`).map(function(Te){var ue=Te.match(/^\s+/);if(ue===null)return Te;var nt=Object(_.a)(ue,1),kt=nt[0];return kt.length>=ee.length?Te.slice(ee.length):Te}).join(` +`)}var c=[],d=["
          "],f=new i.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){c.length=0,d=["
            "]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ce,V,J,ee){if(V>=ce.length||ce[V].level<=J)return V;var Te=ce[V];ee.push("
          • "+Te.text+""),V++;var ue=[];return V=x(ce,V,Te.level,ue),ue.length>0&&(ee.push("
              "),ue.forEach(function(nt){ee.push(nt)}),ee.push("
            ")),ee.push("
          • "),V=x(ce,V,J,ee),V}function O(){return x(c,0,0,d),d.push("
          "),d.join("")}var C={heading:function(V){var J=h.exec(V);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},fences:function(V){var J=this.rules.block.fences.exec(V);if(J){var ee=J[0],Te=a(ee,J[3]||""),ue=J[2]?J[2].trim():J[2];if(["latex","katex","math"].indexOf(ue)>=0){var nt=A(),kt=Te;Te=nt,D[nt]={type:"block",expression:kt}}return{type:"code",raw:ee,lang:ue,text:Te}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,A=function(){return"__special_katext_id_".concat(S++,"__")},D={};function M(){return D}function N(){S=0,D={}}function P(ce){return ce=ce.replace(w,function(V,J){var ee=A();return D[ee]={type:"inline",expression:J},ee}),ce}var z=f.listitem;f.listitem=function(ce){return z(P(ce))};var X=f.paragraph;f.paragraph=function(ce){return X(P(ce))};var k=f.tablecell;f.tablecell=function(ce,V){return k(P(ce),V)},f.code=function(ce,V,J){var ee=(V||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"

          ".concat(ce,"

          "):'
          ').concat(J?ce:Object(t.escape)(ce,!0),`
          `):'
          '+(J?ce:Object(t.escape)(ce,!0))+"
          "},f.heading=function(ce,V,J){var ee=this.options.headerPrefix+J.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ee,level:V,text:ce}),"'+ce+""},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:C,renderer:f});var F=i.a,U=b("SJMd"),L=b("ulZh"),B=b.n(L),Z=b("m3rI"),re=b("Oy/b"),he=b("p5ED"),Se=b("ErOA");/*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -48,7 +48,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ke=function(ce,V){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var Te in ee)Object.prototype.hasOwnProperty.call(ee,Te)&&(J[Te]=ee[Te])})(ce,V)};function te(ce,V){function J(){this.constructor=ce}ke(ce,V),ce.prototype=V===null?Object.create(V):(J.prototype=V.prototype,new J)}function Re(ce,V,J,ee){return new(J||(J=Promise))(function(Te,ue){function nt(on){try{Yt(ee.next(on))}catch(Qt){ue(Qt)}}function Lt(on){try{Yt(ee.throw(on))}catch(Qt){ue(Qt)}}function Yt(on){var Qt;on.done?Te(on.value):(Qt=on.value,Qt instanceof J?Qt:new J(function(In){In(Qt)})).then(nt,Lt)}Yt((ee=ee.apply(ce,V||[])).next())})}function Ce(ce,V){var J,ee,Te,ue,nt={label:0,sent:function(){if(1&Te[0])throw Te[1];return Te[1]},trys:[],ops:[]};return ue={next:Lt(0),throw:Lt(1),return:Lt(2)},typeof Symbol=="function"&&(ue[Symbol.iterator]=function(){return this}),ue;function Lt(Yt){return function(on){return function(Qt){if(J)throw new TypeError("Generator is already executing.");for(;nt;)try{if(J=1,ee&&(Te=2&Qt[0]?ee.return:Qt[0]?ee.throw||((Te=ee.return)&&Te.call(ee),0):ee.next)&&!(Te=Te.call(ee,Qt[1])).done)return Te;switch(ee=0,Te&&(Qt=[2&Qt[0],Te.value]),Qt[0]){case 0:case 1:Te=Qt;break;case 4:return nt.label++,{value:Qt[1],done:!1};case 5:nt.label++,ee=Qt[1],Qt=[0];continue;case 7:Qt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Te=nt.trys,(Te=Te.length>0&&Te[Te.length-1])||Qt[0]!==6&&Qt[0]!==2)){nt=0;continue}if(Qt[0]===3&&(!Te||Qt[1]>Te[0]&&Qt[1]0&&Te[Te.length-1])||Qt[0]!==6&&Qt[0]!==2)){nt=0;continue}if(Qt[0]===3&&(!Te||Qt[1]>Te[0]&&Qt[1]')||this;return nt.colors=[],nt.addTransparent=!1,nt.colorBoxes=[],nt.colors=ee,nt.currentColor=Te,nt.setCurrentColor=nt.setCurrentColor.bind(nt),nt.getColorBox=nt.getColorBox.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(Te){var ue=J.getColorBox(Te);ee.appendChild(ue),J.colorBoxes.push(ue)}),ee},V.prototype.getColorBox=function(J){var ee=this,Te=this.uiStyleSettings.toolbarHeight/4,ue=this.uiStyleSettings.toolbarHeight-Te,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=ue-2+"px",nt.style.height=ue-2+"px",nt.style.padding="1px",nt.style.marginRight="2px",nt.style.marginBottom="2px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderRadius=(ue+2)/2+"px",nt.style.borderColor=J===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){ee.setCurrentColor(J,nt)});var Lt=document.createElement("div");return Lt.style.display="inline-block",Lt.style.width=ue-2+"px",Lt.style.height=ue-2+"px",Lt.style.backgroundColor=J,Lt.style.borderRadius=ue/2+"px",J==="transparent"&&(Lt.style.fill=this.uiStyleSettings.toolboxAccentColor,Lt.innerHTML=` + `))},ce.prototype.show=function(V){var J;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((J=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&J!==void 0?J:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ce.prototype.setPanelButtons=function(V){var J,ee,Te=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((J=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&J!==void 0?J:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ue){var nt;ue.uiStyleSettings=Te.uiStyleSettings;var kt=document.createElement("div");kt.className=Te.toolboxButtonStyleClass.name+" "+((nt=Te.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&nt!==void 0?nt:Te.toolboxButtonStyleColorsClass.name),kt.innerHTML=ue.icon,kt.title=ue.title,kt.addEventListener("click",function(){Te.panelButtonClick(ue)}),Te.panelButtons.push(kt),Te.buttonRow.appendChild(kt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ce.prototype.panelButtonClick=function(V){var J=this,ee=-1;if(V!==this.activePanel){ee=this.panels.indexOf(V),this.panelRow.innerHTML="";var Te=V.getUi();Te.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Te),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){J.displayMode==="inline"?J.panelRow.style.display="none":J.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ue,nt){var kt,Yt;ue.className=J.toolboxButtonStyleClass.name+" "+(nt===ee?""+((kt=J.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&kt!==void 0?kt:J.toolboxActiveButtonStyleColorsClass.name):""+((Yt=J.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Yt!==void 0?Yt:J.toolboxButtonStyleColorsClass.name))})},ce}(),Y=function(ce,V){this.title=ce,this.icon=V},oe=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.colors=[],nt.addTransparent=!1,nt.colorBoxes=[],nt.colors=ee,nt.currentColor=Te,nt.setCurrentColor=nt.setCurrentColor.bind(nt),nt.getColorBox=nt.getColorBox.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(Te){var ue=J.getColorBox(Te);ee.appendChild(ue),J.colorBoxes.push(ue)}),ee},V.prototype.getColorBox=function(J){var ee=this,Te=this.uiStyleSettings.toolbarHeight/4,ue=this.uiStyleSettings.toolbarHeight-Te,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=ue-2+"px",nt.style.height=ue-2+"px",nt.style.padding="1px",nt.style.marginRight="2px",nt.style.marginBottom="2px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderRadius=(ue+2)/2+"px",nt.style.borderColor=J===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){ee.setCurrentColor(J,nt)});var kt=document.createElement("div");return kt.style.display="inline-block",kt.style.width=ue-2+"px",kt.style.height=ue-2+"px",kt.style.backgroundColor=J,kt.style.borderRadius=ue/2+"px",J==="transparent"&&(kt.style.fill=this.uiStyleSettings.toolboxAccentColor,kt.innerHTML=` - `),nt.appendChild(Lt),nt},V.prototype.setCurrentColor=function(J,ee){var Te=this;this.currentColor=J,this.colorBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(J)},V}(Y),le=function(){function ce(V,J,ee){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=J,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ce.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ce.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ce.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ce.prototype.pointerDown=function(V,J){},ce.prototype.dblClick=function(V,J){},ce.prototype.manipulate=function(V){},ce.prototype.pointerUp=function(V){this.stateChanged()},ce.prototype.dispose=function(){},ce.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ce.prototype.getState=function(){return{typeName:ce.typeName,state:this.state,notes:this.notes}},ce.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ce.prototype.scale=function(V,J){},ce.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ce.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ce.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},ce.typeName="MarkerBase",ce}(),Ee=function(){function ce(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ce.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},ce}(),Le=function(){function ce(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce}(),ge=function(){function ce(){}return ce.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ce.toSVGMatrix=function(V,J){return V.a=J.a,V.b=J.b,V.c=J.c,V.d=J.d,V.e=J.e,V.f=J.f,V},ce}(),De=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.left=0,ue.top=0,ue.width=0,ue.height=0,ue.defaultSize={x:50,y:20},ue.offsetX=0,ue.offsetY=0,ue.rotationAngle=0,ue.CB_DISTANCE=10,ue._suppressMarkerCreateEvent=!1,ue.container.transform.baseVal.appendItem(me.createTransform()),ue.setupControlBox(),ue}return te(V,ce),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(J){this._visual=J;var ee=me.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!!(this.controlGrips.findGripByVisual(J)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.left=J.x,this.top=J.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Te=this.unrotatePoint(J);if(this.manipulationStartX=Te.x,this.manipulationStartY=Te.y,this.offsetX=Te.x-this.left,this.offsetY=Te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var ue=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ue.x-this.width/2,this.top=ue.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var nt=this.container.transform.baseVal.getItem(0);nt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(nt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(J){this.visual.style.transform="translate("+J.x+"px, "+J.y+"px)"},V.prototype.manipulate=function(J){var ee=this.unrotatePoint(J);this.state==="creating"?this.resize(J):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(J)},V.prototype.resize=function(J){var ee=this.manipulationStartLeft,Te=this.manipulationStartWidth,ue=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+J.x-this.manipulationStartX,Te=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Te=this.manipulationStartWidth+J.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ue=this.manipulationStartTop+J.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-ue;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+J.y-this.manipulationStartY}Te>=0?(this.left=ee,this.width=Te):(this.left=ee+Te,this.width=-Te),nt>=0?(this.top=ue,this.height=nt):(this.top=ue+nt,this.height=-nt),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(J){if(Math.abs(J.x-this.centerX)>.1){var ee=Math.sign(J.x-this.centerX);this.rotationAngle=180*Math.atan((J.y-this.centerY)/(J.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},V.prototype.applyRotation=function(){var J=this.container.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(J,0)},V.prototype.rotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM(),Te=me.createPoint(J.x,J.y);return{x:(Te=Te.matrixTransform(ee)).x,y:Te.y}},V.prototype.unrotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM();ee=ee.inverse();var Te=me.createPoint(J.x,J.y);return{x:(Te=Te.matrixTransform(ee)).x,y:Te.y}},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var J=me.createTransform();J.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(J),this.container.appendChild(this.controlBox),this.controlRect=me.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=me.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ee,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var J=this.controlBox.transform.baseVal.getItem(0);J.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(J,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},V.prototype.createGrip=function(){var J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.controlGrips.topLeft.GRIP_SIZE,ee=-J/2,Te=ee,ue=(this.width+this.CB_DISTANCE)/2-J/2,nt=(this.height+this.CB_DISTANCE)/2-J/2,Lt=this.height+this.CB_DISTANCE-J/2,Yt=this.width+this.CB_DISTANCE-J/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,Te),this.positionGrip(this.controlGrips.topCenter.visual,ue,Te),this.positionGrip(this.controlGrips.topRight.visual,Yt,Te),this.positionGrip(this.controlGrips.centerLeft.visual,ee,nt),this.positionGrip(this.controlGrips.centerRight.visual,Yt,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Lt),this.positionGrip(this.controlGrips.bottomCenter.visual,ue,Lt),this.positionGrip(this.controlGrips.bottomRight.visual,Yt,Lt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ue,Te-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(J,ee,Te){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Te),J.transform.baseVal.replaceItem(ue,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee);var Te=this.rotatePoint({x:this.left,y:this.top}),ue=this.unrotatePoint({x:Te.x*J,y:Te.y*ee});this.left=ue.x,this.top=ue.y,this.width=this.width*J,this.height=this.height*ee,this.adjustControlBox()},V}(le),_e=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.fillColor="transparent",ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.opacity=1,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setFillColor=ue.setFillColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.createVisual=ue.createVisual.bind(ue),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual)},V.prototype.createVisual=function(){this.visual=me.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.setSize()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){ce.prototype.pointerUp.call(this,J),this.setSize()},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},V.prototype.setFillColor=function(J){this.fillColor=J,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){var ee=J;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setSize()},V.title="Rectangle marker",V}(De),Xe=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.widths=[],nt.widthBoxes=[],nt.widths=ee,nt.currentWidth=Te,nt.setCurrentWidth=nt.setCurrentWidth.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Te===J.currentWidth?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentWidth(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=Te.toString(),nt.style.marginRight="5px",ue.appendChild(nt);var Lt=document.createElement("div");Lt.style.minHeight="20px",Lt.style.flexGrow="2",Lt.style.display="flex",Lt.style.alignItems="center";var Yt=document.createElement("hr");Yt.style.minWidth="20px",Yt.style.border="0px",Yt.style.borderTop=Te+"px solid "+J.uiStyleSettings.toolboxColor,Yt.style.flexGrow="2",Lt.appendChild(Yt),ue.appendChild(Lt),J.widthBoxes.push(ue)}),ee},V.prototype.setCurrentWidth=function(J,ee){var Te=this;this.currentWidth=J,this.widthBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(Y),tt=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.styles=[],nt.styleBoxes=[],nt.styles=ee,nt.currentStyle=Te,nt.setCurrentStyle=nt.setCurrentStyle.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.styles.length-5+"%",ue.style.borderColor=Te===J.currentStyle?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentStyle(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var Lt=` + `),nt.appendChild(kt),nt},V.prototype.setCurrentColor=function(J,ee){var Te=this;this.currentColor=J,this.colorBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(J)},V}(Y),le=function(){function ce(V,J,ee){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=J,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ce.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ce.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ce.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ce.prototype.pointerDown=function(V,J){},ce.prototype.dblClick=function(V,J){},ce.prototype.manipulate=function(V){},ce.prototype.pointerUp=function(V){this.stateChanged()},ce.prototype.dispose=function(){},ce.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ce.prototype.getState=function(){return{typeName:ce.typeName,state:this.state,notes:this.notes}},ce.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ce.prototype.scale=function(V,J){},ce.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ce.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ce.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},ce.typeName="MarkerBase",ce}(),Ee=function(){function ce(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ce.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},ce}(),Le=function(){function ce(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce}(),ge=function(){function ce(){}return ce.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ce.toSVGMatrix=function(V,J){return V.a=J.a,V.b=J.b,V.c=J.c,V.d=J.d,V.e=J.e,V.f=J.f,V},ce}(),De=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.left=0,ue.top=0,ue.width=0,ue.height=0,ue.defaultSize={x:50,y:20},ue.offsetX=0,ue.offsetY=0,ue.rotationAngle=0,ue.CB_DISTANCE=10,ue._suppressMarkerCreateEvent=!1,ue.container.transform.baseVal.appendItem(me.createTransform()),ue.setupControlBox(),ue}return te(V,ce),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(J){this._visual=J;var ee=me.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!!(this.controlGrips.findGripByVisual(J)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.left=J.x,this.top=J.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Te=this.unrotatePoint(J);if(this.manipulationStartX=Te.x,this.manipulationStartY=Te.y,this.offsetX=Te.x-this.left,this.offsetY=Te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var ue=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ue.x-this.width/2,this.top=ue.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var nt=this.container.transform.baseVal.getItem(0);nt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(nt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(J){this.visual.style.transform="translate("+J.x+"px, "+J.y+"px)"},V.prototype.manipulate=function(J){var ee=this.unrotatePoint(J);this.state==="creating"?this.resize(J):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(J)},V.prototype.resize=function(J){var ee=this.manipulationStartLeft,Te=this.manipulationStartWidth,ue=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+J.x-this.manipulationStartX,Te=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Te=this.manipulationStartWidth+J.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ue=this.manipulationStartTop+J.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-ue;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+J.y-this.manipulationStartY}Te>=0?(this.left=ee,this.width=Te):(this.left=ee+Te,this.width=-Te),nt>=0?(this.top=ue,this.height=nt):(this.top=ue+nt,this.height=-nt),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(J){if(Math.abs(J.x-this.centerX)>.1){var ee=Math.sign(J.x-this.centerX);this.rotationAngle=180*Math.atan((J.y-this.centerY)/(J.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},V.prototype.applyRotation=function(){var J=this.container.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(J,0)},V.prototype.rotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM(),Te=me.createPoint(J.x,J.y);return{x:(Te=Te.matrixTransform(ee)).x,y:Te.y}},V.prototype.unrotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM();ee=ee.inverse();var Te=me.createPoint(J.x,J.y);return{x:(Te=Te.matrixTransform(ee)).x,y:Te.y}},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var J=me.createTransform();J.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(J),this.container.appendChild(this.controlBox),this.controlRect=me.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=me.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ee,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var J=this.controlBox.transform.baseVal.getItem(0);J.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(J,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},V.prototype.createGrip=function(){var J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.controlGrips.topLeft.GRIP_SIZE,ee=-J/2,Te=ee,ue=(this.width+this.CB_DISTANCE)/2-J/2,nt=(this.height+this.CB_DISTANCE)/2-J/2,kt=this.height+this.CB_DISTANCE-J/2,Yt=this.width+this.CB_DISTANCE-J/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,Te),this.positionGrip(this.controlGrips.topCenter.visual,ue,Te),this.positionGrip(this.controlGrips.topRight.visual,Yt,Te),this.positionGrip(this.controlGrips.centerLeft.visual,ee,nt),this.positionGrip(this.controlGrips.centerRight.visual,Yt,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,kt),this.positionGrip(this.controlGrips.bottomCenter.visual,ue,kt),this.positionGrip(this.controlGrips.bottomRight.visual,Yt,kt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ue,Te-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(J,ee,Te){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Te),J.transform.baseVal.replaceItem(ue,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee);var Te=this.rotatePoint({x:this.left,y:this.top}),ue=this.unrotatePoint({x:Te.x*J,y:Te.y*ee});this.left=ue.x,this.top=ue.y,this.width=this.width*J,this.height=this.height*ee,this.adjustControlBox()},V}(le),_e=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.fillColor="transparent",ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.opacity=1,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setFillColor=ue.setFillColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.createVisual=ue.createVisual.bind(ue),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual)},V.prototype.createVisual=function(){this.visual=me.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.setSize()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){ce.prototype.pointerUp.call(this,J),this.setSize()},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},V.prototype.setFillColor=function(J){this.fillColor=J,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){var ee=J;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setSize()},V.title="Rectangle marker",V}(De),Xe=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.widths=[],nt.widthBoxes=[],nt.widths=ee,nt.currentWidth=Te,nt.setCurrentWidth=nt.setCurrentWidth.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Te===J.currentWidth?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentWidth(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=Te.toString(),nt.style.marginRight="5px",ue.appendChild(nt);var kt=document.createElement("div");kt.style.minHeight="20px",kt.style.flexGrow="2",kt.style.display="flex",kt.style.alignItems="center";var Yt=document.createElement("hr");Yt.style.minWidth="20px",Yt.style.border="0px",Yt.style.borderTop=Te+"px solid "+J.uiStyleSettings.toolboxColor,Yt.style.flexGrow="2",kt.appendChild(Yt),ue.appendChild(kt),J.widthBoxes.push(ue)}),ee},V.prototype.setCurrentWidth=function(J,ee){var Te=this;this.currentWidth=J,this.widthBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(Y),tt=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.styles=[],nt.styleBoxes=[],nt.styles=ee,nt.currentStyle=Te,nt.setCurrentStyle=nt.setCurrentStyle.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.styles.length-5+"%",ue.style.borderColor=Te===J.currentStyle?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentStyle(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var kt=` - `;nt.innerHTML=Lt,ue.appendChild(nt),J.styleBoxes.push(ue)}),ee},V.prototype.setCurrentStyle=function(J,ee){var Te=this;this.currentStyle=J,this.styleBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(Y),Ge=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="FrameMarker",V.title="Frame marker",V.icon='',V}(_e),Me=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},bt=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.x1=0,ue.y1=0,ue.x2=0,ue.y2=0,ue.defaultLength=50,ue.manipulationStartX=0,ue.manipulationStartY=0,ue.manipulationStartX1=0,ue.manipulationStartY1=0,ue.manipulationStartX2=0,ue.manipulationStartY2=0,ue.setupControlBox(),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!(!this.grip1.ownsTarget(J)&&!this.grip2.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartX=J.x,this.manipulationStartY=J.y,this.state==="new"&&(this.x1=J.x,this.y1=J.y,this.x2=J.x,this.y2=J.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(J){this.state==="creating"?this.resize(J):this.state==="move"?(this.x1=this.manipulationStartX1+J.x-this.manipulationStartX,this.y1=this.manipulationStartY1+J.y-this.manipulationStartY,this.x2=this.manipulationStartX2+J.x-this.manipulationStartX,this.y2=this.manipulationStartY2+J.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(J)},V.prototype.resize=function(J){switch(this.activeGrip){case this.grip1:this.x1=J.x,this.y1=J.y;break;case this.grip2:case void 0:this.x2=J.x,this.y2=J.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-J/2,this.y1-J/2),this.positionGrip(this.grip2.visual,this.x2-J/2,this.y2-J/2)},V.prototype.positionGrip=function(J,ee,Te){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Te),J.transform.baseVal.replaceItem(ue,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.x1=this.x1*J,this.y1=this.y1*ee,this.x2=this.x2*J,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},V}(le),Oe=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorLine&&J!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='',V}(bt),Ve=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.fonts=[],nt.fontBoxes=[],nt.fonts=ee,nt.currentFont=Te,nt.setCurrentFont=nt.setCurrentFont.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(Te){var ue=document.createElement("div");ue.style.display="inline-block",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.fonts.length-5+"%",ue.style.borderColor=Te===J.currentFont?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentFont(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.style.display="flex",nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.fontFamily=Te,nt.style.overflow="hidden";var Lt=document.createElement("div");Lt.style.whiteSpace="nowrap",Lt.style.overflow="hidden",Lt.style.textOverflow="ellipsis",Lt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(Lt),ue.appendChild(nt),J.fontBoxes.push(ue)}),ee},V.prototype.setCurrentFont=function(J,ee){var Te=this;this.currentFont=J,this.fontBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(Y),Je=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.color="transparent",ue.padding=5,ue.DEFAULT_TEXT="your text here",ue.text=ue.DEFAULT_TEXT,ue.isMoved=!1,ue.color=Te.defaultColor,ue.fontFamily=Te.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setColor=ue.setColor.bind(ue),ue.setFont=ue.setFont.bind(ue),ue.renderText=ue.renderText.bind(ue),ue.sizeText=ue.sizeText.bind(ue),ue.textEditDivClicked=ue.textEditDivClicked.bind(ue),ue.showTextEditor=ue.showTextEditor.bind(ue),ue.setSize=ue.setSize.bind(ue),ue.positionTextEditor=ue.positionTextEditor.bind(ue),ue.colorPanel=new oe("Color",Te.defaultColorSet,Te.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.fontFamilyPanel=new Ve("Font",Te.defaultFontFamilies,Te.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue}return te(V,ce),V.prototype.ownsTarget=function(J){if(ce.prototype.ownsTarget.call(this,J)||J===this.visual||J===this.textElement||J===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(Te){Te===J&&(ee=!0)}),ee},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.isMoved=!1,this.pointerDownPoint=J,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.renderText=function(){var J=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ee){J.textElement.appendChild(me.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var J=this.textElement.getBBox(),ee=1;if(J.width>0&&J.height>0){var Te=(1*this.width-this.width*this.padding*2/100)/J.width,ue=(1*this.height-this.height*this.padding*2/100)/J.height;ee=Math.min(Te,ue)}return ee},V.prototype.getTextPosition=function(J){var ee=this.textElement.getBBox(),Te=0,ue=0;return ee.width>0&&ee.height>0&&(Te=(this.width-ee.width*J)/2,ue=this.height/2-ee.height*J/2),{x:Te,y:ue}},V.prototype.sizeText=function(){var J=this.textElement.getBBox(),ee=this.getTextScale(),Te=this.getTextPosition(ee);Te.y-=J.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Te.x+"px, "+Te.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Te.x,Te.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(J.x-this.pointerDownPoint.x)>5||Math.abs(J.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(J){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ce.prototype.pointerUp.call(this,J),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var J=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(J.textEditor.style.fontSize);J.textEditor.clientWidth>=Number.parseInt(J.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,J.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var Te=ee.clipboardData.getData("text"),ue=window.getSelection();if(!ue.rangeCount)return!1;ue.deleteFromDocument(),ue.getRangeAt(0).insertNode(document.createTextNode(Te)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){J.textEditDivClicked(J.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var J=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Te=this.textElement.getBBox(),ue={x:Te.width*J,y:Te.height*J};ee.x-=ue.x/2,ee.y-=ue.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*J,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(J){this.text=J.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ce.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ce.prototype.deselect.call(this)},V.prototype.dblClick=function(J,ee){ce.prototype.dblClick.call(this,J,ee),this.showTextEditor()},V.prototype.setColor=function(J){this.textElement&&me.setAttributes(this.textElement,[["fill",J]]),this.color=J,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(J)},V.prototype.setFont=function(J){this.textElement&&me.setAttributes(this.textElement,[["font-family",J]]),this.fontFamily=J,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){var ee=J;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='',V}(De),Ye=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.color="transparent",ue.lineWidth=3,ue.drawing=!1,ue.pixelRatio=1,ue.color=Te.defaultColor,ue.lineWidth=Te.defaultStrokeWidth,ue.pixelRatio=Te.freehandPixelRatio,ue.setColor=ue.setColor.bind(ue),ue.addCanvas=ue.addCanvas.bind(ue),ue.finishCreation=ue.finishCreation.bind(ue),ue.setLineWidth=ue.setLineWidth.bind(ue),ue.colorPanel=new oe("Color",Te.defaultColorSet,Te.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.lineWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.lineWidthPanel.onWidthChanged=ue.setLineWidth,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var J=me.createTransform();this.visual.transform.baseVal.appendItem(J),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(J.x,J.y),this.drawing=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.manipulate=function(J){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(J.x,J.y),this.canvasContext.stroke()):ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ce.prototype.pointerUp.call(this,J)},V.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var J=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Te=ee[0],ue=ee[1],nt=ee[2],Lt=ee[3],Yt=!1,on=0;on0&&(Yt=!0,onLt&&(Lt=on),Qt>nt&&(nt=Qt));if(Yt){this.left=Te/this.pixelRatio,this.top=ue/this.pixelRatio,this.width=(nt-Te)/this.pixelRatio,this.height=(Lt-ue)/this.pixelRatio;var In=document.createElement("canvas");In.width=nt-Te,In.height=Lt-ue,In.getContext("2d").putImageData(this.canvasContext.getImageData(Te,ue,nt-Te,Lt-ue),0,0),this.drawingImgUrl=In.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(J){this.color=J,this.colorChanged(J)},V.prototype.setLineWidth=function(J){this.lineWidth=J},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({drawingImgUrl:this.drawingImgUrl},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){this.createVisual(),ce.prototype.restoreState.call(this,J),this.drawingImgUrl=J.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='',V}(De),Ne=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,Te||'')||this;return ue.typeBoxes=[],ue.currentType=ee,ue.setCurrentType=ue.setCurrentType.bind(ue),ue}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var Te=function(Lt){var Yt="both";switch(Lt){case 0:Yt="both";break;case 1:Yt="start";break;case 2:Yt="end";break;case 3:Yt="none"}var on=document.createElement("div");if(on.style.display="flex",on.style.flexGrow="2",on.style.alignItems="center",on.style.justifyContent="space-between",on.style.padding="5px",on.style.borderWidth="2px",on.style.borderStyle="solid",on.style.borderColor=Yt===ue.currentType?ue.uiStyleSettings.toolboxAccentColor:"transparent",on.addEventListener("click",function(){J.setCurrentType(Yt,on)}),ee.appendChild(on),Yt==="both"||Yt==="start"){var Qt=document.createElement("div");Qt.style.display="flex",Qt.style.alignItems="center",Qt.style.minHeight="20px",Qt.innerHTML=` + `;nt.innerHTML=kt,ue.appendChild(nt),J.styleBoxes.push(ue)}),ee},V.prototype.setCurrentStyle=function(J,ee){var Te=this;this.currentStyle=J,this.styleBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(Y),Ge=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="FrameMarker",V.title="Frame marker",V.icon='',V}(_e),Me=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Et=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.x1=0,ue.y1=0,ue.x2=0,ue.y2=0,ue.defaultLength=50,ue.manipulationStartX=0,ue.manipulationStartY=0,ue.manipulationStartX1=0,ue.manipulationStartY1=0,ue.manipulationStartX2=0,ue.manipulationStartY2=0,ue.setupControlBox(),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!(!this.grip1.ownsTarget(J)&&!this.grip2.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartX=J.x,this.manipulationStartY=J.y,this.state==="new"&&(this.x1=J.x,this.y1=J.y,this.x2=J.x,this.y2=J.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(J){this.state==="creating"?this.resize(J):this.state==="move"?(this.x1=this.manipulationStartX1+J.x-this.manipulationStartX,this.y1=this.manipulationStartY1+J.y-this.manipulationStartY,this.x2=this.manipulationStartX2+J.x-this.manipulationStartX,this.y2=this.manipulationStartY2+J.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(J)},V.prototype.resize=function(J){switch(this.activeGrip){case this.grip1:this.x1=J.x,this.y1=J.y;break;case this.grip2:case void 0:this.x2=J.x,this.y2=J.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-J/2,this.y1-J/2),this.positionGrip(this.grip2.visual,this.x2-J/2,this.y2-J/2)},V.prototype.positionGrip=function(J,ee,Te){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Te),J.transform.baseVal.replaceItem(ue,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.x1=this.x1*J,this.y1=this.y1*ee,this.x2=this.x2*J,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},V}(le),Oe=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorLine&&J!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='',V}(Et),Ve=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.fonts=[],nt.fontBoxes=[],nt.fonts=ee,nt.currentFont=Te,nt.setCurrentFont=nt.setCurrentFont.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(Te){var ue=document.createElement("div");ue.style.display="inline-block",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.fonts.length-5+"%",ue.style.borderColor=Te===J.currentFont?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentFont(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.style.display="flex",nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.fontFamily=Te,nt.style.overflow="hidden";var kt=document.createElement("div");kt.style.whiteSpace="nowrap",kt.style.overflow="hidden",kt.style.textOverflow="ellipsis",kt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(kt),ue.appendChild(nt),J.fontBoxes.push(ue)}),ee},V.prototype.setCurrentFont=function(J,ee){var Te=this;this.currentFont=J,this.fontBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(Y),Je=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.color="transparent",ue.padding=5,ue.DEFAULT_TEXT="your text here",ue.text=ue.DEFAULT_TEXT,ue.isMoved=!1,ue.color=Te.defaultColor,ue.fontFamily=Te.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setColor=ue.setColor.bind(ue),ue.setFont=ue.setFont.bind(ue),ue.renderText=ue.renderText.bind(ue),ue.sizeText=ue.sizeText.bind(ue),ue.textEditDivClicked=ue.textEditDivClicked.bind(ue),ue.showTextEditor=ue.showTextEditor.bind(ue),ue.setSize=ue.setSize.bind(ue),ue.positionTextEditor=ue.positionTextEditor.bind(ue),ue.colorPanel=new oe("Color",Te.defaultColorSet,Te.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.fontFamilyPanel=new Ve("Font",Te.defaultFontFamilies,Te.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue}return te(V,ce),V.prototype.ownsTarget=function(J){if(ce.prototype.ownsTarget.call(this,J)||J===this.visual||J===this.textElement||J===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(Te){Te===J&&(ee=!0)}),ee},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.isMoved=!1,this.pointerDownPoint=J,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.renderText=function(){var J=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ee){J.textElement.appendChild(me.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var J=this.textElement.getBBox(),ee=1;if(J.width>0&&J.height>0){var Te=(1*this.width-this.width*this.padding*2/100)/J.width,ue=(1*this.height-this.height*this.padding*2/100)/J.height;ee=Math.min(Te,ue)}return ee},V.prototype.getTextPosition=function(J){var ee=this.textElement.getBBox(),Te=0,ue=0;return ee.width>0&&ee.height>0&&(Te=(this.width-ee.width*J)/2,ue=this.height/2-ee.height*J/2),{x:Te,y:ue}},V.prototype.sizeText=function(){var J=this.textElement.getBBox(),ee=this.getTextScale(),Te=this.getTextPosition(ee);Te.y-=J.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Te.x+"px, "+Te.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Te.x,Te.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(J.x-this.pointerDownPoint.x)>5||Math.abs(J.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(J){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ce.prototype.pointerUp.call(this,J),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var J=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(J.textEditor.style.fontSize);J.textEditor.clientWidth>=Number.parseInt(J.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,J.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var Te=ee.clipboardData.getData("text"),ue=window.getSelection();if(!ue.rangeCount)return!1;ue.deleteFromDocument(),ue.getRangeAt(0).insertNode(document.createTextNode(Te)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){J.textEditDivClicked(J.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var J=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Te=this.textElement.getBBox(),ue={x:Te.width*J,y:Te.height*J};ee.x-=ue.x/2,ee.y-=ue.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*J,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(J){this.text=J.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ce.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ce.prototype.deselect.call(this)},V.prototype.dblClick=function(J,ee){ce.prototype.dblClick.call(this,J,ee),this.showTextEditor()},V.prototype.setColor=function(J){this.textElement&&me.setAttributes(this.textElement,[["fill",J]]),this.color=J,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(J)},V.prototype.setFont=function(J){this.textElement&&me.setAttributes(this.textElement,[["font-family",J]]),this.fontFamily=J,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){var ee=J;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='',V}(De),Ye=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.color="transparent",ue.lineWidth=3,ue.drawing=!1,ue.pixelRatio=1,ue.color=Te.defaultColor,ue.lineWidth=Te.defaultStrokeWidth,ue.pixelRatio=Te.freehandPixelRatio,ue.setColor=ue.setColor.bind(ue),ue.addCanvas=ue.addCanvas.bind(ue),ue.finishCreation=ue.finishCreation.bind(ue),ue.setLineWidth=ue.setLineWidth.bind(ue),ue.colorPanel=new oe("Color",Te.defaultColorSet,Te.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.lineWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.lineWidthPanel.onWidthChanged=ue.setLineWidth,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var J=me.createTransform();this.visual.transform.baseVal.appendItem(J),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(J.x,J.y),this.drawing=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.manipulate=function(J){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(J.x,J.y),this.canvasContext.stroke()):ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ce.prototype.pointerUp.call(this,J)},V.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var J=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Te=ee[0],ue=ee[1],nt=ee[2],kt=ee[3],Yt=!1,sn=0;sn0&&(Yt=!0,snkt&&(kt=sn),Qt>nt&&(nt=Qt));if(Yt){this.left=Te/this.pixelRatio,this.top=ue/this.pixelRatio,this.width=(nt-Te)/this.pixelRatio,this.height=(kt-ue)/this.pixelRatio;var kn=document.createElement("canvas");kn.width=nt-Te,kn.height=kt-ue,kn.getContext("2d").putImageData(this.canvasContext.getImageData(Te,ue,nt-Te,kt-ue),0,0),this.drawingImgUrl=kn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(J){this.color=J,this.colorChanged(J)},V.prototype.setLineWidth=function(J){this.lineWidth=J},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({drawingImgUrl:this.drawingImgUrl},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){this.createVisual(),ce.prototype.restoreState.call(this,J),this.drawingImgUrl=J.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='',V}(De),Ne=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,Te||'')||this;return ue.typeBoxes=[],ue.currentType=ee,ue.setCurrentType=ue.setCurrentType.bind(ue),ue}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var Te=function(kt){var Yt="both";switch(kt){case 0:Yt="both";break;case 1:Yt="start";break;case 2:Yt="end";break;case 3:Yt="none"}var sn=document.createElement("div");if(sn.style.display="flex",sn.style.flexGrow="2",sn.style.alignItems="center",sn.style.justifyContent="space-between",sn.style.padding="5px",sn.style.borderWidth="2px",sn.style.borderStyle="solid",sn.style.borderColor=Yt===ue.currentType?ue.uiStyleSettings.toolboxAccentColor:"transparent",sn.addEventListener("click",function(){J.setCurrentType(Yt,sn)}),ee.appendChild(sn),Yt==="both"||Yt==="start"){var Qt=document.createElement("div");Qt.style.display="flex",Qt.style.alignItems="center",Qt.style.minHeight="20px",Qt.innerHTML=` - `,Qt.style.marginLeft="5px",on.appendChild(Qt)}var In=document.createElement("div");In.style.display="flex",In.style.alignItems="center",In.style.minHeight="20px",In.style.flexGrow="2";var Gn=document.createElement("hr");if(Gn.style.minWidth="20px",Gn.style.border="0px",Gn.style.borderTop="3px solid "+(ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxColor:"#eeeeee"),Gn.style.flexGrow="2",In.appendChild(Gn),on.appendChild(In),Yt==="both"||Yt==="end"){var lr=document.createElement("div");lr.style.display="flex",lr.style.alignItems="center",lr.style.minHeight="20px",lr.innerHTML=` + `,Qt.style.marginLeft="5px",sn.appendChild(Qt)}var kn=document.createElement("div");kn.style.display="flex",kn.style.alignItems="center",kn.style.minHeight="20px",kn.style.flexGrow="2";var Vn=document.createElement("hr");if(Vn.style.minWidth="20px",Vn.style.border="0px",Vn.style.borderTop="3px solid "+(ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxColor:"#eeeeee"),Vn.style.flexGrow="2",kn.appendChild(Vn),sn.appendChild(kn),Yt==="both"||Yt==="end"){var lr=document.createElement("div");lr.style.display="flex",lr.style.alignItems="center",lr.style.minHeight="20px",lr.innerHTML=` - `,lr.style.marginRight="5px",on.appendChild(lr)}ue.typeBoxes.push(on)},ue=this,nt=0;nt<4;nt++)Te(nt);return ee},V.prototype.setCurrentType=function(J,ee){var Te=this;this.currentType=J,this.typeBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings!==void 0?Te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(Y),He=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.arrowType="end",ue.arrowBaseHeight=10,ue.arrowBaseWidth=10,ue.getArrowPoints=ue.getArrowPoints.bind(ue),ue.setArrowType=ue.setArrowType.bind(ue),ue.arrowTypePanel=new Ne("Arrow type","end"),ue.arrowTypePanel.onArrowTypeChanged=ue.setArrowType,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.arrow1&&J!==this.arrow2)},V.prototype.getArrowPoints=function(J,ee){var Te=this.arrowBaseWidth+2*this.strokeWidth,ue=this.arrowBaseHeight+2*this.strokeWidth;return J-Te/2+","+(ee+ue/2)+" "+J+","+(ee-ue/2)+" "+(J+Te/2)+","+(ee+ue/2)},V.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ce.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(J,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var Te=this.arrow2.transform.baseVal.getItem(0);Te.setRotate(J+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Te,0)}},V.prototype.setArrowType=function(J){this.arrowType=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({arrowType:this.arrowType},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='',V}(Oe),ve=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.fillColor=Te.defaultFillColor,ue.strokeWidth=0,ue.fillPanel=new oe("Color",Te.defaultColorSet,Te.defaultFillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="CoverMarker",V.title="Cover marker",V.icon='',V}(_e),xe=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.opacities=[],nt.opacityBoxes=[],nt.opacities=ee,nt.currentOpacity=Te,nt.setCurrentOpacity=nt.setCurrentOpacity.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="center",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Te===J.currentOpacity?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentOpacity(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=100*Te+"%",ue.appendChild(nt),J.opacityBoxes.push(ue)}),ee},V.prototype.setCurrentOpacity=function(J,ee){var Te=this;this.currentOpacity=J,this.opacityBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(Y),de=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.setOpacity=ue.setOpacity.bind(ue),ue.fillColor=Te.defaultHighlightColor,ue.strokeWidth=0,ue.opacity=Te.defaultHighlightOpacity,ue.fillPanel=new oe("Color",Te.defaultColorSet,ue.fillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue.opacityPanel=new xe("Opacity",Te.defaultOpacitySteps,ue.opacity),ue.opacityPanel.onOpacityChanged=ue.setOpacity,ue}return te(V,ce),V.prototype.setOpacity=function(J){this.opacity=J,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='',V}(ve),je='',Qe=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.bgColor="transparent",ue.tipPosition={x:0,y:0},ue.tipBase1Position={x:0,y:0},ue.tipBase2Position={x:0,y:0},ue.tipMoving=!1,ue.color=Te.defaultStrokeColor,ue.bgColor=Te.defaultFillColor,ue.fontFamily=Te.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setBgColor=ue.setBgColor.bind(ue),ue.getTipPoints=ue.getTipPoints.bind(ue),ue.positionTip=ue.positionTip.bind(ue),ue.setTipPoints=ue.setTipPoints.bind(ue),ue.colorPanel=new oe("Text color",Te.defaultColorSet,ue.color,''),ue.colorPanel.onColorChanged=ue.setColor,ue.bgColorPanel=new oe("Fill color",Te.defaultColorSet,ue.bgColor,je),ue.bgColorPanel.onColorChanged=ue.setBgColor,ue.fontFamilyPanel=new Ve("Font",Te.defaultFontFamilies,Te.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue.tipGrip=new Le,ue.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),ue.controlBox.appendChild(ue.tipGrip.visual),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return ce.prototype.ownsTarget.call(this,J)||this.tipGrip.ownsTarget(J)||this.tip===J},V.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(J,ee){this.state==="new"&&ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.pointerUp=function(J){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ce.prototype.pointerUp.call(this,J);else{var ee=this.state==="creating";ce.prototype.pointerUp.call(this,J),this.setTipPoints(ee),this.positionTip()}},V.prototype.manipulate=function(J){if(this.tipMoving){var ee=this.unrotatePoint(J);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ce.prototype.manipulate.call(this,J)},V.prototype.setBgColor=function(J){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",J]]),me.setAttributes(this.tip,[["fill",J]])),this.bgColor=J,this.fillColorChanged(J)},V.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},V.prototype.setTipPoints=function(J){J===void 0&&(J=!1);var ee=Math.min(this.height/2,15),Te=this.height/5;J&&(this.tipPosition={x:ee+Te/2,y:this.height+20});var ue=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?ue.1)){var J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(J,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var Te=this.tip2.transform.baseVal.getItem(0);Te.setRotate(J+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Te,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='',V}(Oe),lt=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokePanel.colors=Te.defaultColorSet,ue.fillColor="transparent",ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='',V}(ne),Be=function(){function ce(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ce.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},ce.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ce.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ce.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ce.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ce}(),$e=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.curveX=0,ue.curveY=0,ue.manipulationStartCurveX=0,ue.manipulationStartCurveY=0,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.positionGrips=ue.positionGrips.bind(ue),ue.addControlGrips=ue.addControlGrips.bind(ue),ue.adjustVisual=ue.adjustVisual.bind(ue),ue.setupControlBox=ue.setupControlBox.bind(ue),ue.resize=ue.resize.bind(ue),ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorCurve&&J!==this.visibleCurve&&!this.curveGrip.ownsTarget(J))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=J.x,this.curveY=J.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ce.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ce.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ce.prototype.positionGrips.call(this);var J=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-J/2,this.curveY-J/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},V.prototype.manipulate=function(J){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+J.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+J.y-this.manipulationStartY),ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){this.activeGrip===this.curveGrip&&(this.curveX=J.x,this.curveY=J.y),ce.prototype.resize.call(this,J),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual()},V.prototype.scale=function(J,ee){this.curveX=this.curveX*J,this.curveY=this.curveY*ee,ce.prototype.scale.call(this,J,ee)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='',V}(bt),it=function(){function ce(V,J){J===void 0&&(J=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=J}return Object.defineProperty(ce.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ce.prototype.preventDefault=function(){this._defaultPrevented=!0},ce}(),wt=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,!1)||this;return ue.dataUrl=ee,ue.state=Te,ue}return te(V,ce),V}(it),pt=function(ce){function V(J,ee,Te){Te===void 0&&(Te=!1);var ue=ce.call(this,J,Te)||this;return ue.marker=ee,ue}return te(V,ce),V}(it),st=function(){function ce(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ce.prototype.addEventListener=function(V,J){this[V].push(J)},ce.prototype.removeEventListener=function(V,J){var ee=this[V].indexOf(J);ee>-1&&this[V].splice(ee,1)},ce}(),Pe=function(){function ce(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Me,this._isOpen=!1,this.undoRedoManager=new Be,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new st,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ce.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ce.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,lt,ne,de,Qe,Ze,ve,Oe,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,ne,de,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,de]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var J=this;this._availableMarkerTypes.splice(0),V.forEach(function(ee){if(typeof ee=="string"){var Te=J.ALL_MARKER_TYPES.find(function(ue){return ue.typeName===ee});Te!==void 0&&J._availableMarkerTypes.push(Te)}else J._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ce.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ce.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(J){return J(new it(V))})},ce.prototype.render=function(){return Re(this,void 0,void 0,function(){var V;return Ce(this,function(J){switch(J.label){case 0:return this.setCurrentMarker(),(V=new be).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return J.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,J.sent()]}})})},ce.prototype.close=function(V){var J=this;if(V===void 0&&(V=!1),this.isOpen){var ee=!1;V||this.eventListeners.beforeclose.forEach(function(Te){var ue=new it(J,!0);Te(ue),ue.defaultPrevented&&(ee=!0)}),ee||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Te){return Te(new it(J))}),this.detachEvents(),this._isOpen=!1)}},ce.prototype.addMarkersToToolbar=function(){for(var V,J=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ee=J',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ce.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ce.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ce.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ce.prototype.toolbarButtonClicked=function(V,J){if(V==="marker"&&J!==void 0)this.createNewMarker(J);else if(V==="action")switch(J){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ce.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var J=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Te){var ue=new pt(V,V._currentMarker,!0);Te(ue),ue.defaultPrevented&&(J=!0)}),!J){var ee=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Te){return Te(new pt(V,ee))})}}},ce.prototype.clear=function(){var V=this,J=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var Lt=new pt(V,void 0,!0);nt(Lt),Lt.defaultPrevented&&(J=!0)}),!J)){this.setCurrentMarker();for(var ee=function(nt){var Lt=Te.markers[nt];Te.setCurrentMarker(Te.markers[nt]),Te._currentMarker.dispose(),Te.markerImage.removeChild(Te._currentMarker.container),Te.markers.splice(Te.markers.indexOf(Te._currentMarker),1),Te.eventListeners.markerdelete.forEach(function(Yt){return Yt(new pt(V,Lt))})},Te=this,ue=this.markers.length-1;ue>=0;ue--)ee(ue);this.addUndoStep()}},Object.defineProperty(ce.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ce.prototype.showNotesEditor=function(){var V;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},ce.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ce.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ce.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var J=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===J.width&&ee.height===J.height){var Te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(J),Te1&&this.panTo({x:V.clientX,y:V.clientY}))},ce.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},ce.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ce.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.markerImage.getBoundingClientRect();return{x:(V-ee.left)/this.zoomLevel,y:(J-ee.top)/this.zoomLevel}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ce.prototype.addLicenseKey=function(V){se.addKey(V)},ce.prototype.addEventListener=function(V,J){this.eventListeners.addEventListener(V,J)},ce.prototype.removeEventListener=function(V,J){this.eventListeners.removeEventListener(V,J)},ce.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ce.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ce.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(J){return J(new it(V))}))},ce.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(J){return J(new it(V))}))},ce.instanceCounter=0,ce}();/* ********************************** + `,lr.style.marginRight="5px",sn.appendChild(lr)}ue.typeBoxes.push(sn)},ue=this,nt=0;nt<4;nt++)Te(nt);return ee},V.prototype.setCurrentType=function(J,ee){var Te=this;this.currentType=J,this.typeBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings!==void 0?Te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(Y),He=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.arrowType="end",ue.arrowBaseHeight=10,ue.arrowBaseWidth=10,ue.getArrowPoints=ue.getArrowPoints.bind(ue),ue.setArrowType=ue.setArrowType.bind(ue),ue.arrowTypePanel=new Ne("Arrow type","end"),ue.arrowTypePanel.onArrowTypeChanged=ue.setArrowType,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.arrow1&&J!==this.arrow2)},V.prototype.getArrowPoints=function(J,ee){var Te=this.arrowBaseWidth+2*this.strokeWidth,ue=this.arrowBaseHeight+2*this.strokeWidth;return J-Te/2+","+(ee+ue/2)+" "+J+","+(ee-ue/2)+" "+(J+Te/2)+","+(ee+ue/2)},V.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ce.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(J,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var Te=this.arrow2.transform.baseVal.getItem(0);Te.setRotate(J+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Te,0)}},V.prototype.setArrowType=function(J){this.arrowType=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({arrowType:this.arrowType},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='',V}(Oe),ve=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.fillColor=Te.defaultFillColor,ue.strokeWidth=0,ue.fillPanel=new oe("Color",Te.defaultColorSet,Te.defaultFillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="CoverMarker",V.title="Cover marker",V.icon='',V}(_e),xe=function(ce){function V(J,ee,Te,ue){var nt=ce.call(this,J,ue||'')||this;return nt.opacities=[],nt.opacityBoxes=[],nt.opacities=ee,nt.currentOpacity=Te,nt.setCurrentOpacity=nt.setCurrentOpacity.bind(nt),nt}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(Te){var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="center",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Te===J.currentOpacity?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentOpacity(Te,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=100*Te+"%",ue.appendChild(nt),J.opacityBoxes.push(ue)}),ee},V.prototype.setCurrentOpacity=function(J,ee){var Te=this;this.currentOpacity=J,this.opacityBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(Y),de=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.setOpacity=ue.setOpacity.bind(ue),ue.fillColor=Te.defaultHighlightColor,ue.strokeWidth=0,ue.opacity=Te.defaultHighlightOpacity,ue.fillPanel=new oe("Color",Te.defaultColorSet,ue.fillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue.opacityPanel=new xe("Opacity",Te.defaultOpacitySteps,ue.opacity),ue.opacityPanel.onOpacityChanged=ue.setOpacity,ue}return te(V,ce),V.prototype.setOpacity=function(J){this.opacity=J,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='',V}(ve),je='',Qe=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.bgColor="transparent",ue.tipPosition={x:0,y:0},ue.tipBase1Position={x:0,y:0},ue.tipBase2Position={x:0,y:0},ue.tipMoving=!1,ue.color=Te.defaultStrokeColor,ue.bgColor=Te.defaultFillColor,ue.fontFamily=Te.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setBgColor=ue.setBgColor.bind(ue),ue.getTipPoints=ue.getTipPoints.bind(ue),ue.positionTip=ue.positionTip.bind(ue),ue.setTipPoints=ue.setTipPoints.bind(ue),ue.colorPanel=new oe("Text color",Te.defaultColorSet,ue.color,''),ue.colorPanel.onColorChanged=ue.setColor,ue.bgColorPanel=new oe("Fill color",Te.defaultColorSet,ue.bgColor,je),ue.bgColorPanel.onColorChanged=ue.setBgColor,ue.fontFamilyPanel=new Ve("Font",Te.defaultFontFamilies,Te.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue.tipGrip=new Le,ue.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),ue.controlBox.appendChild(ue.tipGrip.visual),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return ce.prototype.ownsTarget.call(this,J)||this.tipGrip.ownsTarget(J)||this.tip===J},V.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(J,ee){this.state==="new"&&ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.pointerUp=function(J){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ce.prototype.pointerUp.call(this,J);else{var ee=this.state==="creating";ce.prototype.pointerUp.call(this,J),this.setTipPoints(ee),this.positionTip()}},V.prototype.manipulate=function(J){if(this.tipMoving){var ee=this.unrotatePoint(J);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ce.prototype.manipulate.call(this,J)},V.prototype.setBgColor=function(J){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",J]]),me.setAttributes(this.tip,[["fill",J]])),this.bgColor=J,this.fillColorChanged(J)},V.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},V.prototype.setTipPoints=function(J){J===void 0&&(J=!1);var ee=Math.min(this.height/2,15),Te=this.height/5;J&&(this.tipPosition={x:ee+Te/2,y:this.height+20});var ue=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?ue.1)){var J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(J,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var Te=this.tip2.transform.baseVal.getItem(0);Te.setRotate(J+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Te,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='',V}(Oe),lt=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokePanel.colors=Te.defaultColorSet,ue.fillColor="transparent",ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='',V}(ne),Be=function(){function ce(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ce.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},ce.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ce.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ce.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ce.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ce}(),$e=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee,Te)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.curveX=0,ue.curveY=0,ue.manipulationStartCurveX=0,ue.manipulationStartCurveY=0,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.positionGrips=ue.positionGrips.bind(ue),ue.addControlGrips=ue.addControlGrips.bind(ue),ue.adjustVisual=ue.adjustVisual.bind(ue),ue.setupControlBox=ue.setupControlBox.bind(ue),ue.resize=ue.resize.bind(ue),ue.strokeColor=Te.defaultColor,ue.strokeWidth=Te.defaultStrokeWidth,ue.strokeDasharray=Te.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Te.defaultColorSet,Te.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Te.defaultStrokeWidths,Te.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Te.defaultStrokeDasharrays,Te.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorCurve&&J!==this.visibleCurve&&!this.curveGrip.ownsTarget(J))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=J.x,this.curveY=J.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ce.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ce.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ce.prototype.positionGrips.call(this);var J=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-J/2,this.curveY-J/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},V.prototype.manipulate=function(J){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+J.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+J.y-this.manipulationStartY),ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){this.activeGrip===this.curveGrip&&(this.curveX=J.x,this.curveY=J.y),ce.prototype.resize.call(this,J),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual()},V.prototype.scale=function(J,ee){this.curveX=this.curveX*J,this.curveY=this.curveY*ee,ce.prototype.scale.call(this,J,ee)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='',V}(Et),rt=function(){function ce(V,J){J===void 0&&(J=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=J}return Object.defineProperty(ce.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ce.prototype.preventDefault=function(){this._defaultPrevented=!0},ce}(),St=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,!1)||this;return ue.dataUrl=ee,ue.state=Te,ue}return te(V,ce),V}(rt),pt=function(ce){function V(J,ee,Te){Te===void 0&&(Te=!1);var ue=ce.call(this,J,Te)||this;return ue.marker=ee,ue}return te(V,ce),V}(rt),st=function(){function ce(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ce.prototype.addEventListener=function(V,J){this[V].push(J)},ce.prototype.removeEventListener=function(V,J){var ee=this[V].indexOf(J);ee>-1&&this[V].splice(ee,1)},ce}(),Pe=function(){function ce(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Me,this._isOpen=!1,this.undoRedoManager=new Be,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new st,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ce.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ce.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,lt,ne,de,Qe,Ze,ve,Oe,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,ne,de,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ge,Ye,He,Je,de]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var J=this;this._availableMarkerTypes.splice(0),V.forEach(function(ee){if(typeof ee=="string"){var Te=J.ALL_MARKER_TYPES.find(function(ue){return ue.typeName===ee});Te!==void 0&&J._availableMarkerTypes.push(Te)}else J._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ce.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ce.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(J){return J(new rt(V))})},ce.prototype.render=function(){return Re(this,void 0,void 0,function(){var V;return Ce(this,function(J){switch(J.label){case 0:return this.setCurrentMarker(),(V=new be).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return J.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,J.sent()]}})})},ce.prototype.close=function(V){var J=this;if(V===void 0&&(V=!1),this.isOpen){var ee=!1;V||this.eventListeners.beforeclose.forEach(function(Te){var ue=new rt(J,!0);Te(ue),ue.defaultPrevented&&(ee=!0)}),ee||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Te){return Te(new rt(J))}),this.detachEvents(),this._isOpen=!1)}},ce.prototype.addMarkersToToolbar=function(){for(var V,J=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ee=J',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ce.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ce.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ce.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ce.prototype.toolbarButtonClicked=function(V,J){if(V==="marker"&&J!==void 0)this.createNewMarker(J);else if(V==="action")switch(J){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ce.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var J=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Te){var ue=new pt(V,V._currentMarker,!0);Te(ue),ue.defaultPrevented&&(J=!0)}),!J){var ee=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Te){return Te(new pt(V,ee))})}}},ce.prototype.clear=function(){var V=this,J=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var kt=new pt(V,void 0,!0);nt(kt),kt.defaultPrevented&&(J=!0)}),!J)){this.setCurrentMarker();for(var ee=function(nt){var kt=Te.markers[nt];Te.setCurrentMarker(Te.markers[nt]),Te._currentMarker.dispose(),Te.markerImage.removeChild(Te._currentMarker.container),Te.markers.splice(Te.markers.indexOf(Te._currentMarker),1),Te.eventListeners.markerdelete.forEach(function(Yt){return Yt(new pt(V,kt))})},Te=this,ue=this.markers.length-1;ue>=0;ue--)ee(ue);this.addUndoStep()}},Object.defineProperty(ce.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ce.prototype.showNotesEditor=function(){var V;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},ce.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ce.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ce.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var J=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===J.width&&ee.height===J.height){var Te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(J),Te1&&this.panTo({x:V.clientX,y:V.clientY}))},ce.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},ce.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ce.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.markerImage.getBoundingClientRect();return{x:(V-ee.left)/this.zoomLevel,y:(J-ee.top)/this.zoomLevel}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ce.prototype.addLicenseKey=function(V){se.addKey(V)},ce.prototype.addEventListener=function(V,J){this.eventListeners.addEventListener(V,J)},ce.prototype.removeEventListener=function(V,J){this.eventListeners.removeEventListener(V,J)},ce.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ce.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ce.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(J){return J(new rt(V))}))},ce.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(J){return J(new rt(V))}))},ce.instanceCounter=0,ce}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE @@ -180,7 +180,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ze=function(ce,V){return(ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var Te in ee)Object.prototype.hasOwnProperty.call(ee,Te)&&(J[Te]=ee[Te])})(ce,V)};function Et(ce,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function J(){this.constructor=ce}ze(ce,V),ce.prototype=V===null?Object.create(V):(J.prototype=V.prototype,new J)}function ht(ce,V,J,ee){return new(J||(J=Promise))(function(Te,ue){function nt(on){try{Yt(ee.next(on))}catch(Qt){ue(Qt)}}function Lt(on){try{Yt(ee.throw(on))}catch(Qt){ue(Qt)}}function Yt(on){var Qt;on.done?Te(on.value):(Qt=on.value,Qt instanceof J?Qt:new J(function(In){In(Qt)})).then(nt,Lt)}Yt((ee=ee.apply(ce,V||[])).next())})}function Bt(ce,V){var J,ee,Te,ue,nt={label:0,sent:function(){if(1&Te[0])throw Te[1];return Te[1]},trys:[],ops:[]};return ue={next:Lt(0),throw:Lt(1),return:Lt(2)},typeof Symbol=="function"&&(ue[Symbol.iterator]=function(){return this}),ue;function Lt(Yt){return function(on){return function(Qt){if(J)throw new TypeError("Generator is already executing.");for(;nt;)try{if(J=1,ee&&(Te=2&Qt[0]?ee.return:Qt[0]?ee.throw||((Te=ee.return)&&Te.call(ee),0):ee.next)&&!(Te=Te.call(ee,Qt[1])).done)return Te;switch(ee=0,Te&&(Qt=[2&Qt[0],Te.value]),Qt[0]){case 0:case 1:Te=Qt;break;case 4:return nt.label++,{value:Qt[1],done:!1};case 5:nt.label++,ee=Qt[1],Qt=[0];continue;case 7:Qt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Te=nt.trys,(Te=Te.length>0&&Te[Te.length-1])||Qt[0]!==6&&Qt[0]!==2)){nt=0;continue}if(Qt[0]===3&&(!Te||Qt[1]>Te[0]&&Qt[1]0&&Te[Te.length-1])||Qt[0]!==6&&Qt[0]!==2)){nt=0;continue}if(Qt[0]===3&&(!Te||Qt[1]>Te[0]&&Qt[1]0&&J>0){var ee=new Ln(V,J),Te=ee.ratio>=1?20:ee.getHorizontalLength(20),ue=ee.ratio<1?20:ee.getVerticalLength(20),nt=document.createElementNS("http://www.w3.org/2000/svg","svg");nt.setAttribute("xmlns","http://www.w3.org/2000/svg"),nt.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(nt);var Lt=mt.createDefs();nt.appendChild(Lt);var Yt=mt.createElement("clipPath",[["id","text-bg-clip"]]);Lt.appendChild(Yt);var on=mt.createPath(mt.getHollowRectanglePath((24-Te)/2,(24-ue)/2,Te,ue,(24-Te)/2+2,(24-ue)/2+2,Te-4,ue-4));nt.appendChild(on);var Qt=mt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Qt.appendChild(mt.createTSpan(V+":"+J)),nt.appendChild(Qt);var In=Qt.getBBox();mt.setAttributes(Qt,[["x",((24-In.width)/2).toString()],["y",((24-In.height)/2-In.y).toString()]]);var Gn=mt.createPath(mt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(In.width))/2,(24-Math.ceil(In.height))/2,Math.ceil(In.width),Math.ceil(In.height)));return Yt.appendChild(Gn),mt.setAttributes(on,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(nt),nt.outerHTML}return''},ce}(),Dn=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee)||this;return ue.isDropdownOpen=!1,ue.onClick=ue.dropdownButtonClicked,ue.dropdownButtons=Te,ue}return Et(V,ce),V.prototype.setupDropdown=function(){var J=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=J.className,ee.colorsClassName=J.colorsClassName,J.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(Gt),sn=function(){function ce(V,J){this.GRIP_SIZE=10,this.color=V,this.fillColor=J,this.visual=mt.createGroup(),this.visual.appendChild(mt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(mt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce.prototype.setCenter=function(V,J){this.visual.childNodes.forEach(function(ee){return mt.setAttributes(ee,[["cx",V.toString()],["cy",J.toString()]])})},ce}(),Sn=function(){function ce(V,J,ee,Te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=J,this.margin=ee,this.container=Te,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&&mt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ce.prototype.open=function(){var V=this;this.cropShadeElement=mt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=mt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var J=0;Jthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-J.height/2),mt.setAttributes(this.cropRectElement,[["x",J.x.toString()],["y",J.y.toString()],["width",J.width.toString()],["height",J.height.toString()]]);var ee=J.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ue,nt){var Lt=J.y+ee*(nt+1);mt.setAttributes(ue,[["x1",""+J.x],["y1",""+Lt],["x2",""+(J.x+J.width)],["y2",""+Lt]])});var Te=J.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ue,nt){var Lt=J.x+Te*(nt+1);mt.setAttributes(ue,[["x1",""+Lt],["y1",""+J.y],["x2",""+Lt],["y2",""+(J.y+J.height)]])}),mt.setAttributes(this.cropShadeElement,[["d",mt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,J.x,J.y,J.width,J.height)]]),this.topLeftGrip.setCenter(J.x,J.y),this.topRightGrip.setCenter(J.x+J.width,J.y),this.bottomLeftGrip.setCenter(J.x,J.y+J.height),this.bottomRightGrip.setCenter(J.x+J.width,J.y+J.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ce.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.container.getBoundingClientRect();return{x:V-ee.left+this.margin,y:J-ee.top+this.margin}},ce.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},ce.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var J=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(J)}V.preventDefault()},ce.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},ce.prototype.move=function(V){var J=V.x-this.previousPoint.x,ee=V.y-this.previousPoint.y;this.zoomFactor!==1&&(J=-J/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+J),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},ce.prototype.resize=function(V){var J=Object.assign({},this.cropRect),ee=V.x-this.previousPoint.x,Te=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:J.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-J.width),J.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(J.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),J.height=this.aspectRatio.getVerticalLength(J.width)):(J.y+=Te,J.height=this.cropRect.y+this.cropRect.height-J.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?J.height=this.aspectRatio.getVerticalLength(J.width):J.height+=Te}J.width<10&&(J.x=this.cropRect.x,J.width=10),J.height<10&&(J.y=this.cropRect.y,J.height=10),this.previousPoint=V,J.x>=this.margin&&J.y>=this.margin&&J.x-this.margin+J.width<=this.canvasWidth&&J.y-this.margin+J.height<=this.canvasHeight&&(this.cropRect=J,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ce.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,J=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),Te=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=V-this.cropRect.width/2,this.cropRect.y=J-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ce.prototype.getRescaledRect=function(V,J,ee,Te,ue,nt){var Lt=ee/V,Yt=Te/J;return{x:(ue.x-nt)*Lt+nt,y:(ue.y-nt)*Yt+nt,width:ue.width*Lt,height:ue.height*Yt}},ce.prototype.scaleCanvas=function(V,J){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,J,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=J,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ce}(),Kn=function(){function ce(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ce.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ce.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ce.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},ce.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},ce.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},ce.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();mt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},ce.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},ce.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var J="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var Te=ee%5==0?this.height/3:this.height/6;J+="h4v"+-Te+"h1v"+Te}J+="v1H0Z",this.scaleShape=mt.createPath(J);var ue=mt.createTransform();this.scaleShape.transform.baseVal.appendItem(ue),V.appendChild(this.scaleShape),this.angleLabelElement=mt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=mt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var nt=mt.createTSpan("");return nt.innerHTML="°",this.angleLabelElement.appendChild(nt),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},ce}(),Qn=function(){function ce(){this.naturalSize=!1,this.imageType="image/png"}return ce.prototype.rasterize=function(V,J,ee,Te,ue,nt,Lt){var Yt=this;return new Promise(function(on){var Qt=document.createElement("canvas");Qt.width=V.width.baseVal.value-2*Te,Qt.height=V.height.baseVal.value-2*Te;var In=1,Gn=1;Yt.naturalSize===!0?(In=J.naturalWidth/(V.width.baseVal.value-2*Te)/nt,Gn=J.naturalHeight/(V.height.baseVal.value-2*Te)/Lt,Qt.width=J.naturalWidth/nt,Qt.height=J.naturalHeight/Lt):Yt.width!==void 0&&Yt.height!==void 0&&(In=Yt.width/ee.width,Gn=Yt.height/ee.height,Qt.width*=In,Qt.height*=Gn);var lr=Qt.getContext("2d");lr.translate(Qt.width/2,Qt.height/2),lr.rotate(ue*Math.PI/180),lr.scale(nt,Lt),lr.translate(-Qt.width/2,-Qt.height/2),lr.drawImage(J,0,0,Qt.width,Qt.height);var Ar=document.createElement("canvas");Ar.width=ee.width*In,Ar.height=ee.height*Gn,Ar.getContext("2d").putImageData(lr.getImageData((ee.x-Te)*In,(ee.y-Te)*Gn,ee.width*In,ee.height*Gn),0,0),on(Ar.toDataURL(Yt.imageType,Yt.imageQuality))})},ce}(),Vt=function(){function ce(V){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ce.instanceCounter++,this.styles=new Xt(this.instanceNo),this.target=V,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),ce.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ce.prototype.show=function(){this.showUI(),this.open()},ce.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(J){return J()}),this._isOpen=!1)},ce.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},ce.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},ce.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},ce.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},ce.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ce.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,J=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=J+2*this.CANVAS_MARGINV+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=J+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ce.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ce.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new kt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var J=new rn;J.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(J);var ee=[];this.aspectRatios.forEach(function(Gn){var lr=new Gt(pn.getIcon(Gn.horizontal,Gn.vertical),Gn.horizontal===0&&Gn.vertical===0?"FREE":Gn.horizontal+":"+Gn.vertical);lr.onClick=function(){return V.ratioButtonClicked(Gn)},ee.push(lr)}),this.aspectRatioButton=new Dn(pn.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,J.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Te=new Gt('',"Toggle grid");Te.isActive=this.isGridVisible,Te.onClick=function(){V.isGridVisible=!V.isGridVisible,Te.isActive=V.isGridVisible},J.addButton(Te);var ue=new Gt('',"Zoom to selection");if(ue.isActive=this.zoomToCropEnabled,ue.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,ue.isActive=V.zoomToCropEnabled},J.addButton(ue),!Ht.isLicensed){var nt=new $t;this.topToolbar.addElementBlock(nt);var Lt=document.createElement("div");Lt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Yt=document.createElement("a");Yt.style.color="currentColor",Yt.href="https://markerjs.com/products/cropro",Yt.target="_blank",Yt.innerHTML='',Lt.appendChild(Yt),nt.addElement(Lt)}var on=new rn;on.minWidth=3*this.toolbarHeight+"px",on.contentAlign="end",this.topToolbar.addButtonBlock(on);var Qt=new Gt('',"OK");Qt.onClick=this.startRenderAndClose,on.addButton(Qt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Qt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var In=new Gt('',"Close");In.onClick=this.close,on.addButton(In),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(In.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ce.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new kt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var J=new rn;J.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(J);var ee=new Gt('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,J.addButton(ee);var Te=new Gt('',"Rotate right");Te.onClick=this.rotateRightButtonClicked,J.addButton(Te);var ue=new $t;ue.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ue),this.straightener=new Kn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(on){V.rotateBy(on),V.straightener.angle=V.rotationAngle},ue.addElement(this.straightener.getUI());var nt=new rn;nt.minWidth=2*this.toolbarHeight+"px",nt.contentAlign="end",this.bottomToolbar.addButtonBlock(nt);var Lt=new Gt('',"Flip horizontal");Lt.onClick=this.flipHorizontallyButtonClicked,nt.addButton(Lt);var Yt=new Gt('',"Flip vertical");Yt.onClick=this.flipVerticallyButtonClicked,nt.addButton(Yt)},ce.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ce.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=pn.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ce.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ln(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ce.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ce.prototype.restoreState=function(V){if(V){var J=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(J),this.cropRectChanged(J),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.cropImage.getBoundingClientRect();return{x:V-ee.left,y:J-ee.top}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ce.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},ce.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},ce.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},ce.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},ce.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var J=this.editingTargetRotationContainer.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(J,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},ce.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ce.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ce.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ce.prototype.startRenderAndClose=function(){return ht(this,void 0,void 0,function(){var V,J;return Bt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return V=ee.sent(),J=this.getState(),this.renderEventListeners.forEach(function(Te){return Te(V,J)}),this.close(!0),[2]}})})},ce.prototype.render=function(){return ht(this,void 0,void 0,function(){var V;return Bt(this,function(J){switch(J.label){case 0:return(V=new Qn).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),mt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return J.sent(),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,J.sent()]}})})},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ut("toolbar",` + `))},ce.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ce}(),jt=function(ce,V){this.selector=ce,this.style=V},Ut=function(ce,V){this.localName=ce,this.style=V},It=function(){function ce(){this.blocks=[],this.display=""}return ce.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},ce.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},ce.prototype.getUI=function(){var V=document.createElement("div");return V.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,V.style.display=this.display,this.blocks.forEach(function(J){return V.appendChild(J.getUI())}),V},ce}(),Kt=function(){function ce(){}return ce.prototype.getUI=function(){var V=document.createElement("div");if(V.className=this.className,this.minWidth!==void 0&&(V.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":V.style.justifyContent="flex-start";break;case"center":V.style.justifyContent="center";break;case"end":V.style.justifyContent="flex-end"}return V.style.whiteSpace="nowrap",V},ce}(),rn=function(ce){function V(){var J=ce!==null&&ce.apply(this,arguments)||this;return J.buttons=[],J}return xt(V,ce),V.prototype.addButton=function(J){J.className=this.buttonClassName,J.colorsClassName=this.buttonColorsClassName,J.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(J)},V.prototype.getUI=function(){var J=ce.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return J.appendChild(ee.getUI())}),J},V}(Kt),zt=function(){function ce(V,J){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=J,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ce.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),ce.prototype.getUI=function(){var V=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return V.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ce.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ce.prototype.hide=function(){this._isHidden=!0},ce}(),$t=function(ce){function V(){var J=ce!==null&&ce.apply(this,arguments)||this;return J.elements=[],J}return xt(V,ce),V.prototype.addElement=function(J){this.elements.push(J)},V.prototype.getUI=function(){var J=ce.prototype.getUI.call(this);return this.elements.forEach(function(ee){return J.appendChild(ee)}),J},V}(Kt),Pn=function(){function ce(V,J){this.horizontal=V,this.vertical=J}return Object.defineProperty(ce.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ce.prototype.getVerticalLength=function(V){return V/this.ratio},ce.prototype.getHorizontalLength=function(V){return V*this.ratio},ce}(),fn=function(){function ce(){}return ce.getIcon=function(V,J){if(V>0&&J>0){var ee=new Pn(V,J),Te=ee.ratio>=1?20:ee.getHorizontalLength(20),ue=ee.ratio<1?20:ee.getVerticalLength(20),nt=document.createElementNS("http://www.w3.org/2000/svg","svg");nt.setAttribute("xmlns","http://www.w3.org/2000/svg"),nt.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(nt);var kt=gt.createDefs();nt.appendChild(kt);var Yt=gt.createElement("clipPath",[["id","text-bg-clip"]]);kt.appendChild(Yt);var sn=gt.createPath(gt.getHollowRectanglePath((24-Te)/2,(24-ue)/2,Te,ue,(24-Te)/2+2,(24-ue)/2+2,Te-4,ue-4));nt.appendChild(sn);var Qt=gt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Qt.appendChild(gt.createTSpan(V+":"+J)),nt.appendChild(Qt);var kn=Qt.getBBox();gt.setAttributes(Qt,[["x",((24-kn.width)/2).toString()],["y",((24-kn.height)/2-kn.y).toString()]]);var Vn=gt.createPath(gt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(kn.width))/2,(24-Math.ceil(kn.height))/2,Math.ceil(kn.width),Math.ceil(kn.height)));return Yt.appendChild(Vn),gt.setAttributes(sn,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(nt),nt.outerHTML}return''},ce}(),In=function(ce){function V(J,ee,Te){var ue=ce.call(this,J,ee)||this;return ue.isDropdownOpen=!1,ue.onClick=ue.dropdownButtonClicked,ue.dropdownButtons=Te,ue}return xt(V,ce),V.prototype.setupDropdown=function(){var J=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=J.className,ee.colorsClassName=J.colorsClassName,J.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(zt),on=function(){function ce(V,J){this.GRIP_SIZE=10,this.color=V,this.fillColor=J,this.visual=gt.createGroup(),this.visual.appendChild(gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(gt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce.prototype.setCenter=function(V,J){this.visual.childNodes.forEach(function(ee){return gt.setAttributes(ee,[["cx",V.toString()],["cy",J.toString()]])})},ce}(),Cn=function(){function ce(V,J,ee,Te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=J,this.margin=ee,this.container=Te,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&>.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ce.prototype.open=function(){var V=this;this.cropShadeElement=gt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=gt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var J=0;Jthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-J.height/2),gt.setAttributes(this.cropRectElement,[["x",J.x.toString()],["y",J.y.toString()],["width",J.width.toString()],["height",J.height.toString()]]);var ee=J.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ue,nt){var kt=J.y+ee*(nt+1);gt.setAttributes(ue,[["x1",""+J.x],["y1",""+kt],["x2",""+(J.x+J.width)],["y2",""+kt]])});var Te=J.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ue,nt){var kt=J.x+Te*(nt+1);gt.setAttributes(ue,[["x1",""+kt],["y1",""+J.y],["x2",""+kt],["y2",""+(J.y+J.height)]])}),gt.setAttributes(this.cropShadeElement,[["d",gt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,J.x,J.y,J.width,J.height)]]),this.topLeftGrip.setCenter(J.x,J.y),this.topRightGrip.setCenter(J.x+J.width,J.y),this.bottomLeftGrip.setCenter(J.x,J.y+J.height),this.bottomRightGrip.setCenter(J.x+J.width,J.y+J.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ce.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.container.getBoundingClientRect();return{x:V-ee.left+this.margin,y:J-ee.top+this.margin}},ce.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},ce.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var J=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(J)}V.preventDefault()},ce.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},ce.prototype.move=function(V){var J=V.x-this.previousPoint.x,ee=V.y-this.previousPoint.y;this.zoomFactor!==1&&(J=-J/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+J),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},ce.prototype.resize=function(V){var J=Object.assign({},this.cropRect),ee=V.x-this.previousPoint.x,Te=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:J.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-J.width),J.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(J.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),J.height=this.aspectRatio.getVerticalLength(J.width)):(J.y+=Te,J.height=this.cropRect.y+this.cropRect.height-J.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?J.height=this.aspectRatio.getVerticalLength(J.width):J.height+=Te}J.width<10&&(J.x=this.cropRect.x,J.width=10),J.height<10&&(J.y=this.cropRect.y,J.height=10),this.previousPoint=V,J.x>=this.margin&&J.y>=this.margin&&J.x-this.margin+J.width<=this.canvasWidth&&J.y-this.margin+J.height<=this.canvasHeight&&(this.cropRect=J,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ce.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,J=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),Te=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=V-this.cropRect.width/2,this.cropRect.y=J-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ce.prototype.getRescaledRect=function(V,J,ee,Te,ue,nt){var kt=ee/V,Yt=Te/J;return{x:(ue.x-nt)*kt+nt,y:(ue.y-nt)*Yt+nt,width:ue.width*kt,height:ue.height*Yt}},ce.prototype.scaleCanvas=function(V,J){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,J,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=J,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ce}(),Hn=function(){function ce(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ce.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ce.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ce.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},ce.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},ce.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},ce.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();gt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},ce.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},ce.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var J="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var Te=ee%5==0?this.height/3:this.height/6;J+="h4v"+-Te+"h1v"+Te}J+="v1H0Z",this.scaleShape=gt.createPath(J);var ue=gt.createTransform();this.scaleShape.transform.baseVal.appendItem(ue),V.appendChild(this.scaleShape),this.angleLabelElement=gt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=gt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var nt=gt.createTSpan("");return nt.innerHTML="°",this.angleLabelElement.appendChild(nt),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},ce}(),Qn=function(){function ce(){this.naturalSize=!1,this.imageType="image/png"}return ce.prototype.rasterize=function(V,J,ee,Te,ue,nt,kt){var Yt=this;return new Promise(function(sn){var Qt=document.createElement("canvas");Qt.width=V.width.baseVal.value-2*Te,Qt.height=V.height.baseVal.value-2*Te;var kn=1,Vn=1;Yt.naturalSize===!0?(kn=J.naturalWidth/(V.width.baseVal.value-2*Te)/nt,Vn=J.naturalHeight/(V.height.baseVal.value-2*Te)/kt,Qt.width=J.naturalWidth/nt,Qt.height=J.naturalHeight/kt):Yt.width!==void 0&&Yt.height!==void 0&&(kn=Yt.width/ee.width,Vn=Yt.height/ee.height,Qt.width*=kn,Qt.height*=Vn);var lr=Qt.getContext("2d");lr.translate(Qt.width/2,Qt.height/2),lr.rotate(ue*Math.PI/180),lr.scale(nt,kt),lr.translate(-Qt.width/2,-Qt.height/2),lr.drawImage(J,0,0,Qt.width,Qt.height);var Or=document.createElement("canvas");Or.width=ee.width*kn,Or.height=ee.height*Vn,Or.getContext("2d").putImageData(lr.getImageData((ee.x-Te)*kn,(ee.y-Te)*Vn,ee.width*kn,ee.height*Vn),0,0),sn(Or.toDataURL(Yt.imageType,Yt.imageQuality))})},ce}(),Vt=function(){function ce(V){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ce.instanceCounter++,this.styles=new Xt(this.instanceNo),this.target=V,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),ce.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ce.prototype.show=function(){this.showUI(),this.open()},ce.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(J){return J()}),this._isOpen=!1)},ce.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},ce.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},ce.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},ce.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},ce.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ce.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,J=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=J+2*this.CANVAS_MARGINV+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=J+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ce.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ce.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new It,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var J=new rn;J.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(J);var ee=[];this.aspectRatios.forEach(function(Vn){var lr=new zt(fn.getIcon(Vn.horizontal,Vn.vertical),Vn.horizontal===0&&Vn.vertical===0?"FREE":Vn.horizontal+":"+Vn.vertical);lr.onClick=function(){return V.ratioButtonClicked(Vn)},ee.push(lr)}),this.aspectRatioButton=new In(fn.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,J.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Te=new zt('',"Toggle grid");Te.isActive=this.isGridVisible,Te.onClick=function(){V.isGridVisible=!V.isGridVisible,Te.isActive=V.isGridVisible},J.addButton(Te);var ue=new zt('',"Zoom to selection");if(ue.isActive=this.zoomToCropEnabled,ue.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,ue.isActive=V.zoomToCropEnabled},J.addButton(ue),!Ht.isLicensed){var nt=new $t;this.topToolbar.addElementBlock(nt);var kt=document.createElement("div");kt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Yt=document.createElement("a");Yt.style.color="currentColor",Yt.href="https://markerjs.com/products/cropro",Yt.target="_blank",Yt.innerHTML='',kt.appendChild(Yt),nt.addElement(kt)}var sn=new rn;sn.minWidth=3*this.toolbarHeight+"px",sn.contentAlign="end",this.topToolbar.addButtonBlock(sn);var Qt=new zt('',"OK");Qt.onClick=this.startRenderAndClose,sn.addButton(Qt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Qt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var kn=new zt('',"Close");kn.onClick=this.close,sn.addButton(kn),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(kn.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ce.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new It,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var J=new rn;J.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(J);var ee=new zt('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,J.addButton(ee);var Te=new zt('',"Rotate right");Te.onClick=this.rotateRightButtonClicked,J.addButton(Te);var ue=new $t;ue.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ue),this.straightener=new Hn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(sn){V.rotateBy(sn),V.straightener.angle=V.rotationAngle},ue.addElement(this.straightener.getUI());var nt=new rn;nt.minWidth=2*this.toolbarHeight+"px",nt.contentAlign="end",this.bottomToolbar.addButtonBlock(nt);var kt=new zt('',"Flip horizontal");kt.onClick=this.flipHorizontallyButtonClicked,nt.addButton(kt);var Yt=new zt('',"Flip vertical");Yt.onClick=this.flipVerticallyButtonClicked,nt.addButton(Yt)},ce.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ce.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=fn.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ce.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Pn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ce.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ce.prototype.restoreState=function(V){if(V){var J=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(J),this.cropRectChanged(J),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.cropImage.getBoundingClientRect();return{x:V-ee.left,y:J-ee.top}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ce.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},ce.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},ce.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},ce.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},ce.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var J=this.editingTargetRotationContainer.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(J,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},ce.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ce.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ce.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ce.prototype.startRenderAndClose=function(){return ht(this,void 0,void 0,function(){var V,J;return Bt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return V=ee.sent(),J=this.getState(),this.renderEventListeners.forEach(function(Te){return Te(V,J)}),this.close(!0),[2]}})})},ce.prototype.render=function(){return ht(this,void 0,void 0,function(){var V;return Bt(this,function(J){switch(J.label){case 0:return(V=new Qn).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),gt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return J.sent(),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,J.sent()]}})})},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ut("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; @@ -263,8 +263,8 @@ PERFORMANCE OF THIS SOFTWARE. `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ut("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; - `))},ce.instanceCounter=0,ce}(),wn=b("8hTe"),$n=b.n(wn),ir=/]*>/g;function Tr(ce){var V=document.createElement("div");return V.innerHTML=ce,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var qn=H.a=function(ce){var V=ce.value,J=V===void 0?"":V,ee=ce.edit,Te=ee===void 0?!1:ee,ue=ce.className,nt=ce.showTextOnly,Lt=ce.showLines,Yt=ce.replaces,on=ce.zoomImg,Qt=ce.hasMask,In=ce.style,Gn=In===void 0?{}:In,lr=ce.stylesPrev,Ar=lr===void 0?{}:lr,vr=String(J),ar=Object(o.useRef)(),xr=Object(o.useRef)(),qi=Object(o.useState)(""),Gr=Object(_.a)(qi,2),ai=Gr[0],da=Gr[1],Fi=Object(o.useState)("office"),ia=Object(_.a)(Fi,2),Ca=ia[0],po=ia[1],so=function(){var wr=new Vt(xr.current);wr.displayMode="popup",wr.addRenderEventListener(function(){var ei=Object(s.a)(e.a.mark(function _r(oi){var or;return e.a.wrap(function(Mi){for(;;)switch(Mi.prev=Mi.next){case 0:return ar.current.style.display="none",Mi.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:oi}});case 3:or=Mi.sent,or!=null&&or.id&&Yt(xr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(or==null?void 0:or.id,"?type=").concat(or.content_type));case 5:case"end":return Mi.stop()}},_r)}));return function(_r){return ei.apply(this,arguments)}}()),wr.show()},xo=function(){var wr=new Pe(xr.current);wr.settings.displayMode="popup",wr.addEventListener("render",function(){var ei=Object(s.a)(e.a.mark(function _r(oi){var or;return e.a.wrap(function(Mi){for(;;)switch(Mi.prev=Mi.next){case 0:if(ar.current.style.display="none",!xr.current){Mi.next=6;break}return Mi.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:oi.dataUrl}});case 4:or=Mi.sent,or!=null&&or.id&&Yt(xr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(or==null?void 0:or.id,"?type=").concat(or.content_type));case 6:case"end":return Mi.stop()}},_r)}));return function(_r){return ei.apply(this,arguments)}}()),wr.show(),window.markerArea=wr},ka=Object(o.useMemo)(function(){ar.current&&(ar.current.style.zIndex=-1);try{var Fr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ei=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;vr=vr.replace(Fr,"("+Z.a.API_SERVER+"/api/attachments/").replace(wr,'"'+Z.a.API_SERVER+"/api/attachments/").replace(ei,'"'+Z.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` -`)}catch(Wi){}var _r=F(vr),oi=M();if(vr.match(/\[TOC\]/)&&(_r=_r.replace("

          [TOC]

          ",O()),u()),_r=_r.replace(/(__special_katext_id_\d+__)/g,function(Wi,Mi){var $i=oi[Mi],mo=$i.type,Qi=$i.expression;return Object(re.renderToString)(Tr(Qi)||"",{displayMode:mo==="block",throwOnError:!1,output:"html"})}),_r=_r.replace(/▁/g,"\u2581\u2581\u2581"),N(),nt){var or=document.createElement("div");return or.innerHTML=_r,or.innerText}return setTimeout(function(){return Qr()},500),_r},[vr]),Yi=Object(o.useRef)();E.WebkitLineClamp=Lt,Lt&&(Gn=Object(g.a)(Object(g.a)({},Gn),E));function Nr(Fr){var wr=Fr.target;if(wr.tagName.toUpperCase()==="IMG"){if(on){var ei=wr.getAttribute("src");da(ei),po("image")}}else if(wr.tagName.toUpperCase()==="A"){var _r=wr.getAttribute("href");if(_r.indexOf("office")>-1)Fr.preventDefault(),da(_r),po("office");else if(_r.indexOf("application/pdf")>-1)Fr.preventDefault(),da(_r),po("pdf");else if(_r.indexOf("text/html")>-1)Fr.preventDefault(),da(_r),po("html");else if(_r.startsWith("#")){Fr.preventDefault();var oi=document.getElementById(_r.replace("#",""));oi&&oi.scrollIntoView(!0)}}}var Qr=function(){var wr,ei=(wr=Yi.current)===null||wr===void 0?void 0:wr.querySelectorAll("video");ei==null||ei.forEach(function(_r){if(_r.oncontextmenu=function(){return!1},_r.src.indexOf(".m3u8")>-1&&!_r.canPlayType("application/vnd.apple.mpegurl")){if(B.a.isSupported()){var oi=new B.a;oi.loadSource(_r.src),oi.attachMedia(_r)}}})};Object(o.useEffect)(function(){if(Yi.current&&ka&&(ka.match(ir)&&window.PR.prettyPrint()),Yi.current)return Yi.current.addEventListener("click",Nr),function(){Yi.current.removeEventListener("click",Nr),N(),u()}},[ka,Yi.current,Nr]);var yi=function(wr){if(!Te)return;wr.target.nodeName==="IMG"?(ar.current.style.zIndex=1,ar.current.style.display="flex",ar.current.style.width=wr.target.clientWidth+"px",ar.current.style.height=wr.target.clientHeight+"px",ar.current.style.top=wr.target.offsetTop+"px",ar.current.style.left=wr.target.offsetLeft+"px",xr.current.src=wr.target.getAttribute("src")):ar.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Yi,style:Object(g.a)({},Gn),className:"".concat(ue||""," markdown-body ").concat($n.a.mdBody),onMouseOver:yi,dangerouslySetInnerHTML:{__html:ka}}),n.a.createElement("div",{ref:ar,className:$n.a.button},n.a.createElement(v.a,null,n.a.createElement(y.a,{onClick:function(){return so()}},"\u88C1\u526A"),n.a.createElement(y.a,{onClick:function(){return xo()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:xr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(he.a,{close:!0,data:ai,type:ai!=null&&ai.length?Ca:"",style:Object(g.a)({},Ar),onClose:function(){return da("")}}))}},"9OqN":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CTR=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._counter;p&&(e=this._counter=p.slice(0),this._iv=void 0);var o=e.slice(0);s.encryptBlock(o,0),e[_-1]=e[_-1]+1|0;for(var n=0;n<_;n++)y[g+n]^=o[n]}});return v.Decryptor=T,v}(),I.mode.CTR})},"9VGf":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I=b("q1tI"),v=b.n(I);function T(y,g){var s=Object(I.useRef)();Object(I.useEffect)(function(){s.current=y}),Object(I.useEffect)(function(){function _(){s.current()}if(g!==null){var p=setInterval(_,g);return function(){return clearInterval(p)}}},[g])}},"9odi":function(j,H,b){j.exports={"action-container":"action-container___UsSFw","eval-btn-group":"eval-btn-group___3FHdc","eval-desc":"eval-desc___2RSnM","btn-run":"btn-run___3Xli0","btn-run-self":"btn-run-self___2DnEi","ghost-link":"ghost-link___21xwP",link:"link___2BUFk"}},"A/g1":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},AKST:function(j,H,b){},ALsQ:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CFB=function(){var v=I.lib.BlockCipherMode.extend();v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize;T.call(this,y,g,_,s),this._prevBlock=y.slice(g,g+_)}}),v.Decryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=y.slice(g,g+_);T.call(this,y,g,_,s),this._prevBlock=p}});function T(y,g,s,_){var p,e=this._iv;e?(p=e.slice(0),this._iv=void 0):p=this._prevBlock,_.encryptBlock(p,0);for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(I.a)())return null;var o=document.createElement("style");if((p=e.csp)===null||p===void 0?void 0:p.nonce){var n;o.nonce=(n=e.csp)===null||n===void 0?void 0:n.nonce}o.innerHTML=_;var l=T(e),r=l.firstChild;return e.prepend&&l.prepend?l.prepend(o):e.prepend&&r?l.insertBefore(o,r):l.appendChild(o),o}var g=new Map;function s(_,p){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=T(e);if(!g.has(o)){var n=y("",e),l=n.parentNode;g.set(o,l),l.removeChild(n)}var r=Array.from(g.get(o).children).find(function(d){return d.tagName==="STYLE"&&d[v]===p});if(r){var i,t;if(((i=e.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((t=e.csp)===null||t===void 0?void 0:t.nonce)){var a;r.nonce=(a=e.csp)===null||a===void 0?void 0:a.nonce}return r.innerHTML!==_&&(r.innerHTML=_),r}var c=y(_,e);return c[v]=p,c}},Bd2K:function(j,H,b){(function(I){I(b("VrN/"),b("osHv"))})(function(I){I.defineOption("autoCloseTags",!1,function(e,o,n){if(n!=I.Init&&n&&e.removeKeyMap("autoCloseTags"),!o)return;var l={name:"autoCloseTags"};(typeof o!="object"||o.whenClosing!==!1)&&(l["'/'"]=function(r){return s(r)}),(typeof o!="object"||o.whenOpening!==!1)&&(l["'>'"]=function(r){return y(r)}),e.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function y(e){if(e.getOption("disableInput"))return I.Pass;for(var o=e.listSelections(),n=[],l=e.getOption("autoCloseTags"),r=0;ri.ch&&(f=f.slice(0,f.length-t.end+i.ch));var x=f.toLowerCase();if(!f||t.type=="string"&&(t.end!=i.ch||!/[\"\']/.test(t.string.charAt(t.string.length-1))||t.string.length==1)||t.type=="tag"&&d.close||t.string.indexOf("/")==i.ch-t.start-1||u&&_(u,x)>-1||p(e,a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(c)||[],f,i,!0))return I.Pass;var O=typeof l=="object"&&l.emptyTags;if(O&&_(O,f)>-1){n[r]={text:"/>",newPos:I.Pos(i.line,i.ch+2)};continue}var C=E&&_(E,x)>-1;n[r]={indent:C,text:">"+(C?` + `))},ce.instanceCounter=0,ce}(),xn=b("8hTe"),er=b.n(xn),ar=/]*>/g;function Ar(ce){var V=document.createElement("div");return V.innerHTML=ce,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var $n=H.a=function(ce){var V=ce.value,J=V===void 0?"":V,ee=ce.edit,Te=ee===void 0?!1:ee,ue=ce.className,nt=ce.showTextOnly,kt=ce.showLines,Yt=ce.replaces,sn=ce.zoomImg,Qt=ce.hasMask,kn=ce.style,Vn=kn===void 0?{}:kn,lr=ce.stylesPrev,Or=lr===void 0?{}:lr,vr=String(J),or=Object(o.useRef)(),Sr=Object(o.useRef)(),Ji=Object(o.useState)(""),Gr=Object(_.a)(Ji,2),si=Gr[0],ca=Gr[1],Fi=Object(o.useState)("office"),ra=Object(_.a)(Fi,2),Ta=ra[0],po=ra[1],io=function(){var Cr=new Vt(Sr.current);Cr.displayMode="popup",Cr.addRenderEventListener(function(){var ti=Object(s.a)(e.a.mark(function _r(li){var sr;return e.a.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:return or.current.style.display="none",Pi.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:li}});case 3:sr=Pi.sent,sr!=null&&sr.id&&Yt(Sr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(sr==null?void 0:sr.id,"?type=").concat(sr.content_type));case 5:case"end":return Pi.stop()}},_r)}));return function(_r){return ti.apply(this,arguments)}}()),Cr.show()},wo=function(){var Cr=new Pe(Sr.current);Cr.settings.displayMode="popup",Cr.addEventListener("render",function(){var ti=Object(s.a)(e.a.mark(function _r(li){var sr;return e.a.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:if(or.current.style.display="none",!Sr.current){Pi.next=6;break}return Pi.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:li.dataUrl}});case 4:sr=Pi.sent,sr!=null&&sr.id&&Yt(Sr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(sr==null?void 0:sr.id,"?type=").concat(sr.content_type));case 6:case"end":return Pi.stop()}},_r)}));return function(_r){return ti.apply(this,arguments)}}()),Cr.show(),window.markerArea=Cr},La=Object(o.useMemo)(function(){or.current&&(or.current.style.zIndex=-1);try{var Fr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Cr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ti=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;vr=vr.replace(Fr,"("+Z.a.API_SERVER+"/api/attachments/").replace(Cr,'"'+Z.a.API_SERVER+"/api/attachments/").replace(ti,'"'+Z.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` +`)}catch(Hi){}var _r=F(vr),li=M();if(vr.match(/\[TOC\]/)&&(_r=_r.replace("

          [TOC]

          ",O()),u()),_r=_r.replace(/(__special_katext_id_\d+__)/g,function(Hi,Pi){var Zi=li[Pi],mo=Zi.type,Vi=Zi.expression;return Object(re.renderToString)(Ar(Vi)||"",{displayMode:mo==="block",throwOnError:!1,output:"html"})}),_r=_r.replace(/▁/g,"\u2581\u2581\u2581"),N(),nt){var sr=document.createElement("div");return sr.innerHTML=_r,sr.innerText}return setTimeout(function(){return Jr()},500),_r},[vr]),Gi=Object(o.useRef)();E.WebkitLineClamp=kt,kt&&(Vn=Object(g.a)(Object(g.a)({},Vn),E));function Nr(Fr){var Cr=Fr.target;if(Cr.tagName.toUpperCase()==="IMG"){if(sn){var ti=Cr.getAttribute("src");ca(ti),po("image")}}else if(Cr.tagName.toUpperCase()==="A"){var _r=Cr.getAttribute("href");if(_r.indexOf("office")>-1)Fr.preventDefault(),ca(_r),po("office");else if(_r.indexOf("application/pdf")>-1)Fr.preventDefault(),ca(_r),po("pdf");else if(_r.indexOf("text/html")>-1)Fr.preventDefault(),ca(_r),po("html");else if(_r.startsWith("#")){Fr.preventDefault();var li=document.getElementById(_r.replace("#",""));li&&li.scrollIntoView(!0)}}}var Jr=function(){var Cr,ti=(Cr=Gi.current)===null||Cr===void 0?void 0:Cr.querySelectorAll("video");ti==null||ti.forEach(function(_r){if(_r.oncontextmenu=function(){return!1},_r.src.indexOf(".m3u8")>-1&&!_r.canPlayType("application/vnd.apple.mpegurl")){if(B.a.isSupported()){var li=new B.a;li.loadSource(_r.src),li.attachMedia(_r)}}})};Object(o.useEffect)(function(){if(Gi.current&&La&&(La.match(ar)&&window.PR.prettyPrint()),Gi.current)return Gi.current.addEventListener("click",Nr),function(){Gi.current.removeEventListener("click",Nr),N(),u()}},[La,Gi.current,Nr]);var bi=function(Cr){if(!Te)return;Cr.target.nodeName==="IMG"?(or.current.style.zIndex=1,or.current.style.display="flex",or.current.style.width=Cr.target.clientWidth+"px",or.current.style.height=Cr.target.clientHeight+"px",or.current.style.top=Cr.target.offsetTop+"px",or.current.style.left=Cr.target.offsetLeft+"px",Sr.current.src=Cr.target.getAttribute("src")):or.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Gi,style:Object(g.a)({},Vn),className:"".concat(ue||""," markdown-body ").concat(er.a.mdBody),onMouseOver:bi,dangerouslySetInnerHTML:{__html:La}}),n.a.createElement("div",{ref:or,className:er.a.button},n.a.createElement(v.a,null,n.a.createElement(y.a,{onClick:function(){return io()}},"\u88C1\u526A"),n.a.createElement(y.a,{onClick:function(){return wo()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Sr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(he.a,{close:!0,data:si,type:si!=null&&si.length?Ta:"",style:Object(g.a)({},Or),onClose:function(){return ca("")}}))}},"9OqN":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CTR=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._counter;p&&(e=this._counter=p.slice(0),this._iv=void 0);var o=e.slice(0);s.encryptBlock(o,0),e[_-1]=e[_-1]+1|0;for(var n=0;n<_;n++)y[g+n]^=o[n]}});return v.Decryptor=T,v}(),I.mode.CTR})},"9VGf":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I=b("q1tI"),v=b.n(I);function T(y,g){var s=Object(I.useRef)();Object(I.useEffect)(function(){s.current=y}),Object(I.useEffect)(function(){function _(){s.current()}if(g!==null){var p=setInterval(_,g);return function(){return clearInterval(p)}}},[g])}},"9odi":function(j,H,b){j.exports={"action-container":"action-container___UsSFw","eval-btn-group":"eval-btn-group___3FHdc","eval-desc":"eval-desc___2RSnM","btn-run":"btn-run___3Xli0","btn-run-self":"btn-run-self___2DnEi","ghost-link":"ghost-link___21xwP",link:"link___2BUFk"}},"A/g1":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},AKST:function(j,H,b){},ALsQ:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CFB=function(){var v=I.lib.BlockCipherMode.extend();v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize;T.call(this,y,g,_,s),this._prevBlock=y.slice(g,g+_)}}),v.Decryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=y.slice(g,g+_);T.call(this,y,g,_,s),this._prevBlock=p}});function T(y,g,s,_){var p,e=this._iv;e?(p=e.slice(0),this._iv=void 0):p=this._prevBlock,_.encryptBlock(p,0);for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(I.a)())return null;var o=document.createElement("style");if((p=e.csp)===null||p===void 0?void 0:p.nonce){var n;o.nonce=(n=e.csp)===null||n===void 0?void 0:n.nonce}o.innerHTML=_;var l=T(e),r=l.firstChild;return e.prepend&&l.prepend?l.prepend(o):e.prepend&&r?l.insertBefore(o,r):l.appendChild(o),o}var g=new Map;function s(_,p){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=T(e);if(!g.has(o)){var n=y("",e),l=n.parentNode;g.set(o,l),l.removeChild(n)}var r=Array.from(g.get(o).children).find(function(d){return d.tagName==="STYLE"&&d[v]===p});if(r){var i,t;if(((i=e.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((t=e.csp)===null||t===void 0?void 0:t.nonce)){var a;r.nonce=(a=e.csp)===null||a===void 0?void 0:a.nonce}return r.innerHTML!==_&&(r.innerHTML=_),r}var c=y(_,e);return c[v]=p,c}},Bd2K:function(j,H,b){(function(I){I(b("VrN/"),b("osHv"))})(function(I){I.defineOption("autoCloseTags",!1,function(e,o,n){if(n!=I.Init&&n&&e.removeKeyMap("autoCloseTags"),!o)return;var l={name:"autoCloseTags"};(typeof o!="object"||o.whenClosing!==!1)&&(l["'/'"]=function(r){return s(r)}),(typeof o!="object"||o.whenOpening!==!1)&&(l["'>'"]=function(r){return y(r)}),e.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function y(e){if(e.getOption("disableInput"))return I.Pass;for(var o=e.listSelections(),n=[],l=e.getOption("autoCloseTags"),r=0;ri.ch&&(f=f.slice(0,f.length-t.end+i.ch));var x=f.toLowerCase();if(!f||t.type=="string"&&(t.end!=i.ch||!/[\"\']/.test(t.string.charAt(t.string.length-1))||t.string.length==1)||t.type=="tag"&&d.close||t.string.indexOf("/")==i.ch-t.start-1||u&&_(u,x)>-1||p(e,a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(c)||[],f,i,!0))return I.Pass;var O=typeof l=="object"&&l.emptyTags;if(O&&_(O,f)>-1){n[r]={text:"/>",newPos:I.Pos(i.line,i.ch+2)};continue}var C=E&&_(E,x)>-1;n[r]={indent:C,text:">"+(C?` `:"")+"",newPos:C?I.Pos(i.line+1,0):I.Pos(i.line,i.ch+1)}}for(var w=typeof l=="object"&&l.dontIndentOnAutoClose,r=o.length-1;r>=0;r--){var S=n[r];e.replaceRange(S.text,o[r].head,o[r].anchor,"+insert");var A=e.listSelections().slice(0);A[r]={head:S.newPos,anchor:S.newPos},e.setSelections(A),!w&&S.indent&&(e.indentLine(S.newPos.line,null,!0),e.indentLine(S.newPos.line+1,null,!0))}}function g(e,o){for(var n=e.listSelections(),l=[],r=o?"/":""&&(u+=">"),l[a]=u}if(e.replaceSelections(l),n=e.listSelections(),!t)for(var a=0;a=0&&o[c]==n;c--)++a;l=t.to;for(var c=1;c0){for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:"",o=[],n=0;ns,I.serviceIds.set(s,_),_}function g(s){return function(_,p,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");T(s,_,e,!0)}}},CrYA:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"sessionStorage",read:y,write:g,each:s,remove:_,clearAll:p};function T(){return v.sessionStorage}function y(e){return T().getItem(e)}function g(e,o){return T().setItem(e,o)}function s(e){for(var o=T().length-1;o>=0;o--){var n=T().key(o);e(y(n),n)}}function _(e){return T().removeItem(e)}function p(){return T().clear()}},DVFL:function(j,H,b){},DlQD:function(j,H,b){(function(I,v){j.exports=v()})(this,function(){"use strict";function I(Ye,Ne){for(var He=0;HeYe.length)&&(Ne=Ye.length);for(var He=0,ve=new Array(Ne);He=Ye.length?{done:!0}:{done:!1,value:Ye[ve++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return He=Ye[Symbol.iterator](),He.next.bind(He)}function s(Ye,Ne){return Ne={exports:{}},Ye(Ne,Ne.exports),Ne.exports}var _=s(function(Ye){function Ne(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function He(ve){Ye.exports.defaults=ve}Ye.exports={defaults:Ne(),getDefaults:Ne,changeDefaults:He}}),p=_.defaults,e=_.getDefaults,o=_.changeDefaults,n=/[&<>"']/,l=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"},a=function(Ne){return t[Ne]};function c(Ye,Ne){if(Ne){if(n.test(Ye))return Ye.replace(l,a)}else if(r.test(Ye))return Ye.replace(i,a);return Ye}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(Ye){return Ye.replace(d,function(Ne,He){return He=He.toLowerCase(),He==="colon"?":":He.charAt(0)==="#"?He.charAt(1)==="x"?String.fromCharCode(parseInt(He.substring(2),16)):String.fromCharCode(+He.substring(1)):""})}var h=/(^|[^\[])\^/g;function u(Ye,Ne){Ye=Ye.source||Ye,Ne=Ne||"";var He={replace:function(xe,de){return de=de.source||de,de=de.replace(h,"$1"),Ye=Ye.replace(xe,de),He},getRegex:function(){return new RegExp(Ye,Ne)}};return He}var E=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(Ye,Ne,He){if(Ye){var ve;try{ve=decodeURIComponent(f(He)).replace(E,"").toLowerCase()}catch(xe){return null}if(ve.indexOf("javascript:")===0||ve.indexOf("vbscript:")===0||ve.indexOf("data:")===0)return null}Ne&&!x.test(He)&&(He=D(Ne,He));try{He=encodeURI(He).replace(/%25/g,"%")}catch(xe){return null}return He}var C={},w=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function D(Ye,Ne){C[" "+Ye]||(w.test(Ye)?C[" "+Ye]=Ye+"/":C[" "+Ye]=z(Ye,"/",!0)),Ye=C[" "+Ye];var He=Ye.indexOf(":")===-1;return Ne.substring(0,2)==="//"?He?Ne:Ye.replace(S,"$1")+Ne:Ne.charAt(0)==="/"?He?Ne:Ye.replace(A,"$1")+Ne:Ye+Ne}var M={exec:function(){}};function N(Ye){for(var Ne=1,He,ve;Ne=0&&Qe[Ze]==="\\";)ne=!ne;return ne?"|":" |"}),ve=He.split(/ \|/),xe=0;if(ve.length>Ne)ve.splice(Ne);else for(;ve.length1?{type:"space",raw:xe[0]}:{raw:` `}},Ne.code=function(ve,xe){var de=this.rules.block.code.exec(ve);if(de){var je=xe[xe.length-1];if(je&&je.type==="paragraph")return{raw:de[0],text:de[0].trimRight()};var Qe=de[0].replace(/^ {4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?Qe:L(Qe,` `)}}},Ne.fences=function(ve){var xe=this.rules.block.fences.exec(ve);if(xe){var de=xe[0],je=Se(de,xe[3]||"");return{type:"code",raw:de,lang:xe[2]?xe[2].trim():xe[2],text:je}}},Ne.heading=function(ve){var xe=this.rules.block.heading.exec(ve);if(xe)return{type:"heading",raw:xe[0],depth:xe[1].length,text:xe[2]}},Ne.nptable=function(ve){var xe=this.rules.block.nptable.exec(ve);if(xe){var de={type:"table",header:B(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(` -`):[],raw:xe[0]};if(de.header.length===de.align.length){var je=de.align.length,Qe;for(Qe=0;Qe ?/gm,"");return{type:"blockquote",raw:xe[0],text:de}}},Ne.list=function(ve){var xe=this.rules.block.list.exec(ve);if(xe){for(var de=xe[0],je=xe[2],Qe=je.length>1,ne=je[je.length-1]===")",Ze={type:"list",raw:de,ordered:Qe,start:Qe?+je.slice(0,-1):"",loose:!1,items:[]},lt=xe[0].match(this.rules.block.item),Be=!1,$e,it,wt,pt,st,Pe,ze,Et=lt.length,ht=0;ht1||this.options.smartLists&&wt!==je)&&(pt=lt.slice(ht+1).join(` -`),Ze.raw=Ze.raw.substring(0,Ze.raw.length-pt.length),ht=Et-1)),st=Be||/\n\n(?!\s*$)/.test($e),ht!==Et-1&&(Be=$e.charAt($e.length-1)===` +`):[],raw:xe[0]};if(de.header.length===de.align.length){var je=de.align.length,Qe;for(Qe=0;Qe ?/gm,"");return{type:"blockquote",raw:xe[0],text:de}}},Ne.list=function(ve){var xe=this.rules.block.list.exec(ve);if(xe){for(var de=xe[0],je=xe[2],Qe=je.length>1,ne=je[je.length-1]===")",Ze={type:"list",raw:de,ordered:Qe,start:Qe?+je.slice(0,-1):"",loose:!1,items:[]},lt=xe[0].match(this.rules.block.item),Be=!1,$e,rt,St,pt,st,Pe,ze,xt=lt.length,ht=0;ht1||this.options.smartLists&&St!==je)&&(pt=lt.slice(ht+1).join(` +`),Ze.raw=Ze.raw.substring(0,Ze.raw.length-pt.length),ht=xt-1)),st=Be||/\n\n(?!\s*$)/.test($e),ht!==xt-1&&(Be=$e.charAt($e.length-1)===` `,st||(st=Be)),st&&(Ze.loose=!0),Pe=/^\[[ xX]\] /.test($e),ze=void 0,Pe&&(ze=$e[1]!==" ",$e=$e.replace(/^\[[ xX]\] +/,"")),Ze.items.push({type:"list_item",raw:de,task:Pe,checked:ze,loose:st,text:$e});return Ze}},Ne.html=function(ve){var xe=this.rules.block.html.exec(ve);if(xe)return{type:this.options.sanitize?"paragraph":"html",raw:xe[0],pre:!this.options.sanitizer&&(xe[1]==="pre"||xe[1]==="script"||xe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Z(xe[0]):xe[0]}},Ne.def=function(ve){var xe=this.rules.block.def.exec(ve);if(xe){xe[3]&&(xe[3]=xe[3].substring(1,xe[3].length-1));var de=xe[1].toLowerCase().replace(/\s+/g," ");return{tag:de,raw:xe[0],href:xe[2],title:xe[3]}}},Ne.table=function(ve){var xe=this.rules.block.table.exec(ve);if(xe){var de={type:"table",header:B(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(` `):[]};if(de.header.length===de.align.length){de.raw=xe[0];var je=de.align.length,Qe;for(Qe=0;Qe/i.test(je[0])&&(xe=!1),!de&&/^<(pre|code|kbd|script)(\s|>)/i.test(je[0])?de=!0:de&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(je[0])&&(de=!1),{type:this.options.sanitize?"text":"html",raw:je[0],inLink:xe,inRawBlock:de,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):Z(je[0]):je[0]}},Ne.link=function(ve){var xe=this.rules.inline.link.exec(ve);if(xe){var de=re(xe[2],"()");if(de>-1){var je=xe[0].indexOf("!")===0?5:4,Qe=je+xe[1].length+de;xe[2]=xe[2].substring(0,de),xe[0]=xe[0].substring(0,Qe).trim(),xe[3]=""}var ne=xe[2],Ze="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ne);lt?(ne=lt[1],Ze=lt[3]):Ze=""}else Ze=xe[3]?xe[3].slice(1,-1):"";ne=ne.trim().replace(/^<([\s\S]*)>$/,"$1");var Be=he(xe,{href:ne&&ne.replace(this.rules.inline._escapes,"$1"),title:Ze&&Ze.replace(this.rules.inline._escapes,"$1")},xe[0]);return Be}},Ne.reflink=function(ve,xe){var de;if((de=this.rules.inline.reflink.exec(ve))||(de=this.rules.inline.nolink.exec(ve))){var je=(de[2]||de[1]).replace(/\s+/g," ");if(je=xe[je.toLowerCase()],!je||!je.href){var Qe=de[0].charAt(0);return{type:"text",raw:Qe,text:Qe}}var ne=he(de,je,de[0]);return ne}},Ne.strong=function(ve,xe,de){de===void 0&&(de="");var je=this.rules.inline.strong.start.exec(ve);if(je&&(!je[1]||je[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){xe=xe.slice(-1*ve.length);var Qe=je[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Qe.lastIndex=0;for(var ne;(je=Qe.exec(xe))!=null;)if(ne=this.rules.inline.strong.middle.exec(xe.slice(0,je.index+3)),ne)return{type:"strong",raw:ve.slice(0,ne[0].length),text:ve.slice(2,ne[0].length-2)}}},Ne.em=function(ve,xe,de){de===void 0&&(de="");var je=this.rules.inline.em.start.exec(ve);if(je&&(!je[1]||je[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){xe=xe.slice(-1*ve.length);var Qe=je[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Qe.lastIndex=0;for(var ne;(je=Qe.exec(xe))!=null;)if(ne=this.rules.inline.em.middle.exec(xe.slice(0,je.index+2)),ne)return{type:"em",raw:ve.slice(0,ne[0].length),text:ve.slice(1,ne[0].length-1)}}},Ne.codespan=function(ve){var xe=this.rules.inline.code.exec(ve);if(xe){var de=xe[2].replace(/\n/g," "),je=/[^ ]/.test(de),Qe=de.startsWith(" ")&&de.endsWith(" ");return je&&Qe&&(de=de.substring(1,de.length-1)),de=Z(de,!0),{type:"codespan",raw:xe[0],text:de}}},Ne.br=function(ve){var xe=this.rules.inline.br.exec(ve);if(xe)return{type:"br",raw:xe[0]}},Ne.del=function(ve){var xe=this.rules.inline.del.exec(ve);if(xe)return{type:"del",raw:xe[0],text:xe[1]}},Ne.autolink=function(ve,xe){var de=this.rules.inline.autolink.exec(ve);if(de){var je,Qe;return de[2]==="@"?(je=Z(this.options.mangle?xe(de[1]):de[1]),Qe="mailto:"+je):(je=Z(de[1]),Qe=je),{type:"link",raw:de[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Ne.url=function(ve,xe){var de;if(de=this.rules.inline.url.exec(ve)){var je,Qe;if(de[2]==="@")je=Z(this.options.mangle?xe(de[0]):de[0]),Qe="mailto:"+je;else{var ne;do ne=de[0],de[0]=this.rules.inline._backpedal.exec(de[0])[0];while(ne!==de[0]);je=Z(de[0]),de[1]==="www."?Qe="http://"+je:Qe=je}return{type:"link",raw:de[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Ne.inlineText=function(ve,xe,de){var je=this.rules.inline.text.exec(ve);if(je){var Qe;return xe?Qe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):Z(je[0]):je[0]:Qe=Z(this.options.smartypants?de(je[0]):je[0]),{type:"text",raw:je[0],text:Qe}}},Ye}(),te=F.noopTest,Re=F.edit,Ce=F.merge,pe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:te,table:te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=Re(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=Re(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=Re(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pe._comment=//,pe.html=Re(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=Re(pe._paragraph).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.blockquote=Re(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Ce({},pe),pe.gfm=Ce({},pe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pe.gfm.nptable=Re(pe.gfm.nptable).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.gfm.table=Re(pe.gfm.table).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.pedantic=Ce({},pe.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:te,paragraph:Re(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^ @@ -302,9 +302,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `},Ne.tablerow=function(ve){return` `+ve+` `},Ne.tablecell=function(ve,xe){var de=xe.header?"th":"td",je=xe.align?"<"+de+' align="'+xe.align+'">':"<"+de+">";return je+ve+" -`},Ne.strong=function(ve){return""+ve+""},Ne.em=function(ve){return""+ve+""},Ne.codespan=function(ve){return""+ve+""},Ne.br=function(){return this.options.xhtml?"
          ":"
          "},Ne.del=function(ve){return""+ve+""},Ne.link=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je='",je},Ne.image=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je=''+de+'":">",je},Ne.text=function(ve){return ve},Ye}(),Ee=function(){function Ye(){}var Ne=Ye.prototype;return Ne.strong=function(ve){return ve},Ne.em=function(ve){return ve},Ne.codespan=function(ve){return ve},Ne.del=function(ve){return ve},Ne.html=function(ve){return ve},Ne.text=function(ve){return ve},Ne.link=function(ve,xe,de){return""+de},Ne.image=function(ve,xe,de){return""+de},Ne.br=function(){return""},Ye}(),Le=function(){function Ye(){this.seen={}}var Ne=Ye.prototype;return Ne.slug=function(ve){var xe=ve.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var de=xe;do this.seen[de]++,xe=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},Ye}(),ge=_.defaults,De=F.unescape,_e=function(){function Ye(He){this.options=He||ge,this.options.renderer=this.options.renderer||new le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Le}Ye.parse=function(ve,xe){var de=new Ye(xe);return de.parse(ve)};var Ne=Ye.prototype;return Ne.parse=function(ve,xe){xe===void 0&&(xe=!0);var de="",je,Qe,ne,Ze,lt,Be,$e,it,wt,pt,st,Pe,ze,Et,ht,Bt,Ht,mt,Xt=ve.length;for(je=0;je0&&ht.tokens[0].type==="text"?(ht.tokens[0].text=mt+" "+ht.tokens[0].text,ht.tokens[0].tokens&&ht.tokens[0].tokens.length>0&&ht.tokens[0].tokens[0].type==="text"&&(ht.tokens[0].tokens[0].text=mt+" "+ht.tokens[0].tokens[0].text)):ht.tokens.unshift({type:"text",text:mt}):Et+=mt),Et+=this.parse(ht.tokens,ze),wt+=this.renderer.listitem(Et,Ht,Bt);de+=this.renderer.list(wt,st,Pe);continue}case"html":{de+=this.renderer.html(pt.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(pt.tokens));continue}case"text":{for(wt=pt.tokens?this.parseInline(pt.tokens):pt.text;je+1An error occurred:

          "+Ge(ne.message+"",!0)+"
          ";throw ne}}Ve.options=Ve.setOptions=function(Ye){return Xe(Ve.defaults,Ye),bt(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=Oe,Ve.use=function(Ye){var Ne=Xe({},Ye);if(Ye.renderer&&function(){var ve=Ve.defaults.renderer||new le,xe=function(Qe){var ne=ve[Qe];ve[Qe]=function(){for(var Ze=arguments.length,lt=new Array(Ze),Be=0;Be=0;r--){if(!T(l[r]))continue;var i=l[r].split("="),t=unescape(i[0]),a=unescape(i[1]);n(a,t)}}function _(n,l){if(!n)return;y.cookie=escape(n)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function p(n){if(!n||!o(n))return;y.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){s(function(n,l){p(l)})}function o(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(y.cookie)}},Dqnf:function(j,H,b){"use strict";var I=b("k1fw"),v=b("tJVT"),T=b("rAM+"),y=b("q1tI"),g=b.n(y),s=b("J66h"),_=b.n(s),p=b("/POA"),e=b.n(p),o=b("q7KB"),n=b.n(o),l=b("ER/M"),r=b.n(l),i=b("dhSg"),t=b("bdgK");function a(f,h,u){var E=u._core._renderService.dimensions.actualCellWidth||9.5,x=u._core._renderService.dimensions.actualCellHeight||18,O=Math.floor(h/x),C=Math.floor(f/E);return[C,O]}function c(f,h){var u=new t.default(function(E){var x=Object(T.a)(E),O;try{for(x.s();!(O=x.n()).done;){var C=O.value;if(C.target.offsetHeight>0||C.target.offsetWidth>0){var w=a(C.target.offsetWidth,C.target.offsetHeight,f),S=Object(v.a)(w,2),A=S[0],D=S[1];console.log("cols, rows",A,D),i.a.publish("ssh-xterm-resize",{columns:A,rows:D,width:C.target.offsetWidth,height:C.target.offsetHeight}),f.resize(A,D);var M=s.Base64.decode("IA=="),N=s.Base64.decode("CBtbSw==");f.write(M),f.write(N)}}}catch(P){x.e(P)}finally{x.f()}});return u.observe(h),u}var d=3e4;H.a=function(f){var h=f.sshConfigData,u=f.sid,E=Object(y.useState)(null),x=Object(v.a)(E,2),O=x[0],C=x[1],w=h.link_url,S=h.password,A=h.port,D=Object(y.useRef)(),M=Object(y.useRef)(),N=Object(y.useRef)(!1);return Object(y.useEffect)(function(){if(D.current&&w){var P=new p.Terminal({fontSize:16,rendererType:"dom"});P.open(D.current),P.onData(function(X){M.current&&(M.current.readyState===1&&(M.current.send(JSON.stringify({tp:"client",data:X})),i.a.publish("on-operating-ssh")))}),P.write("Connecting..."),C(P);var z=c(P,D.current);return function(){P.dispose(),z.unobserve(D.current)}}},[w,D.current]),Object(y.useEffect)(function(){if(O&&w){function P(){var L=new WebSocket(w);M.current=L,L.onopen=function(){var B=O.element.parentElement;if(B){var Z=B.offsetWidth,re=B.offsetHeight;console.log("init",{tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}),L.send(JSON.stringify({tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}))}O.focus()},L.onerror=function(B){console.log("------in socket error----",B,L,w)},L.onmessage=function(B){N.current||(O.write("\r"),setTimeout(function(){},1e3)),N.current=!0,console.log("event:",B);var Z=s.Base64.decode(B.data.toString()),re=O._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",Z,re,O),O.write(Z)},L.onclose=function(B){z&&clearInterval(z),O.write(`\r +`},Ne.strong=function(ve){return""+ve+""},Ne.em=function(ve){return""+ve+""},Ne.codespan=function(ve){return""+ve+""},Ne.br=function(){return this.options.xhtml?"
          ":"
          "},Ne.del=function(ve){return""+ve+""},Ne.link=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je='
          ",je},Ne.image=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je=''+de+'":">",je},Ne.text=function(ve){return ve},Ye}(),Ee=function(){function Ye(){}var Ne=Ye.prototype;return Ne.strong=function(ve){return ve},Ne.em=function(ve){return ve},Ne.codespan=function(ve){return ve},Ne.del=function(ve){return ve},Ne.html=function(ve){return ve},Ne.text=function(ve){return ve},Ne.link=function(ve,xe,de){return""+de},Ne.image=function(ve,xe,de){return""+de},Ne.br=function(){return""},Ye}(),Le=function(){function Ye(){this.seen={}}var Ne=Ye.prototype;return Ne.slug=function(ve){var xe=ve.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var de=xe;do this.seen[de]++,xe=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},Ye}(),ge=_.defaults,De=F.unescape,_e=function(){function Ye(He){this.options=He||ge,this.options.renderer=this.options.renderer||new le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Le}Ye.parse=function(ve,xe){var de=new Ye(xe);return de.parse(ve)};var Ne=Ye.prototype;return Ne.parse=function(ve,xe){xe===void 0&&(xe=!0);var de="",je,Qe,ne,Ze,lt,Be,$e,rt,St,pt,st,Pe,ze,xt,ht,Bt,Ht,gt,Xt=ve.length;for(je=0;je0&&ht.tokens[0].type==="text"?(ht.tokens[0].text=gt+" "+ht.tokens[0].text,ht.tokens[0].tokens&&ht.tokens[0].tokens.length>0&&ht.tokens[0].tokens[0].type==="text"&&(ht.tokens[0].tokens[0].text=gt+" "+ht.tokens[0].tokens[0].text)):ht.tokens.unshift({type:"text",text:gt}):xt+=gt),xt+=this.parse(ht.tokens,ze),St+=this.renderer.listitem(xt,Ht,Bt);de+=this.renderer.list(St,st,Pe);continue}case"html":{de+=this.renderer.html(pt.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(pt.tokens));continue}case"text":{for(St=pt.tokens?this.parseInline(pt.tokens):pt.text;je+1An error occurred:

          "+Ge(ne.message+"",!0)+"
          ";throw ne}}Ve.options=Ve.setOptions=function(Ye){return Xe(Ve.defaults,Ye),Et(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=Oe,Ve.use=function(Ye){var Ne=Xe({},Ye);if(Ye.renderer&&function(){var ve=Ve.defaults.renderer||new le,xe=function(Qe){var ne=ve[Qe];ve[Qe]=function(){for(var Ze=arguments.length,lt=new Array(Ze),Be=0;Be=0;r--){if(!T(l[r]))continue;var i=l[r].split("="),t=unescape(i[0]),a=unescape(i[1]);n(a,t)}}function _(n,l){if(!n)return;y.cookie=escape(n)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function p(n){if(!n||!o(n))return;y.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){s(function(n,l){p(l)})}function o(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(y.cookie)}},Dqnf:function(j,H,b){"use strict";var I=b("k1fw"),v=b("tJVT"),T=b("rAM+"),y=b("q1tI"),g=b.n(y),s=b("J66h"),_=b.n(s),p=b("/POA"),e=b.n(p),o=b("q7KB"),n=b.n(o),l=b("ER/M"),r=b.n(l),i=b("dhSg"),t=b("bdgK");function a(f,h,u){var E=u._core._renderService.dimensions.actualCellWidth||9.5,x=u._core._renderService.dimensions.actualCellHeight||18,O=Math.floor(h/x),C=Math.floor(f/E);return[C,O]}function c(f,h){var u=new t.default(function(E){var x=Object(T.a)(E),O;try{for(x.s();!(O=x.n()).done;){var C=O.value;if(C.target.offsetHeight>0||C.target.offsetWidth>0){var w=a(C.target.offsetWidth,C.target.offsetHeight,f),S=Object(v.a)(w,2),A=S[0],D=S[1];console.log("cols, rows",A,D),i.a.publish("ssh-xterm-resize",{columns:A,rows:D,width:C.target.offsetWidth,height:C.target.offsetHeight}),f.resize(A,D);var M=s.Base64.decode("IA=="),N=s.Base64.decode("CBtbSw==");f.write(M),f.write(N)}}}catch(P){x.e(P)}finally{x.f()}});return u.observe(h),u}var d=3e4;H.a=function(f){var h=f.sshConfigData,u=f.sid,E=Object(y.useState)(null),x=Object(v.a)(E,2),O=x[0],C=x[1],w=h.link_url,S=h.password,A=h.port,D=Object(y.useRef)(),M=Object(y.useRef)(),N=Object(y.useRef)(!1);return Object(y.useEffect)(function(){if(D.current&&w){var P=new p.Terminal({fontSize:16,rendererType:"dom"});P.open(D.current),P.onData(function(X){M.current&&(M.current.readyState===1&&(M.current.send(JSON.stringify({tp:"client",data:X})),i.a.publish("on-operating-ssh")))}),P.write("Connecting..."),C(P);var z=c(P,D.current);return function(){P.dispose(),z.unobserve(D.current)}}},[w,D.current]),Object(y.useEffect)(function(){if(O&&w){function P(){var L=new WebSocket(w);M.current=L,L.onopen=function(){var B=O.element.parentElement;if(B){var Z=B.offsetWidth,re=B.offsetHeight;console.log("init",{tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}),L.send(JSON.stringify({tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}))}O.focus()},L.onerror=function(B){console.log("------in socket error----",B,L,w)},L.onmessage=function(B){N.current||(O.write("\r"),setTimeout(function(){},1e3)),N.current=!0,console.log("event:",B);var Z=s.Base64.decode(B.data.toString()),re=O._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",Z,re,O),O.write(Z)},L.onclose=function(B){z&&clearInterval(z),O.write(`\r connection closed`)}}var z=setInterval(function(){M.current&&M.current.send(JSON.stringify({tp:"h"}))},d),X=i.a.subscribe("create-socket",function(L){u==L&&(M.current&&M.current.readyState===1?O.focus():P(),O.focus())}),k=i.a.subscribe("close-socket",function(L){u===L&&(M.current&&(M.current.close(),N.current=!1,O.clear()),M.current=null)}),F=i.a.subscribe("ssh-xterm-resize",function(L){M.current&&M.current.readyState===1&&M.current.send(JSON.stringify({tp:"resize",data:Object(I.a)({},L)}))}),U=i.a.subscribe("ssh-add-connect-time",function(){M.current&&M.current.readyState===1&&M.current.send(JSON.stringify({tp:"overtime"}))});return function(){k(),X(),F(),U(),M.current&&(M.current.close(),N.current=!1)}}},[O,w,A]),g.a.createElement("div",{ref:D,className:r.a["xterm-panel"]},w?null:g.a.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},E4JC:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=[],_=[],p=[],e=g.Rabbit=y.extend({_doReset:function(){for(var n=this._key.words,l=this.cfg.iv,r=0;r<4;r++)n[r]=(n[r]<<8|n[r]>>>24)&16711935|(n[r]<<24|n[r]>>>8)&4278255360;var i=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],t=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var r=0;r<4;r++)o.call(this);for(var r=0;r<8;r++)t[r]^=i[r+4&7];if(l){var a=l.words,c=a[0],d=a[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,h=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=f>>>16|h&4294901760,E=h<<16|f&65535;t[0]^=f,t[1]^=u,t[2]^=h,t[3]^=E,t[4]^=f,t[5]^=u,t[6]^=h,t[7]^=E;for(var r=0;r<4;r++)o.call(this)}},_doProcessBlock:function(n,l){var r=this._X;o.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=(s[i]<<8|s[i]>>>24)&16711935|(s[i]<<24|s[i]>>>8)&4278255360,n[l+i]^=s[i]},blockSize:128/32,ivSize:64/32});function o(){for(var n=this._X,l=this._C,r=0;r<8;r++)_[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<_[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<_[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<_[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<_[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<_[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<_[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<_[6]>>>0?1:0)|0,this._b=l[7]>>>0<_[7]>>>0?1:0;for(var r=0;r<8;r++){var i=n[r]+l[r],t=i&65535,a=i>>>16,c=((t*t>>>17)+t*a>>>15)+a*a,d=((i&4294901760)*i|0)+((i&65535)*i|0);p[r]=c^d}n[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,n[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,n[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,n[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,n[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,n[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,n[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,n[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}v.Rabbit=y._createHelper(e)}(),I.Rabbit})},E7E6:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyFEhIj+UwjxaHNz8+ls+ebrewYkX5J3IN9169YNv3DhwsRYLIbXJAWBDoZRmbKFYkPRhw4dqgEwdCgAwOfyPiDKyefzWS454Dh58iQdPPiJBk0fKN1E9KyU8gehUKjVcuIOPciAOCRYJ5J95JFHyq9cuaJZACHEJCklIOgHQUqZ0QIAACg/FB+//niPwxD/H3793QqwJkePHqW2tjaSUsKinCOibwWDwfVulcFIPgyIESm5FGfDhg0lBw8ehOM7qbe3dxIggCXAe58VgBOcts0AgP6XfwCACho2bBgNGTLEpZoYz6arq4vee2+PBooQosvv999y//33bzaegrMxGRBn5ZuQOpR77dq1dVB4BQCsQB8AgGB8JicY3RsAgNewYQO//EOHDnPdAtgttr1736cjR44g2VPl5eXXLF++HBYl74EBsbkJHnnkkZFQ/p6eHk3xdd2gpj6nuDxTlvAB8GufDAH+h+8Ga0A365133qHTp8/AkvwiGAx+3wt1ZUBMtsL69evLTpw4gZEfKH+THoC+z9WZkkQ3RwEQ7wLFf/2VY5yLE2yyKp6LfuHCBdq06W0A0j1kyJCG++6771S+C8mAJLUAukEPP/xw/ZUrVyb5/f4m+AAAgYia+iwCJsTSDuUMOMJD+7tB8e5Q3A/A9xzSS2DHjh0UiUQxWvY3zc3N/5VvWRUlIE888cSI9vZ2TfH7+v8AAD5A1m6QEKLPEcbIT/yl/AG8e9ERzreSmck/Go3S9u078MjOUCg018yzTsQdlIBgNOjw4cMTYAWSfv2VFcg4HBrvBsWdYLzHQYh3hWAJAAkHZyQQi8Xo1Vdfw4RirLKysvree++94ExOxlIt2JZes2bNmL5hUK37owehb6lE2r6M6gYpRxjKz90gYwpjNhac766uy9TRcYk6O7u09+7uborFpDYBWVVVRaNHj06YgNyyZSudPXsWP0S3BIPBN8zmaWd8zwICZzgSiUzs7e3VlL8PANUNwt+VRkaDBrpAcR8Af7s5IWZnY3k1LcxldHZ2UkdHh/bCZywxUf8DJNkGLhobJ9DUqVM1H+2DDz6kQ4cO4ZEfhUKhf81nvT0DyNq1a2+MxWJfIaIFRDSNiAKZJsVKS0v7h0KVBdDPChfzaJDdCnX5MixAJ3V2dmiK39UVB0DBgG5RuqB8tsrKSs1a4F11UzFq1draSqdPx5di4f9z5syhixcvaJOHRPRgKBS63+76mEkv74A8+OCDs7u7u39JRDfpC64mxdTSiEQIKtgZNtPKWeJeuXKlX/HjVgDW4FIfFJ39CwzTJQPFhuKPGDFCe1efhw8frv0v248VZtFbWlq02XRYkGuvvYY+/HAfulhvBIPBW2ysqumk8grImjVrvheLxf6DiEpgEcaPH081NWMIgmVn2HRbpn0AAMS7O3ErgPdLl+ATxLtFaoVtugQwQakUX1kCtJH6nA0AIzVBN2zTpk20f/9+gi7ATxFC7A8Gg58x8rxTcfIGyOrVq38gpQQcNG7cOLrhhhk8R2CxlaFMeuUf8AXiXaJsAMAnS7YA+r9LSkoslsz8Y6+++qpacoKHw6FQCBuy8hbyAsgDDzywuLe3dwPWHV133XU0eTIGojikkwD2Vaj+frIVwP/xfaaAYet0FgBdIPxieyXA4X/yySeVBTkfDAZH5rNsrgMCx3vNmjXvSSlnTJzYSDNmzMhn/T2RN37hVd9fdYGUD4D/w0IYAUD1+fUwAIBCm7zcunUr7dmjOek9oVAor/S6DsiaNWtui8ViL6HRliz5fME1nhWiAIDq7ytfYGA49BLBR8gU8Auv+vypukKDbREjRrZefPFF+CAyGAxa36FlpbGSnnEdkFWrVj1ARCumTZtGU6dOsaEK+U8Cw5z6ro8aDlXWAMOkmQL6+AoA/UiQsgQYsCimgB+Mhx9+uDgBWb169T4p5bTPfe6PtSHAQggAAL/8A5Nh8dEf9Tf6zZkChi4zWQAMZXNIlMDq1auLE5BVq1ZhM/KIW2/9U3JzdCSTAmKIMXkYVO8DGAEAs/T6OQC9H4DvOJiTAABBCIVCrvdy9CV1PfNVq1Zp6w5uv/3L5iSWQ+z4eiCsAxr41U+cGe7S9kWnCxjnzwQArAMHeyXAgNgMCIY6sXRBr/jKB4B1yAQAlkPoAUh2hAEAr+C1F4BsqTEgNgCC0aFjx47RsWPHNTjSBSg3+vnpukAAwI7Z4GyNzt8blwADkiMgODZm7969mu+AAEcYy6bVKFDyaBADYFw5vRCTAckBkMOHD9P773+gtWNtbS199rOfpQkTJrAV8IJm21QGBsQiIJhE+sMfdmnNcP3119PChQsZDJuU0kvJMCAWAMFI1IYNG7W1RwsWLKCZM2d6qU25LDZKgAGxAMiePXu14yrHjh1Ld955p43NwUl5TQIMiElA1GZ+vC9btkxzyDkMXgkwICYBuXjxIm3cuImtx+BlIqFmDIhJQM6cOUNbt/5e8zvgf3AY3BJgQEwCgnsl3n13Ozvng5uL/toxICYBiUZP0vbt22nRokU0ffr0IlGT4q0mA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtSkeKMwIAxI8Wq/gZozIAyIATUp3igMCANSvNpvoOYMCANiQE2KNwoDwoAUr/YbqDkDwoAYUJPijcKAMCDFq/0Gas6AMCAG1KR4ozAgDEjxar+BmjMgDIgBNSneKAwIA1K82m+g5gwIA2JATYo3CgPCgBSv9huoOQPCgBhQk+KNwoAwIMWr/QZqzoAwIAbUpHijMCAMSPFqv4GaMyAMiAE1Kd4oDAgDUrzab6DmDAgDYkBNijcKA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtTEu1FwrXZ3d7f2unLlivaO/6nbhHMtOQPCgOSqQ44/j8uKlPInw4Br8NKF6upqqqmpyal8DAgDkpMC2fUwFF0pv94a4DPuobcScC99U1OTdjW31cCAMCBWdcf0c+kAwP9hJZwIjY2NVFZWZjlpBoQBsaw8yQ+m8geUNYCFwPduBlgOWBBYEquBAWFATOmOVX/AVCY2RPb5fFRfX0/Dhg3LKTUGhAG5SoGc8Ady0tIMD8M6lJSUUGlpKQ0ZMqT/HaNYuVgOlSUDUqSA5MMfsAoJrAEgUAAABj0QVtM18hwDMkgB8Zo/kE0Z4S8oxU8GAHDkKzAgBQxIofgDSrlVV0j/669gyGUo1kl4GBCPA1Lo/oDeGtjhEzgJQ6q0GRCPAdLR0UHnz5/vnzl2an7AqqLl0x+wWuZcnmNAPATIxYsXKRqNuj5fkKxAgCCdQ5xPfyAXRbf6LAPiIUCOHDmiWQ43QiH6A27IJTkPBsRDgHzyySeW1x0lN2yq+YFC9wcYEBclsGrVKm3dw+0eAiQSiRC6WUYDIEg1IqS6R0bT4XjpJcAWxEOAYNVqa2srdXV19bcY+wP5xZcB8RAgShXgh2CiD36CV+cH8qu27uXOgHgQEPean3PKJgEGhAHJpiNF/T0DwoAUNQDZKs+AMCDZdKSov2dAGJCiBiBb5RkQBiSbjhT19wwIA1LUAGSrPAPCgGTTkaL+ngFhQIoagGyVZ0AYkGw6UlDfY/8MViHYtQKBAWFACgoAVVh13haW5ehf6hRGHBaHY3+wcDOXwIAwILnoj6PPqj336lxePQhGDqHDSudJkyblVEYGhAHJSYHseBj77pMtAf7OdDC10Xz56FGjkkqK58X9IBarUhCP4Rc/FQROnssLwcCCwJJYDWxB2IJY1Z2UzyVbA/1J7bZmZCCx4cOHUyAQMBAzfRQGhAExrUDKGqRylPN9Cgt2WcIxBxyjRo3K+fhRBoQBSQsIRoTS+QZGnGTT5Jl4AMO4ACH5lUt3KlX2DAgDchUEyjJYvbjGhJ5njKrfc68HARDYNc+RrawMSJEAAmVP1SVSd/plUxQnv9dbA3UIhQLCyXyNpM2ADDJAsk2gGVEKJ+KoY4hSdYvcsgZW6sWAFCAg+gk0vY/gBWugTmFJ5Rvw2bxWEI0/Y/2OLIt5FsI8iH6IVA+CHRNoFsUWb6y+S2sUBPpu0WA7mpQtiMcsCA6uVodX53vIFNYg2SdQUBSiNbDyo8CAeAiQc+fOUVtbm5V2zOkZdXtTcrdosFkDK0JiQDwEyOHDh7WRJieCmkBL1S2CpeCQWgIMiIcAsePwarcm0IoFKAbEQ4Cge4VuVraQbgIN1oGtQTbpmfueAfEQIFi+gQt02tvb+3fFubGcwpzKFFdsBsRDgCjVAyh4sTXIP4wMiAcByb9acAmUBBgQBoRpyCABBoQBYUAYkKslUAhLTVhz8y8BtiBsQfKvhR4uAQPCgHhYPZ0tGhaAYlj91KlT2vo3vDo6OrTVDGpFg9o0JoTYRkQHhRAfE9GOIUOGbFm+fHn2SSubqsCreW0SJCeTWQKAACsWDh06RGfOnNGG0y2GGBG9J4T4HRE9EwwGAY5jgQFxTLScMCSA24N37NhBuGrbiSCEaCGinwSDwTcdSd+JRDOlyU662xLPT37hcJi2b9/uGBgparXZ5/P9uLm5eYOdNWYLYqc0OS2t+7R161bNcmQKlZWVNGHCBKqpqaERI0YQ/sa5vmqpPzanXb58mS5evEgXLlzQtiMcP35c+ztTEEJsLCkp+cGKFSt22dEcDIgdUuQ0NAns27ePWlpaKN2pLA0NDRoUeFVXV1uS2qeffkrHjh3TXhkgvOzz+b7X3Ny81lImuocYkFwlWIDPY8ckfp3xwoiSesdqZfyajxkzxlSt8Gu/efNm+uijj1I+h2NI586dS6NHjzaVbrbIsFbwb7CfJ1UQQjwuhAg1Nzd3ZEsr3fcMiFXJFcBz6iTGZBiy7a3HyYhGIcHo1GuvvUZnz569SiITJ06kG2+80XYwkjMCKPB3jhw5kqpV3vf7/XetXLnygJUmY0CsSM2Dz2D+IBkEq6etwA9oamrKWkv4A88++6w2h6EP2CqwZMmSnK9AyFqApAiwJBs2bNCsYlKIEtGCUCiUkqBM+TAgZlshz/HVIdXJ3SM7D5owAgjyf+655wg+gT7A8txyyy1aVy0fAQ7966+/TqdPn07IXgixv6SkZOGKFSuuNnUZCsqA5KMVDeSp/AS9jwCldONY0mxdLJThpZdeumoId9q0abR48WLXjidNJ0aUDz7R/v37kyHZUlZW9sXly5d3GWgCLQoDYlRSDsXT39+h7yI5dYhEpmpgX31VVVVW/wO/0JgR14drrrmGbr75ZoekZC3Zt956iw4cSHQ9MAPf3Nz8Z0IIzMhnDQxIVhHZF0H5CcoqAAirfkIupVJ76zHvgBd8BrwbOaF97969tGXLloTsx48fT7feeqvndmLCCr/yyiva/Ik+CCG+HwwGf2FEhgyIESmZjAMTr/cR1Gc7/QSjRVIH0OlBABBWDqCDU75u3bqEI5Iw0XfHHXf0T/AZLZdb8eCzPf/889rCSBWEEJf8fv+M+++/P/X4sK5wDEgOLaXO6k2GwQ0/IbnY6tihZKtg5/56DOfq5xwA3ze+8Q0aNmxYDlJ0/tFLly7Rr3/96wSwhRDPB4PBr2bLnQHJJqG+7/XdIvU5H36C/pBqPQxOn8aIpR6/+x0W0A6E+fPn06xZswxKML/Rdu/eTe+8805CIfx+/x+tXLlye6aSMSBJ0lEHV+sdZgCRw/JsS5qh9xOUj2DUT7CUYZaH0Jc/evRofyw481//+tc953ekqwas/TPPPKPtPdF1tdYHg8HbGBADGoNxcwgvH90j/Pond42s+gkGqmo6CnyPp556KuFHYunSpdqaqkIKWL+1fv16fZExkjU50wQiWxAibVIp1VIJuxtf7yforYKdfoLdZUZ6WMaxc+fO/qQxGbhs2TInsnI8zd/85jfJk4g/DYVC/5wuYwaESBvTz7Y+yUzLqesLkq2C036CmTKaiYuuiX7GfN68eTR79mwzSXgm7q5du2jbNuzijQfMsAeDwc8wIBmayCog+rN69TDAOgyWgONYn3jiiYTq3HPPPXlbSpKrXLEUBd1FffD5fI3Nzc3HUqXNFoRI2+SDV6ag7vJItgpW5hNybWQ3n8cSdiwAVAHzHnfddZebRbA9r9/+9rcJ8yJ+v/87K1eufJgBySBqAAInHaNV6uBqPQxevvDSdg3SJYjdgXv27On/D5avz5kzx8ksHU8b/hT8Kl036xfBYPD7DIjjoh98Gbz88ssJSzW+9KUvub6M3W6pYrITk546QN4IBoO3MCB2S7oI0nv66acT5g4wcz5y5MiCrjnugsHMug6QT4LB4BQGpKCbNT+Ff+yxx6izs7M/829/+9tUXl6en8LYlGtXVxc9+uijekBOB4PBGgbEJgEXUzIPPPBAwuTpypUrC2b2PF07YVZ97dqB8xyEEFeCwWAZA1JMmm1TXRkQmwRpNBk+OM6opLwRj7tYLrcDA+KywHPMjp30HAVo5HEpZXk0Gv5mLEbffeGFF7Q1Crfz6e5GRJf3ODzM62ATnDlzZtzly50hIrFSSqmdRvbCCy9qOTIgDgrexqR5otBGYaqkotHopFis5ydE4h4pZYk+CwbEAYE7mCQvNbFRuKdOnQp0d3f/iCi2QkoqTZU0A2KjwF1Iihcr2iDkcDg8Rkr590TyL4moIlOSDIgNAnc5CV7ublHgUkpfJBL5KyL5MyllpZFkGBAjUvJWHN4wZaE9otHo9Fis50EpaZ6ZxxkQM9LyRlzecmuiHaSUQ8Lh8D8KIf8hnZ/BXSwTAi2QqHxog4GGiluN3nVSyrRbFLMlwxYkm4S8+f1gPPaHiOaFQqF3M0nc8I7CcDj8NSL5mJRyeC5NyIDkIr38PssHx6WQv5RSRCKRfyGSP8LnXJuIAclVgvl7frAcPVpSUiLnz5//y+nTp/+1ECLjfdQZFb6trW14d3f3k0TyK3Y1CwNilyTzk85gOLx6+vTr+y4IEi+UlpZ+q7a2tj2dNNMCgvVTkUjrK1LS5+1sCgbETmnmJ61Cvv6gvr6ebrxxbr/ghKCN9fUNtwohUt4ZkhIQLA8Jh8PPEskv290EDIjdEnU/vUK9QAcXAy1YMD/FBT/ipUAgcKcQoidZmlcBEp/8Cz8hpfymE6JnQJyQqvtp4uxi3E+I/d364NUr2IYPH0aLFi3STqxJFYQQT9fXB+5NvljnKkBaW1v/jUj+rVMiZ0Cckqz76RbKJZ44vmnx4kU0dOjQLEIS/97Q0PB3+kgJgLS2ti4SgjbBijglbgbEKcnmJ12vXwNdWVmpXUUNC5ItwHpISZ9raGhoUXH7AZFSVoTD4d1E8ppsCeXyPQOSi/S8+SzONX777bevug9QlXbSpEk0d+5c2+9Lx2F/O3bsSLjURy8hXA13ww0zTF4qKg4EAoFZQgjtKJd+QJzuWqmCMyDeVHI7SrVv3z5qaWlJe4VEQ0ODdmUCXtXV1ZayxCHauMYAr9bW1pRp4PDwGTOmU2Njo6U8iAa6WhogbW1tU3p6uvdLKf0WUzT8GANiWFQFGRG/6rjkMxwOZyw//AFYFpz1izvV0RWCr6BOwIdVwkAA/BwcOI07BgEF/s4URo8eTdOnT6eqKuv3tAshektKSqfV1tYe1AAJh8OrpIwF3WgRBsQNKec/DwCCZfKRSMSVwmAId9q0a7NeYW20MEL4VgcCgZCA7xGJhE9JKbN7MUZTzxCPAbFBiAWUBLpB8BOcAgVgXHvttVRTox15YFvATbj19YEaEQ6H75Qylng7o23ZXJ0QA+KgcD2aNEa6sCvRrmuw0X2qrw9QIFBPw4fntHY2o8SE8H1NtLa2/rJvq6wr4mVAXBGzpzJJXpqCa6MnT55M0WhUu5dFfy+kuo4O103AH8E5wIiP18iRVQSLgeun3QniVwBkK5Fc4E6GfOyPW3L2Qj6wGAcOHKCNGzdmLA4gaGpqokmTJpocknW6luL3IhxujUgp65zOSqXPFsQtSbubD0adcBkqLAJGnNTFqKm6Vcoa4CppLE3x6nUKQoioaG09gQkR186zZ0DcVVwncsO98QBA/8L8hJG75OfPn0+1tSlvGnCiqLmm2cWA5CrCQf487tJQICjLAKc7OcB3qKwcTrAKVVUjtbkN3Cjb0dHRHzV5qXkBiK6Lu1gF0EpuFRHKnAxDqok5ONAAAKNJAAJdJEz06e97P3jwE/rwww/7i47vliz5vOZsF0ro62Kxk14oDWZnOXFiorIIgAKf9b/2Ki+MJMVhiIMAKABDptt9r1zppjfffJO6u7v7iwwnHDv5CiuIrTzMW1gtZqm06BLpLQNgwDKO5IDh0zgI6CbFu0pGVsEmp7N37/sJCwiR7he+cHPavRiWKuXKQ+JXPFHoiqDdyQROMjYwKYugoIBTnRyw7ikOwQAQ2fdLZK8HLNPGjZsSJgWvv/56mjy5KfvDHoshhO9OXmrisUYxWhwMn2LkSHWT8I4hVgy3JoeKioo+fwFdJEAxgvA/J8L27YnLSgDdzTcvKbh7DfuXmkBIbi5WfPnl9drM6dKlt5qaFIpGT2qL37BtEqs1iylAXlB+vWU4e/ZsymXlUEjlK8Tfq1zr2qBMLS1bEppmzpw51NAQKLjm6l+siJK7udz9zTffokuXLmm/KmZGNIoFEDi2+sk2WAZ0m1JNuGEdkt55xmf3lmFcrfObN7doVk0F7PnAVtdCC1ctd0cF3Now9e677xKUfebMG7SNM0bDYAQEjnKqOYbkCTeMGGHkaMB5jvsOGG71SsCq3Z07/5BQHFj7UaOsbYzKb72SNkyhMG5tuT127Djt3r1b2355003Gl4DhbNht294lzMTOmjUrv/KzkHtnZ2dCFwmWIdUcA+YL1LAqfAV0k/C3fo7BQvaOPgLr9tZbGxKGiQOBAM2dO8fRfJ1JPM2W2z4r4vihDehCoJuFkRUc4FVXZ2wZGLodW7f+nmbMmEELFy50RjY2pYoupN55hpXA/5IDLEB8sm3AeQYMmeYYbCqirckMhklBCCTjoQ1KYm50tQ4fPkI4whJnFC1ceJOhNf1QMPxKYXHbsmXLbG3gXBLDdtDkYVVYi+Sg5hj0s89O7mXIpU5mnh08k4IaIpmP/enrajl6cJwSvhoOxHj87NmztL3JmQL65a+99ro2O3v33Xdr+wLcDnCWk4dVU024AfyBOYb47LOZAQm365VLfoNlUtDwwXF9kDh29KhqDAxdAhL4FghTpkymadOmZexefPDBh3To0CHCcS633XZbLu2a8Vk1x6B3oNHF0y+dUAlgL4PyFdTsc0WFa4ujHZOBkYQHz6SgiaNHlWCcOrw6WfAHDx6kffv2a0ulq6tH0nXXXZfWOij/Be84DAxj7LkG/RyDAiJ5l5vKA3MMybPPsIDFGgbDpKClw6tVgztx/UEqZTp79lPauXMnqb47xs+bmiYRlkcnO6zo4mA0C0DNnDmT5s2bZ3iER23q0VsGjNtn3tQz4ECnO9e1GAEZHJOCOVx/oLMktl6gk06ZYBUOHTqsLXJTa4fQfRk7dqw2lg6fQ60VOnGild577z1NsfGLPnv2bJo4caK2f1kF/aYe5TfAh0g1xzBkSCmNHFmtnYyhhlXV+UzFqPxG6vz225sTDq4upEnB+KU54mf19fU/zukCHb2g7LqCLZvw0eXBpBOGDtHH1Yd4f79KO2AM8WAJlJMMSwOA8B0sUaqRJKSFoVXEw2gYTsUAEF6acMsmHy98X8iTgkKIdiLx54FAwNBJPqauVLPjEk8zDYzuD7pf8Alg0lOtSs2UHqABVJhbqKsbq3XZuJtkpgWujgurjXks/Q9QoUwKCiH2+Xz+u+vq6t43KgVTgCBRXAMdiUR+RBT7oZVroI0WLFW89vZL1N5+kTD2DljQLevuxnuPZgUw2xyfbxhB1dWjqFhGk3KRqdlnjx8/Trt27e5/rBB2CgpB3US+n9fX1/9MCHH12v8MQjANiEorbk16HpSS5pkVMscvXAmoSV5VA6/vFBSCtvl8JSvMWA1961gGpM+a+CKRyHeJ5E+llJWF2+xccqMSgNXetm2b1vXFwMn8+fP6D5w2moYb8YQQF4nEP9XX1/9P8q1RZvLPCRCVUTgcHiOl/CGR/AsicmYnjplacVzHJYAhc4+O9HUSif8VQvw8EAiczlUQtgCiCnHq1KlAd3f3PxHFvuO2f5KrIPj5wpZAn5/xUGlp6U9ramoy371goqq2AqLyPXnyZFNvb/ePicQ9uDHXRHk4KkvAlATiN9PKp3y+kp/U1dUdNvWwgciOAKLyPXPmzLjLlztDRGKllNLe8+kNVI6jDF4JCCFOE8m1ZWUVq0aPHn3CqZo6CogqNNZ1RaPhb8Zi9D0iWXi7nZySPqdrQQJit89H/11XF3haCNFlIQFTj7gCiL5E4XB4MZEMEdEdUsps9/KaqgxHHpwSEELg/NLnicSqQCCw2c1aug6IqhwWQvb09HyVSH6LiL7Ivoqbze79vOK+Bf0fkXiypKTkudra2sR1Ry5VIW+A6OsXjUZre3t778DBmPAAAAI6SURBVO6DZb5LdedsvCmBdwCF3+9fV1dXF98slMfgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},E9nw:function(j,H){j.exports=function(){var b=document.getSelection();if(!b.rangeCount)return function(){};for(var I=document.activeElement,v=[],T=0;T`,triples:"",explode:"[]{}"},T=I.Pos;I.defineOption("autoCloseBrackets",!1,function(t,a,c){c&&c!=I.Init&&(t.removeKeyMap(g),t.state.closeBrackets=null),a&&(s(y(a,"pairs")),t.state.closeBrackets=a,t.addKeyMap(g))});function y(t,a){return a=="pairs"&&typeof t=="string"?t:typeof t=="object"&&t[a]!=null?t[a]:v[a]}var g={Backspace:e,Enter:o};function s(t){for(var a=0;a=0;f--){var u=d[f].head;t.replaceRange("",T(u.line,u.ch-1),T(u.line,u.ch+1),"+delete")}}function o(t){var a=p(t),c=a&&y(a,"explode");if(!c||t.getOption("disableInput"))return I.Pass;for(var d=t.listSelections(),f=0;f0;return{anchor:new T(t.anchor.line,t.anchor.ch+(a?-1:1)),head:new T(t.head.line,t.head.ch+(a?1:-1))}}function l(t,a){var c=p(t);if(!c||t.getOption("disableInput"))return I.Pass;var d=y(c,"pairs"),f=d.indexOf(a);if(f==-1)return I.Pass;for(var h=y(c,"closeBefore"),u=y(c,"triples"),E=d.charAt(f+1)==a,x=t.listSelections(),O=f%2==0,C,w=0;w=0&&t.getRange(A,T(A.line,A.ch+3))==a+a+a?D="skipThree":D="skip";else if(E&&A.ch>1&&u.indexOf(a)>=0&&t.getRange(T(A.line,A.ch-2),A)==a+a){if(A.ch>2&&/\bstring/.test(t.getTokenTypeAt(T(A.line,A.ch-2))))return I.Pass;D="addFour"}else if(E){var N=A.ch==0?" ":t.getRange(T(A.line,A.ch-1),A);if(!I.isWordChar(M)&&N!=a&&!I.isWordChar(N))D="both";else return I.Pass}else if(O&&(M.length===0||/\s/.test(M)||h.indexOf(M)>-1))D="both";else return I.Pass;if(!C)C=D;else if(C!=D)return I.Pass}var P=f%2?d.charAt(f-1):a,z=f%2?a:d.charAt(f+1);t.operation(function(){if(C=="skip")t.execCommand("goCharRight");else if(C=="skipThree")for(var X=0;X<3;X++)t.execCommand("goCharRight");else if(C=="surround"){for(var k=t.getSelections(),X=0;X>>24)&16711935|(C<<24|C>>>8)&4278255360}var w=this._hash.words,S=l.words,A=r.words,D=p.words,M=e.words,N=o.words,P=n.words,z,X,k,F,U,L,B,Z,re,he;L=z=w[0],B=X=w[1],Z=k=w[2],re=F=w[3],he=U=w[4];for(var Se,x=0;x<80;x+=1)Se=z+u[E+D[x]]|0,x<16?Se+=t(X,k,F)+S[0]:x<32?Se+=a(X,k,F)+S[1]:x<48?Se+=c(X,k,F)+S[2]:x<64?Se+=d(X,k,F)+S[3]:Se+=f(X,k,F)+S[4],Se=Se|0,Se=h(Se,N[x]),Se=Se+U|0,z=U,U=F,F=h(k,10),k=X,X=Se,Se=L+u[E+M[x]]|0,x<16?Se+=f(B,Z,re)+A[0]:x<32?Se+=d(B,Z,re)+A[1]:x<48?Se+=c(B,Z,re)+A[2]:x<64?Se+=a(B,Z,re)+A[3]:Se+=t(B,Z,re)+A[4],Se=Se|0,Se=h(Se,P[x]),Se=Se+he|0,L=he,he=re,re=h(Z,10),Z=B,B=Se;Se=w[1]+k+re|0,w[1]=w[2]+F+he|0,w[2]=w[3]+U+L|0,w[3]=w[4]+z+B|0,w[4]=w[0]+X+Z|0,w[0]=Se},_doFinalize:function(){var u=this._data,E=u.words,x=this._nDataBytes*8,O=u.sigBytes*8;E[O>>>5]|=128<<24-O%32,E[(O+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,u.sigBytes=(E.length+1)*4,this._process();for(var C=this._hash,w=C.words,S=0;S<5;S++){var A=w[S];w[S]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return C},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});function t(u,E,x){return u^E^x}function a(u,E,x){return u&E|~u&x}function c(u,E,x){return(u|~E)^x}function d(u,E,x){return u&x|E&~x}function f(u,E,x){return u^(E|~x)}function h(u,E){return u<>>32-E}T.RIPEMD160=s._createHelper(i),T.HmacRIPEMD160=s._createHmacHelper(i)}(Math),I.RIPEMD160})},"ER/M":function(j,H,b){j.exports={"xterm-panel":"xterm-panel___2r2xx"}},ETIr:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Base64={stringify:function(p){var e=p.words,o=p.sigBytes,n=this._map;p.clamp();for(var l=[],r=0;r>>2]>>>24-r%4*8&255,t=e[r+1>>>2]>>>24-(r+1)%4*8&255,a=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=i<<16|t<<8|a,d=0;d<4&&r+d*.75>>6*(3-d)&63));var f=n.charAt(64);if(f)for(;l.length%4;)l.push(f);return l.join("")},parse:function(p){var e=p.length,o=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var l=0;l>>6-r%4*2,a=i|t;n[l>>>2]|=a<<24-l%4*8,l++}return y.create(n,l)}}(),I.enc.Base64})},"F+F2":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){if(typeof ArrayBuffer!="function")return;var v=I,T=v.lib,y=T.WordArray,g=y.init,s=y.init=function(_){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),(_ instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array)&&(_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Uint8Array){for(var p=_.byteLength,e=[],o=0;o>>2]|=_[o]<<24-o%4*8;g.call(this,e,p)}else g.apply(this,arguments)};s.prototype=y}(),I.lib.WordArray})},FOrL:function(j,H,b){j.exports=b.p+"static/nodata.a6b3f948.png"},FPkq:function(j,H,b){j.exports=b.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(j,H,b){"use strict";b.d(H,"a",function(){return I});function I(v,T){if(!v)throw new Error(T?`Assertion failed (${T})`:"Assertion Failed")}},FfZY:function(j,H,b){j.exports={wrap:"wrap___2UNvJ",modal:"modal___i6_bN",title:"title___ae-La",path:"path___3AJgW",colorBlue:"colorBlue___afQvH",width240:"width240___9YsKN",filePath:"filePath___2-i4S"}},Fv0C:function(j,H,b){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(a){return typeof a}:I=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},I(i)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=e(b("Lo0S")),T=b("vewr"),y=e(b("8CQX")),g=_(b("mHUz")),s=e(b("GdRQ"));function _(i){return i&&i.__esModule?i:{default:i}}function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function e(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var t=p();if(t&&t.has(i))return t.get(i);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in i)if(Object.prototype.hasOwnProperty.call(i,d)){var f=c?Object.getOwnPropertyDescriptor(i,d):null;f&&(f.get||f.set)?Object.defineProperty(a,d,f):a[d]=i[d]}return a.default=i,t&&t.set(i,a),a}function o(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function n(i,t){for(var a=0;a=48&&a.keyCode<=57)c=a.keyCode;else if(a.keyCode>=65&&a.keyCode<=90){var f=String.fromCharCode(a.keyCode);a.shiftKey?f=f.toUpperCase():f=f.toLowerCase(),c=f.charCodeAt()}else c=0;this._sendKeyEvent(c,d,!0)}},{key:"_handleKeyUp",value:function(a){(0,T.stopEvent)(a);var c=this._getKeyCode(a);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)),(s.isMac()||s.isIOS())&&c==="CapsLock"){this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[c],c,!1),s.isWindows()&&(c==="ShiftLeft"||c==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){v.Debug(">> Keyboard.allKeysUp");for(var a in this._keyDownList)this._sendKeyEvent(this._keyDownList[a],a,!1);v.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(a){if(a.skipCheckAlt)return;if(a.altKey)return;var c=this._target,d=this._keyDownList;["AltLeft","AltRight"].forEach(function(f){if(!(f in d))return;var h=new KeyboardEvent("keyup",{key:d[f],code:f});h.skipCheckAlt=!0,c.dispatchEvent(h)})}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.addEventListener(c,a,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.removeEventListener(c,a)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),i}();H.default=r},GABl:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GQ8N:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.toUnsigned32bit=I,H.toSigned32bit=v;function I(T){return T>>>0}function v(T){return T|0}},GRuw:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("lPiR"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.algo,s=g.SHA256,_=g.SHA224=s.extend({_doReset:function(){this._hash=new y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=s._doFinalize.call(this);return p.sigBytes-=4,p}});v.SHA224=s._createHelper(_),v.HmacSHA224=s._createHmacHelper(_)}(),I.SHA224})},GdRQ:function(j,H,b){"use strict";function I(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(w){return typeof w}:I=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},I(O)}Object.defineProperty(H,"__esModule",{value:!0}),H.isMac=c,H.isWindows=d,H.isIOS=f,H.isSafari=h,H.isIE=u,H.isEdge=E,H.isFirefox=x,H.hasScrollbarGutter=H.supportsImageMetadata=H.supportsCursorURIs=H.dragThreshold=H.isTouchDevice=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return T=function(){return O},O}function y(O){if(O&&O.__esModule)return O;if(O===null||I(O)!=="object"&&typeof O!="function")return{default:O};var C=T();if(C&&C.has(O))return C.get(O);var w={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in O)if(Object.prototype.hasOwnProperty.call(O,A)){var D=S?Object.getOwnPropertyDescriptor(O,A):null;D&&(D.get||D.set)?Object.defineProperty(w,A,D):w[A]=O[A]}return w.default=O,C&&C.set(O,w),w}var g="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;H.isTouchDevice=g,window.addEventListener("touchstart",function O(){H.isTouchDevice=g=!0,window.removeEventListener("touchstart",O,!1)},!1);var s=10*(window.devicePixelRatio||1);H.dragThreshold=s;var _=!1;try{var p=document.createElement("canvas");p.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',p.style.cursor.indexOf("url")===0?(v.Info("Data URI scheme cursor supported"),_=!0):v.Warn("Data URI scheme cursor not supported")}catch(O){v.Error("Data URI scheme cursor test exception: "+O)}var e=_;H.supportsCursorURIs=e;var o=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),o=!0}catch(O){}var n=o;H.supportsImageMetadata=n;var l=!0;try{var r=document.createElement("div");r.style.visibility="hidden",r.style.overflow="scroll",document.body.appendChild(r);var i=document.createElement("div");r.appendChild(i);var t=r.offsetWidth-i.offsetWidth;r.parentNode.removeChild(r),l=t!=0}catch(O){v.Error("Scrollbar test exception: "+O)}var a=l;H.hasScrollbarGutter=a;function c(){return navigator&&!!/mac/i.exec(navigator.platform)}function d(){return navigator&&!!/win/i.exec(navigator.platform)}function f(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function h(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function u(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function E(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function x(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},GfqC:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("TSYQ"),y=b.n(T);function g(F,U){var L="cannot "+F.method+" "+F.action+" "+U.status+"'",B=new Error(L);return B.status=U.status,B.method=F.method,B.url=F.action,B}function s(F){var U=F.responseText||F.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function _(F){var U=new XMLHttpRequest;F.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),F.onProgress(re)});var L=new FormData;F.data&&Object.keys(F.data).forEach(function(Z){var re=F.data[Z];if(Array.isArray(re)){re.forEach(function(he){L.append(Z+"[]",he)});return}L.append(Z,F.data[Z])}),F.file instanceof Blob?L.append(F.filename,F.file,F.file.name):L.append(F.filename,F.file),U.onerror=function(re){F.onError(re)},U.onload=function(){return U.status<200||U.status>=300?F.onError(g(F,U),s(U)):F.onSuccess(s(U),U)},U.open(F.method,F.action,!0),F.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var B=F.headers||{};return B["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(B).forEach(function(Z){B[Z]!==null&&U.setRequestHeader(Z,B[Z])}),U.send(L),{abort:function(){U.abort()}}}var p=+new Date,e=0;function o(){return"rc-upload-"+p+"-"+ ++e}function n(F,U){return F.indexOf(U,F.length-U.length)!==-1}var l=function(F,U){if(F&&U){var L=Array.isArray(U)?U:U.split(","),B=F.name||"",Z=F.type||"",re=Z.replace(/\/.*$/,"");return L.some(function(he){var Se=he.trim();return Se.charAt(0)==="."?n(B.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?re===Se.replace(/\/.*$/,""):Z===Se})}return!0};function r(F,U){var L=F.createReader(),B=[];function Z(){L.readEntries(function(re){var he=Array.prototype.slice.apply(re);B=B.concat(he);var Se=!he.length;Se?U(B):Z()})}Z()}var i=function(U,L,B){var Z=function re(he,Se){Se=Se||"",he.isFile?he.file(function(ke){B(ke)&&(he.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=he.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),L([ke]))}):he.isDirectory&&r(he,function(ke){ke.forEach(function(te){re(te,""+Se+he.name+"/")})})};U.forEach(function(re){Z(re.webkitGetAsEntry())})},t=i,a=Object.assign||function(F){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(F,B))continue;L[B]=F[B]}return L}function u(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")}function E(F,U){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:F}function x(F,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(F,U):F.__proto__=U)}var O=function(U){return Object.keys(U).reduce(function(L,B){return(B.substr(0,5)==="data-"||B.substr(0,5)==="aria-"||B==="role")&&(L[B]=U[B]),L},{})},C=function(F){x(U,F);function U(){var L,B,Z,re;u(this,U);for(var he=arguments.length,Se=Array(he),ke=0;ke1&&arguments[1]!==void 0?arguments[1]:{};return Object(g.f)("myshixuns/".concat(ie,"/repository.json"),q)}function S(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function A(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function D(ie){return Object(g.c)("myshixuns/".concat(ie,"/reset_pod.json"))}function M(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function N(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function P(ie){var q=ie.myshixunId;return delete ie.myshixunId,Object(g.c)("myshixuns/".concat(q,"/reset_pod.json"),Object(v.a)({game_id:ie.game_id},ie))}function z(ie){return Object(g.c)("tasks/".concat(ie,"/check_test_sets.json"))}function X(ie){return Object(g.c)("tasks/".concat(ie,"/get_answer_info.json"))}function k(ie){return Object(g.c)("tasks/".concat(ie,"/get_choose_answer.json"))}function F(ie){return Object(g.c)("tasks/".concat(ie,"/unlock_choose_answer.json"))}function U(ie,q){return Object(g.c)("tasks/".concat(ie,"/unlock_answer.json?answer_id=").concat(q))}function L(ie,q,Q){return Object(g.f)("tasks/".concat(ie,"/set_games_status.json"),{result:q,data:Q})}function B(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function Z(ie,q){return Object(g.a)("/api/myshixuns/".concat(ie,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:q}})}function re(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function he(ie,q){return Object(g.c)("tasks/".concat(ie,"/rank_list.json"),q)}function Se(ie,q){return Object(g.f)("tasks/".concat(ie,"/close_windows_vnc.json"),{tpi_id:q})}function ke(ie){return Object(g.c)("tasks/".concat(ie,"/pull_files.json"))}function te(ie,q){return Object(g.f)("tasks/".concat(ie,"/log_output"),q)}function Re(ie){return Object(g.c)("tasks/".concat(ie,"/stop_log_output.json"))}function Ce(ie){return pe.apply(this,arguments)}function pe(){return pe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/add_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),pe.apply(this,arguments)}function me(ie){return se.apply(this,arguments)}function se(){return se=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/delete_git_file.json"),{method:"Delete",body:q}));case 1:case"end":return Y.stop()}},ie)})),se.apply(this,arguments)}function be(ie){return ae.apply(this,arguments)}function ae(){return ae=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/mv_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),ae.apply(this,arguments)}function fe(ie){return Fe.apply(this,arguments)}function Fe(){return Fe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/tasks/".concat(q.id,"/rep_content.json"),{method:"get",params:q}));case 1:case"end":return Y.stop()}},ie)})),Fe.apply(this,arguments)}},Ib8C:function(j,H,b){(function(I){(function(v,T){j.exports=H=T()})(this,function(){var v=v||function(T,y){var g;if(typeof window!="undefined"&&window.crypto&&(g=window.crypto),typeof self!="undefined"&&self.crypto&&(g=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(g=globalThis.crypto),!g&&typeof window!="undefined"&&window.msCrypto&&(g=window.msCrypto),!g&&typeof I!="undefined"&&I.crypto&&(g=I.crypto),!g&&!0)try{g=b(4)}catch(f){}var s=function(){if(g){if(typeof g.getRandomValues=="function")try{return g.getRandomValues(new Uint32Array(1))[0]}catch(f){}if(typeof g.randomBytes=="function")try{return g.randomBytes(4).readInt32LE()}catch(f){}}throw new Error("Native crypto module could not be used to get secure random number.")},_=Object.create||function(){function f(){}return function(h){var u;return f.prototype=h,u=new f,f.prototype=null,u}}(),p={},e=p.lib={},o=e.Base=function(){return{extend:function(f){var h=_(this);return f&&h.mixIn(f),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var f=this.extend();return f.init.apply(f,arguments),f},init:function(){},mixIn:function(f){for(var h in f)f.hasOwnProperty(h)&&(this[h]=f[h]);f.hasOwnProperty("toString")&&(this.toString=f.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=e.WordArray=o.extend({init:function(f,h){f=this.words=f||[],h!=y?this.sigBytes=h:this.sigBytes=f.length*4},toString:function(f){return(f||r).stringify(this)},concat:function(f){var h=this.words,u=f.words,E=this.sigBytes,x=f.sigBytes;if(this.clamp(),E%4)for(var O=0;O>>2]>>>24-O%4*8&255;h[E+O>>>2]|=C<<24-(E+O)%4*8}else for(var w=0;w>>2]=u[w>>>2];return this.sigBytes+=x,this},clamp:function(){var f=this.words,h=this.sigBytes;f[h>>>2]&=4294967295<<32-h%4*8,f.length=T.ceil(h/4)},clone:function(){var f=o.clone.call(this);return f.words=this.words.slice(0),f},random:function(f){for(var h=[],u=0;u>>2]>>>24-x%4*8&255;E.push((O>>>4).toString(16)),E.push((O&15).toString(16))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E>>3]|=parseInt(f.substr(E,2),16)<<24-E%8*4;return new n.init(u,h/2)}},i=l.Latin1={stringify:function(f){for(var h=f.words,u=f.sigBytes,E=[],x=0;x>>2]>>>24-x%4*8&255;E.push(String.fromCharCode(O))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E>>2]|=(f.charCodeAt(E)&255)<<24-E%4*8;return new n.init(u,h)}},t=l.Utf8={stringify:function(f){try{return decodeURIComponent(escape(i.stringify(f)))}catch(h){throw new Error("Malformed UTF-8 data")}},parse:function(f){return i.parse(unescape(encodeURIComponent(f)))}},a=e.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(f){typeof f=="string"&&(f=t.parse(f)),this._data.concat(f),this._nDataBytes+=f.sigBytes},_process:function(f){var h,u=this._data,E=u.words,x=u.sigBytes,O=this.blockSize,C=O*4,w=x/C;f?w=T.ceil(w):w=T.max((w|0)-this._minBufferSize,0);var S=w*O,A=T.min(S*4,x);if(S){for(var D=0;Dthis.chunkSize&&(this.chunkSize=o,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=o;var n=(0,I.inflate)(this.strm,0);if(n<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=o)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,I.inflateReset)(this.strm)}}]),p}();H.default=_},IxHN:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("07cG"),y=b.n(T);H.a=function(g){var s=g.message,_=g.className,p=g.children,e=g.style,o=e===void 0?{}:e;return v.a.createElement("div",{className:"".concat(y.a.idsRingWrapper," ").concat(_)},v.a.createElement("div",{className:y.a.ldsRing},v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null)),s?v.a.createElement("p",{style:o},s):null,p)}},J66h:function(j,H,b){(function(I){var v,T;(function(y,g){j.exports=g(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof I!="undefined"?I:this,function(y){"use strict";y=y||{};var g=y.Base64,s="2.6.4",_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(P){for(var z={},X=0,k=P.length;X>>6)+e(128|z&63):e(224|z>>>12&15)+e(128|z>>>6&63)+e(128|z&63)}else{var z=65536+(P.charCodeAt(0)-55296)*1024+(P.charCodeAt(1)-56320);return e(240|z>>>18&7)+e(128|z>>>12&63)+e(128|z>>>6&63)+e(128|z&63)}},n=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(P){return P.replace(n,o)},r=function(P){var z=[0,2,1][P.length%3],X=P.charCodeAt(0)<<16|(P.length>1?P.charCodeAt(1):0)<<8|(P.length>2?P.charCodeAt(2):0),k=[_.charAt(X>>>18),_.charAt(X>>>12&63),z>=2?"=":_.charAt(X>>>6&63),z>=1?"=":_.charAt(X&63)];return k.join("")},i=y.btoa&&typeof y.btoa=="function"?function(P){return y.btoa(P)}:function(P){if(P.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return P.replace(/[\s\S]{1,3}/g,r)},t=function(P){return i(l(String(P)))},a=function(P){return P.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},c=function(P,z){return z?a(t(P)):t(P)},d=function(P){return c(P,!0)},f;y.Uint8Array&&(f=function(P,z){for(var X="",k=0,F=P.length;k>>18)+_.charAt(Z>>>12&63)+(typeof L!="undefined"?_.charAt(Z>>>6&63):"=")+(typeof B!="undefined"?_.charAt(Z&63):"=")}return z?a(X):X});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,u=function(P){switch(P.length){case 4:var z=(7&P.charCodeAt(0))<<18|(63&P.charCodeAt(1))<<12|(63&P.charCodeAt(2))<<6|63&P.charCodeAt(3),X=z-65536;return e((X>>>10)+55296)+e((X&1023)+56320);case 3:return e((15&P.charCodeAt(0))<<12|(63&P.charCodeAt(1))<<6|63&P.charCodeAt(2));default:return e((31&P.charCodeAt(0))<<6|63&P.charCodeAt(1))}},E=function(P){return P.replace(h,u)},x=function(P){var z=P.length,X=z%4,k=(z>0?p[P.charAt(0)]<<18:0)|(z>1?p[P.charAt(1)]<<12:0)|(z>2?p[P.charAt(2)]<<6:0)|(z>3?p[P.charAt(3)]:0),F=[e(k>>>16),e(k>>>8&255),e(k&255)];return F.length-=[0,0,2,1][X],F.join("")},O=y.atob&&typeof y.atob=="function"?function(P){return y.atob(P)}:function(P){return P.replace(/\S{1,4}/g,x)},C=function(P){return O(String(P).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(P){return E(O(P))},S=function(P){return String(P).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},A=function(P){return w(S(P))},D;y.Uint8Array&&(D=function(P){return Uint8Array.from(C(S(P)),function(z){return z.charCodeAt(0)})});var M=function(){var P=y.Base64;return y.Base64=g,P};if(y.Base64={VERSION:s,atob:C,btoa:i,fromBase64:A,toBase64:c,utob:l,encode:c,encodeURI:d,btou:E,decode:A,noConflict:M,fromUint8Array:f,toUint8Array:D},typeof Object.defineProperty=="function"){var N=function(P){return{value:P,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(P){return c(this,P)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return c(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),j.exports?j.exports.Base64=y.Base64:!(v=[],T=function(){return y.Base64}.apply(H,v),T!==void 0&&(j.exports=T)),{Base64:y.Base64}})}).call(this,b("IyRk"))},JSwD:function(j,H,b){"use strict";function I(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(d){return typeof d}:I=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},I(a)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=t;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var a=new WeakMap;return T=function(){return a},a}function y(a){if(a&&a.__esModule)return a;if(a===null||I(a)!=="object"&&typeof a!="function")return{default:a};var c=T();if(c&&c.has(a))return c.get(a);var d={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in a)if(Object.prototype.hasOwnProperty.call(a,h)){var u=f?Object.getOwnPropertyDescriptor(a,h):null;u&&(u.get||u.set)?Object.defineProperty(d,h,u):d[h]=a[h]}return d.default=a,c&&c.set(a,d),d}var g=15,s=852,_=592,p=0,e=1,o=2,n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function t(a,c,d,f,h,u,E,x){var O=x.bits,C=0,w=0,S=0,A=0,D=0,M=0,N=0,P=0,z=0,X=0,k,F,U,L,B,Z=null,re=0,he,Se=new v.Buf16(g+1),ke=new v.Buf16(g+1),te=null,Re=0,Ce,pe,me;for(C=0;C<=g;C++)Se[C]=0;for(w=0;w=1&&!(Se[A]!==0);A--);if(D>A&&(D=A),A===0)return h[u++]=1<<24|64<<16|0,h[u++]=1<<24|64<<16|0,x.bits=1,0;for(S=1;S0&&(a===p||A!==1))return-1;for(ke[1]=0,C=1;Cs||a===o&&z>_)return 1;for(;;){Ce=C-N,E[w]he?(pe=te[Re+E[w]],me=Z[re+E[w]]):(pe=32+64,me=0),k=1<>N)+F]=Ce<<24|pe<<16|me|0;while(F!==0);for(k=1<>=1;if(k!==0?(X&=k-1,X+=k):X=0,w++,--Se[C]===0){if(C===A)break;C=c[d+E[w]]}if(C>D&&(X&L)!==U){for(N===0&&(N=D),B+=S,M=C-N,P=1<s||a===o&&z>_)return 1;U=X&L,h[U]=D<<24|M<<16|B-u|0}}return X!==0&&(h[B+X]=C-N<<24|64<<16|0),x.bits=D,0}},JWDV:function(j,H,b){j.exports=b.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){function T(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}v.is=T;const y=Object.freeze([]);function g(){return y}v.empty=g;function*s(h){yield h}v.single=s;function _(h){return h||y}v.from=_;function p(h){return!h||h[Symbol.iterator]().next().done===!0}v.isEmpty=p;function e(h){return h[Symbol.iterator]().next().value}v.first=e;function o(h,u){for(const E of h)if(u(E))return!0;return!1}v.some=o;function n(h,u){for(const E of h)if(u(E))return E;return}v.find=n;function*l(h,u){for(const E of h)u(E)&&(yield E)}v.filter=l;function*r(h,u){let E=0;for(const x of h)yield u(x,E++)}v.map=r;function*i(...h){for(const u of h)for(const E of u)yield E}v.concat=i;function*t(h){for(const u of h)for(const E of u)yield E}v.concatNested=t;function a(h,u,E){let x=E;for(const O of h)x=u(x,O);return x}v.reduce=a;function*c(h,u,E=h.length){for(u<0&&(u+=h.length),E<0?E+=h.length:E>h.length&&(E=h.length);ux===O){const x=h[Symbol.iterator](),O=u[Symbol.iterator]();for(;;){const C=x.next(),w=O.next();if(C.done!==w.done)return!1;if(C.done)return!0;if(!E(C.value,w.value))return!1}}v.equals=f})(I||(I={}))},JeFH:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(j,H,b){j.exports=b.p+"static/qrcode.2267e4d5.png"},K3mO:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.MD5,p=s.EvpKDF=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,o){for(var n,l=this.cfg,r=l.hasher.create(),i=g.create(),t=i.words,a=l.keySize,c=l.iterations;t.length=0;y--)if(T[y>>>2]>>>24-y%4*8&255){v.sigBytes=y+1;break}}},I.pad.ZeroPadding})},LCi9:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(h,u){if(!(h instanceof u))throw new TypeError("Cannot call a class as a function")}function v(h,u){for(var E=0;E0&&Date.now()-this._tracked[0].started>t){this._state=y,this._ignored.push(E);return}if(this._waitingRelease){this._state=y,this._ignored.push(E);return}this._tracked.push({id:E,started:Date.now(),active:!0,firstX:x,firstY:O,lastX:x,lastY:O,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(g|p|e),this._stopLongpressTimeout();break;case 3:this._state&=~(s|o|n);break;default:this._state=y}}},{key:"_touchMove",value:function(E,x,O){var C=this._tracked.find(function(N){return N.id===E});if(C===void 0)return;C.lastX=x,C.lastY=O;var w=x-C.firstX,S=O-C.firstY;if((C.firstX!==C.lastX||C.firstY!==C.lastY)&&(C.angle=Math.atan2(S,w)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(w,S)r){var M=Math.abs(C.angle-A.angle);M=Math.abs((M+180)%360-180),M>i?this._state&=~o:this._state&=~n,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}},{key:"_touchEnd",value:function(E,x,O){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=l,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=y),!this._hasDetectedGesture()&&(this._state&=~(p|o|n),this._state&=~e,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(s|_);break;case 2:this._state&=~(g|_);break}}if(this._waitingRelease){Date.now()-this._releaseStart>t&&(this._state=y),this._tracked.some(function(S){return Date.now()-S.started>a})&&(this._state=y);var C=this._tracked.find(function(S){return S.id===E});if(C.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==y)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var w=0;w1&&arguments[1]!==void 0?arguments[1]:1,He=Ee.length,ve=0;ve1&&arguments[1]!==void 0?arguments[1]:!1;return Object(O.a)(L).map(function(Z,re){if(!g.isValidElement(Z)||!Z.type)return null;var he=Z.type.isSelectOptGroup,Se=Z.key,ke=Z.props,te=ke.children,Re=Object(_.a)(ke,["children"]);return B||!he?C(Z):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Se===null?re:Se,"__"),label:Se},Re),{},{options:w(te)})}).filter(function(Z){return Z})}var S=b("2Qr1"),A=b("qNPg"),D=b("U8pU"),M=b("Kwbf"),N=b("WKfj");function P(L){var B=L.mode,Z=L.options,re=L.children,he=L.backfill,Se=L.allowClear,ke=L.placeholder,te=L.getInputElement,Re=L.showSearch,Ce=L.onSearch,pe=L.defaultOpen,me=L.autoFocus,se=L.labelInValue,be=L.value,ae=L.inputValue,fe=L.optionLabelProp,Fe=B==="multiple"||B==="tags",ie=Re!==void 0?Re:Fe||B==="combobox",q=Z||w(re);if(Object(M.a)(B!=="tags"||q.every(function(le){return!le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),B==="tags"||B==="combobox"){var Q=q.some(function(le){return le.options?le.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in le?le.value:le.key)=="number"});Object(M.a)(!Q,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(B!=="combobox"||!fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(B==="combobox"||!he,"`backfill` only works with `combobox` mode."),Object(M.a)(B==="combobox"||!te,"`getInputElement` only work with `combobox` mode."),Object(M.b)(B!=="combobox"||!te||!Se||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ce&&!ie&&B!=="combobox"&&B!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!pe||me,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Y=Object(N.d)(be);Object(M.a)(!se||Y.every(function(le){return Object(D.a)(le)==="object"&&("key"in le||"value"in le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Fe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var oe=null;Object(O.a)(re).some(function(le){if(!g.isValidElement(le)||!le.type)return!1;var Ee=le.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Le=Object(O.a)(le.props.children).every(function(ge){return!g.isValidElement(ge)||!le.type||ge.type.isSelectOption?!0:(oe=ge.type,!1)});return!Le}return oe=Ee,!0}),oe&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(oe.displayName||oe.name||oe,"`.")),Object(M.a)(ae===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=P,X=Object(A.a)({prefixCls:"rc-select",components:{optionList:d},convertChildrenToData:w,flattenOptions:S.d,getLabeledValue:S.e,filterOptions:S.b,isValueDisabled:S.g,findValueOption:S.c,warningProps:z,fillOptionsWithMissingValue:S.a}),k=function(L){Object(T.a)(Z,L);var B=Object(y.a)(Z);function Z(){var re;return Object(I.a)(this,Z),re=B.apply(this,arguments),re.selectRef=g.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(v.a)(Z,[{key:"render",value:function(){return g.createElement(X,Object.assign({ref:this.selectRef},this.props))}}]),Z}(g.Component);k.Option=h,k.OptGroup=E;var F=k,U=H.c=F},Lmeb:function(j,H,b){},Lo0S:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.initLogging=s,H.getLogging=_,H.Error=H.Warn=H.Info=H.Debug=void 0;var I="warn",v=function(){};H.Debug=v;var T=function(){};H.Info=T;var y=function(){};H.Warn=y;var g=function(){};H.Error=g;function s(p){if(typeof p=="undefined"?p=I:I=p,H.Debug=v=H.Info=T=H.Warn=y=H.Error=g=function(){},typeof window.console!="undefined")switch(p){case"debug":H.Debug=v=console.debug.bind(window.console);case"info":H.Info=T=console.info.bind(window.console);case"warn":H.Warn=y=console.warn.bind(window.console);case"error":H.Error=g=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+p+"'")}}function _(){return I}s()},M8RZ:function(j,H,b){"use strict";b.d(H,"a",function(){return e});var I=b("fWQN"),v=b("mtLc"),T=b("yKVA"),y=b("879j"),g=b("q1tI"),s=b.n(g),_=b("i8i4"),p=b.n(_),e=function(o){Object(T.a)(l,o);var n=Object(y.a)(l);function l(r){var i;Object(I.a)(this,l),i=n.call(this,r);var t=window.document;return i.node=t.createElement("div"),t.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(_.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(s.a.Component)},MAU4:function(j,H,b){j.exports=b.p+"static/disappoint1.7e763f4d.svg"},MFOe:function(j,H,b){(function(I){var v=s(),T=_(),y=p(),g=typeof window!="undefined"?window:I;j.exports={assign:v,create:T,trim:y,bind:e,slice:o,each:n,map:l,pluck:r,isList:i,isFunction:t,isObject:a,Global:g};function s(){return Object.assign?Object.assign:function(d,f,h,u){for(var E=1;Ev.a.None;function t(P){return(z,X=null,k)=>{let F=!1,U;return U=P(L=>F?void 0:(U?U.dispose():F=!0,z.call(X,L)),null,k),F&&U.dispose(),U}}i.once=t;function a(P,z){return E((X,k=null,F)=>P(U=>X.call(k,z(U)),null,F))}i.map=a;function c(P,z){return E((X,k=null,F)=>P(U=>{z(U),X.call(k,U)},null,F))}i.forEach=c;function d(P,z){return E((X,k=null,F)=>P(U=>z(U)&&X.call(k,U),null,F))}i.filter=d;function f(P){return P}i.signal=f;function h(...P){return(z,X=null,k)=>Object(v.e)(...P.map(F=>F(U=>z.call(X,U),null,k)))}i.any=h;function u(P,z,X){let k=X;return a(P,F=>(k=z(k,F),k))}i.reduce=u;function E(P){let z;const X=new e({onFirstListenerAdd(){z=P(X.fire,X)},onLastListenerRemove(){z.dispose()}});return X.event}function x(P,z,X=100,k=!1,F){let U,L,B,Z=0;const re=new e({leakWarningThreshold:F,onFirstListenerAdd(){U=P(he=>{Z++,L=z(L,he),k&&!B&&(re.fire(L),L=void 0),clearTimeout(B),B=setTimeout(()=>{const Se=L;L=void 0,B=void 0,(!k||Z>1)&&re.fire(Se),Z=0},X)})},onLastListenerRemove(){U.dispose()}});return re.event}i.debounce=x;function O(P,z=(X,k)=>X===k){let X=!0,k;return d(P,F=>{const U=X||!z(F,k);return X=!1,k=F,U})}i.latch=O;function C(P,z){return[i.filter(P,z),i.filter(P,X=>!z(X))]}i.split=C;function w(P,z=!1,X=[]){let k=X.slice(),F=P(B=>{k?k.push(B):L.fire(B)});const U=()=>{k&&k.forEach(B=>L.fire(B)),k=null},L=new e({onFirstListenerAdd(){F||(F=P(B=>L.fire(B)))},onFirstListenerDidAdd(){k&&(z?setTimeout(U):U())},onLastListenerRemove(){F&&F.dispose(),F=null}});return L.event}i.buffer=w;class S{constructor(P){this.event=P}map(P){return new S(a(this.event,P))}forEach(P){return new S(c(this.event,P))}filter(P){return new S(d(this.event,P))}reduce(P,z){return new S(u(this.event,P,z))}latch(){return new S(O(this.event))}debounce(P,z=100,X=!1,k){return new S(x(this.event,P,z,X,k))}on(P,z,X){return this.event(P,z,X)}once(P,z,X){return t(this.event)(P,z,X)}}function A(P){return new S(P)}i.chain=A;function D(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.on(z,k),U=()=>P.removeListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromNodeEventEmitter=D;function M(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.addEventListener(z,k),U=()=>P.removeEventListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromDOMEventEmitter=M;function N(P){return new Promise(z=>t(P)(z))}i.toPromise=N})(g||(g={}));class s{constructor(i){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${i}_${s._idPool++}`}start(i){this._stopWatch=new y.a(!0),this._listenerCount=i}stop(){if(this._stopWatch){const i=this._stopWatch.elapsed();this._elapsedOverall+=i,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${i.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}s._idPool=0;let _=-1;class p{constructor(i,t=Math.random().toString(18).slice(2,5)){this.customThreshold=i,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(i){let t=_;if(typeof this.customThreshold=="number"&&(t=this.customThreshold),t<=0||i>>24)&16711935|(C<<24|C>>>8)&4278255360}var w=this._hash.words,S=l.words,A=r.words,D=p.words,M=e.words,N=o.words,P=n.words,z,X,k,F,U,L,B,Z,re,he;L=z=w[0],B=X=w[1],Z=k=w[2],re=F=w[3],he=U=w[4];for(var Se,x=0;x<80;x+=1)Se=z+u[E+D[x]]|0,x<16?Se+=t(X,k,F)+S[0]:x<32?Se+=a(X,k,F)+S[1]:x<48?Se+=c(X,k,F)+S[2]:x<64?Se+=d(X,k,F)+S[3]:Se+=f(X,k,F)+S[4],Se=Se|0,Se=h(Se,N[x]),Se=Se+U|0,z=U,U=F,F=h(k,10),k=X,X=Se,Se=L+u[E+M[x]]|0,x<16?Se+=f(B,Z,re)+A[0]:x<32?Se+=d(B,Z,re)+A[1]:x<48?Se+=c(B,Z,re)+A[2]:x<64?Se+=a(B,Z,re)+A[3]:Se+=t(B,Z,re)+A[4],Se=Se|0,Se=h(Se,P[x]),Se=Se+he|0,L=he,he=re,re=h(Z,10),Z=B,B=Se;Se=w[1]+k+re|0,w[1]=w[2]+F+he|0,w[2]=w[3]+U+L|0,w[3]=w[4]+z+B|0,w[4]=w[0]+X+Z|0,w[0]=Se},_doFinalize:function(){var u=this._data,E=u.words,x=this._nDataBytes*8,O=u.sigBytes*8;E[O>>>5]|=128<<24-O%32,E[(O+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,u.sigBytes=(E.length+1)*4,this._process();for(var C=this._hash,w=C.words,S=0;S<5;S++){var A=w[S];w[S]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return C},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});function t(u,E,x){return u^E^x}function a(u,E,x){return u&E|~u&x}function c(u,E,x){return(u|~E)^x}function d(u,E,x){return u&x|E&~x}function f(u,E,x){return u^(E|~x)}function h(u,E){return u<>>32-E}T.RIPEMD160=s._createHelper(i),T.HmacRIPEMD160=s._createHmacHelper(i)}(Math),I.RIPEMD160})},"ER/M":function(j,H,b){j.exports={"xterm-panel":"xterm-panel___2r2xx"}},ETIr:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Base64={stringify:function(p){var e=p.words,o=p.sigBytes,n=this._map;p.clamp();for(var l=[],r=0;r>>2]>>>24-r%4*8&255,t=e[r+1>>>2]>>>24-(r+1)%4*8&255,a=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=i<<16|t<<8|a,d=0;d<4&&r+d*.75>>6*(3-d)&63));var f=n.charAt(64);if(f)for(;l.length%4;)l.push(f);return l.join("")},parse:function(p){var e=p.length,o=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var l=0;l>>6-r%4*2,a=i|t;n[l>>>2]|=a<<24-l%4*8,l++}return y.create(n,l)}}(),I.enc.Base64})},"F+F2":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){if(typeof ArrayBuffer!="function")return;var v=I,T=v.lib,y=T.WordArray,g=y.init,s=y.init=function(_){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),(_ instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array)&&(_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Uint8Array){for(var p=_.byteLength,e=[],o=0;o>>2]|=_[o]<<24-o%4*8;g.call(this,e,p)}else g.apply(this,arguments)};s.prototype=y}(),I.lib.WordArray})},FOrL:function(j,H,b){j.exports=b.p+"static/nodata.a6b3f948.png"},FPkq:function(j,H,b){j.exports=b.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(j,H,b){"use strict";b.d(H,"a",function(){return I});function I(v,T){if(!v)throw new Error(T?`Assertion failed (${T})`:"Assertion Failed")}},FfZY:function(j,H,b){j.exports={wrap:"wrap___2UNvJ",modal:"modal___i6_bN",title:"title___ae-La",path:"path___3AJgW",colorBlue:"colorBlue___afQvH",width240:"width240___9YsKN",filePath:"filePath___2-i4S"}},Fv0C:function(j,H,b){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(a){return typeof a}:I=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},I(i)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=e(b("Lo0S")),T=b("vewr"),y=e(b("8CQX")),g=_(b("mHUz")),s=e(b("GdRQ"));function _(i){return i&&i.__esModule?i:{default:i}}function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function e(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var t=p();if(t&&t.has(i))return t.get(i);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in i)if(Object.prototype.hasOwnProperty.call(i,d)){var f=c?Object.getOwnPropertyDescriptor(i,d):null;f&&(f.get||f.set)?Object.defineProperty(a,d,f):a[d]=i[d]}return a.default=i,t&&t.set(i,a),a}function o(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function n(i,t){for(var a=0;a=48&&a.keyCode<=57)c=a.keyCode;else if(a.keyCode>=65&&a.keyCode<=90){var f=String.fromCharCode(a.keyCode);a.shiftKey?f=f.toUpperCase():f=f.toLowerCase(),c=f.charCodeAt()}else c=0;this._sendKeyEvent(c,d,!0)}},{key:"_handleKeyUp",value:function(a){(0,T.stopEvent)(a);var c=this._getKeyCode(a);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)),(s.isMac()||s.isIOS())&&c==="CapsLock"){this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[c],c,!1),s.isWindows()&&(c==="ShiftLeft"||c==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){v.Debug(">> Keyboard.allKeysUp");for(var a in this._keyDownList)this._sendKeyEvent(this._keyDownList[a],a,!1);v.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(a){if(a.skipCheckAlt)return;if(a.altKey)return;var c=this._target,d=this._keyDownList;["AltLeft","AltRight"].forEach(function(f){if(!(f in d))return;var h=new KeyboardEvent("keyup",{key:d[f],code:f});h.skipCheckAlt=!0,c.dispatchEvent(h)})}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.addEventListener(c,a,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.removeEventListener(c,a)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),i}();H.default=r},GABl:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GQ8N:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.toUnsigned32bit=I,H.toSigned32bit=v;function I(T){return T>>>0}function v(T){return T|0}},GRuw:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("lPiR"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.algo,s=g.SHA256,_=g.SHA224=s.extend({_doReset:function(){this._hash=new y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=s._doFinalize.call(this);return p.sigBytes-=4,p}});v.SHA224=s._createHelper(_),v.HmacSHA224=s._createHmacHelper(_)}(),I.SHA224})},GdRQ:function(j,H,b){"use strict";function I(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(w){return typeof w}:I=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},I(O)}Object.defineProperty(H,"__esModule",{value:!0}),H.isMac=c,H.isWindows=d,H.isIOS=f,H.isSafari=h,H.isIE=u,H.isEdge=E,H.isFirefox=x,H.hasScrollbarGutter=H.supportsImageMetadata=H.supportsCursorURIs=H.dragThreshold=H.isTouchDevice=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return T=function(){return O},O}function y(O){if(O&&O.__esModule)return O;if(O===null||I(O)!=="object"&&typeof O!="function")return{default:O};var C=T();if(C&&C.has(O))return C.get(O);var w={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in O)if(Object.prototype.hasOwnProperty.call(O,A)){var D=S?Object.getOwnPropertyDescriptor(O,A):null;D&&(D.get||D.set)?Object.defineProperty(w,A,D):w[A]=O[A]}return w.default=O,C&&C.set(O,w),w}var g="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;H.isTouchDevice=g,window.addEventListener("touchstart",function O(){H.isTouchDevice=g=!0,window.removeEventListener("touchstart",O,!1)},!1);var s=10*(window.devicePixelRatio||1);H.dragThreshold=s;var _=!1;try{var p=document.createElement("canvas");p.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',p.style.cursor.indexOf("url")===0?(v.Info("Data URI scheme cursor supported"),_=!0):v.Warn("Data URI scheme cursor not supported")}catch(O){v.Error("Data URI scheme cursor test exception: "+O)}var e=_;H.supportsCursorURIs=e;var o=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),o=!0}catch(O){}var n=o;H.supportsImageMetadata=n;var l=!0;try{var r=document.createElement("div");r.style.visibility="hidden",r.style.overflow="scroll",document.body.appendChild(r);var i=document.createElement("div");r.appendChild(i);var t=r.offsetWidth-i.offsetWidth;r.parentNode.removeChild(r),l=t!=0}catch(O){v.Error("Scrollbar test exception: "+O)}var a=l;H.hasScrollbarGutter=a;function c(){return navigator&&!!/mac/i.exec(navigator.platform)}function d(){return navigator&&!!/win/i.exec(navigator.platform)}function f(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function h(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function u(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function E(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function x(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},GfqC:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("TSYQ"),y=b.n(T);function g(F,U){var L="cannot "+F.method+" "+F.action+" "+U.status+"'",B=new Error(L);return B.status=U.status,B.method=F.method,B.url=F.action,B}function s(F){var U=F.responseText||F.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function _(F){var U=new XMLHttpRequest;F.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),F.onProgress(re)});var L=new FormData;F.data&&Object.keys(F.data).forEach(function(Z){var re=F.data[Z];if(Array.isArray(re)){re.forEach(function(he){L.append(Z+"[]",he)});return}L.append(Z,F.data[Z])}),F.file instanceof Blob?L.append(F.filename,F.file,F.file.name):L.append(F.filename,F.file),U.onerror=function(re){F.onError(re)},U.onload=function(){return U.status<200||U.status>=300?F.onError(g(F,U),s(U)):F.onSuccess(s(U),U)},U.open(F.method,F.action,!0),F.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var B=F.headers||{};return B["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(B).forEach(function(Z){B[Z]!==null&&U.setRequestHeader(Z,B[Z])}),U.send(L),{abort:function(){U.abort()}}}var p=+new Date,e=0;function o(){return"rc-upload-"+p+"-"+ ++e}function n(F,U){return F.indexOf(U,F.length-U.length)!==-1}var l=function(F,U){if(F&&U){var L=Array.isArray(U)?U:U.split(","),B=F.name||"",Z=F.type||"",re=Z.replace(/\/.*$/,"");return L.some(function(he){var Se=he.trim();return Se.charAt(0)==="."?n(B.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?re===Se.replace(/\/.*$/,""):Z===Se})}return!0};function r(F,U){var L=F.createReader(),B=[];function Z(){L.readEntries(function(re){var he=Array.prototype.slice.apply(re);B=B.concat(he);var Se=!he.length;Se?U(B):Z()})}Z()}var i=function(U,L,B){var Z=function re(he,Se){Se=Se||"",he.isFile?he.file(function(ke){B(ke)&&(he.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=he.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),L([ke]))}):he.isDirectory&&r(he,function(ke){ke.forEach(function(te){re(te,""+Se+he.name+"/")})})};U.forEach(function(re){Z(re.webkitGetAsEntry())})},t=i,a=Object.assign||function(F){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(F,B))continue;L[B]=F[B]}return L}function u(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")}function E(F,U){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:F}function x(F,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(F,U):F.__proto__=U)}var O=function(U){return Object.keys(U).reduce(function(L,B){return(B.substr(0,5)==="data-"||B.substr(0,5)==="aria-"||B==="role")&&(L[B]=U[B]),L},{})},C=function(F){x(U,F);function U(){var L,B,Z,re;u(this,U);for(var he=arguments.length,Se=Array(he),ke=0;ke1&&arguments[1]!==void 0?arguments[1]:{};return Object(g.f)("myshixuns/".concat(ie,"/repository.json"),q)}function S(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function A(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function D(ie){return Object(g.c)("myshixuns/".concat(ie,"/reset_pod.json"))}function M(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function N(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function P(ie){var q=ie.myshixunId;return delete ie.myshixunId,Object(g.c)("myshixuns/".concat(q,"/reset_pod.json"),Object(v.a)({game_id:ie.game_id},ie))}function z(ie){return Object(g.c)("tasks/".concat(ie,"/check_test_sets.json"))}function X(ie){return Object(g.c)("tasks/".concat(ie,"/get_answer_info.json"))}function k(ie){return Object(g.c)("tasks/".concat(ie,"/get_choose_answer.json"))}function F(ie){return Object(g.c)("tasks/".concat(ie,"/unlock_choose_answer.json"))}function U(ie,q){return Object(g.c)("tasks/".concat(ie,"/unlock_answer.json?answer_id=").concat(q))}function L(ie,q,Q){return Object(g.f)("tasks/".concat(ie,"/set_games_status.json"),{result:q,data:Q})}function B(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function Z(ie,q){return Object(g.a)("/api/myshixuns/".concat(ie,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:q}})}function re(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function he(ie,q){return Object(g.c)("tasks/".concat(ie,"/rank_list.json"),q)}function Se(ie,q){return Object(g.f)("tasks/".concat(ie,"/close_windows_vnc.json"),{tpi_id:q})}function ke(ie){return Object(g.c)("tasks/".concat(ie,"/pull_files.json"))}function te(ie,q){return Object(g.f)("tasks/".concat(ie,"/log_output"),q)}function Re(ie){return Object(g.c)("tasks/".concat(ie,"/stop_log_output.json"))}function Ce(ie){return pe.apply(this,arguments)}function pe(){return pe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/add_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),pe.apply(this,arguments)}function me(ie){return se.apply(this,arguments)}function se(){return se=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/delete_git_file.json"),{method:"Delete",body:q}));case 1:case"end":return Y.stop()}},ie)})),se.apply(this,arguments)}function be(ie){return ae.apply(this,arguments)}function ae(){return ae=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/mv_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),ae.apply(this,arguments)}function fe(ie){return Fe.apply(this,arguments)}function Fe(){return Fe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/tasks/".concat(q.id,"/rep_content.json"),{method:"get",params:q}));case 1:case"end":return Y.stop()}},ie)})),Fe.apply(this,arguments)}},Ib8C:function(j,H,b){(function(I){(function(v,T){j.exports=H=T()})(this,function(){var v=v||function(T,y){var g;if(typeof window!="undefined"&&window.crypto&&(g=window.crypto),typeof self!="undefined"&&self.crypto&&(g=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(g=globalThis.crypto),!g&&typeof window!="undefined"&&window.msCrypto&&(g=window.msCrypto),!g&&typeof I!="undefined"&&I.crypto&&(g=I.crypto),!g&&!0)try{g=b(4)}catch(f){}var s=function(){if(g){if(typeof g.getRandomValues=="function")try{return g.getRandomValues(new Uint32Array(1))[0]}catch(f){}if(typeof g.randomBytes=="function")try{return g.randomBytes(4).readInt32LE()}catch(f){}}throw new Error("Native crypto module could not be used to get secure random number.")},_=Object.create||function(){function f(){}return function(h){var u;return f.prototype=h,u=new f,f.prototype=null,u}}(),p={},e=p.lib={},o=e.Base=function(){return{extend:function(f){var h=_(this);return f&&h.mixIn(f),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var f=this.extend();return f.init.apply(f,arguments),f},init:function(){},mixIn:function(f){for(var h in f)f.hasOwnProperty(h)&&(this[h]=f[h]);f.hasOwnProperty("toString")&&(this.toString=f.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=e.WordArray=o.extend({init:function(f,h){f=this.words=f||[],h!=y?this.sigBytes=h:this.sigBytes=f.length*4},toString:function(f){return(f||r).stringify(this)},concat:function(f){var h=this.words,u=f.words,E=this.sigBytes,x=f.sigBytes;if(this.clamp(),E%4)for(var O=0;O>>2]>>>24-O%4*8&255;h[E+O>>>2]|=C<<24-(E+O)%4*8}else for(var w=0;w>>2]=u[w>>>2];return this.sigBytes+=x,this},clamp:function(){var f=this.words,h=this.sigBytes;f[h>>>2]&=4294967295<<32-h%4*8,f.length=T.ceil(h/4)},clone:function(){var f=o.clone.call(this);return f.words=this.words.slice(0),f},random:function(f){for(var h=[],u=0;u>>2]>>>24-x%4*8&255;E.push((O>>>4).toString(16)),E.push((O&15).toString(16))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E>>3]|=parseInt(f.substr(E,2),16)<<24-E%8*4;return new n.init(u,h/2)}},i=l.Latin1={stringify:function(f){for(var h=f.words,u=f.sigBytes,E=[],x=0;x>>2]>>>24-x%4*8&255;E.push(String.fromCharCode(O))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E>>2]|=(f.charCodeAt(E)&255)<<24-E%4*8;return new n.init(u,h)}},t=l.Utf8={stringify:function(f){try{return decodeURIComponent(escape(i.stringify(f)))}catch(h){throw new Error("Malformed UTF-8 data")}},parse:function(f){return i.parse(unescape(encodeURIComponent(f)))}},a=e.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(f){typeof f=="string"&&(f=t.parse(f)),this._data.concat(f),this._nDataBytes+=f.sigBytes},_process:function(f){var h,u=this._data,E=u.words,x=u.sigBytes,O=this.blockSize,C=O*4,w=x/C;f?w=T.ceil(w):w=T.max((w|0)-this._minBufferSize,0);var S=w*O,A=T.min(S*4,x);if(S){for(var D=0;Dthis.chunkSize&&(this.chunkSize=o,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=o;var n=(0,I.inflate)(this.strm,0);if(n<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=o)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,I.inflateReset)(this.strm)}}]),p}();H.default=_},IxHN:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("07cG"),y=b.n(T);H.a=function(g){var s=g.message,_=g.className,p=g.children,e=g.style,o=e===void 0?{}:e;return v.a.createElement("div",{className:"".concat(y.a.idsRingWrapper," ").concat(_)},v.a.createElement("div",{className:y.a.ldsRing},v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null)),s?v.a.createElement("p",{style:o},s):null,p)}},J66h:function(j,H,b){(function(I){var v,T;(function(y,g){j.exports=g(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof I!="undefined"?I:this,function(y){"use strict";y=y||{};var g=y.Base64,s="2.6.4",_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(P){for(var z={},X=0,k=P.length;X>>6)+e(128|z&63):e(224|z>>>12&15)+e(128|z>>>6&63)+e(128|z&63)}else{var z=65536+(P.charCodeAt(0)-55296)*1024+(P.charCodeAt(1)-56320);return e(240|z>>>18&7)+e(128|z>>>12&63)+e(128|z>>>6&63)+e(128|z&63)}},n=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(P){return P.replace(n,o)},r=function(P){var z=[0,2,1][P.length%3],X=P.charCodeAt(0)<<16|(P.length>1?P.charCodeAt(1):0)<<8|(P.length>2?P.charCodeAt(2):0),k=[_.charAt(X>>>18),_.charAt(X>>>12&63),z>=2?"=":_.charAt(X>>>6&63),z>=1?"=":_.charAt(X&63)];return k.join("")},i=y.btoa&&typeof y.btoa=="function"?function(P){return y.btoa(P)}:function(P){if(P.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return P.replace(/[\s\S]{1,3}/g,r)},t=function(P){return i(l(String(P)))},a=function(P){return P.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},c=function(P,z){return z?a(t(P)):t(P)},d=function(P){return c(P,!0)},f;y.Uint8Array&&(f=function(P,z){for(var X="",k=0,F=P.length;k>>18)+_.charAt(Z>>>12&63)+(typeof L!="undefined"?_.charAt(Z>>>6&63):"=")+(typeof B!="undefined"?_.charAt(Z&63):"=")}return z?a(X):X});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,u=function(P){switch(P.length){case 4:var z=(7&P.charCodeAt(0))<<18|(63&P.charCodeAt(1))<<12|(63&P.charCodeAt(2))<<6|63&P.charCodeAt(3),X=z-65536;return e((X>>>10)+55296)+e((X&1023)+56320);case 3:return e((15&P.charCodeAt(0))<<12|(63&P.charCodeAt(1))<<6|63&P.charCodeAt(2));default:return e((31&P.charCodeAt(0))<<6|63&P.charCodeAt(1))}},E=function(P){return P.replace(h,u)},x=function(P){var z=P.length,X=z%4,k=(z>0?p[P.charAt(0)]<<18:0)|(z>1?p[P.charAt(1)]<<12:0)|(z>2?p[P.charAt(2)]<<6:0)|(z>3?p[P.charAt(3)]:0),F=[e(k>>>16),e(k>>>8&255),e(k&255)];return F.length-=[0,0,2,1][X],F.join("")},O=y.atob&&typeof y.atob=="function"?function(P){return y.atob(P)}:function(P){return P.replace(/\S{1,4}/g,x)},C=function(P){return O(String(P).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(P){return E(O(P))},S=function(P){return String(P).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},A=function(P){return w(S(P))},D;y.Uint8Array&&(D=function(P){return Uint8Array.from(C(S(P)),function(z){return z.charCodeAt(0)})});var M=function(){var P=y.Base64;return y.Base64=g,P};if(y.Base64={VERSION:s,atob:C,btoa:i,fromBase64:A,toBase64:c,utob:l,encode:c,encodeURI:d,btou:E,decode:A,noConflict:M,fromUint8Array:f,toUint8Array:D},typeof Object.defineProperty=="function"){var N=function(P){return{value:P,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(P){return c(this,P)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return c(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),j.exports?j.exports.Base64=y.Base64:!(v=[],T=function(){return y.Base64}.apply(H,v),T!==void 0&&(j.exports=T)),{Base64:y.Base64}})}).call(this,b("IyRk"))},JSwD:function(j,H,b){"use strict";function I(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(d){return typeof d}:I=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},I(a)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=t;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var a=new WeakMap;return T=function(){return a},a}function y(a){if(a&&a.__esModule)return a;if(a===null||I(a)!=="object"&&typeof a!="function")return{default:a};var c=T();if(c&&c.has(a))return c.get(a);var d={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in a)if(Object.prototype.hasOwnProperty.call(a,h)){var u=f?Object.getOwnPropertyDescriptor(a,h):null;u&&(u.get||u.set)?Object.defineProperty(d,h,u):d[h]=a[h]}return d.default=a,c&&c.set(a,d),d}var g=15,s=852,_=592,p=0,e=1,o=2,n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function t(a,c,d,f,h,u,E,x){var O=x.bits,C=0,w=0,S=0,A=0,D=0,M=0,N=0,P=0,z=0,X=0,k,F,U,L,B,Z=null,re=0,he,Se=new v.Buf16(g+1),ke=new v.Buf16(g+1),te=null,Re=0,Ce,pe,me;for(C=0;C<=g;C++)Se[C]=0;for(w=0;w=1&&!(Se[A]!==0);A--);if(D>A&&(D=A),A===0)return h[u++]=1<<24|64<<16|0,h[u++]=1<<24|64<<16|0,x.bits=1,0;for(S=1;S0&&(a===p||A!==1))return-1;for(ke[1]=0,C=1;Cs||a===o&&z>_)return 1;for(;;){Ce=C-N,E[w]he?(pe=te[Re+E[w]],me=Z[re+E[w]]):(pe=32+64,me=0),k=1<>N)+F]=Ce<<24|pe<<16|me|0;while(F!==0);for(k=1<>=1;if(k!==0?(X&=k-1,X+=k):X=0,w++,--Se[C]===0){if(C===A)break;C=c[d+E[w]]}if(C>D&&(X&L)!==U){for(N===0&&(N=D),B+=S,M=C-N,P=1<s||a===o&&z>_)return 1;U=X&L,h[U]=D<<24|M<<16|B-u|0}}return X!==0&&(h[B+X]=C-N<<24|64<<16|0),x.bits=D,0}},JWDV:function(j,H,b){j.exports=b.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){function T(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}v.is=T;const y=Object.freeze([]);function g(){return y}v.empty=g;function*s(h){yield h}v.single=s;function _(h){return h||y}v.from=_;function p(h){return!h||h[Symbol.iterator]().next().done===!0}v.isEmpty=p;function e(h){return h[Symbol.iterator]().next().value}v.first=e;function o(h,u){for(const E of h)if(u(E))return!0;return!1}v.some=o;function n(h,u){for(const E of h)if(u(E))return E;return}v.find=n;function*l(h,u){for(const E of h)u(E)&&(yield E)}v.filter=l;function*r(h,u){let E=0;for(const x of h)yield u(x,E++)}v.map=r;function*i(...h){for(const u of h)for(const E of u)yield E}v.concat=i;function*t(h){for(const u of h)for(const E of u)yield E}v.concatNested=t;function a(h,u,E){let x=E;for(const O of h)x=u(x,O);return x}v.reduce=a;function*c(h,u,E=h.length){for(u<0&&(u+=h.length),E<0?E+=h.length:E>h.length&&(E=h.length);ux===O){const x=h[Symbol.iterator](),O=u[Symbol.iterator]();for(;;){const C=x.next(),w=O.next();if(C.done!==w.done)return!1;if(C.done)return!0;if(!E(C.value,w.value))return!1}}v.equals=f})(I||(I={}))},JeFH:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(j,H,b){j.exports=b.p+"static/qrcode.2267e4d5.png"},K3mO:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.MD5,p=s.EvpKDF=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,o){for(var n,l=this.cfg,r=l.hasher.create(),i=g.create(),t=i.words,a=l.keySize,c=l.iterations;t.length=0;y--)if(T[y>>>2]>>>24-y%4*8&255){v.sigBytes=y+1;break}}},I.pad.ZeroPadding})},LCi9:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(h,u){if(!(h instanceof u))throw new TypeError("Cannot call a class as a function")}function v(h,u){for(var E=0;E0&&Date.now()-this._tracked[0].started>t){this._state=y,this._ignored.push(E);return}if(this._waitingRelease){this._state=y,this._ignored.push(E);return}this._tracked.push({id:E,started:Date.now(),active:!0,firstX:x,firstY:O,lastX:x,lastY:O,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(g|p|e),this._stopLongpressTimeout();break;case 3:this._state&=~(s|o|n);break;default:this._state=y}}},{key:"_touchMove",value:function(E,x,O){var C=this._tracked.find(function(N){return N.id===E});if(C===void 0)return;C.lastX=x,C.lastY=O;var w=x-C.firstX,S=O-C.firstY;if((C.firstX!==C.lastX||C.firstY!==C.lastY)&&(C.angle=Math.atan2(S,w)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(w,S)r){var M=Math.abs(C.angle-A.angle);M=Math.abs((M+180)%360-180),M>i?this._state&=~o:this._state&=~n,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}},{key:"_touchEnd",value:function(E,x,O){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=l,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=y),!this._hasDetectedGesture()&&(this._state&=~(p|o|n),this._state&=~e,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(s|_);break;case 2:this._state&=~(g|_);break}}if(this._waitingRelease){Date.now()-this._releaseStart>t&&(this._state=y),this._tracked.some(function(S){return Date.now()-S.started>a})&&(this._state=y);var C=this._tracked.find(function(S){return S.id===E});if(C.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==y)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var w=0;w1&&arguments[1]!==void 0?arguments[1]:1,He=Ee.length,ve=0;ve1&&arguments[1]!==void 0?arguments[1]:!1;return Object(O.a)(L).map(function(Z,re){if(!g.isValidElement(Z)||!Z.type)return null;var he=Z.type.isSelectOptGroup,Se=Z.key,ke=Z.props,te=ke.children,Re=Object(_.a)(ke,["children"]);return B||!he?C(Z):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Se===null?re:Se,"__"),label:Se},Re),{},{options:w(te)})}).filter(function(Z){return Z})}var S=b("2Qr1"),A=b("qNPg"),D=b("U8pU"),M=b("Kwbf"),N=b("WKfj");function P(L){var B=L.mode,Z=L.options,re=L.children,he=L.backfill,Se=L.allowClear,ke=L.placeholder,te=L.getInputElement,Re=L.showSearch,Ce=L.onSearch,pe=L.defaultOpen,me=L.autoFocus,se=L.labelInValue,be=L.value,ae=L.inputValue,fe=L.optionLabelProp,Fe=B==="multiple"||B==="tags",ie=Re!==void 0?Re:Fe||B==="combobox",q=Z||w(re);if(Object(M.a)(B!=="tags"||q.every(function(le){return!le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),B==="tags"||B==="combobox"){var Q=q.some(function(le){return le.options?le.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in le?le.value:le.key)=="number"});Object(M.a)(!Q,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(B!=="combobox"||!fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(B==="combobox"||!he,"`backfill` only works with `combobox` mode."),Object(M.a)(B==="combobox"||!te,"`getInputElement` only work with `combobox` mode."),Object(M.b)(B!=="combobox"||!te||!Se||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ce&&!ie&&B!=="combobox"&&B!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!pe||me,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Y=Object(N.d)(be);Object(M.a)(!se||Y.every(function(le){return Object(D.a)(le)==="object"&&("key"in le||"value"in le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Fe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var oe=null;Object(O.a)(re).some(function(le){if(!g.isValidElement(le)||!le.type)return!1;var Ee=le.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Le=Object(O.a)(le.props.children).every(function(ge){return!g.isValidElement(ge)||!le.type||ge.type.isSelectOption?!0:(oe=ge.type,!1)});return!Le}return oe=Ee,!0}),oe&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(oe.displayName||oe.name||oe,"`.")),Object(M.a)(ae===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=P,X=Object(A.a)({prefixCls:"rc-select",components:{optionList:d},convertChildrenToData:w,flattenOptions:S.d,getLabeledValue:S.e,filterOptions:S.b,isValueDisabled:S.g,findValueOption:S.c,warningProps:z,fillOptionsWithMissingValue:S.a}),k=function(L){Object(T.a)(Z,L);var B=Object(y.a)(Z);function Z(){var re;return Object(I.a)(this,Z),re=B.apply(this,arguments),re.selectRef=g.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(v.a)(Z,[{key:"render",value:function(){return g.createElement(X,Object.assign({ref:this.selectRef},this.props))}}]),Z}(g.Component);k.Option=h,k.OptGroup=E;var F=k,U=H.c=F},Lmeb:function(j,H,b){},Lo0S:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.initLogging=s,H.getLogging=_,H.Error=H.Warn=H.Info=H.Debug=void 0;var I="warn",v=function(){};H.Debug=v;var T=function(){};H.Info=T;var y=function(){};H.Warn=y;var g=function(){};H.Error=g;function s(p){if(typeof p=="undefined"?p=I:I=p,H.Debug=v=H.Info=T=H.Warn=y=H.Error=g=function(){},typeof window.console!="undefined")switch(p){case"debug":H.Debug=v=console.debug.bind(window.console);case"info":H.Info=T=console.info.bind(window.console);case"warn":H.Warn=y=console.warn.bind(window.console);case"error":H.Error=g=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+p+"'")}}function _(){return I}s()},M8RZ:function(j,H,b){"use strict";b.d(H,"a",function(){return e});var I=b("fWQN"),v=b("mtLc"),T=b("yKVA"),y=b("879j"),g=b("q1tI"),s=b.n(g),_=b("i8i4"),p=b.n(_),e=function(o){Object(T.a)(l,o);var n=Object(y.a)(l);function l(r){var i;Object(I.a)(this,l),i=n.call(this,r);var t=window.document;return i.node=t.createElement("div"),t.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(_.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(s.a.Component)},MAU4:function(j,H,b){j.exports=b.p+"static/disappoint1.7e763f4d.svg"},MFOe:function(j,H,b){(function(I){var v=s(),T=_(),y=p(),g=typeof window!="undefined"?window:I;j.exports={assign:v,create:T,trim:y,bind:e,slice:o,each:n,map:l,pluck:r,isList:i,isFunction:t,isObject:a,Global:g};function s(){return Object.assign?Object.assign:function(d,f,h,u){for(var E=1;Ev.a.None;function t(P){return(z,X=null,k)=>{let F=!1,U;return U=P(L=>F?void 0:(U?U.dispose():F=!0,z.call(X,L)),null,k),F&&U.dispose(),U}}i.once=t;function a(P,z){return E((X,k=null,F)=>P(U=>X.call(k,z(U)),null,F))}i.map=a;function c(P,z){return E((X,k=null,F)=>P(U=>{z(U),X.call(k,U)},null,F))}i.forEach=c;function d(P,z){return E((X,k=null,F)=>P(U=>z(U)&&X.call(k,U),null,F))}i.filter=d;function f(P){return P}i.signal=f;function h(...P){return(z,X=null,k)=>Object(v.e)(...P.map(F=>F(U=>z.call(X,U),null,k)))}i.any=h;function u(P,z,X){let k=X;return a(P,F=>(k=z(k,F),k))}i.reduce=u;function E(P){let z;const X=new e({onFirstListenerAdd(){z=P(X.fire,X)},onLastListenerRemove(){z.dispose()}});return X.event}function x(P,z,X=100,k=!1,F){let U,L,B,Z=0;const re=new e({leakWarningThreshold:F,onFirstListenerAdd(){U=P(he=>{Z++,L=z(L,he),k&&!B&&(re.fire(L),L=void 0),clearTimeout(B),B=setTimeout(()=>{const Se=L;L=void 0,B=void 0,(!k||Z>1)&&re.fire(Se),Z=0},X)})},onLastListenerRemove(){U.dispose()}});return re.event}i.debounce=x;function O(P,z=(X,k)=>X===k){let X=!0,k;return d(P,F=>{const U=X||!z(F,k);return X=!1,k=F,U})}i.latch=O;function C(P,z){return[i.filter(P,z),i.filter(P,X=>!z(X))]}i.split=C;function w(P,z=!1,X=[]){let k=X.slice(),F=P(B=>{k?k.push(B):L.fire(B)});const U=()=>{k&&k.forEach(B=>L.fire(B)),k=null},L=new e({onFirstListenerAdd(){F||(F=P(B=>L.fire(B)))},onFirstListenerDidAdd(){k&&(z?setTimeout(U):U())},onLastListenerRemove(){F&&F.dispose(),F=null}});return L.event}i.buffer=w;class S{constructor(P){this.event=P}map(P){return new S(a(this.event,P))}forEach(P){return new S(c(this.event,P))}filter(P){return new S(d(this.event,P))}reduce(P,z){return new S(u(this.event,P,z))}latch(){return new S(O(this.event))}debounce(P,z=100,X=!1,k){return new S(x(this.event,P,z,X,k))}on(P,z,X){return this.event(P,z,X)}once(P,z,X){return t(this.event)(P,z,X)}}function A(P){return new S(P)}i.chain=A;function D(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.on(z,k),U=()=>P.removeListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromNodeEventEmitter=D;function M(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.addEventListener(z,k),U=()=>P.removeEventListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromDOMEventEmitter=M;function N(P){return new Promise(z=>t(P)(z))}i.toPromise=N})(g||(g={}));class s{constructor(i){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${i}_${s._idPool++}`}start(i){this._stopWatch=new y.a(!0),this._listenerCount=i}stop(){if(this._stopWatch){const i=this._stopWatch.elapsed();this._elapsedOverall+=i,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${i.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}s._idPool=0;let _=-1;class p{constructor(i,t=Math.random().toString(18).slice(2,5)){this.customThreshold=i,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(i){let t=_;if(typeof this.customThreshold=="number"&&(t=this.customThreshold),t<=0||i{const d=this._stacks.get(a)||0;this._stacks.set(a,d-1)}}}class e{constructor(i){var t;this._disposed=!1,this._options=i,this._leakageMon=_>0?new p(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((t=this._options)===null||t===void 0?void 0:t._profName)?new s(this._options._profName):void 0}get event(){return this._event||(this._event=(i,t,a)=>{var c;this._listeners||(this._listeners=new T.a);const d=this._listeners.isEmpty();d&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const f=this._listeners.push(t?[i,t]:i);d&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,i,t);const h=(c=this._leakageMon)===null||c===void 0?void 0:c.check(this._listeners.size),u=Object(v.i)(()=>{if(h&&h(),!this._disposed&&(f(),this._options&&this._options.onLastListenerRemove)){const E=this._listeners&&!this._listeners.isEmpty();E||this._options.onLastListenerRemove(this)}});return a instanceof v.b?a.add(u):Array.isArray(a)&&a.push(u),u}),this._event}fire(i){var t,a;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new T.a);for(let c of this._listeners)this._deliveryQueue.push([c,i]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[c,d]=this._deliveryQueue.shift();try{typeof c=="function"?c.call(void 0,d):c[0].call(c[1],d)}catch(f){Object(I.f)(f)}}(a=this._perfMon)===null||a===void 0||a.stop()}}dispose(){var i,t,a,c,d;this._disposed||(this._disposed=!0,(i=this._listeners)===null||i===void 0||i.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(c=(a=this._options)===null||a===void 0?void 0:a.onLastListenerRemove)===null||c===void 0||c.call(a),(d=this._leakageMon)===null||d===void 0||d.dispose())}}class o extends e{constructor(i){super(i);this._isPaused=0,this._eventQueue=new T.a,this._mergeFn=i==null?void 0:i.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const i=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(i))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(i){this._listeners&&(this._isPaused!==0?this._eventQueue.push(i):super.fire(i))}}class n extends o{constructor(i){var t;super(i);this._delay=(t=i.delay)!==null&&t!==void 0?t:100}fire(i){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(i)}}class l{constructor(){this.buffers=[]}wrapEvent(i){return(t,a,c)=>i(d=>{const f=this.buffers[this.buffers.length-1];f?f.push(()=>t.call(a,d)):t.call(a,d)},void 0,c)}bufferEvents(i){const t=[];this.buffers.push(t);const a=i();return this.buffers.pop(),t.forEach(c=>c()),a}}class r{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=v.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(i){this.inputEvent=i,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=i(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(j,H,b){"use strict";(function(I,v){b.d(H,"b",function(){return a}),b.d(H,"i",function(){return h}),b.d(H,"f",function(){return u}),b.d(H,"d",function(){return E}),b.d(H,"g",function(){return x}),b.d(H,"h",function(){return O}),b.d(H,"c",function(){return C}),b.d(H,"k",function(){return w}),b.d(H,"j",function(){return S}),b.d(H,"a",function(){return A}),b.d(H,"e",function(){return N});var T;const y="en";let g=!1,s=!1,_=!1,p=!1,e=!1,o=!1,n=!1,l,r=y,i,t;const a=typeof self=="object"?self:typeof I=="object"?I:{};let c;typeof a.vscode!="undefined"&&typeof a.vscode.process!="undefined"?c=a.vscode.process:typeof v!="undefined"&&(c=v);const d=typeof((T=c==null?void 0:c.versions)===null||T===void 0?void 0:T.electron)=="string"&&c.type==="renderer";if(typeof navigator=="object"&&!d)t=navigator.userAgent,g=t.indexOf("Windows")>=0,s=t.indexOf("Macintosh")>=0,n=(t.indexOf("Macintosh")>=0||t.indexOf("iPad")>=0||t.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_=t.indexOf("Linux")>=0,o=!0,l=navigator.language,r=l;else if(typeof c=="object"){g=c.platform==="win32",s=c.platform==="darwin",_=c.platform==="linux",p=_&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,l=y,r=y;const P=c.env.VSCODE_NLS_CONFIG;if(P)try{const z=JSON.parse(P),X=z.availableLanguages["*"];l=z.locale,r=X||y,i=z._translationsConfigFile}catch(z){}e=!0}else console.error("Unable to resolve platform.");let f=0;s?f=1:g?f=3:_&&(f=2);const h=g,u=s,E=_,x=e,O=o,C=n,w=t,S=function(){if(a.setImmediate)return a.setImmediate.bind(a);if(typeof a.postMessage=="function"&&!a.importScripts){let X=[];a.addEventListener("message",F=>{if(F.data&&F.data.vscodeSetImmediateId)for(let U=0,L=X.length;U{const U=++k;X.push({id:U,callback:F}),a.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(c==null?void 0:c.nextTick)=="function")return c.nextTick.bind(c);const z=Promise.resolve();return X=>z.then(X)}(),A=s||n?2:g?1:3;let D=!0,M=!1;function N(){if(!M){M=!0;const P=new Uint8Array(2);P[0]=1,P[1]=2;const z=new Uint16Array(P.buffer);D=z[0]===(2<<8)+1}return D}}).call(this,b("IyRk"),b("Q2Ig"))},MZdM:function(j,H,b){"use strict";function I(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(t){return typeof t}:I=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(r)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=p(b("Lo0S")),T=s(b("N/zr")),y=b("GdRQ"),g=b("GQ8N");function s(r){return r&&r.__esModule?r:{default:r}}function _(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return _=function(){return r},r}function p(r){if(r&&r.__esModule)return r;if(r===null||I(r)!=="object"&&typeof r!="function")return{default:r};var i=_();if(i&&i.has(r))return i.get(r);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)){var d=a?Object.getOwnPropertyDescriptor(r,c):null;d&&(d.get||d.set)?Object.defineProperty(t,c,d):t[c]=r[c]}return t.default=r,i&&i.set(r,t),t}function e(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var t=0;t> Display.constructor"),this._target=i,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},v.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),v.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return n(r,[{key:"viewportChangePos",value:function(t,a){var c=this._viewportLoc;t=Math.floor(t),a=Math.floor(a),this._clipViewport||(t=-c.w,a=-c.h);var d=c.x+c.w-1,f=c.y+c.h-1;if(t<0&&c.x+t<0&&(t=-c.x),d+t>=this._fbWidth&&(t-=d+t-this._fbWidth+1),c.y+a<0&&(a=-c.y),f+a>=this._fbHeight&&(a-=f+a-this._fbHeight+1),t===0&&a===0)return;v.Debug("viewportChange deltaX: "+t+", deltaY: "+a),c.x+=t,c.y+=a,this._damage(c.x,c.y,c.w,c.h),this.flip()}},{key:"viewportChangeSize",value:function(t,a){(!this._clipViewport||typeof t=="undefined"||typeof a=="undefined")&&(v.Debug("Setting viewport to full display region"),t=this._fbWidth,a=this._fbHeight),t=Math.floor(t),a=Math.floor(a),t>this._fbWidth&&(t=this._fbWidth),a>this._fbHeight&&(a=this._fbHeight);var c=this._viewportLoc;if(c.w!==t||c.h!==a){c.w=t,c.h=a;var d=this._target;d.width=t,d.height=a,this.viewportChangePos(0,0),this._damage(c.x,c.y,c.w,c.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(t,a){this._prevDrawStyle="",this._fbWidth=t,this._fbHeight=a;var c=this._backbuffer;if(c.width!==t||c.height!==a){var d=null;c.width>0&&c.height>0&&(d=this._drawCtx.getImageData(0,0,c.width,c.height)),c.width!==t&&(c.width=t),c.height!==a&&(c.height=a),d&&this._drawCtx.putImageData(d,0,0)}var f=this._viewportLoc;this.viewportChangeSize(f.w,f.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(t,a,c,d){tthis._damageBounds.right&&(this._damageBounds.right=t+c),a+d>this._damageBounds.bottom&&(this._damageBounds.bottom=a+d)}},{key:"flip",value:function(t){if(this._renderQ.length!==0&&!t)this._renderQPush({type:"flip"});else{var a=this._damageBounds.left,c=this._damageBounds.top,d=this._damageBounds.right-a,f=this._damageBounds.bottom-c,h=a-this._viewportLoc.x,u=c-this._viewportLoc.y;h<0&&(d+=h,a-=h,h=0),u<0&&(f+=u,c-=u,u=0),h+d>this._viewportLoc.w&&(d=this._viewportLoc.w-h),u+f>this._viewportLoc.h&&(f=this._viewportLoc.h-u),d>0&&f>0&&this._targetCtx.drawImage(this._backbuffer,a,c,d,f,h,u,d,f),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(t,a,c,d,f,h){this._renderQ.length!==0&&!h?this._renderQPush({type:"fill",x:t,y:a,width:c,height:d,color:f}):(this._setFillColor(f),this._drawCtx.fillRect(t,a,c,d),this._damage(t,a,c,d))}},{key:"copyImage",value:function(t,a,c,d,f,h,u){this._renderQ.length!==0&&!u?this._renderQPush({type:"copy",oldX:t,oldY:a,x:c,y:d,width:f,height:h}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,t,a,f,h,c,d,f,h),this._damage(c,d,f,h))}},{key:"imageRect",value:function(t,a,c,d,f,h){if(c===0||d===0)return;var u=new Image;u.src="data: "+f+";base64,"+T.default.encode(h),this._renderQPush({type:"img",img:u,x:t,y:a,width:c,height:d})}},{key:"startTile",value:function(t,a,c,d,f){this._tileX=t,this._tileY=a,c===16&&d===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(c,d);for(var h=f[2],u=f[1],E=f[0],x=this._tile.data,O=0;O=f?c=t/d.w:c=a/d.h}this._rescale(c)}},{key:"_rescale",value:function(t){this._scale=t;var a=this._viewportLoc,c=t*a.w+"px",d=t*a.h+"px";(this._target.style.width!==c||this._target.style.height!==d)&&(this._target.style.width=c,this._target.style.height=d)}},{key:"_setFillColor",value:function(t){var a="rgb("+t[2]+","+t[1]+","+t[0]+")";a!==this._prevDrawStyle&&(this._drawCtx.fillStyle=a,this._prevDrawStyle=a)}},{key:"_rgbImageData",value:function(t,a,c,d,f,h){for(var u=this._drawCtx.createImageData(c,d),E=u.data,x=0,O=h;x0;){var a=this._renderQ[0];switch(a.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(a.oldX,a.oldY,a.x,a.y,a.width,a.height,!0);break;case"fill":this.fillRect(a.x,a.y,a.width,a.height,a.color,!0);break;case"blit":this.blitImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgb":this.blitRgbImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"img":if(a.img.complete&&a.img.width!==0&&a.img.height!==0){if(a.img.width!==a.width||a.img.height!==a.height){v.Error("Decoded image has incorrect dimensions. Got "+a.img.width+"x"+a.img.height+". Expected "+a.width+"x"+a.height+".");return}this.drawImage(a.img,a.x,a.y)}else a.img._noVNCDisplay=this,a.img.addEventListener("load",this._resumeRenderQ),t=!1;break}t&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(t){this._rescale(t)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(t){this._clipViewport=t;var a=this._viewportLoc;this.viewportChangeSize(a.w,a.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),r}();H.default=l},MlIO:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=T.x64={},p=_.Word=g.extend({init:function(o,n){this.high=o,this.low=n}}),e=_.WordArray=g.extend({init:function(o,n){o=this.words=o||[],n!=v?this.sigBytes=n:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,n=o.length,l=[],r=0;r=0;t--)i+=this._rQ[this._rQi++]<1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+r,i-r)}},{key:"rQwait",value:function(r,i,t){if(this.rQlen0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(r){this._sQ.set(r,this._sQlen),this._sQlen+=r.length,this.flush()}},{key:"sendString",value:function(r){this.send(r.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(r){this._eventHandlers[r]=function(){}}},{key:"on",value:function(r,i){this._eventHandlers[r]=i}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(r,i){var t=this;this.init(),this._websocket=new WebSocket(r,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){v.Debug(">> WebSock.onopen"),t._websocket.protocol&&v.Info("Server choose sub-protocol: "+t._websocket.protocol),t._eventHandlers.open(),v.Debug("<< WebSock.onopen")},this._websocket.onclose=function(a){v.Debug(">> WebSock.onclose"),t._eventHandlers.close(a),v.Debug("<< WebSock.onclose")},this._websocket.onerror=function(a){v.Debug(">> WebSock.onerror: "+a),t._eventHandlers.error(a),v.Debug("<< WebSock.onerror: "+a)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(v.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(r){var i=(this._rQlen-this._rQi+r)*8,t=this._rQbufferSizee&&(this._rQbufferSize=e,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.length}},{key:"_recvMessage",value:function(r){this._DecodeMessage(r.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):v.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(r){this._rQi=r}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),n}();H.default=o},"N/zr":function(j,H,b){"use strict";function I(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(p){return typeof p}:I=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},I(s)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var s=new WeakMap;return T=function(){return s},s}function y(s){if(s&&s.__esModule)return s;if(s===null||I(s)!=="object"&&typeof s!="function")return{default:s};var _=T();if(_&&_.has(s))return _.get(s);var p={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in s)if(Object.prototype.hasOwnProperty.call(s,o)){var n=e?Object.getOwnPropertyDescriptor(s,o):null;n&&(n.get||n.set)?Object.defineProperty(p,o,n):p[o]=s[o]}return p.default=s,_&&_.set(s,p),p}var g={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(_){"use strict";for(var p="",e=_.length,o=e%3,n=0;n>2],p+=this.toBase64Table[((_[n]&3)<<4)+(_[n+1]>>4)],p+=this.toBase64Table[((_[n+1]&15)<<2)+(_[n+2]>>6)],p+=this.toBase64Table[_[n+2]&63];var l=e-o;return o===2?(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[((_[l]&3)<<4)+(_[l+1]>>4)],p+=this.toBase64Table[(_[l+1]&15)<<2],p+=this.toBase64Table[64]):o===1&&(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[(_[l]&3)<<4],p+=this.toBase64Table[64],p+=this.toBase64Table[64]),p},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=_.indexOf("=")-p;e<0&&(e=_.length-p);for(var o=(e>>2)*3+Math.floor(e%4/1.5),n=new Array(o),l=0,r=0,i=0,t=p;t<_.length;t++){var a=this.toBinaryTable[_.charCodeAt(t)&127],c=_.charAt(t)===this.base64Pad;if(a===-1){v.Error("Illegal character code "+_.charCodeAt(t)+" at position "+t);continue}r=r<<6|a,l+=6,l>=8&&(l-=8,c||(n[i++]=r>>l&255),r&=(1<=oe.length?le:oe[Le]})}function y(Y){return Y.replace(/[<>&]/g,function(oe){switch(oe){case"<":return"<";case">":return">";case"&":return"&";default:return oe}})}function g(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function s(Y,oe=" "){const le=_(Y,oe);return p(le,oe)}function _(Y,oe){if(!Y||!oe)return Y;const le=oe.length;if(le===0||Y.length===0)return Y;let Ee=0;for(;Y.indexOf(oe,Ee)===Ee;)Ee=Ee+le;return Y.substring(Ee)}function p(Y,oe){if(!Y||!oe)return Y;const le=oe.length,Ee=Y.length;if(le===0||Ee===0)return Y;let Le=Ee,ge=-1;for(;!(ge=Y.lastIndexOf(oe,Le-1),ge===-1||ge+le!==Le);){if(ge===0)return"";Le=ge}return Y.substring(0,Le)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function o(Y){return Y.replace(/\*/g,"")}function n(Y,oe,le={}){if(!Y)throw new Error("Cannot create regex from empty string");oe||(Y=g(Y)),le.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let Ee="";return le.global&&(Ee+="g"),le.matchCase||(Ee+="i"),le.multiline&&(Ee+="m"),le.unicode&&(Ee+="u"),new RegExp(Y,Ee)}function l(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const oe=Y.exec("");return!!(oe&&Y.lastIndex===0)}function r(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function i(Y){return Y.split(/\r\n|\r|\n/)}function t(Y){for(let oe=0,le=Y.length;oe=0;le--){const Ee=Y.charCodeAt(le);if(Ee!==32&&Ee!==9)return le}return-1}function d(Y,oe){return Yoe?1:0}function f(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;lett)return 1}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function h(Y,oe){return u(Y,oe,0,Y.length,0,oe.length)}function u(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;le=128||tt>=128)return f(Y.toLowerCase(),oe.toLowerCase(),le,Ee,Le,ge);E(Xe)&&(Xe-=32),E(tt)&&(tt-=32);const Ge=Xe-tt;if(Ge===0)continue;return Ge}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function E(Y){return Y>=97&&Y<=122}function x(Y){return Y>=65&&Y<=90}function O(Y,oe){return Y.length===oe.length&&u(Y,oe)===0}function C(Y,oe){const le=oe.length;return oe.length>Y.length?!1:u(Y,oe,0,le)===0}function w(Y,oe){let le,Ee=Math.min(Y.length,oe.length);for(le=0;le1){const Ee=Y.charCodeAt(oe-2);if(A(Ee))return M(Ee,le)}return le}function z(Y,oe){const le=ae.getInstance(),Ee=oe,Le=Y.length,ge=N(Y,Le,oe);oe+=ge>=65536?2:1;let De=le.getGraphemeBreakType(ge);for(;oe=65536?2:1,De=Xe}return oe-Ee}function X(Y,oe){const le=ae.getInstance(),Ee=oe,Le=P(Y,oe);oe-=Le>=65536?2:1;let ge=le.getGraphemeBreakType(Le);for(;oe>0;){const De=P(Y,oe),_e=le.getGraphemeBreakType(De);if(be(_e,ge))break;oe-=De>=65536?2:1,ge=_e}return Ee-oe}const k=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function F(Y){return k.test(Y)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(Y){return U.test(Y)}const B=/^[\t\n\r\x20-\x7E]*$/;function Z(Y){return B.test(Y)}const re=/[\u2028\u2029]/;function he(Y){return re.test(Y)}function Se(Y){for(let oe=0,le=Y.length;oe=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function te(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const Re=String.fromCharCode(65279);function Ce(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function pe(Y,oe=!1){return Y?(oe&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function me(Y){const oe=90-65+1;return Y=Y%(2*oe),Yoe[3*Ee+1])Ee=2*Ee+1;else return oe[3*Ee+2];return 0}}ae._INSTANCE=null;function fe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Fe(Y,oe){if(Y===0)return 0;const le=ie(Y,oe);if(le!==void 0)return le;const Ee=P(oe,Y);return Y-=q(Ee),Y}function ie(Y,oe){let le=P(oe,Y);for(Y-=q(le);Q(le)||le===65039||le===8419;){if(Y===0)return;le=P(oe,Y),Y-=q(le)}if(!te(le))return;if(Y>=0){const Ee=P(oe,Y);Ee===8205&&(Y-=q(Ee))}return Y}function q(Y){return Y>=65536?2:1}function Q(Y){return 127995<=Y&&Y<=127999}},NBmB:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.encodingName=v,H.encodings=void 0;var I={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};H.encodings=I;function v(T){switch(T){case I.encodingRaw:return"Raw";case I.encodingCopyRect:return"CopyRect";case I.encodingRRE:return"RRE";case I.encodingHextile:return"Hextile";case I.encodingTight:return"Tight";case I.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+T+"]"}}},NFKh:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"),b("F+F2"),b("qM6L"),b("ETIr"),b("wbyO"),b("cv67"),b("3y9D"),b("lPiR"),b("GRuw"),b("1uat"),b("uGsb"),b("5hvy"),b("ELcG"),b("WYAk"),b("e7zE"),b("K3mO"),b("OLod"),b("ALsQ"),b("9OqN"),b("qu8F"),b("S6kV"),b("gb/T"),b("qBft"),b("oRuE"),b("jO9C"),b("KmYQ"),b("uGxW"),b("bQjk"),b("wZgz"),b("pA7S"),b("w7YG"),b("E4JC"),b("PVpz"))})(this,function(I){return I})},NLgs:function(j,H,b){"use strict";b.d(H,"e",function(){return c}),b.d(H,"f",function(){return d}),b.d(H,"d",function(){return h}),b.d(H,"c",function(){return u}),b.d(H,"a",function(){return E}),b.d(H,"b",function(){return x});var I=b("miYZ"),v=b("tsqr"),T=b("9og8"),y=b("2qtc"),g=b("kLXV"),s=b("WmNS"),_=b.n(s),p=b("q1tI"),e=b.n(p),o=b("9kvl"),n=b("xKgJ"),l=b("1vsH"),r=b("RCxd"),i=b("yTi+"),t=b.n(i),a=b("m3rI"),c=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(d(C)&&f(w))},d=function(C){return Object(n.p)()?!0:(C({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},f=function(){var C,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,S=Object(o.c)()._store.getState(),A=S.user;return(C=A.userInfo)!==null&&C!==void 0&&C.profile_completed?!0:(g.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:w?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){o.d.push("/account/profile/edit")}}),!1)},h=function(){var C,w=Object(o.c)()._store.getState(),S=w.user;return(C=S.userInfo)!==null&&C!==void 0&&C.professional_certification?!0:(g.a.confirm({title:"\u63D0\u793A",centered:!0,content:e.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(l.S)("/account/certification")}}),!1)},u=function(){var C;if(Object(n.a)())return!0;var w=Object(o.c)()._store.getState(),S=w.user,A=w.globalSetting;return g.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),e.a.createElement("img",{src:a.a.IMG_SERVER+(A==null||((C=A.setting)===null||C===void 0)?void 0:C.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},E=function(C,w){var S;if(C)return!0;var A=Object(o.c)()._store.getState(),D=A.user,M=A.globalSetting;return g.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("p",null,w||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),e.a.createElement("div",{style:{marginLeft:"110px"}},e.a.createElement("img",{src:a.a.IMG_SERVER+(M==null||((S=M.setting)===null||S===void 0)?void 0:S.authority_qrcode_url),width:200}),e.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(l.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},x=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",S=Object(o.c)()._store.getState(),A=S.shixunsDetail.detail;return(A==null?void 0:A.public)===2||(A==null?void 0:A.public)===1||(A==null?void 0:A.shixun_status)===3?(g.a.info({centered:!0,icon:e.a.createElement(r.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(A==null?void 0:A.public)===2?"\u5DF2\u516C\u5F00":(A==null?void 0:A.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",w,"\u3002"),e.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),e.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:t.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(A==null?void 0:A.shixun_status)===2?(g.a.confirm({centered:!0,icon:e.a.createElement(r.a,null),title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",w,"\u3002"),e.a.createElement("br",null),e.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){g.a.confirm({width:440,centered:!0,icon:e.a.createElement(r.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var M=Object(T.a)(_.a.mark(function P(){var z;return _.a.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,C({type:"shixunsDetail/cancelRelease",payload:{id:A==null?void 0:A.identifier}});case 2:z=k.sent,z.status!==401&&(v.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),C({type:"shixunsDetail/getShixunsDetail",payload:{id:A==null?void 0:A.identifier}}),C({type:"practiceSetting/getCommonData",payload:{id:A==null?void 0:A.identifier}}));case 4:case"end":return k.stop()}},P)}));function N(){return M.apply(this,arguments)}return N}()})}}),!0):!1}},Nmxd:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NvD2:function(j,H,b){"use strict";b.d(H,"a",function(){return s});var I=b("Kwbf");function v(_,p){var e=new Set;return _.forEach(function(o){p.has(o)||e.add(o)}),e}function T(_){var p=_||{},e=p.disabled,o=p.disableCheckbox,n=p.checkable;return!!(e||o)||n===!1}function y(_,p,e,o){for(var n=new Set(_),l=new Set,r=0;r<=e;r+=1){var i=p.get(r)||new Set;i.forEach(function(d){var f=d.key,h=d.node,u=d.children,E=u===void 0?[]:u;n.has(f)&&!o(h)&&E.filter(function(x){return!o(x.node)}).forEach(function(x){n.add(x.key)})})}for(var t=new Set,a=e;a>=0;a-=1){var c=p.get(a)||new Set;c.forEach(function(d){var f=d.parent,h=d.node;if(o(h)||!d.parent||t.has(d.parent.key))return;if(o(d.parent.node)){t.add(f.key);return}var u=!0,E=!1;(f.children||[]).filter(function(x){return!o(x.node)}).forEach(function(x){var O=x.key,C=n.has(O);u&&!C&&(u=!1),!E&&(C||l.has(O))&&(E=!0)}),u&&n.add(f.key),E&&l.add(f.key),t.add(f.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(v(l,n))}}function g(_,p,e,o,n){for(var l=new Set(_),r=new Set(p),i=0;i<=o;i+=1){var t=e.get(i)||new Set;t.forEach(function(f){var h=f.key,u=f.node,E=f.children,x=E===void 0?[]:E;!l.has(h)&&!r.has(h)&&!n(u)&&x.filter(function(O){return!n(O.node)}).forEach(function(O){l.delete(O.key)})})}r=new Set;for(var a=new Set,c=o;c>=0;c-=1){var d=e.get(c)||new Set;d.forEach(function(f){var h=f.parent,u=f.node;if(n(u)||!f.parent||a.has(f.parent.key))return;if(n(f.parent.node)){a.add(h.key);return}var E=!0,x=!1;(h.children||[]).filter(function(O){return!n(O.node)}).forEach(function(O){var C=O.key,w=l.has(C);E&&!w&&(E=!1),!x&&(w||r.has(C))&&(x=!0)}),E||l.delete(h.key),x&&r.add(h.key),a.add(h.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function s(_,p,e,o){var n=[],l;o?l=o:l=T;var r=new Set(_.filter(function(c){var d=!!e[c];return d||n.push(c),d})),i=new Map,t=0;Object.keys(e).forEach(function(c){var d=e[c],f=d.level,h=i.get(f);h||(h=new Set,i.set(f,h)),h.add(d),t=Math.max(t,f)}),Object(I.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var a;return p===!0?a=y(r,i,t,l):a=g(r,p.halfCheckedKeys,i,t,l),a}},OLES:function(j,H,b){"use strict";var I=b("U8pU"),v=b("VTBJ"),T=b("Ff2n"),y=b("q1tI"),g=b("uciX"),s=b("7ixt"),_=function(r){var i=r.overlay,t=r.prefixCls,a=r.id,c=r.overlayInnerStyle;return y.createElement("div",{className:"".concat(t,"-inner"),id:a,role:"tooltip",style:c},typeof i=="function"?i():i)},p=_,e=function(r,i){var t=r.overlayClassName,a=r.trigger,c=a===void 0?["hover"]:a,d=r.mouseEnterDelay,f=d===void 0?0:d,h=r.mouseLeaveDelay,u=h===void 0?.1:h,E=r.overlayStyle,x=r.prefixCls,O=x===void 0?"rc-tooltip":x,C=r.children,w=r.onVisibleChange,S=r.afterVisibleChange,A=r.transitionName,D=r.animation,M=r.placement,N=M===void 0?"right":M,P=r.align,z=P===void 0?{}:P,X=r.destroyTooltipOnHide,k=X===void 0?!1:X,F=r.defaultVisible,U=r.getTooltipContainer,L=r.overlayInnerStyle,B=Object(T.a)(r,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Z=Object(y.useRef)(null);Object(y.useImperativeHandle)(i,function(){return Z.current});var re=Object(v.a)({},B);"visible"in r&&(re.popupVisible=r.visible);var he=function(){var Ce=r.arrowContent,pe=Ce===void 0?null:Ce,me=r.overlay,se=r.id;return[y.createElement("div",{className:"".concat(O,"-arrow"),key:"arrow"},pe),y.createElement(p,{key:"content",prefixCls:O,id:se,overlay:me,overlayInnerStyle:L})]},Se=!1,ke=!1;if(typeof k=="boolean")Se=k;else if(k&&Object(I.a)(k)==="object"){var te=k.keepParent;Se=te===!0,ke=te===!1}return y.createElement(g.a,Object.assign({popupClassName:t,prefixCls:O,popup:he,action:c,builtinPlacements:s.a,popupPlacement:N,ref:Z,popupAlign:z,getPopupContainer:U,onPopupVisibleChange:w,afterPopupVisibleChange:S,popupTransitionName:A,popupAnimation:D,defaultPopupVisible:F,destroyPopupOnHide:Se,autoDestroy:ke,mouseLeaveDelay:u,popupStyle:E,mouseEnterDelay:f},re),C)},o=Object(y.forwardRef)(e),n=H.a=o},OLod:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("K3mO"))})(this,function(I){I.lib.Cipher||function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=y.BufferedBlockAlgorithm,p=T.enc,e=p.Utf8,o=p.Base64,n=T.algo,l=n.EvpKDF,r=y.Cipher=_.extend({cfg:g.extend(),createEncryptor:function(A,D){return this.create(this._ENC_XFORM_MODE,A,D)},createDecryptor:function(A,D){return this.create(this._DEC_XFORM_MODE,A,D)},init:function(A,D,M){this.cfg=this.cfg.extend(M),this._xformMode=A,this._key=D,this.reset()},reset:function(){_.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var D=this._doFinalize();return D},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function A(D){return typeof D=="string"?S:O}return function(D){return{encrypt:function(M,N,P){return A(N).encrypt(D,M,N,P)},decrypt:function(M,N,P){return A(N).decrypt(D,M,N,P)}}}}()}),i=y.StreamCipher=r.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1}),t=T.mode={},a=y.BlockCipherMode=g.extend({createEncryptor:function(A,D){return this.Encryptor.create(A,D)},createDecryptor:function(A,D){return this.Decryptor.create(A,D)},init:function(A,D){this._cipher=A,this._iv=D}}),c=t.CBC=function(){var A=a.extend();A.Encryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize;D.call(this,M,N,z),P.encryptBlock(M,N),this._prevBlock=M.slice(N,N+z)}}),A.Decryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize,X=M.slice(N,N+z);P.decryptBlock(M,N),D.call(this,M,N,z),this._prevBlock=X}});function D(M,N,P){var z,X=this._iv;X?(z=X,this._iv=v):z=this._prevBlock;for(var k=0;k>>2]&255;A.sigBytes-=D}},h=y.BlockCipher=r.extend({cfg:r.cfg.extend({mode:c,padding:f}),reset:function(){var A;r.reset.call(this);var D=this.cfg,M=D.iv,N=D.mode;this._xformMode==this._ENC_XFORM_MODE?A=N.createEncryptor:(A=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,M&&M.words):(this._mode=A.call(N,this,M&&M.words),this._mode.__creator=A)},_doProcessBlock:function(A,D){this._mode.processBlock(A,D)},_doFinalize:function(){var A,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),D.unpad(A)),A},blockSize:128/32}),u=y.CipherParams=g.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),E=T.format={},x=E.OpenSSL={stringify:function(A){var D,M=A.ciphertext,N=A.salt;return N?D=s.create([1398893684,1701076831]).concat(N).concat(M):D=M,D.toString(o)},parse:function(A){var D,M=o.parse(A),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(D=s.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),u.create({ciphertext:M,salt:D})}},O=y.SerializableCipher=g.extend({cfg:g.extend({format:x}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=A.createEncryptor(M,N),z=P.finalize(D),X=P.cfg;return u.create({ciphertext:z,key:M,iv:X.iv,algorithm:A,mode:X.mode,padding:X.padding,blockSize:A.blockSize,formatter:N.format})},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=A.createDecryptor(M,N).finalize(D.ciphertext);return P},_parse:function(A,D){return typeof A=="string"?D.parse(A,this):A}}),C=T.kdf={},w=C.OpenSSL={execute:function(A,D,M,N){N||(N=s.random(64/8));var P=l.create({keySize:D+M}).compute(A,N),z=s.create(P.words.slice(D),M*4);return P.sigBytes=D*4,u.create({key:P,iv:z,salt:N})}},S=y.PasswordBasedCipher=O.extend({cfg:O.cfg.extend({kdf:w}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=N.kdf.execute(M,A.keySize,A.ivSize);N.iv=P.iv;var z=O.encrypt.call(this,A,D,P.key,N);return z.mixIn(P),z},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=N.kdf.execute(M,A.keySize,A.ivSize,D.salt);N.iv=P.iv;var z=O.decrypt.call(this,A,D,P.key,N);return z}})}()})},OZM5:function(j,H,b){"use strict";b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"k",function(){return l}),b.d(H,"h",function(){return r}),b.d(H,"i",function(){return i}),b.d(H,"g",function(){return t}),b.d(H,"c",function(){return a}),b.d(H,"d",function(){return c}),b.d(H,"j",function(){return h}),b.d(H,"e",function(){return u}),b.d(H,"f",function(){return E});var I=b("KQm4"),v=b("U8pU"),T=b("Ff2n"),y=b("q1tI"),g=b.n(y),s=b("Kwbf"),_=b("WaYH"),p=.25,e=2;function o(x,O){var C=x.slice(),w=C.indexOf(O);return w>=0&&C.splice(w,1),C}function n(x,O){var C=x.slice();return C.indexOf(O)===-1&&C.push(O),C}function l(x){return x.split("-")}function r(x,O){return"".concat(x,"-").concat(O)}function i(x){return x&&x.type&&x.type.isTreeNode}function t(x,O){var C=[x],w=O[x];function S(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(D){var M=D.key,N=D.children;C.push(M),S(N)})}return S(w.children),C}function a(x,O){var C=x.clientY,w=O.selectHandle.getBoundingClientRect(),S=w.top,A=w.bottom,D=w.height,M=Math.max(D*p,e);return C<=S+M?-1:C>=A-M?1:0}function c(x,O){if(!x)return;var C=O.multiple;return C?x.slice():x.length?[x[0]]:x}var d=function(O){return O};function f(x,O){if(!x)return[];var C=O||{},w=C.processProps,S=w===void 0?d:w,A=Array.isArray(x)?x:[x];return A.map(function(D){var M=D.children,N=Object(T.a)(D,["children"]),P=f(M,O);return g.a.createElement(_.a,Object.assign({},S(N)),P)})}function h(x){if(!x)return null;var O;if(Array.isArray(x))O={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(v.a)(x)==="object")O={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return O}function u(x,O){var C=new Set;function w(S){if(C.has(S))return;var A=O[S];if(!A)return;C.add(S);var D=A.parent,M=A.node;if(M.disabled)return;D&&w(D.key)}return(x||[]).forEach(function(S){w(S)}),Object(I.a)(C)}function E(x){var O={};return Object.keys(x).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(O[C]=x[C])}),O}},Ohmc:function(j,H,b){j.exports=b.p+"static/certificate.fc32dc1b.jpg"},OoWo:function(j,H,b){},Ot1p:function(j,H,b){"use strict";var I=b("2qtc"),v=b("kLXV"),T=b("rAM+"),y=b("miYZ"),g=b("tsqr"),s=b("9og8"),_=b("tJVT"),p=b("jrin"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("VrN/"),i=b.n(r),t=b("bdgK"),a=b("p77/"),c=b("Bd2K"),d=b("ELLl"),f=b("19Vz"),h=b("lZu9"),u=b("+NIl"),E=b("kSUc"),x=b("9Bee"),O=function(Qe){var ne=Qe.value,Ze=ne===void 0?"":ne,lt=Qe.className,Be=Qe.showTextOnly,$e=Qe.showLines,it=Qe.style,wt=it===void 0?{}:it,pt=Object(n.useMemo)(function(){return""},[Ze]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:pt}}))},C=b("0Owb"),w=b("dejd"),S=b("C+DQ"),A=b("1vsH"),D=b("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function N(Qe){var ne=Qe.onActionCallback,Ze=Qe.title,lt=Qe.icon,Be=Qe.actionName,$e=Qe.className,it=$e===void 0?"":$e,wt=Qe.children;function pt(){ne(Be)}return l.a.createElement("a",{title:Ze,className:it,onClick:pt},l.a.createElement("i",{className:"md-iconfont ".concat(lt)}),wt)}var P=function(Qe){var ne=Qe.watch,Ze=Qe.showNullButton,lt=Qe.onActionCallback,Be=Qe.fullScreen,$e=Qe.insertTemp,it=Qe.hidetoolBar,wt=Qe.uuid,pt=Qe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(A.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(A.F)("_educoder_session"),"&key=").concat(wt,"&api=").concat(encodeURIComponent(D.a.PROXY_SERVER)));var st=[].concat(M,[{title:"".concat(ne?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ne?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!it&&st.map(function(Pe,ze){return l.a.createElement("li",{key:ze},Pe.actionName?l.a.createElement(N,Object(C.a)({},Pe,{onActionCallback:lt})):l.a.createElement("span",{className:"v-line"}))}),Ze?l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,$e&&l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat($e),onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(N,{icon:"".concat(Be?"icon-shrink":"icon-enlarge"),title:Be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},z=b("M8RZ"),X=b("+L6B"),k=b("2/Rp"),F=b("y8nQ"),U=b("Vl3Y"),L=b("5NDa"),B=b("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},re=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,Object(C.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(B.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(B.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},he=b("7ahc"),Se=b("HmJG"),ke=b("BjJ7"),te=U.a.useForm,Re={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}},pe=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel,lt=te(),Be=Object(_.a)(lt,1),$e=Be[0];function it(st){ne(st)}function wt(st,Pe){if(st.status===-1){g.b.error(st.message);return}$e.setFieldsValue({src:"/api/attachments/".concat(st.id),type:Pe.type})}function pt(st){var Pe=st.target.files[0];se(Pe,wt)}return l.a.createElement(U.a,Object(C.a)({form:$e},Ce,{className:"upload-image-panel",onFinish:it}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(B.a,{style:Re})),l.a.createElement(me,{onFileChange:pt}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(B.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))};function me(Qe){var ne=Qe.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:ne}))}function se(Qe,ne){if(!Qe)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ze=new FormData;Ze.append("editormd-image-file",Qe),Ze.append("file_param_name","editormd-image-file"),Ze.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(Be){ne(JSON.parse(Be.target.responseText),Qe)},!1),lt.addEventListener("error",function(Be){console.error(Be)},!1),lt.open("POST","".concat(ke.a,"/api/attachments.json")),lt.send(Ze)}var be=b("giR+"),ae=b("fyUT"),fe=b("7Kak"),Fe=b("9yH6"),ie=Fe.a.Group,q={margin:"0 8px"},Q=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:q},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ae.a,null)),l.a.createElement("span",{style:q},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ae.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(ie,null,l.a.createElement(Fe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Fe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Fe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Fe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},Y=b("ErOA"),oe=b("7Cbv"),le="link",Ee="upload-image",Le="code-block",ge="add-table",De="------------",_e={default:De,left:":".concat(De),center:":".concat(De,":"),right:"".concat(De,":")},Xe=b("9VGf"),tt,Ge;function Me(){}var bt=0,Oe=1e4,Ve="\u2581",Je=` +`),c=this._stacks.get(a)||0;if(this._stacks.set(a,c+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=t*.5;let d,f=0;for(const[h,u]of this._stacks)(!d||f{const d=this._stacks.get(a)||0;this._stacks.set(a,d-1)}}}class e{constructor(i){var t;this._disposed=!1,this._options=i,this._leakageMon=_>0?new p(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((t=this._options)===null||t===void 0?void 0:t._profName)?new s(this._options._profName):void 0}get event(){return this._event||(this._event=(i,t,a)=>{var c;this._listeners||(this._listeners=new T.a);const d=this._listeners.isEmpty();d&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const f=this._listeners.push(t?[i,t]:i);d&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,i,t);const h=(c=this._leakageMon)===null||c===void 0?void 0:c.check(this._listeners.size),u=Object(v.i)(()=>{if(h&&h(),!this._disposed&&(f(),this._options&&this._options.onLastListenerRemove)){const E=this._listeners&&!this._listeners.isEmpty();E||this._options.onLastListenerRemove(this)}});return a instanceof v.b?a.add(u):Array.isArray(a)&&a.push(u),u}),this._event}fire(i){var t,a;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new T.a);for(let c of this._listeners)this._deliveryQueue.push([c,i]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[c,d]=this._deliveryQueue.shift();try{typeof c=="function"?c.call(void 0,d):c[0].call(c[1],d)}catch(f){Object(I.f)(f)}}(a=this._perfMon)===null||a===void 0||a.stop()}}dispose(){var i,t,a,c,d;this._disposed||(this._disposed=!0,(i=this._listeners)===null||i===void 0||i.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(c=(a=this._options)===null||a===void 0?void 0:a.onLastListenerRemove)===null||c===void 0||c.call(a),(d=this._leakageMon)===null||d===void 0||d.dispose())}}class o extends e{constructor(i){super(i);this._isPaused=0,this._eventQueue=new T.a,this._mergeFn=i==null?void 0:i.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const i=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(i))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(i){this._listeners&&(this._isPaused!==0?this._eventQueue.push(i):super.fire(i))}}class n extends o{constructor(i){var t;super(i);this._delay=(t=i.delay)!==null&&t!==void 0?t:100}fire(i){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(i)}}class l{constructor(){this.buffers=[]}wrapEvent(i){return(t,a,c)=>i(d=>{const f=this.buffers[this.buffers.length-1];f?f.push(()=>t.call(a,d)):t.call(a,d)},void 0,c)}bufferEvents(i){const t=[];this.buffers.push(t);const a=i();return this.buffers.pop(),t.forEach(c=>c()),a}}class r{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=v.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(i){this.inputEvent=i,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=i(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(j,H,b){"use strict";(function(I,v){b.d(H,"b",function(){return a}),b.d(H,"i",function(){return h}),b.d(H,"f",function(){return u}),b.d(H,"d",function(){return E}),b.d(H,"g",function(){return x}),b.d(H,"h",function(){return O}),b.d(H,"c",function(){return C}),b.d(H,"k",function(){return w}),b.d(H,"j",function(){return S}),b.d(H,"a",function(){return A}),b.d(H,"e",function(){return N});var T;const y="en";let g=!1,s=!1,_=!1,p=!1,e=!1,o=!1,n=!1,l,r=y,i,t;const a=typeof self=="object"?self:typeof I=="object"?I:{};let c;typeof a.vscode!="undefined"&&typeof a.vscode.process!="undefined"?c=a.vscode.process:typeof v!="undefined"&&(c=v);const d=typeof((T=c==null?void 0:c.versions)===null||T===void 0?void 0:T.electron)=="string"&&c.type==="renderer";if(typeof navigator=="object"&&!d)t=navigator.userAgent,g=t.indexOf("Windows")>=0,s=t.indexOf("Macintosh")>=0,n=(t.indexOf("Macintosh")>=0||t.indexOf("iPad")>=0||t.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_=t.indexOf("Linux")>=0,o=!0,l=navigator.language,r=l;else if(typeof c=="object"){g=c.platform==="win32",s=c.platform==="darwin",_=c.platform==="linux",p=_&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,l=y,r=y;const P=c.env.VSCODE_NLS_CONFIG;if(P)try{const z=JSON.parse(P),X=z.availableLanguages["*"];l=z.locale,r=X||y,i=z._translationsConfigFile}catch(z){}e=!0}else console.error("Unable to resolve platform.");let f=0;s?f=1:g?f=3:_&&(f=2);const h=g,u=s,E=_,x=e,O=o,C=n,w=t,S=function(){if(a.setImmediate)return a.setImmediate.bind(a);if(typeof a.postMessage=="function"&&!a.importScripts){let X=[];a.addEventListener("message",F=>{if(F.data&&F.data.vscodeSetImmediateId)for(let U=0,L=X.length;U{const U=++k;X.push({id:U,callback:F}),a.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(c==null?void 0:c.nextTick)=="function")return c.nextTick.bind(c);const z=Promise.resolve();return X=>z.then(X)}(),A=s||n?2:g?1:3;let D=!0,M=!1;function N(){if(!M){M=!0;const P=new Uint8Array(2);P[0]=1,P[1]=2;const z=new Uint16Array(P.buffer);D=z[0]===(2<<8)+1}return D}}).call(this,b("IyRk"),b("Q2Ig"))},MZdM:function(j,H,b){"use strict";function I(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(t){return typeof t}:I=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(r)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=p(b("Lo0S")),T=s(b("N/zr")),y=b("GdRQ"),g=b("GQ8N");function s(r){return r&&r.__esModule?r:{default:r}}function _(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return _=function(){return r},r}function p(r){if(r&&r.__esModule)return r;if(r===null||I(r)!=="object"&&typeof r!="function")return{default:r};var i=_();if(i&&i.has(r))return i.get(r);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)){var d=a?Object.getOwnPropertyDescriptor(r,c):null;d&&(d.get||d.set)?Object.defineProperty(t,c,d):t[c]=r[c]}return t.default=r,i&&i.set(r,t),t}function e(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var t=0;t> Display.constructor"),this._target=i,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},v.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),v.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return n(r,[{key:"viewportChangePos",value:function(t,a){var c=this._viewportLoc;t=Math.floor(t),a=Math.floor(a),this._clipViewport||(t=-c.w,a=-c.h);var d=c.x+c.w-1,f=c.y+c.h-1;if(t<0&&c.x+t<0&&(t=-c.x),d+t>=this._fbWidth&&(t-=d+t-this._fbWidth+1),c.y+a<0&&(a=-c.y),f+a>=this._fbHeight&&(a-=f+a-this._fbHeight+1),t===0&&a===0)return;v.Debug("viewportChange deltaX: "+t+", deltaY: "+a),c.x+=t,c.y+=a,this._damage(c.x,c.y,c.w,c.h),this.flip()}},{key:"viewportChangeSize",value:function(t,a){(!this._clipViewport||typeof t=="undefined"||typeof a=="undefined")&&(v.Debug("Setting viewport to full display region"),t=this._fbWidth,a=this._fbHeight),t=Math.floor(t),a=Math.floor(a),t>this._fbWidth&&(t=this._fbWidth),a>this._fbHeight&&(a=this._fbHeight);var c=this._viewportLoc;if(c.w!==t||c.h!==a){c.w=t,c.h=a;var d=this._target;d.width=t,d.height=a,this.viewportChangePos(0,0),this._damage(c.x,c.y,c.w,c.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(t,a){this._prevDrawStyle="",this._fbWidth=t,this._fbHeight=a;var c=this._backbuffer;if(c.width!==t||c.height!==a){var d=null;c.width>0&&c.height>0&&(d=this._drawCtx.getImageData(0,0,c.width,c.height)),c.width!==t&&(c.width=t),c.height!==a&&(c.height=a),d&&this._drawCtx.putImageData(d,0,0)}var f=this._viewportLoc;this.viewportChangeSize(f.w,f.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(t,a,c,d){tthis._damageBounds.right&&(this._damageBounds.right=t+c),a+d>this._damageBounds.bottom&&(this._damageBounds.bottom=a+d)}},{key:"flip",value:function(t){if(this._renderQ.length!==0&&!t)this._renderQPush({type:"flip"});else{var a=this._damageBounds.left,c=this._damageBounds.top,d=this._damageBounds.right-a,f=this._damageBounds.bottom-c,h=a-this._viewportLoc.x,u=c-this._viewportLoc.y;h<0&&(d+=h,a-=h,h=0),u<0&&(f+=u,c-=u,u=0),h+d>this._viewportLoc.w&&(d=this._viewportLoc.w-h),u+f>this._viewportLoc.h&&(f=this._viewportLoc.h-u),d>0&&f>0&&this._targetCtx.drawImage(this._backbuffer,a,c,d,f,h,u,d,f),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(t,a,c,d,f,h){this._renderQ.length!==0&&!h?this._renderQPush({type:"fill",x:t,y:a,width:c,height:d,color:f}):(this._setFillColor(f),this._drawCtx.fillRect(t,a,c,d),this._damage(t,a,c,d))}},{key:"copyImage",value:function(t,a,c,d,f,h,u){this._renderQ.length!==0&&!u?this._renderQPush({type:"copy",oldX:t,oldY:a,x:c,y:d,width:f,height:h}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,t,a,f,h,c,d,f,h),this._damage(c,d,f,h))}},{key:"imageRect",value:function(t,a,c,d,f,h){if(c===0||d===0)return;var u=new Image;u.src="data: "+f+";base64,"+T.default.encode(h),this._renderQPush({type:"img",img:u,x:t,y:a,width:c,height:d})}},{key:"startTile",value:function(t,a,c,d,f){this._tileX=t,this._tileY=a,c===16&&d===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(c,d);for(var h=f[2],u=f[1],E=f[0],x=this._tile.data,O=0;O=f?c=t/d.w:c=a/d.h}this._rescale(c)}},{key:"_rescale",value:function(t){this._scale=t;var a=this._viewportLoc,c=t*a.w+"px",d=t*a.h+"px";(this._target.style.width!==c||this._target.style.height!==d)&&(this._target.style.width=c,this._target.style.height=d)}},{key:"_setFillColor",value:function(t){var a="rgb("+t[2]+","+t[1]+","+t[0]+")";a!==this._prevDrawStyle&&(this._drawCtx.fillStyle=a,this._prevDrawStyle=a)}},{key:"_rgbImageData",value:function(t,a,c,d,f,h){for(var u=this._drawCtx.createImageData(c,d),E=u.data,x=0,O=h;x0;){var a=this._renderQ[0];switch(a.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(a.oldX,a.oldY,a.x,a.y,a.width,a.height,!0);break;case"fill":this.fillRect(a.x,a.y,a.width,a.height,a.color,!0);break;case"blit":this.blitImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgb":this.blitRgbImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"img":if(a.img.complete&&a.img.width!==0&&a.img.height!==0){if(a.img.width!==a.width||a.img.height!==a.height){v.Error("Decoded image has incorrect dimensions. Got "+a.img.width+"x"+a.img.height+". Expected "+a.width+"x"+a.height+".");return}this.drawImage(a.img,a.x,a.y)}else a.img._noVNCDisplay=this,a.img.addEventListener("load",this._resumeRenderQ),t=!1;break}t&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(t){this._rescale(t)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(t){this._clipViewport=t;var a=this._viewportLoc;this.viewportChangeSize(a.w,a.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),r}();H.default=l},MlIO:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=T.x64={},p=_.Word=g.extend({init:function(o,n){this.high=o,this.low=n}}),e=_.WordArray=g.extend({init:function(o,n){o=this.words=o||[],n!=v?this.sigBytes=n:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,n=o.length,l=[],r=0;r=0;t--)i+=this._rQ[this._rQi++]<1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+r,i-r)}},{key:"rQwait",value:function(r,i,t){if(this.rQlen0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(r){this._sQ.set(r,this._sQlen),this._sQlen+=r.length,this.flush()}},{key:"sendString",value:function(r){this.send(r.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(r){this._eventHandlers[r]=function(){}}},{key:"on",value:function(r,i){this._eventHandlers[r]=i}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(r,i){var t=this;this.init(),this._websocket=new WebSocket(r,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){v.Debug(">> WebSock.onopen"),t._websocket.protocol&&v.Info("Server choose sub-protocol: "+t._websocket.protocol),t._eventHandlers.open(),v.Debug("<< WebSock.onopen")},this._websocket.onclose=function(a){v.Debug(">> WebSock.onclose"),t._eventHandlers.close(a),v.Debug("<< WebSock.onclose")},this._websocket.onerror=function(a){v.Debug(">> WebSock.onerror: "+a),t._eventHandlers.error(a),v.Debug("<< WebSock.onerror: "+a)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(v.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(r){var i=(this._rQlen-this._rQi+r)*8,t=this._rQbufferSizee&&(this._rQbufferSize=e,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.length}},{key:"_recvMessage",value:function(r){this._DecodeMessage(r.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):v.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(r){this._rQi=r}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),n}();H.default=o},"N/zr":function(j,H,b){"use strict";function I(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(p){return typeof p}:I=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},I(s)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var s=new WeakMap;return T=function(){return s},s}function y(s){if(s&&s.__esModule)return s;if(s===null||I(s)!=="object"&&typeof s!="function")return{default:s};var _=T();if(_&&_.has(s))return _.get(s);var p={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in s)if(Object.prototype.hasOwnProperty.call(s,o)){var n=e?Object.getOwnPropertyDescriptor(s,o):null;n&&(n.get||n.set)?Object.defineProperty(p,o,n):p[o]=s[o]}return p.default=s,_&&_.set(s,p),p}var g={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(_){"use strict";for(var p="",e=_.length,o=e%3,n=0;n>2],p+=this.toBase64Table[((_[n]&3)<<4)+(_[n+1]>>4)],p+=this.toBase64Table[((_[n+1]&15)<<2)+(_[n+2]>>6)],p+=this.toBase64Table[_[n+2]&63];var l=e-o;return o===2?(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[((_[l]&3)<<4)+(_[l+1]>>4)],p+=this.toBase64Table[(_[l+1]&15)<<2],p+=this.toBase64Table[64]):o===1&&(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[(_[l]&3)<<4],p+=this.toBase64Table[64],p+=this.toBase64Table[64]),p},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=_.indexOf("=")-p;e<0&&(e=_.length-p);for(var o=(e>>2)*3+Math.floor(e%4/1.5),n=new Array(o),l=0,r=0,i=0,t=p;t<_.length;t++){var a=this.toBinaryTable[_.charCodeAt(t)&127],c=_.charAt(t)===this.base64Pad;if(a===-1){v.Error("Illegal character code "+_.charCodeAt(t)+" at position "+t);continue}r=r<<6|a,l+=6,l>=8&&(l-=8,c||(n[i++]=r>>l&255),r&=(1<=oe.length?le:oe[Le]})}function y(Y){return Y.replace(/[<>&]/g,function(oe){switch(oe){case"<":return"<";case">":return">";case"&":return"&";default:return oe}})}function g(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function s(Y,oe=" "){const le=_(Y,oe);return p(le,oe)}function _(Y,oe){if(!Y||!oe)return Y;const le=oe.length;if(le===0||Y.length===0)return Y;let Ee=0;for(;Y.indexOf(oe,Ee)===Ee;)Ee=Ee+le;return Y.substring(Ee)}function p(Y,oe){if(!Y||!oe)return Y;const le=oe.length,Ee=Y.length;if(le===0||Ee===0)return Y;let Le=Ee,ge=-1;for(;!(ge=Y.lastIndexOf(oe,Le-1),ge===-1||ge+le!==Le);){if(ge===0)return"";Le=ge}return Y.substring(0,Le)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function o(Y){return Y.replace(/\*/g,"")}function n(Y,oe,le={}){if(!Y)throw new Error("Cannot create regex from empty string");oe||(Y=g(Y)),le.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let Ee="";return le.global&&(Ee+="g"),le.matchCase||(Ee+="i"),le.multiline&&(Ee+="m"),le.unicode&&(Ee+="u"),new RegExp(Y,Ee)}function l(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const oe=Y.exec("");return!!(oe&&Y.lastIndex===0)}function r(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function i(Y){return Y.split(/\r\n|\r|\n/)}function t(Y){for(let oe=0,le=Y.length;oe=0;le--){const Ee=Y.charCodeAt(le);if(Ee!==32&&Ee!==9)return le}return-1}function d(Y,oe){return Yoe?1:0}function f(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;lett)return 1}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function h(Y,oe){return u(Y,oe,0,Y.length,0,oe.length)}function u(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;le=128||tt>=128)return f(Y.toLowerCase(),oe.toLowerCase(),le,Ee,Le,ge);E(Xe)&&(Xe-=32),E(tt)&&(tt-=32);const Ge=Xe-tt;if(Ge===0)continue;return Ge}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function E(Y){return Y>=97&&Y<=122}function x(Y){return Y>=65&&Y<=90}function O(Y,oe){return Y.length===oe.length&&u(Y,oe)===0}function C(Y,oe){const le=oe.length;return oe.length>Y.length?!1:u(Y,oe,0,le)===0}function w(Y,oe){let le,Ee=Math.min(Y.length,oe.length);for(le=0;le1){const Ee=Y.charCodeAt(oe-2);if(A(Ee))return M(Ee,le)}return le}function z(Y,oe){const le=ae.getInstance(),Ee=oe,Le=Y.length,ge=N(Y,Le,oe);oe+=ge>=65536?2:1;let De=le.getGraphemeBreakType(ge);for(;oe=65536?2:1,De=Xe}return oe-Ee}function X(Y,oe){const le=ae.getInstance(),Ee=oe,Le=P(Y,oe);oe-=Le>=65536?2:1;let ge=le.getGraphemeBreakType(Le);for(;oe>0;){const De=P(Y,oe),_e=le.getGraphemeBreakType(De);if(be(_e,ge))break;oe-=De>=65536?2:1,ge=_e}return Ee-oe}const k=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function F(Y){return k.test(Y)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(Y){return U.test(Y)}const B=/^[\t\n\r\x20-\x7E]*$/;function Z(Y){return B.test(Y)}const re=/[\u2028\u2029]/;function he(Y){return re.test(Y)}function Se(Y){for(let oe=0,le=Y.length;oe=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function te(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const Re=String.fromCharCode(65279);function Ce(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function pe(Y,oe=!1){return Y?(oe&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function me(Y){const oe=90-65+1;return Y=Y%(2*oe),Yoe[3*Ee+1])Ee=2*Ee+1;else return oe[3*Ee+2];return 0}}ae._INSTANCE=null;function fe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Fe(Y,oe){if(Y===0)return 0;const le=ie(Y,oe);if(le!==void 0)return le;const Ee=P(oe,Y);return Y-=q(Ee),Y}function ie(Y,oe){let le=P(oe,Y);for(Y-=q(le);Q(le)||le===65039||le===8419;){if(Y===0)return;le=P(oe,Y),Y-=q(le)}if(!te(le))return;if(Y>=0){const Ee=P(oe,Y);Ee===8205&&(Y-=q(Ee))}return Y}function q(Y){return Y>=65536?2:1}function Q(Y){return 127995<=Y&&Y<=127999}},NBmB:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.encodingName=v,H.encodings=void 0;var I={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};H.encodings=I;function v(T){switch(T){case I.encodingRaw:return"Raw";case I.encodingCopyRect:return"CopyRect";case I.encodingRRE:return"RRE";case I.encodingHextile:return"Hextile";case I.encodingTight:return"Tight";case I.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+T+"]"}}},NFKh:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"),b("F+F2"),b("qM6L"),b("ETIr"),b("wbyO"),b("cv67"),b("3y9D"),b("lPiR"),b("GRuw"),b("1uat"),b("uGsb"),b("5hvy"),b("ELcG"),b("WYAk"),b("e7zE"),b("K3mO"),b("OLod"),b("ALsQ"),b("9OqN"),b("qu8F"),b("S6kV"),b("gb/T"),b("qBft"),b("oRuE"),b("jO9C"),b("KmYQ"),b("uGxW"),b("bQjk"),b("wZgz"),b("pA7S"),b("w7YG"),b("E4JC"),b("PVpz"))})(this,function(I){return I})},NLgs:function(j,H,b){"use strict";b.d(H,"e",function(){return c}),b.d(H,"f",function(){return d}),b.d(H,"d",function(){return h}),b.d(H,"c",function(){return u}),b.d(H,"a",function(){return E}),b.d(H,"b",function(){return x});var I=b("miYZ"),v=b("tsqr"),T=b("9og8"),y=b("2qtc"),g=b("kLXV"),s=b("WmNS"),_=b.n(s),p=b("q1tI"),e=b.n(p),o=b("9kvl"),n=b("xKgJ"),l=b("1vsH"),r=b("RCxd"),i=b("yTi+"),t=b.n(i),a=b("m3rI"),c=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(d(C)&&f(w))},d=function(C){return Object(n.p)()?!0:(C({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},f=function(){var C,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,S=Object(o.c)()._store.getState(),A=S.user;return(C=A.userInfo)!==null&&C!==void 0&&C.profile_completed?!0:(g.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:w?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){o.d.push("/account/profile/edit")}}),!1)},h=function(){var C,w=Object(o.c)()._store.getState(),S=w.user;return(C=S.userInfo)!==null&&C!==void 0&&C.professional_certification?!0:(g.a.confirm({title:"\u63D0\u793A",centered:!0,content:e.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(l.S)("/account/certification")}}),!1)},u=function(){var C;if(Object(n.a)())return!0;var w=Object(o.c)()._store.getState(),S=w.user,A=w.globalSetting;return g.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),e.a.createElement("img",{src:a.a.IMG_SERVER+(A==null||((C=A.setting)===null||C===void 0)?void 0:C.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},E=function(C,w){var S;if(C)return!0;var A=Object(o.c)()._store.getState(),D=A.user,M=A.globalSetting;return g.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("p",null,w||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),e.a.createElement("div",{style:{marginLeft:"110px"}},e.a.createElement("img",{src:a.a.IMG_SERVER+(M==null||((S=M.setting)===null||S===void 0)?void 0:S.authority_qrcode_url),width:200}),e.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(l.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},x=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",S=Object(o.c)()._store.getState(),A=S.shixunsDetail.detail;return(A==null?void 0:A.public)===2||(A==null?void 0:A.public)===1||(A==null?void 0:A.shixun_status)===3?(g.a.info({centered:!0,icon:e.a.createElement(r.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(A==null?void 0:A.public)===2?"\u5DF2\u516C\u5F00":(A==null?void 0:A.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",w,"\u3002"),e.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),e.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:t.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(A==null?void 0:A.shixun_status)===2?(g.a.confirm({centered:!0,icon:e.a.createElement(r.a,null),title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",w,"\u3002"),e.a.createElement("br",null),e.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){g.a.confirm({width:440,centered:!0,icon:e.a.createElement(r.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var M=Object(T.a)(_.a.mark(function P(){var z;return _.a.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,C({type:"shixunsDetail/cancelRelease",payload:{id:A==null?void 0:A.identifier}});case 2:z=k.sent,z.status!==401&&(v.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),C({type:"shixunsDetail/getShixunsDetail",payload:{id:A==null?void 0:A.identifier}}),C({type:"practiceSetting/getCommonData",payload:{id:A==null?void 0:A.identifier}}));case 4:case"end":return k.stop()}},P)}));function N(){return M.apply(this,arguments)}return N}()})}}),!0):!1}},Nmxd:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NvD2:function(j,H,b){"use strict";b.d(H,"a",function(){return s});var I=b("Kwbf");function v(_,p){var e=new Set;return _.forEach(function(o){p.has(o)||e.add(o)}),e}function T(_){var p=_||{},e=p.disabled,o=p.disableCheckbox,n=p.checkable;return!!(e||o)||n===!1}function y(_,p,e,o){for(var n=new Set(_),l=new Set,r=0;r<=e;r+=1){var i=p.get(r)||new Set;i.forEach(function(d){var f=d.key,h=d.node,u=d.children,E=u===void 0?[]:u;n.has(f)&&!o(h)&&E.filter(function(x){return!o(x.node)}).forEach(function(x){n.add(x.key)})})}for(var t=new Set,a=e;a>=0;a-=1){var c=p.get(a)||new Set;c.forEach(function(d){var f=d.parent,h=d.node;if(o(h)||!d.parent||t.has(d.parent.key))return;if(o(d.parent.node)){t.add(f.key);return}var u=!0,E=!1;(f.children||[]).filter(function(x){return!o(x.node)}).forEach(function(x){var O=x.key,C=n.has(O);u&&!C&&(u=!1),!E&&(C||l.has(O))&&(E=!0)}),u&&n.add(f.key),E&&l.add(f.key),t.add(f.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(v(l,n))}}function g(_,p,e,o,n){for(var l=new Set(_),r=new Set(p),i=0;i<=o;i+=1){var t=e.get(i)||new Set;t.forEach(function(f){var h=f.key,u=f.node,E=f.children,x=E===void 0?[]:E;!l.has(h)&&!r.has(h)&&!n(u)&&x.filter(function(O){return!n(O.node)}).forEach(function(O){l.delete(O.key)})})}r=new Set;for(var a=new Set,c=o;c>=0;c-=1){var d=e.get(c)||new Set;d.forEach(function(f){var h=f.parent,u=f.node;if(n(u)||!f.parent||a.has(f.parent.key))return;if(n(f.parent.node)){a.add(h.key);return}var E=!0,x=!1;(h.children||[]).filter(function(O){return!n(O.node)}).forEach(function(O){var C=O.key,w=l.has(C);E&&!w&&(E=!1),!x&&(w||r.has(C))&&(x=!0)}),E||l.delete(h.key),x&&r.add(h.key),a.add(h.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function s(_,p,e,o){var n=[],l;o?l=o:l=T;var r=new Set(_.filter(function(c){var d=!!e[c];return d||n.push(c),d})),i=new Map,t=0;Object.keys(e).forEach(function(c){var d=e[c],f=d.level,h=i.get(f);h||(h=new Set,i.set(f,h)),h.add(d),t=Math.max(t,f)}),Object(I.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var a;return p===!0?a=y(r,i,t,l):a=g(r,p.halfCheckedKeys,i,t,l),a}},OLES:function(j,H,b){"use strict";var I=b("U8pU"),v=b("VTBJ"),T=b("Ff2n"),y=b("q1tI"),g=b("uciX"),s=b("7ixt"),_=function(r){var i=r.overlay,t=r.prefixCls,a=r.id,c=r.overlayInnerStyle;return y.createElement("div",{className:"".concat(t,"-inner"),id:a,role:"tooltip",style:c},typeof i=="function"?i():i)},p=_,e=function(r,i){var t=r.overlayClassName,a=r.trigger,c=a===void 0?["hover"]:a,d=r.mouseEnterDelay,f=d===void 0?0:d,h=r.mouseLeaveDelay,u=h===void 0?.1:h,E=r.overlayStyle,x=r.prefixCls,O=x===void 0?"rc-tooltip":x,C=r.children,w=r.onVisibleChange,S=r.afterVisibleChange,A=r.transitionName,D=r.animation,M=r.placement,N=M===void 0?"right":M,P=r.align,z=P===void 0?{}:P,X=r.destroyTooltipOnHide,k=X===void 0?!1:X,F=r.defaultVisible,U=r.getTooltipContainer,L=r.overlayInnerStyle,B=Object(T.a)(r,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Z=Object(y.useRef)(null);Object(y.useImperativeHandle)(i,function(){return Z.current});var re=Object(v.a)({},B);"visible"in r&&(re.popupVisible=r.visible);var he=function(){var Ce=r.arrowContent,pe=Ce===void 0?null:Ce,me=r.overlay,se=r.id;return[y.createElement("div",{className:"".concat(O,"-arrow"),key:"arrow"},pe),y.createElement(p,{key:"content",prefixCls:O,id:se,overlay:me,overlayInnerStyle:L})]},Se=!1,ke=!1;if(typeof k=="boolean")Se=k;else if(k&&Object(I.a)(k)==="object"){var te=k.keepParent;Se=te===!0,ke=te===!1}return y.createElement(g.a,Object.assign({popupClassName:t,prefixCls:O,popup:he,action:c,builtinPlacements:s.a,popupPlacement:N,ref:Z,popupAlign:z,getPopupContainer:U,onPopupVisibleChange:w,afterPopupVisibleChange:S,popupTransitionName:A,popupAnimation:D,defaultPopupVisible:F,destroyPopupOnHide:Se,autoDestroy:ke,mouseLeaveDelay:u,popupStyle:E,mouseEnterDelay:f},re),C)},o=Object(y.forwardRef)(e),n=H.a=o},OLod:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("K3mO"))})(this,function(I){I.lib.Cipher||function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=y.BufferedBlockAlgorithm,p=T.enc,e=p.Utf8,o=p.Base64,n=T.algo,l=n.EvpKDF,r=y.Cipher=_.extend({cfg:g.extend(),createEncryptor:function(A,D){return this.create(this._ENC_XFORM_MODE,A,D)},createDecryptor:function(A,D){return this.create(this._DEC_XFORM_MODE,A,D)},init:function(A,D,M){this.cfg=this.cfg.extend(M),this._xformMode=A,this._key=D,this.reset()},reset:function(){_.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var D=this._doFinalize();return D},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function A(D){return typeof D=="string"?S:O}return function(D){return{encrypt:function(M,N,P){return A(N).encrypt(D,M,N,P)},decrypt:function(M,N,P){return A(N).decrypt(D,M,N,P)}}}}()}),i=y.StreamCipher=r.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1}),t=T.mode={},a=y.BlockCipherMode=g.extend({createEncryptor:function(A,D){return this.Encryptor.create(A,D)},createDecryptor:function(A,D){return this.Decryptor.create(A,D)},init:function(A,D){this._cipher=A,this._iv=D}}),c=t.CBC=function(){var A=a.extend();A.Encryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize;D.call(this,M,N,z),P.encryptBlock(M,N),this._prevBlock=M.slice(N,N+z)}}),A.Decryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize,X=M.slice(N,N+z);P.decryptBlock(M,N),D.call(this,M,N,z),this._prevBlock=X}});function D(M,N,P){var z,X=this._iv;X?(z=X,this._iv=v):z=this._prevBlock;for(var k=0;k>>2]&255;A.sigBytes-=D}},h=y.BlockCipher=r.extend({cfg:r.cfg.extend({mode:c,padding:f}),reset:function(){var A;r.reset.call(this);var D=this.cfg,M=D.iv,N=D.mode;this._xformMode==this._ENC_XFORM_MODE?A=N.createEncryptor:(A=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,M&&M.words):(this._mode=A.call(N,this,M&&M.words),this._mode.__creator=A)},_doProcessBlock:function(A,D){this._mode.processBlock(A,D)},_doFinalize:function(){var A,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),D.unpad(A)),A},blockSize:128/32}),u=y.CipherParams=g.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),E=T.format={},x=E.OpenSSL={stringify:function(A){var D,M=A.ciphertext,N=A.salt;return N?D=s.create([1398893684,1701076831]).concat(N).concat(M):D=M,D.toString(o)},parse:function(A){var D,M=o.parse(A),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(D=s.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),u.create({ciphertext:M,salt:D})}},O=y.SerializableCipher=g.extend({cfg:g.extend({format:x}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=A.createEncryptor(M,N),z=P.finalize(D),X=P.cfg;return u.create({ciphertext:z,key:M,iv:X.iv,algorithm:A,mode:X.mode,padding:X.padding,blockSize:A.blockSize,formatter:N.format})},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=A.createDecryptor(M,N).finalize(D.ciphertext);return P},_parse:function(A,D){return typeof A=="string"?D.parse(A,this):A}}),C=T.kdf={},w=C.OpenSSL={execute:function(A,D,M,N){N||(N=s.random(64/8));var P=l.create({keySize:D+M}).compute(A,N),z=s.create(P.words.slice(D),M*4);return P.sigBytes=D*4,u.create({key:P,iv:z,salt:N})}},S=y.PasswordBasedCipher=O.extend({cfg:O.cfg.extend({kdf:w}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=N.kdf.execute(M,A.keySize,A.ivSize);N.iv=P.iv;var z=O.encrypt.call(this,A,D,P.key,N);return z.mixIn(P),z},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=N.kdf.execute(M,A.keySize,A.ivSize,D.salt);N.iv=P.iv;var z=O.decrypt.call(this,A,D,P.key,N);return z}})}()})},OZM5:function(j,H,b){"use strict";b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"k",function(){return l}),b.d(H,"h",function(){return r}),b.d(H,"i",function(){return i}),b.d(H,"g",function(){return t}),b.d(H,"c",function(){return a}),b.d(H,"d",function(){return c}),b.d(H,"j",function(){return h}),b.d(H,"e",function(){return u}),b.d(H,"f",function(){return E});var I=b("KQm4"),v=b("U8pU"),T=b("Ff2n"),y=b("q1tI"),g=b.n(y),s=b("Kwbf"),_=b("WaYH"),p=.25,e=2;function o(x,O){var C=x.slice(),w=C.indexOf(O);return w>=0&&C.splice(w,1),C}function n(x,O){var C=x.slice();return C.indexOf(O)===-1&&C.push(O),C}function l(x){return x.split("-")}function r(x,O){return"".concat(x,"-").concat(O)}function i(x){return x&&x.type&&x.type.isTreeNode}function t(x,O){var C=[x],w=O[x];function S(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(D){var M=D.key,N=D.children;C.push(M),S(N)})}return S(w.children),C}function a(x,O){var C=x.clientY,w=O.selectHandle.getBoundingClientRect(),S=w.top,A=w.bottom,D=w.height,M=Math.max(D*p,e);return C<=S+M?-1:C>=A-M?1:0}function c(x,O){if(!x)return;var C=O.multiple;return C?x.slice():x.length?[x[0]]:x}var d=function(O){return O};function f(x,O){if(!x)return[];var C=O||{},w=C.processProps,S=w===void 0?d:w,A=Array.isArray(x)?x:[x];return A.map(function(D){var M=D.children,N=Object(T.a)(D,["children"]),P=f(M,O);return g.a.createElement(_.a,Object.assign({},S(N)),P)})}function h(x){if(!x)return null;var O;if(Array.isArray(x))O={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(v.a)(x)==="object")O={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return O}function u(x,O){var C=new Set;function w(S){if(C.has(S))return;var A=O[S];if(!A)return;C.add(S);var D=A.parent,M=A.node;if(M.disabled)return;D&&w(D.key)}return(x||[]).forEach(function(S){w(S)}),Object(I.a)(C)}function E(x){var O={};return Object.keys(x).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(O[C]=x[C])}),O}},Ohmc:function(j,H,b){j.exports=b.p+"static/certificate.fc32dc1b.jpg"},OoWo:function(j,H,b){},Ot1p:function(j,H,b){"use strict";var I=b("2qtc"),v=b("kLXV"),T=b("rAM+"),y=b("miYZ"),g=b("tsqr"),s=b("9og8"),_=b("tJVT"),p=b("jrin"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("VrN/"),i=b.n(r),t=b("bdgK"),a=b("p77/"),c=b("Bd2K"),d=b("ELLl"),f=b("19Vz"),h=b("lZu9"),u=b("+NIl"),E=b("kSUc"),x=b("9Bee"),O=function(Qe){var ne=Qe.value,Ze=ne===void 0?"":ne,lt=Qe.className,Be=Qe.showTextOnly,$e=Qe.showLines,rt=Qe.style,St=rt===void 0?{}:rt,pt=Object(n.useMemo)(function(){return""},[Ze]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:pt}}))},C=b("0Owb"),w=b("dejd"),S=b("C+DQ"),A=b("1vsH"),D=b("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function N(Qe){var ne=Qe.onActionCallback,Ze=Qe.title,lt=Qe.icon,Be=Qe.actionName,$e=Qe.className,rt=$e===void 0?"":$e,St=Qe.children;function pt(){ne(Be)}return l.a.createElement("a",{title:Ze,className:rt,onClick:pt},l.a.createElement("i",{className:"md-iconfont ".concat(lt)}),St)}var P=function(Qe){var ne=Qe.watch,Ze=Qe.showNullButton,lt=Qe.onActionCallback,Be=Qe.fullScreen,$e=Qe.insertTemp,rt=Qe.hidetoolBar,St=Qe.uuid,pt=Qe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(A.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(A.F)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(D.a.PROXY_SERVER)));var st=[].concat(M,[{title:"".concat(ne?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ne?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!rt&&st.map(function(Pe,ze){return l.a.createElement("li",{key:ze},Pe.actionName?l.a.createElement(N,Object(C.a)({},Pe,{onActionCallback:lt})):l.a.createElement("span",{className:"v-line"}))}),Ze?l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,$e&&l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat($e),onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(N,{icon:"".concat(Be?"icon-shrink":"icon-enlarge"),title:Be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},z=b("M8RZ"),X=b("+L6B"),k=b("2/Rp"),F=b("y8nQ"),U=b("Vl3Y"),L=b("5NDa"),B=b("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},re=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,Object(C.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(B.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(B.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},he=b("7ahc"),Se=b("HmJG"),ke=b("BjJ7"),te=U.a.useForm,Re={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}},pe=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel,lt=te(),Be=Object(_.a)(lt,1),$e=Be[0];function rt(st){ne(st)}function St(st,Pe){if(st.status===-1){g.b.error(st.message);return}$e.setFieldsValue({src:"/api/attachments/".concat(st.id),type:Pe.type})}function pt(st){var Pe=st.target.files[0];se(Pe,St)}return l.a.createElement(U.a,Object(C.a)({form:$e},Ce,{className:"upload-image-panel",onFinish:rt}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(B.a,{style:Re})),l.a.createElement(me,{onFileChange:pt}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(B.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))};function me(Qe){var ne=Qe.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:ne}))}function se(Qe,ne){if(!Qe)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ze=new FormData;Ze.append("editormd-image-file",Qe),Ze.append("file_param_name","editormd-image-file"),Ze.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(Be){ne(JSON.parse(Be.target.responseText),Qe)},!1),lt.addEventListener("error",function(Be){console.error(Be)},!1),lt.open("POST","".concat(ke.a,"/api/attachments.json")),lt.send(Ze)}var be=b("giR+"),ae=b("fyUT"),fe=b("7Kak"),Fe=b("9yH6"),ie=Fe.a.Group,q={margin:"0 8px"},Q=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:q},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ae.a,null)),l.a.createElement("span",{style:q},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ae.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(ie,null,l.a.createElement(Fe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Fe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Fe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Fe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},Y=b("ErOA"),oe=b("7Cbv"),le="link",Ee="upload-image",Le="code-block",ge="add-table",De="------------",_e={default:De,left:":".concat(De),center:":".concat(De,":"),right:"".concat(De,":")},Xe=b("9VGf"),tt,Ge;function Me(){}var Et=0,Oe=1e4,Ve="\u2581",Je=` **\u6A21\u677F\u6807\u9898** -\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ye(Qe){return/^\d+$/.test(Qe)?"".concat(Qe,"px"):Qe}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,He=Ne?"Cmd":"Ctrl",ve=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],xe=(tt={},Object(p.a)(tt,He+"-B","bold"),Object(p.a)(tt,He+"-I","italic"),tt),de=(Ge={},Object(p.a)(Ge,le,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(Ge,Le,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(Ge,Ee,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(Ge,ge,"\u6DFB\u52A0\u8868\u683C"),Ge),je=H.a=function(Qe){var ne=Qe.defaultValue,Ze=ne===void 0?"":ne,lt=Qe.onChange,Be=Qe.width,$e=Be===void 0?"100%":Be,it=Qe.height,wt=it===void 0?400:it,pt=Qe.miniToolbar,st=pt===void 0?!1:pt,Pe=Qe.isFocus,ze=Pe===void 0?!1:Pe,Et=Qe.watch,ht=Qe.insertTemp,Bt=Qe.mode,Ht=Bt===void 0?"markdown":Bt,mt=Qe.id,Xt=mt===void 0?"markdown-editor-id":mt,jt=Qe.showResizeBar,Ut=jt===void 0?!1:jt,kt=Qe.noStorage,Kt=kt===void 0?!1:kt,rn=Qe.showNullButton,Gt=rn===void 0?!1:rn,$t=Qe.hidetoolBar,Ln=$t===void 0?!1:$t,pn=Qe.fullScreen,Dn=pn===void 0?!1:pn,sn=Qe.onBlur,Sn=Qe.onCMBeforeChange,Kn=Qe.onFullScreen,Qn=Qe.className,Vt=Qn===void 0?"":Qn,wn=Qe.disablePaste,$n=wn===void 0?!1:wn,ir=Qe.placeholder,Tr=ir===void 0?"":ir,qn=Qe.values,ce=qn===void 0?"":qn,V=Object(n.useState)(null),J=Object(_.a)(V,2),ee=J[0],Te=J[1],ue=Object(n.useState)(Ze),nt=Object(_.a)(ue,2),Lt=nt[0],Yt=nt[1],on=Object(n.useState)(Et),Qt=Object(_.a)(on,2),In=Qt[0],Gn=Qt[1],lr=Object(n.useState)(Dn),Ar=Object(_.a)(lr,2),vr=Ar[0],ar=Ar[1],xr=Object(n.useState)(""),qi=Object(_.a)(xr,2),Gr=qi[0],ai=qi[1],da=Object(n.useState)(0),Fi=Object(_.a)(da,2),ia=Fi[0],Ca=Fi[1],po=Object(n.useState)(wt),so=Object(_.a)(po,2),xo=so[0],ka=so[1],Yi=Object(n.useState)(!1),Nr=Object(_.a)(Yi,2),Qr=Nr[0],yi=Nr[1],Fr=Object(n.useRef)(Object(oe.a)()),wr=Object(n.useRef)(!1),ei=Object(n.useRef)(),_r=Object(n.useRef)(),oi=Object(n.useRef)(),or=Object(n.useRef)(),Wi=Object(n.useRef)(),Mi=function(){var Jn=Object(s.a)(o.a.mark(function gr(){var Zn,Lr;return o.a.wrap(function(gi){for(;;)switch(gi.prev=gi.next){case 0:return gi.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Fr.current}});case 2:Lr=gi.sent,Lr!=null&&(Zn=Lr.attachments)!==null&&Zn!==void 0&&Zn.length&&(console.log("cm:",ee,_r),Lr.attachments.map(function(dr){dr.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(dr.id,"?type=").concat(dr.content_type,")")):dr.content_type.indexOf("video")>-1?ee.replaceSelection('')):dr.content_type.indexOf("pdf")>-1?ee.replaceSelection('
          ').concat(dr.name,"")):ee.replaceSelection("[".concat(dr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}));case 4:case"end":return gi.stop()}},gr)}));return function(){return Jn.apply(this,arguments)}}();Object(n.useEffect)(function(){Yt(ce),ee==null||ee.setValue(ce)},[ce]),Object(n.useEffect)(function(){Kn==null||Kn(vr)},[vr]),Object(n.useEffect)(function(){if(_r.current){var Jn=i.a.fromTextArea(_r.current,{mode:Ht,lineNumbers:!st,lineWrapping:!0,value:Ze,autoCloseTags:!0,autoCloseBrackets:!0});ze&&Jn.focus();function gr(Zn,Lr){if($n){Lr.preventDefault();return}var Hr=Lr.clipboardData;if(Hr){var gi=Hr.types.toString(),dr=Hr.items;if(gi==="Files"||Hr.types.indexOf("Files")>-1){if(Lr.preventDefault(),Ht=="stex")return;try{var Xi,ga=dr[1];((Xi=dr[0])===null||Xi===void 0?void 0:Xi.kind)==="file"&&(ga=dr[0]);var jr=ga.getAsFile(),qa=jr.name.split(".").pop();se(jr,function(di){if(di.id){var Ai,va,Ma;(jr==null||((Ai=jr.type)===null||Ai===void 0)?void 0:Ai.indexOf("image"))>-1?Jn.replaceSelection("![,](/api/attachments/".concat(di.id,"?type=").concat(di.content_type,")")):(jr==null||((va=jr.type)===null||va===void 0)?void 0:va.indexOf("video"))>-1?Jn.replaceSelection('')):(jr==null||((Ma=jr.type)===null||Ma===void 0)?void 0:Ma.indexOf("pdf"))>-1?Jn.replaceSelection('').concat(jr.name,"")):ve.includes(qa)?Jn.replaceSelection('').concat(jr.name,"")):Jn.replaceSelection("[".concat(jr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(di.content_type,")"))}else(di==null?void 0:di.status)===401&&(document.location.href="/user/login")})}catch(di){g.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Jn.on("paste",gr),Jn.on("dragleave",function(Zn,Lr){oi.current.classList.remove("mouse-hover-md")}),Jn.on("dragover",function(Zn,Lr){oi.current.classList.add("mouse-hover-md")}),Jn.on("drop",function(Zn,Lr){oi.current.classList.add("mouse-hover-md");var Hr;if(Hr=Lr.dataTransfer.files,Hr.length>0){Lr.preventDefault(),Lr.stopPropagation();for(var gi=function(ga){var jr=Hr[ga],qa=jr.name.split(".").pop();se(jr,function(di){if(di.id){var Ai,va,Ma;(jr==null||((Ai=jr.type)===null||Ai===void 0)?void 0:Ai.indexOf("image"))>-1?Jn.replaceSelection("![,](/api/attachments/".concat(di.id,"?type=").concat(di.content_type,")")):(jr==null||((va=jr.type)===null||va===void 0)?void 0:va.indexOf("video"))>-1?Jn.replaceSelection('')):(jr==null||((Ma=jr.type)===null||Ma===void 0)?void 0:Ma.indexOf("pdf"))>-1?Jn.replaceSelection('').concat(jr.name,"")):ve.includes(qa)?Jn.replaceSelection('').concat(jr.name,"")):Jn.replaceSelection("[".concat(jr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(di.content_type,")"))}else(di==null?void 0:di.status)===401&&(document.location.href="/user/login")})},dr=0;dr0||dr.target.offsetWidth>0)&&($i(),ee.setSize("100%","100%"),ee.refresh())}}catch(Xi){Hr.e(Xi)}finally{Hr.f()}});return Zn.observe(_r.current.parentElement),Zn}if(ee){var gr=Jn();return function(){gr.unobserve(_r.current.parentElement)}}},[ee,$i]),Object(n.useEffect)(function(){if(ee){for(var Jn=[],gr=function(){var dr=Lr[Zn];Hr=Object(_.a)(dr,2);var Xi=Hr[0],ga=Hr[1],jr=Object(p.a)({},Xi,function(){mo(ga)});Jn.push(jr),ee.addKeyMap(jr)},Zn=0,Lr=Object.entries(xe);Zn0){var Jn=new Date().getTime(),gr=window.sessionStorage.getItem(Xt);Jn>=ia+Oe&&(!gr||gr!==Lt)&&(window.sessionStorage.setItem(Xt,Lt),yi(!0))}},Oe),Object(n.useEffect)(function(){Gn(Et)},[ee,Et]),Object(n.useEffect)(function(){ee&&(ze&&ee.focus())},[ee,ze]),Object(n.useEffect)(function(){if(In&&ee){var Jn=ee.getScrollerElement();function gr(Zn){var Lr=Zn.target;if(Wi.current){var Hr=Lr.scrollTop/Lr.scrollHeight;Wi.current.scrollTop=Wi.current.scrollHeight*Hr}}return Jn.addEventListener("scroll",gr),function(){Jn.removeEventListener("scroll",gr)}}},[ee,In]),Object(n.useEffect)(function(){if(ee&&Sn){function Jn(gr,Zn){Sn(gr,Zn)}return ee.on("beforeChange",Jn),function(){ee.off("beforeChange",Jn)}}},[ee,Sn]),Object(n.useEffect)(function(){if(ee&&sn){function Jn(){sn(ee.getValue())}return ee.on("blur",Jn),function(){ee.off("blur",Jn)}}},[ee,sn]),Object(n.useEffect)(function(){if(ee){function Jn(gr){var Zn=gr.getValue();Yt(Zn),Ca(new Date().getTime()),gr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(Zn)}return ee.on("change",Jn),function(){ee.off("change",Jn)}}},[ee,lt]),Object(n.useEffect)(function(){ee&&(Ze==null?(ee.setValue(""),Yt("")):Ze!==ee.getValue()&&(ee.setValue(Ze),Yt(Ze),ee.setCursor(ee.lineCount(),0)))},[ee,Ze]);var mo=Object(n.useCallback)(function(Jn){var gr=ee.getCursor(),Zn=ee.getSelection(),Lr=Zn.split(` +\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ye(Qe){return/^\d+$/.test(Qe)?"".concat(Qe,"px"):Qe}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,He=Ne?"Cmd":"Ctrl",ve=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],xe=(tt={},Object(p.a)(tt,He+"-B","bold"),Object(p.a)(tt,He+"-I","italic"),tt),de=(Ge={},Object(p.a)(Ge,le,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(Ge,Le,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(Ge,Ee,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(Ge,ge,"\u6DFB\u52A0\u8868\u683C"),Ge),je=H.a=function(Qe){var ne=Qe.defaultValue,Ze=ne===void 0?"":ne,lt=Qe.onChange,Be=Qe.width,$e=Be===void 0?"100%":Be,rt=Qe.height,St=rt===void 0?400:rt,pt=Qe.miniToolbar,st=pt===void 0?!1:pt,Pe=Qe.isFocus,ze=Pe===void 0?!1:Pe,xt=Qe.watch,ht=Qe.insertTemp,Bt=Qe.mode,Ht=Bt===void 0?"markdown":Bt,gt=Qe.id,Xt=gt===void 0?"markdown-editor-id":gt,jt=Qe.showResizeBar,Ut=jt===void 0?!1:jt,It=Qe.noStorage,Kt=It===void 0?!1:It,rn=Qe.showNullButton,zt=rn===void 0?!1:rn,$t=Qe.hidetoolBar,Pn=$t===void 0?!1:$t,fn=Qe.fullScreen,In=fn===void 0?!1:fn,on=Qe.onBlur,Cn=Qe.onCMBeforeChange,Hn=Qe.onFullScreen,Qn=Qe.className,Vt=Qn===void 0?"":Qn,xn=Qe.disablePaste,er=xn===void 0?!1:xn,ar=Qe.placeholder,Ar=ar===void 0?"":ar,$n=Qe.values,ce=$n===void 0?"":$n,V=Object(n.useState)(null),J=Object(_.a)(V,2),ee=J[0],Te=J[1],ue=Object(n.useState)(Ze),nt=Object(_.a)(ue,2),kt=nt[0],Yt=nt[1],sn=Object(n.useState)(xt),Qt=Object(_.a)(sn,2),kn=Qt[0],Vn=Qt[1],lr=Object(n.useState)(In),Or=Object(_.a)(lr,2),vr=Or[0],or=Or[1],Sr=Object(n.useState)(""),Ji=Object(_.a)(Sr,2),Gr=Ji[0],si=Ji[1],ca=Object(n.useState)(0),Fi=Object(_.a)(ca,2),ra=Fi[0],Ta=Fi[1],po=Object(n.useState)(St),io=Object(_.a)(po,2),wo=io[0],La=io[1],Gi=Object(n.useState)(!1),Nr=Object(_.a)(Gi,2),Jr=Nr[0],bi=Nr[1],Fr=Object(n.useRef)(Object(oe.a)()),Cr=Object(n.useRef)(!1),ti=Object(n.useRef)(),_r=Object(n.useRef)(),li=Object(n.useRef)(),sr=Object(n.useRef)(),Hi=Object(n.useRef)(),Pi=function(){var Jn=Object(s.a)(o.a.mark(function gr(){var Zn,Mr;return o.a.wrap(function(gi){for(;;)switch(gi.prev=gi.next){case 0:return gi.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Fr.current}});case 2:Mr=gi.sent,Mr!=null&&(Zn=Mr.attachments)!==null&&Zn!==void 0&&Zn.length&&(console.log("cm:",ee,_r),Mr.attachments.map(function(cr){cr.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(cr.id,"?type=").concat(cr.content_type,")")):cr.content_type.indexOf("video")>-1?ee.replaceSelection('')):cr.content_type.indexOf("pdf")>-1?ee.replaceSelection('').concat(cr.name,"")):ee.replaceSelection("[".concat(cr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(cr.id,"?type=").concat(cr.content_type,")"))}));case 4:case"end":return gi.stop()}},gr)}));return function(){return Jn.apply(this,arguments)}}();Object(n.useEffect)(function(){Yt(ce),ee==null||ee.setValue(ce)},[ce]),Object(n.useEffect)(function(){Hn==null||Hn(vr)},[vr]),Object(n.useEffect)(function(){if(_r.current){var Jn=i.a.fromTextArea(_r.current,{mode:Ht,lineNumbers:!st,lineWrapping:!0,value:Ze,autoCloseTags:!0,autoCloseBrackets:!0});ze&&Jn.focus();function gr(Zn,Mr){if(er){Mr.preventDefault();return}var Kr=Mr.clipboardData;if(Kr){var gi=Kr.types.toString(),cr=Kr.items;if(gi==="Files"||Kr.types.indexOf("Files")>-1){if(Mr.preventDefault(),Ht=="stex")return;try{var Wi,ma=cr[1];((Wi=cr[0])===null||Wi===void 0?void 0:Wi.kind)==="file"&&(ma=cr[0]);var Br=ma.getAsFile(),qa=Br.name.split(".").pop();se(Br,function(ci){if(ci.id){var Oi,ga,Pa;(Br==null||((Oi=Br.type)===null||Oi===void 0)?void 0:Oi.indexOf("image"))>-1?Jn.replaceSelection("![,](/api/attachments/".concat(ci.id,"?type=").concat(ci.content_type,")")):(Br==null||((ga=Br.type)===null||ga===void 0)?void 0:ga.indexOf("video"))>-1?Jn.replaceSelection('')):(Br==null||((Pa=Br.type)===null||Pa===void 0)?void 0:Pa.indexOf("pdf"))>-1?Jn.replaceSelection('').concat(Br.name,"")):ve.includes(qa)?Jn.replaceSelection('').concat(Br.name,"")):Jn.replaceSelection("[".concat(Br.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(ci.id,"?type=").concat(ci.content_type,")"))}else(ci==null?void 0:ci.status)===401&&(document.location.href="/user/login")})}catch(ci){g.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Jn.on("paste",gr),Jn.on("dragleave",function(Zn,Mr){li.current.classList.remove("mouse-hover-md")}),Jn.on("dragover",function(Zn,Mr){li.current.classList.add("mouse-hover-md")}),Jn.on("drop",function(Zn,Mr){li.current.classList.add("mouse-hover-md");var Kr;if(Kr=Mr.dataTransfer.files,Kr.length>0){Mr.preventDefault(),Mr.stopPropagation();for(var gi=function(ma){var Br=Kr[ma],qa=Br.name.split(".").pop();se(Br,function(ci){if(ci.id){var Oi,ga,Pa;(Br==null||((Oi=Br.type)===null||Oi===void 0)?void 0:Oi.indexOf("image"))>-1?Jn.replaceSelection("![,](/api/attachments/".concat(ci.id,"?type=").concat(ci.content_type,")")):(Br==null||((ga=Br.type)===null||ga===void 0)?void 0:ga.indexOf("video"))>-1?Jn.replaceSelection('')):(Br==null||((Pa=Br.type)===null||Pa===void 0)?void 0:Pa.indexOf("pdf"))>-1?Jn.replaceSelection('').concat(Br.name,"")):ve.includes(qa)?Jn.replaceSelection('').concat(Br.name,"")):Jn.replaceSelection("[".concat(Br.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(ci.id,"?type=").concat(ci.content_type,")"))}else(ci==null?void 0:ci.status)===401&&(document.location.href="/user/login")})},cr=0;cr0||cr.target.offsetWidth>0)&&(Zi(),ee.setSize("100%","100%"),ee.refresh())}}catch(Wi){Kr.e(Wi)}finally{Kr.f()}});return Zn.observe(_r.current.parentElement),Zn}if(ee){var gr=Jn();return function(){gr.unobserve(_r.current.parentElement)}}},[ee,Zi]),Object(n.useEffect)(function(){if(ee){for(var Jn=[],gr=function(){var cr=Mr[Zn];Kr=Object(_.a)(cr,2);var Wi=Kr[0],ma=Kr[1],Br=Object(p.a)({},Wi,function(){mo(ma)});Jn.push(Br),ee.addKeyMap(Br)},Zn=0,Mr=Object.entries(xe);Zn0){var Jn=new Date().getTime(),gr=window.sessionStorage.getItem(Xt);Jn>=ra+Oe&&(!gr||gr!==kt)&&(window.sessionStorage.setItem(Xt,kt),bi(!0))}},Oe),Object(n.useEffect)(function(){Vn(xt)},[ee,xt]),Object(n.useEffect)(function(){ee&&(ze&&ee.focus())},[ee,ze]),Object(n.useEffect)(function(){if(kn&&ee){var Jn=ee.getScrollerElement();function gr(Zn){var Mr=Zn.target;if(Hi.current){var Kr=Mr.scrollTop/Mr.scrollHeight;Hi.current.scrollTop=Hi.current.scrollHeight*Kr}}return Jn.addEventListener("scroll",gr),function(){Jn.removeEventListener("scroll",gr)}}},[ee,kn]),Object(n.useEffect)(function(){if(ee&&Cn){function Jn(gr,Zn){Cn(gr,Zn)}return ee.on("beforeChange",Jn),function(){ee.off("beforeChange",Jn)}}},[ee,Cn]),Object(n.useEffect)(function(){if(ee&&on){function Jn(){on(ee.getValue())}return ee.on("blur",Jn),function(){ee.off("blur",Jn)}}},[ee,on]),Object(n.useEffect)(function(){if(ee){function Jn(gr){var Zn=gr.getValue();Yt(Zn),Ta(new Date().getTime()),gr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(Zn)}return ee.on("change",Jn),function(){ee.off("change",Jn)}}},[ee,lt]),Object(n.useEffect)(function(){ee&&(Ze==null?(ee.setValue(""),Yt("")):Ze!==ee.getValue()&&(ee.setValue(Ze),Yt(Ze),ee.setCursor(ee.lineCount(),0)))},[ee,Ze]);var mo=Object(n.useCallback)(function(Jn){var gr=ee.getCursor(),Zn=ee.getSelection(),Mr=Zn.split(` `);switch(Jn){case"bold":return ee.replaceSelection("**"+Zn+"**"),Zn===""&&ee.setCursor(gr.line,gr.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Zn+"*"),Zn===""&&ee.setCursor(gr.line,gr.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Zn+"`"),Zn===""&&ee.setCursor(gr.line,gr.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Zn+"$$`"),Zn===""&&ee.setCursor(gr.line,gr.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Zn+"\n```"),ee.setCursor(gr.line+1,Zn.length+1),ee.focus();case"line-break":return ee.replaceSelection(`
          -`),ee.focus();case"list-ul":return Zn===""?ee.replaceSelection("- "+Zn):ee.replaceSelection(Lr.map(function(Hr){return Hr===""?"":"- ".concat(Hr)}).join(` -`)),ee.focus();case"list-ol":return Zn===""?ee.replaceSelection("1. "+Zn):ee.replaceSelection(Lr.map(function(Hr,gi){return Hr===""?"":"".concat(gi+1,". ").concat(Hr)}).join(` -`)),ee.focus();case"add-null-ch":return Zn===""&&ee.setCursor(gr.line,gr.ch+1),ee.replaceSelection(Ve),ee.focus();case"inster-template-1":return Zn===""&&ee.setCursor(gr.line,gr.ch),ee.replaceSelection(Je),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Gn(!In),ee.focus();case"trigger-full-screen":return ar(!vr),ee.focus();case le:ai(le);return;case Le:ai(Le);return;case Ee:ai(Ee);return;case ge:ai(ge);return;default:throw new Error}},[ee,In,vr]),Qi=Object(n.useCallback)(function(Jn){ai("");switch(Gr){case le:var gr=Jn.title,Zn=Jn.link;return ee.replaceSelection("[".concat(gr,"](").concat(Zn,")")),ee.focus();case Le:var Lr=Jn.language,Hr=Jn.content;return ee.replaceSelection(["```"+Lr,Hr,"```"].join(` -`)),ee.focus();case Ee:var gi=Jn.src,dr=Jn.alt;return dr?ee.replaceSelection("![ ".concat(dr," ]( ").concat(gi,' "').concat(dr,'" )')):ee.replaceSelection("![,](".concat(gi,")")),ee.focus();case ge:for(var Xi=Jn.row,ga=Jn.col,jr=Jn.align,qa=` -`,di=0;di300&&(Xi=300);var ga=wt+Xi+"px";ka(ga)}}return Jn.addEventListener("mousedown",Lr),document.addEventListener("mousemove",gi),document.addEventListener("mouseup",Hr),function(){Jn.removeEventListener("mousedown",Lr),document.removeEventListener("mousemove",gi),document.removeEventListener("mouseup",Hr)}}},[ee,or]),Object(n.useEffect)(function(){ka(wt)},[wt]);var ti=Ye($e),Bo=Ye(xo),Ha={width:ti,height:Bo},go=Object(n.useMemo)(function(){if(ia){var Jn=new Date(ia),gr=Jn.getHours(),Zn=Jn.getMinutes(),Lr=Jn.getSeconds();return gr=gr<10?"0"+gr:gr,Zn=Zn<10?"0"+Zn:Zn,Lr=Lr<10?"0"+Lr:Lr,"".concat(gr,":").concat(Zn,":").concat(Lr)}return 0},[ia]);function So(){window.sessionStorage.removeItem(Xt),yi(!1),Ca(0)}function Wa(){yi(!1),Ca(0),ee.setValue(window.sessionStorage.getItem(Xt))}function Ko(Jn,gr){var Zn=ee.getValue();Zn=Zn.replace(Jn,gr),Yt(Zn),ee==null||ee.setValue(Zn)}return l.a.createElement(n.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:oi},l.a.createElement("div",{className:"markdown-editor-container ".concat(Vt," ").concat(In?"on-preview":""," ").concat(st?"mini":""," ").concat(vr?"full-screen":""),style:Ha},l.a.createElement(P,{insertTemp:ht,watch:In,fullScreen:vr,showNullButton:Gt,onActionCallback:mo,hidetoolBar:Ln,uuid:Fr.current,setOpenPhones:function(){wr.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:_r,placeholder:Tr})),In?l.a.createElement("div",{ref:Wi,className:"preview-container"},Ht==="stex"&&l.a.createElement(O,{value:Lt}),Ht!=="stex"&&l.a.createElement(x.a,{edit:!0,value:Lt,replaces:Ko})):null))),Ut?l.a.createElement("a",{ref:or,className:"editor-resize"}):null,l.a.createElement(z.a,null,de[Gr]?l.a.createElement(v.a,{centered:!0,title:de[Gr],visible:!0,onCancel:La,footer:null,className:"markdown-popup-form"},Ka):null))}},P2ho:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};H.default=I},P5Jw:function(j,H,b){"use strict";var I=b("rHrb"),v=I.CopyToClipboard;v.CopyToClipboard=v,j.exports=v},PD8m:function(j,H){j.exports={name:"memoryStorage",read:I,write:v,each:T,remove:y,clearAll:g};var b={};function I(s){return b[s]}function v(s,_){b[s]=_}function T(s){for(var _ in b)b.hasOwnProperty(_)&&s(b[_],_)}function y(s){delete b[s]}function g(s){b={}}},PVpz:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=[],_=[],p=[],e=g.RabbitLegacy=y.extend({_doReset:function(){var n=this._key.words,l=this.cfg.iv,r=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],i=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var t=0;t<4;t++)o.call(this);for(var t=0;t<8;t++)i[t]^=r[t+4&7];if(l){var a=l.words,c=a[0],d=a[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,h=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=f>>>16|h&4294901760,E=h<<16|f&65535;i[0]^=f,i[1]^=u,i[2]^=h,i[3]^=E,i[4]^=f,i[5]^=u,i[6]^=h,i[7]^=E;for(var t=0;t<4;t++)o.call(this)}},_doProcessBlock:function(n,l){var r=this._X;o.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=(s[i]<<8|s[i]>>>24)&16711935|(s[i]<<24|s[i]>>>8)&4278255360,n[l+i]^=s[i]},blockSize:128/32,ivSize:64/32});function o(){for(var n=this._X,l=this._C,r=0;r<8;r++)_[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<_[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<_[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<_[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<_[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<_[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<_[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<_[6]>>>0?1:0)|0,this._b=l[7]>>>0<_[7]>>>0?1:0;for(var r=0;r<8;r++){var i=n[r]+l[r],t=i&65535,a=i>>>16,c=((t*t>>>17)+t*a>>>15)+a*a,d=((i&4294901760)*i|0)+((i&65535)*i|0);p[r]=c^d}n[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,n[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,n[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,n[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,n[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,n[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,n[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,n[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}v.RabbitLegacy=y._createHelper(e)}(),I.RabbitLegacy})},Plam:function(j,H,b){"use strict";var I=b("giR+"),v=b("fyUT"),T=b("2qtc"),y=b("kLXV"),g=b("DjyN"),s=b("NUBc"),_=b("+L6B"),p=b("2/Rp"),e=b("9og8"),o=b("tJVT"),n=b("k1fw"),l=b("WmNS"),r=b.n(l),i=b("q1tI"),t=b.n(i),a=b("8Abk"),c=b("IxHN"),d=b("M8RZ"),f=b("BdwD"),h=b("cWXX"),u=b("/ezw"),E=b("14J3"),x=b("BMrR"),O=b("jCWc"),C=b("kPKH"),w=b("Q9mQ"),S=b("diRs"),A=b("y8nQ"),D=b("Vl3Y"),M=b("9kvl"),N=b("dhSg"),P=b("mCJh"),z=b("lzim"),X=function(le){var Ee=le.pathsList,Le=le.dispatch,ge=D.a.useForm(),De=Object(o.a)(ge,1),_e=De[0],Xe=Object(i.useState)(),tt=Object(o.a)(Xe,2),Ge=tt[0],Me=tt[1],bt=Object(i.useState)(!0),Oe=Object(o.a)(bt,2),Ve=Oe[0],Je=Oe[1],Ye=Object(i.useState)(!1),Ne=Object(o.a)(Ye,2),He=Ne[0],ve=Ne[1],xe=Object(i.useState)({}),de=Object(o.a)(xe,2),je=de[0],Qe=de[1],ne=Object(i.useState)({keyword:je,robot:!0,page:1}),Ze=Object(o.a)(ne,2),lt=Ze[0],Be=Ze[1];Object(i.useEffect)(function(){N.a.subscribe("ai-replay-show",function(pt){Qe(pt),ve(!0)})},[]),Object(i.useEffect)(function(){je!=null&&je.id&&$e()},[je]);var $e=function(){var pt=Object(e.a)(r.a.mark(function st(Pe){var ze;return r.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Je(!0),ht.next=3,Object(P.a)(Object(n.a)(Object(n.a)({},lt),{},{keyword:je==null?void 0:je.content,id:je==null?void 0:je.id}));case 3:ze=ht.sent,Je(!1),ze!=null&&ze.data&&(lt.page++,Be(Object(n.a)({},lt)),Me(ze==null?void 0:ze.data));case 6:case"end":return ht.stop()}},st)}));return function(Pe){return pt.apply(this,arguments)}}(),it=function(){var pt=Object(e.a)(r.a.mark(function st(){return r.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:$e();case 1:case"end":return ze.stop()}},st)}));return function(){return pt.apply(this,arguments)}}(),wt=t.a.createElement("div",null,t.a.createElement("img",{src:z.s,width:150}));return t.a.createElement(t.a.Fragment,null,t.a.createElement(y.a,{title:"\u5176\u4ED6\u56DE\u7B54",mask:!0,visible:He,okText:"\u6362\u4E00\u6362",cancelText:"",onOk:it,width:800,height:500,footer:t.a.createElement(x.a,{align:"middle",justify:"center"},t.a.createElement(C.a,{className:"tc"},t.a.createElement(p.a,{type:"primary",onClick:$e},"\u6362\u4E00\u6362"),t.a.createElement(S.a,{content:wt,title:"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"},t.a.createElement(p.a,{type:"dashed"},"\u4EBA\u5DE5\u670D\u52A1")))),onCancel:function(){ve(!1)}},t.a.createElement("aside",{style:{minHeight:300}},t.a.createElement(x.a,null,t.a.createElement(u.a,{loading:Ve},Ge==null?void 0:Ge.map(function(pt){return t.a.createElement(C.a,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24},pt.text)}),!(Ge!=null&&Ge.length)&&t.a.createElement("div",{style:{width:"100%",textAlign:"center"}},t.a.createElement("br",null),t.a.createElement("img",{src:z.s,width:150}),t.a.createElement("br",null),t.a.createElement("br",null),"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"))))))},k=Object(M.a)(function(oe){var le=oe.pathsList;return{pathsList:le}})(X),F=b("fXAG"),U=b("5Dmo"),L=b("3S7+"),B=b("m3rI"),Z=b("9Bee"),re=b("Ypxr"),he=b("AMnG"),Se=b("kaH+"),ke=b("xKgJ"),te=b("dPi7"),Re=b.n(te),Ce=b("SzL9"),pe=b.n(Ce),me=b("MAU4"),se=b.n(me),be=b("n0Id"),ae=b.n(be),fe=b("Ty5D");function Fe(oe){var le=oe.data,Ee=oe.index,Le=oe.adminOrOperator,ge=oe.parentDiscussIndex,De=oe.shixunIdentifier,_e=oe.user,Xe=oe.onSetRewardData,tt=oe.onSetActionType,Ge=oe.onHandleSubmitDiscusses,Me=oe.onTopOrDownDiscuss,bt=oe.handleChildrenPlus,Oe=oe.anserAuthor,Ve=oe.onPlus,Je=oe.onHandleRepaly,Ye=oe.userInfomation,Ne=le.author,He=le.can_delete,ve=le.content,xe=le.hidden,de=le.id,je=le.reward,Qe=le.time,ne=le.reply_status,Ze=le.user_praise,lt=le.praise_count,Be=Object(i.useState)(!1),$e=Object(o.a)(Be,2),it=$e[0],wt=$e[1],pt=Object(i.useState)(!1),st=Object(o.a)(pt,2),Pe=st[0],ze=st[1],Et=Object(i.useState)(!1),ht=Object(o.a)(Et,2),Bt=ht[0],Ht=ht[1],mt=Object(i.useState)(!1),Xt=Object(o.a)(mt,2),jt=Xt[0],Ut=Xt[1],kt=function(){if(!it)return;Ge(de,{reply_status:2})},Kt=function(){if(!Pe)return;Ge(de,{reply_status:3})},rn=function(){Ge(de,{reply_status:1})},Gt=function(){Ge(de,{reply_status:4})},$t=function(){switch(ne){case 0:return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{onClick:rn,className:"whether-satisfied ".concat(Bt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Ht(!0)},onMouseLeave:function(){Ht(!1)}},t.a.createElement("img",{src:Bt?pe.a:Re.a,className:"whether-img SVGColor"}),"\u6EE1\u610F"),t.a.createElement(S.a,{placement:"bottomLeft",content:t.a.createElement("div",{className:"content"},t.a.createElement("div",{className:"content-disappoint"},"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5:"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(it?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){wt(!0)},onMouseLeave:function(){wt(!1)},onClick:kt},"\u8BF7",Ne==null?void 0:Ne.name.trim(),"\u8001\u5E08\u518D\u5C1D\u8BD5\u56DE\u7B54\u4E00\u6B21\u3002"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(Pe?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){ze(!0)},onMouseLeave:function(){ze(!1)},onClick:Kt},"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u5176\u4ED6\u8001\u5E08\u56DE\u7B54\u3002")),trigger:"click"},t.a.createElement("div",{className:"whether-satisfied ".concat(jt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Ut(!0)},onMouseLeave:function(){Ut(!1)}},t.a.createElement("img",{src:jt?ae.a:se.a,className:"whether-img SVGColor"}),"\u4E0D\u6EE1\u610F")));case 1:return t.a.createElement("div",{className:"radius-box cursorPoint height30 ".concat(Ee>0?"gray-background":"blue-background"),onClick:Gt},"\u6211\u5F88\u6EE1\u610F");case 2:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 3:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u5176\u4ED6\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 4:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u6211\u5F88\u6EE1\u610F");default:return t.a.createElement(t.a.Fragment,null)}};function Ln(){Xe({id:de,index:Ee,user_id:Ne.user_id,parentDiscussIndex:ge})}function pn(){tt({id:de,index:Ee,params:{hidden:xe?"0":"1",container_identifier:De},type:"hidden-discuss",parentDiscussIndex:ge,message:xe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function Dn(){tt({id:de,index:Ee,type:"delete-discuss",parentDiscussIndex:ge,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var sn=function(){Je(de,!Ze,ge,Ee)},Sn=Le||He||Ne.user_id===_e.user_id||Ne.login===_e.login,Kn=Object(fe.h)().pathname.split("/")[1]==="tasks";return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"second-level-discuss"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Ne.login),target:"_blank"},Ne.name),t.a.createElement("span",{className:"grey"},Qe),je?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(je)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,je)):null)),t.a.createElement(Z.a,{className:"discuss-content ".concat(Ee>0?"content-gray":""),value:ve})),Kn&&t.a.createElement("div",{className:"btn-group-succes"},t.a.createElement("div",{className:"btn-group-gratify"},$t()),t.a.createElement("div",{className:"btn-group-other"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"btn-group"},_e.identity===1?t.a.createElement("a",{onClick:Ln,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,Le?t.a.createElement("a",{onClick:pn,title:xe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:xe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Sn?t.a.createElement("a",{onClick:Dn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:sn,className:Ze?"c-orange":""},t.a.createElement("i",{className:Ze?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))))))}var ie=function(oe){var le=oe.data,Ee=oe.index,Le=oe.shixunIdentifier,ge=oe.adminOrOperator,De=oe.identity,_e=oe.onTopOrDownDiscuss,Xe=oe.onPlusDiscuss,tt=oe.onDisableDiscuss,Ge=oe.onSetActionType,Me=oe.onSetRewardData,bt=oe.user,Oe=oe.activeDiscussIndex,Ve=oe.onReplyDiscuss,Je=oe.onSetActiveDiscussIndex,Ye=oe.allowDisableDiscuss,Ne=oe.onHandleSubmitDiscusses,He=oe.onHandleRepaly,ve=oe.userInfomation,xe=le.content,de=le.children,je=le.game_url,Qe=le.hidden,ne=le.id,Ze=le.position,lt=le.praise_count,Be=le.reward,$e=le.sticky,it=le.time,wt=le.user_praise,pt=le.game_passed,st=le.ai_reply_text,Pe=le.ai_reply_flag,ze=le.author,Et=le.disable_discuss_status,ht=le.reply_status,Bt=Object(i.useState)(!1),Ht=Object(o.a)(Bt,2),mt=Ht[0],Xt=Ht[1];Object(i.useEffect)(function(){mt&&setTimeout(function(){return Xt(!1)},800)},[mt]);function jt(){var pn;if(!((pn=Object(ke.x)())!==null&&pn!==void 0&&pn.authentication)){y.a.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:function(){window.open("/account/certification")}});return}Je(ne)}function Ut(){_e(ne,!$e,Ee)}function kt(){Xe(ne,!wt,Ee)}function Kt(){Me({id:ne,index:Ee,user_id:ze.user_id})}function rn(){Ge({id:ne,index:Ee,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Gt(){Ge({id:ne,index:Ee,params:{hidden:Qe?"0":"1",container_identifier:Le},type:"hidden-discuss",message:Qe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function $t(){tt(ne,Et===0?2:0,Ee)}var Ln=function(Dn){var sn=Dn.target,Sn=sn.nodeName,Kn=sn.src;Sn==="IMG"&&(N.a.publish("preview-image",Kn),console.log("src:",Kn))};return t.a.createElement("div",{className:"discuss-item-container",key:ne},t.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(B.a.IMG_SERVER,"/images/").concat(ze.image_url),width:"50"})),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},ze.name),t.a.createElement("span",{className:"grey"},it),Ze?t.a.createElement("span",{className:"c-green"}," [\u7B2C",Ze,"\u5173] "):null,je?t.a.createElement("a",{href:je,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,Ye&&t.a.createElement(t.a.Fragment,null,Et===0&&t.a.createElement(L.a,{title:"\u7981\u6B62\u8BE5\u7528\u6237\u5728\u6B64\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:$t,className:"c-red current"},"\u7981\u6B62\u8BC4\u8BBA\u529F\u80FD")),Et===2&&t.a.createElement(L.a,{title:"\u6062\u590D\u8BE5\u7528\u6237\u5728\u6B64\u5B9E\u8DF5\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:$t,className:"c-light-primary current"},"\u6062\u590D\u8BC4\u8BBA\u529F\u80FD")),Et===1&&t.a.createElement(L.a,{title:"\u8BE5\u7528\u6237\u5DF2\u88AB\u7CFB\u7EDF\u7BA1\u7406\u5458\u7981\u8A00"},t.a.createElement("span",{className:"c-red"},"\u88AB\u7BA1\u7406\u5458\u7981\u6B62\u8BC4\u8BBA"))),$e?t.a.createElement("span",{className:"top"},"\u7F6E\u9876"):null,Be?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Be)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,Be)):null,De<=5?t.a.createElement("span",{style:{flex:"1",textAlign:"right",color:pt===1?"#29bd8b":""}},pt===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173"):null),t.a.createElement("div",{onClick:Ln},t.a.createElement(Z.a,{className:"discuss-content",value:xe})),Pe&&t.a.createElement("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"}},t.a.createElement("br",null),t.a.createElement("div",{style:{padding:"6px 0"}},st),t.a.createElement(p.a,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return Xt(!0)},className:"mr10 mr5 relative c-blue"},t.a.createElement("span",{className:mt?"plus-one-animate":"hide",style:{position:"absolute"}}," ","+1"),t.a.createElement("span",{className:"c-blue icon-duiwoyouyong mr5"}),t.a.createElement("span",{className:"c-blue"},"\u5BF9\u6211\u6709\u7528")),t.a.createElement("span",{className:"c-orange current",onClick:function(){N.a.publish("ai-replay-show",{content:xe,id:ne})}},"\u5176\u4ED6\u56DE\u7B54")),de&&de.length>0?t.a.createElement("div",{className:"reply-discuss-containerActive",onClick:Ln},de.map(function(pn,Dn){return t.a.createElement(Fe,{key:pn.id,data:pn,index:Dn,userInfomation:ve,onTopOrDownDiscuss:_e,shixunIdentifier:Le,onHandleSubmitDiscusses:Ne,adminOrOperator:ge,user:bt,onSetRewardData:Me,onSetActionType:Ge,parentDiscussIndex:Ee,anserAuthor:ze,onHandleRepaly:He})})):null,t.a.createElement("div",{className:"btn-group"},t.a.createElement("div",{className:"btn-group-other"},bt.identity===1?t.a.createElement("a",{onClick:Kt,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,ge?t.a.createElement("a",{onClick:Gt,title:Qe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Qe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,De<=5?t.a.createElement("a",{onClick:Ut,className:$e?"btn-top":"btn-down",title:$e?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},t.a.createElement("i",{className:"iconfont icon-zhiding1 "})):null,ge&&(!de||de.length==0)?t.a.createElement("a",{onClick:rn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:jt,title:"\u56DE\u590D"},t.a.createElement("i",{className:"iconfont icon-huifu1"})),t.a.createElement("a",{onClick:kt,className:wt?"c-orange":""},t.a.createElement("i",{className:wt?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))),t.a.createElement(he.a,{id:ne,activeDiscussIndex:Oe,onReplyDiscuss:Ve})))},q={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Q(oe,le){switch(le.type){case F.Q:return Object(n.a)(Object(n.a)({},oe),{},{loading:!0});case F.X:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!0});case F.b:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!1});case F.l:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.ab:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.x:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.c:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.z:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.H:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.a:return Object(n.a)(Object(n.a)({},oe),le.payload);default:throw new Error}}var Y=H.a=function(oe){var le=oe.shixunIdentifier,Ee=oe.identity,Le=oe.activeIndex,ge=oe.user,De=oe.allowDisableDiscuss,_e=oe.userInfo,Xe=oe.isShixunDetail,tt=Xe===void 0?!1:Xe,Ge=oe.taskData,Me=Object(i.useReducer)(Q,q),bt=Object(o.a)(Me,2),Oe=bt[0],Ve=bt[1],Je=Object(i.useState)(!0),Ye=Object(o.a)(Je,2),Ne=Ye[0],He=Ye[1],ve=Object(i.useState)(null),xe=Object(o.a)(ve,2),de=xe[0],je=xe[1],Qe=Oe.page,ne=Oe.loading,Ze=Oe.data,lt=Oe.actionType,Be=Oe.showRewardDialog,$e=Oe.activeDiscussIndex,it=Object(i.useRef)(),wt=Object(i.useRef)();function pt(ce,V){return st.apply(this,arguments)}function st(){return st=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!ne){ue.next=2;break}return ue.abrupt("return");case 2:return ue.prev=2,Ve({type:F.Q}),ue.next=6,Object(P.e)(le,V);case 6:ee=ue.sent,Ve({type:F.l,payload:{activeDiscussIndex:J?$e:null,page:V,data:ee,loading:!1}}),ue.next=13;break;case 10:ue.prev=10,ue.t0=ue.catch(2),console.log(ue.t0);case 13:case"end":return ue.stop()}},ce,null,[[2,10]])})),st.apply(this,arguments)}Object(i.useEffect)(function(){return Ne||(clearInterval(de),je(setInterval(function(){pt(Qe,!0)},5e3))),function(){clearInterval(de)}},[Ne,Qe,$e]);function Pe(ce){pt(ce)}function ze(ce,V,J){return Et.apply(this,arguments)}function Et(){return Et=Object(e.a)(r.a.mark(function ce(V,J,ee){var Te;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.g)(V,J);case 3:Te=nt.sent,ir[ee].user_praise=J,ir[ee].praise_count=Te.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}}),nt.next=12;break;case 9:nt.prev=9,nt.t0=nt.catch(0),console.log(nt.t0);case 12:case"end":return nt.stop()}},ce,null,[[0,9]])})),Et.apply(this,arguments)}function ht(ce,V,J,ee){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(e.a)(r.a.mark(function ce(V,J,ee,Te){var ue;return r.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.prev=0,Lt.next=3,Object(P.g)(V,J);case 3:ue=Lt.sent,ir[ee].children[Te].user_praise=J,ir[ee].children[Te].praise_count=ue.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}}),Lt.next=12;break;case 9:Lt.prev=9,Lt.t0=Lt.catch(0),console.log(Lt.t0);case 12:case"end":return Lt.stop()}},ce,null,[[0,9]])})),Bt.apply(this,arguments)}function Ht(ce,V,J){return mt.apply(this,arguments)}function mt(){return mt=Object(e.a)(r.a.mark(function ce(V,J,ee){var Te,ue,nt;return r.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.prev=0,Yt.next=3,Object(P.d)(V,J);case 3:if(Te=Yt.sent,!(Te.status!==0)){Yt.next=6;break}return Yt.abrupt("return");case 6:ue=ir[ee].author.user_id,nt=ir.map(function(on){return on.author.user_id===ue?Object(n.a)(Object(n.a)({},on),{},{disable_discuss_status:J}):on}),Ve({type:F.c,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nt})}}),Yt.next=14;break;case 11:Yt.prev=11,Yt.t0=Yt.catch(0),console.log(Yt.t0);case 14:case"end":return Yt.stop()}},ce,null,[[0,11]])})),mt.apply(this,arguments)}function Xt(ce,V,J){return jt.apply(this,arguments)}function jt(){return jt=Object(e.a)(r.a.mark(function ce(V,J,ee){return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.k)(V,J);case 3:ir[ee].sticky=J,Ve({type:F.ab,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}}),pt(Oe.page),ue.next=11;break;case 8:ue.prev=8,ue.t0=ue.catch(0),console.log(ue.t0);case 11:case"end":return ue.stop()}},ce,null,[[0,8]])})),jt.apply(this,arguments)}function Ut(){Ve({type:F.z,payload:{actionType:null}})}function kt(){return Kt.apply(this,arguments)}function Kt(){return Kt=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Te,ue,nt,Lt,Yt;return r.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(V=lt.id,J=lt.params,ee=lt.type,Te=lt.index,ue=lt.parentDiscussIndex,!(ee==="hidden-discuss")){Qt.next=6;break}return Qt.next=4,Object(P.f)(V,J);case 4:ue?ir[ue].children[Te].hidden=J.hidden==1:ir[Te].hidden=J.hidden==1,Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}});case 6:if(!(ee==="delete-discuss")){Qt.next=31;break}return Qt.next=9,Object(P.c)(V);case 9:if(!(ue||ue===0)){Qt.next=22;break}nt=ir[ue].children,Lt=nt.length-1;case 12:if(!(Lt>=0)){Qt.next=19;break}if(!(nt[Lt].id===V)){Qt.next=16;break}return nt.splice(Lt,1),Qt.abrupt("break",19);case 16:Lt--,Qt.next=12;break;case 19:ir[ue].children=nt,Qt.next=30;break;case 22:Yt=ir.length-1;case 23:if(!(Yt>=0)){Qt.next=30;break}if(!(ir[Yt].id===V)){Qt.next=27;break}return ir.splice(Yt,1),Qt.abrupt("break",30);case 27:Yt--,Qt.next=23;break;case 30:Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}});case 31:case"end":return Qt.stop()}},ce)})),Kt.apply(this,arguments)}function rn(ce){Ve({type:F.z,payload:{actionType:ce}})}function Gt(){Ve({type:F.b})}function $t(){return Ln.apply(this,arguments)}function Ln(){return Ln=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Te,ue,nt,Lt;return r.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return V=it.current,J=V.id,ee=V.index,Te=V.score,ue=V.user_id,nt=V.parentDiscussIndex,on.next=3,Object(P.i)(J,{container_type:"Discusses",score:Te,user_id:ue});case 3:Lt=on.sent,nt?ir[nt].children[ee].reward=Lt.code:ir[ee].reward=Lt.code,Ve({type:F.H,payload:{showRewardDialog:!1,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ir})}}),it.current=null;case 7:case"end":return on.stop()}},ce)})),Ln.apply(this,arguments)}function pn(ce){it.current=ce,Ve({type:F.X})}function Dn(ce){it.current.score=ce}function sn(ce,V){return Sn.apply(this,arguments)}function Sn(){return Sn=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.h)(V,J);case 3:if(ee=ue.sent,!(ee.status===-3)){ue.next=8;break}return y.a.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),Vt(null),ue.abrupt("return");case 8:pt(Qe),ue.next=14;break;case 11:ue.prev=11,ue.t0=ue.catch(0),console.log(ue.t0);case 14:case"end":return ue.stop()}},ce,null,[[0,11]])})),Sn.apply(this,arguments)}function Kn(ce,V){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(e.a)(r.a.mark(function ce(V,J){var ee,Te;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.j)(V,J);case 3:if(ee=nt.sent,Te=ee.status,!(Te!==1)){nt.next=7;break}return nt.abrupt("return");case 7:pt(Qe),nt.next=13;break;case 10:nt.prev=10,nt.t0=nt.catch(0),console.log(nt.t0);case 13:case"end":return nt.stop()}},ce,null,[[0,10]])})),Qn.apply(this,arguments)}function Vt(ce){$e===ce?Ve({type:F.a,payload:{activeDiscussIndex:null}}):Ve({type:F.a,payload:{activeDiscussIndex:ce}})}if(Object(i.useEffect)(function(){function ce(){return V.apply(this,arguments)}function V(){return V=Object(e.a)(r.a.mark(function J(){return r.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(!(Le===3&&!Ze&&le)){Te.next=3;break}return Te.next=3,pt(Qe);case 3:case"end":return Te.stop()}},J)})),V.apply(this,arguments)}ce()},[le,Le,Qe,Ve]),Object(i.useEffect)(function(){var ce=N.a.subscribe("create-discuss",function(){pt(Qe)});return ce},[le]),!Ze)return t.a.createElement(c.a,null);var wn=function(){He(!Ne),Ne?je(setInterval(function(){pt(Qe,!0)},5e3)):clearInterval(de)},$n=Ze.disscuss_count,ir=Ze.comments,Tr=Ze.all,qn=Ze.can_hidden;return t.a.createElement(i.Fragment,null,t.a.createElement("div",{className:"discuss-container",ref:wt},(Ge==null?void 0:Ge.myshixun_manager)&&t.a.createElement(p.a,{style:{float:"right",marginBottom:10},type:"primary",onClick:wn},Ne?"\u5F00\u542F\u5B9E\u65F6\u5237\u65B0":"\u505C\u6B62\u5B9E\u65F6\u5237\u65B0"),$n===0?t.a.createElement(f.a,{styles:{clear:"both",pointerEvents:"none"}}):null,ir.map(function(ce,V){return t.a.createElement(ie,{user:ge,key:ce.id,userInfomation:_e,data:ce,index:V,identity:Ee,onPaginationChange:Pe,shixunIdentifier:le,onSetActionType:rn,onTopOrDownDiscuss:Xt,adminOrOperator:qn,onPlusDiscuss:ze,onDisableDiscuss:Ht,onSetRewardData:pn,activeDiscussIndex:$e,onHandleSubmitDiscusses:Kn,onSetActiveDiscussIndex:Vt,onReplyDiscuss:sn,allowDisableDiscuss:De,onHandleRepaly:ht})}),$n>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(s.a,{showQuickJumper:!0,showSizeChanger:!1,onChange:Pe,current:Qe,total:$n})):null,t.a.createElement(k,null)),t.a.createElement(d.a,null,t.a.createElement(y.a,{centered:!0,title:"\u63D0\u793A",visible:!!lt,onOk:kt,onCancel:Ut},t.a.createElement("p",null,lt?lt.message:"")),t.a.createElement(y.a,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",visible:Be,onCancel:Gt,onOk:$t},t.a.createElement(v.a,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:Dn,style:{width:"228px"}}))))}},"Q+I+":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAeFBMVEUAAACvv7+nt8elusWmusKnt8OmucKmucGlt8KmuMKlt8GmuMKmuMGluMKmt8KluMKmuMKmt8KluMGmuMKmuMGlt8KluMGmuMGmuMK+y9PQ2d/W3uPb4ubg5unk6ezo7O/r7/Hu8vTx9Pb09/j3+fr6+/z9/f7///9IiVUSAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAACAElEQVRYw+3X2XaCMBAG4CzFYtSgIiRYu7rk/d+wCJwUy8wk0V72v9KjfCdMhoQwNkm22loy64Vk4ci1jciKh5ystlHZBQYlI51Wose0s9HRlJPbhAgCKlKgJQGlOHYzufx5se4y40lQzWb9dYvnfqJ8gVUG/L15Ozrnzl+v05+YGjeD+JlwCNqf3JDTHodsLZi2FNScnc+lwaG2GWoSenejfBLQbjxRANQN6NzsL53U4JANQN31H9Yeuw8vD0LvfwhdHoReBujgwjUqyREN6e/sRMzaZvycolA/MPdGQMV45UChU7ghc8ZNEHqFBzSGTLteqhDU9FN2Jh5aq9qnn/tyKwlCHw6a+xuo7BZwYTwLOXv4QWuv9pAZVl1ZUdARrvR1xgeo8lsT1wNUoZU+WBTS441JanOFCqzSX+Di30JGT3ZKmQk2RyoN3Ji1GRMZtt9KpKcPUPHIndaAPT3kePNTQUIKHBAI5SQkoqEq8FqjY6E8AInIbbYKvmmpOCgLv/ttHn0T8Tdnwk7JWczrqPkbJyyZSCcklZJFhxMV15ylBOsCM2OJERpiFGfpEctfC2Y5v4fprbm3yvxu5bbPFWP/0KS9n67xh8lV91UkMxly4NrKxOHgJ5C0LiDOW2nFqlNOV+y+g1saVOFQkQRpHJonQRxdI8vEPuIavLsSnbNvHF76qBcgeTgAAAAASUVORK5CYII="},Q7Vx:function(j,H,b){},QV2g:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(){for(var y,g=[],s=0;s<256;s++){y=s;for(var _=0;_<8;_++)y=y&1?3988292384^y>>>1:y>>>1;g[s]=y}return g}var v=I();function T(y,g,s,_){var p=v,e=_+s;y^=-1;for(var o=_;o>>8^p[(y^g[o])&255];return y^-1}},RELg:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"oldIE-userDataStorage",write:_,read:p,each:e,remove:o,clearAll:n};var T="storejs",y=v.document,g=i(),s=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function _(t,a){if(s)return;var c=r(t);g(function(d){d.setAttribute(c,a),d.save(T)})}function p(t){if(s)return;var a=r(t),c=null;return g(function(d){c=d.getAttribute(a)}),c}function e(t){g(function(a){for(var c=a.XMLDocument.documentElement.attributes,d=c.length-1;d>=0;d--){var f=c[d];t(a.getAttribute(f.name),f.name)}})}function o(t){var a=r(t);g(function(c){c.removeAttribute(a),c.save(T)})}function n(){g(function(t){var a=t.XMLDocument.documentElement.attributes;t.load(T);for(var c=a.length-1;c>=0;c--)t.removeAttribute(a[c].name);t.save(T)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(t){return t.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!y||!y.documentElement||!y.documentElement.addBehavior)return null;var t="script",a,c,d;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+t+">document.w=window'),c.close(),a=c.w.frames[0].document,d=a.createElement("div")}catch(f){d=y.createElement("div"),a=y.body}return function(f){var h=[].slice.call(arguments,0);h.unshift(d),a.appendChild(d),d.addBehavior("#default#userData"),d.load(T),f.apply(this,h),a.removeChild(d);return}}},RMFE:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RTVd:function(j,H,b){j.exports={"code-area-container":"code-area-container___37oB0","only-view":"only-view___1om7F","monaco-editor-container":"monaco-editor-container___2UFXm",frame:"frame___2B67h"}},"S+dL":function(j,H){j.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},S6kV:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.OFB=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._keystream;p&&(e=this._keystream=p.slice(0),this._iv=void 0),s.encryptBlock(e,0);for(var o=0;o<_;o++)y[g+o]^=e[o]}});return v.Decryptor=T,v}(),I.mode.OFB})},"SA+Z":function(j,H,b){var I=b("wTVA"),v=b("EbDI"),T=b("ZhPi"),y=b("wkBT");function g(s){return I(s)||v(s)||T(s)||y()}j.exports=g,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,H){/** +`),ee.focus();default:throw new Error}},[ee,Gr]),Wa=Object(n.useMemo)(function(){switch(Gr){case le:return l.a.createElement(re,{callback:Vi,onCancel:Ma});case Le:return l.a.createElement(he.b,{callback:Vi,onCancel:Ma});case Ee:return l.a.createElement(pe,{callback:Vi,onCancel:Ma});case ge:return l.a.createElement(Q,{callback:Vi,onCancel:Ma});default:return null}},[Gr]);function Ma(){si("")}Object(n.useEffect)(function(){if(sr.current){var Jn=sr.current,gr=!1,Zn=0;function Mr(cr){gr=!0,Zn=cr.pageY}function Kr(){gr=!1}function gi(cr){if(gr){var Wi=cr.pageY-Zn;Wi<0&&(Wi=0),Wi>300&&(Wi=300);var ma=St+Wi+"px";La(ma)}}return Jn.addEventListener("mousedown",Mr),document.addEventListener("mousemove",gi),document.addEventListener("mouseup",Kr),function(){Jn.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",gi),document.removeEventListener("mouseup",Kr)}}},[ee,sr]),Object(n.useEffect)(function(){La(St)},[St]);var ni=Ye($e),Ho=Ye(wo),Xa={width:ni,height:Ho},go=Object(n.useMemo)(function(){if(ra){var Jn=new Date(ra),gr=Jn.getHours(),Zn=Jn.getMinutes(),Mr=Jn.getSeconds();return gr=gr<10?"0"+gr:gr,Zn=Zn<10?"0"+Zn:Zn,Mr=Mr<10?"0"+Mr:Mr,"".concat(gr,":").concat(Zn,":").concat(Mr)}return 0},[ra]);function To(){window.sessionStorage.removeItem(Xt),bi(!1),Ta(0)}function za(){bi(!1),Ta(0),ee.setValue(window.sessionStorage.getItem(Xt))}function Wo(Jn,gr){var Zn=ee.getValue();Zn=Zn.replace(Jn,gr),Yt(Zn),ee==null||ee.setValue(Zn)}return l.a.createElement(n.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:li},l.a.createElement("div",{className:"markdown-editor-container ".concat(Vt," ").concat(kn?"on-preview":""," ").concat(st?"mini":""," ").concat(vr?"full-screen":""),style:Xa},l.a.createElement(P,{insertTemp:ht,watch:kn,fullScreen:vr,showNullButton:zt,onActionCallback:mo,hidetoolBar:Pn,uuid:Fr.current,setOpenPhones:function(){Cr.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:_r,placeholder:Ar})),kn?l.a.createElement("div",{ref:Hi,className:"preview-container"},Ht==="stex"&&l.a.createElement(O,{value:kt}),Ht!=="stex"&&l.a.createElement(x.a,{edit:!0,value:kt,replaces:Wo})):null))),Ut?l.a.createElement("a",{ref:sr,className:"editor-resize"}):null,l.a.createElement(z.a,null,de[Gr]?l.a.createElement(v.a,{centered:!0,title:de[Gr],visible:!0,onCancel:Ma,footer:null,className:"markdown-popup-form"},Wa):null))}},P2ho:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};H.default=I},P5Jw:function(j,H,b){"use strict";var I=b("rHrb"),v=I.CopyToClipboard;v.CopyToClipboard=v,j.exports=v},PD8m:function(j,H){j.exports={name:"memoryStorage",read:I,write:v,each:T,remove:y,clearAll:g};var b={};function I(s){return b[s]}function v(s,_){b[s]=_}function T(s){for(var _ in b)b.hasOwnProperty(_)&&s(b[_],_)}function y(s){delete b[s]}function g(s){b={}}},PVpz:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=[],_=[],p=[],e=g.RabbitLegacy=y.extend({_doReset:function(){var n=this._key.words,l=this.cfg.iv,r=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],i=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var t=0;t<4;t++)o.call(this);for(var t=0;t<8;t++)i[t]^=r[t+4&7];if(l){var a=l.words,c=a[0],d=a[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,h=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=f>>>16|h&4294901760,E=h<<16|f&65535;i[0]^=f,i[1]^=u,i[2]^=h,i[3]^=E,i[4]^=f,i[5]^=u,i[6]^=h,i[7]^=E;for(var t=0;t<4;t++)o.call(this)}},_doProcessBlock:function(n,l){var r=this._X;o.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=(s[i]<<8|s[i]>>>24)&16711935|(s[i]<<24|s[i]>>>8)&4278255360,n[l+i]^=s[i]},blockSize:128/32,ivSize:64/32});function o(){for(var n=this._X,l=this._C,r=0;r<8;r++)_[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<_[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<_[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<_[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<_[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<_[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<_[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<_[6]>>>0?1:0)|0,this._b=l[7]>>>0<_[7]>>>0?1:0;for(var r=0;r<8;r++){var i=n[r]+l[r],t=i&65535,a=i>>>16,c=((t*t>>>17)+t*a>>>15)+a*a,d=((i&4294901760)*i|0)+((i&65535)*i|0);p[r]=c^d}n[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,n[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,n[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,n[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,n[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,n[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,n[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,n[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}v.RabbitLegacy=y._createHelper(e)}(),I.RabbitLegacy})},Plam:function(j,H,b){"use strict";var I=b("giR+"),v=b("fyUT"),T=b("2qtc"),y=b("kLXV"),g=b("DjyN"),s=b("NUBc"),_=b("+L6B"),p=b("2/Rp"),e=b("9og8"),o=b("tJVT"),n=b("k1fw"),l=b("WmNS"),r=b.n(l),i=b("q1tI"),t=b.n(i),a=b("8Abk"),c=b("IxHN"),d=b("M8RZ"),f=b("BdwD"),h=b("cWXX"),u=b("/ezw"),E=b("14J3"),x=b("BMrR"),O=b("jCWc"),C=b("kPKH"),w=b("Q9mQ"),S=b("diRs"),A=b("y8nQ"),D=b("Vl3Y"),M=b("9kvl"),N=b("dhSg"),P=b("mCJh"),z=b("lzim"),X=function(le){var Ee=le.pathsList,Le=le.dispatch,ge=D.a.useForm(),De=Object(o.a)(ge,1),_e=De[0],Xe=Object(i.useState)(),tt=Object(o.a)(Xe,2),Ge=tt[0],Me=tt[1],Et=Object(i.useState)(!0),Oe=Object(o.a)(Et,2),Ve=Oe[0],Je=Oe[1],Ye=Object(i.useState)(!1),Ne=Object(o.a)(Ye,2),He=Ne[0],ve=Ne[1],xe=Object(i.useState)({}),de=Object(o.a)(xe,2),je=de[0],Qe=de[1],ne=Object(i.useState)({keyword:je,robot:!0,page:1}),Ze=Object(o.a)(ne,2),lt=Ze[0],Be=Ze[1];Object(i.useEffect)(function(){N.a.subscribe("ai-replay-show",function(pt){Qe(pt),ve(!0)})},[]),Object(i.useEffect)(function(){je!=null&&je.id&&$e()},[je]);var $e=function(){var pt=Object(e.a)(r.a.mark(function st(Pe){var ze;return r.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Je(!0),ht.next=3,Object(P.a)(Object(n.a)(Object(n.a)({},lt),{},{keyword:je==null?void 0:je.content,id:je==null?void 0:je.id}));case 3:ze=ht.sent,Je(!1),ze!=null&&ze.data&&(lt.page++,Be(Object(n.a)({},lt)),Me(ze==null?void 0:ze.data));case 6:case"end":return ht.stop()}},st)}));return function(Pe){return pt.apply(this,arguments)}}(),rt=function(){var pt=Object(e.a)(r.a.mark(function st(){return r.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:$e();case 1:case"end":return ze.stop()}},st)}));return function(){return pt.apply(this,arguments)}}(),St=t.a.createElement("div",null,t.a.createElement("img",{src:z.s,width:150}));return t.a.createElement(t.a.Fragment,null,t.a.createElement(y.a,{title:"\u5176\u4ED6\u56DE\u7B54",mask:!0,visible:He,okText:"\u6362\u4E00\u6362",cancelText:"",onOk:rt,width:800,height:500,footer:t.a.createElement(x.a,{align:"middle",justify:"center"},t.a.createElement(C.a,{className:"tc"},t.a.createElement(p.a,{type:"primary",onClick:$e},"\u6362\u4E00\u6362"),t.a.createElement(S.a,{content:St,title:"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"},t.a.createElement(p.a,{type:"dashed"},"\u4EBA\u5DE5\u670D\u52A1")))),onCancel:function(){ve(!1)}},t.a.createElement("aside",{style:{minHeight:300}},t.a.createElement(x.a,null,t.a.createElement(u.a,{loading:Ve},Ge==null?void 0:Ge.map(function(pt){return t.a.createElement(C.a,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24},pt.text)}),!(Ge!=null&&Ge.length)&&t.a.createElement("div",{style:{width:"100%",textAlign:"center"}},t.a.createElement("br",null),t.a.createElement("img",{src:z.s,width:150}),t.a.createElement("br",null),t.a.createElement("br",null),"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"))))))},k=Object(M.a)(function(oe){var le=oe.pathsList;return{pathsList:le}})(X),F=b("fXAG"),U=b("5Dmo"),L=b("3S7+"),B=b("m3rI"),Z=b("9Bee"),re=b("Ypxr"),he=b("AMnG"),Se=b("kaH+"),ke=b("xKgJ"),te=b("dPi7"),Re=b.n(te),Ce=b("SzL9"),pe=b.n(Ce),me=b("MAU4"),se=b.n(me),be=b("n0Id"),ae=b.n(be),fe=b("Ty5D");function Fe(oe){var le=oe.data,Ee=oe.index,Le=oe.adminOrOperator,ge=oe.parentDiscussIndex,De=oe.shixunIdentifier,_e=oe.user,Xe=oe.onSetRewardData,tt=oe.onSetActionType,Ge=oe.onHandleSubmitDiscusses,Me=oe.onTopOrDownDiscuss,Et=oe.handleChildrenPlus,Oe=oe.anserAuthor,Ve=oe.onPlus,Je=oe.onHandleRepaly,Ye=oe.userInfomation,Ne=le.author,He=le.can_delete,ve=le.content,xe=le.hidden,de=le.id,je=le.reward,Qe=le.time,ne=le.reply_status,Ze=le.user_praise,lt=le.praise_count,Be=Object(i.useState)(!1),$e=Object(o.a)(Be,2),rt=$e[0],St=$e[1],pt=Object(i.useState)(!1),st=Object(o.a)(pt,2),Pe=st[0],ze=st[1],xt=Object(i.useState)(!1),ht=Object(o.a)(xt,2),Bt=ht[0],Ht=ht[1],gt=Object(i.useState)(!1),Xt=Object(o.a)(gt,2),jt=Xt[0],Ut=Xt[1],It=function(){if(!rt)return;Ge(de,{reply_status:2})},Kt=function(){if(!Pe)return;Ge(de,{reply_status:3})},rn=function(){Ge(de,{reply_status:1})},zt=function(){Ge(de,{reply_status:4})},$t=function(){switch(ne){case 0:return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{onClick:rn,className:"whether-satisfied ".concat(Bt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Ht(!0)},onMouseLeave:function(){Ht(!1)}},t.a.createElement("img",{src:Bt?pe.a:Re.a,className:"whether-img SVGColor"}),"\u6EE1\u610F"),t.a.createElement(S.a,{placement:"bottomLeft",content:t.a.createElement("div",{className:"content"},t.a.createElement("div",{className:"content-disappoint"},"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5:"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(rt?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){St(!0)},onMouseLeave:function(){St(!1)},onClick:It},"\u8BF7",Ne==null?void 0:Ne.name.trim(),"\u8001\u5E08\u518D\u5C1D\u8BD5\u56DE\u7B54\u4E00\u6B21\u3002"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(Pe?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){ze(!0)},onMouseLeave:function(){ze(!1)},onClick:Kt},"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u5176\u4ED6\u8001\u5E08\u56DE\u7B54\u3002")),trigger:"click"},t.a.createElement("div",{className:"whether-satisfied ".concat(jt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Ut(!0)},onMouseLeave:function(){Ut(!1)}},t.a.createElement("img",{src:jt?ae.a:se.a,className:"whether-img SVGColor"}),"\u4E0D\u6EE1\u610F")));case 1:return t.a.createElement("div",{className:"radius-box cursorPoint height30 ".concat(Ee>0?"gray-background":"blue-background"),onClick:zt},"\u6211\u5F88\u6EE1\u610F");case 2:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 3:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u5176\u4ED6\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 4:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u6211\u5F88\u6EE1\u610F");default:return t.a.createElement(t.a.Fragment,null)}};function Pn(){Xe({id:de,index:Ee,user_id:Ne.user_id,parentDiscussIndex:ge})}function fn(){tt({id:de,index:Ee,params:{hidden:xe?"0":"1",container_identifier:De},type:"hidden-discuss",parentDiscussIndex:ge,message:xe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function In(){tt({id:de,index:Ee,type:"delete-discuss",parentDiscussIndex:ge,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var on=function(){Je(de,!Ze,ge,Ee)},Cn=Le||He||Ne.user_id===_e.user_id||Ne.login===_e.login,Hn=Object(fe.h)().pathname.split("/")[1]==="tasks";return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"second-level-discuss"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Ne.login),target:"_blank"},Ne.name),t.a.createElement("span",{className:"grey"},Qe),je?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(je)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,je)):null)),t.a.createElement(Z.a,{className:"discuss-content ".concat(Ee>0?"content-gray":""),value:ve})),Hn&&t.a.createElement("div",{className:"btn-group-succes"},t.a.createElement("div",{className:"btn-group-gratify"},$t()),t.a.createElement("div",{className:"btn-group-other"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"btn-group"},_e.identity===1?t.a.createElement("a",{onClick:Pn,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,Le?t.a.createElement("a",{onClick:fn,title:xe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:xe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Cn?t.a.createElement("a",{onClick:In,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:on,className:Ze?"c-orange":""},t.a.createElement("i",{className:Ze?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))))))}var ie=function(oe){var le=oe.data,Ee=oe.index,Le=oe.shixunIdentifier,ge=oe.adminOrOperator,De=oe.identity,_e=oe.onTopOrDownDiscuss,Xe=oe.onPlusDiscuss,tt=oe.onDisableDiscuss,Ge=oe.onSetActionType,Me=oe.onSetRewardData,Et=oe.user,Oe=oe.activeDiscussIndex,Ve=oe.onReplyDiscuss,Je=oe.onSetActiveDiscussIndex,Ye=oe.allowDisableDiscuss,Ne=oe.onHandleSubmitDiscusses,He=oe.onHandleRepaly,ve=oe.userInfomation,xe=le.content,de=le.children,je=le.game_url,Qe=le.hidden,ne=le.id,Ze=le.position,lt=le.praise_count,Be=le.reward,$e=le.sticky,rt=le.time,St=le.user_praise,pt=le.game_passed,st=le.ai_reply_text,Pe=le.ai_reply_flag,ze=le.author,xt=le.disable_discuss_status,ht=le.reply_status,Bt=Object(i.useState)(!1),Ht=Object(o.a)(Bt,2),gt=Ht[0],Xt=Ht[1];Object(i.useEffect)(function(){gt&&setTimeout(function(){return Xt(!1)},800)},[gt]);function jt(){var fn;if(!((fn=Object(ke.x)())!==null&&fn!==void 0&&fn.authentication)){y.a.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:function(){window.open("/account/certification")}});return}Je(ne)}function Ut(){_e(ne,!$e,Ee)}function It(){Xe(ne,!St,Ee)}function Kt(){Me({id:ne,index:Ee,user_id:ze.user_id})}function rn(){Ge({id:ne,index:Ee,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function zt(){Ge({id:ne,index:Ee,params:{hidden:Qe?"0":"1",container_identifier:Le},type:"hidden-discuss",message:Qe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function $t(){tt(ne,xt===0?2:0,Ee)}var Pn=function(In){var on=In.target,Cn=on.nodeName,Hn=on.src;Cn==="IMG"&&(N.a.publish("preview-image",Hn),console.log("src:",Hn))};return t.a.createElement("div",{className:"discuss-item-container",key:ne},t.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(B.a.IMG_SERVER,"/images/").concat(ze.image_url),width:"50"})),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},ze.name),t.a.createElement("span",{className:"grey"},rt),Ze?t.a.createElement("span",{className:"c-green"}," [\u7B2C",Ze,"\u5173] "):null,je?t.a.createElement("a",{href:je,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,Ye&&t.a.createElement(t.a.Fragment,null,xt===0&&t.a.createElement(L.a,{title:"\u7981\u6B62\u8BE5\u7528\u6237\u5728\u6B64\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:$t,className:"c-red current"},"\u7981\u6B62\u8BC4\u8BBA\u529F\u80FD")),xt===2&&t.a.createElement(L.a,{title:"\u6062\u590D\u8BE5\u7528\u6237\u5728\u6B64\u5B9E\u8DF5\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:$t,className:"c-light-primary current"},"\u6062\u590D\u8BC4\u8BBA\u529F\u80FD")),xt===1&&t.a.createElement(L.a,{title:"\u8BE5\u7528\u6237\u5DF2\u88AB\u7CFB\u7EDF\u7BA1\u7406\u5458\u7981\u8A00"},t.a.createElement("span",{className:"c-red"},"\u88AB\u7BA1\u7406\u5458\u7981\u6B62\u8BC4\u8BBA"))),$e?t.a.createElement("span",{className:"top"},"\u7F6E\u9876"):null,Be?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Be)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,Be)):null,De<=5?t.a.createElement("span",{style:{flex:"1",textAlign:"right",color:pt===1?"#29bd8b":""}},pt===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173"):null),t.a.createElement("div",{onClick:Pn},t.a.createElement(Z.a,{className:"discuss-content",value:xe})),Pe&&t.a.createElement("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"}},t.a.createElement("br",null),t.a.createElement("div",{style:{padding:"6px 0"}},st),t.a.createElement(p.a,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return Xt(!0)},className:"mr10 mr5 relative c-blue"},t.a.createElement("span",{className:gt?"plus-one-animate":"hide",style:{position:"absolute"}}," ","+1"),t.a.createElement("span",{className:"c-blue icon-duiwoyouyong mr5"}),t.a.createElement("span",{className:"c-blue"},"\u5BF9\u6211\u6709\u7528")),t.a.createElement("span",{className:"c-orange current",onClick:function(){N.a.publish("ai-replay-show",{content:xe,id:ne})}},"\u5176\u4ED6\u56DE\u7B54")),de&&de.length>0?t.a.createElement("div",{className:"reply-discuss-containerActive",onClick:Pn},de.map(function(fn,In){return t.a.createElement(Fe,{key:fn.id,data:fn,index:In,userInfomation:ve,onTopOrDownDiscuss:_e,shixunIdentifier:Le,onHandleSubmitDiscusses:Ne,adminOrOperator:ge,user:Et,onSetRewardData:Me,onSetActionType:Ge,parentDiscussIndex:Ee,anserAuthor:ze,onHandleRepaly:He})})):null,t.a.createElement("div",{className:"btn-group"},t.a.createElement("div",{className:"btn-group-other"},Et.identity===1?t.a.createElement("a",{onClick:Kt,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,ge?t.a.createElement("a",{onClick:zt,title:Qe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Qe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,De<=5?t.a.createElement("a",{onClick:Ut,className:$e?"btn-top":"btn-down",title:$e?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},t.a.createElement("i",{className:"iconfont icon-zhiding1 "})):null,ge&&(!de||de.length==0)?t.a.createElement("a",{onClick:rn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:jt,title:"\u56DE\u590D"},t.a.createElement("i",{className:"iconfont icon-huifu1"})),t.a.createElement("a",{onClick:It,className:St?"c-orange":""},t.a.createElement("i",{className:St?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))),t.a.createElement(he.a,{id:ne,activeDiscussIndex:Oe,onReplyDiscuss:Ve})))},q={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Q(oe,le){switch(le.type){case F.Q:return Object(n.a)(Object(n.a)({},oe),{},{loading:!0});case F.X:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!0});case F.b:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!1});case F.l:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.ab:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.x:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.c:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.z:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.H:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.a:return Object(n.a)(Object(n.a)({},oe),le.payload);default:throw new Error}}var Y=H.a=function(oe){var le=oe.shixunIdentifier,Ee=oe.identity,Le=oe.activeIndex,ge=oe.user,De=oe.allowDisableDiscuss,_e=oe.userInfo,Xe=oe.isShixunDetail,tt=Xe===void 0?!1:Xe,Ge=oe.taskData,Me=Object(i.useReducer)(Q,q),Et=Object(o.a)(Me,2),Oe=Et[0],Ve=Et[1],Je=Object(i.useState)(!0),Ye=Object(o.a)(Je,2),Ne=Ye[0],He=Ye[1],ve=Object(i.useState)(null),xe=Object(o.a)(ve,2),de=xe[0],je=xe[1],Qe=Oe.page,ne=Oe.loading,Ze=Oe.data,lt=Oe.actionType,Be=Oe.showRewardDialog,$e=Oe.activeDiscussIndex,rt=Object(i.useRef)(),St=Object(i.useRef)();function pt(ce,V){return st.apply(this,arguments)}function st(){return st=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!ne){ue.next=2;break}return ue.abrupt("return");case 2:return ue.prev=2,Ve({type:F.Q}),ue.next=6,Object(P.e)(le,V);case 6:ee=ue.sent,Ve({type:F.l,payload:{activeDiscussIndex:J?$e:null,page:V,data:ee,loading:!1}}),ue.next=13;break;case 10:ue.prev=10,ue.t0=ue.catch(2),console.log(ue.t0);case 13:case"end":return ue.stop()}},ce,null,[[2,10]])})),st.apply(this,arguments)}Object(i.useEffect)(function(){return Ne||(clearInterval(de),je(setInterval(function(){pt(Qe,!0)},5e3))),function(){clearInterval(de)}},[Ne,Qe,$e]);function Pe(ce){pt(ce)}function ze(ce,V,J){return xt.apply(this,arguments)}function xt(){return xt=Object(e.a)(r.a.mark(function ce(V,J,ee){var Te;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.g)(V,J);case 3:Te=nt.sent,ar[ee].user_praise=J,ar[ee].praise_count=Te.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}}),nt.next=12;break;case 9:nt.prev=9,nt.t0=nt.catch(0),console.log(nt.t0);case 12:case"end":return nt.stop()}},ce,null,[[0,9]])})),xt.apply(this,arguments)}function ht(ce,V,J,ee){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(e.a)(r.a.mark(function ce(V,J,ee,Te){var ue;return r.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,Object(P.g)(V,J);case 3:ue=kt.sent,ar[ee].children[Te].user_praise=J,ar[ee].children[Te].praise_count=ue.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}}),kt.next=12;break;case 9:kt.prev=9,kt.t0=kt.catch(0),console.log(kt.t0);case 12:case"end":return kt.stop()}},ce,null,[[0,9]])})),Bt.apply(this,arguments)}function Ht(ce,V,J){return gt.apply(this,arguments)}function gt(){return gt=Object(e.a)(r.a.mark(function ce(V,J,ee){var Te,ue,nt;return r.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.prev=0,Yt.next=3,Object(P.d)(V,J);case 3:if(Te=Yt.sent,!(Te.status!==0)){Yt.next=6;break}return Yt.abrupt("return");case 6:ue=ar[ee].author.user_id,nt=ar.map(function(sn){return sn.author.user_id===ue?Object(n.a)(Object(n.a)({},sn),{},{disable_discuss_status:J}):sn}),Ve({type:F.c,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nt})}}),Yt.next=14;break;case 11:Yt.prev=11,Yt.t0=Yt.catch(0),console.log(Yt.t0);case 14:case"end":return Yt.stop()}},ce,null,[[0,11]])})),gt.apply(this,arguments)}function Xt(ce,V,J){return jt.apply(this,arguments)}function jt(){return jt=Object(e.a)(r.a.mark(function ce(V,J,ee){return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.k)(V,J);case 3:ar[ee].sticky=J,Ve({type:F.ab,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}}),pt(Oe.page),ue.next=11;break;case 8:ue.prev=8,ue.t0=ue.catch(0),console.log(ue.t0);case 11:case"end":return ue.stop()}},ce,null,[[0,8]])})),jt.apply(this,arguments)}function Ut(){Ve({type:F.z,payload:{actionType:null}})}function It(){return Kt.apply(this,arguments)}function Kt(){return Kt=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Te,ue,nt,kt,Yt;return r.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(V=lt.id,J=lt.params,ee=lt.type,Te=lt.index,ue=lt.parentDiscussIndex,!(ee==="hidden-discuss")){Qt.next=6;break}return Qt.next=4,Object(P.f)(V,J);case 4:ue?ar[ue].children[Te].hidden=J.hidden==1:ar[Te].hidden=J.hidden==1,Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}});case 6:if(!(ee==="delete-discuss")){Qt.next=31;break}return Qt.next=9,Object(P.c)(V);case 9:if(!(ue||ue===0)){Qt.next=22;break}nt=ar[ue].children,kt=nt.length-1;case 12:if(!(kt>=0)){Qt.next=19;break}if(!(nt[kt].id===V)){Qt.next=16;break}return nt.splice(kt,1),Qt.abrupt("break",19);case 16:kt--,Qt.next=12;break;case 19:ar[ue].children=nt,Qt.next=30;break;case 22:Yt=ar.length-1;case 23:if(!(Yt>=0)){Qt.next=30;break}if(!(ar[Yt].id===V)){Qt.next=27;break}return ar.splice(Yt,1),Qt.abrupt("break",30);case 27:Yt--,Qt.next=23;break;case 30:Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}});case 31:case"end":return Qt.stop()}},ce)})),Kt.apply(this,arguments)}function rn(ce){Ve({type:F.z,payload:{actionType:ce}})}function zt(){Ve({type:F.b})}function $t(){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Te,ue,nt,kt;return r.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return V=rt.current,J=V.id,ee=V.index,Te=V.score,ue=V.user_id,nt=V.parentDiscussIndex,sn.next=3,Object(P.i)(J,{container_type:"Discusses",score:Te,user_id:ue});case 3:kt=sn.sent,nt?ar[nt].children[ee].reward=kt.code:ar[ee].reward=kt.code,Ve({type:F.H,payload:{showRewardDialog:!1,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:ar})}}),rt.current=null;case 7:case"end":return sn.stop()}},ce)})),Pn.apply(this,arguments)}function fn(ce){rt.current=ce,Ve({type:F.X})}function In(ce){rt.current.score=ce}function on(ce,V){return Cn.apply(this,arguments)}function Cn(){return Cn=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.h)(V,J);case 3:if(ee=ue.sent,!(ee.status===-3)){ue.next=8;break}return y.a.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),Vt(null),ue.abrupt("return");case 8:pt(Qe),ue.next=14;break;case 11:ue.prev=11,ue.t0=ue.catch(0),console.log(ue.t0);case 14:case"end":return ue.stop()}},ce,null,[[0,11]])})),Cn.apply(this,arguments)}function Hn(ce,V){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(e.a)(r.a.mark(function ce(V,J){var ee,Te;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.j)(V,J);case 3:if(ee=nt.sent,Te=ee.status,!(Te!==1)){nt.next=7;break}return nt.abrupt("return");case 7:pt(Qe),nt.next=13;break;case 10:nt.prev=10,nt.t0=nt.catch(0),console.log(nt.t0);case 13:case"end":return nt.stop()}},ce,null,[[0,10]])})),Qn.apply(this,arguments)}function Vt(ce){$e===ce?Ve({type:F.a,payload:{activeDiscussIndex:null}}):Ve({type:F.a,payload:{activeDiscussIndex:ce}})}if(Object(i.useEffect)(function(){function ce(){return V.apply(this,arguments)}function V(){return V=Object(e.a)(r.a.mark(function J(){return r.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(!(Le===3&&!Ze&&le)){Te.next=3;break}return Te.next=3,pt(Qe);case 3:case"end":return Te.stop()}},J)})),V.apply(this,arguments)}ce()},[le,Le,Qe,Ve]),Object(i.useEffect)(function(){var ce=N.a.subscribe("create-discuss",function(){pt(Qe)});return ce},[le]),!Ze)return t.a.createElement(c.a,null);var xn=function(){He(!Ne),Ne?je(setInterval(function(){pt(Qe,!0)},5e3)):clearInterval(de)},er=Ze.disscuss_count,ar=Ze.comments,Ar=Ze.all,$n=Ze.can_hidden;return t.a.createElement(i.Fragment,null,t.a.createElement("div",{className:"discuss-container",ref:St},(Ge==null?void 0:Ge.myshixun_manager)&&t.a.createElement(p.a,{style:{float:"right",marginBottom:10},type:"primary",onClick:xn},Ne?"\u5F00\u542F\u5B9E\u65F6\u5237\u65B0":"\u505C\u6B62\u5B9E\u65F6\u5237\u65B0"),er===0?t.a.createElement(f.a,{styles:{clear:"both",pointerEvents:"none"}}):null,ar.map(function(ce,V){return t.a.createElement(ie,{user:ge,key:ce.id,userInfomation:_e,data:ce,index:V,identity:Ee,onPaginationChange:Pe,shixunIdentifier:le,onSetActionType:rn,onTopOrDownDiscuss:Xt,adminOrOperator:$n,onPlusDiscuss:ze,onDisableDiscuss:Ht,onSetRewardData:fn,activeDiscussIndex:$e,onHandleSubmitDiscusses:Hn,onSetActiveDiscussIndex:Vt,onReplyDiscuss:on,allowDisableDiscuss:De,onHandleRepaly:ht})}),er>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(s.a,{showQuickJumper:!0,showSizeChanger:!1,onChange:Pe,current:Qe,total:er})):null,t.a.createElement(k,null)),t.a.createElement(d.a,null,t.a.createElement(y.a,{centered:!0,title:"\u63D0\u793A",visible:!!lt,onOk:It,onCancel:Ut},t.a.createElement("p",null,lt?lt.message:"")),t.a.createElement(y.a,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",visible:Be,onCancel:zt,onOk:$t},t.a.createElement(v.a,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:In,style:{width:"228px"}}))))}},"Q+I+":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAeFBMVEUAAACvv7+nt8elusWmusKnt8OmucKmucGlt8KmuMKlt8GmuMKmuMGluMKmt8KluMKmuMKmt8KluMGmuMKmuMGlt8KluMGmuMGmuMK+y9PQ2d/W3uPb4ubg5unk6ezo7O/r7/Hu8vTx9Pb09/j3+fr6+/z9/f7///9IiVUSAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAACAElEQVRYw+3X2XaCMBAG4CzFYtSgIiRYu7rk/d+wCJwUy8wk0V72v9KjfCdMhoQwNkm22loy64Vk4ci1jciKh5ystlHZBQYlI51Wose0s9HRlJPbhAgCKlKgJQGlOHYzufx5se4y40lQzWb9dYvnfqJ8gVUG/L15Ozrnzl+v05+YGjeD+JlwCNqf3JDTHodsLZi2FNScnc+lwaG2GWoSenejfBLQbjxRANQN6NzsL53U4JANQN31H9Yeuw8vD0LvfwhdHoReBujgwjUqyREN6e/sRMzaZvycolA/MPdGQMV45UChU7ghc8ZNEHqFBzSGTLteqhDU9FN2Jh5aq9qnn/tyKwlCHw6a+xuo7BZwYTwLOXv4QWuv9pAZVl1ZUdARrvR1xgeo8lsT1wNUoZU+WBTS441JanOFCqzSX+Di30JGT3ZKmQk2RyoN3Ji1GRMZtt9KpKcPUPHIndaAPT3kePNTQUIKHBAI5SQkoqEq8FqjY6E8AInIbbYKvmmpOCgLv/ttHn0T8Tdnwk7JWczrqPkbJyyZSCcklZJFhxMV15ylBOsCM2OJERpiFGfpEctfC2Y5v4fprbm3yvxu5bbPFWP/0KS9n67xh8lV91UkMxly4NrKxOHgJ5C0LiDOW2nFqlNOV+y+g1saVOFQkQRpHJonQRxdI8vEPuIavLsSnbNvHF76qBcgeTgAAAAASUVORK5CYII="},Q7Vx:function(j,H,b){},QV2g:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(){for(var y,g=[],s=0;s<256;s++){y=s;for(var _=0;_<8;_++)y=y&1?3988292384^y>>>1:y>>>1;g[s]=y}return g}var v=I();function T(y,g,s,_){var p=v,e=_+s;y^=-1;for(var o=_;o>>8^p[(y^g[o])&255];return y^-1}},RELg:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"oldIE-userDataStorage",write:_,read:p,each:e,remove:o,clearAll:n};var T="storejs",y=v.document,g=i(),s=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function _(t,a){if(s)return;var c=r(t);g(function(d){d.setAttribute(c,a),d.save(T)})}function p(t){if(s)return;var a=r(t),c=null;return g(function(d){c=d.getAttribute(a)}),c}function e(t){g(function(a){for(var c=a.XMLDocument.documentElement.attributes,d=c.length-1;d>=0;d--){var f=c[d];t(a.getAttribute(f.name),f.name)}})}function o(t){var a=r(t);g(function(c){c.removeAttribute(a),c.save(T)})}function n(){g(function(t){var a=t.XMLDocument.documentElement.attributes;t.load(T);for(var c=a.length-1;c>=0;c--)t.removeAttribute(a[c].name);t.save(T)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(t){return t.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!y||!y.documentElement||!y.documentElement.addBehavior)return null;var t="script",a,c,d;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+t+">document.w=window'),c.close(),a=c.w.frames[0].document,d=a.createElement("div")}catch(f){d=y.createElement("div"),a=y.body}return function(f){var h=[].slice.call(arguments,0);h.unshift(d),a.appendChild(d),d.addBehavior("#default#userData"),d.load(T),f.apply(this,h),a.removeChild(d);return}}},RMFE:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RTVd:function(j,H,b){j.exports={"code-area-container":"code-area-container___37oB0","only-view":"only-view___1om7F","monaco-editor-container":"monaco-editor-container___2UFXm",frame:"frame___2B67h"}},"S+dL":function(j,H){j.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},S6kV:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.OFB=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._keystream;p&&(e=this._keystream=p.slice(0),this._iv=void 0),s.encryptBlock(e,0);for(var o=0;o<_;o++)y[g+o]^=e[o]}});return v.Decryptor=T,v}(),I.mode.OFB})},"SA+Z":function(j,H,b){var I=b("wTVA"),v=b("EbDI"),T=b("ZhPi"),y=b("wkBT");function g(s){return I(s)||v(s)||T(s)||y()}j.exports=g,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,H){/** * @license * Copyright (C) 2006 Google Inc. * @@ -343,12 +343,12 @@ connection closed`)}}var z=setInterval(function(){M.current&&M.current.send(JSON * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var b,I,v,T=!1,y,g;window.PR_SHOULD_USE_CONTINUATION=!0;var s,_;(function(){var p=window,e=["break,continue,do,else,for,if,return,while"],o=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],r=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],t="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",a=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],c="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",d=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],f=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],h=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],u=[l,i,r,a,c,d,f,h],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",O="kwd",C="com",w="typ",S="lit",A="pun",D="pln",M="tag",N="dec",P="src",z="atn",X="atv",k="nocode",F="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var q=0,Q=!1,Y=!1,oe=0,le=ie.length;oe122||(ve<65||He>90||bt.push([Math.max(65,He)|32,Math.min(ve,90)|32]),ve<97||He>122||bt.push([Math.max(97,He)&~32,Math.min(ve,122)&~32]))}}bt.sort(function(Qe,ne){return Qe[0]-ne[0]||ne[1]-Qe[1]});for(var xe=[],de=[],Je=0;Jeje[0]&&(je[1]+1>je[0]&&Ve.push("-"),Ve.push(De(je[1])))}return Ve.push("]"),Ve.join("")}function Xe(Ge){for(var Me=Ge.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),bt=Me.length,Oe=[],Ve=0,Je=0;Ve=2&&He==="["?Me[Ve]=_e(Ye):He!=="\\"&&(Me[Ve]=Ye.replace(/[a-zA-Z]/g,function(de){var je=de.charCodeAt(0);return"["+String.fromCharCode(je&~32,je|32)+"]"}))}return Me.join("")}for(var tt=[],oe=0,le=ie.length;oe|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var q=0,Q=!1,Y=!1,oe=0,le=ie.length;oe122||(ve<65||He>90||Et.push([Math.max(65,He)|32,Math.min(ve,90)|32]),ve<97||He>122||Et.push([Math.max(97,He)&~32,Math.min(ve,122)&~32]))}}Et.sort(function(Qe,ne){return Qe[0]-ne[0]||ne[1]-Qe[1]});for(var xe=[],de=[],Je=0;Jeje[0]&&(je[1]+1>je[0]&&Ve.push("-"),Ve.push(De(je[1])))}return Ve.push("]"),Ve.join("")}function Xe(Ge){for(var Me=Ge.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Et=Me.length,Oe=[],Ve=0,Je=0;Ve=2&&He==="["?Me[Ve]=_e(Ye):He!=="\\"&&(Me[Ve]=Ye.replace(/[a-zA-Z]/g,function(de){var je=de.charCodeAt(0);return"["+String.fromCharCode(je&~32,je|32)+"]"}))}return Me.join("")}for(var tt=[],oe=0,le=ie.length;oe=0;)Q[tt.charAt(Ge)]=Xe;var Me=Xe[1],bt=""+Me;ge.hasOwnProperty(bt)||(Le.push(Me),ge[bt]=null)}Le.push(/[\0-\uffff]/),Y=U(Le)})();var oe=q.length,le=function(Ee){for(var Le=Ee.sourceCode,ge=Ee.basePos,De=Ee.sourceNode,_e=[ge,D],Xe=0,tt=Le.match(Y)||[],Ge={},Me=0,bt=tt.length;Me=5&&Ve.substring(0,5)==="lang-",Ye&&!(Je&&typeof Je[1]=="string")&&(Ye=!1,Ve=P),Ye||(Ge[Oe]=Ve)}var ve=Xe;if(Xe+=Oe.length,!Ye)_e.push(ge+ve,Ve);else{var xe=Je[1],de=Oe.indexOf(xe),je=de+xe.length;Je[2]&&(je=Oe.length-Je[2].length,de=je-xe.length);var Qe=Ve.substring(5);B(De,ge+ve,Oe.substring(0,de),le,_e),B(De,ge+ve+de,xe,me(Qe,xe),_e),B(De,ge+ve+je,Oe.substring(je),le,_e)}}Ee.decorations=_e};return le}function Se(ie){var q=[],Q=[];ie.tripleQuotedStrings?q.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?q.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&Q.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=ie.hashComments;Y&&(ie.cStyleComments?(Y>1?q.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Q.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(Q.push([C,/^\/\/[^\r\n]*/,null]),Q.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var oe=ie.regexLiterals;if(oe){var le=oe>1?"":` +`):tt=tt.replace(/[ \t\r\n]+/g," "),Y[Ee]=tt,le[Ee<<1]=oe,oe+=tt.length,le[Ee++<<1|1]=ge)}}return Le(ie),{sourceCode:Y.join("").replace(/\n$/,""),spans:le}}function B(ie,q,Q,Y,oe){if(!Q)return;var le={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:Q,spans:null,basePos:q,decorations:null};Y(le),oe.push.apply(oe,le.decorations)}var Z=/\S/;function re(ie){for(var q=void 0,Q=ie.firstChild;Q;Q=Q.nextSibling){var Y=Q.nodeType;q=Y===1?q?ie:Q:Y===3&&Z.test(Q.nodeValue)?ie:q}return q===ie?void 0:q}function he(ie,q){var Q={},Y;(function(){for(var Ee=ie.concat(q),Le=[],ge={},De=0,_e=Ee.length;De<_e;++De){var Xe=Ee[De],tt=Xe[3];if(tt)for(var Ge=tt.length;--Ge>=0;)Q[tt.charAt(Ge)]=Xe;var Me=Xe[1],Et=""+Me;ge.hasOwnProperty(Et)||(Le.push(Me),ge[Et]=null)}Le.push(/[\0-\uffff]/),Y=U(Le)})();var oe=q.length,le=function(Ee){for(var Le=Ee.sourceCode,ge=Ee.basePos,De=Ee.sourceNode,_e=[ge,D],Xe=0,tt=Le.match(Y)||[],Ge={},Me=0,Et=tt.length;Me=5&&Ve.substring(0,5)==="lang-",Ye&&!(Je&&typeof Je[1]=="string")&&(Ye=!1,Ve=P),Ye||(Ge[Oe]=Ve)}var ve=Xe;if(Xe+=Oe.length,!Ye)_e.push(ge+ve,Ve);else{var xe=Je[1],de=Oe.indexOf(xe),je=de+xe.length;Je[2]&&(je=Oe.length-Je[2].length,de=je-xe.length);var Qe=Ve.substring(5);B(De,ge+ve,Oe.substring(0,de),le,_e),B(De,ge+ve+de,xe,me(Qe,xe),_e),B(De,ge+ve+je,Oe.substring(je),le,_e)}}Ee.decorations=_e};return le}function Se(ie){var q=[],Q=[];ie.tripleQuotedStrings?q.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?q.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&Q.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=ie.hashComments;Y&&(ie.cStyleComments?(Y>1?q.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Q.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(Q.push([C,/^\/\/[^\r\n]*/,null]),Q.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var oe=ie.regexLiterals;if(oe){var le=oe>1?"":` \r`,Ee=le?".":"[\\S\\s]",Le="/(?=[^/*"+le+"])(?:[^/\\x5B\\x5C"+le+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+le+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Q.push(["lang-regex",RegExp("^"+F+"("+Le+")")])}var ge=ie.types;ge&&Q.push([w,ge]);var De=(""+ie.keywords).replace(/^ | $/g,"");De.length&&Q.push([O,new RegExp("^(?:"+De.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([D,/^\s+/,null,` \r - \xA0`]);var _e="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(_e+="(?!s*/)"),Q.push([S,/^@[a-z_$][a-z_$@0-9]*/i,null],[w,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[D,/^[a-z_$][a-z_$@0-9]*/i,null],[S,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[D,/^\\[\s\S]?/,null],[A,new RegExp(_e),null]),he(q,Q)}var ke=Se({keywords:u,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function te(ie,q,Q){for(var Y=/(?:^|\s)nocode(?:\s|$)/,oe=/\r\n?|\n/,le=ie.ownerDocument,Ee=le.createElement("li");ie.firstChild;)Ee.appendChild(ie.firstChild);var Le=[Ee];function ge(Me){var bt=Me.nodeType;if(bt==1&&!Y.test(Me.className))if(Me.nodeName==="br")De(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var Oe=Me.firstChild;Oe;Oe=Oe.nextSibling)ge(Oe);else if((bt==3||bt==4)&&Q){var Ve=Me.nodeValue,Je=Ve.match(oe);if(Je){var Ye=Ve.substring(0,Je.index);Me.nodeValue=Ye;var Ne=Ve.substring(Je.index+Je[0].length);if(Ne){var He=Me.parentNode;He.insertBefore(le.createTextNode(Ne),Me.nextSibling)}De(Me),Ye||Me.parentNode.removeChild(Me)}}}function De(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function bt(Je,Ye){var Ne=Ye?Je.cloneNode(!1):Je,He=Je.parentNode;if(He){var ve=bt(He,1),xe=Je.nextSibling;ve.appendChild(Ne);for(var de=xe;de;de=xe)xe=de.nextSibling,ve.appendChild(de)}return Ne}for(var Oe=bt(Me.nextSibling,0),Ve;(Ve=Oe.parentNode)&&Ve.nodeType===1;)Oe=Ve;Le.push(Oe)}for(var _e=0;_e=He&&(ge+=2),le>=ve&&(Xe+=2)}}finally{Ve&&(Ve.style.display=Je)}}var Ce={};function pe(ie,q){for(var Q=q.length;--Q>=0;){var Y=q[Q];Ce.hasOwnProperty(Y)?p.console&&console.warn("cannot override language handler %s",Y):Ce[Y]=ie}}function me(ie,q){return ie&&Ce.hasOwnProperty(ie)||(ie=/^\s*]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[A,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),pe(he([[D,/^[\s]+/,null,` \r -`],[X,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[A,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),pe(he([],[[X,/^[\s\S]+/]]),["uq.val"]),pe(Se({keywords:l,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),pe(Se({keywords:"null,true,false"}),["json"]),pe(Se({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),pe(Se({keywords:r,cStyleComments:!0}),["java"]),pe(Se({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(Se({keywords:d,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(Se({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(Se({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(Se({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(Se({keywords:t,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(he([],[[x,/^[\s\S]+/]]),["regex"]);function se(ie){var q=ie.langExtension;try{var Q=L(ie.sourceNode,ie.pre),Y=Q.sourceCode;ie.sourceCode=Y,ie.spans=Q.spans,ie.basePos=0,me(q,Y)(ie),Re(ie)}catch(oe){p.console&&console.log(oe&&oe.stack||oe)}}function be(ie,q,Q){var Y=Q||!1,oe=q||null,le=document.createElement("div");le.innerHTML="
          "+ie+"
          ",le=le.firstChild,Y&&te(le,Y,!0);var Ee={langExtension:oe,numberLines:Y,sourceNode:le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se(Ee),le.innerHTML}function ae(ie,q){var Q=q||document.body,Y=Q.ownerDocument||document;function oe(Ne){return Q.getElementsByTagName(Ne)}for(var le=[oe("pre"),oe("code"),oe("xmp")],Ee=[],Le=0;Le=g.right?s.x=g.width-1:s.x=v-g.left,T=g.bottom?s.y=g.height-1:s.y=T-g.top,s}},Sa5k:function(j,H,b){j.exports=b.p+"static/nothing.4d201a0a.png"},Scqh:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAZ5JREFUWEftmM9Kw0AQxuebJBQJnuxREA+CV+mLeO0DlD6AZ1+gV6tQWqhe2ptUBX0JEQ/iQQ8ieFQshCDBZEdWGglCSVKbdJHmkBxmsvPbb2f/DWjyiAiGw+FaEATVKIpWRIRjWxFfAMqyrI9KpfJar9ffAIiOA/3qdDoOgE0Aq0UET2tTRDwReWo2m5/QynS73a1FwSRGyGs0Go8YDAZV3/c30npRht113Wf0+/3tMAzdMgKmxbBt20ev19spOoHTQGK7TnSdP7WsP5ThtwRKU/lfKFRTSu0DCIjoGMBVWq/z2HMrpJQaEdF6YmbcAmgR0UOewNN8ZwG6/t0YgEhETpn5iIi8v4DNBSgBMAbQtizrTCn1vVnmfeYNFMe/J6IWM9+ZAkST48S5bdvtKIres4IVpVAyvgdgD8BNFqgygDTHCzPvLoGmKGDGkOmkFpELx3EOTEhqY6b9mJkPmXm00IVx0VuHWZsrEf0cP0TkhJkvs6wvWX1yL4xZG57VbwmUppx5Chl3UTTuKm1cscG4cozOeqMKVvE0NKWk9wWBdSawQzyy4QAAAABJRU5ErkJggg=="},SgaC:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_0;){if(n.rQwait("RRE",4+8))return!1;var t=n.rQshiftBytes(4),a=n.rQshift16(),c=n.rQshift16(),d=n.rQshift16(),f=n.rQshift16();l.fillRect(_+a,p+c,d,f,t),this._subrects--}return!0}}]),g}();H.default=y},SzL9:function(j,H,b){j.exports=b.p+"static/appoint2.ec9f16d8.svg"},T8No:function(j,H,b){"use strict";b.d(H,"a",function(){return _}),b.d(H,"e",function(){return p}),b.d(H,"c",function(){return A}),b.d(H,"b",function(){return D}),b.d(H,"d",function(){return M}),b.d(H,"f",function(){return z});var I=b("MNsG"),v=b("N0LK"),T=b("Cg/j");let y=I.k||"";const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",I.f),g.set("isLinux",I.d),g.set("isWindows",I.i),g.set("isWeb",I.h),g.set("isMacNative",I.f&&!I.h),g.set("isEdge",y.indexOf("Edg/")>=0),g.set("isFirefox",y.indexOf("Firefox")>=0),g.set("isChrome",y.indexOf("Chrome")>=0),g.set("isSafari",y.indexOf("Safari")>=0);const s=Object.prototype.hasOwnProperty;class _{static has(k){return l.create(k)}static equals(k,F){return r.create(k,F)}static regex(k,F){return x.create(k,F)}static not(k){return c.create(k)}static and(...k){return w.create(k,null)}static or(...k){return S.create(k,null,!0)}static deserialize(k,F=!1){return k?this._deserializeOrExpression(k,F):void 0}static _deserializeOrExpression(k,F){let U=k.split("||");return S.create(U.map(L=>this._deserializeAndExpression(L,F)),null,!0)}static _deserializeAndExpression(k,F){let U=k.split("&&");return w.create(U.map(L=>this._deserializeOne(L,F)),null)}static _deserializeOne(k,F){if(k=k.trim(),k.indexOf("!=")>=0){let U=k.split("!=");return a.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("==")>=0){let U=k.split("==");return r.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("=~")>=0){let U=k.split("=~");return x.create(U[0].trim(),this._deserializeRegexValue(U[1],F))}if(k.indexOf(" in ")>=0){let U=k.split(" in ");return i.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(k)){const U=k.split(">=");return h.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(k)){const U=k.split(">");return f.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(k)){const U=k.split("<=");return E.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(k)){const U=k.split("<");return u.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(k)?c.create(k.substr(1).trim()):l.create(k)}static _deserializeValue(k,F){if(k=k.trim(),k==="true")return!0;if(k==="false")return!1;let U=/^'([^']*)'$/.exec(k);return U?U[1].trim():k}static _deserializeRegexValue(k,F){if(Object(v.C)(k)){if(F)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=k.indexOf("/"),L=k.lastIndexOf("/");if(U===L||U<0){if(F)throw new Error(`bad regexp-value '${k}', missing /-enclosure`);return console.warn(`bad regexp-value '${k}', missing /-enclosure`),null}let B=k.slice(U+1,L),Z=k[L+1]==="i"?"i":"";try{return new RegExp(B,Z)}catch(re){if(F)throw new Error(`bad regexp-value '${k}', parse error: ${re}`);return console.warn(`bad regexp-value '${k}', parse error: ${re}`),null}}}function p(k,F){const U=k?k.substituteConstants():void 0,L=F?F.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function e(k,F){return k.cmp(F)}class o{constructor(){this.type=0}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!1}serialize(){return"false"}keys(){return[]}negate(){return n.INSTANCE}}o.INSTANCE=new o;class n{constructor(){this.type=1}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!0}serialize(){return"true"}keys(){return[]}negate(){return o.INSTANCE}}n.INSTANCE=new n;class l{constructor(k,F){this.key=k,this.negated=F,this.type=2}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?n.INSTANCE:o.INSTANCE:new l(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?n.INSTANCE:o.INSTANCE:this}evaluate(k){return!!k.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}class r{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=4}static create(k,F,U=null){if(typeof F=="boolean")return F?l.create(k,U):c.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?n.INSTANCE:o.INSTANCE}return new r(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?n.INSTANCE:o.INSTANCE}return this}evaluate(k){return k.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class i{constructor(k,F){this.key=k,this.valueKey=F,this.type=10,this.negated=null}static create(k,F){return new i(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.valueKey,k.key,k.valueKey)}equals(k){return k.type===this.type?this.key===k.key&&this.valueKey===k.valueKey:!1}substituteConstants(){return this}evaluate(k){const F=k.getValue(this.valueKey),U=k.getValue(this.key);return Array.isArray(F)?F.indexOf(U)>=0:typeof U=="string"&&typeof F=="object"&&F!==null?s.call(F,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=t.create(this)),this.negated}}class t{constructor(k){this._actual=k,this.type=11}static create(k){return new t(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class a{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=5}static create(k,F,U=null){if(typeof F=="boolean")return F?c.create(k,U):l.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?o.INSTANCE:n.INSTANCE}return new a(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?o.INSTANCE:n.INSTANCE}return this}evaluate(k){return k.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class c{constructor(k,F){this.key=k,this.negated=F,this.type=3}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?o.INSTANCE:n.INSTANCE:new c(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?o.INSTANCE:n.INSTANCE:this}evaluate(k){return!k.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}function d(k,F){if(typeof k=="string"){const U=parseFloat(k);isNaN(U)||(k=U)}return typeof k=="string"||typeof k=="number"?F(k):o.INSTANCE}class f{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=12}static create(k,F,U=null){return d(F,L=>new f(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class h{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=13}static create(k,F,U=null){return d(F,L=>new h(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class u{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=14}static create(k,F,U=null){return d(F,L=>new u(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))new E(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class x{constructor(k,F){this.key=k,this.regexp=F,this.type=7,this.negated=null}static create(k,F){return new x(k,F)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.keyk.key)return 1;const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return FU?1:0}equals(k){if(k.type===this.type){const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return this.key===k.key&&F===U}return!1}substituteConstants(){return this}evaluate(k){let F=k.getValue(this.key);return this.regexp?this.regexp.test(F):!1}serialize(){const k=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${k}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this)),this.negated}}class O{constructor(k){this._actual=k,this.type=8}static create(k){return new O(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(k){let F=null;for(let U=0,L=k.length;Uk.expr.length)return 1;for(let F=0,U=this.expr.length;F1;){const B=U[U.length-1];if(B.type!==9)break;U.pop();const Z=U.pop(),re=U.length===0,he=S.create(B.expr.map(Se=>w.create([Se,Z],null)),null,re);he&&(U.push(he),U.sort(e))}return U.length===1?U[0]:new w(U,F)}serialize(){return this.expr.map(k=>k.serialize()).join(" && ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){const k=[];for(let F of this.expr)k.push(F.negate());this.negated=S.create(k,this,!0)}return this.negated}}class S{constructor(k,F){this.expr=k,this.negated=F,this.type=9}static create(k,F,U){return S._normalizeArr(k,F,U)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.lengthk.expr.length)return 1;for(let F=0,U=this.expr.length;Fk.serialize()).join(" || ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){let k=[];for(let F of this.expr)k.push(F.negate());for(;k.length>1;){const F=k.shift(),U=k.shift(),L=[];for(const Z of X(F))for(const re of X(U))L.push(w.create([Z,re],null));const B=k.length===0;k.unshift(S.create(L,null,B))}this.negated=k[0]}return this.negated}}class A extends l{constructor(k,F,U){super(k,null);this._defaultValue=F,typeof U=="object"?A._info.push(Object.assign(Object.assign({},U),{key:k})):U!==!0&&A._info.push({key:k,description:U,type:F!=null?typeof F:void 0})}static all(){return A._info.values()}bindTo(k){return k.createKey(this.key,this._defaultValue)}getValue(k){return k.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(k){return r.create(this.key,k)}}A._info=[];const D=Object(T.c)("contextKeyService"),M="setContext";function N(k,F){return kF?1:0}function P(k,F,U,L){return kU?1:FL?1:0}function z(k,F){if(F.type===6&&k.type!==9&&k.type!==6){for(const B of F.expr)if(k.equals(B))return!0}const U=k.negate(),L=X(U).concat(X(F));L.sort(e);for(let B=0;B=0;i--)if(this.__items[i].match(r))return!0;return!1},o.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` + \xA0`]);var _e="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(_e+="(?!s*/)"),Q.push([S,/^@[a-z_$][a-z_$@0-9]*/i,null],[w,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[D,/^[a-z_$][a-z_$@0-9]*/i,null],[S,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[D,/^\\[\s\S]?/,null],[A,new RegExp(_e),null]),he(q,Q)}var ke=Se({keywords:u,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function te(ie,q,Q){for(var Y=/(?:^|\s)nocode(?:\s|$)/,oe=/\r\n?|\n/,le=ie.ownerDocument,Ee=le.createElement("li");ie.firstChild;)Ee.appendChild(ie.firstChild);var Le=[Ee];function ge(Me){var Et=Me.nodeType;if(Et==1&&!Y.test(Me.className))if(Me.nodeName==="br")De(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var Oe=Me.firstChild;Oe;Oe=Oe.nextSibling)ge(Oe);else if((Et==3||Et==4)&&Q){var Ve=Me.nodeValue,Je=Ve.match(oe);if(Je){var Ye=Ve.substring(0,Je.index);Me.nodeValue=Ye;var Ne=Ve.substring(Je.index+Je[0].length);if(Ne){var He=Me.parentNode;He.insertBefore(le.createTextNode(Ne),Me.nextSibling)}De(Me),Ye||Me.parentNode.removeChild(Me)}}}function De(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Et(Je,Ye){var Ne=Ye?Je.cloneNode(!1):Je,He=Je.parentNode;if(He){var ve=Et(He,1),xe=Je.nextSibling;ve.appendChild(Ne);for(var de=xe;de;de=xe)xe=de.nextSibling,ve.appendChild(de)}return Ne}for(var Oe=Et(Me.nextSibling,0),Ve;(Ve=Oe.parentNode)&&Ve.nodeType===1;)Oe=Ve;Le.push(Oe)}for(var _e=0;_e=He&&(ge+=2),le>=ve&&(Xe+=2)}}finally{Ve&&(Ve.style.display=Je)}}var Ce={};function pe(ie,q){for(var Q=q.length;--Q>=0;){var Y=q[Q];Ce.hasOwnProperty(Y)?p.console&&console.warn("cannot override language handler %s",Y):Ce[Y]=ie}}function me(ie,q){return ie&&Ce.hasOwnProperty(ie)||(ie=/^\s*]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[A,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),pe(he([[D,/^[\s]+/,null,` \r +`],[X,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[A,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),pe(he([],[[X,/^[\s\S]+/]]),["uq.val"]),pe(Se({keywords:l,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),pe(Se({keywords:"null,true,false"}),["json"]),pe(Se({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),pe(Se({keywords:r,cStyleComments:!0}),["java"]),pe(Se({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(Se({keywords:d,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(Se({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(Se({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(Se({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(Se({keywords:t,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(he([],[[x,/^[\s\S]+/]]),["regex"]);function se(ie){var q=ie.langExtension;try{var Q=L(ie.sourceNode,ie.pre),Y=Q.sourceCode;ie.sourceCode=Y,ie.spans=Q.spans,ie.basePos=0,me(q,Y)(ie),Re(ie)}catch(oe){p.console&&console.log(oe&&oe.stack||oe)}}function be(ie,q,Q){var Y=Q||!1,oe=q||null,le=document.createElement("div");le.innerHTML="
          "+ie+"
          ",le=le.firstChild,Y&&te(le,Y,!0);var Ee={langExtension:oe,numberLines:Y,sourceNode:le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se(Ee),le.innerHTML}function ae(ie,q){var Q=q||document.body,Y=Q.ownerDocument||document;function oe(Ne){return Q.getElementsByTagName(Ne)}for(var le=[oe("pre"),oe("code"),oe("xmp")],Ee=[],Le=0;Le=g.right?s.x=g.width-1:s.x=v-g.left,T=g.bottom?s.y=g.height-1:s.y=T-g.top,s}},Sa5k:function(j,H,b){j.exports=b.p+"static/nothing.4d201a0a.png"},Scqh:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAZ5JREFUWEftmM9Kw0AQxuebJBQJnuxREA+CV+mLeO0DlD6AZ1+gV6tQWqhe2ptUBX0JEQ/iQQ8ieFQshCDBZEdWGglCSVKbdJHmkBxmsvPbb2f/DWjyiAiGw+FaEATVKIpWRIRjWxFfAMqyrI9KpfJar9ffAIiOA/3qdDoOgE0Aq0UET2tTRDwReWo2m5/QynS73a1FwSRGyGs0Go8YDAZV3/c30npRht113Wf0+/3tMAzdMgKmxbBt20ev19spOoHTQGK7TnSdP7WsP5ThtwRKU/lfKFRTSu0DCIjoGMBVWq/z2HMrpJQaEdF6YmbcAmgR0UOewNN8ZwG6/t0YgEhETpn5iIi8v4DNBSgBMAbQtizrTCn1vVnmfeYNFMe/J6IWM9+ZAkST48S5bdvtKIres4IVpVAyvgdgD8BNFqgygDTHCzPvLoGmKGDGkOmkFpELx3EOTEhqY6b9mJkPmXm00IVx0VuHWZsrEf0cP0TkhJkvs6wvWX1yL4xZG57VbwmUppx5Chl3UTTuKm1cscG4cozOeqMKVvE0NKWk9wWBdSawQzyy4QAAAABJRU5ErkJggg=="},SgaC:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_0;){if(n.rQwait("RRE",4+8))return!1;var t=n.rQshiftBytes(4),a=n.rQshift16(),c=n.rQshift16(),d=n.rQshift16(),f=n.rQshift16();l.fillRect(_+a,p+c,d,f,t),this._subrects--}return!0}}]),g}();H.default=y},SzL9:function(j,H,b){j.exports=b.p+"static/appoint2.ec9f16d8.svg"},T8No:function(j,H,b){"use strict";b.d(H,"a",function(){return _}),b.d(H,"e",function(){return p}),b.d(H,"c",function(){return A}),b.d(H,"b",function(){return D}),b.d(H,"d",function(){return M}),b.d(H,"f",function(){return z});var I=b("MNsG"),v=b("N0LK"),T=b("Cg/j");let y=I.k||"";const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",I.f),g.set("isLinux",I.d),g.set("isWindows",I.i),g.set("isWeb",I.h),g.set("isMacNative",I.f&&!I.h),g.set("isEdge",y.indexOf("Edg/")>=0),g.set("isFirefox",y.indexOf("Firefox")>=0),g.set("isChrome",y.indexOf("Chrome")>=0),g.set("isSafari",y.indexOf("Safari")>=0);const s=Object.prototype.hasOwnProperty;class _{static has(k){return l.create(k)}static equals(k,F){return r.create(k,F)}static regex(k,F){return x.create(k,F)}static not(k){return c.create(k)}static and(...k){return w.create(k,null)}static or(...k){return S.create(k,null,!0)}static deserialize(k,F=!1){return k?this._deserializeOrExpression(k,F):void 0}static _deserializeOrExpression(k,F){let U=k.split("||");return S.create(U.map(L=>this._deserializeAndExpression(L,F)),null,!0)}static _deserializeAndExpression(k,F){let U=k.split("&&");return w.create(U.map(L=>this._deserializeOne(L,F)),null)}static _deserializeOne(k,F){if(k=k.trim(),k.indexOf("!=")>=0){let U=k.split("!=");return a.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("==")>=0){let U=k.split("==");return r.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("=~")>=0){let U=k.split("=~");return x.create(U[0].trim(),this._deserializeRegexValue(U[1],F))}if(k.indexOf(" in ")>=0){let U=k.split(" in ");return i.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(k)){const U=k.split(">=");return h.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(k)){const U=k.split(">");return f.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(k)){const U=k.split("<=");return E.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(k)){const U=k.split("<");return u.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(k)?c.create(k.substr(1).trim()):l.create(k)}static _deserializeValue(k,F){if(k=k.trim(),k==="true")return!0;if(k==="false")return!1;let U=/^'([^']*)'$/.exec(k);return U?U[1].trim():k}static _deserializeRegexValue(k,F){if(Object(v.C)(k)){if(F)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=k.indexOf("/"),L=k.lastIndexOf("/");if(U===L||U<0){if(F)throw new Error(`bad regexp-value '${k}', missing /-enclosure`);return console.warn(`bad regexp-value '${k}', missing /-enclosure`),null}let B=k.slice(U+1,L),Z=k[L+1]==="i"?"i":"";try{return new RegExp(B,Z)}catch(re){if(F)throw new Error(`bad regexp-value '${k}', parse error: ${re}`);return console.warn(`bad regexp-value '${k}', parse error: ${re}`),null}}}function p(k,F){const U=k?k.substituteConstants():void 0,L=F?F.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function e(k,F){return k.cmp(F)}class o{constructor(){this.type=0}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!1}serialize(){return"false"}keys(){return[]}negate(){return n.INSTANCE}}o.INSTANCE=new o;class n{constructor(){this.type=1}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!0}serialize(){return"true"}keys(){return[]}negate(){return o.INSTANCE}}n.INSTANCE=new n;class l{constructor(k,F){this.key=k,this.negated=F,this.type=2}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?n.INSTANCE:o.INSTANCE:new l(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?n.INSTANCE:o.INSTANCE:this}evaluate(k){return!!k.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}class r{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=4}static create(k,F,U=null){if(typeof F=="boolean")return F?l.create(k,U):c.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?n.INSTANCE:o.INSTANCE}return new r(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?n.INSTANCE:o.INSTANCE}return this}evaluate(k){return k.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class i{constructor(k,F){this.key=k,this.valueKey=F,this.type=10,this.negated=null}static create(k,F){return new i(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.valueKey,k.key,k.valueKey)}equals(k){return k.type===this.type?this.key===k.key&&this.valueKey===k.valueKey:!1}substituteConstants(){return this}evaluate(k){const F=k.getValue(this.valueKey),U=k.getValue(this.key);return Array.isArray(F)?F.indexOf(U)>=0:typeof U=="string"&&typeof F=="object"&&F!==null?s.call(F,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=t.create(this)),this.negated}}class t{constructor(k){this._actual=k,this.type=11}static create(k){return new t(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class a{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=5}static create(k,F,U=null){if(typeof F=="boolean")return F?c.create(k,U):l.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?o.INSTANCE:n.INSTANCE}return new a(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?o.INSTANCE:n.INSTANCE}return this}evaluate(k){return k.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class c{constructor(k,F){this.key=k,this.negated=F,this.type=3}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?o.INSTANCE:n.INSTANCE:new c(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?o.INSTANCE:n.INSTANCE:this}evaluate(k){return!k.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}function d(k,F){if(typeof k=="string"){const U=parseFloat(k);isNaN(U)||(k=U)}return typeof k=="string"||typeof k=="number"?F(k):o.INSTANCE}class f{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=12}static create(k,F,U=null){return d(F,L=>new f(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class h{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=13}static create(k,F,U=null){return d(F,L=>new h(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class u{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=14}static create(k,F,U=null){return d(F,L=>new u(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))new E(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class x{constructor(k,F){this.key=k,this.regexp=F,this.type=7,this.negated=null}static create(k,F){return new x(k,F)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.keyk.key)return 1;const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return FU?1:0}equals(k){if(k.type===this.type){const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return this.key===k.key&&F===U}return!1}substituteConstants(){return this}evaluate(k){let F=k.getValue(this.key);return this.regexp?this.regexp.test(F):!1}serialize(){const k=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${k}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this)),this.negated}}class O{constructor(k){this._actual=k,this.type=8}static create(k){return new O(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(k){let F=null;for(let U=0,L=k.length;Uk.expr.length)return 1;for(let F=0,U=this.expr.length;F1;){const B=U[U.length-1];if(B.type!==9)break;U.pop();const Z=U.pop(),re=U.length===0,he=S.create(B.expr.map(Se=>w.create([Se,Z],null)),null,re);he&&(U.push(he),U.sort(e))}return U.length===1?U[0]:new w(U,F)}serialize(){return this.expr.map(k=>k.serialize()).join(" && ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){const k=[];for(let F of this.expr)k.push(F.negate());this.negated=S.create(k,this,!0)}return this.negated}}class S{constructor(k,F){this.expr=k,this.negated=F,this.type=9}static create(k,F,U){return S._normalizeArr(k,F,U)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.lengthk.expr.length)return 1;for(let F=0,U=this.expr.length;Fk.serialize()).join(" || ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){let k=[];for(let F of this.expr)k.push(F.negate());for(;k.length>1;){const F=k.shift(),U=k.shift(),L=[];for(const Z of X(F))for(const re of X(U))L.push(w.create([Z,re],null));const B=k.length===0;k.unshift(S.create(L,null,B))}this.negated=k[0]}return this.negated}}class A extends l{constructor(k,F,U){super(k,null);this._defaultValue=F,typeof U=="object"?A._info.push(Object.assign(Object.assign({},U),{key:k})):U!==!0&&A._info.push({key:k,description:U,type:F!=null?typeof F:void 0})}static all(){return A._info.values()}bindTo(k){return k.createKey(this.key,this._defaultValue)}getValue(k){return k.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(k){return r.create(this.key,k)}}A._info=[];const D=Object(T.c)("contextKeyService"),M="setContext";function N(k,F){return kF?1:0}function P(k,F,U,L){return kU?1:FL?1:0}function z(k,F){if(F.type===6&&k.type!==9&&k.type!==6){for(const B of F.expr)if(k.equals(B))return!0}const U=k.negate(),L=X(U).concat(X(F));L.sort(e);for(let B=0;B=0;i--)if(this.__items[i].match(r))return!0;return!1},o.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` `);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},o.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function n(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(r,i){var t=this.__base_string_length;return i=i||0,r<0&&(t=0),t+=r*this.__indent_size,t+=i,t},n.prototype.get_indent_string=function(r,i){var t=this.__base_string;return i=i||0,r<0&&(r=0,t=""),i+=r*this.__indent_size,this.__ensure_cache(i),t+=this.__cache[i],t},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,i=0,t="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,t=new Array(i+1).join(this.__indent_string)),r&&(t+=new Array(r+1).join(" ")),this.__cache.push(t)};function l(r,i){this.__indent_cache=new n(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===` `&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var t=this.__lines.join(` `);return r!==` @@ -362,30 +362,30 @@ You passed in: '`+this.raw_options[r]+"'");return a},o.prototype._is_valid_selec `&&((w===0||w0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O=this._source_text,C=this._options.eol;C==="auto"&&(C=` `,O&&c.test(O||"")&&(C=O.match(c)[0])),O=O.replace(d,` `);var w=O.match(/^[\t ]*/)[0];this._output=new r(this._options,w),this._input=new i(O),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var S=0,A=!1,D=!1,M=!1,N=!1,P=!1,z=!1,X=this._ch,k=!1,F,U,L;F=this._input.read(h),U=F!=="",L=X,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),X=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var B=this._input.read(u),Z=a.get_directives(B);Z&&Z.ignore==="start"&&(B+=a.readIgnored(this._input)),this.print_string(B),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(E)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?N=!0:re==="import"&&(P=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(M=!0)):!A&&S===0&&re.indexOf(":")!==-1&&(D=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")D&&(D=!1,this.outdent()),M?(M=!1,A=this._indentLevel>=this._nestedLevel):A=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&A&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(L==="("?this._output.space_before_token=!1:L!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),L==="{"&&this._output.trim(!0),P=!1,N=!1,D&&(this.outdent(),D=!1),this.print_string(this._ch),A=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var he=0;he"||this._ch==="+"||this._ch==="~")&&!D&&S===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&f.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),f.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var te=L==='"'||L==="'";this.preserveSingleSpace(te||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&k&&this._output.add_new_line()}var Re=this._output.get_code(C);return Re},e.exports.Beautifier=x},function(e,o,n){var l=n(6).Options;function r(i){l.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(T))}catch(g){if(g instanceof URIError&&y)return T;throw g}}function v(T){return unescape(encodeURIComponent(T))}},Vbye:function(j,H,b){j.exports={"diff-panel-container":"diff-panel-container___APxdS",enter:"enter___2JYCH","line-break":"line-break___1Ly2e",empty:"empty___2h7RZ","diff-panel-container-2":"diff-panel-container-2___GRUnn"}},Vhoy:function(j,H,b){"use strict";b.d(H,"d",function(){return y}),b.d(H,"e",function(){return g}),b.d(H,"c",function(){return s}),b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n");class v{constructor(){this._icons=new Map,this._onDidRegister=new I.b}add(e){const o=this._icons.get(e.id);o?e.description?o.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const T=new v,y=T;function g(e,o){return new _(e,o)}function s(e){return e?e.replace(/\$\((.*?)\)/g,(o,n)=>` ${n} `).trim():""}class _{constructor(e,o,n){this.id=e,this.definition=o,this.description=n,T.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var p;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const o=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(i){if(i instanceof _)return["codicon","codicon-"+i.id];const t=o.exec(i.id);if(!t)return n(_.error);let[,a,c]=t;const d=["codicon","codicon-"+a];return c&&d.push("codicon-modifier-"+c.substr(1)),d}e.asClassNameArray=n;function l(i){return n(i).join(" ")}e.asClassName=l;function r(i){return"."+n(i).join(".")}e.asCSSSelector=r})(p||(p={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(_||(_={}))},VjRW:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjk3RTBEMDM2MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjk3RTBEMDM3MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTdFMEQwMzQwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTdFMEQwMzUwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6ejzPSAAACsUlEQVR42ryYz08TQRTHp9vQQkFPlAAHDXjxR2LwoEbhpCXon1DPpf0PbP8UwOhV/QOM8QIXIIRwASNtYo0RIye9FIF4Yf2O+U7ysmnrzM5uX/JJu7sz730zOzvz3mTCMFSONgOWwAK4Aa6CS3x2Ar6BJtgEH8BXJ+9akAVZUAZb4CK0twv2KdPHf2PZiCmBpghyAt6CGrgPJkCeTPCefvaGbY016Su2oGGwKhx+AVUwZjmqim0r7Gtslb6dBBXBLh2cg+cg5yAkSo4+zulzlzGsBOmGLTEqcx5CosyJ0Wp1ExXtUAA77PARTCYoxjBJ3yFjFfoJesGGnzlBVUoUGSNkzK6CSmLO3ElRjHx9Zk6VooICcMiHjQGIMTTEkpCVgsp80AZDls5WPL88xVhtxi5LQZu8uezgLOQqPOUpqip8/RM0wyVer6qjjoK0/QAPPASNMrbWMBtgO3sCMuAdOFXuNg02wLKKZ6eMrTUsaUHzfLCu4lserIEVkIvR38Se14Ju8WJf+VuNozXl2O+Avzf1O/zJuTDu+O77meu8Gme/X4FIrjoqOXOdVyb2WKDStYxrh4Bpp7bLCQo5Bo840W3MxP6tBX3nxbWExGyDu/y1NRP7SAs65MXtBMSscWSOHfuZ2J8CVgfaHnsI+cNPvsb/rmZib+lPbpbLdsdj63jouXV0zNaRxOY67bm5VqKbq0/6kU8r/ciK2qs+wASt3itBkynsWcKVRr8U9owxF3sl+a9Ekl8cUJL/0rYMOkixDNq3LYMGUSi2XQpFg67J9kRZ1EiglK6LsmevV93Xz8lIl8OGiuPiWWCftu9hg2RRvEJzHPOa1cI9DvsQKfJelW3kcUxLfk0+guSB1bbjgVXIPs9sD6wyMY/0nvJI7zq4IvIZnfkdgRY37feuR3p/BRgAhrFnXQBvMBoAAAAASUVORK5CYII="},"VrN/":function(j,H,b){(function(I,v){j.exports=v()})(this,function(){"use strict";var I=navigator.userAgent,v=navigator.platform,T=/gecko\/\d/i.test(I),y=/MSIE \d/.test(I),g=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I),s=/Edge\/(\d+)/.exec(I),_=y||g||s,p=_&&(y?document.documentMode||6:+(s||g)[1]),e=!s&&/WebKit\//.test(I),o=e&&/Qt\/\d+\.\d+/.test(I),n=!s&&/Chrome\//.test(I),l=/Opera\//.test(I),r=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(I),t=/PhantomJS/.test(I),a=!s&&/AppleWebKit/.test(I)&&/Mobile\/\w+/.test(I),c=/Android/.test(I),d=a||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(I),f=a||/Mac/.test(v),h=/\bCrOS\b/.test(I),u=/win/i.test(v),E=l&&I.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(l=!1,e=!0);var x=f&&(o||l&&(E==null||E<12.11)),O=T||_&&p>=9;function C(m){return new RegExp("(^|\\s)"+m+"(?:$|\\s)\\s*")}var w=function(m,R){var W=m.className,K=C(R).exec(W);if(K){var G=W.slice(K.index+K[0].length);m.className=W.slice(0,K.index)+(G?K[1]+G:"")}};function S(m){for(var R=m.childNodes.length;R>0;--R)m.removeChild(m.firstChild);return m}function A(m,R){return S(m).appendChild(R)}function D(m,R,W,K){var G=document.createElement(m);if(W&&(G.className=W),K&&(G.style.cssText=K),typeof R=="string")G.appendChild(document.createTextNode(R));else if(R)for(var $=0;$=R)return ye+(R-$);ye+=Ae-$,ye+=W-ye%W,$=Ae+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Z.prototype.onTimeout=function(m){m.id=0,m.time<=+new Date?m.f():setTimeout(m.handler,m.time-+new Date)},Z.prototype.set=function(m,R){this.f=R;var W=+new Date+m;(!this.id||W=R)return K+Math.min(ye,R-G);if(G+=$-K,G+=W-G%W,K=$+1,G>=R)return K}}var pe=[""];function me(m){for(;pe.length<=m;)pe.push(se(pe)+" ");return pe[m]}function se(m){return m[m.length-1]}function be(m,R){for(var W=[],K=0;K"\x80"&&(m.toUpperCase()!=m.toLowerCase()||ie.test(m))}function Q(m,R){return R?R.source.indexOf("\\w")>-1&&q(m)?!0:R.test(m):q(m)}function Y(m){for(var R in m)if(m.hasOwnProperty(R)&&m[R])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(m){return m.charCodeAt(0)>=768&&oe.test(m)}function Ee(m,R,W){for(;(W<0?R>0:RW?-1:1;;){if(R==W)return R;var G=(R+W)/2,$=K<0?Math.ceil(G):Math.floor(G);if($==R)return m($)?R:W;m($)?W=$:R=$+K}}function ge(m,R,W,K){if(!m)return K(R,W,"ltr",0);for(var G=!1,$=0;$R||R==W&&ye.to==R)&&(K(Math.max(ye.from,R),Math.min(ye.to,W),ye.level==1?"rtl":"ltr",$),G=!0)}G||K(R,W,"ltr")}var De=null;function _e(m,R,W){var K;De=null;for(var G=0;GR)return G;$.to==R&&($.from!=$.to&&W=="before"?K=G:De=G),$.from==R&&($.from!=$.to&&W!="before"?K=G:De=G)}return K!=null?K:De}var Xe=function(){var m="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",R="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function W(Ke){return Ke<=247?m.charAt(Ke):1424<=Ke&&Ke<=1524?"R":1536<=Ke&&Ke<=1785?R.charAt(Ke-1536):1774<=Ke&&Ke<=2220?"r":8192<=Ke&&Ke<=8203?"w":Ke==8204?"b":"L"}var K=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,G=/[stwN]/,$=/[LRr]/,ye=/[Lb1n]/,Ae=/[1n]/;function Ie(Ke,dt,yt){this.level=Ke,this.from=dt,this.to=yt}return function(Ke,dt){var yt=dt=="ltr"?"L":"R";if(Ke.length==0||dt=="ltr"&&!K.test(Ke))return!1;for(var Wt=Ke.length,Nt=[],en=0;en-1&&(K[R]=G.slice(0,$).concat(G.slice($+1)))}}}function Ve(m,R){var W=bt(m,R);if(!W.length)return;for(var K=Array.prototype.slice.call(arguments,2),G=0;G0}function He(m){m.prototype.on=function(R,W){Me(this,R,W)},m.prototype.off=function(R,W){Oe(this,R,W)}}function ve(m){m.preventDefault?m.preventDefault():m.returnValue=!1}function xe(m){m.stopPropagation?m.stopPropagation():m.cancelBubble=!0}function de(m){return m.defaultPrevented!=null?m.defaultPrevented:m.returnValue==!1}function je(m){ve(m),xe(m)}function Qe(m){return m.target||m.srcElement}function ne(m){var R=m.which;return R==null&&(m.button&1?R=1:m.button&2?R=3:m.button&4&&(R=2)),f&&m.ctrlKey&&R==1&&(R=3),R}var Ze=function(){if(_&&p<9)return!1;var m=D("div");return"draggable"in m||"dragDrop"in m}(),lt;function Be(m){if(lt==null){var R=D("span","\u200B");A(m,D("span",[R,document.createTextNode("x")])),m.firstChild.offsetHeight!=0&&(lt=R.offsetWidth<=1&&R.offsetHeight>2&&!(_&&p<8))}var W=lt?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return W.setAttribute("cm-text",""),W}var $e;function it(m){if($e!=null)return $e;var R=A(m,document.createTextNode("A\u062EA")),W=N(R,0,1).getBoundingClientRect(),K=N(R,1,2).getBoundingClientRect();return S(m),!W||W.left==W.right?!1:$e=K.right-W.right<3}var wt=` +`&&k&&this._output.add_new_line()}var Re=this._output.get_code(C);return Re},e.exports.Beautifier=x},function(e,o,n){var l=n(6).Options;function r(i){l.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(T))}catch(g){if(g instanceof URIError&&y)return T;throw g}}function v(T){return unescape(encodeURIComponent(T))}},Vbye:function(j,H,b){j.exports={"diff-panel-container":"diff-panel-container___APxdS",enter:"enter___2JYCH","line-break":"line-break___1Ly2e",empty:"empty___2h7RZ","diff-panel-container-2":"diff-panel-container-2___GRUnn"}},Vhoy:function(j,H,b){"use strict";b.d(H,"d",function(){return y}),b.d(H,"e",function(){return g}),b.d(H,"c",function(){return s}),b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n");class v{constructor(){this._icons=new Map,this._onDidRegister=new I.b}add(e){const o=this._icons.get(e.id);o?e.description?o.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const T=new v,y=T;function g(e,o){return new _(e,o)}function s(e){return e?e.replace(/\$\((.*?)\)/g,(o,n)=>` ${n} `).trim():""}class _{constructor(e,o,n){this.id=e,this.definition=o,this.description=n,T.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var p;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const o=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(i){if(i instanceof _)return["codicon","codicon-"+i.id];const t=o.exec(i.id);if(!t)return n(_.error);let[,a,c]=t;const d=["codicon","codicon-"+a];return c&&d.push("codicon-modifier-"+c.substr(1)),d}e.asClassNameArray=n;function l(i){return n(i).join(" ")}e.asClassName=l;function r(i){return"."+n(i).join(".")}e.asCSSSelector=r})(p||(p={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(_||(_={}))},VjRW:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjk3RTBEMDM2MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjk3RTBEMDM3MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTdFMEQwMzQwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTdFMEQwMzUwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6ejzPSAAACsUlEQVR42ryYz08TQRTHp9vQQkFPlAAHDXjxR2LwoEbhpCXon1DPpf0PbP8UwOhV/QOM8QIXIIRwASNtYo0RIye9FIF4Yf2O+U7ysmnrzM5uX/JJu7sz730zOzvz3mTCMFSONgOWwAK4Aa6CS3x2Ar6BJtgEH8BXJ+9akAVZUAZb4CK0twv2KdPHf2PZiCmBpghyAt6CGrgPJkCeTPCefvaGbY016Su2oGGwKhx+AVUwZjmqim0r7Gtslb6dBBXBLh2cg+cg5yAkSo4+zulzlzGsBOmGLTEqcx5CosyJ0Wp1ExXtUAA77PARTCYoxjBJ3yFjFfoJesGGnzlBVUoUGSNkzK6CSmLO3ElRjHx9Zk6VooICcMiHjQGIMTTEkpCVgsp80AZDls5WPL88xVhtxi5LQZu8uezgLOQqPOUpqip8/RM0wyVer6qjjoK0/QAPPASNMrbWMBtgO3sCMuAdOFXuNg02wLKKZ6eMrTUsaUHzfLCu4lserIEVkIvR38Se14Ju8WJf+VuNozXl2O+Avzf1O/zJuTDu+O77meu8Gme/X4FIrjoqOXOdVyb2WKDStYxrh4Bpp7bLCQo5Bo840W3MxP6tBX3nxbWExGyDu/y1NRP7SAs65MXtBMSscWSOHfuZ2J8CVgfaHnsI+cNPvsb/rmZib+lPbpbLdsdj63jouXV0zNaRxOY67bm5VqKbq0/6kU8r/ciK2qs+wASt3itBkynsWcKVRr8U9owxF3sl+a9Ekl8cUJL/0rYMOkixDNq3LYMGUSi2XQpFg67J9kRZ1EiglK6LsmevV93Xz8lIl8OGiuPiWWCftu9hg2RRvEJzHPOa1cI9DvsQKfJelW3kcUxLfk0+guSB1bbjgVXIPs9sD6wyMY/0nvJI7zq4IvIZnfkdgRY37feuR3p/BRgAhrFnXQBvMBoAAAAASUVORK5CYII="},"VrN/":function(j,H,b){(function(I,v){j.exports=v()})(this,function(){"use strict";var I=navigator.userAgent,v=navigator.platform,T=/gecko\/\d/i.test(I),y=/MSIE \d/.test(I),g=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I),s=/Edge\/(\d+)/.exec(I),_=y||g||s,p=_&&(y?document.documentMode||6:+(s||g)[1]),e=!s&&/WebKit\//.test(I),o=e&&/Qt\/\d+\.\d+/.test(I),n=!s&&/Chrome\//.test(I),l=/Opera\//.test(I),r=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(I),t=/PhantomJS/.test(I),a=!s&&/AppleWebKit/.test(I)&&/Mobile\/\w+/.test(I),c=/Android/.test(I),d=a||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(I),f=a||/Mac/.test(v),h=/\bCrOS\b/.test(I),u=/win/i.test(v),E=l&&I.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(l=!1,e=!0);var x=f&&(o||l&&(E==null||E<12.11)),O=T||_&&p>=9;function C(m){return new RegExp("(^|\\s)"+m+"(?:$|\\s)\\s*")}var w=function(m,R){var W=m.className,K=C(R).exec(W);if(K){var G=W.slice(K.index+K[0].length);m.className=W.slice(0,K.index)+(G?K[1]+G:"")}};function S(m){for(var R=m.childNodes.length;R>0;--R)m.removeChild(m.firstChild);return m}function A(m,R){return S(m).appendChild(R)}function D(m,R,W,K){var G=document.createElement(m);if(W&&(G.className=W),K&&(G.style.cssText=K),typeof R=="string")G.appendChild(document.createTextNode(R));else if(R)for(var $=0;$=R)return ye+(R-$);ye+=Ae-$,ye+=W-ye%W,$=Ae+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Z.prototype.onTimeout=function(m){m.id=0,m.time<=+new Date?m.f():setTimeout(m.handler,m.time-+new Date)},Z.prototype.set=function(m,R){this.f=R;var W=+new Date+m;(!this.id||W=R)return K+Math.min(ye,R-G);if(G+=$-K,G+=W-G%W,K=$+1,G>=R)return K}}var pe=[""];function me(m){for(;pe.length<=m;)pe.push(se(pe)+" ");return pe[m]}function se(m){return m[m.length-1]}function be(m,R){for(var W=[],K=0;K"\x80"&&(m.toUpperCase()!=m.toLowerCase()||ie.test(m))}function Q(m,R){return R?R.source.indexOf("\\w")>-1&&q(m)?!0:R.test(m):q(m)}function Y(m){for(var R in m)if(m.hasOwnProperty(R)&&m[R])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(m){return m.charCodeAt(0)>=768&&oe.test(m)}function Ee(m,R,W){for(;(W<0?R>0:RW?-1:1;;){if(R==W)return R;var G=(R+W)/2,$=K<0?Math.ceil(G):Math.floor(G);if($==R)return m($)?R:W;m($)?W=$:R=$+K}}function ge(m,R,W,K){if(!m)return K(R,W,"ltr",0);for(var G=!1,$=0;$R||R==W&&ye.to==R)&&(K(Math.max(ye.from,R),Math.min(ye.to,W),ye.level==1?"rtl":"ltr",$),G=!0)}G||K(R,W,"ltr")}var De=null;function _e(m,R,W){var K;De=null;for(var G=0;GR)return G;$.to==R&&($.from!=$.to&&W=="before"?K=G:De=G),$.from==R&&($.from!=$.to&&W!="before"?K=G:De=G)}return K!=null?K:De}var Xe=function(){var m="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",R="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function W(Ke){return Ke<=247?m.charAt(Ke):1424<=Ke&&Ke<=1524?"R":1536<=Ke&&Ke<=1785?R.charAt(Ke-1536):1774<=Ke&&Ke<=2220?"r":8192<=Ke&&Ke<=8203?"w":Ke==8204?"b":"L"}var K=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,G=/[stwN]/,$=/[LRr]/,ye=/[Lb1n]/,Ae=/[1n]/;function Ie(Ke,dt,bt){this.level=Ke,this.from=dt,this.to=bt}return function(Ke,dt){var bt=dt=="ltr"?"L":"R";if(Ke.length==0||dt=="ltr"&&!K.test(Ke))return!1;for(var Wt=Ke.length,Nt=[],en=0;en-1&&(K[R]=G.slice(0,$).concat(G.slice($+1)))}}}function Ve(m,R){var W=Et(m,R);if(!W.length)return;for(var K=Array.prototype.slice.call(arguments,2),G=0;G0}function He(m){m.prototype.on=function(R,W){Me(this,R,W)},m.prototype.off=function(R,W){Oe(this,R,W)}}function ve(m){m.preventDefault?m.preventDefault():m.returnValue=!1}function xe(m){m.stopPropagation?m.stopPropagation():m.cancelBubble=!0}function de(m){return m.defaultPrevented!=null?m.defaultPrevented:m.returnValue==!1}function je(m){ve(m),xe(m)}function Qe(m){return m.target||m.srcElement}function ne(m){var R=m.which;return R==null&&(m.button&1?R=1:m.button&2?R=3:m.button&4&&(R=2)),f&&m.ctrlKey&&R==1&&(R=3),R}var Ze=function(){if(_&&p<9)return!1;var m=D("div");return"draggable"in m||"dragDrop"in m}(),lt;function Be(m){if(lt==null){var R=D("span","\u200B");A(m,D("span",[R,document.createTextNode("x")])),m.firstChild.offsetHeight!=0&&(lt=R.offsetWidth<=1&&R.offsetHeight>2&&!(_&&p<8))}var W=lt?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return W.setAttribute("cm-text",""),W}var $e;function rt(m){if($e!=null)return $e;var R=A(m,document.createTextNode("A\u062EA")),W=N(R,0,1).getBoundingClientRect(),K=N(R,1,2).getBoundingClientRect();return S(m),!W||W.left==W.right?!1:$e=K.right-W.right<3}var St=` b`.split(/\n/).length!=3?function(m){for(var R=0,W=[],K=m.length;R<=K;){var G=m.indexOf(` -`,R);G==-1&&(G=m.length);var $=m.slice(R,m.charAt(G-1)=="\r"?G-1:G),ye=$.indexOf("\r");ye!=-1?(W.push($.slice(0,ye)),R+=ye+1):(W.push($),R=G+1)}return W}:function(m){return m.split(/\r\n?|\n/)},pt=window.getSelection?function(m){try{return m.selectionStart!=m.selectionEnd}catch(R){return!1}}:function(m){var R;try{R=m.ownerDocument.selection.createRange()}catch(W){}return!R||R.parentElement()!=m?!1:R.compareEndPoints("StartToEnd",R)!=0},st=function(){var m=D("div");return"oncopy"in m?!0:(m.setAttribute("oncopy","return;"),typeof m.oncopy=="function")}(),Pe=null;function ze(m){if(Pe!=null)return Pe;var R=A(m,D("span","x")),W=R.getBoundingClientRect(),K=N(R,0,1).getBoundingClientRect();return Pe=Math.abs(W.left-K.left)>1}var Et={},ht={};function Bt(m,R){arguments.length>2&&(R.dependencies=Array.prototype.slice.call(arguments,2)),Et[m]=R}function Ht(m,R){ht[m]=R}function mt(m){if(typeof m=="string"&&ht.hasOwnProperty(m))m=ht[m];else if(m&&typeof m.name=="string"&&ht.hasOwnProperty(m.name)){var R=ht[m.name];typeof R=="string"&&(R={name:R}),m=Fe(R,m),m.name=R.name}else{if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(m))return mt("application/xml");if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(m))return mt("application/json")}return typeof m=="string"?{name:m}:m||{name:"null"}}function Xt(m,R){R=mt(R);var W=Et[R.name];if(!W)return Xt(m,"text/plain");var K=W(m,R);if(jt.hasOwnProperty(R.name)){var G=jt[R.name];for(var $ in G){if(!G.hasOwnProperty($))continue;K.hasOwnProperty($)&&(K["_"+$]=K[$]),K[$]=G[$]}}if(K.name=R.name,R.helperType&&(K.helperType=R.helperType),R.modeProps)for(var ye in R.modeProps)K[ye]=R.modeProps[ye];return K}var jt={};function Ut(m,R){var W=jt.hasOwnProperty(m)?jt[m]:jt[m]={};L(R,W)}function kt(m,R){if(R===!0)return R;if(m.copyState)return m.copyState(R);var W={};for(var K in R){var G=R[K];G instanceof Array&&(G=G.concat([])),W[K]=G}return W}function Kt(m,R){for(var W;m.innerMode&&!(W=m.innerMode(R),!W||W.mode==m);)R=W.state,m=W.mode;return W||{mode:m,state:R}}function rn(m,R,W){return m.startState?m.startState(R,W):!0}var Gt=function(m,R,W){this.pos=this.start=0,this.string=m,this.tabSize=R||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=W};Gt.prototype.eol=function(){return this.pos>=this.string.length},Gt.prototype.sol=function(){return this.pos==this.lineStart},Gt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Gt.prototype.next=function(){if(this.posR},Gt.prototype.eatSpace=function(){for(var m=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>m},Gt.prototype.skipToEnd=function(){this.pos=this.string.length},Gt.prototype.skipTo=function(m){var R=this.string.indexOf(m,this.pos);if(R>-1)return this.pos=R,!0},Gt.prototype.backUp=function(m){this.pos-=m},Gt.prototype.column=function(){return this.lastColumnPos0?null:($&&R!==!1&&(this.pos+=$[0].length),$)}},Gt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Gt.prototype.hideFirstChars=function(m,R){this.lineStart+=m;try{return R()}finally{this.lineStart-=m}},Gt.prototype.lookAhead=function(m){var R=this.lineOracle;return R&&R.lookAhead(m)},Gt.prototype.baseToken=function(){var m=this.lineOracle;return m&&m.baseToken(this.pos)};function $t(m,R){if(R-=m.first,R<0||R>=m.size)throw new Error("There is no line "+(R+m.first)+" in the document.");for(var W=m;!W.lines;)for(var K=0;;++K){var G=W.children[K],$=G.chunkSize();if(R<$){W=G;break}R-=$}return W.lines[R]}function Ln(m,R,W){var K=[],G=R.line;return m.iter(R.line,W.line+1,function($){var ye=$.text;G==W.line&&(ye=ye.slice(0,W.ch)),G==R.line&&(ye=ye.slice(R.ch)),K.push(ye),++G}),K}function pn(m,R,W){var K=[];return m.iter(R,W,function(G){K.push(G.text)}),K}function Dn(m,R){var W=R-m.height;if(W)for(var K=m;K;K=K.parent)K.height+=W}function sn(m){if(m.parent==null)return null;for(var R=m.parent,W=re(R.lines,m),K=R.parent;K;R=K,K=K.parent)for(var G=0;!(K.children[G]==R);++G)W+=K.children[G].chunkSize();return W+R.first}function Sn(m,R){var W=m.first;e:do{for(var K=0;K=m.first&&RW?Vt(W,$t(m,W).text.length):J(R,$t(m,R.line).text.length)}function J(m,R){var W=m.ch;return W==null||W>R?Vt(m.line,R):W<0?Vt(m.line,0):m}function ee(m,R){for(var W=[],K=0;Kthis.maxLookAhead&&(this.maxLookAhead=m),R},ue.prototype.baseToken=function(m){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=m;)this.baseTokenPos+=2;var R=this.baseTokens[this.baseTokenPos+1];return{type:R&&R.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-m}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(m,R,W){return R instanceof Te?new ue(m,kt(m.mode,R.state),W,R.lookAhead):new ue(m,kt(m.mode,R),W)},ue.prototype.save=function(m){var R=m!==!1?kt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Te(R,this.maxLookAhead):R};function nt(m,R,W,K){var G=[m.state.modeGen],$={};vr(m,R.text,m.doc.mode,W,function(Ke,dt){return G.push(Ke,dt)},$,K);for(var ye=W.state,Ae=function(Ke){W.baseTokens=G;var dt=m.state.overlays[Ke],yt=1,Wt=0;W.state=!0,vr(m,R.text,dt.mode,W,function(Nt,en){for(var ln=yt;WtNt&&G.splice(yt,1,Nt,G[yt+1],xn),yt+=2,Wt=Math.min(Nt,xn)}if(!en)return;if(dt.opaque)G.splice(ln,yt-ln,Nt,"overlay "+en),yt=ln+2;else for(;lnm.options.maxHighlightLength&&kt(m.doc.mode,K.state),$=nt(m,R,K);G&&(K.state=G),R.stateAfter=K.save(!G),R.styles=$.styles,$.classes?R.styleClasses=$.classes:R.styleClasses&&(R.styleClasses=null),W===m.doc.highlightFrontier&&(m.doc.modeFrontier=Math.max(m.doc.modeFrontier,++m.doc.highlightFrontier))}return R.styles}function Yt(m,R,W){var K=m.doc,G=m.display;if(!K.mode.startState)return new ue(K,!0,R);var $=ar(m,R,W),ye=$>K.first&&$t(K,$-1).stateAfter,Ae=ye?ue.fromSaved(K,ye,$):new ue(K,rn(K.mode),$);return K.iter($,R,function(Ie){on(m,Ie.text,Ae);var Ke=Ae.line;Ie.stateAfter=Ke==R-1||Ke%5==0||Ke>=G.viewFrom&&KeR.start)return $}throw new Error("Mode "+m.name+" failed to advance stream.")}var Gn=function(m,R,W){this.start=m.start,this.end=m.pos,this.string=m.current(),this.type=R||null,this.state=W};function lr(m,R,W,K){var G=m.doc,$=G.mode,ye;R=V(G,R);var Ae=$t(G,R.line),Ie=Yt(m,R.line,W),Ke=new Gt(Ae.text,m.options.tabSize,Ie),dt;for(K&&(dt=[]);(K||Ke.posm.options.maxHighlightLength?(Ae=!1,ye&&on(m,R,K,dt.pos),dt.pos=R.length,yt=null):yt=Ar(In(W,dt,K.state,Wt),$),Wt){var Nt=Wt[0].name;Nt&&(yt="m-"+(yt?Nt+" "+yt:Nt))}if(!Ae||Ke!=yt){for(;Ieye;--Ae){if(Ae<=$.first)return $.first;var Ie=$t($,Ae-1),Ke=Ie.stateAfter;if(Ke&&(!W||Ae+(Ke instanceof Te?Ke.lookAhead:0)<=$.modeFrontier))return Ae;var dt=B(Ie.text,null,m.options.tabSize);(G==null||K>dt)&&(G=Ae-1,K=dt)}return G}function xr(m,R){if(m.modeFrontier=Math.min(m.modeFrontier,R),m.highlightFrontierW;K--){var G=$t(m,K).stateAfter;if(G&&(!(G instanceof Te)||K+G.lookAhead=R:$.to>R);(K||(K=[])).push(new Fi(ye,$.from,Ie?null:$.to))}}return K}function xo(m,R,W){var K;if(m)for(var G=0;G=R:$.to>R);if(Ae||$.from==R&&ye.type=="bookmark"&&(!W||$.marker.insertLeft)){var Ie=$.from==null||(ye.inclusiveLeft?$.from<=R:$.from0&&Ae)for(var er=0;er0)continue;var dt=[Ie,1],yt=wn(Ke.from,Ae.from),Wt=wn(Ke.to,Ae.to);(yt<0||!ye.inclusiveLeft&&!yt)&&dt.push({from:Ke.from,to:Ae.from}),(Wt>0||!ye.inclusiveRight&&!Wt)&&dt.push({from:Ae.to,to:Ke.to}),G.splice.apply(G,dt),Ie+=dt.length-3}return G}function Qr(m){var R=m.markedSpans;if(!R)return;for(var W=0;WR)&&(!K||ei(K,$.marker)<0)&&(K=$.marker)}return K}function Mi(m,R,W,K,G){var $=$t(m,R),ye=Gr&&$.markedSpans;if(ye)for(var Ae=0;Ae=0&&yt<=0||dt<=0&&yt>=0)continue;if(dt<=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?wn(Ke.to,W)>=0:wn(Ke.to,W)>0)||dt>=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?wn(Ke.from,K)<=0:wn(Ke.from,K)<0))return!0}}function $i(m){for(var R;R=oi(m);)m=R.find(-1,!0).line;return m}function mo(m){for(var R;R=or(m);)m=R.find(1,!0).line;return m}function Qi(m){for(var R,W;R=or(m);)m=R.find(1,!0).line,(W||(W=[])).push(m);return W}function Ka(m,R){var W=$t(m,R),K=$i(W);return W==K?R:sn(K)}function La(m,R){if(R>m.lastLine())return R;var W=$t(m,R),K;if(!ti(m,W))return R;for(;K=or(W);)W=K.find(1,!0).line;return sn(W)+1}function ti(m,R){var W=Gr&&R.markedSpans;if(W)for(var K=void 0,G=0;GR.maxLineLength&&(R.maxLineLength=G,R.maxLine=K)})}var Wa=function(m,R,W){this.text=m,yi(this,R),this.height=W?W(this):1};Wa.prototype.lineNo=function(){return sn(this)},He(Wa);function Ko(m,R,W,K){m.text=R,m.stateAfter&&(m.stateAfter=null),m.styles&&(m.styles=null),m.order!=null&&(m.order=null),Qr(m),yi(m,W);var G=K?K(m):1;G!=m.height&&Dn(m,G)}function Jn(m){m.parent=null,Qr(m)}var gr={},Zn={};function Lr(m,R){if(!m||/^\s*$/.test(m))return null;var W=R.addModeClass?Zn:gr;return W[m]||(W[m]=m.replace(/\S+/g,"cm-$&"))}function Hr(m,R){var W=M("span",null,null,e?"padding-right: .1px":null),K={pre:M("pre",[W],"CodeMirror-line"),content:W,col:0,pos:0,cm:m,trailingSpace:!1,splitSpaces:m.getOption("lineWrapping")};R.measure={};for(var G=0;G<=(R.rest?R.rest.length:0);G++){var $=G?R.rest[G-1]:R.line,ye=void 0;K.pos=0,K.addToken=dr,it(m.display.measure)&&(ye=tt($,m.doc.direction))&&(K.addToken=ga(K.addToken,ye)),K.map=[];var Ae=R!=m.display.externalMeasured&&sn($);qa($,K,Lt(m,$,Ae)),$.styleClasses&&($.styleClasses.bgClass&&(K.bgClass=k($.styleClasses.bgClass,K.bgClass||"")),$.styleClasses.textClass&&(K.textClass=k($.styleClasses.textClass,K.textClass||""))),K.map.length==0&&K.map.push(0,0,K.content.appendChild(Be(m.display.measure))),G==0?(R.measure.map=K.map,R.measure.cache={}):((R.measure.maps||(R.measure.maps=[])).push(K.map),(R.measure.caches||(R.measure.caches=[])).push({}))}if(e){var Ie=K.content.lastChild;(/\bcm-tab\b/.test(Ie.className)||Ie.querySelector&&Ie.querySelector(".cm-tab"))&&(K.content.className="cm-tab-wrap-hack")}return Ve(m,"renderLine",m,R.line,K.pre),K.pre.className&&(K.textClass=k(K.pre.className,K.textClass||"")),K}function gi(m){var R=D("span","\u2022","cm-invalidchar");return R.title="\\u"+m.charCodeAt(0).toString(16),R.setAttribute("aria-label",R.title),R}function dr(m,R,W,K,G,$,ye){if(!R)return;var Ae=m.splitSpaces?Xi(R,m.trailingSpace):R,Ie=m.cm.state.specialChars,Ke=!1,dt;if(!Ie.test(R))m.col+=R.length,dt=document.createTextNode(Ae),m.map.push(m.pos,m.pos+R.length,dt),_&&p<9&&(Ke=!0),m.pos+=R.length;else{dt=document.createDocumentFragment();for(var yt=0;;){Ie.lastIndex=yt;var Wt=Ie.exec(R),Nt=Wt?Wt.index-yt:R.length-yt;if(Nt){var en=document.createTextNode(Ae.slice(yt,yt+Nt));_&&p<9?dt.appendChild(D("span",[en])):dt.appendChild(en),m.map.push(m.pos,m.pos+Nt,en),m.col+=Nt,m.pos+=Nt}if(!Wt)break;yt+=Nt+1;var ln=void 0;if(Wt[0]==" "){var xn=m.cm.options.tabSize,Pn=xn-m.col%xn;ln=dt.appendChild(D("span",me(Pn),"cm-tab")),ln.setAttribute("role","presentation"),ln.setAttribute("cm-text"," "),m.col+=Pn}else Wt[0]=="\r"||Wt[0]==` -`?(ln=dt.appendChild(D("span",Wt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ln.setAttribute("cm-text",Wt[0]),m.col+=1):(ln=m.cm.options.specialCharPlaceholder(Wt[0]),ln.setAttribute("cm-text",Wt[0]),_&&p<9?dt.appendChild(D("span",[ln])):dt.appendChild(ln),m.col+=1);m.map.push(m.pos,m.pos+1,ln),m.pos++}}if(m.trailingSpace=Ae.charCodeAt(R.length-1)==32,W||K||G||Ke||$||ye){var Yn=W||"";K&&(Yn+=K),G&&(Yn+=G);var Nn=D("span",[dt],Yn,$);if(ye)for(var er in ye)ye.hasOwnProperty(er)&&er!="style"&&er!="class"&&Nn.setAttribute(er,ye[er]);return m.content.appendChild(Nn)}m.content.appendChild(dt)}function Xi(m,R){if(m.length>1&&!/ /.test(m))return m;for(var W=R,K="",G=0;GKe&&yt.from<=Ke);Wt++);if(yt.to>=dt)return m(W,K,G,$,ye,Ae,Ie);m(W,K.slice(0,yt.to-Ke),G,$,null,Ae,Ie),$=null,K=K.slice(yt.to-Ke),Ke=yt.to}}}function jr(m,R,W,K){var G=!K&&W.widgetNode;G&&m.map.push(m.pos,m.pos+R,G),!K&&m.cm.display.input.needsContentAttribute&&(G||(G=m.content.appendChild(document.createElement("span"))),G.setAttribute("cm-marker",W.id)),G&&(m.cm.display.input.setUneditable(G),m.content.appendChild(G)),m.pos+=R,m.trailingSpace=!1}function qa(m,R,W){var K=m.markedSpans,G=m.text,$=0;if(!K){for(var ye=1;yeIe||ii.collapsed&&mr.to==Ie&&mr.from==Ie)){if(mr.to!=null&&mr.to!=Ie&&Nt>mr.to&&(Nt=mr.to,ln=""),ii.className&&(en+=" "+ii.className),ii.css&&(Wt=(Wt?Wt+";":"")+ii.css),ii.startStyle&&mr.from==Ie&&(xn+=" "+ii.startStyle),ii.endStyle&&mr.to==Nt&&(er||(er=[])).push(ii.endStyle,mr.to),ii.title&&((Yn||(Yn={})).title=ii.title),ii.attributes)for(var ra in ii.attributes)(Yn||(Yn={}))[ra]=ii.attributes[ra];ii.collapsed&&(!Pn||ei(Pn.marker,ii)<0)&&(Pn=mr)}else mr.from>Ie&&Nt>mr.from&&(Nt=mr.from)}if(er)for(var ao=0;ao=Ae)break;for(var jo=Math.min(Ae,Nt);;){if(dt){var ko=Ie+dt.length;if(!Pn){var ja=ko>jo?dt.slice(0,jo-Ie):dt;R.addToken(R,ja,yt?yt+en:en,xn,Ie+ja.length==Nt?ln:"",Wt,Yn)}if(ko>=jo){dt=dt.slice(jo-Ie),Ie=jo;break}Ie=ko,xn=""}dt=G.slice($,$=W[Ke++]),yt=Lr(W[Ke++],R.cm.options)}}}function di(m,R,W){this.line=R,this.rest=Qi(R),this.size=this.rest?sn(se(this.rest))-W+1:1,this.node=this.text=null,this.hidden=ti(m,R)}function Ai(m,R,W){for(var K=[],G,$=R;$2&&$.push((Ie.bottom+Ke.top)/2-W.top)}}$.push(W.bottom-W.top)}}function We(m,R,W){if(m.line==R)return{map:m.measure.map,cache:m.measure.cache};for(var K=0;KW)return{map:m.measure.maps[G],cache:m.measure.caches[G],before:!0}}function ct(m,R){R=$i(R);var W=sn(R),K=m.display.externalMeasured=new di(m.doc,R,W);K.lineN=W;var G=K.built=Hr(m,K);return K.text=G.pre,A(m.display.lineMeasure,G.pre),K}function ft(m,R,W,K){return Pt(m,Tt(m,R),W,K)}function Ot(m,R){if(R>=m.display.viewFrom&&R=W.lineN&&RR)&&($=Ie-Ae,G=$-1,R>=Ie&&(ye="right")),G!=null){if(K=m[Ke+2],Ae==Ie&&W==(K.insertLeft?"left":"right")&&(ye=W),W=="left"&&G==0)for(;Ke&&m[Ke-2]==m[Ke-3]&&m[Ke-1].insertLeft;)K=m[(Ke-=3)+2],ye="left";if(W=="right"&&G==Ie-Ae)for(;Ke=0&&!((W=m[G]).left!=W.right);G--);return W}function On(m,R,W,K){var G=hn(R.map,W,K),$=G.node,ye=G.start,Ae=G.end,Ie=G.collapse,Ke;if($.nodeType==3){for(var dt=0;dt<4;dt++){for(;ye&&le(R.line.text.charAt(G.coverStart+ye));)--ye;for(;G.coverStart+Ae0&&(Ie=K="right");var yt;m.options.lineWrapping&&(yt=$.getClientRects()).length>1?Ke=yt[K=="right"?yt.length-1:0]:Ke=$.getBoundingClientRect()}if(_&&p<9&&!ye&&(!Ke||!Ke.left&&!Ke.right)){var Wt=$.parentNode.getClientRects()[0];Wt?Ke={left:Wt.left,right:Wt.left+Ta(m.display),top:Wt.top,bottom:Wt.bottom}:Ke=Zt}for(var Nt=Ke.top-R.rect.top,en=Ke.bottom-R.rect.top,ln=(Nt+en)/2,xn=R.view.measure.heights,Pn=0;Pn=K.text.length?(Ie=K.text.length,Ke="before"):Ie<=0&&(Ie=0,Ke="after"),!Ae)return ye(Ke=="before"?Ie-1:Ie,Ke=="before");function dt(en,ln,xn){var Pn=Ae[ln],Yn=Pn.level==1;return ye(xn?en-1:en,Yn!=xn)}var yt=_e(Ae,Ie,Ke),Wt=De,Nt=dt(Ie,yt,Ke=="before");return Wt!=null&&(Nt.other=dt(Ie,Wt,Ke!="before")),Nt}function hr(m,R){var W=0;R=V(m.doc,R),m.options.lineWrapping||(W=Ta(m.display)*R.ch);var K=$t(m.doc,R.line),G=Ha(K)+tl(m.display);return{left:W,right:W,top:G,bottom:G+K.height}}function ur(m,R,W,K,G){var $=Vt(m,R,W);return $.xRel=G,K&&($.outside=K),$}function ni(m,R,W){var K=m.doc;if(W+=m.display.viewOffset,W<0)return ur(K.first,0,null,-1,-1);var G=Sn(K,W),$=K.first+K.size-1;if(G>$)return ur(K.first+K.size-1,$t(K,$).text.length,null,1,1);R<0&&(R=0);for(var ye=$t(K,G);;){var Ae=ea(m,ye,G,R,W),Ie=Wi(ye,Ae.ch+(Ae.xRel>0||Ae.outside>0?1:0));if(!Ie)return Ae;var Ke=Ie.find(1);if(Ke.line==G)return Ke;ye=$t(K,G=Ke.line)}}function pi(m,R,W,K){K-=zr(R);var G=R.text.length,$=Le(function(ye){return Pt(m,W,ye-1).bottom<=K},G,0);return G=Le(function(ye){return Pt(m,W,ye).top>K},$,G),{begin:$,end:G}}function tr(m,R,W,K){W||(W=Tt(m,R));var G=si(m,R,Pt(m,W,K),"line").top;return pi(m,R,W,G)}function vi(m,R,W,K){return m.bottom<=W?!1:m.top>W?!0:(K?m.left:m.right)>R}function ea(m,R,W,K,G){G-=Ha(R);var $=Tt(m,R),ye=zr(R),Ae=0,Ie=R.text.length,Ke=!0,dt=tt(R,m.doc.direction);if(dt){var yt=(m.options.lineWrapping?Si:xi)(m,R,W,$,dt,K,G);Ke=yt.level!=1,Ae=Ke?yt.from:yt.to-1,Ie=Ke?yt.to:yt.from-1}var Wt=null,Nt=null,en=Le(function(Cr){var mr=Pt(m,$,Cr);return mr.top+=ye,mr.bottom+=ye,vi(mr,K,G,!1)?(mr.top<=G&&mr.left<=K&&(Wt=Cr,Nt=mr),!0):!1},Ae,Ie),ln,xn,Pn=!1;if(Nt){var Yn=K-Nt.left=er.bottom?1:0}return en=Ee(R.text,en,1),ur(W,en,xn,Pn,K-ln)}function xi(m,R,W,K,G,$,ye){var Ae=Le(function(yt){var Wt=G[yt],Nt=Wt.level!=1;return vi(Zr(m,Vt(W,Nt?Wt.to:Wt.from,Nt?"before":"after"),"line",R,K),$,ye,!0)},0,G.length-1),Ie=G[Ae];if(Ae>0){var Ke=Ie.level!=1,dt=Zr(m,Vt(W,Ke?Ie.from:Ie.to,Ke?"after":"before"),"line",R,K);vi(dt,$,ye,!0)&&dt.top>ye&&(Ie=G[Ae-1])}return Ie}function Si(m,R,W,K,G,$,ye){var Ae=pi(m,R,K,ye),Ie=Ae.begin,Ke=Ae.end;/\s/.test(R.text.charAt(Ke-1))&&Ke--;for(var dt=null,yt=null,Wt=0;Wt=Ke||Nt.to<=Ie)continue;var en=Nt.level!=1,ln=Pt(m,K,en?Math.min(Ke,Nt.to)-1:Math.max(Ie,Nt.from)).right,xn=ln<$?$-ln+1e9:ln-$;(!dt||yt>xn)&&(dt=Nt,yt=xn)}return dt||(dt=G[G.length-1]),dt.fromKe&&(dt={from:dt.from,to:Ke,level:dt.level}),dt}var Ii;function ha(m){if(m.cachedTextHeight!=null)return m.cachedTextHeight;if(Ii==null){Ii=D("pre",null,"CodeMirror-line-like");for(var R=0;R<49;++R)Ii.appendChild(document.createTextNode("x")),Ii.appendChild(D("br"));Ii.appendChild(document.createTextNode("x"))}A(m.measure,Ii);var W=Ii.offsetHeight/50;return W>3&&(m.cachedTextHeight=W),S(m.measure),W||1}function Ta(m){if(m.cachedCharWidth!=null)return m.cachedCharWidth;var R=D("span","xxxxxxxxxx"),W=D("pre",[R],"CodeMirror-line-like");A(m.measure,W);var K=R.getBoundingClientRect(),G=(K.right-K.left)/10;return G>2&&(m.cachedCharWidth=G),G||10}function aa(m){for(var R=m.display,W={},K={},G=R.gutters.clientLeft,$=R.gutters.firstChild,ye=0;$;$=$.nextSibling,++ye){var Ae=m.display.gutterSpecs[ye].className;W[Ae]=$.offsetLeft+$.clientLeft+G,K[Ae]=$.clientWidth}return{fixedPos:$a(R),gutterTotalWidth:R.gutters.offsetWidth,gutterLeft:W,gutterWidth:K,wrapperWidth:R.wrapper.clientWidth}}function $a(m){return m.scroller.getBoundingClientRect().left-m.sizer.getBoundingClientRect().left}function To(m){var R=ha(m.display),W=m.options.lineWrapping,K=W&&Math.max(5,m.display.scroller.clientWidth/Ta(m.display)-3);return function(G){if(ti(m.doc,G))return 0;var $=0;if(G.widgets)for(var ye=0;ye0&&(Ke=$t(m.doc,Ie.line).text).length==Ie.ch){var dt=B(Ke,Ke.length,m.options.tabSize)-Ke.length;Ie=Vt(Ie.line,Math.max(0,Math.round(($-xt(m.display).left)/Ta(m.display))-dt))}return Ie}function Gi(m,R){if(R>=m.display.viewTo)return null;if(R-=m.display.viewFrom,R<0)return null;for(var W=m.display.view,K=0;KR)&&(G.updateLineNumbers=R),m.curOp.viewChanged=!0,R>=G.viewTo)Gr&&Ka(m.doc,R)G.viewFrom?ta(m):(G.viewFrom+=K,G.viewTo+=K);else if(R<=G.viewFrom&&W>=G.viewTo)ta(m);else if(R<=G.viewFrom){var $=Ao(m,W,W+K,1);$?(G.view=G.view.slice($.index),G.viewFrom=$.lineN,G.viewTo+=K):ta(m)}else if(W>=G.viewTo){var ye=Ao(m,R,R,-1);ye?(G.view=G.view.slice(0,ye.index),G.viewTo=ye.lineN):ta(m)}else{var Ae=Ao(m,R,R,-1),Ie=Ao(m,W,W+K,1);Ae&&Ie?(G.view=G.view.slice(0,Ae.index).concat(Ai(m,Ae.lineN,Ie.lineN)).concat(G.view.slice(Ie.index)),G.viewTo+=K):ta(m)}var Ke=G.externalMeasured;Ke&&(W=G.lineN&&R=K.viewTo)return;var $=K.view[Gi(m,R)];if($.node==null)return;var ye=$.changes||($.changes=[]);re(ye,W)==-1&&ye.push(W)}function ta(m){m.display.viewFrom=m.display.viewTo=m.doc.first,m.display.view=[],m.display.viewOffset=0}function Ao(m,R,W,K){var G=Gi(m,R),$,ye=m.display.view;if(!Gr||W==m.doc.first+m.doc.size)return{index:G,lineN:W};for(var Ae=m.display.viewFrom,Ie=0;Ie0){if(G==ye.length-1)return null;$=Ae+ye[G].size-R,G++}else $=Ae-R;R+=$,W+=$}for(;Ka(m.doc,W)!=W;){if(G==(K<0?0:ye.length-1))return null;W+=K*ye[G-(K<0?1:0)].size,G+=K}return{index:G,lineN:W}}function Vo(m,R,W){var K=m.display,G=K.view;G.length==0||R>=K.viewTo||W<=K.viewFrom?(K.view=Ai(m,R,W),K.viewFrom=R):(K.viewFrom>R?K.view=Ai(m,R,K.viewFrom).concat(K.view):K.viewFromW&&(K.view=K.view.slice(0,Gi(m,W)))),K.viewTo=W}function Yo(m){for(var R=m.display.view,W=0,K=0;K=m.display.viewTo||Ae.to().line0?R.blinker=setInterval(function(){m.hasFocus()||is(m),R.cursorDiv.style.visibility=(W=!W)?"":"hidden"},m.options.cursorBlinkRate):m.options.cursorBlinkRate<0&&(R.cursorDiv.style.visibility="hidden")}function ks(m){m.state.focused||(m.display.input.focus(),Jo(m))}function nl(m){m.state.delayingBlurEvent=!0,setTimeout(function(){m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1,is(m))},100)}function Jo(m,R){if(m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1),m.options.readOnly=="nocursor")return;m.state.focused||(Ve(m,"focus",m,R),m.state.focused=!0,X(m.display.wrapper,"CodeMirror-focused"),!m.curOp&&m.display.selForContextMenu!=m.doc.sel&&(m.display.input.reset(),e&&setTimeout(function(){return m.display.input.reset(!0)},20)),m.display.input.receivedFocus()),Oa(m)}function is(m,R){if(m.state.delayingBlurEvent)return;m.state.focused&&(Ve(m,"blur",m,R),m.state.focused=!1,w(m.display.wrapper,"CodeMirror-focused")),clearInterval(m.display.blinker),setTimeout(function(){m.state.focused||(m.display.shift=!1)},150)}function Ls(m){for(var R=m.display,W=R.lineDiv.offsetTop,K=0;K.005||dt<-.005)&&(Dn(G.line,ye),bl(G.line),G.rest))for(var yt=0;ytm.display.sizerWidth){var Wt=Math.ceil(Ae/Ta(m.display));Wt>m.display.maxLineLength&&(m.display.maxLineLength=Wt,m.display.maxLine=G.line,m.display.maxLineChanged=!0)}}}function bl(m){if(m.widgets)for(var R=0;R=ye&&($=Sn(R,Ha($t(R,Ie))-m.wrapper.clientHeight),ye=Ie)}return{from:$,to:Math.max(ye,$+1)}}function El(m,R){if(Je(m,"scrollCursorIntoView"))return;var W=m.display,K=W.sizer.getBoundingClientRect(),G=null;if(R.top+K.top<0?G=!0:R.bottom+K.top>(window.innerHeight||document.documentElement.clientHeight)&&(G=!1),G!=null&&!t){var $=D("div","\u200B",null,`position: absolute; - top: `+(R.top-W.viewOffset-tl(m.display))+`px; +`,R);G==-1&&(G=m.length);var $=m.slice(R,m.charAt(G-1)=="\r"?G-1:G),ye=$.indexOf("\r");ye!=-1?(W.push($.slice(0,ye)),R+=ye+1):(W.push($),R=G+1)}return W}:function(m){return m.split(/\r\n?|\n/)},pt=window.getSelection?function(m){try{return m.selectionStart!=m.selectionEnd}catch(R){return!1}}:function(m){var R;try{R=m.ownerDocument.selection.createRange()}catch(W){}return!R||R.parentElement()!=m?!1:R.compareEndPoints("StartToEnd",R)!=0},st=function(){var m=D("div");return"oncopy"in m?!0:(m.setAttribute("oncopy","return;"),typeof m.oncopy=="function")}(),Pe=null;function ze(m){if(Pe!=null)return Pe;var R=A(m,D("span","x")),W=R.getBoundingClientRect(),K=N(R,0,1).getBoundingClientRect();return Pe=Math.abs(W.left-K.left)>1}var xt={},ht={};function Bt(m,R){arguments.length>2&&(R.dependencies=Array.prototype.slice.call(arguments,2)),xt[m]=R}function Ht(m,R){ht[m]=R}function gt(m){if(typeof m=="string"&&ht.hasOwnProperty(m))m=ht[m];else if(m&&typeof m.name=="string"&&ht.hasOwnProperty(m.name)){var R=ht[m.name];typeof R=="string"&&(R={name:R}),m=Fe(R,m),m.name=R.name}else{if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(m))return gt("application/xml");if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(m))return gt("application/json")}return typeof m=="string"?{name:m}:m||{name:"null"}}function Xt(m,R){R=gt(R);var W=xt[R.name];if(!W)return Xt(m,"text/plain");var K=W(m,R);if(jt.hasOwnProperty(R.name)){var G=jt[R.name];for(var $ in G){if(!G.hasOwnProperty($))continue;K.hasOwnProperty($)&&(K["_"+$]=K[$]),K[$]=G[$]}}if(K.name=R.name,R.helperType&&(K.helperType=R.helperType),R.modeProps)for(var ye in R.modeProps)K[ye]=R.modeProps[ye];return K}var jt={};function Ut(m,R){var W=jt.hasOwnProperty(m)?jt[m]:jt[m]={};L(R,W)}function It(m,R){if(R===!0)return R;if(m.copyState)return m.copyState(R);var W={};for(var K in R){var G=R[K];G instanceof Array&&(G=G.concat([])),W[K]=G}return W}function Kt(m,R){for(var W;m.innerMode&&!(W=m.innerMode(R),!W||W.mode==m);)R=W.state,m=W.mode;return W||{mode:m,state:R}}function rn(m,R,W){return m.startState?m.startState(R,W):!0}var zt=function(m,R,W){this.pos=this.start=0,this.string=m,this.tabSize=R||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=W};zt.prototype.eol=function(){return this.pos>=this.string.length},zt.prototype.sol=function(){return this.pos==this.lineStart},zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},zt.prototype.next=function(){if(this.posR},zt.prototype.eatSpace=function(){for(var m=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>m},zt.prototype.skipToEnd=function(){this.pos=this.string.length},zt.prototype.skipTo=function(m){var R=this.string.indexOf(m,this.pos);if(R>-1)return this.pos=R,!0},zt.prototype.backUp=function(m){this.pos-=m},zt.prototype.column=function(){return this.lastColumnPos0?null:($&&R!==!1&&(this.pos+=$[0].length),$)}},zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},zt.prototype.hideFirstChars=function(m,R){this.lineStart+=m;try{return R()}finally{this.lineStart-=m}},zt.prototype.lookAhead=function(m){var R=this.lineOracle;return R&&R.lookAhead(m)},zt.prototype.baseToken=function(){var m=this.lineOracle;return m&&m.baseToken(this.pos)};function $t(m,R){if(R-=m.first,R<0||R>=m.size)throw new Error("There is no line "+(R+m.first)+" in the document.");for(var W=m;!W.lines;)for(var K=0;;++K){var G=W.children[K],$=G.chunkSize();if(R<$){W=G;break}R-=$}return W.lines[R]}function Pn(m,R,W){var K=[],G=R.line;return m.iter(R.line,W.line+1,function($){var ye=$.text;G==W.line&&(ye=ye.slice(0,W.ch)),G==R.line&&(ye=ye.slice(R.ch)),K.push(ye),++G}),K}function fn(m,R,W){var K=[];return m.iter(R,W,function(G){K.push(G.text)}),K}function In(m,R){var W=R-m.height;if(W)for(var K=m;K;K=K.parent)K.height+=W}function on(m){if(m.parent==null)return null;for(var R=m.parent,W=re(R.lines,m),K=R.parent;K;R=K,K=K.parent)for(var G=0;!(K.children[G]==R);++G)W+=K.children[G].chunkSize();return W+R.first}function Cn(m,R){var W=m.first;e:do{for(var K=0;K=m.first&&RW?Vt(W,$t(m,W).text.length):J(R,$t(m,R.line).text.length)}function J(m,R){var W=m.ch;return W==null||W>R?Vt(m.line,R):W<0?Vt(m.line,0):m}function ee(m,R){for(var W=[],K=0;Kthis.maxLookAhead&&(this.maxLookAhead=m),R},ue.prototype.baseToken=function(m){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=m;)this.baseTokenPos+=2;var R=this.baseTokens[this.baseTokenPos+1];return{type:R&&R.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-m}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(m,R,W){return R instanceof Te?new ue(m,It(m.mode,R.state),W,R.lookAhead):new ue(m,It(m.mode,R),W)},ue.prototype.save=function(m){var R=m!==!1?It(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Te(R,this.maxLookAhead):R};function nt(m,R,W,K){var G=[m.state.modeGen],$={};vr(m,R.text,m.doc.mode,W,function(Ke,dt){return G.push(Ke,dt)},$,K);for(var ye=W.state,Ae=function(Ke){W.baseTokens=G;var dt=m.state.overlays[Ke],bt=1,Wt=0;W.state=!0,vr(m,R.text,dt.mode,W,function(Nt,en){for(var cn=bt;WtNt&&G.splice(bt,1,Nt,G[bt+1],En),bt+=2,Wt=Math.min(Nt,En)}if(!en)return;if(dt.opaque)G.splice(cn,bt-cn,Nt,"overlay "+en),bt=cn+2;else for(;cnm.options.maxHighlightLength&&It(m.doc.mode,K.state),$=nt(m,R,K);G&&(K.state=G),R.stateAfter=K.save(!G),R.styles=$.styles,$.classes?R.styleClasses=$.classes:R.styleClasses&&(R.styleClasses=null),W===m.doc.highlightFrontier&&(m.doc.modeFrontier=Math.max(m.doc.modeFrontier,++m.doc.highlightFrontier))}return R.styles}function Yt(m,R,W){var K=m.doc,G=m.display;if(!K.mode.startState)return new ue(K,!0,R);var $=or(m,R,W),ye=$>K.first&&$t(K,$-1).stateAfter,Ae=ye?ue.fromSaved(K,ye,$):new ue(K,rn(K.mode),$);return K.iter($,R,function(Ie){sn(m,Ie.text,Ae);var Ke=Ae.line;Ie.stateAfter=Ke==R-1||Ke%5==0||Ke>=G.viewFrom&&KeR.start)return $}throw new Error("Mode "+m.name+" failed to advance stream.")}var Vn=function(m,R,W){this.start=m.start,this.end=m.pos,this.string=m.current(),this.type=R||null,this.state=W};function lr(m,R,W,K){var G=m.doc,$=G.mode,ye;R=V(G,R);var Ae=$t(G,R.line),Ie=Yt(m,R.line,W),Ke=new zt(Ae.text,m.options.tabSize,Ie),dt;for(K&&(dt=[]);(K||Ke.posm.options.maxHighlightLength?(Ae=!1,ye&&sn(m,R,K,dt.pos),dt.pos=R.length,bt=null):bt=Or(kn(W,dt,K.state,Wt),$),Wt){var Nt=Wt[0].name;Nt&&(bt="m-"+(bt?Nt+" "+bt:Nt))}if(!Ae||Ke!=bt){for(;Ieye;--Ae){if(Ae<=$.first)return $.first;var Ie=$t($,Ae-1),Ke=Ie.stateAfter;if(Ke&&(!W||Ae+(Ke instanceof Te?Ke.lookAhead:0)<=$.modeFrontier))return Ae;var dt=B(Ie.text,null,m.options.tabSize);(G==null||K>dt)&&(G=Ae-1,K=dt)}return G}function Sr(m,R){if(m.modeFrontier=Math.min(m.modeFrontier,R),m.highlightFrontierW;K--){var G=$t(m,K).stateAfter;if(G&&(!(G instanceof Te)||K+G.lookAhead=R:$.to>R);(K||(K=[])).push(new Fi(ye,$.from,Ie?null:$.to))}}return K}function wo(m,R,W){var K;if(m)for(var G=0;G=R:$.to>R);if(Ae||$.from==R&&ye.type=="bookmark"&&(!W||$.marker.insertLeft)){var Ie=$.from==null||(ye.inclusiveLeft?$.from<=R:$.from0&&Ae)for(var tr=0;tr0)continue;var dt=[Ie,1],bt=xn(Ke.from,Ae.from),Wt=xn(Ke.to,Ae.to);(bt<0||!ye.inclusiveLeft&&!bt)&&dt.push({from:Ke.from,to:Ae.from}),(Wt>0||!ye.inclusiveRight&&!Wt)&&dt.push({from:Ae.to,to:Ke.to}),G.splice.apply(G,dt),Ie+=dt.length-3}return G}function Jr(m){var R=m.markedSpans;if(!R)return;for(var W=0;WR)&&(!K||ti(K,$.marker)<0)&&(K=$.marker)}return K}function Pi(m,R,W,K,G){var $=$t(m,R),ye=Gr&&$.markedSpans;if(ye)for(var Ae=0;Ae=0&&bt<=0||dt<=0&&bt>=0)continue;if(dt<=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?xn(Ke.to,W)>=0:xn(Ke.to,W)>0)||dt>=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?xn(Ke.from,K)<=0:xn(Ke.from,K)<0))return!0}}function Zi(m){for(var R;R=li(m);)m=R.find(-1,!0).line;return m}function mo(m){for(var R;R=sr(m);)m=R.find(1,!0).line;return m}function Vi(m){for(var R,W;R=sr(m);)m=R.find(1,!0).line,(W||(W=[])).push(m);return W}function Wa(m,R){var W=$t(m,R),K=Zi(W);return W==K?R:on(K)}function Ma(m,R){if(R>m.lastLine())return R;var W=$t(m,R),K;if(!ni(m,W))return R;for(;K=sr(W);)W=K.find(1,!0).line;return on(W)+1}function ni(m,R){var W=Gr&&R.markedSpans;if(W)for(var K=void 0,G=0;GR.maxLineLength&&(R.maxLineLength=G,R.maxLine=K)})}var za=function(m,R,W){this.text=m,bi(this,R),this.height=W?W(this):1};za.prototype.lineNo=function(){return on(this)},He(za);function Wo(m,R,W,K){m.text=R,m.stateAfter&&(m.stateAfter=null),m.styles&&(m.styles=null),m.order!=null&&(m.order=null),Jr(m),bi(m,W);var G=K?K(m):1;G!=m.height&&In(m,G)}function Jn(m){m.parent=null,Jr(m)}var gr={},Zn={};function Mr(m,R){if(!m||/^\s*$/.test(m))return null;var W=R.addModeClass?Zn:gr;return W[m]||(W[m]=m.replace(/\S+/g,"cm-$&"))}function Kr(m,R){var W=M("span",null,null,e?"padding-right: .1px":null),K={pre:M("pre",[W],"CodeMirror-line"),content:W,col:0,pos:0,cm:m,trailingSpace:!1,splitSpaces:m.getOption("lineWrapping")};R.measure={};for(var G=0;G<=(R.rest?R.rest.length:0);G++){var $=G?R.rest[G-1]:R.line,ye=void 0;K.pos=0,K.addToken=cr,rt(m.display.measure)&&(ye=tt($,m.doc.direction))&&(K.addToken=ma(K.addToken,ye)),K.map=[];var Ae=R!=m.display.externalMeasured&&on($);qa($,K,kt(m,$,Ae)),$.styleClasses&&($.styleClasses.bgClass&&(K.bgClass=k($.styleClasses.bgClass,K.bgClass||"")),$.styleClasses.textClass&&(K.textClass=k($.styleClasses.textClass,K.textClass||""))),K.map.length==0&&K.map.push(0,0,K.content.appendChild(Be(m.display.measure))),G==0?(R.measure.map=K.map,R.measure.cache={}):((R.measure.maps||(R.measure.maps=[])).push(K.map),(R.measure.caches||(R.measure.caches=[])).push({}))}if(e){var Ie=K.content.lastChild;(/\bcm-tab\b/.test(Ie.className)||Ie.querySelector&&Ie.querySelector(".cm-tab"))&&(K.content.className="cm-tab-wrap-hack")}return Ve(m,"renderLine",m,R.line,K.pre),K.pre.className&&(K.textClass=k(K.pre.className,K.textClass||"")),K}function gi(m){var R=D("span","\u2022","cm-invalidchar");return R.title="\\u"+m.charCodeAt(0).toString(16),R.setAttribute("aria-label",R.title),R}function cr(m,R,W,K,G,$,ye){if(!R)return;var Ae=m.splitSpaces?Wi(R,m.trailingSpace):R,Ie=m.cm.state.specialChars,Ke=!1,dt;if(!Ie.test(R))m.col+=R.length,dt=document.createTextNode(Ae),m.map.push(m.pos,m.pos+R.length,dt),_&&p<9&&(Ke=!0),m.pos+=R.length;else{dt=document.createDocumentFragment();for(var bt=0;;){Ie.lastIndex=bt;var Wt=Ie.exec(R),Nt=Wt?Wt.index-bt:R.length-bt;if(Nt){var en=document.createTextNode(Ae.slice(bt,bt+Nt));_&&p<9?dt.appendChild(D("span",[en])):dt.appendChild(en),m.map.push(m.pos,m.pos+Nt,en),m.col+=Nt,m.pos+=Nt}if(!Wt)break;bt+=Nt+1;var cn=void 0;if(Wt[0]==" "){var En=m.cm.options.tabSize,Un=En-m.col%En;cn=dt.appendChild(D("span",me(Un),"cm-tab")),cn.setAttribute("role","presentation"),cn.setAttribute("cm-text"," "),m.col+=Un}else Wt[0]=="\r"||Wt[0]==` +`?(cn=dt.appendChild(D("span",Wt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),cn.setAttribute("cm-text",Wt[0]),m.col+=1):(cn=m.cm.options.specialCharPlaceholder(Wt[0]),cn.setAttribute("cm-text",Wt[0]),_&&p<9?dt.appendChild(D("span",[cn])):dt.appendChild(cn),m.col+=1);m.map.push(m.pos,m.pos+1,cn),m.pos++}}if(m.trailingSpace=Ae.charCodeAt(R.length-1)==32,W||K||G||Ke||$||ye){var Yn=W||"";K&&(Yn+=K),G&&(Yn+=G);var Fn=D("span",[dt],Yn,$);if(ye)for(var tr in ye)ye.hasOwnProperty(tr)&&tr!="style"&&tr!="class"&&Fn.setAttribute(tr,ye[tr]);return m.content.appendChild(Fn)}m.content.appendChild(dt)}function Wi(m,R){if(m.length>1&&!/ /.test(m))return m;for(var W=R,K="",G=0;GKe&&bt.from<=Ke);Wt++);if(bt.to>=dt)return m(W,K,G,$,ye,Ae,Ie);m(W,K.slice(0,bt.to-Ke),G,$,null,Ae,Ie),$=null,K=K.slice(bt.to-Ke),Ke=bt.to}}}function Br(m,R,W,K){var G=!K&&W.widgetNode;G&&m.map.push(m.pos,m.pos+R,G),!K&&m.cm.display.input.needsContentAttribute&&(G||(G=m.content.appendChild(document.createElement("span"))),G.setAttribute("cm-marker",W.id)),G&&(m.cm.display.input.setUneditable(G),m.content.appendChild(G)),m.pos+=R,m.trailingSpace=!1}function qa(m,R,W){var K=m.markedSpans,G=m.text,$=0;if(!K){for(var ye=1;yeIe||oi.collapsed&&mr.to==Ie&&mr.from==Ie)){if(mr.to!=null&&mr.to!=Ie&&Nt>mr.to&&(Nt=mr.to,cn=""),oi.className&&(en+=" "+oi.className),oi.css&&(Wt=(Wt?Wt+";":"")+oi.css),oi.startStyle&&mr.from==Ie&&(En+=" "+oi.startStyle),oi.endStyle&&mr.to==Nt&&(tr||(tr=[])).push(oi.endStyle,mr.to),oi.title&&((Yn||(Yn={})).title=oi.title),oi.attributes)for(var na in oi.attributes)(Yn||(Yn={}))[na]=oi.attributes[na];oi.collapsed&&(!Un||ti(Un.marker,oi)<0)&&(Un=mr)}else mr.from>Ie&&Nt>mr.from&&(Nt=mr.from)}if(tr)for(var no=0;no=Ae)break;for(var Ko=Math.min(Ae,Nt);;){if(dt){var Mo=Ie+dt.length;if(!Un){var Ka=Mo>Ko?dt.slice(0,Ko-Ie):dt;R.addToken(R,Ka,bt?bt+en:en,En,Ie+Ka.length==Nt?cn:"",Wt,Yn)}if(Mo>=Ko){dt=dt.slice(Ko-Ie),Ie=Ko;break}Ie=Mo,En=""}dt=G.slice($,$=W[Ke++]),bt=Mr(W[Ke++],R.cm.options)}}}function ci(m,R,W){this.line=R,this.rest=Vi(R),this.size=this.rest?on(se(this.rest))-W+1:1,this.node=this.text=null,this.hidden=ni(m,R)}function Oi(m,R,W){for(var K=[],G,$=R;$2&&$.push((Ie.bottom+Ke.top)/2-W.top)}}$.push(W.bottom-W.top)}}function We(m,R,W){if(m.line==R)return{map:m.measure.map,cache:m.measure.cache};for(var K=0;KW)return{map:m.measure.maps[G],cache:m.measure.caches[G],before:!0}}function ct(m,R){R=Zi(R);var W=on(R),K=m.display.externalMeasured=new ci(m.doc,R,W);K.lineN=W;var G=K.built=Kr(m,K);return K.text=G.pre,A(m.display.lineMeasure,G.pre),K}function ft(m,R,W,K){return Pt(m,Tt(m,R),W,K)}function Ot(m,R){if(R>=m.display.viewFrom&&R=W.lineN&&RR)&&($=Ie-Ae,G=$-1,R>=Ie&&(ye="right")),G!=null){if(K=m[Ke+2],Ae==Ie&&W==(K.insertLeft?"left":"right")&&(ye=W),W=="left"&&G==0)for(;Ke&&m[Ke-2]==m[Ke-3]&&m[Ke-1].insertLeft;)K=m[(Ke-=3)+2],ye="left";if(W=="right"&&G==Ie-Ae)for(;Ke=0&&!((W=m[G]).left!=W.right);G--);return W}function Rn(m,R,W,K){var G=dn(R.map,W,K),$=G.node,ye=G.start,Ae=G.end,Ie=G.collapse,Ke;if($.nodeType==3){for(var dt=0;dt<4;dt++){for(;ye&&le(R.line.text.charAt(G.coverStart+ye));)--ye;for(;G.coverStart+Ae0&&(Ie=K="right");var bt;m.options.lineWrapping&&(bt=$.getClientRects()).length>1?Ke=bt[K=="right"?bt.length-1:0]:Ke=$.getBoundingClientRect()}if(_&&p<9&&!ye&&(!Ke||!Ke.left&&!Ke.right)){var Wt=$.parentNode.getClientRects()[0];Wt?Ke={left:Wt.left,right:Wt.left+Aa(m.display),top:Wt.top,bottom:Wt.bottom}:Ke=Zt}for(var Nt=Ke.top-R.rect.top,en=Ke.bottom-R.rect.top,cn=(Nt+en)/2,En=R.view.measure.heights,Un=0;Un=K.text.length?(Ie=K.text.length,Ke="before"):Ie<=0&&(Ie=0,Ke="after"),!Ae)return ye(Ke=="before"?Ie-1:Ie,Ke=="before");function dt(en,cn,En){var Un=Ae[cn],Yn=Un.level==1;return ye(En?en-1:en,Yn!=En)}var bt=_e(Ae,Ie,Ke),Wt=De,Nt=dt(Ie,bt,Ke=="before");return Wt!=null&&(Nt.other=dt(Ie,Wt,Ke!="before")),Nt}function dr(m,R){var W=0;R=V(m.doc,R),m.options.lineWrapping||(W=Aa(m.display)*R.ch);var K=$t(m.doc,R.line),G=Xa(K)+nl(m.display);return{left:W,right:W,top:G,bottom:G+K.height}}function ur(m,R,W,K,G){var $=Vt(m,R,W);return $.xRel=G,K&&($.outside=K),$}function ri(m,R,W){var K=m.doc;if(W+=m.display.viewOffset,W<0)return ur(K.first,0,null,-1,-1);var G=Cn(K,W),$=K.first+K.size-1;if(G>$)return ur(K.first+K.size-1,$t(K,$).text.length,null,1,1);R<0&&(R=0);for(var ye=$t(K,G);;){var Ae=qi(m,ye,G,R,W),Ie=Hi(ye,Ae.ch+(Ae.xRel>0||Ae.outside>0?1:0));if(!Ie)return Ae;var Ke=Ie.find(1);if(Ke.line==G)return Ke;ye=$t(K,G=Ke.line)}}function fi(m,R,W,K){K-=Xr(R);var G=R.text.length,$=Le(function(ye){return Pt(m,W,ye-1).bottom<=K},G,0);return G=Le(function(ye){return Pt(m,W,ye).top>K},$,G),{begin:$,end:G}}function nr(m,R,W,K){W||(W=Tt(m,R));var G=ui(m,R,Pt(m,W,K),"line").top;return fi(m,R,W,G)}function vi(m,R,W,K){return m.bottom<=W?!1:m.top>W?!0:(K?m.left:m.right)>R}function qi(m,R,W,K,G){G-=Xa(R);var $=Tt(m,R),ye=Xr(R),Ae=0,Ie=R.text.length,Ke=!0,dt=tt(R,m.doc.direction);if(dt){var bt=(m.options.lineWrapping?Ai:wi)(m,R,W,$,dt,K,G);Ke=bt.level!=1,Ae=Ke?bt.from:bt.to-1,Ie=Ke?bt.to:bt.from-1}var Wt=null,Nt=null,en=Le(function(Tr){var mr=Pt(m,$,Tr);return mr.top+=ye,mr.bottom+=ye,vi(mr,K,G,!1)?(mr.top<=G&&mr.left<=K&&(Wt=Tr,Nt=mr),!0):!1},Ae,Ie),cn,En,Un=!1;if(Nt){var Yn=K-Nt.left=tr.bottom?1:0}return en=Ee(R.text,en,1),ur(W,en,En,Un,K-cn)}function wi(m,R,W,K,G,$,ye){var Ae=Le(function(bt){var Wt=G[bt],Nt=Wt.level!=1;return vi(qr(m,Vt(W,Nt?Wt.to:Wt.from,Nt?"before":"after"),"line",R,K),$,ye,!0)},0,G.length-1),Ie=G[Ae];if(Ae>0){var Ke=Ie.level!=1,dt=qr(m,Vt(W,Ke?Ie.from:Ie.to,Ke?"after":"before"),"line",R,K);vi(dt,$,ye,!0)&&dt.top>ye&&(Ie=G[Ae-1])}return Ie}function Ai(m,R,W,K,G,$,ye){var Ae=fi(m,R,K,ye),Ie=Ae.begin,Ke=Ae.end;/\s/.test(R.text.charAt(Ke-1))&&Ke--;for(var dt=null,bt=null,Wt=0;Wt=Ke||Nt.to<=Ie)continue;var en=Nt.level!=1,cn=Pt(m,K,en?Math.min(Ke,Nt.to)-1:Math.max(Ie,Nt.from)).right,En=cn<$?$-cn+1e9:cn-$;(!dt||bt>En)&&(dt=Nt,bt=En)}return dt||(dt=G[G.length-1]),dt.fromKe&&(dt={from:dt.from,to:Ke,level:dt.level}),dt}var ki;function da(m){if(m.cachedTextHeight!=null)return m.cachedTextHeight;if(ki==null){ki=D("pre",null,"CodeMirror-line-like");for(var R=0;R<49;++R)ki.appendChild(document.createTextNode("x")),ki.appendChild(D("br"));ki.appendChild(document.createTextNode("x"))}A(m.measure,ki);var W=ki.offsetHeight/50;return W>3&&(m.cachedTextHeight=W),S(m.measure),W||1}function Aa(m){if(m.cachedCharWidth!=null)return m.cachedCharWidth;var R=D("span","xxxxxxxxxx"),W=D("pre",[R],"CodeMirror-line-like");A(m.measure,W);var K=R.getBoundingClientRect(),G=(K.right-K.left)/10;return G>2&&(m.cachedCharWidth=G),G||10}function ia(m){for(var R=m.display,W={},K={},G=R.gutters.clientLeft,$=R.gutters.firstChild,ye=0;$;$=$.nextSibling,++ye){var Ae=m.display.gutterSpecs[ye].className;W[Ae]=$.offsetLeft+$.clientLeft+G,K[Ae]=$.clientWidth}return{fixedPos:$a(R),gutterTotalWidth:R.gutters.offsetWidth,gutterLeft:W,gutterWidth:K,wrapperWidth:R.wrapper.clientWidth}}function $a(m){return m.scroller.getBoundingClientRect().left-m.sizer.getBoundingClientRect().left}function Oo(m){var R=da(m.display),W=m.options.lineWrapping,K=W&&Math.max(5,m.display.scroller.clientWidth/Aa(m.display)-3);return function(G){if(ni(m.doc,G))return 0;var $=0;if(G.widgets)for(var ye=0;ye0&&(Ke=$t(m.doc,Ie.line).text).length==Ie.ch){var dt=B(Ke,Ke.length,m.options.tabSize)-Ke.length;Ie=Vt(Ie.line,Math.max(0,Math.round(($-wt(m.display).left)/Aa(m.display))-dt))}return Ie}function zi(m,R){if(R>=m.display.viewTo)return null;if(R-=m.display.viewFrom,R<0)return null;for(var W=m.display.view,K=0;KR)&&(G.updateLineNumbers=R),m.curOp.viewChanged=!0,R>=G.viewTo)Gr&&Wa(m.doc,R)G.viewFrom?$i(m):(G.viewFrom+=K,G.viewTo+=K);else if(R<=G.viewFrom&&W>=G.viewTo)$i(m);else if(R<=G.viewFrom){var $=Ro(m,W,W+K,1);$?(G.view=G.view.slice($.index),G.viewFrom=$.lineN,G.viewTo+=K):$i(m)}else if(W>=G.viewTo){var ye=Ro(m,R,R,-1);ye?(G.view=G.view.slice(0,ye.index),G.viewTo=ye.lineN):$i(m)}else{var Ae=Ro(m,R,R,-1),Ie=Ro(m,W,W+K,1);Ae&&Ie?(G.view=G.view.slice(0,Ae.index).concat(Oi(m,Ae.lineN,Ie.lineN)).concat(G.view.slice(Ie.index)),G.viewTo+=K):$i(m)}var Ke=G.externalMeasured;Ke&&(W=G.lineN&&R=K.viewTo)return;var $=K.view[zi(m,R)];if($.node==null)return;var ye=$.changes||($.changes=[]);re(ye,W)==-1&&ye.push(W)}function $i(m){m.display.viewFrom=m.display.viewTo=m.doc.first,m.display.view=[],m.display.viewOffset=0}function Ro(m,R,W,K){var G=zi(m,R),$,ye=m.display.view;if(!Gr||W==m.doc.first+m.doc.size)return{index:G,lineN:W};for(var Ae=m.display.viewFrom,Ie=0;Ie0){if(G==ye.length-1)return null;$=Ae+ye[G].size-R,G++}else $=Ae-R;R+=$,W+=$}for(;Wa(m.doc,W)!=W;){if(G==(K<0?0:ye.length-1))return null;W+=K*ye[G-(K<0?1:0)].size,G+=K}return{index:G,lineN:W}}function Qo(m,R,W){var K=m.display,G=K.view;G.length==0||R>=K.viewTo||W<=K.viewFrom?(K.view=Oi(m,R,W),K.viewFrom=R):(K.viewFrom>R?K.view=Oi(m,R,K.viewFrom).concat(K.view):K.viewFromW&&(K.view=K.view.slice(0,zi(m,W)))),K.viewTo=W}function Jo(m){for(var R=m.display.view,W=0,K=0;K=m.display.viewTo||Ae.to().line0?R.blinker=setInterval(function(){m.hasFocus()||ss(m),R.cursorDiv.style.visibility=(W=!W)?"":"hidden"},m.options.cursorBlinkRate):m.options.cursorBlinkRate<0&&(R.cursorDiv.style.visibility="hidden")}function Ms(m){m.state.focused||(m.display.input.focus(),qo(m))}function rl(m){m.state.delayingBlurEvent=!0,setTimeout(function(){m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1,ss(m))},100)}function qo(m,R){if(m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1),m.options.readOnly=="nocursor")return;m.state.focused||(Ve(m,"focus",m,R),m.state.focused=!0,X(m.display.wrapper,"CodeMirror-focused"),!m.curOp&&m.display.selForContextMenu!=m.doc.sel&&(m.display.input.reset(),e&&setTimeout(function(){return m.display.input.reset(!0)},20)),m.display.input.receivedFocus()),Ra(m)}function ss(m,R){if(m.state.delayingBlurEvent)return;m.state.focused&&(Ve(m,"blur",m,R),m.state.focused=!1,w(m.display.wrapper,"CodeMirror-focused")),clearInterval(m.display.blinker),setTimeout(function(){m.state.focused||(m.display.shift=!1)},150)}function Ps(m){for(var R=m.display,W=R.lineDiv.offsetTop,K=0;K.005||dt<-.005)&&(In(G.line,ye),El(G.line),G.rest))for(var bt=0;btm.display.sizerWidth){var Wt=Math.ceil(Ae/Aa(m.display));Wt>m.display.maxLineLength&&(m.display.maxLineLength=Wt,m.display.maxLine=G.line,m.display.maxLineChanged=!0)}}}function El(m){if(m.widgets)for(var R=0;R=ye&&($=Cn(R,Xa($t(R,Ie))-m.wrapper.clientHeight),ye=Ie)}return{from:$,to:Math.max(ye,$+1)}}function xl(m,R){if(Je(m,"scrollCursorIntoView"))return;var W=m.display,K=W.sizer.getBoundingClientRect(),G=null;if(R.top+K.top<0?G=!0:R.bottom+K.top>(window.innerHeight||document.documentElement.clientHeight)&&(G=!1),G!=null&&!t){var $=D("div","\u200B",null,`position: absolute; + top: `+(R.top-W.viewOffset-nl(m.display))+`px; height: `+(R.bottom-R.top+Rt(m)+W.barHeight)+`px; - left: `+R.left+"px; width: "+Math.max(2,R.right-R.left)+"px;");m.display.lineSpace.appendChild($),$.scrollIntoView(G),m.display.lineSpace.removeChild($)}}function Nl(m,R,W,K){K==null&&(K=0);var G;!m.options.lineWrapping&&R==W&&(R=R.ch?Vt(R.line,R.sticky=="before"?R.ch-1:R.ch,"after"):R,W=R.sticky=="before"?Vt(R.line,R.ch+1,"before"):R);for(var $=0;$<5;$++){var ye=!1,Ae=Zr(m,R),Ie=!W||W==R?Ae:Zr(m,W);G={left:Math.min(Ae.left,Ie.left),top:Math.min(Ae.top,Ie.top)-K,right:Math.max(Ae.left,Ie.left),bottom:Math.max(Ae.bottom,Ie.bottom)+K};var Ke=rl(m,G),dt=m.doc.scrollTop,yt=m.doc.scrollLeft;if(Ke.scrollTop!=null&&(os(m,Ke.scrollTop),Math.abs(m.doc.scrollTop-dt)>1&&(ye=!0)),Ke.scrollLeft!=null&&(Oo(m,Ke.scrollLeft),Math.abs(m.doc.scrollLeft-yt)>1&&(ye=!0)),!ye)break}return G}function xl(m,R){var W=rl(m,R);W.scrollTop!=null&&os(m,W.scrollTop),W.scrollLeft!=null&&Oo(m,W.scrollLeft)}function rl(m,R){var W=m.display,K=ha(m.display);R.top<0&&(R.top=0);var G=m.curOp&&m.curOp.scrollTop!=null?m.curOp.scrollTop:W.scroller.scrollTop,$=Ue(m),ye={};R.bottom-R.top>$&&(R.bottom=R.top+$);var Ae=m.doc.height+ot(W),Ie=R.topAe-K;if(R.topG+$){var dt=Math.min(R.top,(Ke?Ae:R.bottom)-$);dt!=G&&(ye.scrollTop=dt)}var yt=m.options.fixedGutter?0:W.gutters.offsetWidth,Wt=m.curOp&&m.curOp.scrollLeft!=null?m.curOp.scrollLeft:W.scroller.scrollLeft-yt,Nt=ut(m)-W.gutters.offsetWidth,en=R.right-R.left>Nt;return en&&(R.right=R.left+Nt),R.left<10?ye.scrollLeft=0:R.leftNt+Wt-3&&(ye.scrollLeft=R.right+(en?0:10)-Nt),ye}function il(m,R){if(R==null)return;Cs(m),m.curOp.scrollTop=(m.curOp.scrollTop==null?m.doc.scrollTop:m.curOp.scrollTop)+R}function vs(m){Cs(m);var R=m.getCursor();m.curOp.scrollToPos={from:R,to:R,margin:m.options.cursorScrollMargin}}function as(m,R,W){(R!=null||W!=null)&&Cs(m),R!=null&&(m.curOp.scrollLeft=R),W!=null&&(m.curOp.scrollTop=W)}function Ul(m,R){Cs(m),m.curOp.scrollToPos=R}function Cs(m){var R=m.curOp.scrollToPos;if(R){m.curOp.scrollToPos=null;var W=hr(m,R.from),K=hr(m,R.to);Ts(m,W,K,R.margin)}}function Ts(m,R,W,K){var G=rl(m,{left:Math.min(R.left,W.left),top:Math.min(R.top,W.top)-K,right:Math.max(R.right,W.right),bottom:Math.max(R.bottom,W.bottom)+K});as(m,G.scrollLeft,G.scrollTop)}function os(m,R){if(Math.abs(m.doc.scrollTop-R)<2)return;T||Fs(m,{top:R}),_s(m,R,!0),T&&Fs(m),As(m,100)}function _s(m,R,W){if(R=Math.max(0,Math.min(m.display.scroller.scrollHeight-m.display.scroller.clientHeight,R)),m.display.scroller.scrollTop==R&&!W)return;m.doc.scrollTop=R,m.display.scrollbars.setScrollTop(R),m.display.scroller.scrollTop!=R&&(m.display.scroller.scrollTop=R)}function Oo(m,R,W,K){if(R=Math.max(0,Math.min(R,m.display.scroller.scrollWidth-m.display.scroller.clientWidth)),(W?R==m.doc.scrollLeft:Math.abs(m.doc.scrollLeft-R)<2)&&!K)return;m.doc.scrollLeft=R,qe(m),m.display.scroller.scrollLeft!=R&&(m.display.scroller.scrollLeft=R),m.display.scrollbars.setScrollLeft(R)}function ss(m){var R=m.display,W=R.gutters.offsetWidth,K=Math.round(m.doc.height+ot(m.display));return{clientHeight:R.scroller.clientHeight,viewHeight:R.wrapper.clientHeight,scrollWidth:R.scroller.scrollWidth,clientWidth:R.scroller.clientWidth,viewWidth:R.wrapper.clientWidth,barLeft:m.options.fixedGutter?W:0,docHeight:K,scrollHeight:K+Rt(m)+R.barHeight,nativeBarWidth:R.nativeBarWidth,gutterWidth:W}}var Zo=function(m,R,W){this.cm=W;var K=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),G=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");K.tabIndex=G.tabIndex=-1,m(K),m(G),Me(K,"scroll",function(){K.clientHeight&&R(K.scrollTop,"vertical")}),Me(G,"scroll",function(){G.clientWidth&&R(G.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Zo.prototype.update=function(m){var R=m.scrollWidth>m.clientWidth+1,W=m.scrollHeight>m.clientHeight+1,K=m.nativeBarWidth;if(W){this.vert.style.display="block",this.vert.style.bottom=R?K+"px":"0";var G=m.viewHeight-(R?K:0);this.vert.firstChild.style.height=Math.max(0,m.scrollHeight-m.clientHeight+G)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(R){this.horiz.style.display="block",this.horiz.style.right=W?K+"px":"0",this.horiz.style.left=m.barLeft+"px";var $=m.viewWidth-m.barLeft-(W?K:0);this.horiz.firstChild.style.width=Math.max(0,m.scrollWidth-m.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&m.clientHeight>0&&(K==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:W?K:0,bottom:R?K:0}},Zo.prototype.setScrollLeft=function(m){this.horiz.scrollLeft!=m&&(this.horiz.scrollLeft=m),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Zo.prototype.setScrollTop=function(m){this.vert.scrollTop!=m&&(this.vert.scrollTop=m),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Zo.prototype.zeroWidthHack=function(){var m=f&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=m,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Z,this.disableVert=new Z},Zo.prototype.enableZeroWidthBar=function(m,R,W){m.style.pointerEvents="auto";function K(){var G=m.getBoundingClientRect(),$=W=="vert"?document.elementFromPoint(G.right-1,(G.top+G.bottom)/2):document.elementFromPoint((G.right+G.left)/2,G.bottom-1);$!=m?m.style.pointerEvents="none":R.set(1e3,K)}R.set(1e3,K)},Zo.prototype.clear=function(){var m=this.horiz.parentNode;m.removeChild(this.horiz),m.removeChild(this.vert)};var ls=function(){};ls.prototype.update=function(){return{bottom:0,right:0}},ls.prototype.setScrollLeft=function(){},ls.prototype.setScrollTop=function(){},ls.prototype.clear=function(){};function ys(m,R){R||(R=ss(m));var W=m.display.barWidth,K=m.display.barHeight;Ps(m,R);for(var G=0;G<4&&W!=m.display.barWidth||K!=m.display.barHeight;G++)W!=m.display.barWidth&&m.options.lineWrapping&&Ls(m),Ps(m,ss(m)),W=m.display.barWidth,K=m.display.barHeight}function Ps(m,R){var W=m.display,K=W.scrollbars.update(R);W.sizer.style.paddingRight=(W.barWidth=K.right)+"px",W.sizer.style.paddingBottom=(W.barHeight=K.bottom)+"px",W.heightForcer.style.borderBottom=K.bottom+"px solid transparent",K.right&&K.bottom?(W.scrollbarFiller.style.display="block",W.scrollbarFiller.style.height=K.bottom+"px",W.scrollbarFiller.style.width=K.right+"px"):W.scrollbarFiller.style.display="",K.bottom&&m.options.coverGutterNextToScrollbar&&m.options.fixedGutter?(W.gutterFiller.style.display="block",W.gutterFiller.style.height=K.bottom+"px",W.gutterFiller.style.width=R.gutterWidth+"px"):W.gutterFiller.style.display=""}var wl={native:Zo,null:ls};function Ns(m){m.display.scrollbars&&(m.display.scrollbars.clear(),m.display.scrollbars.addClass&&w(m.display.wrapper,m.display.scrollbars.addClass)),m.display.scrollbars=new wl[m.options.scrollbarStyle](function(R){m.display.wrapper.insertBefore(R,m.display.scrollbarFiller),Me(R,"mousedown",function(){m.state.focused&&setTimeout(function(){return m.display.input.focus()},0)}),R.setAttribute("cm-not-content","true")},function(R,W){W=="horizontal"?Oo(m,R):os(m,R)},m),m.display.scrollbars.addClass&&X(m.display.wrapper,m.display.scrollbars.addClass)}var al=0;function qo(m){m.curOp={cm:m,viewChanged:!1,startHeight:m.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++al},Ma(m.curOp)}function us(m){var R=m.curOp;R&&hi(R,function(W){for(var K=0;K=W.viewTo)||W.maxLineChanged&&R.options.lineWrapping,m.update=m.mustUpdate&&new Ro(R,m.mustUpdate&&{top:m.scrollTop,ensure:m.scrollToPos},m.forceUpdate)}function ol(m){m.updatedDisplay=m.mustUpdate&&cs(m.cm,m.update)}function sl(m){var R=m.cm,W=R.display;m.updatedDisplay&&Ls(R),m.barMeasure=ss(R),W.maxLineChanged&&!R.options.lineWrapping&&(m.adjustWidthTo=ft(R,W.maxLine,W.maxLine.text.length).left+3,R.display.sizerWidth=m.adjustWidthTo,m.barMeasure.scrollWidth=Math.max(W.scroller.clientWidth,W.sizer.offsetLeft+m.adjustWidthTo+Rt(R)+R.display.barWidth),m.maxScrollLeft=Math.max(0,W.sizer.offsetLeft+m.adjustWidthTo-ut(R))),(m.updatedDisplay||m.selectionChanged)&&(m.preparedSelection=W.input.prepareSelection())}function ll(m){var R=m.cm;m.adjustWidthTo!=null&&(R.display.sizer.style.minWidth=m.adjustWidthTo+"px",m.maxScrollLeft=m.display.viewTo)return;var W=+new Date+m.options.workTime,K=Yt(m,R.highlightFrontier),G=[];R.iter(K.line,Math.min(R.first+R.size,m.display.viewTo+500),function($){if(K.line>=m.display.viewFrom){var ye=$.styles,Ae=$.text.length>m.options.maxHighlightLength?kt(R.mode,K.state):null,Ie=nt(m,$,K,!0);Ae&&(K.state=Ae),$.styles=Ie.styles;var Ke=$.styleClasses,dt=Ie.classes;dt?$.styleClasses=dt:Ke&&($.styleClasses=null);for(var yt=!ye||ye.length!=$.styles.length||Ke!=dt&&(!Ke||!dt||Ke.bgClass!=dt.bgClass||Ke.textClass!=dt.textClass),Wt=0;!yt&&WtW)return As(m,m.options.workDelay),!0}),R.highlightFrontier=K.line,R.modeFrontier=Math.max(R.modeFrontier,K.line),G.length&&lo(m,function(){for(var $=0;$=W.viewFrom&&R.visible.to<=W.viewTo&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo)&&W.renderedView==W.view&&Yo(m)==0)return!1;rt(m)&&(ta(m),R.dims=aa(m));var G=K.first+K.size,$=Math.max(R.visible.from-m.options.viewportMargin,K.first),ye=Math.min(G,R.visible.to+m.options.viewportMargin);W.viewFrom<$&&$-W.viewFrom<20&&($=Math.max(K.first,W.viewFrom)),W.viewTo>ye&&W.viewTo-ye<20&&(ye=Math.min(G,W.viewTo)),Gr&&($=Ka(m.doc,$),ye=La(m.doc,ye));var Ae=$!=W.viewFrom||ye!=W.viewTo||W.lastWrapHeight!=R.wrapperHeight||W.lastWrapWidth!=R.wrapperWidth;Vo(m,$,ye),W.viewOffset=Ha($t(m.doc,W.viewFrom)),m.display.mover.style.top=W.viewOffset+"px";var Ie=Yo(m);if(!Ae&&Ie==0&&!R.force&&W.renderedView==W.view&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo))return!1;var Ke=Cl(m);return Ie>4&&(W.lineDiv.style.display="none"),Tl(m,W.updateLineNumbers,R.dims),Ie>4&&(W.lineDiv.style.display=""),W.renderedView=W.view,Hl(Ke),S(W.cursorDiv),S(W.selectionDiv),W.gutters.style.height=W.sizer.style.minHeight=0,Ae&&(W.lastWrapHeight=R.wrapperHeight,W.lastWrapWidth=R.wrapperWidth,As(m,400)),W.updateLineNumbers=null,!0}function Us(m,R){for(var W=R.viewport,K=!0;;K=!1){if(!K||!m.options.lineWrapping||R.oldDisplayWidth==ut(m)){if(W&&W.top!=null&&(W={top:Math.min(m.doc.height+ot(m.display)-Ue(m),W.top)}),R.visible=Ms(m.display,m.doc,W),R.visible.from>=m.display.viewFrom&&R.visible.to<=m.display.viewTo)break}else K&&(R.visible=Ms(m.display,m.doc,W));if(!cs(m,R))break;Ls(m);var G=ss(m);ki(m),ys(m,G),we(m,G),R.force=!1}R.signal(m,"update",m),(m.display.viewFrom!=m.display.reportedViewFrom||m.display.viewTo!=m.display.reportedViewTo)&&(R.signal(m,"viewportChange",m,m.display.viewFrom,m.display.viewTo),m.display.reportedViewFrom=m.display.viewFrom,m.display.reportedViewTo=m.display.viewTo)}function Fs(m,R){var W=new Ro(m,R);if(cs(m,W)){Ls(m),Us(m,W);var K=ss(m);ki(m),ys(m,K),we(m,K),W.finish()}}function Tl(m,R,W){var K=m.display,G=m.options.lineNumbers,$=K.lineDiv,ye=$.firstChild;function Ae(en){var ln=en.nextSibling;return e&&f&&m.display.currentWheelTarget==en?en.style.display="none":en.parentNode.removeChild(en),ln}for(var Ie=K.view,Ke=K.viewFrom,dt=0;dt-1&&(Nt=!1),_n(m,yt,Ke,W)),Nt&&(S(yt.lineNumber),yt.lineNumber.appendChild(document.createTextNode(Qn(m.options,Ke)))),ye=yt.node.nextSibling}Ke+=yt.size}for(;ye;)ye=Ae(ye)}function js(m){var R=m.gutters.offsetWidth;m.sizer.style.marginLeft=R+"px"}function we(m,R){m.display.sizer.style.minHeight=R.docHeight+"px",m.display.heightForcer.style.top=R.docHeight+"px",m.display.gutters.style.height=R.docHeight+m.display.barHeight+Rt(m)+"px"}function qe(m){var R=m.display,W=R.view;if(!R.alignWidgets&&(!R.gutters.firstChild||!m.options.fixedGutter))return;for(var K=$a(R)-R.scroller.scrollLeft+m.doc.scrollLeft,G=R.gutters.offsetWidth,$=K+"px",ye=0;yeye.clientWidth,Ie=ye.scrollHeight>ye.clientHeight;if(!(K&&Ae||G&&Ie))return;if(G&&f&&e){e:for(var Ke=R.target,dt=$.view;Ke!=ye;Ke=Ke.parentNode)for(var yt=0;yt=0&&wn(m,K.to())<=0)return W}return-1};var It=function(m,R){this.anchor=m,this.head=R};It.prototype.from=function(){return qn(this.anchor,this.head)},It.prototype.to=function(){return Tr(this.anchor,this.head)},It.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zt(m,R,W){var K=m&&m.options.selectionsMayTouch,G=R[W];R.sort(function(Wt,Nt){return wn(Wt.from(),Nt.from())}),W=re(R,G);for(var $=1;$0:Ie>=0){var Ke=qn(Ae.from(),ye.from()),dt=Tr(Ae.to(),ye.to()),yt=Ae.empty()?ye.from()==ye.head:Ae.from()==Ae.head;$<=W&&--W,R.splice(--$,2,new It(yt?dt:Ke,yt?Ke:dt))}}return new Ft(R,W)}function qt(m,R){return new Ft([new It(m,R||m)],0)}function un(m){return m.text?Vt(m.from.line+m.text.length-1,se(m.text).length+(m.text.length==1?m.from.ch:0)):m.to}function gn(m,R){if(wn(m,R.from)<0)return m;if(wn(m,R.to)<=0)return un(R);var W=m.line+R.text.length-(R.to.line-R.from.line)-1,K=m.ch;return m.line==R.to.line&&(K+=un(R).ch-R.to.ch),Vt(W,K)}function Cn(m,R){for(var W=[],K=0;K1&&m.remove(Ae.line+1,en-1),m.insert(Ae.line+1,Pn)}tn(m,"change",m,R)}function an(m,R,W){function K(G,$,ye){if(G.linked)for(var Ae=0;Ae1&&!m.done[m.done.length-2].ranges)return m.done.pop(),se(m.done)}function bn(m,R,W,K){var G=m.history;G.undone.length=0;var $=+new Date,ye,Ae;if((G.lastOp==K||G.lastOrigin==R.origin&&R.origin&&(R.origin.charAt(0)=="+"&&G.lastModTime>$-(m.cm?m.cm.options.historyEventDelay:500)||R.origin.charAt(0)=="*"))&&(ye=cn(G,G.lastOp==K)))Ae=se(ye.changes),wn(R.from,R.to)==0&&wn(R.from,Ae.to)==0?Ae.to=un(R):ye.changes.push(Hn(m,R));else{var Ie=se(G.done);for((!Ie||!Ie.ranges)&&Br(m.sel,G.done),ye={changes:[Hn(m,R)],generation:G.generation},G.done.push(ye);G.done.length>G.undoDepth;)G.done.shift(),G.done[0].ranges||G.done.shift()}G.done.push(W),G.generation=++G.maxGeneration,G.lastModTime=G.lastSelTime=$,G.lastOp=G.lastSelOp=K,G.lastOrigin=G.lastSelOrigin=R.origin,Ae||Ve(m,"historyAdded")}function Mn(m,R,W,K){var G=R.charAt(0);return G=="*"||G=="+"&&W.ranges.length==K.ranges.length&&W.somethingSelected()==K.somethingSelected()&&new Date-m.history.lastSelTime<=(m.cm?m.cm.options.historyEventDelay:500)}function sr(m,R,W,K){var G=m.history,$=K&&K.origin;W==G.lastSelOp||$&&G.lastSelOrigin==$&&(G.lastModTime==G.lastSelTime&&G.lastOrigin==$||Mn(m,$,se(G.done),R))?G.done[G.done.length-1]=R:Br(R,G.done),G.lastSelTime=+new Date,G.lastSelOrigin=$,G.lastSelOp=W,K&&K.clearRedo!==!1&&dn(G.undone)}function Br(m,R){var W=se(R);W&&W.ranges&&W.equals(m)||R.push(m)}function Tn(m,R,W,K){var G=R["spans_"+m.id],$=0;m.iter(Math.max(m.first,W),Math.min(m.first+m.size,K),function(ye){ye.markedSpans&&((G||(G=R["spans_"+m.id]={}))[$]=ye.markedSpans),++$})}function ri(m){if(!m)return null;for(var R,W=0;W-1&&(se(Ae)[yt]=Ke[yt],delete Ke[yt]))}}return K}function li(m,R,W,K){if(K){var G=m.anchor;if(W){var $=wn(R,G)<0;$!=wn(W,G)<0?(G=R,R=W):$!=wn(R,W)<0&&(R=W)}return new It(G,R)}else return new It(W||R,R)}function Vn(m,R,W,K,G){G==null&&(G=m.cm&&(m.cm.display.shift||m.extend)),mi(m,new Ft([li(m.sel.primary(),R,W,G)],0),K)}function kr(m,R,W){for(var K=[],G=m.cm&&(m.cm.display.shift||m.extend),$=0;$=R.ch:Ae.to>R.ch))){if(G&&(Ve(Ie,"beforeCursorEnter"),Ie.explicitlyCleared))if($.markedSpans){--ye;continue}else break;if(!Ie.atomic)continue;if(W){var yt=Ie.find(K<0?1:-1),Wt=void 0;if((K<0?dt:Ke)&&(yt=eo(m,yt,-K,yt&&yt.line==R.line?$:null)),yt&&yt.line==R.line&&(Wt=wn(yt,W))&&(K<0?Wt<0:Wt>0))return co(m,yt,R,K,G)}var Nt=Ie.find(K<0?-1:1);return(K<0?Ke:dt)&&(Nt=eo(m,Nt,K,Nt.line==R.line?$:null)),Nt?co(m,Nt,R,K,G):null}}return R}function ya(m,R,W,K,G){var $=K||1,ye=co(m,R,W,$,G)||!G&&co(m,R,W,$,!0)||co(m,R,W,-$,G)||!G&&co(m,R,W,-$,!0);return ye||(m.cantEdit=!0,Vt(m.first,0))}function eo(m,R,W,K){return W<0&&R.ch==0?R.line>m.first?V(m,Vt(R.line-1)):null:W>0&&R.ch==(K||$t(m,R.line)).text.length?R.line=0;--G)Ga(m,{from:K[G].from,to:K[G].to,text:G?[""]:R.text,origin:R.origin});else Ga(m,R)}function Ga(m,R){if(R.text.length==1&&R.text[0]==""&&wn(R.from,R.to)==0)return;var W=Cn(m,R);bn(m,R,W,m.cm?m.cm.curOp.id:NaN),Ui(m,R,W,ka(m,R));var K=[];an(m,function(G,$){!$&&re(K,G.history)==-1&&(fa(G.history,R),K.push(G.history)),Ui(G,R,null,ka(G,R))})}function Kr(m,R,W){var K=m.cm&&m.cm.state.suppressEdits;if(K&&!W)return;for(var G=m.history,$,ye=m.sel,Ae=R=="undo"?G.done:G.undone,Ie=R=="undo"?G.undone:G.done,Ke=0;Ke=0;--Nt){var en=Wt(Nt);if(en)return en.v}}function br(m,R){if(R==0)return;if(m.first+=R,m.sel=new Ft(be(m.sel.ranges,function(G){return new It(Vt(G.anchor.line+R,G.anchor.ch),Vt(G.head.line+R,G.head.ch))}),m.sel.primIndex),m.cm){ji(m.cm,m.first,m.first-R,R);for(var W=m.cm.display,K=W.viewFrom;Km.lastLine())return;if(R.from.line$&&(R={from:R.from,to:Vt($,$t(m,$).text.length),text:[R.text[0]],origin:R.origin}),R.removed=Ln(m,R.from,R.to),W||(W=Cn(m,R)),m.cm?Po(m.cm,R,K):gt(m,R,K),za(m,W,ke),m.cantEdit&&ya(m,Vt(m.firstLine(),0))&&(m.cantEdit=!1)}function Po(m,R,W){var K=m.doc,G=m.display,$=R.from,ye=R.to,Ae=!1,Ie=$.line;m.options.lineWrapping||(Ie=sn($i($t(K,$.line))),K.iter(Ie,ye.line+1,function(Nt){if(Nt==G.maxLine)return Ae=!0,!0})),K.sel.contains(R.from,R.to)>-1&&Ye(m),gt(K,R,W,To(m)),m.options.lineWrapping||(K.iter(Ie,$.line+R.text.length,function(Nt){var en=go(Nt);en>G.maxLineLength&&(G.maxLine=Nt,G.maxLineLength=en,G.maxLineChanged=!0,Ae=!1)}),Ae&&(m.curOp.updateMaxLine=!0)),xr(K,$.line),As(m,400);var Ke=R.text.length-(ye.line-$.line)-1;R.full?ji(m):$.line==ye.line&&R.text.length==1&&!Un(m.doc,R)?oa(m,$.line,"text"):ji(m,$.line,ye.line+1,Ke);var dt=Ne(m,"changes"),yt=Ne(m,"change");if(yt||dt){var Wt={from:$,to:ye,text:R.text,removed:R.removed,origin:R.origin};yt&&tn(m,"change",m,Wt),dt&&(m.curOp.changeObjs||(m.curOp.changeObjs=[])).push(Wt)}m.display.selForContextMenu=null}function Va(m,R,W,K,G){var $;K||(K=W),wn(K,W)<0&&($=[K,W],W=$[0],K=$[1]),typeof R=="string"&&(R=m.splitLines(R)),Pa(m,{from:W,to:K,text:R,origin:G})}function ui(m,R,W,K){W1||!(this.children[0]instanceof Ya))){var Ae=[];this.collapse(Ae),this.children=[new Ya(Ae)],this.children[0].parent=this}},collapse:function(m){for(var R=0;R50){for(var ye=G.lines.length%25+25,Ae=ye;Ae10);m.parent.maybeSpill()},iterN:function(m,R,W){for(var K=0;Km.display.maxLineLength&&(m.display.maxLine=Ke,m.display.maxLineLength=dt,m.display.maxLineChanged=!0)}K!=null&&m&&this.collapsed&&ji(m,K,G+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,m&&la(m.doc)),m&&tn(m,"markerCleared",m,this,K,G),R&&us(m),this.parent&&this.parent.clear()},Pr.prototype.find=function(m,R){m==null&&this.type=="bookmark"&&(m=1);for(var W,K,G=0;G0||ye==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=M("span",[$.replacedWith],"CodeMirror-widget"),K.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),K.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(Mi(m,R.line,R,W,$)||R.line!=W.line&&Mi(m,W.line,R,W,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");da()}$.addToHistory&&bn(m,{from:R,to:W,origin:"markText"},m.sel,NaN);var Ae=R.line,Ie=m.cm,Ke;if(m.iter(Ae,W.line+1,function(yt){Ie&&$.collapsed&&!Ie.options.lineWrapping&&$i(yt)==Ie.display.maxLine&&(Ke=!0),$.collapsed&&Ae!=R.line&&Dn(yt,0),po(yt,new Fi($,Ae==R.line?R.ch:null,Ae==W.line?W.ch:null)),++Ae}),$.collapsed&&m.iter(R.line,W.line+1,function(yt){ti(m,yt)&&Dn(yt,0)}),$.clearOnEnter&&Me($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(ai(),(m.history.done.length||m.history.undone.length)&&m.clearHistory()),$.collapsed&&($.id=++ci,$.atomic=!0),Ie){if(Ke&&(Ie.curOp.updateMaxLine=!0),$.collapsed)ji(Ie,R.line,W.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var dt=R.line;dt<=W.line;dt++)oa(Ie,dt,"text");$.atomic&&la(Ie.doc),tn(Ie,"markerAdded",Ie,$)}return $}var Bi=function(m,R){this.markers=m,this.primary=R;for(var W=0;W=0;Ie--)Pa(this,K[Ie]);Ae?Da(this,Ae):this.cm&&vs(this.cm)}),undo:_a(function(){Kr(this,"undo")}),redo:_a(function(){Kr(this,"redo")}),undoSelection:_a(function(){Kr(this,"undo",!0)}),redoSelection:_a(function(){Kr(this,"redo",!0)}),setExtending:function(m){this.extend=m},getExtending:function(){return this.extend},historySize:function(){for(var m=this.history,R=0,W=0,K=0;K=m.ch)&&R.push(G.marker.parent||G.marker)}return R},findMarks:function(m,R,W){m=V(this,m),R=V(this,R);var K=[],G=m.line;return this.iter(m.line,R.line+1,function($){var ye=$.markedSpans;if(ye)for(var Ae=0;Ae=Ie.to||Ie.from==null&&G!=m.line||Ie.from!=null&&G==R.line&&Ie.from>=R.ch)&&(!W||W(Ie.marker))&&K.push(Ie.marker.parent||Ie.marker)}++G}),K},getAllMarks:function(){var m=[];return this.iter(function(R){var W=R.markedSpans;if(W)for(var K=0;Km)return R=m,!0;m-=$,++W}),V(this,Vt(W,R))},indexFromPos:function(m){m=V(this,m);var R=m.ch;if(m.lineR&&(R=m.from),m.to!=null&&m.to-1){R.state.draggingText(m),setTimeout(function(){return R.display.input.focus()},20);return}try{var dt=m.dataTransfer.getData("Text");if(dt){var yt;if(R.state.draggingText&&!R.state.draggingText.copy&&(yt=R.listSelections()),za(R.doc,qt(W,W)),yt)for(var Wt=0;Wt=0;Ae--)Va(m.doc,"",K[Ae].from,K[Ae].to,"+delete");vs(m)})}function Ws(m,R,W){var K=Ee(m.text,R+W,W);return K<0||K>m.text.length?null:K}function hl(m,R,W){var K=Ws(m,R.ch,W);return K==null?null:new Vt(R.line,K,W<0?"after":"before")}function fl(m,R,W,K,G){if(m){R.doc.direction=="rtl"&&(G=-G);var $=tt(W,R.doc.direction);if($){var ye=G<0?se($):$[0],Ae=G<0==(ye.level==1),Ie=Ae?"after":"before",Ke;if(ye.level>0||R.doc.direction=="rtl"){var dt=Tt(R,W);Ke=G<0?W.text.length-1:0;var yt=Pt(R,dt,Ke).top;Ke=Le(function(Wt){return Pt(R,dt,Wt).top==yt},G<0==(ye.level==1)?ye.from:ye.to-1,Ke),Ie=="before"&&(Ke=Ws(W,Ke,1))}else Ke=G<0?ye.to:ye.from;return new Vt(K,Ke,Ie)}}return new Vt(K,G<0?W.text.length:0,G<0?"before":"after")}function Ur(m,R,W,K){var G=tt(R,m.doc.direction);if(!G)return hl(R,W,K);W.ch>=R.text.length?(W.ch=R.text.length,W.sticky="before"):W.ch<=0&&(W.ch=0,W.sticky="after");var $=_e(G,W.ch,W.sticky),ye=G[$];if(m.doc.direction=="ltr"&&ye.level%2==0&&(K>0?ye.to>W.ch:ye.from=ye.from&&Wt>=dt.begin)){var Nt=yt?"before":"after";return new Vt(W.line,Wt,Nt)}}var en=function(Pn,Yn,Nn){for(var er=function(ra,ao){return ao?new Vt(W.line,Ae(ra,1),"before"):new Vt(W.line,ra,"after")};Pn>=0&&Pn0==(Cr.level!=1),ii=mr?Nn.begin:Ae(Nn.end,-1);if(Cr.from<=ii&&ii0?dt.end:Ae(dt.begin,-1);return xn!=null&&!(K>0&&xn==R.text.length)&&(ln=en(K>0?0:G.length-1,K,Ke(xn)),ln)?ln:null}var _i={selectAll:ho,singleSelection:function(m){return m.setSelection(m.getCursor("anchor"),m.getCursor("head"),ke)},killLine:function(m){return rs(m,function(R){if(R.empty()){var W=$t(m.doc,R.head.line).text.length;return R.head.ch==W&&R.head.line0)G=new Vt(G.line,G.ch+1),m.replaceRange($.charAt(G.ch-1)+$.charAt(G.ch-2),Vt(G.line,G.ch-2),G,"+transpose");else if(G.line>m.doc.first){var ye=$t(m.doc,G.line-1).text;ye&&(G=new Vt(G.line,1),m.replaceRange($.charAt(0)+m.doc.lineSeparator()+ye.charAt(ye.length-1),Vt(G.line-1,ye.length-1),G,"+transpose"))}}W.push(new It(G,G))}m.setSelections(W)})},newlineAndIndent:function(m){return lo(m,function(){for(var R=m.listSelections(),W=R.length-1;W>=0;W--)m.replaceRange(m.doc.lineSeparator(),R[W].anchor,R[W].head,"+input");R=m.listSelections();for(var K=0;Km&&wn(R,this.pos)==0&&W==this.button};var Ys,ms;function Dl(m,R){var W=+new Date;return ms&&ms.compare(W,m,R)?(Ys=ms=null,"triple"):Ys&&Ys.compare(W,m,R)?(ms=new Rl(W,m,R),Ys=null,"double"):(Ys=new Rl(W,m,R),ms=null,"single")}function jn(m){var R=this,W=R.display;if(Je(R,m)||W.activeTouch&&W.input.supportsTouch())return;if(W.input.ensurePolled(),W.shift=m.shiftKey,Wo(W,m)){e||(W.scroller.draggable=!1,setTimeout(function(){return W.scroller.draggable=!0},100));return}if(pr(R,m))return;var K=Aa(R,m),G=ne(m),$=K?Dl(K,G):"single";if(window.focus(),G==1&&R.state.selectingText&&R.state.selectingText(m),K&&Bn(R,G,K,$,m))return;G==1?K?rr(R,K,$,m):Qe(m)==W.scroller&&ve(m):G==2?(K&&Vn(R.doc,K),setTimeout(function(){return W.input.focus()},20)):G==3&&(O?R.display.input.onContextMenu(m):nl(R))}function Bn(m,R,W,K,G){var $="Click";return K=="double"?$="Double"+$:K=="triple"&&($="Triple"+$),$=(R==1?"Left":R==2?"Middle":"Right")+$,fs(m,dl($,G),G,function(ye){if(typeof ye=="string"&&(ye=_i[ye]),!ye)return!1;var Ae=!1;try{m.isReadOnly()&&(m.state.suppressEdits=!0),Ae=ye(m,W)!=Se}finally{m.state.suppressEdits=!1}return Ae})}function Wn(m,R,W){var K=m.getOption("configureMouse"),G=K?K(m,R,W):{};if(G.unit==null){var $=h?W.shiftKey&&W.metaKey:W.altKey;G.unit=$?"rectangle":R=="single"?"char":R=="double"?"word":"line"}return(G.extend==null||m.doc.extend)&&(G.extend=m.doc.extend||W.shiftKey),G.addNew==null&&(G.addNew=f?W.metaKey:W.ctrlKey),G.moveOnDrag==null&&(G.moveOnDrag=!(f?W.altKey:W.ctrlKey)),G}function rr(m,R,W,K){_?setTimeout(U(ks,m),0):m.curOp.focus=z();var G=Wn(m,W,K),$=m.doc.sel,ye;m.options.dragDrop&&Ze&&!m.isReadOnly()&&W=="single"&&(ye=$.contains(R))>-1&&(wn((ye=$.ranges[ye]).from(),R)<0||R.xRel>0)&&(wn(ye.to(),R)>0||R.xRel<0)?Rn(m,K,R,G):$r(m,K,R,G)}function Rn(m,R,W,K){var G=m.display,$=!1,ye=sa(m,function(Ke){e&&(G.scroller.draggable=!1),m.state.draggingText=!1,Oe(G.wrapper.ownerDocument,"mouseup",ye),Oe(G.wrapper.ownerDocument,"mousemove",Ae),Oe(G.scroller,"dragstart",Ie),Oe(G.scroller,"drop",ye),$||(ve(Ke),K.addNew||Vn(m.doc,W,null,null,K.extend),e&&!r||_&&p==9?setTimeout(function(){G.wrapper.ownerDocument.body.focus({preventScroll:!0}),G.input.focus()},20):G.input.focus())}),Ae=function(Ke){$=$||Math.abs(R.clientX-Ke.clientX)+Math.abs(R.clientY-Ke.clientY)>=10},Ie=function(){return $=!0};e&&(G.scroller.draggable=!0),m.state.draggingText=ye,ye.copy=!K.moveOnDrag,G.scroller.dragDrop&&G.scroller.dragDrop(),Me(G.wrapper.ownerDocument,"mouseup",ye),Me(G.wrapper.ownerDocument,"mousemove",Ae),Me(G.scroller,"dragstart",Ie),Me(G.scroller,"drop",ye),nl(m),setTimeout(function(){return G.input.focus()},20)}function fr(m,R,W){if(W=="char")return new It(R,R);if(W=="word")return m.findWordAt(R);if(W=="line")return new It(Vt(R.line,0),V(m.doc,Vt(R.line+1,0)));var K=W(m,R);return new It(K.from,K.to)}function $r(m,R,W,K){var G=m.display,$=m.doc;ve(R);var ye,Ae,Ie=$.sel,Ke=Ie.ranges;if(K.addNew&&!K.extend?(Ae=$.sel.contains(W),Ae>-1?ye=Ke[Ae]:ye=new It(W,W)):(ye=$.sel.primary(),Ae=$.sel.primIndex),K.unit=="rectangle")K.addNew||(ye=new It(W,W)),W=Aa(m,R,!0,!0),Ae=-1;else{var dt=fr(m,W,K.unit);K.extend?ye=li(ye,dt.anchor,dt.head,K.extend):ye=dt}K.addNew?Ae==-1?(Ae=Ke.length,mi($,zt(m,Ke.concat([ye]),Ae),{scroll:!1,origin:"*mouse"})):Ke.length>1&&Ke[Ae].empty()&&K.unit=="char"&&!K.extend?(mi($,zt(m,Ke.slice(0,Ae).concat(Ke.slice(Ae+1)),0),{scroll:!1,origin:"*mouse"}),Ie=$.sel):Li($,Ae,ye,te):(Ae=0,mi($,new Ft([ye],0),te),Ie=$.sel);var yt=W;function Wt(Nn){if(wn(yt,Nn)==0)return;if(yt=Nn,K.unit=="rectangle"){for(var er=[],Cr=m.options.tabSize,mr=B($t($,W.line).text,W.ch,Cr),ii=B($t($,Nn.line).text,Nn.ch,Cr),ra=Math.min(mr,ii),ao=Math.max(mr,ii),ba=Math.min(W.line,Nn.line),jo=Math.min(m.lastLine(),Math.max(W.line,Nn.line));ba<=jo;ba++){var ko=$t($,ba).text,ja=Ce(ko,ra,Cr);ra==ao?er.push(new It(Vt(ba,ja),Vt(ba,ja))):ko.length>ja&&er.push(new It(Vt(ba,ja),Vt(ba,Ce(ko,ao,Cr))))}er.length||er.push(new It(W,W)),mi($,zt(m,Ie.ranges.slice(0,Ae).concat(er),Ae),{origin:"*mouse",scroll:!1}),m.scrollIntoView(Nn)}else{var Lo=ye,fo=fr(m,Nn,K.unit),Za=Lo.anchor,Ba;wn(fo.anchor,Za)>0?(Ba=fo.head,Za=qn(Lo.from(),fo.anchor)):(Ba=fo.anchor,Za=Tr(Lo.to(),fo.head));var Sa=Ie.ranges.slice(0);Sa[Ae]=Ir(m,new It(V($,Za),Ba)),mi($,zt(m,Sa,Ae),te)}}var Nt=G.wrapper.getBoundingClientRect(),en=0;function ln(Nn){var er=++en,Cr=Aa(m,Nn,!0,K.unit=="rectangle");if(!Cr)return;if(wn(Cr,yt)!=0){m.curOp.focus=z(),Wt(Cr);var mr=Ms(G,$);(Cr.line>=mr.to||Cr.lineNt.bottom?20:0;ii&&setTimeout(sa(m,function(){if(en!=er)return;G.scroller.scrollTop+=ii,ln(Nn)}),50)}}function xn(Nn){m.state.selectingText=!1,en=Infinity,Nn&&(ve(Nn),G.input.focus()),Oe(G.wrapper.ownerDocument,"mousemove",Pn),Oe(G.wrapper.ownerDocument,"mouseup",Yn),$.history.lastSelOrigin=null}var Pn=sa(m,function(Nn){Nn.buttons===0||!ne(Nn)?xn(Nn):ln(Nn)}),Yn=sa(m,xn);m.state.selectingText=Yn,Me(G.wrapper.ownerDocument,"mousemove",Pn),Me(G.wrapper.ownerDocument,"mouseup",Yn)}function Ir(m,R){var W=R.anchor,K=R.head,G=$t(m.doc,W.line);if(wn(W,K)==0&&W.sticky==K.sticky)return R;var $=tt(G);if(!$)return R;var ye=_e($,W.ch,W.sticky),Ae=$[ye];if(Ae.from!=W.ch&&Ae.to!=W.ch)return R;var Ie=ye+(Ae.from==W.ch==(Ae.level!=1)?0:1);if(Ie==0||Ie==$.length)return R;var Ke;if(K.line!=W.line)Ke=(K.line-W.line)*(m.doc.direction=="ltr"?1:-1)>0;else{var dt=_e($,K.ch,K.sticky),yt=dt-ye||(K.ch-W.ch)*(Ae.level==1?-1:1);dt==Ie-1||dt==Ie?Ke=yt<0:Ke=yt>0}var Wt=$[Ie+(Ke?-1:0)],Nt=Ke==(Wt.level==1),en=Nt?Wt.from:Wt.to,ln=Nt?"after":"before";return W.ch==en&&W.sticky==ln?R:new It(new Vt(W.line,en,ln),K)}function Hi(m,R,W,K){var G,$;if(R.touches)G=R.touches[0].clientX,$=R.touches[0].clientY;else try{G=R.clientX,$=R.clientY}catch(Wt){return!1}if(G>=Math.floor(m.display.gutters.getBoundingClientRect().right))return!1;K&&ve(R);var ye=m.display,Ae=ye.lineDiv.getBoundingClientRect();if($>Ae.bottom||!Ne(m,W))return de(R);$-=Ae.top-ye.viewOffset;for(var Ie=0;Ie=G){var dt=Sn(m.doc,$),yt=m.display.gutterSpecs[Ie];return Ve(m,W,m,dt,yt.className,R),de(R)}}}function pr(m,R){return Hi(m,R,"gutterClick",!0)}function wi(m,R){if(Wo(m.display,R)||Ja(m,R))return;if(Je(m,R,"contextmenu"))return;O||m.display.input.onContextMenu(R)}function Ja(m,R){return Ne(m,"gutterContextMenu")?Hi(m,R,"gutterContextMenu",!1):!1}function gs(m){m.display.wrapper.className=m.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+m.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wr(m)}var pa={toString:function(){return"CodeMirror.Init"}},Uo={},Qs={};function Il(m){var R=m.optionHandlers;function W(K,G,$,ye){m.defaults[K]=G,$&&(R[K]=ye?function(Ae,Ie,Ke){Ke!=pa&&$(Ae,Ie,Ke)}:$)}m.defineOption=W,m.Init=pa,W("value","",function(K,G){return K.setValue(G)},!0),W("mode",null,function(K,G){K.doc.modeOption=G,vn(K)},!0),W("indentUnit",2,vn,!0),W("indentWithTabs",!1),W("smartIndent",!0),W("tabSize",4,function(K){nn(K),Wr(K),ji(K)},!0),W("lineSeparator",null,function(K,G){if(K.doc.lineSep=G,!G)return;var $=[],ye=K.doc.first;K.doc.iter(function(Ie){for(var Ke=0;;){var dt=Ie.text.indexOf(G,Ke);if(dt==-1)break;Ke=dt+G.length,$.push(Vt(ye,dt))}ye++});for(var Ae=$.length-1;Ae>=0;Ae--)Va(K.doc,G,$[Ae],Vt($[Ae].line,$[Ae].ch+G.length))}),W("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(K,G,$){K.state.specialChars=new RegExp(G.source+(G.test(" ")?"":"| "),"g"),$!=pa&&K.refresh()}),W("specialCharPlaceholder",gi,function(K){return K.refresh()},!0),W("electricChars",!0),W("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),W("spellcheck",!1,function(K,G){return K.getInputField().spellcheck=G},!0),W("autocorrect",!1,function(K,G){return K.getInputField().autocorrect=G},!0),W("autocapitalize",!1,function(K,G){return K.getInputField().autocapitalize=G},!0),W("rtlMoveVisually",!u),W("wholeLineUpdateBefore",!0),W("theme","default",function(K){gs(K),vt(K)},!0),W("keyMap","default",function(K,G,$){var ye=Hs(G),Ae=$!=pa&&Hs($);Ae&&Ae.detach&&Ae.detach(K,ye),ye.attach&&ye.attach(K,Ae||null)}),W("extraKeys",null),W("configureMouse",null),W("lineWrapping",!1,Fa,!0),W("gutters",[],function(K,G){K.display.gutterSpecs=At(G,K.options.lineNumbers),vt(K)},!0),W("fixedGutter",!0,function(K,G){K.display.gutters.style.left=G?$a(K.display)+"px":"0",K.refresh()},!0),W("coverGutterNextToScrollbar",!1,function(K){return ys(K)},!0),W("scrollbarStyle","native",function(K){Ns(K),ys(K),K.display.scrollbars.setScrollTop(K.doc.scrollTop),K.display.scrollbars.setScrollLeft(K.doc.scrollLeft)},!0),W("lineNumbers",!1,function(K,G){K.display.gutterSpecs=At(K.options.gutters,G),vt(K)},!0),W("firstLineNumber",1,vt,!0),W("lineNumberFormatter",function(K){return K},vt,!0),W("showCursorWhenSelecting",!1,ki,!0),W("resetSelectionOnContextMenu",!0),W("lineWiseCopyCut",!0),W("pasteLinesPerSelection",!0),W("selectionsMayTouch",!1),W("readOnly",!1,function(K,G){G=="nocursor"&&(is(K),K.display.input.blur()),K.display.input.readOnlyChanged(G)}),W("screenReaderLabel",null,function(K,G){G=G===""?null:G,K.display.input.screenReaderLabelChanged(G)}),W("disableInput",!1,function(K,G){G||K.display.input.reset()},!0),W("dragDrop",!0,tu),W("allowDropFileTypes",null),W("cursorBlinkRate",530),W("cursorScrollMargin",0),W("cursorHeight",1,ki,!0),W("singleCursorHeightPerLine",!0,ki,!0),W("workTime",100),W("workDelay",100),W("flattenSpans",!0,nn,!0),W("addModeClass",!1,nn,!0),W("pollInterval",100),W("undoDepth",200,function(K,G){return K.doc.history.undoDepth=G}),W("historyEventDelay",1250),W("viewportMargin",10,function(K){return K.refresh()},!0),W("maxHighlightLength",1e4,nn,!0),W("moveInputWithCursor",!0,function(K,G){G||K.display.input.resetPosition()}),W("tabindex",null,function(K,G){return K.display.input.getField().tabIndex=G||""}),W("autofocus",null),W("direction","ltr",function(K,G){return K.doc.setDirection(G)},!0),W("phrases",null)}function tu(m,R,W){var K=W&&W!=pa;if(!R!=!K){var G=m.display.dragFunctions,$=R?Me:Oe;$(m.display.scroller,"dragstart",G.start),$(m.display.scroller,"dragenter",G.enter),$(m.display.scroller,"dragover",G.over),$(m.display.scroller,"dragleave",G.leave),$(m.display.scroller,"drop",G.drop)}}function Fa(m){m.options.lineWrapping?(X(m.display.wrapper,"CodeMirror-wrap"),m.display.sizer.style.minWidth="",m.display.sizerWidth=null):(w(m.display.wrapper,"CodeMirror-wrap"),So(m)),vo(m),ji(m),Wr(m),setTimeout(function(){return ys(m)},100)}function ca(m,R){var W=this;if(!(this instanceof ca))return new ca(m,R);this.options=R=R?L(R):{},L(Uo,R,!1);var K=R.value;typeof K=="string"?K=new Er(K,R.mode,null,R.lineSeparator,R.direction):R.mode&&(K.modeOption=R.mode),this.doc=K;var G=new ca.inputStyles[R.inputStyle](this),$=this.display=new at(m,K,G,R);$.wrapper.CodeMirror=this,gs(this),R.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ns(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Z,keySeq:null,specialChars:null},R.autofocus&&!d&&$.input.focus(),_&&p<11&&setTimeout(function(){return W.display.input.reset(!0)},20),Zl(this),Os(),qo(this),this.curOp.forceUpdate=!0,mn(this,K),R.autofocus&&!d||this.hasFocus()?setTimeout(function(){W.hasFocus()&&!W.state.focused&&Jo(W)},20):is(this);for(var ye in Qs)Qs.hasOwnProperty(ye)&&Qs[ye](this,R[ye],pa);rt(this),R.finishInit&&R.finishInit(this);for(var Ae=0;Ae20*20}Me(R.scroller,"touchstart",function(Ie){if(!Je(m,Ie)&&!$(Ie)&&!pr(m,Ie)){R.input.ensurePolled(),clearTimeout(W);var Ke=+new Date;R.activeTouch={start:Ke,moved:!1,prev:Ke-K.end<=300?K:null},Ie.touches.length==1&&(R.activeTouch.left=Ie.touches[0].pageX,R.activeTouch.top=Ie.touches[0].pageY)}}),Me(R.scroller,"touchmove",function(){R.activeTouch&&(R.activeTouch.moved=!0)}),Me(R.scroller,"touchend",function(Ie){var Ke=R.activeTouch;if(Ke&&!Wo(R,Ie)&&Ke.left!=null&&!Ke.moved&&new Date-Ke.start<300){var dt=m.coordsChar(R.activeTouch,"page"),yt;!Ke.prev||ye(Ke,Ke.prev)?yt=new It(dt,dt):!Ke.prev.prev||ye(Ke,Ke.prev.prev)?yt=m.findWordAt(dt):yt=new It(Vt(dt.line,0),V(m.doc,Vt(dt.line+1,0))),m.setSelection(yt.anchor,yt.head),m.focus(),ve(Ie)}G()}),Me(R.scroller,"touchcancel",G),Me(R.scroller,"scroll",function(){R.scroller.clientHeight&&(os(m,R.scroller.scrollTop),Oo(m,R.scroller.scrollLeft,!0),Ve(m,"scroll",m))}),Me(R.scroller,"mousewheel",function(Ie){return Jt(m,Ie)}),Me(R.scroller,"DOMMouseScroll",function(Ie){return Jt(m,Ie)}),Me(R.wrapper,"scroll",function(){return R.wrapper.scrollTop=R.wrapper.scrollLeft=0}),R.dragFunctions={enter:function(Ie){Je(m,Ie)||je(Ie)},over:function(Ie){Je(m,Ie)||(ds(m,Ie),je(Ie))},start:function(Ie){return Qa(m,Ie)},drop:sa(m,$o),leave:function(Ie){Je(m,Ie)||ro(m)}};var Ae=R.input.getField();Me(Ae,"keyup",function(Ie){return Gs.call(m,Ie)}),Me(Ae,"keydown",sa(m,Xl)),Me(Ae,"keypress",sa(m,Vs)),Me(Ae,"focus",function(Ie){return Jo(m,Ie)}),Me(Ae,"blur",function(Ie){return is(m,Ie)})}var Js=[];ca.defineInitHook=function(m){return Js.push(m)};function Rs(m,R,W,K){var G=m.doc,$;W==null&&(W="add"),W=="smart"&&(G.mode.indent?$=Yt(m,R).state:W="prev");var ye=m.options.tabSize,Ae=$t(G,R),Ie=B(Ae.text,null,ye);Ae.stateAfter&&(Ae.stateAfter=null);var Ke=Ae.text.match(/^\s*/)[0],dt;if(!K&&!/\S/.test(Ae.text))dt=0,W="not";else if(W=="smart"&&(dt=G.mode.indent($,Ae.text.slice(Ke.length),Ae.text),dt==Se||dt>150)){if(!K)return;W="prev"}W=="prev"?R>G.first?dt=B($t(G,R-1).text,null,ye):dt=0:W=="add"?dt=Ie+m.options.indentUnit:W=="subtract"?dt=Ie-m.options.indentUnit:typeof W=="number"&&(dt=Ie+W),dt=Math.max(0,dt);var yt="",Wt=0;if(m.options.indentWithTabs)for(var Nt=Math.floor(dt/ye);Nt;--Nt)Wt+=ye,yt+=" ";if(Wtye,Ie=wt(R),Ke=null;if(Ae&&K.ranges.length>1)if(Fo&&Fo.text.join(` -`)==R){if(K.ranges.length%Fo.text.length==0){Ke=[];for(var dt=0;dt=0;Wt--){var Nt=K.ranges[Wt],en=Nt.from(),ln=Nt.to();Nt.empty()&&(W&&W>0?en=Vt(en.line,en.ch-W):m.state.overwrite&&!Ae?ln=Vt(ln.line,Math.min($t($,ln.line).text.length,ln.ch+se(Ie).length)):Ae&&Fo&&Fo.lineWise&&Fo.text.join(` + left: `+R.left+"px; width: "+Math.max(2,R.right-R.left)+"px;");m.display.lineSpace.appendChild($),$.scrollIntoView(G),m.display.lineSpace.removeChild($)}}function Ul(m,R,W,K){K==null&&(K=0);var G;!m.options.lineWrapping&&R==W&&(R=R.ch?Vt(R.line,R.sticky=="before"?R.ch-1:R.ch,"after"):R,W=R.sticky=="before"?Vt(R.line,R.ch+1,"before"):R);for(var $=0;$<5;$++){var ye=!1,Ae=qr(m,R),Ie=!W||W==R?Ae:qr(m,W);G={left:Math.min(Ae.left,Ie.left),top:Math.min(Ae.top,Ie.top)-K,right:Math.max(Ae.left,Ie.left),bottom:Math.max(Ae.bottom,Ie.bottom)+K};var Ke=il(m,G),dt=m.doc.scrollTop,bt=m.doc.scrollLeft;if(Ke.scrollTop!=null&&(us(m,Ke.scrollTop),Math.abs(m.doc.scrollTop-dt)>1&&(ye=!0)),Ke.scrollLeft!=null&&(Do(m,Ke.scrollLeft),Math.abs(m.doc.scrollLeft-bt)>1&&(ye=!0)),!ye)break}return G}function wl(m,R){var W=il(m,R);W.scrollTop!=null&&us(m,W.scrollTop),W.scrollLeft!=null&&Do(m,W.scrollLeft)}function il(m,R){var W=m.display,K=da(m.display);R.top<0&&(R.top=0);var G=m.curOp&&m.curOp.scrollTop!=null?m.curOp.scrollTop:W.scroller.scrollTop,$=Ue(m),ye={};R.bottom-R.top>$&&(R.bottom=R.top+$);var Ae=m.doc.height+ot(W),Ie=R.topAe-K;if(R.topG+$){var dt=Math.min(R.top,(Ke?Ae:R.bottom)-$);dt!=G&&(ye.scrollTop=dt)}var bt=m.options.fixedGutter?0:W.gutters.offsetWidth,Wt=m.curOp&&m.curOp.scrollLeft!=null?m.curOp.scrollLeft:W.scroller.scrollLeft-bt,Nt=ut(m)-W.gutters.offsetWidth,en=R.right-R.left>Nt;return en&&(R.right=R.left+Nt),R.left<10?ye.scrollLeft=0:R.leftNt+Wt-3&&(ye.scrollLeft=R.right+(en?0:10)-Nt),ye}function al(m,R){if(R==null)return;Os(m),m.curOp.scrollTop=(m.curOp.scrollTop==null?m.doc.scrollTop:m.curOp.scrollTop)+R}function ys(m){Os(m);var R=m.getCursor();m.curOp.scrollToPos={from:R,to:R,margin:m.options.cursorScrollMargin}}function ls(m,R,W){(R!=null||W!=null)&&Os(m),R!=null&&(m.curOp.scrollLeft=R),W!=null&&(m.curOp.scrollTop=W)}function Fl(m,R){Os(m),m.curOp.scrollToPos=R}function Os(m){var R=m.curOp.scrollToPos;if(R){m.curOp.scrollToPos=null;var W=dr(m,R.from),K=dr(m,R.to);Rs(m,W,K,R.margin)}}function Rs(m,R,W,K){var G=il(m,{left:Math.min(R.left,W.left),top:Math.min(R.top,W.top)-K,right:Math.max(R.right,W.right),bottom:Math.max(R.bottom,W.bottom)+K});ls(m,G.scrollLeft,G.scrollTop)}function us(m,R){if(Math.abs(m.doc.scrollTop-R)<2)return;T||Bs(m,{top:R}),bs(m,R,!0),T&&Bs(m),Ds(m,100)}function bs(m,R,W){if(R=Math.max(0,Math.min(m.display.scroller.scrollHeight-m.display.scroller.clientHeight,R)),m.display.scroller.scrollTop==R&&!W)return;m.doc.scrollTop=R,m.display.scrollbars.setScrollTop(R),m.display.scroller.scrollTop!=R&&(m.display.scroller.scrollTop=R)}function Do(m,R,W,K){if(R=Math.max(0,Math.min(R,m.display.scroller.scrollWidth-m.display.scroller.clientWidth)),(W?R==m.doc.scrollLeft:Math.abs(m.doc.scrollLeft-R)<2)&&!K)return;m.doc.scrollLeft=R,qe(m),m.display.scroller.scrollLeft!=R&&(m.display.scroller.scrollLeft=R),m.display.scrollbars.setScrollLeft(R)}function cs(m){var R=m.display,W=R.gutters.offsetWidth,K=Math.round(m.doc.height+ot(m.display));return{clientHeight:R.scroller.clientHeight,viewHeight:R.wrapper.clientHeight,scrollWidth:R.scroller.scrollWidth,clientWidth:R.scroller.clientWidth,viewWidth:R.wrapper.clientWidth,barLeft:m.options.fixedGutter?W:0,docHeight:K,scrollHeight:K+Rt(m)+R.barHeight,nativeBarWidth:R.nativeBarWidth,gutterWidth:W}}var $o=function(m,R,W){this.cm=W;var K=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),G=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");K.tabIndex=G.tabIndex=-1,m(K),m(G),Me(K,"scroll",function(){K.clientHeight&&R(K.scrollTop,"vertical")}),Me(G,"scroll",function(){G.clientWidth&&R(G.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};$o.prototype.update=function(m){var R=m.scrollWidth>m.clientWidth+1,W=m.scrollHeight>m.clientHeight+1,K=m.nativeBarWidth;if(W){this.vert.style.display="block",this.vert.style.bottom=R?K+"px":"0";var G=m.viewHeight-(R?K:0);this.vert.firstChild.style.height=Math.max(0,m.scrollHeight-m.clientHeight+G)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(R){this.horiz.style.display="block",this.horiz.style.right=W?K+"px":"0",this.horiz.style.left=m.barLeft+"px";var $=m.viewWidth-m.barLeft-(W?K:0);this.horiz.firstChild.style.width=Math.max(0,m.scrollWidth-m.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&m.clientHeight>0&&(K==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:W?K:0,bottom:R?K:0}},$o.prototype.setScrollLeft=function(m){this.horiz.scrollLeft!=m&&(this.horiz.scrollLeft=m),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},$o.prototype.setScrollTop=function(m){this.vert.scrollTop!=m&&(this.vert.scrollTop=m),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},$o.prototype.zeroWidthHack=function(){var m=f&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=m,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Z,this.disableVert=new Z},$o.prototype.enableZeroWidthBar=function(m,R,W){m.style.pointerEvents="auto";function K(){var G=m.getBoundingClientRect(),$=W=="vert"?document.elementFromPoint(G.right-1,(G.top+G.bottom)/2):document.elementFromPoint((G.right+G.left)/2,G.bottom-1);$!=m?m.style.pointerEvents="none":R.set(1e3,K)}R.set(1e3,K)},$o.prototype.clear=function(){var m=this.horiz.parentNode;m.removeChild(this.horiz),m.removeChild(this.vert)};var ds=function(){};ds.prototype.update=function(){return{bottom:0,right:0}},ds.prototype.setScrollLeft=function(){},ds.prototype.setScrollTop=function(){},ds.prototype.clear=function(){};function Es(m,R){R||(R=cs(m));var W=m.display.barWidth,K=m.display.barHeight;Us(m,R);for(var G=0;G<4&&W!=m.display.barWidth||K!=m.display.barHeight;G++)W!=m.display.barWidth&&m.options.lineWrapping&&Ps(m),Us(m,cs(m)),W=m.display.barWidth,K=m.display.barHeight}function Us(m,R){var W=m.display,K=W.scrollbars.update(R);W.sizer.style.paddingRight=(W.barWidth=K.right)+"px",W.sizer.style.paddingBottom=(W.barHeight=K.bottom)+"px",W.heightForcer.style.borderBottom=K.bottom+"px solid transparent",K.right&&K.bottom?(W.scrollbarFiller.style.display="block",W.scrollbarFiller.style.height=K.bottom+"px",W.scrollbarFiller.style.width=K.right+"px"):W.scrollbarFiller.style.display="",K.bottom&&m.options.coverGutterNextToScrollbar&&m.options.fixedGutter?(W.gutterFiller.style.display="block",W.gutterFiller.style.height=K.bottom+"px",W.gutterFiller.style.width=R.gutterWidth+"px"):W.gutterFiller.style.display=""}var Sl={native:$o,null:ds};function Fs(m){m.display.scrollbars&&(m.display.scrollbars.clear(),m.display.scrollbars.addClass&&w(m.display.wrapper,m.display.scrollbars.addClass)),m.display.scrollbars=new Sl[m.options.scrollbarStyle](function(R){m.display.wrapper.insertBefore(R,m.display.scrollbarFiller),Me(R,"mousedown",function(){m.state.focused&&setTimeout(function(){return m.display.input.focus()},0)}),R.setAttribute("cm-not-content","true")},function(R,W){W=="horizontal"?Do(m,R):us(m,R)},m),m.display.scrollbars.addClass&&X(m.display.wrapper,m.display.scrollbars.addClass)}var ol=0;function es(m){m.curOp={cm:m,viewChanged:!1,startHeight:m.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ol},Pa(m.curOp)}function hs(m){var R=m.curOp;R&&di(R,function(W){for(var K=0;K=W.viewTo)||W.maxLineChanged&&R.options.lineWrapping,m.update=m.mustUpdate&&new Io(R,m.mustUpdate&&{top:m.scrollTop,ensure:m.scrollToPos},m.forceUpdate)}function sl(m){m.updatedDisplay=m.mustUpdate&&fs(m.cm,m.update)}function ll(m){var R=m.cm,W=R.display;m.updatedDisplay&&Ps(R),m.barMeasure=cs(R),W.maxLineChanged&&!R.options.lineWrapping&&(m.adjustWidthTo=ft(R,W.maxLine,W.maxLine.text.length).left+3,R.display.sizerWidth=m.adjustWidthTo,m.barMeasure.scrollWidth=Math.max(W.scroller.clientWidth,W.sizer.offsetLeft+m.adjustWidthTo+Rt(R)+R.display.barWidth),m.maxScrollLeft=Math.max(0,W.sizer.offsetLeft+m.adjustWidthTo-ut(R))),(m.updatedDisplay||m.selectionChanged)&&(m.preparedSelection=W.input.prepareSelection())}function ul(m){var R=m.cm;m.adjustWidthTo!=null&&(R.display.sizer.style.minWidth=m.adjustWidthTo+"px",m.maxScrollLeft=m.display.viewTo)return;var W=+new Date+m.options.workTime,K=Yt(m,R.highlightFrontier),G=[];R.iter(K.line,Math.min(R.first+R.size,m.display.viewTo+500),function($){if(K.line>=m.display.viewFrom){var ye=$.styles,Ae=$.text.length>m.options.maxHighlightLength?It(R.mode,K.state):null,Ie=nt(m,$,K,!0);Ae&&(K.state=Ae),$.styles=Ie.styles;var Ke=$.styleClasses,dt=Ie.classes;dt?$.styleClasses=dt:Ke&&($.styleClasses=null);for(var bt=!ye||ye.length!=$.styles.length||Ke!=dt&&(!Ke||!dt||Ke.bgClass!=dt.bgClass||Ke.textClass!=dt.textClass),Wt=0;!bt&&WtW)return Ds(m,m.options.workDelay),!0}),R.highlightFrontier=K.line,R.modeFrontier=Math.max(R.modeFrontier,K.line),G.length&&ao(m,function(){for(var $=0;$=W.viewFrom&&R.visible.to<=W.viewTo&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo)&&W.renderedView==W.view&&Jo(m)==0)return!1;it(m)&&($i(m),R.dims=ia(m));var G=K.first+K.size,$=Math.max(R.visible.from-m.options.viewportMargin,K.first),ye=Math.min(G,R.visible.to+m.options.viewportMargin);W.viewFrom<$&&$-W.viewFrom<20&&($=Math.max(K.first,W.viewFrom)),W.viewTo>ye&&W.viewTo-ye<20&&(ye=Math.min(G,W.viewTo)),Gr&&($=Wa(m.doc,$),ye=Ma(m.doc,ye));var Ae=$!=W.viewFrom||ye!=W.viewTo||W.lastWrapHeight!=R.wrapperHeight||W.lastWrapWidth!=R.wrapperWidth;Qo(m,$,ye),W.viewOffset=Xa($t(m.doc,W.viewFrom)),m.display.mover.style.top=W.viewOffset+"px";var Ie=Jo(m);if(!Ae&&Ie==0&&!R.force&&W.renderedView==W.view&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo))return!1;var Ke=Tl(m);return Ie>4&&(W.lineDiv.style.display="none"),Al(m,W.updateLineNumbers,R.dims),Ie>4&&(W.lineDiv.style.display=""),W.renderedView=W.view,Wl(Ke),S(W.cursorDiv),S(W.selectionDiv),W.gutters.style.height=W.sizer.style.minHeight=0,Ae&&(W.lastWrapHeight=R.wrapperHeight,W.lastWrapWidth=R.wrapperWidth,Ds(m,400)),W.updateLineNumbers=null,!0}function js(m,R){for(var W=R.viewport,K=!0;;K=!1){if(!K||!m.options.lineWrapping||R.oldDisplayWidth==ut(m)){if(W&&W.top!=null&&(W={top:Math.min(m.doc.height+ot(m.display)-Ue(m),W.top)}),R.visible=Ns(m.display,m.doc,W),R.visible.from>=m.display.viewFrom&&R.visible.to<=m.display.viewTo)break}else K&&(R.visible=Ns(m.display,m.doc,W));if(!fs(m,R))break;Ps(m);var G=cs(m);Li(m),Es(m,G),we(m,G),R.force=!1}R.signal(m,"update",m),(m.display.viewFrom!=m.display.reportedViewFrom||m.display.viewTo!=m.display.reportedViewTo)&&(R.signal(m,"viewportChange",m,m.display.viewFrom,m.display.viewTo),m.display.reportedViewFrom=m.display.viewFrom,m.display.reportedViewTo=m.display.viewTo)}function Bs(m,R){var W=new Io(m,R);if(fs(m,W)){Ps(m),js(m,W);var K=cs(m);Li(m),Es(m,K),we(m,K),W.finish()}}function Al(m,R,W){var K=m.display,G=m.options.lineNumbers,$=K.lineDiv,ye=$.firstChild;function Ae(en){var cn=en.nextSibling;return e&&f&&m.display.currentWheelTarget==en?en.style.display="none":en.parentNode.removeChild(en),cn}for(var Ie=K.view,Ke=K.viewFrom,dt=0;dt-1&&(Nt=!1),gn(m,bt,Ke,W)),Nt&&(S(bt.lineNumber),bt.lineNumber.appendChild(document.createTextNode(Qn(m.options,Ke)))),ye=bt.node.nextSibling}Ke+=bt.size}for(;ye;)ye=Ae(ye)}function Ks(m){var R=m.gutters.offsetWidth;m.sizer.style.marginLeft=R+"px"}function we(m,R){m.display.sizer.style.minHeight=R.docHeight+"px",m.display.heightForcer.style.top=R.docHeight+"px",m.display.gutters.style.height=R.docHeight+m.display.barHeight+Rt(m)+"px"}function qe(m){var R=m.display,W=R.view;if(!R.alignWidgets&&(!R.gutters.firstChild||!m.options.fixedGutter))return;for(var K=$a(R)-R.scroller.scrollLeft+m.doc.scrollLeft,G=R.gutters.offsetWidth,$=K+"px",ye=0;yeye.clientWidth,Ie=ye.scrollHeight>ye.clientHeight;if(!(K&&Ae||G&&Ie))return;if(G&&f&&e){e:for(var Ke=R.target,dt=$.view;Ke!=ye;Ke=Ke.parentNode)for(var bt=0;bt=0&&xn(m,K.to())<=0)return W}return-1};var Dt=function(m,R){this.anchor=m,this.head=R};Dt.prototype.from=function(){return $n(this.anchor,this.head)},Dt.prototype.to=function(){return Ar(this.anchor,this.head)},Dt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gt(m,R,W){var K=m&&m.options.selectionsMayTouch,G=R[W];R.sort(function(Wt,Nt){return xn(Wt.from(),Nt.from())}),W=re(R,G);for(var $=1;$0:Ie>=0){var Ke=$n(Ae.from(),ye.from()),dt=Ar(Ae.to(),ye.to()),bt=Ae.empty()?ye.from()==ye.head:Ae.from()==Ae.head;$<=W&&--W,R.splice(--$,2,new Dt(bt?dt:Ke,bt?Ke:dt))}}return new Ft(R,W)}function qt(m,R){return new Ft([new Dt(m,R||m)],0)}function un(m){return m.text?Vt(m.from.line+m.text.length-1,se(m.text).length+(m.text.length==1?m.from.ch:0)):m.to}function ln(m,R){if(xn(m,R.from)<0)return m;if(xn(m,R.to)<=0)return un(R);var W=m.line+R.text.length-(R.to.line-R.from.line)-1,K=m.ch;return m.line==R.to.line&&(K+=un(R).ch-R.to.ch),Vt(W,K)}function Sn(m,R){for(var W=[],K=0;K1&&m.remove(Ae.line+1,en-1),m.insert(Ae.line+1,Un)}tn(m,"change",m,R)}function an(m,R,W){function K(G,$,ye){if(G.linked)for(var Ae=0;Ae1&&!m.done[m.done.length-2].ranges)return m.done.pop(),se(m.done)}function Ln(m,R,W,K){var G=m.history;G.undone.length=0;var $=+new Date,ye,Ae;if((G.lastOp==K||G.lastOrigin==R.origin&&R.origin&&(R.origin.charAt(0)=="+"&&G.lastModTime>$-(m.cm?m.cm.options.historyEventDelay:500)||R.origin.charAt(0)=="*"))&&(ye=_n(G,G.lastOp==K)))Ae=se(ye.changes),xn(R.from,R.to)==0&&xn(R.from,Ae.to)==0?Ae.to=un(R):ye.changes.push(Wn(m,R));else{var Ie=se(G.done);for((!Ie||!Ie.ranges)&&$r(m.sel,G.done),ye={changes:[Wn(m,R)],generation:G.generation},G.done.push(ye);G.done.length>G.undoDepth;)G.done.shift(),G.done[0].ranges||G.done.shift()}G.done.push(W),G.generation=++G.maxGeneration,G.lastModTime=G.lastSelTime=$,G.lastOp=G.lastSelOp=K,G.lastOrigin=G.lastSelOrigin=R.origin,Ae||Ve(m,"historyAdded")}function qn(m,R,W,K){var G=R.charAt(0);return G=="*"||G=="+"&&W.ranges.length==K.ranges.length&&W.somethingSelected()==K.somethingSelected()&&new Date-m.history.lastSelTime<=(m.cm?m.cm.options.historyEventDelay:500)}function kr(m,R,W,K){var G=m.history,$=K&&K.origin;W==G.lastSelOp||$&&G.lastSelOrigin==$&&(G.lastModTime==G.lastSelTime&&G.lastOrigin==$||qn(m,$,se(G.done),R))?G.done[G.done.length-1]=R:$r(R,G.done),G.lastSelTime=+new Date,G.lastSelOrigin=$,G.lastSelOp=W,K&&K.clearRedo!==!1&&bn(G.undone)}function $r(m,R){var W=se(R);W&&W.ranges&&W.equals(m)||R.push(m)}function wn(m,R,W,K){var G=R["spans_"+m.id],$=0;m.iter(Math.max(m.first,W),Math.min(m.first+m.size,K),function(ye){ye.markedSpans&&((G||(G=R["spans_"+m.id]={}))[$]=ye.markedSpans),++$})}function Er(m){if(!m)return null;for(var R,W=0;W-1&&(se(Ae)[bt]=Ke[bt],delete Ke[bt]))}}return K}function jr(m,R,W,K){if(K){var G=m.anchor;if(W){var $=xn(R,G)<0;$!=xn(W,G)<0?(G=R,R=W):$!=xn(R,W)<0&&(R=W)}return new Dt(G,R)}else return new Dt(W||R,R)}function Tn(m,R,W,K,G){G==null&&(G=m.cm&&(m.cm.display.shift||m.extend)),pi(m,new Ft([jr(m.sel.primary(),R,W,G)],0),K)}function Lr(m,R,W){for(var K=[],G=m.cm&&(m.cm.display.shift||m.extend),$=0;$=R.ch:Ae.to>R.ch))){if(G&&(Ve(Ie,"beforeCursorEnter"),Ie.explicitlyCleared))if($.markedSpans){--ye;continue}else break;if(!Ie.atomic)continue;if(W){var bt=Ie.find(K<0?1:-1),Wt=void 0;if((K<0?dt:Ke)&&(bt=eo(m,bt,-K,bt&&bt.line==R.line?$:null)),bt&&bt.line==R.line&&(Wt=xn(bt,W))&&(K<0?Wt<0:Wt>0))return so(m,bt,R,K,G)}var Nt=Ie.find(K<0?-1:1);return(K<0?Ke:dt)&&(Nt=eo(m,Nt,K,Nt.line==R.line?$:null)),Nt?so(m,Nt,R,K,G):null}}return R}function _a(m,R,W,K,G){var $=K||1,ye=so(m,R,W,$,G)||!G&&so(m,R,W,$,!0)||so(m,R,W,-$,G)||!G&&so(m,R,W,-$,!0);return ye||(m.cantEdit=!0,Vt(m.first,0))}function eo(m,R,W,K){return W<0&&R.ch==0?R.line>m.first?V(m,Vt(R.line-1)):null:W>0&&R.ch==(K||$t(m,R.line)).text.length?R.line=0;--G)Ya(m,{from:K[G].from,to:K[G].to,text:G?[""]:R.text,origin:R.origin});else Ya(m,R)}function Ya(m,R){if(R.text.length==1&&R.text[0]==""&&xn(R.from,R.to)==0)return;var W=Sn(m,R);Ln(m,R,W,m.cm?m.cm.curOp.id:NaN),Bi(m,R,W,La(m,R));var K=[];an(m,function(G,$){!$&&re(K,G.history)==-1&&(ha(G.history,R),K.push(G.history)),Bi(G,R,null,La(G,R))})}function ta(m,R,W){var K=m.cm&&m.cm.state.suppressEdits;if(K&&!W)return;for(var G=m.history,$,ye=m.sel,Ae=R=="undo"?G.done:G.undone,Ie=R=="undo"?G.undone:G.done,Ke=0;Ke=0;--Nt){var en=Wt(Nt);if(en)return en.v}}function br(m,R){if(R==0)return;if(m.first+=R,m.sel=new Ft(be(m.sel.ranges,function(G){return new Dt(Vt(G.anchor.line+R,G.anchor.ch),Vt(G.head.line+R,G.head.ch))}),m.sel.primIndex),m.cm){ji(m.cm,m.first,m.first-R,R);for(var W=m.cm.display,K=W.viewFrom;Km.lastLine())return;if(R.from.line$&&(R={from:R.from,to:Vt($,$t(m,$).text.length),text:[R.text[0]],origin:R.origin}),R.removed=Pn(m,R.from,R.to),W||(W=Sn(m,R)),m.cm?Yo(m.cm,R,K):mt(m,R,K),Va(m,W,ke),m.cantEdit&&_a(m,Vt(m.firstLine(),0))&&(m.cantEdit=!1)}function Yo(m,R,W){var K=m.doc,G=m.display,$=R.from,ye=R.to,Ae=!1,Ie=$.line;m.options.lineWrapping||(Ie=on(Zi($t(K,$.line))),K.iter(Ie,ye.line+1,function(Nt){if(Nt==G.maxLine)return Ae=!0,!0})),K.sel.contains(R.from,R.to)>-1&&Ye(m),mt(K,R,W,Oo(m)),m.options.lineWrapping||(K.iter(Ie,$.line+R.text.length,function(Nt){var en=go(Nt);en>G.maxLineLength&&(G.maxLine=Nt,G.maxLineLength=en,G.maxLineChanged=!0,Ae=!1)}),Ae&&(m.curOp.updateMaxLine=!0)),Sr(K,$.line),Ds(m,400);var Ke=R.text.length-(ye.line-$.line)-1;R.full?ji(m):$.line==ye.line&&R.text.length==1&&!Kn(m.doc,R)?aa(m,$.line,"text"):ji(m,$.line,ye.line+1,Ke);var dt=Ne(m,"changes"),bt=Ne(m,"change");if(bt||dt){var Wt={from:$,to:ye,text:R.text,removed:R.removed,origin:R.origin};bt&&tn(m,"change",m,Wt),dt&&(m.curOp.changeObjs||(m.curOp.changeObjs=[])).push(Wt)}m.display.selForContextMenu=null}function _i(m,R,W,K,G){var $;K||(K=W),xn(K,W)<0&&($=[K,W],W=$[0],K=$[1]),typeof R=="string"&&(R=m.splitLines(R)),Na(m,{from:W,to:K,text:R,origin:G})}function xi(m,R,W,K){W1||!(this.children[0]instanceof Sa))){var Ae=[];this.collapse(Ae),this.children=[new Sa(Ae)],this.children[0].parent=this}},collapse:function(m){for(var R=0;R50){for(var ye=G.lines.length%25+25,Ae=ye;Ae10);m.parent.maybeSpill()},iterN:function(m,R,W){for(var K=0;Km.display.maxLineLength&&(m.display.maxLine=Ke,m.display.maxLineLength=dt,m.display.maxLineChanged=!0)}K!=null&&m&&this.collapsed&&ji(m,K,G+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,m&&sa(m.doc)),m&&tn(m,"markerCleared",m,this,K,G),R&&hs(m),this.parent&&this.parent.clear()},co.prototype.find=function(m,R){m==null&&this.type=="bookmark"&&(m=1);for(var W,K,G=0;G0||ye==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=M("span",[$.replacedWith],"CodeMirror-widget"),K.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),K.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(Pi(m,R.line,R,W,$)||R.line!=W.line&&Pi(m,W.line,R,W,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");ca()}$.addToHistory&&Ln(m,{from:R,to:W,origin:"markText"},m.sel,NaN);var Ae=R.line,Ie=m.cm,Ke;if(m.iter(Ae,W.line+1,function(bt){Ie&&$.collapsed&&!Ie.options.lineWrapping&&Zi(bt)==Ie.display.maxLine&&(Ke=!0),$.collapsed&&Ae!=R.line&&In(bt,0),po(bt,new Fi($,Ae==R.line?R.ch:null,Ae==W.line?W.ch:null)),++Ae}),$.collapsed&&m.iter(R.line,W.line+1,function(bt){ni(m,bt)&&In(bt,0)}),$.clearOnEnter&&Me($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(si(),(m.history.done.length||m.history.undone.length)&&m.clearHistory()),$.collapsed&&($.id=++Ua,$.atomic=!0),Ie){if(Ke&&(Ie.curOp.updateMaxLine=!0),$.collapsed)ji(Ie,R.line,W.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var dt=R.line;dt<=W.line;dt++)aa(Ie,dt,"text");$.atomic&&sa(Ie.doc),tn(Ie,"markerAdded",Ie,$)}return $}var ba=function(m,R){this.markers=m,this.primary=R;for(var W=0;W=0;Ie--)Na(this,K[Ie]);Ae?Da(this,Ae):this.cm&&ys(this.cm)}),undo:va(function(){ta(this,"undo")}),redo:va(function(){ta(this,"redo")}),undoSelection:va(function(){ta(this,"undo",!0)}),redoSelection:va(function(){ta(this,"redo",!0)}),setExtending:function(m){this.extend=m},getExtending:function(){return this.extend},historySize:function(){for(var m=this.history,R=0,W=0,K=0;K=m.ch)&&R.push(G.marker.parent||G.marker)}return R},findMarks:function(m,R,W){m=V(this,m),R=V(this,R);var K=[],G=m.line;return this.iter(m.line,R.line+1,function($){var ye=$.markedSpans;if(ye)for(var Ae=0;Ae=Ie.to||Ie.from==null&&G!=m.line||Ie.from!=null&&G==R.line&&Ie.from>=R.ch)&&(!W||W(Ie.marker))&&K.push(Ie.marker.parent||Ie.marker)}++G}),K},getAllMarks:function(){var m=[];return this.iter(function(R){var W=R.markedSpans;if(W)for(var K=0;Km)return R=m,!0;m-=$,++W}),V(this,Vt(W,R))},indexFromPos:function(m){m=V(this,m);var R=m.ch;if(m.lineR&&(R=m.from),m.to!=null&&m.to-1){R.state.draggingText(m),setTimeout(function(){return R.display.input.focus()},20);return}try{var dt=m.dataTransfer.getData("Text");if(dt){var bt;if(R.state.draggingText&&!R.state.draggingText.copy&&(bt=R.listSelections()),Va(R.doc,qt(W,W)),bt)for(var Wt=0;Wt=0;Ae--)_i(m.doc,"",K[Ae].from,K[Ae].to,"+delete");ys(m)})}function Xs(m,R,W){var K=Ee(m.text,R+W,W);return K<0||K>m.text.length?null:K}function fl(m,R,W){var K=Xs(m,R.ch,W);return K==null?null:new Vt(R.line,K,W<0?"after":"before")}function pl(m,R,W,K,G){if(m){R.doc.direction=="rtl"&&(G=-G);var $=tt(W,R.doc.direction);if($){var ye=G<0?se($):$[0],Ae=G<0==(ye.level==1),Ie=Ae?"after":"before",Ke;if(ye.level>0||R.doc.direction=="rtl"){var dt=Tt(R,W);Ke=G<0?W.text.length-1:0;var bt=Pt(R,dt,Ke).top;Ke=Le(function(Wt){return Pt(R,dt,Wt).top==bt},G<0==(ye.level==1)?ye.from:ye.to-1,Ke),Ie=="before"&&(Ke=Xs(W,Ke,1))}else Ke=G<0?ye.to:ye.from;return new Vt(K,Ke,Ie)}}return new Vt(K,G<0?W.text.length:0,G<0?"before":"after")}function Ur(m,R,W,K){var G=tt(R,m.doc.direction);if(!G)return fl(R,W,K);W.ch>=R.text.length?(W.ch=R.text.length,W.sticky="before"):W.ch<=0&&(W.ch=0,W.sticky="after");var $=_e(G,W.ch,W.sticky),ye=G[$];if(m.doc.direction=="ltr"&&ye.level%2==0&&(K>0?ye.to>W.ch:ye.from=ye.from&&Wt>=dt.begin)){var Nt=bt?"before":"after";return new Vt(W.line,Wt,Nt)}}var en=function(Un,Yn,Fn){for(var tr=function(na,no){return no?new Vt(W.line,Ae(na,1),"before"):new Vt(W.line,na,"after")};Un>=0&&Un0==(Tr.level!=1),oi=mr?Fn.begin:Ae(Fn.end,-1);if(Tr.from<=oi&&oi0?dt.end:Ae(dt.begin,-1);return En!=null&&!(K>0&&En==R.text.length)&&(cn=en(K>0?0:G.length-1,K,Ke(En)),cn)?cn:null}var yi={selectAll:lo,singleSelection:function(m){return m.setSelection(m.getCursor("anchor"),m.getCursor("head"),ke)},killLine:function(m){return os(m,function(R){if(R.empty()){var W=$t(m.doc,R.head.line).text.length;return R.head.ch==W&&R.head.line0)G=new Vt(G.line,G.ch+1),m.replaceRange($.charAt(G.ch-1)+$.charAt(G.ch-2),Vt(G.line,G.ch-2),G,"+transpose");else if(G.line>m.doc.first){var ye=$t(m.doc,G.line-1).text;ye&&(G=new Vt(G.line,1),m.replaceRange($.charAt(0)+m.doc.lineSeparator()+ye.charAt(ye.length-1),Vt(G.line-1,ye.length-1),G,"+transpose"))}}W.push(new Dt(G,G))}m.setSelections(W)})},newlineAndIndent:function(m){return ao(m,function(){for(var R=m.listSelections(),W=R.length-1;W>=0;W--)m.replaceRange(m.doc.lineSeparator(),R[W].anchor,R[W].head,"+input");R=m.listSelections();for(var K=0;Km&&xn(R,this.pos)==0&&W==this.button};var Qs,vs;function Il(m,R){var W=+new Date;return vs&&vs.compare(W,m,R)?(Qs=vs=null,"triple"):Qs&&Qs.compare(W,m,R)?(vs=new Dl(W,m,R),Qs=null,"double"):(Qs=new Dl(W,m,R),vs=null,"single")}function jn(m){var R=this,W=R.display;if(Je(R,m)||W.activeTouch&&W.input.supportsTouch())return;if(W.input.ensurePolled(),W.shift=m.shiftKey,zo(W,m)){e||(W.scroller.draggable=!1,setTimeout(function(){return W.scroller.draggable=!0},100));return}if(pr(R,m))return;var K=Oa(R,m),G=ne(m),$=K?Il(K,G):"single";if(window.focus(),G==1&&R.state.selectingText&&R.state.selectingText(m),K&&Bn(R,G,K,$,m))return;G==1?K?ir(R,K,$,m):Qe(m)==W.scroller&&ve(m):G==2?(K&&Tn(R.doc,K),setTimeout(function(){return W.input.focus()},20)):G==3&&(O?R.display.input.onContextMenu(m):rl(R))}function Bn(m,R,W,K,G){var $="Click";return K=="double"?$="Double"+$:K=="triple"&&($="Triple"+$),$=(R==1?"Left":R==2?"Middle":"Right")+$,ms(m,hl($,G),G,function(ye){if(typeof ye=="string"&&(ye=yi[ye]),!ye)return!1;var Ae=!1;try{m.isReadOnly()&&(m.state.suppressEdits=!0),Ae=ye(m,W)!=Se}finally{m.state.suppressEdits=!1}return Ae})}function Xn(m,R,W){var K=m.getOption("configureMouse"),G=K?K(m,R,W):{};if(G.unit==null){var $=h?W.shiftKey&&W.metaKey:W.altKey;G.unit=$?"rectangle":R=="single"?"char":R=="double"?"word":"line"}return(G.extend==null||m.doc.extend)&&(G.extend=m.doc.extend||W.shiftKey),G.addNew==null&&(G.addNew=f?W.metaKey:W.ctrlKey),G.moveOnDrag==null&&(G.moveOnDrag=!(f?W.altKey:W.ctrlKey)),G}function ir(m,R,W,K){_?setTimeout(U(Ms,m),0):m.curOp.focus=z();var G=Xn(m,W,K),$=m.doc.sel,ye;m.options.dragDrop&&Ze&&!m.isReadOnly()&&W=="single"&&(ye=$.contains(R))>-1&&(xn((ye=$.ranges[ye]).from(),R)<0||R.xRel>0)&&(xn(ye.to(),R)>0||R.xRel<0)?Dn(m,K,R,G):ei(m,K,R,G)}function Dn(m,R,W,K){var G=m.display,$=!1,ye=oa(m,function(Ke){e&&(G.scroller.draggable=!1),m.state.draggingText=!1,Oe(G.wrapper.ownerDocument,"mouseup",ye),Oe(G.wrapper.ownerDocument,"mousemove",Ae),Oe(G.scroller,"dragstart",Ie),Oe(G.scroller,"drop",ye),$||(ve(Ke),K.addNew||Tn(m.doc,W,null,null,K.extend),e&&!r||_&&p==9?setTimeout(function(){G.wrapper.ownerDocument.body.focus({preventScroll:!0}),G.input.focus()},20):G.input.focus())}),Ae=function(Ke){$=$||Math.abs(R.clientX-Ke.clientX)+Math.abs(R.clientY-Ke.clientY)>=10},Ie=function(){return $=!0};e&&(G.scroller.draggable=!0),m.state.draggingText=ye,ye.copy=!K.moveOnDrag,G.scroller.dragDrop&&G.scroller.dragDrop(),Me(G.wrapper.ownerDocument,"mouseup",ye),Me(G.wrapper.ownerDocument,"mousemove",Ae),Me(G.scroller,"dragstart",Ie),Me(G.scroller,"drop",ye),rl(m),setTimeout(function(){return G.input.focus()},20)}function fr(m,R,W){if(W=="char")return new Dt(R,R);if(W=="word")return m.findWordAt(R);if(W=="line")return new Dt(Vt(R.line,0),V(m.doc,Vt(R.line+1,0)));var K=W(m,R);return new Dt(K.from,K.to)}function ei(m,R,W,K){var G=m.display,$=m.doc;ve(R);var ye,Ae,Ie=$.sel,Ke=Ie.ranges;if(K.addNew&&!K.extend?(Ae=$.sel.contains(W),Ae>-1?ye=Ke[Ae]:ye=new Dt(W,W)):(ye=$.sel.primary(),Ae=$.sel.primIndex),K.unit=="rectangle")K.addNew||(ye=new Dt(W,W)),W=Oa(m,R,!0,!0),Ae=-1;else{var dt=fr(m,W,K.unit);K.extend?ye=jr(ye,dt.anchor,dt.head,K.extend):ye=dt}K.addNew?Ae==-1?(Ae=Ke.length,pi($,Gt(m,Ke.concat([ye]),Ae),{scroll:!1,origin:"*mouse"})):Ke.length>1&&Ke[Ae].empty()&&K.unit=="char"&&!K.extend?(pi($,Gt(m,Ke.slice(0,Ae).concat(Ke.slice(Ae+1)),0),{scroll:!1,origin:"*mouse"}),Ie=$.sel):Mi($,Ae,ye,te):(Ae=0,pi($,new Ft([ye],0),te),Ie=$.sel);var bt=W;function Wt(Fn){if(xn(bt,Fn)==0)return;if(bt=Fn,K.unit=="rectangle"){for(var tr=[],Tr=m.options.tabSize,mr=B($t($,W.line).text,W.ch,Tr),oi=B($t($,Fn.line).text,Fn.ch,Tr),na=Math.min(mr,oi),no=Math.max(mr,oi),Ea=Math.min(W.line,Fn.line),Ko=Math.min(m.lastLine(),Math.max(W.line,Fn.line));Ea<=Ko;Ea++){var Mo=$t($,Ea).text,Ka=Ce(Mo,na,Tr);na==no?tr.push(new Dt(Vt(Ea,Ka),Vt(Ea,Ka))):Mo.length>Ka&&tr.push(new Dt(Vt(Ea,Ka),Vt(Ea,Ce(Mo,no,Tr))))}tr.length||tr.push(new Dt(W,W)),pi($,Gt(m,Ie.ranges.slice(0,Ae).concat(tr),Ae),{origin:"*mouse",scroll:!1}),m.scrollIntoView(Fn)}else{var Po=ye,fo=fr(m,Fn,K.unit),Za=Po.anchor,Ha;xn(fo.anchor,Za)>0?(Ha=fo.head,Za=$n(Po.from(),fo.anchor)):(Ha=fo.anchor,Za=Ar(Po.to(),fo.head));var Ca=Ie.ranges.slice(0);Ca[Ae]=Ir(m,new Dt(V($,Za),Ha)),pi($,Gt(m,Ca,Ae),te)}}var Nt=G.wrapper.getBoundingClientRect(),en=0;function cn(Fn){var tr=++en,Tr=Oa(m,Fn,!0,K.unit=="rectangle");if(!Tr)return;if(xn(Tr,bt)!=0){m.curOp.focus=z(),Wt(Tr);var mr=Ns(G,$);(Tr.line>=mr.to||Tr.lineNt.bottom?20:0;oi&&setTimeout(oa(m,function(){if(en!=tr)return;G.scroller.scrollTop+=oi,cn(Fn)}),50)}}function En(Fn){m.state.selectingText=!1,en=Infinity,Fn&&(ve(Fn),G.input.focus()),Oe(G.wrapper.ownerDocument,"mousemove",Un),Oe(G.wrapper.ownerDocument,"mouseup",Yn),$.history.lastSelOrigin=null}var Un=oa(m,function(Fn){Fn.buttons===0||!ne(Fn)?En(Fn):cn(Fn)}),Yn=oa(m,En);m.state.selectingText=Yn,Me(G.wrapper.ownerDocument,"mousemove",Un),Me(G.wrapper.ownerDocument,"mouseup",Yn)}function Ir(m,R){var W=R.anchor,K=R.head,G=$t(m.doc,W.line);if(xn(W,K)==0&&W.sticky==K.sticky)return R;var $=tt(G);if(!$)return R;var ye=_e($,W.ch,W.sticky),Ae=$[ye];if(Ae.from!=W.ch&&Ae.to!=W.ch)return R;var Ie=ye+(Ae.from==W.ch==(Ae.level!=1)?0:1);if(Ie==0||Ie==$.length)return R;var Ke;if(K.line!=W.line)Ke=(K.line-W.line)*(m.doc.direction=="ltr"?1:-1)>0;else{var dt=_e($,K.ch,K.sticky),bt=dt-ye||(K.ch-W.ch)*(Ae.level==1?-1:1);dt==Ie-1||dt==Ie?Ke=bt<0:Ke=bt>0}var Wt=$[Ie+(Ke?-1:0)],Nt=Ke==(Wt.level==1),en=Nt?Wt.from:Wt.to,cn=Nt?"after":"before";return W.ch==en&&W.sticky==cn?R:new Dt(new Vt(W.line,en,cn),K)}function Ki(m,R,W,K){var G,$;if(R.touches)G=R.touches[0].clientX,$=R.touches[0].clientY;else try{G=R.clientX,$=R.clientY}catch(Wt){return!1}if(G>=Math.floor(m.display.gutters.getBoundingClientRect().right))return!1;K&&ve(R);var ye=m.display,Ae=ye.lineDiv.getBoundingClientRect();if($>Ae.bottom||!Ne(m,W))return de(R);$-=Ae.top-ye.viewOffset;for(var Ie=0;Ie=G){var dt=Cn(m.doc,$),bt=m.display.gutterSpecs[Ie];return Ve(m,W,m,dt,bt.className,R),de(R)}}}function pr(m,R){return Ki(m,R,"gutterClick",!0)}function Ti(m,R){if(zo(m.display,R)||Ja(m,R))return;if(Je(m,R,"contextmenu"))return;O||m.display.input.onContextMenu(R)}function Ja(m,R){return Ne(m,"gutterContextMenu")?Ki(m,R,"gutterContextMenu",!1):!1}function _s(m){m.display.wrapper.className=m.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+m.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hr(m)}var fa={toString:function(){return"CodeMirror.Init"}},jo={},Js={};function kl(m){var R=m.optionHandlers;function W(K,G,$,ye){m.defaults[K]=G,$&&(R[K]=ye?function(Ae,Ie,Ke){Ke!=fa&&$(Ae,Ie,Ke)}:$)}m.defineOption=W,m.Init=fa,W("value","",function(K,G){return K.setValue(G)},!0),W("mode",null,function(K,G){K.doc.modeOption=G,mn(K)},!0),W("indentUnit",2,mn,!0),W("indentWithTabs",!1),W("smartIndent",!0),W("tabSize",4,function(K){nn(K),Hr(K),ji(K)},!0),W("lineSeparator",null,function(K,G){if(K.doc.lineSep=G,!G)return;var $=[],ye=K.doc.first;K.doc.iter(function(Ie){for(var Ke=0;;){var dt=Ie.text.indexOf(G,Ke);if(dt==-1)break;Ke=dt+G.length,$.push(Vt(ye,dt))}ye++});for(var Ae=$.length-1;Ae>=0;Ae--)_i(K.doc,G,$[Ae],Vt($[Ae].line,$[Ae].ch+G.length))}),W("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(K,G,$){K.state.specialChars=new RegExp(G.source+(G.test(" ")?"":"| "),"g"),$!=fa&&K.refresh()}),W("specialCharPlaceholder",gi,function(K){return K.refresh()},!0),W("electricChars",!0),W("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),W("spellcheck",!1,function(K,G){return K.getInputField().spellcheck=G},!0),W("autocorrect",!1,function(K,G){return K.getInputField().autocorrect=G},!0),W("autocapitalize",!1,function(K,G){return K.getInputField().autocapitalize=G},!0),W("rtlMoveVisually",!u),W("wholeLineUpdateBefore",!0),W("theme","default",function(K){_s(K),vt(K)},!0),W("keyMap","default",function(K,G,$){var ye=Ws(G),Ae=$!=fa&&Ws($);Ae&&Ae.detach&&Ae.detach(K,ye),ye.attach&&ye.attach(K,Ae||null)}),W("extraKeys",null),W("configureMouse",null),W("lineWrapping",!1,Ba,!0),W("gutters",[],function(K,G){K.display.gutterSpecs=At(G,K.options.lineNumbers),vt(K)},!0),W("fixedGutter",!0,function(K,G){K.display.gutters.style.left=G?$a(K.display)+"px":"0",K.refresh()},!0),W("coverGutterNextToScrollbar",!1,function(K){return Es(K)},!0),W("scrollbarStyle","native",function(K){Fs(K),Es(K),K.display.scrollbars.setScrollTop(K.doc.scrollTop),K.display.scrollbars.setScrollLeft(K.doc.scrollLeft)},!0),W("lineNumbers",!1,function(K,G){K.display.gutterSpecs=At(K.options.gutters,G),vt(K)},!0),W("firstLineNumber",1,vt,!0),W("lineNumberFormatter",function(K){return K},vt,!0),W("showCursorWhenSelecting",!1,Li,!0),W("resetSelectionOnContextMenu",!0),W("lineWiseCopyCut",!0),W("pasteLinesPerSelection",!0),W("selectionsMayTouch",!1),W("readOnly",!1,function(K,G){G=="nocursor"&&(ss(K),K.display.input.blur()),K.display.input.readOnlyChanged(G)}),W("screenReaderLabel",null,function(K,G){G=G===""?null:G,K.display.input.screenReaderLabelChanged(G)}),W("disableInput",!1,function(K,G){G||K.display.input.reset()},!0),W("dragDrop",!0,tu),W("allowDropFileTypes",null),W("cursorBlinkRate",530),W("cursorScrollMargin",0),W("cursorHeight",1,Li,!0),W("singleCursorHeightPerLine",!0,Li,!0),W("workTime",100),W("workDelay",100),W("flattenSpans",!0,nn,!0),W("addModeClass",!1,nn,!0),W("pollInterval",100),W("undoDepth",200,function(K,G){return K.doc.history.undoDepth=G}),W("historyEventDelay",1250),W("viewportMargin",10,function(K){return K.refresh()},!0),W("maxHighlightLength",1e4,nn,!0),W("moveInputWithCursor",!0,function(K,G){G||K.display.input.resetPosition()}),W("tabindex",null,function(K,G){return K.display.input.getField().tabIndex=G||""}),W("autofocus",null),W("direction","ltr",function(K,G){return K.doc.setDirection(G)},!0),W("phrases",null)}function tu(m,R,W){var K=W&&W!=fa;if(!R!=!K){var G=m.display.dragFunctions,$=R?Me:Oe;$(m.display.scroller,"dragstart",G.start),$(m.display.scroller,"dragenter",G.enter),$(m.display.scroller,"dragover",G.over),$(m.display.scroller,"dragleave",G.leave),$(m.display.scroller,"drop",G.drop)}}function Ba(m){m.options.lineWrapping?(X(m.display.wrapper,"CodeMirror-wrap"),m.display.sizer.style.minWidth="",m.display.sizerWidth=null):(w(m.display.wrapper,"CodeMirror-wrap"),To(m)),vo(m),ji(m),Hr(m),setTimeout(function(){return Es(m)},100)}function ua(m,R){var W=this;if(!(this instanceof ua))return new ua(m,R);this.options=R=R?L(R):{},L(jo,R,!1);var K=R.value;typeof K=="string"?K=new Dr(K,R.mode,null,R.lineSeparator,R.direction):R.mode&&(K.modeOption=R.mode),this.doc=K;var G=new ua.inputStyles[R.inputStyle](this),$=this.display=new at(m,K,G,R);$.wrapper.CodeMirror=this,_s(this),R.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Z,keySeq:null,specialChars:null},R.autofocus&&!d&&$.input.focus(),_&&p<11&&setTimeout(function(){return W.display.input.reset(!0)},20),Zl(this),xs(),es(this),this.curOp.forceUpdate=!0,pn(this,K),R.autofocus&&!d||this.hasFocus()?setTimeout(function(){W.hasFocus()&&!W.state.focused&&qo(W)},20):ss(this);for(var ye in Js)Js.hasOwnProperty(ye)&&Js[ye](this,R[ye],fa);it(this),R.finishInit&&R.finishInit(this);for(var Ae=0;Ae20*20}Me(R.scroller,"touchstart",function(Ie){if(!Je(m,Ie)&&!$(Ie)&&!pr(m,Ie)){R.input.ensurePolled(),clearTimeout(W);var Ke=+new Date;R.activeTouch={start:Ke,moved:!1,prev:Ke-K.end<=300?K:null},Ie.touches.length==1&&(R.activeTouch.left=Ie.touches[0].pageX,R.activeTouch.top=Ie.touches[0].pageY)}}),Me(R.scroller,"touchmove",function(){R.activeTouch&&(R.activeTouch.moved=!0)}),Me(R.scroller,"touchend",function(Ie){var Ke=R.activeTouch;if(Ke&&!zo(R,Ie)&&Ke.left!=null&&!Ke.moved&&new Date-Ke.start<300){var dt=m.coordsChar(R.activeTouch,"page"),bt;!Ke.prev||ye(Ke,Ke.prev)?bt=new Dt(dt,dt):!Ke.prev.prev||ye(Ke,Ke.prev.prev)?bt=m.findWordAt(dt):bt=new Dt(Vt(dt.line,0),V(m.doc,Vt(dt.line+1,0))),m.setSelection(bt.anchor,bt.head),m.focus(),ve(Ie)}G()}),Me(R.scroller,"touchcancel",G),Me(R.scroller,"scroll",function(){R.scroller.clientHeight&&(us(m,R.scroller.scrollTop),Do(m,R.scroller.scrollLeft,!0),Ve(m,"scroll",m))}),Me(R.scroller,"mousewheel",function(Ie){return Jt(m,Ie)}),Me(R.scroller,"DOMMouseScroll",function(Ie){return Jt(m,Ie)}),Me(R.wrapper,"scroll",function(){return R.wrapper.scrollTop=R.wrapper.scrollLeft=0}),R.dragFunctions={enter:function(Ie){Je(m,Ie)||je(Ie)},over:function(Ie){Je(m,Ie)||(ho(m,Ie),je(Ie))},start:function(Ie){return Fa(m,Ie)},drop:oa(m,Uo),leave:function(Ie){Je(m,Ie)||ts(m)}};var Ae=R.input.getField();Me(Ae,"keyup",function(Ie){return Vs.call(m,Ie)}),Me(Ae,"keydown",oa(m,Xl)),Me(Ae,"keypress",oa(m,Ys)),Me(Ae,"focus",function(Ie){return qo(m,Ie)}),Me(Ae,"blur",function(Ie){return ss(m,Ie)})}var Zs=[];ua.defineInitHook=function(m){return Zs.push(m)};function Is(m,R,W,K){var G=m.doc,$;W==null&&(W="add"),W=="smart"&&(G.mode.indent?$=Yt(m,R).state:W="prev");var ye=m.options.tabSize,Ae=$t(G,R),Ie=B(Ae.text,null,ye);Ae.stateAfter&&(Ae.stateAfter=null);var Ke=Ae.text.match(/^\s*/)[0],dt;if(!K&&!/\S/.test(Ae.text))dt=0,W="not";else if(W=="smart"&&(dt=G.mode.indent($,Ae.text.slice(Ke.length),Ae.text),dt==Se||dt>150)){if(!K)return;W="prev"}W=="prev"?R>G.first?dt=B($t(G,R-1).text,null,ye):dt=0:W=="add"?dt=Ie+m.options.indentUnit:W=="subtract"?dt=Ie-m.options.indentUnit:typeof W=="number"&&(dt=Ie+W),dt=Math.max(0,dt);var bt="",Wt=0;if(m.options.indentWithTabs)for(var Nt=Math.floor(dt/ye);Nt;--Nt)Wt+=ye,bt+=" ";if(Wtye,Ie=St(R),Ke=null;if(Ae&&K.ranges.length>1)if(Bo&&Bo.text.join(` +`)==R){if(K.ranges.length%Bo.text.length==0){Ke=[];for(var dt=0;dt=0;Wt--){var Nt=K.ranges[Wt],en=Nt.from(),cn=Nt.to();Nt.empty()&&(W&&W>0?en=Vt(en.line,en.ch-W):m.state.overwrite&&!Ae?cn=Vt(cn.line,Math.min($t($,cn.line).text.length,cn.ch+se(Ie).length)):Ae&&Bo&&Bo.lineWise&&Bo.text.join(` `)==Ie.join(` -`)&&(en=ln=Vt(en.line,0)));var xn={from:en,to:ln,text:Ke?Ke[Wt%Ke.length]:Ie,origin:G||(Ae?"paste":m.state.cutIncoming>ye?"cut":"+input")};Pa(m.doc,xn),tn(m,"inputRead",m,xn)}R&&!Ae&&ma(m,R),vs(m),m.curOp.updateInput<2&&(m.curOp.updateInput=yt),m.curOp.typing=!0,m.state.pasteIncoming=m.state.cutIncoming=-1}function Gl(m,R){var W=m.clipboardData&&m.clipboardData.getData("Text");if(W)return m.preventDefault(),!R.isReadOnly()&&!R.options.disableInput&&lo(R,function(){return ml(R,W,0,null,"paste")}),!0}function ma(m,R){if(!m.options.electricChars||!m.options.smartIndent)return;for(var W=m.doc.sel,K=W.ranges.length-1;K>=0;K--){var G=W.ranges[K];if(G.head.ch>100||K&&W.ranges[K-1].head.line==G.head.line)continue;var $=m.getModeAt(G.head),ye=!1;if($.electricChars){for(var Ae=0;Ae<$.electricChars.length;Ae++)if(R.indexOf($.electricChars.charAt(Ae))>-1){ye=Rs(m,G.head.line,"smart");break}}else $.electricInput&&($.electricInput.test($t(m.doc,G.head.line).text.slice(0,G.head.ch))&&(ye=Rs(m,G.head.line,"smart")));ye&&tn(m,"electricInput",m,G.head.line)}}function gl(m){for(var R=[],W=[],K=0;K$&&(Rs(this,Ae.head.line,K,!0),$=Ae.head.line,ye==this.doc.sel.primIndex&&vs(this));else{var Ie=Ae.from(),Ke=Ae.to(),dt=Math.max($,Ie.line);$=Math.min(this.lastLine(),Ke.line-(Ke.ch?0:1))+1;for(var yt=dt;yt<$;++yt)Rs(this,yt,K);var Wt=this.doc.sel.ranges;Ie.ch==0&&G.length==Wt.length&&Wt[ye].from().ch>0&&Li(this.doc,ye,new It(Ie,Wt[ye].to()),ke)}}}),getTokenAt:function(K,G){return lr(this,K,G)},getLineTokens:function(K,G){return lr(this,Vt(K),G,!0)},getTokenTypeAt:function(K){K=V(this.doc,K);var G=Lt(this,$t(this.doc,K.line)),$=0,ye=(G.length-1)/2,Ae=K.ch,Ie;if(Ae==0)Ie=G[2];else for(;;){var Ke=$+ye>>1;if((Ke?G[Ke*2-1]:0)>=Ae)ye=Ke;else if(G[Ke*2+1]Ie&&(K=Ie,ye=!0),Ae=$t(this.doc,K)}else Ae=K;return si(this,Ae,{top:0,left:0},G||"page",$||ye).top+(ye?this.doc.height-Ha(Ae):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Ta(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(K,G,$,ye,Ae){var Ie=this.display;K=Zr(this,V(this.doc,K));var Ke=K.bottom,dt=K.left;if(G.style.position="absolute",G.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(G),Ie.sizer.appendChild(G),ye=="over")Ke=K.top;else if(ye=="above"||ye=="near"){var yt=Math.max(Ie.wrapper.clientHeight,this.doc.height),Wt=Math.max(Ie.sizer.clientWidth,Ie.lineSpace.clientWidth);(ye=="above"||K.bottom+G.offsetHeight>yt)&&K.top>G.offsetHeight?Ke=K.top-G.offsetHeight:K.bottom+G.offsetHeight<=yt&&(Ke=K.bottom),dt+G.offsetWidth>Wt&&(dt=Wt-G.offsetWidth)}G.style.top=Ke+"px",G.style.left=G.style.right="",Ae=="right"?(dt=Ie.sizer.clientWidth-G.offsetWidth,G.style.right="0px"):(Ae=="left"?dt=0:Ae=="middle"&&(dt=(Ie.sizer.clientWidth-G.offsetWidth)/2),G.style.left=dt+"px"),$&&xl(this,{left:dt,top:Ke,right:dt+G.offsetWidth,bottom:Ke+G.offsetHeight})},triggerOnKeyDown:Xa(Xl),triggerOnKeyPress:Xa(Vs),triggerOnKeyUp:Gs,triggerOnMouseDown:Xa(jn),execCommand:function(K){if(_i.hasOwnProperty(K))return _i[K].call(null,this)},triggerElectric:Xa(function(K){ma(this,K)}),findPosH:function(K,G,$,ye){var Ae=1;G<0&&(Ae=-1,G=-G);for(var Ie=V(this.doc,K),Ke=0;Ke0&&dt($.charAt(ye-1));)--ye;for(;Ae<$.length&&dt($.charAt(Ae));)++Ae}return new It(Vt(K.line,ye),Vt(K.line,Ae))},toggleOverwrite:function(K){if(K!=null&&K==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?X(this.display.cursorDiv,"CodeMirror-overwrite"):w(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Xa(function(K,G){as(this,K,G)}),getScrollInfo:function(){var K=this.display.scroller;return{left:K.scrollLeft,top:K.scrollTop,height:K.scrollHeight-Rt(this)-this.display.barHeight,width:K.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Ue(this),clientWidth:ut(this)}},scrollIntoView:Xa(function(K,G){K==null?(K={from:this.doc.sel.primary().head,to:null},G==null&&(G=this.options.cursorScrollMargin)):typeof K=="number"?K={from:Vt(K,0),to:null}:K.from==null&&(K={from:K,to:null}),K.to||(K.to=K.from),K.margin=G||0,K.from.line!=null?Ul(this,K):Ts(this,K.from,K.to,K.margin)}),setSize:Xa(function(K,G){var $=this,ye=function(Ie){return typeof Ie=="number"||/^\d+$/.test(String(Ie))?Ie+"px":Ie};K!=null&&(this.display.wrapper.style.width=ye(K)),G!=null&&(this.display.wrapper.style.height=ye(G)),this.options.lineWrapping&&Mr(this);var Ae=this.display.viewFrom;this.doc.iter(Ae,this.display.viewTo,function(Ie){if(Ie.widgets){for(var Ke=0;Ke.5||this.options.lineWrapping)&&vo(this),Ve(this,"refresh",this)}),swapDoc:Xa(function(K){var G=this.doc;return G.cm=null,this.state.selectingText&&this.state.selectingText(),mn(this,K),Wr(this),this.display.input.reset(),as(this,K.scrollLeft,K.scrollTop),this.curOp.forceScroll=!0,tn(this,"swapDoc",this,G),G}),phrase:function(K){var G=this.options.phrases;return G&&Object.prototype.hasOwnProperty.call(G,K)?G[K]:K},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},He(m),m.registerHelper=function(K,G,$){W.hasOwnProperty(K)||(W[K]=m[K]={_global:[]}),W[K][G]=$},m.registerGlobalHelper=function(K,G,$,ye){m.registerHelper(K,G,ye),W[K]._global.push({pred:$,val:ye})}}function vl(m,R,W,K,G){var $=R,ye=W,Ae=$t(m,R.line),Ie=G&&m.direction=="rtl"?-W:W;function Ke(){var Yn=R.line+Ie;return Yn=m.first+m.size?!1:(R=new Vt(Yn,R.ch,R.sticky),Ae=$t(m,Yn))}function dt(Yn){var Nn;if(K=="codepoint"){var er=Ae.text.charCodeAt(R.ch+(K>0?0:-1));isNaN(er)?Nn=null:Nn=new Vt(R.line,Math.max(0,Math.min(Ae.text.length,R.ch+W*(er>=55296&&er<56320?2:1))),-W)}else G?Nn=Ur(m.cm,Ae,R,W):Nn=hl(Ae,R,W);if(Nn==null)if(!Yn&&Ke())R=fl(G,m.cm,Ae,R.line,Ie);else return!1;else R=Nn;return!0}if(K=="char"||K=="codepoint")dt();else if(K=="column")dt(!0);else if(K=="word"||K=="group")for(var yt=null,Wt=K=="group",Nt=m.cm&&m.cm.getHelper(R,"wordChars"),en=!0;!(W<0&&!dt(!en));en=!1){var ln=Ae.text.charAt(R.ch)||` -`,xn=Q(ln,Nt)?"w":Wt&&ln==` -`?"n":!Wt||/\s/.test(ln)?null:"p";if(Wt&&!en&&!xn&&(xn="s"),yt&&yt!=xn){W<0&&(W=1,dt(),R.sticky="after");break}if(xn&&(yt=xn),W>0&&!dt(!en))break}var Pn=ya(m,R,$,ye,!0);return $n($,Pn)&&(Pn.hitSide=!0),Pn}function Ql(m,R,W,K){var G=m.doc,$=R.left,ye;if(K=="page"){var Ae=Math.min(m.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ie=Math.max(Ae-.5*ha(m.display),3);ye=(W>0?R.bottom:R.top)+W*Ie}else K=="line"&&(ye=W>0?R.bottom+3:R.top-3);for(var Ke;!(Ke=ni(m,$,ye),!Ke.outside);){if(W<0?ye<=0:ye>=G.height){Ke.hitSide=!0;break}ye+=W*5}return Ke}var Di=function(m){this.cm=m,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Di.prototype.init=function(m){var R=this,W=this,K=W.cm,G=W.div=m.lineDiv;Vl(G,K.options.spellcheck,K.options.autocorrect,K.options.autocapitalize);function $(Ae){for(var Ie=Ae.target;Ie;Ie=Ie.parentNode){if(Ie==G)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ie.className))break}return!1}Me(G,"paste",function(Ae){if(!$(Ae)||Je(K,Ae)||Gl(Ae,K))return;p<=11&&setTimeout(sa(K,function(){return R.updateFromDOM()}),20)}),Me(G,"compositionstart",function(Ae){R.composing={data:Ae.data,done:!1}}),Me(G,"compositionupdate",function(Ae){R.composing||(R.composing={data:Ae.data,done:!1})}),Me(G,"compositionend",function(Ae){R.composing&&(Ae.data!=R.composing.data&&R.readFromDOMSoon(),R.composing.done=!0)}),Me(G,"touchstart",function(){return W.forceCompositionEnd()}),Me(G,"input",function(){R.composing||R.readFromDOMSoon()});function ye(Ae){if(!$(Ae)||Je(K,Ae))return;if(K.somethingSelected())Zs({lineWise:!1,text:K.getSelections()}),Ae.type=="cut"&&K.replaceSelection("",null,"cut");else if(K.options.lineWiseCopyCut){var Ie=gl(K);Zs({lineWise:!0,text:Ie.text}),Ae.type=="cut"&&K.operation(function(){K.setSelections(Ie.ranges,0,ke),K.replaceSelection("",null,"cut")})}else return;if(Ae.clipboardData){Ae.clipboardData.clearData();var Ke=Fo.text.join(` -`);if(Ae.clipboardData.setData("Text",Ke),Ae.clipboardData.getData("Text")==Ke){Ae.preventDefault();return}}var dt=kl(),yt=dt.firstChild;K.display.lineSpace.insertBefore(dt,K.display.lineSpace.firstChild),yt.value=Fo.text.join(` -`);var Wt=document.activeElement;F(yt),setTimeout(function(){K.display.lineSpace.removeChild(dt),Wt.focus(),Wt==G&&W.showPrimarySelection()},50)}Me(G,"copy",ye),Me(G,"cut",ye)},Di.prototype.screenReaderLabelChanged=function(m){m?this.div.setAttribute("aria-label",m):this.div.removeAttribute("aria-label")},Di.prototype.prepareSelection=function(){var m=Xo(this.cm,!1);return m.focus=document.activeElement==this.div,m},Di.prototype.showSelection=function(m,R){if(!m||!this.cm.display.view.length)return;(m.focus||R)&&this.showPrimarySelection(),this.showMultipleSelections(m)},Di.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Di.prototype.showPrimarySelection=function(){var m=this.getSelection(),R=this.cm,W=R.doc.sel.primary(),K=W.from(),G=W.to();if(R.display.viewTo==R.display.viewFrom||K.line>=R.display.viewTo||G.line=R.display.viewFrom&&Ll(R,K)||{node:Ae[0].measure.map[2],offset:0},Ke=G.linem.firstLine()&&(K=Vt(K.line-1,$t(m.doc,K.line-1).length)),G.ch==$t(m.doc,G.line).text.length&&G.lineR.viewTo-1)return!1;var $,ye,Ae;K.line==R.viewFrom||($=Gi(m,K.line))==0?(ye=sn(R.view[0].line),Ae=R.view[0].node):(ye=sn(R.view[$].line),Ae=R.view[$-1].node.nextSibling);var Ie=Gi(m,G.line),Ke,dt;if(Ie==R.view.length-1?(Ke=R.viewTo-1,dt=R.lineDiv.lastChild):(Ke=sn(R.view[Ie+1].line)-1,dt=R.view[Ie+1].node.previousSibling),!Ae)return!1;for(var yt=m.doc.splitLines(nu(m,Ae,dt,ye,Ke)),Wt=Ln(m.doc,Vt(ye,0),Vt(Ke,$t(m.doc,Ke).text.length));yt.length>1&&Wt.length>1;)if(se(yt)==se(Wt))yt.pop(),Wt.pop(),Ke--;else if(yt[0]==Wt[0])yt.shift(),Wt.shift(),ye++;else break;for(var Nt=0,en=0,ln=yt[0],xn=Wt[0],Pn=Math.min(ln.length,xn.length);NtK.ch&&Yn.charCodeAt(Yn.length-en-1)==Nn.charCodeAt(Nn.length-en-1);)Nt--,en++;yt[yt.length-1]=Yn.slice(0,Yn.length-en).replace(/^\u200b+/,""),yt[0]=yt[0].slice(Nt).replace(/\u200b+$/,"");var Cr=Vt(ye,Nt),mr=Vt(Ke,Wt.length?se(Wt).length-en:0);if(yt.length>1||yt[0]||wn(Cr,mr))return Va(m.doc,yt,Cr,mr,"+input"),!0},Di.prototype.ensurePolled=function(){this.forceCompositionEnd()},Di.prototype.reset=function(){this.forceCompositionEnd()},Di.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Di.prototype.readFromDOMSoon=function(){var m=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(m.readDOMTimeout=null,m.composing)if(m.composing.done)m.composing=null;else return;m.updateFromDOM()},80)},Di.prototype.updateFromDOM=function(){var m=this;(this.cm.isReadOnly()||!this.pollContent())&&lo(this.cm,function(){return ji(m.cm)})},Di.prototype.setUneditable=function(m){m.contentEditable="false"},Di.prototype.onKeyPress=function(m){if(m.charCode==0||this.composing)return;m.preventDefault(),this.cm.isReadOnly()||sa(this.cm,ml)(this.cm,String.fromCharCode(m.charCode==null?m.keyCode:m.charCode),0)},Di.prototype.readOnlyChanged=function(m){this.div.contentEditable=String(m!="nocursor")},Di.prototype.onContextMenu=function(){},Di.prototype.resetPosition=function(){},Di.prototype.needsContentAttribute=!0;function Ll(m,R){var W=Ot(m,R.line);if(!W||W.hidden)return null;var K=$t(m.doc,R.line),G=We(W,K,R.line),$=tt(K,m.doc.direction),ye="left";if($){var Ae=_e($,R.ch);ye=Ae%2?"right":"left"}var Ie=hn(G.map,R.ch,ye);return Ie.offset=Ie.collapse=="right"?Ie.end:Ie.start,Ie}function Jl(m){for(var R=m;R;R=R.parentNode)if(/CodeMirror-gutter-wrapper/.test(R.className))return!0;return!1}function xs(m,R){return R&&(m.bad=!0),m}function nu(m,R,W,K,G){var $="",ye=!1,Ae=m.doc.lineSeparator(),Ie=!1;function Ke(Nt){return function(en){return en.id==Nt}}function dt(){ye&&($+=Ae,Ie&&($+=Ae),ye=Ie=!1)}function yt(Nt){Nt&&(dt(),$+=Nt)}function Wt(Nt){if(Nt.nodeType==1){var en=Nt.getAttribute("cm-text");if(en){yt(en);return}var ln=Nt.getAttribute("cm-marker"),xn;if(ln){var Pn=m.findMarks(Vt(K,0),Vt(G+1,0),Ke(+ln));Pn.length&&(xn=Pn[0].find(0))&&yt(Ln(m.doc,xn.from,xn.to).join(Ae));return}if(Nt.getAttribute("contenteditable")=="false")return;var Yn=/^(pre|div|p|li|table|br)$/i.test(Nt.nodeName);if(!/^br$/i.test(Nt.nodeName)&&Nt.textContent.length==0)return;Yn&&dt();for(var Nn=0;Nn=9&&R.hasSelection&&(R.hasSelection=null),W.poll()}),Me(G,"paste",function(ye){if(Je(K,ye)||Gl(ye,K))return;K.state.pasteIncoming=+new Date,W.fastPoll()});function $(ye){if(Je(K,ye))return;if(K.somethingSelected())Zs({lineWise:!1,text:K.getSelections()});else if(K.options.lineWiseCopyCut){var Ae=gl(K);Zs({lineWise:!0,text:Ae.text}),ye.type=="cut"?K.setSelections(Ae.ranges,null,ke):(W.prevInput="",G.value=Ae.text.join(` -`),F(G))}else return;ye.type=="cut"&&(K.state.cutIncoming=+new Date)}Me(G,"cut",$),Me(G,"copy",$),Me(m.scroller,"paste",function(ye){if(Wo(m,ye)||Je(K,ye))return;if(!G.dispatchEvent){K.state.pasteIncoming=+new Date,W.focus();return}var Ae=new Event("paste");Ae.clipboardData=ye.clipboardData,G.dispatchEvent(Ae)}),Me(m.lineSpace,"selectstart",function(ye){Wo(m,ye)||ve(ye)}),Me(G,"compositionstart",function(){var ye=K.getCursor("from");W.composing&&W.composing.range.clear(),W.composing={start:ye,range:K.markText(ye,K.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(G,"compositionend",function(){W.composing&&(W.poll(),W.composing.range.clear(),W.composing=null)})},Ia.prototype.createField=function(m){this.wrapper=kl(),this.textarea=this.wrapper.firstChild},Ia.prototype.screenReaderLabelChanged=function(m){m?this.textarea.setAttribute("aria-label",m):this.textarea.removeAttribute("aria-label")},Ia.prototype.prepareSelection=function(){var m=this.cm,R=m.display,W=m.doc,K=Xo(m);if(m.options.moveInputWithCursor){var G=Zr(m,W.sel.primary().head,"div"),$=R.wrapper.getBoundingClientRect(),ye=R.lineDiv.getBoundingClientRect();K.teTop=Math.max(0,Math.min(R.wrapper.clientHeight-10,G.top+ye.top-$.top)),K.teLeft=Math.max(0,Math.min(R.wrapper.clientWidth-10,G.left+ye.left-$.left))}return K},Ia.prototype.showSelection=function(m){var R=this.cm,W=R.display;A(W.cursorDiv,m.cursors),A(W.selectionDiv,m.selection),m.teTop!=null&&(this.wrapper.style.top=m.teTop+"px",this.wrapper.style.left=m.teLeft+"px")},Ia.prototype.reset=function(m){if(this.contextMenuPending||this.composing)return;var R=this.cm;if(R.somethingSelected()){this.prevInput="";var W=R.getSelection();this.textarea.value=W,R.state.focused&&F(this.textarea),_&&p>=9&&(this.hasSelection=W)}else m||(this.prevInput=this.textarea.value="",_&&p>=9&&(this.hasSelection=null))},Ia.prototype.getField=function(){return this.textarea},Ia.prototype.supportsTouch=function(){return!1},Ia.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!d||z()!=this.textarea))try{this.textarea.focus()}catch(m){}},Ia.prototype.blur=function(){this.textarea.blur()},Ia.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ia.prototype.receivedFocus=function(){this.slowPoll()},Ia.prototype.slowPoll=function(){var m=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){m.poll(),m.cm.state.focused&&m.slowPoll()})},Ia.prototype.fastPoll=function(){var m=!1,R=this;R.pollingFast=!0;function W(){var K=R.poll();!K&&!m?(m=!0,R.polling.set(60,W)):(R.pollingFast=!1,R.slowPoll())}R.polling.set(20,W)},Ia.prototype.poll=function(){var m=this,R=this.cm,W=this.textarea,K=this.prevInput;if(this.contextMenuPending||!R.state.focused||pt(W)&&!K&&!this.composing||R.isReadOnly()||R.options.disableInput||R.state.keySeq)return!1;var G=W.value;if(G==K&&!R.somethingSelected())return!1;if(_&&p>=9&&this.hasSelection===G||f&&/[\uf700-\uf7ff]/.test(G))return R.display.input.reset(),!1;if(R.doc.sel==R.display.selForContextMenu){var $=G.charCodeAt(0);if($==8203&&!K&&(K="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Ae=Math.min(K.length,G.length);ye1e3||G.indexOf(` -`)>-1?W.value=m.prevInput="":m.prevInput=G,m.composing&&(m.composing.range.clear(),m.composing.range=R.markText(m.composing.start,R.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ia.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ia.prototype.onKeyPress=function(){_&&p>=9&&(this.hasSelection=null),this.fastPoll()},Ia.prototype.onContextMenu=function(m){var R=this,W=R.cm,K=W.display,G=R.textarea;R.contextMenuPending&&R.contextMenuPending();var $=Aa(W,m),ye=K.scroller.scrollTop;if(!$||l)return;var Ae=W.options.resetSelectionOnContextMenu;Ae&&W.doc.sel.contains($)==-1&&sa(W,mi)(W.doc,qt($),ke);var Ie=G.style.cssText,Ke=R.wrapper.style.cssText,dt=R.wrapper.offsetParent.getBoundingClientRect();R.wrapper.style.cssText="position: static",G.style.cssText=`position: absolute; width: 30px; height: 30px; +`)&&(en=cn=Vt(en.line,0)));var En={from:en,to:cn,text:Ke?Ke[Wt%Ke.length]:Ie,origin:G||(Ae?"paste":m.state.cutIncoming>ye?"cut":"+input")};Na(m.doc,En),tn(m,"inputRead",m,En)}R&&!Ae&&pa(m,R),ys(m),m.curOp.updateInput<2&&(m.curOp.updateInput=bt),m.curOp.typing=!0,m.state.pasteIncoming=m.state.cutIncoming=-1}function Gl(m,R){var W=m.clipboardData&&m.clipboardData.getData("Text");if(W)return m.preventDefault(),!R.isReadOnly()&&!R.options.disableInput&&ao(R,function(){return gl(R,W,0,null,"paste")}),!0}function pa(m,R){if(!m.options.electricChars||!m.options.smartIndent)return;for(var W=m.doc.sel,K=W.ranges.length-1;K>=0;K--){var G=W.ranges[K];if(G.head.ch>100||K&&W.ranges[K-1].head.line==G.head.line)continue;var $=m.getModeAt(G.head),ye=!1;if($.electricChars){for(var Ae=0;Ae<$.electricChars.length;Ae++)if(R.indexOf($.electricChars.charAt(Ae))>-1){ye=Is(m,G.head.line,"smart");break}}else $.electricInput&&($.electricInput.test($t(m.doc,G.head.line).text.slice(0,G.head.ch))&&(ye=Is(m,G.head.line,"smart")));ye&&tn(m,"electricInput",m,G.head.line)}}function vl(m){for(var R=[],W=[],K=0;K$&&(Is(this,Ae.head.line,K,!0),$=Ae.head.line,ye==this.doc.sel.primIndex&&ys(this));else{var Ie=Ae.from(),Ke=Ae.to(),dt=Math.max($,Ie.line);$=Math.min(this.lastLine(),Ke.line-(Ke.ch?0:1))+1;for(var bt=dt;bt<$;++bt)Is(this,bt,K);var Wt=this.doc.sel.ranges;Ie.ch==0&&G.length==Wt.length&&Wt[ye].from().ch>0&&Mi(this.doc,ye,new Dt(Ie,Wt[ye].to()),ke)}}}),getTokenAt:function(K,G){return lr(this,K,G)},getLineTokens:function(K,G){return lr(this,Vt(K),G,!0)},getTokenTypeAt:function(K){K=V(this.doc,K);var G=kt(this,$t(this.doc,K.line)),$=0,ye=(G.length-1)/2,Ae=K.ch,Ie;if(Ae==0)Ie=G[2];else for(;;){var Ke=$+ye>>1;if((Ke?G[Ke*2-1]:0)>=Ae)ye=Ke;else if(G[Ke*2+1]Ie&&(K=Ie,ye=!0),Ae=$t(this.doc,K)}else Ae=K;return ui(this,Ae,{top:0,left:0},G||"page",$||ye).top+(ye?this.doc.height-Xa(Ae):0)},defaultTextHeight:function(){return da(this.display)},defaultCharWidth:function(){return Aa(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(K,G,$,ye,Ae){var Ie=this.display;K=qr(this,V(this.doc,K));var Ke=K.bottom,dt=K.left;if(G.style.position="absolute",G.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(G),Ie.sizer.appendChild(G),ye=="over")Ke=K.top;else if(ye=="above"||ye=="near"){var bt=Math.max(Ie.wrapper.clientHeight,this.doc.height),Wt=Math.max(Ie.sizer.clientWidth,Ie.lineSpace.clientWidth);(ye=="above"||K.bottom+G.offsetHeight>bt)&&K.top>G.offsetHeight?Ke=K.top-G.offsetHeight:K.bottom+G.offsetHeight<=bt&&(Ke=K.bottom),dt+G.offsetWidth>Wt&&(dt=Wt-G.offsetWidth)}G.style.top=Ke+"px",G.style.left=G.style.right="",Ae=="right"?(dt=Ie.sizer.clientWidth-G.offsetWidth,G.style.right="0px"):(Ae=="left"?dt=0:Ae=="middle"&&(dt=(Ie.sizer.clientWidth-G.offsetWidth)/2),G.style.left=dt+"px"),$&&wl(this,{left:dt,top:Ke,right:dt+G.offsetWidth,bottom:Ke+G.offsetHeight})},triggerOnKeyDown:Ga(Xl),triggerOnKeyPress:Ga(Ys),triggerOnKeyUp:Vs,triggerOnMouseDown:Ga(jn),execCommand:function(K){if(yi.hasOwnProperty(K))return yi[K].call(null,this)},triggerElectric:Ga(function(K){pa(this,K)}),findPosH:function(K,G,$,ye){var Ae=1;G<0&&(Ae=-1,G=-G);for(var Ie=V(this.doc,K),Ke=0;Ke0&&dt($.charAt(ye-1));)--ye;for(;Ae<$.length&&dt($.charAt(Ae));)++Ae}return new Dt(Vt(K.line,ye),Vt(K.line,Ae))},toggleOverwrite:function(K){if(K!=null&&K==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?X(this.display.cursorDiv,"CodeMirror-overwrite"):w(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ga(function(K,G){ls(this,K,G)}),getScrollInfo:function(){var K=this.display.scroller;return{left:K.scrollLeft,top:K.scrollTop,height:K.scrollHeight-Rt(this)-this.display.barHeight,width:K.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Ue(this),clientWidth:ut(this)}},scrollIntoView:Ga(function(K,G){K==null?(K={from:this.doc.sel.primary().head,to:null},G==null&&(G=this.options.cursorScrollMargin)):typeof K=="number"?K={from:Vt(K,0),to:null}:K.from==null&&(K={from:K,to:null}),K.to||(K.to=K.from),K.margin=G||0,K.from.line!=null?Fl(this,K):Rs(this,K.from,K.to,K.margin)}),setSize:Ga(function(K,G){var $=this,ye=function(Ie){return typeof Ie=="number"||/^\d+$/.test(String(Ie))?Ie+"px":Ie};K!=null&&(this.display.wrapper.style.width=ye(K)),G!=null&&(this.display.wrapper.style.height=ye(G)),this.options.lineWrapping&&Pr(this);var Ae=this.display.viewFrom;this.doc.iter(Ae,this.display.viewTo,function(Ie){if(Ie.widgets){for(var Ke=0;Ke.5||this.options.lineWrapping)&&vo(this),Ve(this,"refresh",this)}),swapDoc:Ga(function(K){var G=this.doc;return G.cm=null,this.state.selectingText&&this.state.selectingText(),pn(this,K),Hr(this),this.display.input.reset(),ls(this,K.scrollLeft,K.scrollTop),this.curOp.forceScroll=!0,tn(this,"swapDoc",this,G),G}),phrase:function(K){var G=this.options.phrases;return G&&Object.prototype.hasOwnProperty.call(G,K)?G[K]:K},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},He(m),m.registerHelper=function(K,G,$){W.hasOwnProperty(K)||(W[K]=m[K]={_global:[]}),W[K][G]=$},m.registerGlobalHelper=function(K,G,$,ye){m.registerHelper(K,G,ye),W[K]._global.push({pred:$,val:ye})}}function _l(m,R,W,K,G){var $=R,ye=W,Ae=$t(m,R.line),Ie=G&&m.direction=="rtl"?-W:W;function Ke(){var Yn=R.line+Ie;return Yn=m.first+m.size?!1:(R=new Vt(Yn,R.ch,R.sticky),Ae=$t(m,Yn))}function dt(Yn){var Fn;if(K=="codepoint"){var tr=Ae.text.charCodeAt(R.ch+(K>0?0:-1));isNaN(tr)?Fn=null:Fn=new Vt(R.line,Math.max(0,Math.min(Ae.text.length,R.ch+W*(tr>=55296&&tr<56320?2:1))),-W)}else G?Fn=Ur(m.cm,Ae,R,W):Fn=fl(Ae,R,W);if(Fn==null)if(!Yn&&Ke())R=pl(G,m.cm,Ae,R.line,Ie);else return!1;else R=Fn;return!0}if(K=="char"||K=="codepoint")dt();else if(K=="column")dt(!0);else if(K=="word"||K=="group")for(var bt=null,Wt=K=="group",Nt=m.cm&&m.cm.getHelper(R,"wordChars"),en=!0;!(W<0&&!dt(!en));en=!1){var cn=Ae.text.charAt(R.ch)||` +`,En=Q(cn,Nt)?"w":Wt&&cn==` +`?"n":!Wt||/\s/.test(cn)?null:"p";if(Wt&&!en&&!En&&(En="s"),bt&&bt!=En){W<0&&(W=1,dt(),R.sticky="after");break}if(En&&(bt=En),W>0&&!dt(!en))break}var Un=_a(m,R,$,ye,!0);return er($,Un)&&(Un.hitSide=!0),Un}function Ql(m,R,W,K){var G=m.doc,$=R.left,ye;if(K=="page"){var Ae=Math.min(m.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ie=Math.max(Ae-.5*da(m.display),3);ye=(W>0?R.bottom:R.top)+W*Ie}else K=="line"&&(ye=W>0?R.bottom+3:R.top-3);for(var Ke;!(Ke=ri(m,$,ye),!Ke.outside);){if(W<0?ye<=0:ye>=G.height){Ke.hitSide=!0;break}ye+=W*5}return Ke}var Ii=function(m){this.cm=m,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ii.prototype.init=function(m){var R=this,W=this,K=W.cm,G=W.div=m.lineDiv;Vl(G,K.options.spellcheck,K.options.autocorrect,K.options.autocapitalize);function $(Ae){for(var Ie=Ae.target;Ie;Ie=Ie.parentNode){if(Ie==G)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ie.className))break}return!1}Me(G,"paste",function(Ae){if(!$(Ae)||Je(K,Ae)||Gl(Ae,K))return;p<=11&&setTimeout(oa(K,function(){return R.updateFromDOM()}),20)}),Me(G,"compositionstart",function(Ae){R.composing={data:Ae.data,done:!1}}),Me(G,"compositionupdate",function(Ae){R.composing||(R.composing={data:Ae.data,done:!1})}),Me(G,"compositionend",function(Ae){R.composing&&(Ae.data!=R.composing.data&&R.readFromDOMSoon(),R.composing.done=!0)}),Me(G,"touchstart",function(){return W.forceCompositionEnd()}),Me(G,"input",function(){R.composing||R.readFromDOMSoon()});function ye(Ae){if(!$(Ae)||Je(K,Ae))return;if(K.somethingSelected())$s({lineWise:!1,text:K.getSelections()}),Ae.type=="cut"&&K.replaceSelection("",null,"cut");else if(K.options.lineWiseCopyCut){var Ie=vl(K);$s({lineWise:!0,text:Ie.text}),Ae.type=="cut"&&K.operation(function(){K.setSelections(Ie.ranges,0,ke),K.replaceSelection("",null,"cut")})}else return;if(Ae.clipboardData){Ae.clipboardData.clearData();var Ke=Bo.text.join(` +`);if(Ae.clipboardData.setData("Text",Ke),Ae.clipboardData.getData("Text")==Ke){Ae.preventDefault();return}}var dt=Ll(),bt=dt.firstChild;K.display.lineSpace.insertBefore(dt,K.display.lineSpace.firstChild),bt.value=Bo.text.join(` +`);var Wt=document.activeElement;F(bt),setTimeout(function(){K.display.lineSpace.removeChild(dt),Wt.focus(),Wt==G&&W.showPrimarySelection()},50)}Me(G,"copy",ye),Me(G,"cut",ye)},Ii.prototype.screenReaderLabelChanged=function(m){m?this.div.setAttribute("aria-label",m):this.div.removeAttribute("aria-label")},Ii.prototype.prepareSelection=function(){var m=Go(this.cm,!1);return m.focus=document.activeElement==this.div,m},Ii.prototype.showSelection=function(m,R){if(!m||!this.cm.display.view.length)return;(m.focus||R)&&this.showPrimarySelection(),this.showMultipleSelections(m)},Ii.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ii.prototype.showPrimarySelection=function(){var m=this.getSelection(),R=this.cm,W=R.doc.sel.primary(),K=W.from(),G=W.to();if(R.display.viewTo==R.display.viewFrom||K.line>=R.display.viewTo||G.line=R.display.viewFrom&&Ml(R,K)||{node:Ae[0].measure.map[2],offset:0},Ke=G.linem.firstLine()&&(K=Vt(K.line-1,$t(m.doc,K.line-1).length)),G.ch==$t(m.doc,G.line).text.length&&G.lineR.viewTo-1)return!1;var $,ye,Ae;K.line==R.viewFrom||($=zi(m,K.line))==0?(ye=on(R.view[0].line),Ae=R.view[0].node):(ye=on(R.view[$].line),Ae=R.view[$-1].node.nextSibling);var Ie=zi(m,G.line),Ke,dt;if(Ie==R.view.length-1?(Ke=R.viewTo-1,dt=R.lineDiv.lastChild):(Ke=on(R.view[Ie+1].line)-1,dt=R.view[Ie+1].node.previousSibling),!Ae)return!1;for(var bt=m.doc.splitLines(nu(m,Ae,dt,ye,Ke)),Wt=Pn(m.doc,Vt(ye,0),Vt(Ke,$t(m.doc,Ke).text.length));bt.length>1&&Wt.length>1;)if(se(bt)==se(Wt))bt.pop(),Wt.pop(),Ke--;else if(bt[0]==Wt[0])bt.shift(),Wt.shift(),ye++;else break;for(var Nt=0,en=0,cn=bt[0],En=Wt[0],Un=Math.min(cn.length,En.length);NtK.ch&&Yn.charCodeAt(Yn.length-en-1)==Fn.charCodeAt(Fn.length-en-1);)Nt--,en++;bt[bt.length-1]=Yn.slice(0,Yn.length-en).replace(/^\u200b+/,""),bt[0]=bt[0].slice(Nt).replace(/\u200b+$/,"");var Tr=Vt(ye,Nt),mr=Vt(Ke,Wt.length?se(Wt).length-en:0);if(bt.length>1||bt[0]||xn(Tr,mr))return _i(m.doc,bt,Tr,mr,"+input"),!0},Ii.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ii.prototype.reset=function(){this.forceCompositionEnd()},Ii.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Ii.prototype.readFromDOMSoon=function(){var m=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(m.readDOMTimeout=null,m.composing)if(m.composing.done)m.composing=null;else return;m.updateFromDOM()},80)},Ii.prototype.updateFromDOM=function(){var m=this;(this.cm.isReadOnly()||!this.pollContent())&&ao(this.cm,function(){return ji(m.cm)})},Ii.prototype.setUneditable=function(m){m.contentEditable="false"},Ii.prototype.onKeyPress=function(m){if(m.charCode==0||this.composing)return;m.preventDefault(),this.cm.isReadOnly()||oa(this.cm,gl)(this.cm,String.fromCharCode(m.charCode==null?m.keyCode:m.charCode),0)},Ii.prototype.readOnlyChanged=function(m){this.div.contentEditable=String(m!="nocursor")},Ii.prototype.onContextMenu=function(){},Ii.prototype.resetPosition=function(){},Ii.prototype.needsContentAttribute=!0;function Ml(m,R){var W=Ot(m,R.line);if(!W||W.hidden)return null;var K=$t(m.doc,R.line),G=We(W,K,R.line),$=tt(K,m.doc.direction),ye="left";if($){var Ae=_e($,R.ch);ye=Ae%2?"right":"left"}var Ie=dn(G.map,R.ch,ye);return Ie.offset=Ie.collapse=="right"?Ie.end:Ie.start,Ie}function Jl(m){for(var R=m;R;R=R.parentNode)if(/CodeMirror-gutter-wrapper/.test(R.className))return!0;return!1}function Cs(m,R){return R&&(m.bad=!0),m}function nu(m,R,W,K,G){var $="",ye=!1,Ae=m.doc.lineSeparator(),Ie=!1;function Ke(Nt){return function(en){return en.id==Nt}}function dt(){ye&&($+=Ae,Ie&&($+=Ae),ye=Ie=!1)}function bt(Nt){Nt&&(dt(),$+=Nt)}function Wt(Nt){if(Nt.nodeType==1){var en=Nt.getAttribute("cm-text");if(en){bt(en);return}var cn=Nt.getAttribute("cm-marker"),En;if(cn){var Un=m.findMarks(Vt(K,0),Vt(G+1,0),Ke(+cn));Un.length&&(En=Un[0].find(0))&&bt(Pn(m.doc,En.from,En.to).join(Ae));return}if(Nt.getAttribute("contenteditable")=="false")return;var Yn=/^(pre|div|p|li|table|br)$/i.test(Nt.nodeName);if(!/^br$/i.test(Nt.nodeName)&&Nt.textContent.length==0)return;Yn&&dt();for(var Fn=0;Fn=9&&R.hasSelection&&(R.hasSelection=null),W.poll()}),Me(G,"paste",function(ye){if(Je(K,ye)||Gl(ye,K))return;K.state.pasteIncoming=+new Date,W.fastPoll()});function $(ye){if(Je(K,ye))return;if(K.somethingSelected())$s({lineWise:!1,text:K.getSelections()});else if(K.options.lineWiseCopyCut){var Ae=vl(K);$s({lineWise:!0,text:Ae.text}),ye.type=="cut"?K.setSelections(Ae.ranges,null,ke):(W.prevInput="",G.value=Ae.text.join(` +`),F(G))}else return;ye.type=="cut"&&(K.state.cutIncoming=+new Date)}Me(G,"cut",$),Me(G,"copy",$),Me(m.scroller,"paste",function(ye){if(zo(m,ye)||Je(K,ye))return;if(!G.dispatchEvent){K.state.pasteIncoming=+new Date,W.focus();return}var Ae=new Event("paste");Ae.clipboardData=ye.clipboardData,G.dispatchEvent(Ae)}),Me(m.lineSpace,"selectstart",function(ye){zo(m,ye)||ve(ye)}),Me(G,"compositionstart",function(){var ye=K.getCursor("from");W.composing&&W.composing.range.clear(),W.composing={start:ye,range:K.markText(ye,K.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(G,"compositionend",function(){W.composing&&(W.poll(),W.composing.range.clear(),W.composing=null)})},ka.prototype.createField=function(m){this.wrapper=Ll(),this.textarea=this.wrapper.firstChild},ka.prototype.screenReaderLabelChanged=function(m){m?this.textarea.setAttribute("aria-label",m):this.textarea.removeAttribute("aria-label")},ka.prototype.prepareSelection=function(){var m=this.cm,R=m.display,W=m.doc,K=Go(m);if(m.options.moveInputWithCursor){var G=qr(m,W.sel.primary().head,"div"),$=R.wrapper.getBoundingClientRect(),ye=R.lineDiv.getBoundingClientRect();K.teTop=Math.max(0,Math.min(R.wrapper.clientHeight-10,G.top+ye.top-$.top)),K.teLeft=Math.max(0,Math.min(R.wrapper.clientWidth-10,G.left+ye.left-$.left))}return K},ka.prototype.showSelection=function(m){var R=this.cm,W=R.display;A(W.cursorDiv,m.cursors),A(W.selectionDiv,m.selection),m.teTop!=null&&(this.wrapper.style.top=m.teTop+"px",this.wrapper.style.left=m.teLeft+"px")},ka.prototype.reset=function(m){if(this.contextMenuPending||this.composing)return;var R=this.cm;if(R.somethingSelected()){this.prevInput="";var W=R.getSelection();this.textarea.value=W,R.state.focused&&F(this.textarea),_&&p>=9&&(this.hasSelection=W)}else m||(this.prevInput=this.textarea.value="",_&&p>=9&&(this.hasSelection=null))},ka.prototype.getField=function(){return this.textarea},ka.prototype.supportsTouch=function(){return!1},ka.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!d||z()!=this.textarea))try{this.textarea.focus()}catch(m){}},ka.prototype.blur=function(){this.textarea.blur()},ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ka.prototype.receivedFocus=function(){this.slowPoll()},ka.prototype.slowPoll=function(){var m=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){m.poll(),m.cm.state.focused&&m.slowPoll()})},ka.prototype.fastPoll=function(){var m=!1,R=this;R.pollingFast=!0;function W(){var K=R.poll();!K&&!m?(m=!0,R.polling.set(60,W)):(R.pollingFast=!1,R.slowPoll())}R.polling.set(20,W)},ka.prototype.poll=function(){var m=this,R=this.cm,W=this.textarea,K=this.prevInput;if(this.contextMenuPending||!R.state.focused||pt(W)&&!K&&!this.composing||R.isReadOnly()||R.options.disableInput||R.state.keySeq)return!1;var G=W.value;if(G==K&&!R.somethingSelected())return!1;if(_&&p>=9&&this.hasSelection===G||f&&/[\uf700-\uf7ff]/.test(G))return R.display.input.reset(),!1;if(R.doc.sel==R.display.selForContextMenu){var $=G.charCodeAt(0);if($==8203&&!K&&(K="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Ae=Math.min(K.length,G.length);ye1e3||G.indexOf(` +`)>-1?W.value=m.prevInput="":m.prevInput=G,m.composing&&(m.composing.range.clear(),m.composing.range=R.markText(m.composing.start,R.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ka.prototype.onKeyPress=function(){_&&p>=9&&(this.hasSelection=null),this.fastPoll()},ka.prototype.onContextMenu=function(m){var R=this,W=R.cm,K=W.display,G=R.textarea;R.contextMenuPending&&R.contextMenuPending();var $=Oa(W,m),ye=K.scroller.scrollTop;if(!$||l)return;var Ae=W.options.resetSelectionOnContextMenu;Ae&&W.doc.sel.contains($)==-1&&oa(W,pi)(W.doc,qt($),ke);var Ie=G.style.cssText,Ke=R.wrapper.style.cssText,dt=R.wrapper.offsetParent.getBoundingClientRect();R.wrapper.style.cssText="position: static",G.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(m.clientY-dt.top-5)+"px; left: "+(m.clientX-dt.left-5)+`px; z-index: 1000; background: `+(_?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var yt;e&&(yt=window.scrollY),K.input.focus(),e&&window.scrollTo(null,yt),K.input.reset(),W.somethingSelected()||(G.value=R.prevInput=" "),R.contextMenuPending=Nt,K.selForContextMenu=W.doc.sel,clearTimeout(K.detectingSelectAll);function Wt(){if(G.selectionStart!=null){var ln=W.somethingSelected(),xn="\u200B"+(ln?G.value:"");G.value="\u21DA",G.value=xn,R.prevInput=ln?"":"\u200B",G.selectionStart=1,G.selectionEnd=xn.length,K.selForContextMenu=W.doc.sel}}function Nt(){if(R.contextMenuPending!=Nt)return;if(R.contextMenuPending=!1,R.wrapper.style.cssText=Ke,G.style.cssText=Ie,_&&p<9&&K.scrollbars.setScrollTop(K.scroller.scrollTop=ye),G.selectionStart!=null){(!_||_&&p<9)&&Wt();var ln=0,xn=function(){K.selForContextMenu==W.doc.sel&&G.selectionStart==0&&G.selectionEnd>0&&R.prevInput=="\u200B"?sa(W,ho)(W):ln++<10?K.detectingSelectAll=setTimeout(xn,500):(K.selForContextMenu=null,K.input.reset())};K.detectingSelectAll=setTimeout(xn,200)}}if(_&&p>=9&&Wt(),O){je(m);var en=function(){Oe(window,"mouseup",en),setTimeout(Nt,20)};Me(window,"mouseup",en)}else setTimeout(Nt,50)},Ia.prototype.readOnlyChanged=function(m){m||this.reset(),this.textarea.disabled=m=="nocursor",this.textarea.readOnly=!!m},Ia.prototype.setUneditable=function(){},Ia.prototype.needsContentAttribute=!1;function iu(m,R){if(R=R?L(R):{},R.value=m.value,!R.tabindex&&m.tabIndex&&(R.tabindex=m.tabIndex),!R.placeholder&&m.placeholder&&(R.placeholder=m.placeholder),R.autofocus==null){var W=z();R.autofocus=W==m||m.getAttribute("autofocus")!=null&&W==document.body}function K(){m.value=Ae.getValue()}var G;if(m.form&&(Me(m.form,"submit",K),!R.leaveSubmitMethodAlone)){var $=m.form;G=$.submit;try{var ye=$.submit=function(){K(),$.submit=G,$.submit(),$.submit=ye}}catch(Ie){}}R.finishInit=function(Ie){Ie.save=K,Ie.getTextArea=function(){return m},Ie.toTextArea=function(){Ie.toTextArea=isNaN,K(),m.parentNode.removeChild(Ie.getWrapperElement()),m.style.display="",m.form&&(Oe(m.form,"submit",K),!R.leaveSubmitMethodAlone&&typeof m.form.submit=="function"&&(m.form.submit=G))}},m.style.display="none";var Ae=ca(function(Ie){return m.parentNode.insertBefore(Ie,m.nextSibling)},R);return Ae}function au(m){m.off=Oe,m.on=Me,m.wheelEventPixels=St,m.Doc=Er,m.splitLines=wt,m.countColumn=B,m.findColumn=Ce,m.isWordChar=q,m.Pass=Se,m.signal=Ve,m.Line=Wa,m.changeEnd=un,m.scrollbarModel=wl,m.Pos=Vt,m.cmpPos=wn,m.modes=Et,m.mimeModes=ht,m.resolveMode=mt,m.getMode=Xt,m.modeExtensions=jt,m.extendMode=Ut,m.copyState=kt,m.startState=rn,m.innerMode=Kt,m.commands=_i,m.keyMap=yo,m.keyName=Ol,m.isModifierKey=bs,m.lookupKey=ns,m.normalizeKeyMap=cl,m.StringStream=Gt,m.SharedTextMarker=Bi,m.TextMarker=Pr,m.LineWidget=wa,m.e_preventDefault=ve,m.e_stopPropagation=xe,m.e_stop=je,m.addClass=X,m.contains=P,m.rmClass=w,m.keyNames=es}Il(ca),Yl(ca);var ou="iter insert remove copy getEditor constructor".split(" ");for(var ql in Er.prototype)Er.prototype.hasOwnProperty(ql)&&re(ou,ql)<0&&(ca.prototype[ql]=function(m){return function(){return m.apply(this.doc,arguments)}}(Er.prototype[ql]));return He(Er),ca.inputStyles={textarea:Ia,contenteditable:Di},ca.defineMode=function(m){!ca.defaults.mode&&m!="null"&&(ca.defaults.mode=m),Bt.apply(this,arguments)},ca.defineMIME=Ht,ca.defineMode("null",function(){return{token:function(m){return m.skipToEnd()}}}),ca.defineMIME("text/plain","null"),ca.defineExtension=function(m,R){ca.prototype[m]=R},ca.defineDocExtension=function(m,R){Er.prototype[m]=R},ca.fromTextArea=iu,au(ca),ca.version="5.58.2",ca})},W6BS:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WYAk:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){(function(){var v=I,T=v.lib,y=T.Base,g=v.enc,s=g.Utf8,_=v.algo,p=_.HMAC=y.extend({init:function(e,o){e=this._hasher=new e.init,typeof o=="string"&&(o=s.parse(o));var n=e.blockSize,l=n*4;o.sigBytes>l&&(o=e.finalize(o)),o.clamp();for(var r=this._oKey=o.clone(),i=this._iKey=o.clone(),t=r.words,a=i.words,c=0;c0&&R.prevInput=="\u200B"?oa(W,lo)(W):cn++<10?K.detectingSelectAll=setTimeout(En,500):(K.selForContextMenu=null,K.input.reset())};K.detectingSelectAll=setTimeout(En,200)}}if(_&&p>=9&&Wt(),O){je(m);var en=function(){Oe(window,"mouseup",en),setTimeout(Nt,20)};Me(window,"mouseup",en)}else setTimeout(Nt,50)},ka.prototype.readOnlyChanged=function(m){m||this.reset(),this.textarea.disabled=m=="nocursor",this.textarea.readOnly=!!m},ka.prototype.setUneditable=function(){},ka.prototype.needsContentAttribute=!1;function iu(m,R){if(R=R?L(R):{},R.value=m.value,!R.tabindex&&m.tabIndex&&(R.tabindex=m.tabIndex),!R.placeholder&&m.placeholder&&(R.placeholder=m.placeholder),R.autofocus==null){var W=z();R.autofocus=W==m||m.getAttribute("autofocus")!=null&&W==document.body}function K(){m.value=Ae.getValue()}var G;if(m.form&&(Me(m.form,"submit",K),!R.leaveSubmitMethodAlone)){var $=m.form;G=$.submit;try{var ye=$.submit=function(){K(),$.submit=G,$.submit(),$.submit=ye}}catch(Ie){}}R.finishInit=function(Ie){Ie.save=K,Ie.getTextArea=function(){return m},Ie.toTextArea=function(){Ie.toTextArea=isNaN,K(),m.parentNode.removeChild(Ie.getWrapperElement()),m.style.display="",m.form&&(Oe(m.form,"submit",K),!R.leaveSubmitMethodAlone&&typeof m.form.submit=="function"&&(m.form.submit=G))}},m.style.display="none";var Ae=ua(function(Ie){return m.parentNode.insertBefore(Ie,m.nextSibling)},R);return Ae}function au(m){m.off=Oe,m.on=Me,m.wheelEventPixels=yt,m.Doc=Dr,m.splitLines=St,m.countColumn=B,m.findColumn=Ce,m.isWordChar=q,m.Pass=Se,m.signal=Ve,m.Line=za,m.changeEnd=un,m.scrollbarModel=Sl,m.Pos=Vt,m.cmpPos=xn,m.modes=xt,m.mimeModes=ht,m.resolveMode=gt,m.getMode=Xt,m.modeExtensions=jt,m.extendMode=Ut,m.copyState=It,m.startState=rn,m.innerMode=Kt,m.commands=yi,m.keyMap=bo,m.keyName=Rl,m.isModifierKey=ws,m.lookupKey=as,m.normalizeKeyMap=dl,m.StringStream=zt,m.SharedTextMarker=ba,m.TextMarker=co,m.LineWidget=ya,m.e_preventDefault=ve,m.e_stopPropagation=xe,m.e_stop=je,m.addClass=X,m.contains=P,m.rmClass=w,m.keyNames=rs}kl(ua),Yl(ua);var ou="iter insert remove copy getEditor constructor".split(" ");for(var ql in Dr.prototype)Dr.prototype.hasOwnProperty(ql)&&re(ou,ql)<0&&(ua.prototype[ql]=function(m){return function(){return m.apply(this.doc,arguments)}}(Dr.prototype[ql]));return He(Dr),ua.inputStyles={textarea:ka,contenteditable:Ii},ua.defineMode=function(m){!ua.defaults.mode&&m!="null"&&(ua.defaults.mode=m),Bt.apply(this,arguments)},ua.defineMIME=Ht,ua.defineMode("null",function(){return{token:function(m){return m.skipToEnd()}}}),ua.defineMIME("text/plain","null"),ua.defineExtension=function(m,R){ua.prototype[m]=R},ua.defineDocExtension=function(m,R){Dr.prototype[m]=R},ua.fromTextArea=iu,au(ua),ua.version="5.58.2",ua})},W6BS:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WYAk:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){(function(){var v=I,T=v.lib,y=T.Base,g=v.enc,s=g.Utf8,_=v.algo,p=_.HMAC=y.extend({init:function(e,o){e=this._hasher=new e.init,typeof o=="string"&&(o=s.parse(o));var n=e.blockSize,l=n*4;o.sigBytes>l&&(o=e.finalize(o)),o.clamp();for(var r=this._oKey=o.clone(),i=this._iKey=o.clone(),t=r.words,a=i.words,c=0;c",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},c={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` -`)}]},d=b("5VLF"),f=b.n(d),h={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},u=function(B,Z){return Z.map(function(re){return{label:re,kind:B.languages.CompletionItemKind.Keyword,insertText:re}})},E=function(B){return Object.keys(h.tables).map(function(Z){return{label:Z,kind:B.languages.CompletionItemKind.Variable,insertText:Z}})},x=function(B,Z){var re=h.tables[B];return re?re.map(function(he){return{label:he,kind:Z.languages.CompletionItemKind.Field,insertText:he}}):[]};function O(L,B,Z,re,he){var Se=B.getWordUntilPosition(Z),ke={startLineNumber:Z.lineNumber,endLineNumber:Z.lineNumber,startColumn:Se.startColumn,endColumn:Se.endColumn},te=re.map(function(Re){return{label:Re,kind:L.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}});return he.map(function(Re){te.push(Object(I.a)(Object(I.a)({},Re),{},{range:ke}))}),te}var C=function(L){h.languages.map(function(he){return L.languages.registerDocumentFormattingEditProvider(he,{provideDocumentFormattingEdits:function(ke,te,Re){return Object(n.a)(r.a.mark(function Ce(){var pe;return r.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return pe=f()(ke.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),se.abrupt("return",[{range:ke.getFullModelRange(),text:pe}]);case 2:case"end":return se.stop()}},Ce)}))()}}),he});var B=a.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Z=c.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),re=t.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Se,ke){var te=Se.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Ce=Se.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(a.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(a.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Ce.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Se,ke){var te=Se.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn};return{suggestions:Object(v.a)(i.keywords.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Se,ke){var te=Se.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Ce=Se.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(t.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(t.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Ce.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Se,ke){var te=Se.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Ce=Se.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(c.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(c.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Ce.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},w="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",S=b("fjLI"),A=b("LvDl"),D=b("+ua5");function M(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function N(){}var P=!1,z={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function X(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=L;if(Array.isArray(L)){for(var Z=0;Z0||rn.target.offsetWidth>0)&&Je.current.instance.layout()}}catch(Gt){kt.e(Gt)}finally{kt.f()}}),jt.observe(Ve.current)),jt}function Ze(){y.b.warn(decodeURIComponent(w))}var lt=function(){var Ut=Je.current.instance;if(Se!=null&&Ut&&je){var kt=Ut.getModel();kt&&Se!==kt.getValue()&&(P=!0,kt.setValue(Se),Ut.layout(),P=!1)}};Object(p.useEffect)(function(){Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(function(){lt()},500)},[Se,je,Je.current]),Object(p.useEffect)(function(){if(Ge&&Je.current&&Je.current.instance){var jt=Je.current.instance;jt.changeViewZones(function(kt){var Kt=document.createElement("div");Kt.style.padding="10px 20px",Kt.style.width="calc(100% - 20px)",Kt.className="my-error-line-wrp",Kt.innerHTML=bt,kt.addZone({afterLineNumber:Ge||11,heightInLines:3,domNode:Kt})});var Ut={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};jt.addOverlayWidget(Ut),jt.revealPositionInCenter({lineNumber:20,column:1})}},[Ge,Je.current,je]);function Be(){var jt=Je.current.instance;if(jt){var Ut=jt.getSelection(),kt=Je.current.pastePos||{},Kt=new k.Range(kt.startLineNumber||Ut.endLineNumber,kt.startColumn||Ut.endColumn,kt.endLineNumber||Ut.endLineNumber,kt.endColumn||Ut.endColumn);setTimeout(function(){jt.executeEdits("",[{range:Kt,text:""}])},300)}}function $e(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),ie())}var it=function(){if(Q&&Je.current.instance){var Ut=Je.current.instance.getContentHeight();mt(Ut0||Le.target.offsetWidth>0)&&Q.layout()}}catch(ge){le.e(ge)}finally{le.f()}}),Y.observe(pe.current)),Y}Object(p.useEffect)(function(){pe.current&&Promise.all([b.e(16),b.e(28)]).then(b.t.bind(null,"M/lh",7)).then(function(Q){k=Q;var Y=k.editor.createDiffEditor(pe.current,Object(I.a)(Object(I.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{},{wordWrap:!0}));ae(Y);var oe=fe(Y);return function(){Y.dispose();var le=Y.getModel();le&&le.dispose(),oe.unobserve(pe.current)}})},[]),Object(p.useEffect)(function(){be&&be.setModel({original:k.editor.createModel(Se,te),modified:k.editor.createModel(ke,te)})},[Se,ke,te,be]);var Fe=M(Z),ie=M(he),q={width:Fe,height:ie};return e.a.createElement("div",{className:"my-diff-editor",ref:pe,style:q})}},ZpRC:function(j,H,b){"use strict";function I(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function v(n,l){return(!l||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,l){if(n.clientHeightl||a>n&&c=l&&d>=r?a-n-i:c>l&&dr?c-l+t:0}var g=function(n,l){var r=window,i=l.scrollMode,t=l.block,a=l.inline,c=l.boundary,d=l.skipOverflowHiddenElements,f=typeof c=="function"?c:function(Q){return Q!==c};if(!I(n))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,u=[],E=n;I(E)&&f(E);){if((E=E.parentElement)===h){u.push(E);break}E!=null&&E===document.body&&T(E)&&!T(document.documentElement)||E!=null&&T(E,d)&&u.push(E)}for(var x=r.visualViewport?r.visualViewport.width:innerWidth,O=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,S=n.getBoundingClientRect(),A=S.height,D=S.width,M=S.top,N=S.right,P=S.bottom,z=S.left,X=t==="start"||t==="nearest"?M:t==="end"?P:M+A/2,k=a==="center"?z+D/2:a==="end"?N:z,F=[],U=0;U=0&&z>=0&&P<=O&&N<=x&&M>=he&&P<=ke&&z>=te&&N<=Se)return F;var Re=getComputedStyle(L),Ce=parseInt(Re.borderLeftWidth,10),pe=parseInt(Re.borderTopWidth,10),me=parseInt(Re.borderRightWidth,10),se=parseInt(Re.borderBottomWidth,10),be=0,ae=0,fe="offsetWidth"in L?L.offsetWidth-L.clientWidth-Ce-me:0,Fe="offsetHeight"in L?L.offsetHeight-L.clientHeight-pe-se:0;if(h===L)be=t==="start"?X:t==="end"?X-O:t==="nearest"?y(w,w+O,O,pe,se,w+X,w+X+A,A):X-O/2,ae=a==="start"?k:a==="center"?k-x/2:a==="end"?k-x:y(C,C+x,x,Ce,me,C+k,C+k+D,D),be=Math.max(0,be+w),ae=Math.max(0,ae+C);else{be=t==="start"?X-he-pe:t==="end"?X-ke+se+Fe:t==="nearest"?y(he,ke,Z,pe,se+Fe,X,X+A,A):X-(he+Z/2)+Fe/2,ae=a==="start"?k-te-Ce:a==="center"?k-(te+re/2)+fe/2:a==="end"?k-Se+me+fe:y(te,Se,re,Ce,me+fe,k,k+D,D);var ie=L.scrollLeft,q=L.scrollTop;X+=q-(be=Math.max(0,Math.min(q+be,L.scrollHeight-Z+Fe))),k+=ie-(ae=Math.max(0,Math.min(ie+ae,L.scrollWidth-re+fe)))}F.push({el:L,top:be,left:ae})}return F};function s(n){return n===Object(n)&&Object.keys(n).length!==0}function _(n,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;n.forEach(function(i){var t=i.el,a=i.top,c=i.left;t.scroll&&r?t.scroll({top:a,left:c,behavior:l}):(t.scrollTop=a,t.scrollLeft=c)})}function p(n){return n===!1?{block:"end",inline:"nearest"}:s(n)?n:{block:"start",inline:"nearest"}}function e(n,l){var r=!n.ownerDocument.documentElement.contains(n);if(s(l)&&typeof l.behavior=="function")return l.behavior(r?[]:g(n,l));if(r)return;var i=p(l);return _(g(n,i),i.behavior)}var o=H.a=e},Zss7:function(j,H,b){var I;(function(v){var T=/^\s+/,y=/\s+$/,g=0,s=v.round,_=v.min,p=v.max,e=v.random;function o(se,be){if(se=se||"",be=be||{},se instanceof o)return se;if(!(this instanceof o))return new o(se,be);var ae=n(se);this._originalInput=se,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=s(100*this._a)/100,this._format=be.format||ae.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=ae.ok,this._tc_id=g++}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),be,ae,fe,Fe,ie,q;return be=se.r/255,ae=se.g/255,fe=se.b/255,be<=.03928?Fe=be/12.92:Fe=v.pow((be+.055)/1.055,2.4),ae<=.03928?ie=ae/12.92:ie=v.pow((ae+.055)/1.055,2.4),fe<=.03928?q=fe/12.92:q=v.pow((fe+.055)/1.055,2.4),.2126*Fe+.7152*ie+.0722*q},setAlpha:function(se){return this._a=F(se),this._roundA=s(100*this._a)/100,this},toHsv:function(){var se=t(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=t(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.v*100);return this._a==1?"hsv("+be+", "+ae+"%, "+fe+"%)":"hsva("+be+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var se=r(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=r(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.l*100);return this._a==1?"hsl("+be+", "+ae+"%, "+fe+"%)":"hsla("+be+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(se){return c(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return d(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(U(this._r,255)*100)+"%",g:s(U(this._g,255)*100)+"%",b:s(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%)":"rgba("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var be="#"+f(this._r,this._g,this._b,this._a),ae=be,fe=this._gradientType?"GradientType = 1, ":"";if(se){var Fe=o(se);ae="#"+f(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+be+",endColorstr="+ae+")"},toString:function(se){var be=!!se;se=se||this._format;var ae=!1,fe=this._a<1&&this._a>=0,Fe=!be&&fe&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return Fe?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(ae=this.toRgbString()),se==="prgb"&&(ae=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(ae=this.toHexString()),se==="hex3"&&(ae=this.toHexString(!0)),se==="hex4"&&(ae=this.toHex8String(!0)),se==="hex8"&&(ae=this.toHex8String()),se==="name"&&(ae=this.toName()),se==="hsl"&&(ae=this.toHslString()),se==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(se,be){var ae=se.apply(null,[this].concat([].slice.call(be)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(O,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(se,be){return se.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(D,arguments)}},o.fromRatio=function(se,be){if(typeof se=="object"){var ae={};for(var fe in se)se.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=se[fe]:ae[fe]=Se(se[fe]));se=ae}return o(se,be)};function n(se){var be={r:0,g:0,b:0},ae=1,fe=null,Fe=null,ie=null,q=!1,Q=!1;return typeof se=="string"&&(se=pe(se)),typeof se=="object"&&(Ce(se.r)&&Ce(se.g)&&Ce(se.b)?(be=l(se.r,se.g,se.b),q=!0,Q=String(se.r).substr(-1)==="%"?"prgb":"rgb"):Ce(se.h)&&Ce(se.s)&&Ce(se.v)?(fe=Se(se.s),Fe=Se(se.v),be=a(se.h,fe,Fe),q=!0,Q="hsv"):Ce(se.h)&&Ce(se.s)&&Ce(se.l)&&(fe=Se(se.s),ie=Se(se.l),be=i(se.h,fe,ie),q=!0,Q="hsl"),se.hasOwnProperty("a")&&(ae=se.a)),ae=F(ae),{ok:q,format:se.format||Q,r:_(255,p(be.r,0)),g:_(255,p(be.g,0)),b:_(255,p(be.b,0)),a:ae}}function l(se,be,ae){return{r:U(se,255)*255,g:U(be,255)*255,b:U(ae,255)*255}}function r(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=(fe+Fe)/2;if(fe==Fe)ie=q=0;else{var Y=fe-Fe;q=Q>.5?Y/(2-fe-Fe):Y/(fe+Fe);switch(fe){case se:ie=(be-ae)/Y+(be1&&(Ee-=1),Ee<1/6?oe+(le-oe)*6*Ee:Ee<1/2?le:Ee<2/3?oe+(le-oe)*(2/3-Ee)*6:oe}if(be===0)fe=Fe=ie=ae;else{var Q=ae<.5?ae*(1+be):ae+be-ae*be,Y=2*ae-Q;fe=q(Y,Q,se+1/3),Fe=q(Y,Q,se),ie=q(Y,Q,se-1/3)}return{r:fe*255,g:Fe*255,b:ie*255}}function t(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=fe,Y=fe-Fe;if(q=fe===0?0:Y/fe,fe==Fe)ie=0;else{switch(fe){case se:ie=(be-ae)/Y+(be>1)+720)%360;--be;)fe.h=(fe.h+Fe)%360,ie.push(o(fe));return ie}function P(se,be){be=be||6;for(var ae=o(se).toHsv(),fe=ae.h,Fe=ae.s,ie=ae.v,q=[],Q=1/be;be--;)q.push(o({h:fe,s:Fe,v:ie})),ie=(ie+Q)%1;return q}o.mix=function(se,be,ae){ae=ae===0?0:ae||50;var fe=o(se).toRgb(),Fe=o(be).toRgb(),ie=ae/100,q={r:(Fe.r-fe.r)*ie+fe.r,g:(Fe.g-fe.g)*ie+fe.g,b:(Fe.b-fe.b)*ie+fe.b,a:(Fe.a-fe.a)*ie+fe.a};return o(q)},o.readability=function(se,be){var ae=o(se),fe=o(be);return(v.max(ae.getLuminance(),fe.getLuminance())+.05)/(v.min(ae.getLuminance(),fe.getLuminance())+.05)},o.isReadable=function(se,be,ae){var fe=o.readability(se,be),Fe,ie;ie=!1,Fe=me(ae);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":ie=fe>=4.5;break;case"AAlarge":ie=fe>=3;break;case"AAAsmall":ie=fe>=7;break}return ie},o.mostReadable=function(se,be,ae){var fe=null,Fe=0,ie,q,Q,Y;ae=ae||{},q=ae.includeFallbackColors,Q=ae.level,Y=ae.size;for(var oe=0;oeFe&&(Fe=ie,fe=o(be[oe]));return o.isReadable(se,fe,{level:Q,size:Y})||!q?fe:(ae.includeFallbackColors=!1,o.mostReadable(se,["#fff","#000"],ae))};var z=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=o.hexNames=k(z);function k(se){var be={};for(var ae in se)se.hasOwnProperty(ae)&&(be[se[ae]]=ae);return be}function F(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function U(se,be){Z(se)&&(se="100%");var ae=re(se);return se=_(be,p(0,parseFloat(se))),ae&&(se=parseInt(se*be,10)/100),v.abs(se-be)<1e-6?1:se%be/parseFloat(be)}function L(se){return _(1,p(0,se))}function B(se){return parseInt(se,16)}function Z(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function re(se){return typeof se=="string"&&se.indexOf("%")!=-1}function he(se){return se.length==1?"0"+se:""+se}function Se(se){return se<=1&&(se=se*100+"%"),se}function ke(se){return v.round(parseFloat(se)*255).toString(16)}function te(se){return B(se)/255}var Re=function(){var se="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+be+")|(?:"+se+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",Fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+Fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ce(se){return!!Re.CSS_UNIT.exec(se)}function pe(se){se=se.replace(T,"").replace(y,"").toLowerCase();var be=!1;if(z[se])se=z[se],be=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=Re.rgb.exec(se))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=Re.rgba.exec(se))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=Re.hsl.exec(se))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=Re.hsla.exec(se))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=Re.hsv.exec(se))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=Re.hsva.exec(se))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=Re.hex8.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),a:te(ae[4]),format:be?"name":"hex8"}:(ae=Re.hex6.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),format:be?"name":"hex"}:(ae=Re.hex4.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),a:te(ae[4]+""+ae[4]),format:be?"name":"hex8"}:(ae=Re.hex3.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),format:be?"name":"hex"}:!1}function me(se){var be,ae;return se=se||{level:"AA",size:"small"},be=(se.level||"AA").toUpperCase(),ae=(se.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:be,size:ae}}j.exports?j.exports=o:!(I=function(){return o}.call(H,b,H,j),I!==void 0&&(j.exports=I))})(Math)},aVK0:function(j,H,b){j.exports={flex_box_center:"flex_box_center___21Vfj",flex_space_between:"flex_space_between___uZYuI",flex_box_vertical_center:"flex_box_vertical_center___YbtWj",flex_box_center_end:"flex_box_center_end_____Dod",flex_box_column:"flex_box_column___38gQH",headLeft:"headLeft___2agg1",colorBlue:"colorBlue___3Vx0N",wrap:"wrap___2WfDC",nodata:"nodata___2f07p",nodataText:"nodataText___3TEWn",content:"content___2_atz",gitCode:"gitCode___3gBXU",ellipsis:"ellipsis___1HiNM",menu:"menu___1DQOO",overlayClass:"overlayClass___2EPCd",tips:"tips___3g6oq"}},b1fT:function(j,H,b){j.exports={"choose-game-item":"choose-game-item___3Vmdr","output-title-container":"output-title-container___15c7x","output-title":"output-title___wqGBh","test-case-list":"test-case-list___134lr","test-header":"test-header___3YSEo",active:"active___3o9Hq","test-result":"test-result___2OIUv","markdown-body":"markdown-body___1mq0e",success:"success___2M7U8",failer:"failer___3JK5X",count:"count___3ViIk","test-case-item":"test-case-item___JBhkJ","case-header":"case-header___27Lc0",iconfont:"iconfont___3UAOT",description:"description___1SgkG","item-desc":"item-desc___29cRg",show:"show___3qunF","item-tip":"item-tip___1pJqj","arrow-down":"arrow-down___3rUfL","test-title":"test-title___1eTn_","arrow-right":"arrow-right___36G7Q","case-info":"case-info___21-4n","test-case-run-header":"test-case-run-header___1BrpP","test-case-run-wrp":"test-case-run-wrp___2T5BC","diff-panel-container":"diff-panel-container___CQu-S","line-break":"line-break___1hJQp",empty:"empty___19Ozf"}},bCnd:function(j,H,b){"use strict";b.d(H,"b",function(){return y}),b.d(H,"a",function(){return g});var I=b("je13"),v=b.n(I),T=!1;function y(s,_){var p=v.a.get("__ec");p||(p={}),p[s]=_,v.a.set("__ec",p)}function g(s,_){var p=v.a.get("__ec");return p?p[s]===void 0?_:p[s]:_}},bPs0:function(j,H,b){"use strict";b.d(H,"b",function(){return h});var I=b("k1fw"),v=b("9og8"),T=b("2qtc"),y=b("kLXV"),g=b("tJVT"),s=b("PpiC"),_=b("aHsQ"),p=b("sGsY"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("bntm"),i=b("V0Rq"),t=b("wd/R"),a=b.n(t),c=b("Ty5D"),d=b("9kvl"),f=p.a.Countdown,h=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],u=function(x){var O=x.globalSetting,C=x.loading,w=x.user,S=x.exercise,A=x.socket,D=x.dispatch,M=Object(s.a)(x,["globalSetting","loading","user","exercise","socket","dispatch"]),N=Object(n.useState)({}),P=Object(g.a)(N,2),z=P[0],X=P[1],k=y.a.useModal(),F=Object(g.a)(k,2),U=F[0],L=F[1],B=Object(n.useRef)(),Z=Object(n.useRef)(null),re=Object(n.useRef)(null),he=Object(n.useState)(!0),Se=Object(g.a)(he,2),ke=Se[0],te=Se[1],Re=Object(c.h)().query,Ce=Object(c.i)();Object(n.useEffect)(function(){var Y,oe,le,Ee,Le;if(clearTimeout(Z.current),document.addEventListener(Object(r.c)(),Q,!1),window.addEventListener("blur",ie,!1),(Y=S.exerciseUserInfo)!==null&&Y!==void 0&&Y.screen_open&&Object(r.a)()&&(D({type:"globalSetting/headerFooterToggle",payload:!1}),te(!1)),(oe=S.exerciseUserInfo)!==null&&oe!==void 0&&oe.screen_at&&a()().diff(a()((le=S.exerciseUserInfo)===null||le===void 0?void 0:le.screen_at),"seconds")>0)pe();else if((Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_open&&!Object(r.a)()){var ge=document.domain==="kepukehuan.educoder.net"?30:S.exerciseUserInfo.screen_sec+10+1;B.current=y.a.info({icon:null,content:l.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",l.a.createElement("br",null),"\u5207\u6362\u9875\u9762"," ",S.exerciseUserInfo.screen_num-S.exerciseUserInfo.used_screen_num," ","\u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",l.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:l.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:function(){var _e;pe(),(_e=B.current)===null||_e===void 0||_e.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+ge*1e3})),"S\uFF09"),onOk:function(){var _e;(_e=B.current)===null||_e===void 0||_e.destroy(),te(!1),Object(r.d)(document.body),document.getElementById("root").addEventListener("click",me,!1)}})}return(Le=S.exerciseUserInfo)!==null&&Le!==void 0&&Le.screen_open&&!Object(r.a)()||document.getElementById("root").addEventListener("click",me,!1),function(){document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1),window.removeEventListener("blur",ie,!1),clearTimeout(Z.current)}},[]),Object(n.useEffect)(function(){setTimeout(function(){S.actionTabs.removeEventListenerExitScreen&&(clearTimeout(Z.current),document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1))},500),se()},[S.actionTabs]),Object(n.useEffect)(function(){setTimeout(function(){S.exerciseUserInfo.used_screen_num>S.exerciseUserInfo.screen_num?fe():!ke},500)},[S.exerciseUserInfo]);var pe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le;return o.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,q();case 2:le=Le.sent,setTimeout(function(){var ge,De;(ge=B.current)===null||ge===void 0||ge.destroy(),B.current=y.a.info({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(De=S.exerciseUserInfo)===null||De===void 0?void 0:De.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var _e=Object(v.a)(o.a.mark(function tt(){return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Object(r.d)(document.body);case 1:case"end":return Me.stop()}},tt)}));function Xe(){return _e.apply(this,arguments)}return Xe}()})},1e3);case 4:case"end":return Le.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),me=function(oe){!Object(r.a)()&&oe.target.nodeName!=="A"&&oe.target.nodeName!=="BUTTON"&&oe.target.innerHTML!=="\u786E \u5B9A"&&(Object(r.d)(document.body),console.log("documentClick.full"))},se=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e;return o.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,D({type:"exercise/getExerciseUserInfo",payload:Object(I.a)({},Ce)});case 2:return _e=tt.sent,De(_e==null?void 0:_e.data),tt.abrupt("return",_e==null?void 0:_e.data);case 5:case"end":return tt.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),be=function(){var Y=Object(v.a)(o.a.mark(function oe(le){var Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:(Ee=B.current)===null||Ee===void 0||((Le=Ee.destroyAll)===null||Le===void 0)||Le.call(Ee),B.current=y.a.info({maskClosable:!1,keyboard:!1,okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:q,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(S.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(ge=S.exerciseUserInfo)===null||ge===void 0?void 0:ge.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",l.a.createElement("span",{className:"c-red"},S.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",l.a.createElement("br",null),l.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var Xe=Object(v.a)(o.a.mark(function Ge(){return o.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:clearTimeout(re.current),Object(r.d)(document.body),B.current.destroy();case 3:case"end":return bt.stop()}},Ge)}));function tt(){return Xe.apply(this,arguments)}return tt}()}),re.current=setTimeout(function(){var Xe;B.current.update({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(Xe=S.exerciseUserInfo)===null||Xe===void 0?void 0:Xe.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(S.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return _e.stop()}},oe)}));return function(le){return Y.apply(this,arguments)}}(),ae=function(){location.href="/classrooms/".concat(Ce.coursesId,"/exercise/").concat(Ce.categoryId,"/detail")},fe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le;return o.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return(le=B.current)===null||le===void 0||((Ee=le.destroyAll)===null||Ee===void 0)||Ee.call(le),De.next=3,Object(i.ab)({categoryId:Ce.categoryId,commit_method:1});case 3:if(Le=De.sent,Le){try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(_e){}Fe()}case 5:case"end":return De.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Fe=function(){var oe,le;document.removeEventListener(Object(r.c)(),Q,!1),Object(r.b)(),(oe=B.current)===null||oe===void 0||((le=oe.destroyAll)===null||le===void 0)||le.call(oe);try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(Ee){}U.info({content:l.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",l.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){ae()}})},ie=function(oe){Object(r.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(r.b)()},q=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e,Xe,tt;return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!((_e=S.exerciseUserInfo)!==null&&_e!==void 0&&_e.screen_at)){Me.next=3;break}return Me.next=3,Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0}));case 3:return Me.next=5,Object(i.R)({id:Ce.categoryId});case 5:if(Xe=Me.sent,!(Xe!=null&&Xe.is_commit)){Me.next=9;break}return Fe(),Me.abrupt("return");case 9:return Me.next=11,se();case 11:tt=Me.sent,De(tt);case 13:case"end":return Me.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Q=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(le=!1,console.log("fullscreen change"),!Object(r.a)()){_e.next=7;break}(Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_at&&Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0})),clearTimeout(Z.current),_e.next=17;break;case 7:return le=!0,_e.next=10,Object(i.h)(Object(I.a)({},Ce));case 10:return _e.next=12,se();case 12:Le=_e.sent,be(Le.used_screen_num),ge=setTimeout(Object(v.a)(o.a.mark(function Xe(){return o.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:case"end":return Ge.stop()}},Xe)})),S.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),Z.current=ge;case 17:D({type:"globalSetting/headerFooterToggle",payload:le});case 18:case"end":return _e.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}();return l.a.createElement("div",null,L)};H.a=Object(d.a)(function(E){var x=E.loading,O=E.user,C=E.exercise,w=E.globalSetting;return{globalSetting:w,user:O,exercise:C,loading:x.effects}})(u)},bQjk:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.CipherParams,s=T.enc,_=s.Hex,p=T.format,e=p.Hex={stringify:function(o){return o.ciphertext.toString(_)},parse:function(o){var n=_.parse(o);return g.create({ciphertext:n})}}}(),I.format.Hex})},bT9E:function(j,H,b){"use strict";b.d(H,"a",function(){return v});var I=b("VTBJ");function v(T,y){var g=Object(I.a)({},T);return Array.isArray(y)&&y.forEach(function(s){delete g[s]}),g}},biw7:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=I.createContext(null);H.a=T},c5Ni:function(j,H,b){},c5fP:function(j,H,b){"use strict";function I(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(Je){return typeof Je}:I=function(Je){return Je&&typeof Symbol=="function"&&Je.constructor===Symbol&&Je!==Symbol.prototype?"symbol":typeof Je},I(Oe)}Object.defineProperty(H,"__esModule",{value:!0}),H._tr_init=Xe,H._tr_stored_block=tt,H._tr_flush_block=Me,H._tr_tally=bt,H._tr_align=Ge;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var Oe=new WeakMap;return T=function(){return Oe},Oe}function y(Oe){if(Oe&&Oe.__esModule)return Oe;if(Oe===null||I(Oe)!=="object"&&typeof Oe!="function")return{default:Oe};var Ve=T();if(Ve&&Ve.has(Oe))return Ve.get(Oe);var Je={},Ye=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ne in Oe)if(Object.prototype.hasOwnProperty.call(Oe,Ne)){var He=Ye?Object.getOwnPropertyDescriptor(Oe,Ne):null;He&&(He.get||He.set)?Object.defineProperty(Je,Ne,He):Je[Ne]=Oe[Ne]}return Je.default=Oe,Ve&&Ve.set(Oe,Je),Je}var g=4,s=0,_=1,p=2;function e(Oe){for(var Ve=Oe.length;--Ve>=0;)Oe[Ve]=0}var o=0,n=1,l=2,r=3,i=258,t=29,a=256,c=a+1+t,d=30,f=19,h=2*c+1,u=15,E=16,x=7,O=256,C=16,w=17,S=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],P=512,z=new Array((c+2)*2);e(z);var X=new Array(d*2);e(X);var k=new Array(P);e(k);var F=new Array(i-r+1);e(F);var U=new Array(t);e(U);var L=new Array(d);e(L);function B(Oe,Ve,Je,Ye,Ne){this.static_tree=Oe,this.extra_bits=Ve,this.extra_base=Je,this.elems=Ye,this.max_length=Ne,this.has_stree=Oe&&Oe.length}var Z,re,he;function Se(Oe,Ve){this.dyn_tree=Oe,this.max_code=0,this.stat_desc=Ve}function ke(Oe){return Oe<256?k[Oe]:k[256+(Oe>>>7)]}function te(Oe,Ve){Oe.pending_buf[Oe.pending++]=Ve&255,Oe.pending_buf[Oe.pending++]=Ve>>>8&255}function Re(Oe,Ve,Je){Oe.bi_valid>E-Je?(Oe.bi_buf|=Ve<>E-Oe.bi_valid,Oe.bi_valid+=Je-E):(Oe.bi_buf|=Ve<>>=1,Je<<=1;while(--Ve>0);return Je>>>1}function me(Oe){Oe.bi_valid===16?(te(Oe,Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0):Oe.bi_valid>=8&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf&255,Oe.bi_buf>>=8,Oe.bi_valid-=8)}function se(Oe,Ve){var Je=Ve.dyn_tree,Ye=Ve.max_code,Ne=Ve.stat_desc.static_tree,He=Ve.stat_desc.has_stree,ve=Ve.stat_desc.extra_bits,xe=Ve.stat_desc.extra_base,de=Ve.stat_desc.max_length,je,Qe,ne,Ze,lt,Be,$e=0;for(Ze=0;Ze<=u;Ze++)Oe.bl_count[Ze]=0;for(Je[Oe.heap[Oe.heap_max]*2+1]=0,je=Oe.heap_max+1;jede&&(Ze=de,$e++),Je[Qe*2+1]=Ze,Qe>Ye)continue;Oe.bl_count[Ze]++,lt=0,Qe>=xe&&(lt=ve[Qe-xe]),Be=Je[Qe*2],Oe.opt_len+=Be*(Ze+lt),He&&(Oe.static_len+=Be*(Ne[Qe*2+1]+lt))}if($e===0)return;do{for(Ze=de-1;Oe.bl_count[Ze]===0;)Ze--;Oe.bl_count[Ze]--,Oe.bl_count[Ze+1]+=2,Oe.bl_count[de]--,$e-=2}while($e>0);for(Ze=de;Ze!==0;Ze--)for(Qe=Oe.bl_count[Ze];Qe!==0;){if(ne=Oe.heap[--je],ne>Ye)continue;Je[ne*2+1]!==Ze&&(Oe.opt_len+=(Ze-Je[ne*2+1])*Je[ne*2],Je[ne*2+1]=Ze),Qe--}}function be(Oe,Ve,Je){var Ye=new Array(u+1),Ne=0,He,ve;for(He=1;He<=u;He++)Ye[He]=Ne=Ne+Je[He-1]<<1;for(ve=0;ve<=Ve;ve++){var xe=Oe[ve*2+1];if(xe===0)continue;Oe[ve*2]=pe(Ye[xe]++,xe)}}function ae(){var Oe,Ve,Je,Ye,Ne,He=new Array(u+1);for(Je=0,Ye=0;Ye>=7;Ye8?te(Oe,Oe.bi_buf):Oe.bi_valid>0&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0}function ie(Oe,Ve,Je,Ye){Fe(Oe),Ye&&(te(Oe,Je),te(Oe,~Je)),v.arraySet(Oe.pending_buf,Oe.window,Ve,Je,Oe.pending),Oe.pending+=Je}function q(Oe,Ve,Je,Ye){var Ne=Ve*2,He=Je*2;return Oe[Ne]>1;ve>=1;ve--)Q(Oe,Je,ve);je=He;do ve=Oe.heap[1],Oe.heap[1]=Oe.heap[Oe.heap_len--],Q(Oe,Je,1),xe=Oe.heap[1],Oe.heap[--Oe.heap_max]=ve,Oe.heap[--Oe.heap_max]=xe,Je[je*2]=Je[ve*2]+Je[xe*2],Oe.depth[je]=(Oe.depth[ve]>=Oe.depth[xe]?Oe.depth[ve]:Oe.depth[xe])+1,Je[ve*2+1]=Je[xe*2+1]=je,Oe.heap[1]=je++,Q(Oe,Je,1);while(Oe.heap_len>=2);Oe.heap[--Oe.heap_max]=Oe.heap[1],se(Oe,Ve),be(Je,de,Oe.bl_count)}function le(Oe,Ve,Je){var Ye,Ne=-1,He,ve=Ve[0*2+1],xe=0,de=7,je=4;for(ve===0&&(de=138,je=3),Ve[(Je+1)*2+1]=65535,Ye=0;Ye<=Je;Ye++){if(He=ve,ve=Ve[(Ye+1)*2+1],++xe=3&&!(Oe.bl_tree[N[Ve]*2+1]!==0);Ve--);return Oe.opt_len+=3*(Ve+1)+5+5+4,Ve}function ge(Oe,Ve,Je,Ye){var Ne;for(Re(Oe,Ve-257,5),Re(Oe,Je-1,5),Re(Oe,Ye-4,4),Ne=0;Ne>>=1)if(Ve&1&&Oe.dyn_ltree[Je*2]!==0)return s;if(Oe.dyn_ltree[9*2]!==0||Oe.dyn_ltree[10*2]!==0||Oe.dyn_ltree[13*2]!==0)return _;for(Je=32;Je0?(Oe.strm.data_type===p&&(Oe.strm.data_type=De(Oe)),oe(Oe,Oe.l_desc),oe(Oe,Oe.d_desc),ve=Le(Oe),Ne=Oe.opt_len+3+7>>>3,He=Oe.static_len+3+7>>>3,He<=Ne&&(Ne=He)):Ne=He=Je+5,Je+4<=Ne&&Ve!==-1?tt(Oe,Ve,Je,Ye):Oe.strategy===g||He===Ne?(Re(Oe,(n<<1)+(Ye?1:0),3),Y(Oe,z,X)):(Re(Oe,(l<<1)+(Ye?1:0),3),ge(Oe,Oe.l_desc.max_code+1,Oe.d_desc.max_code+1,ve+1),Y(Oe,Oe.dyn_ltree,Oe.dyn_dtree)),fe(Oe),Ye&&Fe(Oe)}function bt(Oe,Ve,Je){return Oe.pending_buf[Oe.d_buf+Oe.last_lit*2]=Ve>>>8&255,Oe.pending_buf[Oe.d_buf+Oe.last_lit*2+1]=Ve&255,Oe.pending_buf[Oe.l_buf+Oe.last_lit]=Je&255,Oe.last_lit++,Ve===0?Oe.dyn_ltree[Je*2]++:(Oe.matches++,Ve--,Oe.dyn_ltree[(F[Je]+a+1)*2]++,Oe.dyn_dtree[ke(Ve)*2]++),Oe.last_lit===Oe.lit_bufsize-1}},cRFk:function(j,H,b){j.exports=b.p+"static/RepositoryNoneData.828085a8.png"},"cf+g":function(j,H,b){j.exports=b.p+"static/mark.ad150797.svg"},csWT:function(j,H,b){j.exports=b.p+"static/choose.4ad1045f.svg"},cv67:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.algo,p=[];(function(){for(var i=0;i<64;i++)p[i]=v.abs(v.sin(i+1))*4294967296|0})();var e=_.MD5=s.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,t){for(var a=0;a<16;a++){var c=t+a,d=i[c];i[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var f=this._hash.words,h=i[t+0],u=i[t+1],E=i[t+2],x=i[t+3],O=i[t+4],C=i[t+5],w=i[t+6],S=i[t+7],A=i[t+8],D=i[t+9],M=i[t+10],N=i[t+11],P=i[t+12],z=i[t+13],X=i[t+14],k=i[t+15],F=f[0],U=f[1],L=f[2],B=f[3];F=o(F,U,L,B,h,7,p[0]),B=o(B,F,U,L,u,12,p[1]),L=o(L,B,F,U,E,17,p[2]),U=o(U,L,B,F,x,22,p[3]),F=o(F,U,L,B,O,7,p[4]),B=o(B,F,U,L,C,12,p[5]),L=o(L,B,F,U,w,17,p[6]),U=o(U,L,B,F,S,22,p[7]),F=o(F,U,L,B,A,7,p[8]),B=o(B,F,U,L,D,12,p[9]),L=o(L,B,F,U,M,17,p[10]),U=o(U,L,B,F,N,22,p[11]),F=o(F,U,L,B,P,7,p[12]),B=o(B,F,U,L,z,12,p[13]),L=o(L,B,F,U,X,17,p[14]),U=o(U,L,B,F,k,22,p[15]),F=n(F,U,L,B,u,5,p[16]),B=n(B,F,U,L,w,9,p[17]),L=n(L,B,F,U,N,14,p[18]),U=n(U,L,B,F,h,20,p[19]),F=n(F,U,L,B,C,5,p[20]),B=n(B,F,U,L,M,9,p[21]),L=n(L,B,F,U,k,14,p[22]),U=n(U,L,B,F,O,20,p[23]),F=n(F,U,L,B,D,5,p[24]),B=n(B,F,U,L,X,9,p[25]),L=n(L,B,F,U,x,14,p[26]),U=n(U,L,B,F,A,20,p[27]),F=n(F,U,L,B,z,5,p[28]),B=n(B,F,U,L,E,9,p[29]),L=n(L,B,F,U,S,14,p[30]),U=n(U,L,B,F,P,20,p[31]),F=l(F,U,L,B,C,4,p[32]),B=l(B,F,U,L,A,11,p[33]),L=l(L,B,F,U,N,16,p[34]),U=l(U,L,B,F,X,23,p[35]),F=l(F,U,L,B,u,4,p[36]),B=l(B,F,U,L,O,11,p[37]),L=l(L,B,F,U,S,16,p[38]),U=l(U,L,B,F,M,23,p[39]),F=l(F,U,L,B,z,4,p[40]),B=l(B,F,U,L,h,11,p[41]),L=l(L,B,F,U,x,16,p[42]),U=l(U,L,B,F,w,23,p[43]),F=l(F,U,L,B,D,4,p[44]),B=l(B,F,U,L,P,11,p[45]),L=l(L,B,F,U,k,16,p[46]),U=l(U,L,B,F,E,23,p[47]),F=r(F,U,L,B,h,6,p[48]),B=r(B,F,U,L,S,10,p[49]),L=r(L,B,F,U,X,15,p[50]),U=r(U,L,B,F,C,21,p[51]),F=r(F,U,L,B,P,6,p[52]),B=r(B,F,U,L,x,10,p[53]),L=r(L,B,F,U,M,15,p[54]),U=r(U,L,B,F,u,21,p[55]),F=r(F,U,L,B,A,6,p[56]),B=r(B,F,U,L,k,10,p[57]),L=r(L,B,F,U,w,15,p[58]),U=r(U,L,B,F,z,21,p[59]),F=r(F,U,L,B,O,6,p[60]),B=r(B,F,U,L,N,10,p[61]),L=r(L,B,F,U,E,15,p[62]),U=r(U,L,B,F,D,21,p[63]),f[0]=f[0]+F|0,f[1]=f[1]+U|0,f[2]=f[2]+L|0,f[3]=f[3]+B|0},_doFinalize:function(){var i=this._data,t=i.words,a=this._nDataBytes*8,c=i.sigBytes*8;t[c>>>5]|=128<<24-c%32;var d=v.floor(a/4294967296),f=a;t[(c+64>>>9<<4)+15]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,t[(c+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,i.sigBytes=(t.length+1)*4,this._process();for(var h=this._hash,u=h.words,E=0;E<4;E++){var x=u[E];u[E]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return h},clone:function(){var i=s.clone.call(this);return i._hash=this._hash.clone(),i}});function o(i,t,a,c,d,f,h){var u=i+(t&a|~t&c)+d+h;return(u<>>32-f)+t}function n(i,t,a,c,d,f,h){var u=i+(t&c|a&~c)+d+h;return(u<>>32-f)+t}function l(i,t,a,c,d,f,h){var u=i+(t^a^c)+d+h;return(u<>>32-f)+t}function r(i,t,a,c,d,f,h){var u=i+(a^(t|~c))+d+h;return(u<>>32-f)+t}T.MD5=s._createHelper(e),T.HmacMD5=s._createHmacHelper(e)}(Math),I.MD5})},dPi7:function(j,H,b){j.exports=b.p+"static/appoint1.9457cf22.svg"},dTJi:function(j,H,b){},dViP:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAATxJREFUWEftmE9Kw1AQxr8ZYqhYoWL34kJwW/QIeoku2q7SI/QMPUK76z16BG/gQtxXurBiScMbeWIQxDLTQOITXhbJ4s2f7/0yYfKG8HWJCGE8Pkeed+HcMYqCy7VankniwPyONF1hNnshIvF5yN8ky46w3V6iKE5rSa4FTZJXtFpPNJ/v6JPMcHj1Z2JKsV7UYvFIkmVdbDYX2iYaWW+3n0lGo2vk+UkjCbUkafpGMhj0ai9gTcj3a3Mk/f6N1b4JuyhIo/yPCTl3B2AC4Ezb5Y/1NYApmJcWPzshkSVEOpagv9iswXxv8bULcu7BEnCvDfOtxT8K0ihFQpFQ/Mq0GoiEIqG9BIJrriK+W08qdPyafj8qF89hjvZedljcytZRkIYuwINicEfp4IYNoY1jfJEFNbAqqz6Ukd4H/d3NFUaXf7AAAAAASUVORK5CYII="},dejd:function(j,H,b){},djh8:function(j,H,b){j.exports=b.p+"static/qrCode.d852fdfc.png"},dmUQ:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("rePB"),T=b("1OyB"),y=b("vuIU"),g=b("Ji7U"),s=b("md7G"),_=b("foSv"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=b("4IlW");function r(A,D){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(A);D&&(N=N.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),M.push.apply(M,N)}return M}function i(A){for(var D=1;D1?re-1:0),Se=1;Se1?U-1:0),B=1;B=0)return parseInt(F.slice(F.indexOf("e-")+2),10);var U=0;return F.indexOf(".")>=0&&(U=F.length-F.indexOf(".")-1),U},P.getInputDisplayValue=function(k){var F=k||P.state,U=F.focused,L=F.inputValue,B=F.value,Z;U?Z=L:Z=P.toPrecisionAsStep(B),Z==null&&(Z="");var re=P.formatWrapper(Z);return x(P.props.decimalSeparator)&&(re=re.toString().replace(".",P.props.decimalSeparator)),re},P.recordCursorPosition=function(){try{P.cursorStart=P.input.selectionStart,P.cursorEnd=P.input.selectionEnd,P.currentValue=P.input.value,P.cursorBefore=P.input.value.substring(0,P.cursorStart),P.cursorAfter=P.input.value.substring(P.cursorEnd)}catch(k){}},P.restoreByAfter=function(k){if(k===void 0)return!1;var F=P.input.value,U=F.lastIndexOf(k);if(U===-1)return!1;var L=P.cursorBefore.length;return P.lastKeyCode===l.a.DELETE&&P.cursorBefore.charAt(L-1)===k[0]?(P.fixCaret(L,L),!0):U+k.length===F.length?(P.fixCaret(U,U),!0):!1},P.partRestoreByAfter=function(k){return k===void 0?!1:Array.prototype.some.call(k,function(F,U){var L=k.substring(U);return P.restoreByAfter(L)})},P.isNotCompleteNumber=function(k){return isNaN(k)||k===""||k===null||k&&k.toString().indexOf(".")===k.toString().length-1},P.stop=function(){P.autoStepTimer&&clearTimeout(P.autoStepTimer)},P.down=function(k,F,U){P.pressingUpOrDown=!0,P.step("down",k,F,U)},P.up=function(k,F,U){P.pressingUpOrDown=!0,P.step("up",k,F,U)},P.saveInput=function(k){P.input=k};var z=N.value;z===void 0&&(z=N.defaultValue),P.state={focused:N.autoFocus};var X=P.getValidValue(P.toNumber(z));return P.state=i(i({},P.state),{},{inputValue:P.toPrecisionAsStep(X),value:X}),P}return Object(y.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(P){var z=this.props,X=z.value,k=z.onChange,F=z.max,U=z.min,L=this.state.focused;if(P){if(!O(P.value,X)||!O(P.max,F)||!O(P.min,U)){var B=L?X:this.getValidValue(X),Z;this.pressingUpOrDown?Z=B:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(B),this.setState({value:B,inputValue:Z})}var re="value"in this.props?X:this.state.value;"max"in this.props&&P.max!==F&&typeof re=="number"&&re>F&&k&&k(F),"min"in this.props&&P.min!==U&&typeof re=="number"&&re1&&arguments[1]!==void 0?arguments[1]:this.props.min,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,k=parseFloat(P);return isNaN(k)?P:(kX&&(k=X),k)}},{key:"setValue",value:function(P,z){var X=this.props.precision,k=this.isNotCompleteNumber(parseFloat(P))?null:parseFloat(P),F=this.state.value,U=F===void 0?null:F,L=this.state.inputValue,B=L===void 0?null:L,Z=typeof k=="number"?k.toFixed(X):"".concat(k),re=k!==U||Z!=="".concat(B);return"value"in this.props?(B=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:B},z)):this.setState({value:k,inputValue:this.toPrecisionAsStep(P)},z),re&&this.props.onChange(k),k}},{key:"getMaxPrecision",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.props,k=X.precision,F=X.step;if(x(k))return k;var U=this.getPrecision(z),L=this.getPrecision(F),B=this.getPrecision(P);return P?Math.max(B,U+L):U+L}},{key:"getPrecisionFactor",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.getMaxPrecision(P,z);return Math.pow(10,X)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(P){return this.props.formatter?this.props.formatter(P):P}},{key:"toPrecisionAsStep",value:function(P){if(this.isNotCompleteNumber(P)||P==="")return P;var z=Math.abs(this.getMaxPrecision(P));return isNaN(z)?P.toString():Number(P).toFixed(z)}},{key:"toNumber",value:function(P){var z=this.props.precision,X=this.state.focused,k=P&&P.length>16&&X;return this.isNotCompleteNumber(P)||k?P:x(z)?Math.round(P*Math.pow(10,z))/Math.pow(10,z):Number(P)}},{key:"upStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P+k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"downStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P-k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"step",value:function(P,z){var X=this,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,F=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var U=this.props;if(U.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var B=this["".concat(P,"Step")](L,k),Z=B>U.max||BU.max?B=U.max:B=he),Je=(Xe||Xe===0)&&(isNaN(Xe)||Number(Xe)<=Se),Ye=Ve||k||F,Ne=Je||k||F,He=n()("".concat(X,"-handler"),"".concat(X,"-handler-up"),Object(v.a)({},"".concat(X,"-handler-up-disabled"),Ye)),ve=n()("".concat(X,"-handler"),"".concat(X,"-handler-down"),Object(v.a)({},"".concat(X,"-handler-down-disabled"),Ne)),xe=U?{onTouchStart:Ye?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ye?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},de=U?{onTouchStart:Ne?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Ne?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Ge,style:ke,title:te,onMouseEnter:Re,onMouseLeave:Ce,onMouseOver:pe,onMouseOut:me,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(X,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":Ye,className:He}),B||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-up-inner"),onClick:d})),e.a.createElement("span",Object.assign({unselectable:"on"},de,{role:"button","aria-label":"Decrease Value","aria-disabled":Ne,className:ve}),Z||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-down-inner"),onClick:d}))),e.a.createElement("div",{className:"".concat(X,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":he,"aria-valuenow":Xe,required:se,type:fe,placeholder:Fe,onPaste:Le,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(X,"-input"),tabIndex:ae,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:bt?this.onKeyDown:c,onKeyUp:bt?this.onKeyUp:c,autoFocus:le,maxLength:oe,readOnly:F,disabled:k,max:he,min:Se,step:Y,name:Ee,title:te,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Oe),pattern:Q,inputMode:q,onInput:ge},Me))))}}]),M}(e.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:f,required:!1,autoComplete:"off"};var w=C,S=H.a=w},e7zE:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.SHA1,p=s.HMAC,e=s.PBKDF2=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,n){for(var l=this.cfg,r=p.create(l.hasher,o),i=g.create(),t=g.create([1]),a=i.words,c=t.words,d=l.keySize,f=l.iterations;a.length>>24&255)+(ve>>>8&65280)+((ve&65280)<<8)+((ve&255)<<24)}function Ee(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Le(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,ve.total_in=ve.total_out=xe.total=0,ve.msg="",xe.wrap&&(ve.adler=xe.wrap&1),xe.mode=O,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new v.Buf32(q),xe.distcode=xe.distdyn=new v.Buf32(Q),xe.sane=1,xe.back=-1,a)}function ge(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Le(ve))}function De(ve,xe){var de,je;return!ve||!ve.state?f:(je=ve.state,xe<0?(de=0,xe=-xe):(de=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15)?f:(je.window!==null&&je.wbits!==xe&&(je.window=null),je.wrap=de,je.wbits=xe,ge(ve)))}function _e(ve,xe){var de,je;return ve?(je=new Ee,ve.state=je,je.window=null,de=De(ve,xe),de!==a&&(ve.state=null),de):f}function Xe(ve){return _e(ve,oe)}var tt=!0,Ge,Me;function bt(ve){if(tt){var xe;for(Ge=new v.Buf32(512),Me=new v.Buf32(32),xe=0;xe<144;)ve.lens[xe++]=8;for(;xe<256;)ve.lens[xe++]=9;for(;xe<280;)ve.lens[xe++]=7;for(;xe<288;)ve.lens[xe++]=8;for((0,s.default)(n,ve.lens,0,288,Ge,0,ve.work,{bits:9}),xe=0;xe<32;)ve.lens[xe++]=5;(0,s.default)(l,ve.lens,0,32,Me,0,ve.work,{bits:5}),tt=!1}ve.lencode=Ge,ve.lenbits=9,ve.distcode=Me,ve.distbits=5}function Oe(ve,xe,de,je){var Qe,ne=ve.state;return ne.window===null&&(ne.wsize=1<=ne.wsize?(v.arraySet(ne.window,xe,de-ne.wsize,ne.wsize,0),ne.wnext=0,ne.whave=ne.wsize):(Qe=ne.wsize-ne.wnext,Qe>je&&(Qe=je),v.arraySet(ne.window,xe,de-je,Qe,ne.wnext),je-=Qe,je?(v.arraySet(ne.window,xe,de-je,je,0),ne.wnext=je,ne.whave=ne.wsize):(ne.wnext+=Qe,ne.wnext===ne.wsize&&(ne.wnext=0),ne.whave>>8&255,de.check=(0,y.default)(de.check,Kt,2,0),$e=0,it=0,de.mode=C;break}if(de.flags=0,de.head&&(de.head.done=!1),!(de.wrap&1)||((($e&255)<<8)+($e>>8))%31){ve.msg="incorrect header check",de.mode=fe;break}if(($e&15)!==x){ve.msg="unknown compression method",de.mode=fe;break}if($e>>>=4,it-=4,Ut=($e&15)+8,de.wbits===0)de.wbits=Ut;else if(Ut>de.wbits){ve.msg="invalid window size",de.mode=fe;break}de.dmax=1<>8&1),de.flags&512&&(Kt[0]=$e&255,Kt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,it=0,de.mode=w;case w:for(;it<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>8&255,Kt[2]=$e>>>16&255,Kt[3]=$e>>>24&255,de.check=(0,y.default)(de.check,Kt,4,0)),$e=0,it=0,de.mode=S;case S:for(;it<16;){if(lt===0)break e;lt--,$e+=je[ne++]<>8),de.flags&512&&(Kt[0]=$e&255,Kt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,it=0,de.mode=A;case A:if(de.flags&1024){for(;it<16;){if(lt===0)break e;lt--,$e+=je[ne++]<>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,it=0}else de.head&&(de.head.extra=null);de.mode=D;case D:if(de.flags&1024&&(st=de.length,st>lt&&(st=lt),st&&(de.head&&(Ut=de.head.extra_len-de.length,de.head.extra||(de.head.extra=new Array(de.head.extra_len)),v.arraySet(de.head.extra,je,ne,st,Ut)),de.flags&512&&(de.check=(0,y.default)(de.check,je,st,ne)),lt-=st,ne+=st,de.length-=st),de.length))break e;de.length=0,de.mode=M;case M:if(de.flags&2048){if(lt===0)break e;st=0;do Ut=je[ne+st++],de.head&&Ut&&de.length<65536&&(de.head.name+=String.fromCharCode(Ut));while(Ut&&st>9&1,de.head.done=!0),ve.adler=de.check=0,de.mode=k;break;case z:for(;it<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=it&7,it-=it&7,de.mode=se;break}for(;it<3;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=1,it-=1;switch($e&3){case 0:de.mode=U;break;case 1:if(bt(de),de.mode=Se,xe===t){$e>>>=2,it-=2;break e}break;case 2:de.mode=Z;break;case 3:ve.msg="invalid block type",de.mode=fe}$e>>>=2,it-=2;break;case U:for($e>>>=it&7,it-=it&7;it<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>16^65535)){ve.msg="invalid stored block lengths",de.mode=fe;break}if(de.length=$e&65535,$e=0,it=0,de.mode=L,xe===t)break e;case L:de.mode=B;case B:if(st=de.length,st){if(st>lt&&(st=lt),st>Be&&(st=Be),st===0)break e;v.arraySet(Qe,je,ne,st,Ze),lt-=st,ne+=st,Be-=st,Ze+=st,de.length-=st;break}de.mode=k;break;case Z:for(;it<14;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=5,it-=5,de.ndist=($e&31)+1,$e>>>=5,it-=5,de.ncode=($e&15)+4,$e>>>=4,it-=4,de.nlen>286||de.ndist>30){ve.msg="too many length or distance symbols",de.mode=fe;break}de.have=0,de.mode=re;case re:for(;de.have>>=3,it-=3}for(;de.have<19;)de.lens[$t[de.have++]]=0;if(de.lencode=de.lendyn,de.lenbits=7,rn={bits:de.lenbits},kt=(0,s.default)(o,de.lens,0,19,de.lencode,0,de.work,rn),de.lenbits=rn.bits,kt){ve.msg="invalid code lengths set",de.mode=fe;break}de.have=0,de.mode=he;case he:for(;de.have>>24,Bt=Et>>>16&255,Ht=Et&65535,ht<=it);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=ht,it-=ht,de.lens[de.have++]=Ht;else{if(Ht===16){for(Gt=ht+2;it>>=ht,it-=ht,de.have===0){ve.msg="invalid bit length repeat",de.mode=fe;break}Ut=de.lens[de.have-1],st=3+($e&3),$e>>>=2,it-=2}else if(Ht===17){for(Gt=ht+3;it>>=ht,it-=ht,Ut=0,st=3+($e&7),$e>>>=3,it-=3}else{for(Gt=ht+7;it>>=ht,it-=ht,Ut=0,st=11+($e&127),$e>>>=7,it-=7}if(de.have+st>de.nlen+de.ndist){ve.msg="invalid bit length repeat",de.mode=fe;break}for(;st--;)de.lens[de.have++]=Ut}}if(de.mode===fe)break;if(de.lens[256]===0){ve.msg="invalid code -- missing end-of-block",de.mode=fe;break}if(de.lenbits=9,rn={bits:de.lenbits},kt=(0,s.default)(n,de.lens,0,de.nlen,de.lencode,0,de.work,rn),de.lenbits=rn.bits,kt){ve.msg="invalid literal/lengths set",de.mode=fe;break}if(de.distbits=6,de.distcode=de.distdyn,rn={bits:de.distbits},kt=(0,s.default)(l,de.lens,de.nlen,de.ndist,de.distcode,0,de.work,rn),de.distbits=rn.bits,kt){ve.msg="invalid distances set",de.mode=fe;break}if(de.mode=Se,xe===t)break e;case Se:de.mode=ke;case ke:if(lt>=6&&Be>=258){ve.next_out=Ze,ve.avail_out=Be,ve.next_in=ne,ve.avail_in=lt,de.hold=$e,de.bits=it,(0,g.default)(ve,pt),Ze=ve.next_out,Qe=ve.output,Be=ve.avail_out,ne=ve.next_in,je=ve.input,lt=ve.avail_in,$e=de.hold,it=de.bits,de.mode===k&&(de.back=-1);break}for(de.back=0;!(Et=de.lencode[$e&(1<>>24,Bt=Et>>>16&255,Ht=Et&65535,ht<=it);){if(lt===0)break e;lt--,$e+=je[ne++]<>mt)],ht=Et>>>24,Bt=Et>>>16&255,Ht=Et&65535,mt+ht<=it);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=mt,it-=mt,de.back+=mt}if($e>>>=ht,it-=ht,de.back+=ht,de.length=Ht,Bt===0){de.mode=me;break}if(Bt&32){de.back=-1,de.mode=k;break}if(Bt&64){ve.msg="invalid literal/length code",de.mode=fe;break}de.extra=Bt&15,de.mode=te;case te:if(de.extra){for(Gt=de.extra;it>>=de.extra,it-=de.extra,de.back+=de.extra}de.was=de.length,de.mode=Re;case Re:for(;!(Et=de.distcode[$e&(1<>>24,Bt=Et>>>16&255,Ht=Et&65535,ht<=it);){if(lt===0)break e;lt--,$e+=je[ne++]<>mt)],ht=Et>>>24,Bt=Et>>>16&255,Ht=Et&65535,mt+ht<=it);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=mt,it-=mt,de.back+=mt}if($e>>>=ht,it-=ht,de.back+=ht,Bt&64){ve.msg="invalid distance code",de.mode=fe;break}de.offset=Ht,de.extra=Bt&15,de.mode=Ce;case Ce:if(de.extra){for(Gt=de.extra;it>>=de.extra,it-=de.extra,de.back+=de.extra}if(de.offset>de.dmax){ve.msg="invalid distance too far back",de.mode=fe;break}de.mode=pe;case pe:if(Be===0)break e;if(st=pt-Be,de.offset>st){if(st=de.offset-st,st>de.whave&&de.sane){ve.msg="invalid distance too far back",de.mode=fe;break}st>de.wnext?(st-=de.wnext,Pe=de.wsize-st):Pe=de.wnext-st,st>de.length&&(st=de.length),ze=de.window}else ze=Qe,Pe=Ze-de.offset,st=de.length;st>Be&&(st=Be),Be-=st,de.length-=st;do Qe[Ze++]=ze[Pe++];while(--st);de.length===0&&(de.mode=ke);break;case me:if(Be===0)break e;Qe[Ze++]=de.length,Be--,de.mode=ke;break;case se:if(de.wrap){for(;it<32;){if(lt===0)break e;lt--,$e|=je[ne++]<0&&arguments[0]!==void 0?arguments[0]:[],Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=he.length,te=Se.length;if(Math.abs(ke-te)!==1)return{add:!1,key:null};function Re(Ce,pe){var me=new Map;Ce.forEach(function(be){me.set(be,!0)});var se=pe.filter(function(be){return!me.has(be)});return se.length===1?se[0]:null}return ke ").concat(Se);return Se}var k=function(Se,ke){var te=Se.prefixCls,Re=Se.data,Ce=Se.selectable,pe=Se.checkable,me=Se.expandedKeys,se=Se.selectedKeys,be=Se.checkedKeys,ae=Se.loadedKeys,fe=Se.loadingKeys,Fe=Se.halfCheckedKeys,ie=Se.keyEntities,q=Se.disabled,Q=Se.dragging,Y=Se.dragOverNodeKey,oe=Se.dropPosition,le=Se.motion,Ee=Se.height,Le=Se.itemHeight,ge=Se.virtual,De=Se.focusable,_e=Se.activeItem,Xe=Se.focused,tt=Se.tabIndex,Ge=Se.onKeyDown,Me=Se.onFocus,bt=Se.onBlur,Oe=Se.onActiveChange,Ve=Se.onListChangeStart,Je=Se.onListChangeEnd,Ye=Object(c.a)(Se,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Ne=p.useRef(null);p.useImperativeHandle(ke,function(){return{scrollTo:function(Ut){Ne.current.scrollTo(Ut)}}});var He=p.useState(me),ve=Object(a.a)(He,2),xe=ve[0],de=ve[1],je=p.useState(Re),Qe=Object(a.a)(je,2),ne=Qe[0],Ze=Qe[1],lt=p.useState(Re),Be=Object(a.a)(lt,2),$e=Be[0],it=Be[1],wt=p.useState([]),pt=Object(a.a)(wt,2),st=pt[0],Pe=pt[1],ze=p.useState(null),Et=Object(a.a)(ze,2),ht=Et[0],Bt=Et[1];function Ht(){Ze(Re),it(Re),Pe([]),Bt(null),Je()}p.useEffect(function(){de(me);var jt=O(xe,me);if(jt.key!==null)if(jt.add){var Ut=ne.findIndex(function(Ln){var pn=Ln.data.key;return pn===jt.key}),kt=P(C(ne,Re,jt.key),ge,Ee,Le),Kt=ne.slice();Kt.splice(Ut+1,0,N),it(Kt),Pe(kt),Bt("show")}else{var rn=Re.findIndex(function(Ln){var pn=Ln.data.key;return pn===jt.key}),Gt=P(C(Re,ne,jt.key),ge,Ee,Le),$t=Re.slice();$t.splice(rn+1,0,N),it($t),Pe(Gt),Bt("hide")}else ne!==Re&&(Ze(Re),it(Re))},[me,Re]),p.useEffect(function(){Q||Ht()},[Q]);var mt=le?$e:Re,Xt={expandedKeys:me,selectedKeys:se,loadedKeys:ae,loadingKeys:fe,checkedKeys:be,halfCheckedKeys:Fe,dragOverNodeKey:Y,dropPosition:oe,keyEntities:ie};return p.createElement(p.Fragment,null,Xe&&_e&&p.createElement("span",{style:w,"aria-live":"assertive"},X(_e)),p.createElement("div",{role:"tree"},p.createElement("input",{style:w,disabled:De===!1||q,tabIndex:De!==!1?tt:null,onKeyDown:Ge,onFocus:Me,onBlur:bt,value:"",onChange:S})),p.createElement(d.a,Object.assign({},Ye,{data:mt,itemKey:z,height:Ee,fullHeight:!1,virtual:ge,itemHeight:Le,prefixCls:"".concat(te,"-list"),ref:Ne}),function(jt){var Ut=jt.pos,kt=jt.data,Kt=kt.key,rn=Object(c.a)(kt,["key"]),Gt=jt.isStart,$t=jt.isEnd,Ln=Object(t.e)(Kt,Ut);delete rn.children;var pn=Object(t.f)(Ln,Xt);return p.createElement(x,Object.assign({},rn,pn,{active:_e&&Kt===_e.data.key,pos:Ut,data:jt.data,isStart:Gt,isEnd:$t,motion:le,motionNodes:Kt===A?st:null,motionType:ht,onMotionStart:Ve,onMotionEnd:Ht,treeNodeRequiredProps:Xt,onMouseMove:function(){Oe(null)}}))}))},F=p.forwardRef(k);F.displayName="NodeList";var U=F,L=b("NvD2"),B=function(he){Object(s.a)(ke,he);var Se=Object(_.a)(ke);function ke(){var te;return Object(y.a)(this,ke),te=Se.apply(this,arguments),te.destroyed=!1,te.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},te.listRef=p.createRef(),te.onNodeDragStart=function(Re,Ce){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=te.props.onDragStart,ae=Ce.props.eventKey;te.dragNode=Ce;var fe=Object(i.b)(me,ae);te.setState({dragging:!0,dragNodesKeys:Object(i.g)(ae,se)}),te.setExpandedKeys(fe),be&&be({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragEnter=function(Re,Ce){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=pe.dragNodesKeys,ae=te.props.onDragEnter,fe=Ce.props,Fe=fe.pos,ie=fe.eventKey;if(!te.dragNode||be.indexOf(ie)!==-1)return;var q=Object(i.c)(Re,Ce);if(te.dragNode.props.eventKey===ie&&q===0){te.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){te.setState({dragOverNodeKey:ie,dropPosition:q}),te.delayedDragEnterLogic||(te.delayedDragEnterLogic={}),Object.keys(te.delayedDragEnterLogic).forEach(function(Q){clearTimeout(te.delayedDragEnterLogic[Q])}),te.delayedDragEnterLogic[Fe]=window.setTimeout(function(){if(!te.state.dragging)return;var Q=Object(T.a)(me),Y=se[ie];Y&&(Y.children||[]).length&&(Q=Object(i.a)(me,ie)),"expandedKeys"in te.props||te.setExpandedKeys(Q),ae&&ae({event:Re,node:Object(t.b)(Ce.props),expandedKeys:Q})},400)},0)},te.onNodeDragOver=function(Re,Ce){var pe=te.state.dragNodesKeys,me=te.props.onDragOver,se=Ce.props.eventKey;if(pe.indexOf(se)!==-1)return;if(te.dragNode&&se===te.state.dragOverNodeKey){var be=Object(i.c)(Re,Ce);if(be===te.state.dropPosition)return;te.setState({dropPosition:be})}me&&me({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragLeave=function(Re,Ce){var pe=te.props.onDragLeave;te.setState({dragOverNodeKey:""}),pe&&pe({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragEnd=function(Re,Ce){var pe=te.props.onDragEnd;te.setState({dragOverNodeKey:""}),te.cleanDragState(),pe&&pe({event:Re,node:Object(t.b)(Ce.props)}),te.dragNode=null},te.onNodeDrop=function(Re,Ce){var pe=te.state,me=pe.dragNodesKeys,se=me===void 0?[]:me,be=pe.dropPosition,ae=te.props.onDrop,fe=Ce.props,Fe=fe.eventKey,ie=fe.pos;if(te.setState({dragOverNodeKey:""}),te.cleanDragState(),se.indexOf(Fe)!==-1){Object(o.a)(!1,"Can not drop to dragNode(include it's children node)");return}var q=Object(i.k)(ie),Q={event:Re,node:Object(t.b)(Ce.props),dragNode:te.dragNode?Object(t.b)(te.dragNode.props):null,dragNodesKeys:se.slice(),dropPosition:be+Number(q[q.length-1]),dropToGap:!1};be!==0&&(Q.dropToGap=!0),ae&&ae(Q),te.dragNode=null},te.cleanDragState=function(){var Re=te.state.dragging;Re&&te.setState({dragging:!1})},te.onNodeClick=function(Re,Ce){var pe=te.props.onClick;pe&&pe(Re,Ce)},te.onNodeDoubleClick=function(Re,Ce){var pe=te.props.onDoubleClick;pe&&pe(Re,Ce)},te.onNodeSelect=function(Re,Ce){var pe=te.state.selectedKeys,me=te.state.keyEntities,se=te.props,be=se.onSelect,ae=se.multiple,fe=Ce.selected,Fe=Ce.key,ie=!fe;ie?ae?pe=Object(i.a)(pe,Fe):pe=[Fe]:pe=Object(i.b)(pe,Fe);var q=pe.map(function(Q){var Y=me[Q];return Y?Y.node:null}).filter(function(Q){return Q});te.setUncontrolledState({selectedKeys:pe}),be&&be(pe,{event:"select",selected:ie,node:Ce,selectedNodes:q,nativeEvent:Re.nativeEvent})},te.onNodeCheck=function(Re,Ce,pe){var me=te.state,se=me.keyEntities,be=me.checkedKeys,ae=me.halfCheckedKeys,fe=te.props,Fe=fe.checkStrictly,ie=fe.onCheck,q=Ce.key,Q,Y={event:"check",node:Ce,checked:pe,nativeEvent:Re.nativeEvent};if(Fe){var oe=pe?Object(i.a)(be,q):Object(i.b)(be,q),le=Object(i.b)(ae,q);Q={checked:oe,halfChecked:le},Y.checkedNodes=oe.map(function(Xe){return se[Xe]}).filter(function(Xe){return Xe}).map(function(Xe){return Xe.node}),te.setUncontrolledState({checkedKeys:oe})}else{var Ee=Object(L.a)([].concat(Object(T.a)(be),[q]),!0,se),Le=Ee.checkedKeys,ge=Ee.halfCheckedKeys;if(!pe){var De=new Set(Le);De.delete(q);var _e=Object(L.a)(Array.from(De),{checked:!1,halfCheckedKeys:ge},se);Le=_e.checkedKeys,ge=_e.halfCheckedKeys}Q=Le,Y.checkedNodes=[],Y.checkedNodesPositions=[],Y.halfCheckedKeys=ge,Le.forEach(function(Xe){var tt=se[Xe];if(!tt)return;var Ge=tt.node,Me=tt.pos;Y.checkedNodes.push(Ge),Y.checkedNodesPositions.push({node:Ge,pos:Me})}),te.setUncontrolledState({checkedKeys:Le},!1,{halfCheckedKeys:ge})}ie&&ie(Q,Y)},te.onNodeLoad=function(Re){return new Promise(function(Ce){te.setState(function(pe){var me=pe.loadedKeys,se=me===void 0?[]:me,be=pe.loadingKeys,ae=be===void 0?[]:be,fe=te.props,Fe=fe.loadData,ie=fe.onLoad,q=Re.key;if(!Fe||se.indexOf(q)!==-1||ae.indexOf(q)!==-1)return{};var Q=Fe(Re);return Q.then(function(){var Y=te.state,oe=Y.loadedKeys,le=Y.loadingKeys,Ee=Object(i.a)(oe,q),Le=Object(i.b)(le,q);ie&&ie(Ee,{event:"load",node:Re}),te.setUncontrolledState({loadedKeys:Ee}),te.setState({loadingKeys:Le}),Ce()}),{loadingKeys:Object(i.a)(ae,q)}})})},te.onNodeMouseEnter=function(Re,Ce){var pe=te.props.onMouseEnter;pe&&pe({event:Re,node:Ce})},te.onNodeMouseLeave=function(Re,Ce){var pe=te.props.onMouseLeave;pe&&pe({event:Re,node:Ce})},te.onNodeContextMenu=function(Re,Ce){var pe=te.props.onRightClick;pe&&(Re.preventDefault(),pe({event:Re,node:Ce}))},te.onFocus=function(){var Re=te.props.onFocus;te.setState({focused:!0}),Re&&Re.apply(void 0,arguments)},te.onBlur=function(){var Re=te.props.onBlur;te.setState({focused:!1}),te.onActiveChange(null),Re&&Re.apply(void 0,arguments)},te.getTreeNodeRequiredProps=function(){var Re=te.state,Ce=Re.expandedKeys,pe=Re.selectedKeys,me=Re.loadedKeys,se=Re.loadingKeys,be=Re.checkedKeys,ae=Re.halfCheckedKeys,fe=Re.dragOverNodeKey,Fe=Re.dropPosition,ie=Re.keyEntities;return{expandedKeys:Ce||[],selectedKeys:pe||[],loadedKeys:me||[],loadingKeys:se||[],checkedKeys:be||[],halfCheckedKeys:ae||[],dragOverNodeKey:fe,dropPosition:Fe,keyEntities:ie}},te.setExpandedKeys=function(Re){var Ce=te.state.treeData,pe=Object(t.d)(Ce,Re);te.setUncontrolledState({expandedKeys:Re,flattenNodes:pe},!0)},te.onNodeExpand=function(Re,Ce){var pe=te.state.expandedKeys,me=te.state.listChanging,se=te.props,be=se.onExpand,ae=se.loadData,fe=Ce.key,Fe=Ce.expanded;if(me)return;var ie=pe.indexOf(fe),q=!Fe;if(Object(o.a)(Fe&&ie!==-1||!Fe&&ie===-1,"Expand state not sync with index check"),q?pe=Object(i.a)(pe,fe):pe=Object(i.b)(pe,fe),te.setExpandedKeys(pe),be&&be(pe,{node:Ce,expanded:q,nativeEvent:Re.nativeEvent}),q&&ae){var Q=te.onNodeLoad(Ce);Q&&Q.then(function(){var Y=Object(t.d)(te.state.treeData,pe);te.setUncontrolledState({flattenNodes:Y})})}},te.onListChangeStart=function(){te.setUncontrolledState({listChanging:!0})},te.onListChangeEnd=function(){setTimeout(function(){te.setUncontrolledState({listChanging:!1})})},te.onActiveChange=function(Re){var Ce=te.state.activeKey,pe=te.props.onActiveChange;if(Ce===Re)return;te.setState({activeKey:Re}),Re!==null&&te.scrollTo({key:Re}),pe&&pe(Re)},te.getActiveItem=function(){var Re=te.state,Ce=Re.activeKey,pe=Re.flattenNodes;return Ce===null?null:pe.find(function(me){var se=me.data.key;return se===Ce})||null},te.offsetActiveKey=function(Re){var Ce=te.state,pe=Ce.flattenNodes,me=Ce.activeKey,se=pe.findIndex(function(fe){var Fe=fe.data.key;return Fe===me});se===-1&&Re<0&&(se=pe.length),se=(se+Re+pe.length)%pe.length;var be=pe[se];if(be){var ae=be.data.key;te.onActiveChange(ae)}else te.onActiveChange(null)},te.onKeyDown=function(Re){var Ce=te.state,pe=Ce.activeKey,me=Ce.expandedKeys,se=Ce.checkedKeys,be=te.props,ae=be.onKeyDown,fe=be.checkable,Fe=be.selectable;switch(Re.which){case e.a.UP:{te.offsetActiveKey(-1),Re.preventDefault();break}case e.a.DOWN:{te.offsetActiveKey(1),Re.preventDefault();break}}var ie=te.getActiveItem();if(ie&&ie.data){var q=te.getTreeNodeRequiredProps(),Q=ie.data.isLeaf===!1||!!(ie.data.children||[]).length,Y=Object(t.b)(Object(v.a)(Object(v.a)({},Object(t.f)(pe,q)),{},{data:ie.data,active:!0}));switch(Re.which){case e.a.LEFT:{Q&&me.includes(pe)?te.onNodeExpand({},Y):ie.parent&&te.onActiveChange(ie.parent.data.key),Re.preventDefault();break}case e.a.RIGHT:{Q&&!me.includes(pe)?te.onNodeExpand({},Y):ie.children&&ie.children.length&&te.onActiveChange(ie.children[0].data.key),Re.preventDefault();break}case e.a.ENTER:case e.a.SPACE:{fe&&!Y.disabled&&Y.checkable!==!1&&!Y.disableCheckbox?te.onNodeCheck({},Y,!se.includes(pe)):!fe&&Fe&&!Y.disabled&&Y.selectable!==!1&&te.onNodeSelect({},Y);break}}}ae&&ae(Re)},te.setUncontrolledState=function(Re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(te.destroyed)return;var me=!1,se=!0,be={};Object.keys(Re).forEach(function(ae){if(ae in te.props){se=!1;return}me=!0,be[ae]=Re[ae]}),me&&(!Ce||se)&&te.setState(Object(v.a)(Object(v.a)({},be),pe))},te.scrollTo=function(Re){te.listRef.current.scrollTo(Re)},te}return Object(g.a)(ke,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var Re,Ce=this.state,pe=Ce.focused,me=Ce.flattenNodes,se=Ce.keyEntities,be=Ce.dragging,ae=Ce.activeKey,fe=this.props,Fe=fe.prefixCls,ie=fe.className,q=fe.style,Q=fe.showLine,Y=fe.focusable,oe=fe.tabIndex,le=oe===void 0?0:oe,Ee=fe.selectable,Le=fe.showIcon,ge=fe.icon,De=fe.switcherIcon,_e=fe.draggable,Xe=fe.checkable,tt=fe.checkStrictly,Ge=fe.disabled,Me=fe.motion,bt=fe.loadData,Oe=fe.filterTreeNode,Ve=fe.height,Je=fe.itemHeight,Ye=fe.virtual,Ne=fe.titleRender,He=fe.onContextMenu,ve=Object(i.f)(this.props);return p.createElement(r.a.Provider,{value:{prefixCls:Fe,selectable:Ee,showIcon:Le,icon:ge,switcherIcon:De,draggable:_e,checkable:Xe,checkStrictly:tt,disabled:Ge,keyEntities:se,loadData:bt,filterTreeNode:Oe,titleRender:Ne,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},p.createElement("div",{className:l()(Fe,ie,(Re={},Object(I.a)(Re,"".concat(Fe,"-show-line"),Q),Object(I.a)(Re,"".concat(Fe,"-focused"),pe),Object(I.a)(Re,"".concat(Fe,"-active-focused"),ae!==null),Re))},p.createElement(U,Object.assign({ref:this.listRef,prefixCls:Fe,style:q,data:me,disabled:Ge,selectable:Ee,checkable:!!Xe,motion:Me,dragging:be,height:Ve,itemHeight:Je,virtual:Ye,focusable:Y,focused:pe,tabIndex:le,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:He},this.getTreeNodeRequiredProps(),ve))))}}],[{key:"getDerivedStateFromProps",value:function(Re,Ce){var pe=Ce.prevProps,me={prevProps:Re};function se(ge){return!pe&&ge in Re||pe&&pe[ge]!==Re[ge]}var be;if(se("treeData")?be=Re.treeData:se("children")&&(Object(o.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=Object(t.c)(Re.children)),be){me.treeData=be;var ae=Object(t.a)(be);me.keyEntities=Object(v.a)(Object(I.a)({},A,M),ae.keyEntities)}var fe=me.keyEntities||Ce.keyEntities;if(se("expandedKeys")||pe&&se("autoExpandParent"))me.expandedKeys=Re.autoExpandParent||!pe&&Re.defaultExpandParent?Object(i.e)(Re.expandedKeys,fe):Re.expandedKeys;else if(!pe&&Re.defaultExpandAll){var Fe=Object(v.a)({},fe);delete Fe[A],me.expandedKeys=Object.keys(Fe).map(function(ge){return Fe[ge].key})}else!pe&&Re.defaultExpandedKeys&&(me.expandedKeys=Re.autoExpandParent||Re.defaultExpandParent?Object(i.e)(Re.defaultExpandedKeys,fe):Re.defaultExpandedKeys);if(me.expandedKeys||delete me.expandedKeys,be||me.expandedKeys){var ie=Object(t.d)(be||Ce.treeData,me.expandedKeys||Ce.expandedKeys);me.flattenNodes=ie}if(Re.selectable&&(se("selectedKeys")?me.selectedKeys=Object(i.d)(Re.selectedKeys,Re):!pe&&Re.defaultSelectedKeys&&(me.selectedKeys=Object(i.d)(Re.defaultSelectedKeys,Re))),Re.checkable){var q;if(se("checkedKeys")?q=Object(i.j)(Re.checkedKeys)||{}:!pe&&Re.defaultCheckedKeys?q=Object(i.j)(Re.defaultCheckedKeys)||{}:be&&(q=Object(i.j)(Re.checkedKeys)||{checkedKeys:Ce.checkedKeys,halfCheckedKeys:Ce.halfCheckedKeys}),q){var Q=q,Y=Q.checkedKeys,oe=Y===void 0?[]:Y,le=Q.halfCheckedKeys,Ee=le===void 0?[]:le;if(!Re.checkStrictly){var Le=Object(L.a)(oe,!0,fe);oe=Le.checkedKeys,Ee=Le.halfCheckedKeys}me.checkedKeys=oe,me.halfCheckedKeys=Ee}}return se("loadedKeys")&&(me.loadedKeys=Re.loadedKeys),me}}]),ke}(p.Component);B.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},B.TreeNode=h.a;var Z=B,re=H.b=Z},fXAG:function(j,H,b){"use strict";b.d(H,"j",function(){return I}),b.d(H,"i",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"eb",function(){return y}),b.d(H,"o",function(){return g}),b.d(H,"S",function(){return s}),b.d(H,"fb",function(){return _}),b.d(H,"u",function(){return p}),b.d(H,"v",function(){return e}),b.d(H,"cb",function(){return o}),b.d(H,"A",function(){return n}),b.d(H,"m",function(){return l}),b.d(H,"Y",function(){return r}),b.d(H,"s",function(){return i}),b.d(H,"N",function(){return t}),b.d(H,"bb",function(){return a}),b.d(H,"db",function(){return c}),b.d(H,"l",function(){return d}),b.d(H,"Q",function(){return f}),b.d(H,"ab",function(){return h}),b.d(H,"x",function(){return u}),b.d(H,"z",function(){return E}),b.d(H,"X",function(){return x}),b.d(H,"b",function(){return O}),b.d(H,"H",function(){return C}),b.d(H,"a",function(){return w}),b.d(H,"c",function(){return A}),b.d(H,"P",function(){return D}),b.d(H,"g",function(){return M}),b.d(H,"t",function(){return N}),b.d(H,"Z",function(){return P}),b.d(H,"y",function(){return z}),b.d(H,"B",function(){return X}),b.d(H,"f",function(){return k}),b.d(H,"e",function(){return F}),b.d(H,"W",function(){return U}),b.d(H,"h",function(){return L}),b.d(H,"d",function(){return B}),b.d(H,"R",function(){return re}),b.d(H,"n",function(){return he}),b.d(H,"F",function(){return Se}),b.d(H,"I",function(){return ke}),b.d(H,"D",function(){return te}),b.d(H,"E",function(){return Re}),b.d(H,"C",function(){return Ce}),b.d(H,"G",function(){return pe}),b.d(H,"U",function(){return me}),b.d(H,"q",function(){return se}),b.d(H,"r",function(){return be}),b.d(H,"V",function(){return ae}),b.d(H,"T",function(){return fe}),b.d(H,"p",function(){return Fe}),b.d(H,"M",function(){return ie}),b.d(H,"L",function(){return q}),b.d(H,"J",function(){return Q}),b.d(H,"K",function(){return Y}),b.d(H,"O",function(){return oe}),b.d(H,"w",function(){return le});var I="FETCH_TASK_START",v="FETCH_TASK_FAILURE",T="FETCH_TASK_SUCCESS",y="UPDATE_TASK_DATA",g="HIDE_EVALUATE_RESULT",s="SHOW_EVALUATE_RESULT",_="UPDATE_TIMESTRAP",p="MOVE_X",e="MOVE_Y",o="TRIGGER_RIGHT_PANEL_MASK ",n="SET_ACTIVE_INDEX",l="GET_TASK_LIST",r="SHOW_TASK_LIST",i="HIDE_TASK_LIST",t="SET_TASK_STAR",a="TRIGGER_ENLARGE_UNITY3D ",c="TRIGGER_TAB_FIXED ",d="GET_DISCUSSES",f="SHOW_DISCUSSES_LOADING",h="TOP_OR_DOWN_DISCUSS",u="PLUS_DISCUSS",E="SET_ACTION_TYPE",x="SHOW_REWARD_DIALOG",O="CANCEL_REWARD_DIALOG",C="SET_REWARD",w="ACTIVE_DISCUSS_INDEX",S="CREATE_DISCUSS",A="DISABLE_DISCUSS",D="SHOW_ANSWER_LOADING",M="FETCH_ANSWER_INFO",N="HIGH_TIP_MODAL",P="SHOW_TIP_MODAL",z="SELECT_UNLOCK_ANSWER",X="SET_CHOOSE_ANSWERS",k="EVAL_CHOOSE_START",F="EVAL_CHOOSE_END",U="SHOW_REP_loading",L="FETCH_REP_CONTENT",B="EDIT_REP_CONTENT",Z="SET_REP_PATH",re="SHOW_EVALUATE_LOADING",he="HIDE_EVALUATE_LOADING",Se="SET_EVALUATE_MESSAGE",ke="SET_SHOW_DIR",te="SET_EDITOR_SETTING",Re="SET_EDITOR_THEME",Ce="SET_EDITOR_FONTSIZE",pe="SET_REPOS",me="SHOW_PATH_LIST",se="HIDE_PATH_LIST",be="HIDE_PICTURE_VIEW",ae="SHOW_PICTURE_VIEW",fe="SHOW_NOTICE",Fe="HIDE_NOTICE",ie="SET_TAB_INDEX",q="SET_SSH_TABS",Q="SET_SSH_CONFIGDATA",Y="SET_SSH_CONFIGDATAARR",oe="SET_VNC_LOADING ",le="ON_TAB_TO_SPACE "},fcSX:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("md7G"),s=b("foSv"),_=b("1W/9"),p=b("q1tI"),e=b("rePB"),o=b("JX7q"),n=b("TSYQ"),l=b.n(n),r=b("qx4F"),i=b("4IlW");function t(k){return Array.isArray(k)?k:[k]}var a={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},c=Object.keys(a).filter(function(k){if(typeof document=="undefined")return!1;var F=document.getElementsByTagName("html")[0];return k in(F?F.style:{})})[0],d=a[c];function f(k,F,U,L){k.addEventListener?k.addEventListener(F,U,L):k.attachEvent&&k.attachEvent("on".concat(F),U)}function h(k,F,U,L){k.removeEventListener?k.removeEventListener(F,U,L):k.attachEvent&&k.detachEvent("on".concat(F),U)}function u(k,F){var U=typeof k=="function"?k(F):k;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var E=function(F){return!isNaN(parseFloat(F))&&isFinite(F)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),O=function k(F,U,L,B){if(!U||U===document||U instanceof Document)return!1;if(U===F.parentNode)return!0;var Z=Math.max(Math.abs(L),Math.abs(B))===Math.abs(B),re=Math.max(Math.abs(L),Math.abs(B))===Math.abs(L),he=U.scrollHeight-U.clientHeight,Se=U.scrollWidth-U.clientWidth,ke=document.defaultView.getComputedStyle(U),te=ke.overflowY==="auto"||ke.overflowY==="scroll",Re=ke.overflowX==="auto"||ke.overflowX==="scroll",Ce=he&&te,pe=Se&ℜreturn Z&&(!Ce||Ce&&(U.scrollTop>=he&&B<0||U.scrollTop<=0&&B>0))||re&&(!pe||pe&&(U.scrollLeft>=Se&&L<0||U.scrollLeft<=0&&L>0))?k(F,U.parentNode,L,B):!1};function C(k){var F=w();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.a)(this,B)}}function w(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(k){return!1}}var S={},A=function(k){Object(y.a)(U,k);var F=C(U);function U(L){var B;return Object(v.a)(this,U),B=F.call(this,L),B.domFocus=function(){B.dom&&B.dom.focus()},B.removeStartHandler=function(Z){if(Z.touches.length>1)return;B.startPos={x:Z.touches[0].clientX,y:Z.touches[0].clientY}},B.removeMoveHandler=function(Z){if(Z.changedTouches.length>1)return;var re=Z.currentTarget,he=Z.changedTouches[0].clientX-B.startPos.x,Se=Z.changedTouches[0].clientY-B.startPos.y;(re===B.maskDom||re===B.handlerDom||re===B.contentDom&&O(re,Z.target,he,Se))&&Z.cancelable&&Z.preventDefault()},B.transitionEnd=function(Z){var re=Z.target;h(re,d,B.transitionEnd),re.style.transition=""},B.onKeyDown=function(Z){if(Z.keyCode===i.a.ESC){var re=B.props.onClose;Z.stopPropagation(),re&&re(Z)}},B.onWrapperTransitionEnd=function(Z){var re=B.props,he=re.open,Se=re.afterVisibleChange;Z.target===B.contentWrapper&&Z.propertyName.match(/transform$/)&&(B.dom.style.transition="",!he&&B.getCurrentDrawerSome()&&(document.body.style.overflowX="",B.maskDom&&(B.maskDom.style.left="",B.maskDom.style.width="")),Se&&Se(!!he))},B.openLevelTransition=function(){var Z=B.props,re=Z.open,he=Z.width,Se=Z.height,ke=B.getHorizontalBoolAndPlacementName(),te=ke.isHorizontal,Re=ke.placementName,Ce=B.contentDom?B.contentDom.getBoundingClientRect()[te?"width":"height"]:0,pe=(te?he:Se)||Ce;B.setLevelAndScrolling(re,Re,pe)},B.setLevelTransform=function(Z,re,he,Se){var ke=B.props,te=ke.placement,Re=ke.levelMove,Ce=ke.duration,pe=ke.ease,me=ke.showMask;B.levelDom.forEach(function(se){se.style.transition="transform ".concat(Ce," ").concat(pe),f(se,d,B.transitionEnd);var be=Z?he:0;if(Re){var ae=u(Re,{target:se,open:Z});be=Z?ae[0]:ae[1]||0}var fe=typeof be=="number"?"".concat(be,"px"):be,Fe=te==="left"||te==="top"?fe:"-".concat(fe);Fe=me&&te==="right"&&Se?"calc(".concat(Fe," + ").concat(Se,"px)"):Fe,se.style.transform=be?"".concat(re,"(").concat(Fe,")"):""})},B.setLevelAndScrolling=function(Z,re,he){var Se=B.props.onChange;if(!x){var ke=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;B.setLevelTransform(Z,re,he,ke),B.toggleScrollingToDrawerAndBody(ke)}Se&&Se(Z)},B.toggleScrollingToDrawerAndBody=function(Z){var re=B.props,he=re.getOpenCount,Se=re.getContainer,ke=re.showMask,te=re.open,Re=Se&&Se(),Ce=he&&he();if(Re&&Re.parentNode===document.body&&ke){var pe=["touchstart"],me=[document.body,B.maskDom,B.handlerDom,B.contentDom];te&&document.body.style.overflow!=="hidden"?(Z&&B.addScrollingEffect(Z),Ce===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",me.forEach(function(se,be){if(!se)return;f(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)})):B.getCurrentDrawerSome()&&(Ce||(document.body.style.overflow=""),document.body.style.touchAction="",Z&&B.remScrollingEffect(Z),me.forEach(function(se,be){if(!se)return;h(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)}))}},B.addScrollingEffect=function(Z){var re=B.props,he=re.placement,Se=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Ce=te&&te();Ce===1&&Re();var pe="width ".concat(Se," ").concat(ke),me="transform ".concat(Se," ").concat(ke);B.dom.style.transition="none";switch(he){case"right":B.dom.style.transform="translateX(-".concat(Z,"px)");break;case"top":case"bottom":B.dom.style.width="calc(100% - ".concat(Z,"px)"),B.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(me,",").concat(pe),B.dom.style.width="",B.dom.style.transform="")})},B.remScrollingEffect=function(Z){var re=B.props,he=re.placement,Se=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Ce=te&&te();Ce||Re(!0),c&&(document.body.style.overflowX="hidden"),B.dom.style.transition="none";var pe,me="width ".concat(Se," ").concat(ke),se="transform ".concat(Se," ").concat(ke);switch(he){case"left":{B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Se);break}case"right":{B.dom.style.transform="translateX(".concat(Z,"px)"),B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Se),B.maskDom&&(B.maskDom.style.left="-".concat(Z,"px"),B.maskDom.style.width="calc(100% + ".concat(Z,"px)"));break}case"top":case"bottom":{B.dom.style.width="calc(100% + ".concat(Z,"px)"),B.dom.style.height="100%",B.dom.style.transform="translateZ(0)",pe="height 0s ".concat(ke," ").concat(Se);break}default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(se,",").concat(pe?"".concat(pe,","):"").concat(me),B.dom.style.transform="",B.dom.style.width="",B.dom.style.height="")})},B.getCurrentDrawerSome=function(){return!Object.keys(S).some(function(Z){return S[Z]})},B.getLevelDom=function(Z){var re=Z.level,he=Z.getContainer;if(x)return;var Se=he&&he(),ke=Se?Se.parentNode:null;if(B.levelDom=[],re==="all"){var te=ke?Array.prototype.slice.call(ke.children):[];te.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==Se&&B.levelDom.push(Re)})}else re&&t(re).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Ce){B.levelDom.push(Ce)})})},B.getHorizontalBoolAndPlacementName=function(){var Z=B.props.placement,re=Z==="left"||Z==="right",he="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:he}},B.state={_self:Object(o.a)(B)},B}return Object(T.a)(U,[{key:"componentDidMount",value:function(){var B=this;if(!x){var Z=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Z=!0,null}}))}catch(te){}this.passive=Z?{passive:!1}:!1}var re=this.props,he=re.open,Se=re.getContainer,ke=Se&&Se();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),he&&(ke&&ke.parentNode===document.body&&(S[this.drawerId]=he),this.openLevelTransition(),this.forceUpdate(function(){B.domFocus()}))}},{key:"componentDidUpdate",value:function(B){var Z=this.props,re=Z.open,he=Z.getContainer,Se=he&&he();re!==B.open&&(re&&this.domFocus(),Se&&Se.parentNode===document.body&&(S[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var B=this.props,Z=B.getOpenCount,re=B.open,he=B.switchScrollingEffect,Se=typeof Z=="function"&&Z();delete S[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Se||(document.body.style.overflow="",he(!0))}},{key:"render",value:function(){var B,Z=this,re=this.props,he=re.className,Se=re.children,ke=re.style,te=re.width,Re=re.height,Ce=re.defaultOpen,pe=re.open,me=re.prefixCls,se=re.placement,be=re.level,ae=re.levelMove,fe=re.ease,Fe=re.duration,ie=re.getContainer,q=re.handler,Q=re.onChange,Y=re.afterVisibleChange,oe=re.showMask,le=re.maskClosable,Ee=re.maskStyle,Le=re.onClose,ge=re.onHandleClick,De=re.keyboard,_e=re.getOpenCount,Xe=re.switchScrollingEffect,tt=Object(I.a)(re,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Ge=this.dom?pe:!1,Me=l()(me,(B={},Object(e.a)(B,"".concat(me,"-").concat(se),!0),Object(e.a)(B,"".concat(me,"-open"),Ge),Object(e.a)(B,he||"",!!he),Object(e.a)(B,"no-mask",!oe),B)),bt=this.getHorizontalBoolAndPlacementName(),Oe=bt.placementName,Ve=se==="left"||se==="top"?"-100%":"100%",Je=Ge?"":"".concat(Oe,"(").concat(Ve,")"),Ye=q&&p.cloneElement(q,{onClick:function(He){q.props.onClick&&q.props.onClick(),ge&&ge(He)},ref:function(He){Z.handlerDom=He}});return p.createElement("div",Object.assign({},tt,{tabIndex:-1,className:Me,style:ke,ref:function(He){Z.dom=He},onKeyDown:Ge&&De?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),oe&&p.createElement("div",{className:"".concat(me,"-mask"),onClick:le?Le:void 0,style:Ee,ref:function(He){Z.maskDom=He}}),p.createElement("div",{className:"".concat(me,"-content-wrapper"),style:{transform:Je,msTransform:Je,width:E(te)?"".concat(te,"px"):te,height:E(Re)?"".concat(Re,"px"):Re},ref:function(He){Z.contentWrapper=He}},p.createElement("div",{className:"".concat(me,"-content"),ref:function(He){Z.contentDom=He},onTouchStart:Ge&&oe?this.removeStartHandler:void 0,onTouchMove:Ge&&oe?this.removeMoveHandler:void 0},Se),Ye))}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he=Z._self,Se={prevProps:B};if(re!==void 0){var ke=B.placement,te=B.level;ke!==re.placement&&(he.contentDom=null),te!==re.level&&he.getLevelDom(B)}return Se}}]),U}(p.Component);A.defaultProps={switchScrollingEffect:function(){}};var D=A;function M(k){var F=N();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.a)(this,B)}}function N(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(k){return!1}}var P=function(k){Object(y.a)(U,k);var F=M(U);function U(L){var B;Object(v.a)(this,U),B=F.call(this,L),B.onHandleClick=function(re){var he=B.props,Se=he.onHandleClick,ke=he.open;if(Se&&Se(re),typeof ke=="undefined"){var te=B.state.open;B.setState({open:!te})}},B.onClose=function(re){var he=B.props,Se=he.onClose,ke=he.open;Se&&Se(re),typeof ke=="undefined"&&B.setState({open:!1})};var Z=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return B.state={open:Z},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),B}return Object(T.a)(U,[{key:"render",value:function(){var B=this,Z=this.props,re=Z.defaultOpen,he=Z.getContainer,Se=Z.wrapperClassName,ke=Z.forceRender,te=Z.handler,Re=Object(I.a)(Z,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ce=this.state.open;if(!he)return p.createElement("div",{className:Se,ref:function(se){B.dom=se}},p.createElement(D,Object.assign({},Re,{open:Ce,handler:te,getContainer:function(){return B.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!te||ke;return p.createElement(_.a,{visible:Ce,forceRender:pe,getContainer:he,wrapperClassName:Se},function(me){var se=me.visible,be=me.afterClose,ae=Object(I.a)(me,["visible","afterClose"]);return p.createElement(D,Object.assign({},Re,ae,{open:se!==void 0?se:Ce,afterVisibleChange:be!==void 0?be:Re.afterVisibleChange,handler:te,onClose:B.onClose,onHandleClick:B.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he={prevProps:B};return typeof re!="undefined"&&B.open!==re.open&&(he.open=B.open),he}}]),U}(p.Component);P.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:p.createElement("div",{className:"drawer-handle"},p.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var z=P,X=H.a=z},fjLI:function(j,H,b){"use strict";b.d(H,"f",function(){return r}),b.d(H,"b",function(){return i}),b.d(H,"a",function(){return t}),b.d(H,"d",function(){return a}),b.d(H,"e",function(){return c}),b.d(H,"c",function(){return d});var I=b("8HAY"),v=b("Vhoy"),T=b("MI8n"),y=b("JYp7"),g=b("pmY6"),s=b("24hK"),_=b("nnTU"),p=b("T8No"),e=b("Cg/j"),o=b("t9D7"),n=function(f,h,u,E){var x=arguments.length,O=x<3?h:E===null?E=Object.getOwnPropertyDescriptor(h,u):E,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,u,E);else for(var w=f.length-1;w>=0;w--)(C=f[w])&&(O=(x<3?C(O):x>3?C(h,u,O):C(h,u))||O);return x>3&&O&&Object.defineProperty(h,u,O),O},l=function(f,h){return function(u,E){h(u,E,f)}};function r(f){return f.command!==void 0}class i{constructor(f){this.id=i._idPool++,this._debugName=f}}i._idPool=0,i.CommandPalette=new i("CommandPalette"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.InlineCompletionsActions=new i("InlineCompletionsActions");const t=Object(e.c)("menuService"),a=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new T.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:f=>f===i.CommandPalette}}addCommand(f){return this.addCommands(y.a.single(f))}addCommands(f){for(const h of f)this._commands.set(h.id,h);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(g.i)(()=>{let h=!1;for(const u of f)h=this._commands.delete(u.id)||h;h&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(f){return this._commands.get(f)}getCommands(){const f=new Map;return this._commands.forEach((h,u)=>f.set(u,h)),f}appendMenuItem(f,h){return this.appendMenuItems(y.a.single({id:f,item:h}))}appendMenuItems(f){const h=new Set,u=new s.a;for(const{id:E,item:x}of f){let O=this._menuItems.get(E);O||(O=new s.a,this._menuItems.set(E,O)),u.push(O.push(x)),h.add(E)}return this._onDidChangeMenu.fire(h),Object(g.i)(()=>{if(u.size>0){for(let E of u)E();this._onDidChangeMenu.fire(h),u.clear()}})}getMenuItems(f){let h;return this._menuItems.has(f)?h=[...this._menuItems.get(f)]:h=[],f===i.CommandPalette&&this._appendImplicitItems(h),h}_appendImplicitItems(f){const h=new Set;for(const u of f)r(u)&&(h.add(u.command.id),u.alt&&h.add(u.alt.id));this._commands.forEach((u,E)=>{h.has(E)||f.push({command:u})})}};class c extends I.e{constructor(f,h,u,E){super(`submenuitem.${f.submenu.id}`,typeof f.title=="string"?f.title:f.title.value,[],"submenu");this.item=f,this._menuService=h,this._contextKeyService=u,this._options=E}get actions(){const f=[],h=this._menuService.createMenu(this.item.submenu,this._contextKeyService),u=h.getActions(this._options);h.dispose();for(const[,E]of u)E.length>0&&(f.push(...E),f.push(new I.d));return f.length&&f.pop(),f}}let d=class f{constructor(h,u,E,x,O){var C,w;if(this._commandService=O,this.id=h.id,this.label=(E==null?void 0:E.renderShortTitle)&&h.shortTitle?typeof h.shortTitle=="string"?h.shortTitle:h.shortTitle.value:typeof h.title=="string"?h.title:h.title.value,this.tooltip=(w=typeof h.tooltip=="string"?h.tooltip:(C=h.tooltip)===null||C===void 0?void 0:C.value)!==null&&w!==void 0?w:"",this.enabled=!h.precondition||x.contextMatchesRules(h.precondition),this.checked=void 0,h.toggled){const S=h.toggled.condition?h.toggled:{condition:h.toggled};this.checked=x.contextMatchesRules(S.condition),this.checked&&S.tooltip&&(this.tooltip=typeof S.tooltip=="string"?S.tooltip:S.tooltip.value),S.title&&(this.label=typeof S.title=="string"?S.title:S.title.value)}this.item=h,this.alt=u?new f(u,void 0,E,x,O):void 0,this._options=E,o.d.isThemeIcon(h.icon)&&(this.class=v.a.asClassName(h.icon))}dispose(){}run(...h){var u,E;let x=[];return((u=this._options)===null||u===void 0?void 0:u.arg)&&(x=[...x,this._options.arg]),((E=this._options)===null||E===void 0?void 0:E.shouldForwardArgs)&&(x=[...x,...h]),this._commandService.executeCommand(this.id,...x)}};d=n([l(3,p.b),l(4,_.b)],d)},fxth:function(j,H,b){j.exports={"action-bar-container":"action-bar-container___3Et9N","edit-status":"edit-status___1BgGg","action-bar":"action-bar___Q-6Wi",iconfont:"iconfont___3Ar9E"}},fyJ8:function(j,H,b){"use strict";var I=b("rePB"),v=b("VTBJ"),T=b("Ff2n"),y=b("U8pU"),g=b("q1tI"),s=b.n(g),_=b("TSYQ"),p=b.n(_),e=b("c+Xe"),o=b("sR1s");function n(a){return a&&Object(y.a)(a)==="object"&&!Array.isArray(a)&&!g.isValidElement(a)}function l(a){return typeof a=="string"?!0:Object(e.c)(a)}function r(a,c){var d,f=a.prefixCls,h=a.className,u=a.record,E=a.index,x=a.dataIndex,O=a.render,C=a.children,w=a.component,S=w===void 0?"td":w,A=a.colSpan,D=a.rowSpan,M=a.fixLeft,N=a.fixRight,P=a.firstFixLeft,z=a.lastFixLeft,X=a.firstFixRight,k=a.lastFixRight,F=a.appendNode,U=a.additionalProps,L=U===void 0?{}:U,B=a.ellipsis,Z=a.align,re=a.rowType,he=a.isSticky,Se="".concat(f,"-cell"),ke,te;if(C)te=C;else{var Re=Object(o.b)(u,x);if(te=Re,O){var Ce=O(Re,u,E);n(Ce)?(te=Ce.children,ke=Ce.props):te=Ce}}Object(y.a)(te)==="object"&&!Array.isArray(te)&&!g.isValidElement(te)&&(te=null),B&&(z||X)&&(te=g.createElement("span",{className:"".concat(Se,"-content")},te));var pe=ke||{},me=pe.colSpan,se=pe.rowSpan,be=pe.style,ae=pe.className,fe=Object(T.a)(pe,["colSpan","rowSpan","style","className"]),Fe=me!==void 0?me:A,ie=se!==void 0?se:D;if(Fe===0||ie===0)return null;var q={},Q=typeof M=="number",Y=typeof N=="number";Q&&(q.position="sticky",q.left=M),Y&&(q.position="sticky",q.right=N);var oe={};Z&&(oe.textAlign=Z);var le,Ee=B===!0?{showTitle:!0}:B;Ee&&(Ee.showTitle||re==="header")&&(typeof te=="string"||typeof te=="number"?le=te.toString():g.isValidElement(te)&&typeof te.props.children=="string"&&(le=te.props.children));var Le=Object(v.a)(Object(v.a)(Object(v.a)({title:le},fe),L),{},{colSpan:Fe&&Fe!==1?Fe:null,rowSpan:ie&&ie!==1?ie:null,className:p()(Se,h,(d={},Object(I.a)(d,"".concat(Se,"-fix-left"),Q),Object(I.a)(d,"".concat(Se,"-fix-left-first"),P),Object(I.a)(d,"".concat(Se,"-fix-left-last"),z),Object(I.a)(d,"".concat(Se,"-fix-right"),Y),Object(I.a)(d,"".concat(Se,"-fix-right-first"),X),Object(I.a)(d,"".concat(Se,"-fix-right-last"),k),Object(I.a)(d,"".concat(Se,"-ellipsis"),B),Object(I.a)(d,"".concat(Se,"-with-append"),F),Object(I.a)(d,"".concat(Se,"-fix-sticky"),(Q||Y)&&he),d),L.className,ae),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},L.style),oe),q),be),ref:l(S)?c:null});return g.createElement(S,Object.assign({},Le),F,te)}var i=g.forwardRef(r);i.displayName="Cell";var t=g.memo(i,function(a,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,a.record):!1});H.a=t},gIYZ:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};H.default=I},gRFJ:function(j,H,b){j.exports=[b("rdUC"),b("ynwM"),b("RELg"),b("DlR+"),b("CrYA"),b("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(j){return j<10?"0"+j:j}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(j){return rx_escapable.lastIndex=0,rx_escapable.test(j)?'"'+j.replace(rx_escapable,function(H){var b=meta[H];return typeof b=="string"?b:"\\u"+("0000"+H.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+j+'"'}function str(j,H){var b,I,v,T,y=gap,g,s=H[j];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(j)),typeof rep=="function"&&(s=rep.call(H,j,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,g=[],Object.prototype.toString.apply(s)==="[object Array]"){for(T=s.length,b=0;b0&&arguments[0]!==void 0?arguments[0]:[],B=L;if(Array.isArray(L)){for(var Z=0;Z0||rn.target.offsetWidth>0)&&Je.current.instance.layout()}}catch(zt){It.e(zt)}finally{It.f()}}),jt.observe(Ve.current)),jt}function Ze(){y.b.warn(decodeURIComponent(w))}var lt=function(){var Ut=Je.current.instance;if(Se!=null&&Ut&&je){var It=Ut.getModel();It&&Se!==It.getValue()&&(P=!0,It.setValue(Se),Ut.layout(),P=!1)}};Object(p.useEffect)(function(){Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(function(){lt()},500)},[Se,je,Je.current]),Object(p.useEffect)(function(){if(Ge&&Je.current&&Je.current.instance){var jt=Je.current.instance;jt.changeViewZones(function(It){var Kt=document.createElement("div");Kt.style.padding="10px 20px",Kt.style.width="calc(100% - 20px)",Kt.className="my-error-line-wrp",Kt.innerHTML=Et,It.addZone({afterLineNumber:Ge||11,heightInLines:3,domNode:Kt})});var Ut={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};jt.addOverlayWidget(Ut),jt.revealPositionInCenter({lineNumber:20,column:1})}},[Ge,Je.current,je]);function Be(){var jt=Je.current.instance;if(jt){var Ut=jt.getSelection(),It=Je.current.pastePos||{},Kt=new k.Range(It.startLineNumber||Ut.endLineNumber,It.startColumn||Ut.endColumn,It.endLineNumber||Ut.endLineNumber,It.endColumn||Ut.endColumn);setTimeout(function(){jt.executeEdits("",[{range:Kt,text:""}])},300)}}function $e(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),ie())}var rt=function(){if(Q&&Je.current.instance){var Ut=Je.current.instance.getContentHeight();gt(Ut0||Le.target.offsetWidth>0)&&Q.layout()}}catch(ge){le.e(ge)}finally{le.f()}}),Y.observe(pe.current)),Y}Object(p.useEffect)(function(){pe.current&&Promise.all([b.e(16),b.e(28)]).then(b.t.bind(null,"M/lh",7)).then(function(Q){k=Q;var Y=k.editor.createDiffEditor(pe.current,Object(I.a)(Object(I.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{},{wordWrap:!0}));ae(Y);var oe=fe(Y);return function(){Y.dispose();var le=Y.getModel();le&&le.dispose(),oe.unobserve(pe.current)}})},[]),Object(p.useEffect)(function(){be&&be.setModel({original:k.editor.createModel(Se,te),modified:k.editor.createModel(ke,te)})},[Se,ke,te,be]);var Fe=M(Z),ie=M(he),q={width:Fe,height:ie};return e.a.createElement("div",{className:"my-diff-editor",ref:pe,style:q})}},ZpRC:function(j,H,b){"use strict";function I(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function v(n,l){return(!l||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,l){if(n.clientHeightl||a>n&&c=l&&d>=r?a-n-i:c>l&&dr?c-l+t:0}var g=function(n,l){var r=window,i=l.scrollMode,t=l.block,a=l.inline,c=l.boundary,d=l.skipOverflowHiddenElements,f=typeof c=="function"?c:function(Q){return Q!==c};if(!I(n))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,u=[],E=n;I(E)&&f(E);){if((E=E.parentElement)===h){u.push(E);break}E!=null&&E===document.body&&T(E)&&!T(document.documentElement)||E!=null&&T(E,d)&&u.push(E)}for(var x=r.visualViewport?r.visualViewport.width:innerWidth,O=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,S=n.getBoundingClientRect(),A=S.height,D=S.width,M=S.top,N=S.right,P=S.bottom,z=S.left,X=t==="start"||t==="nearest"?M:t==="end"?P:M+A/2,k=a==="center"?z+D/2:a==="end"?N:z,F=[],U=0;U=0&&z>=0&&P<=O&&N<=x&&M>=he&&P<=ke&&z>=te&&N<=Se)return F;var Re=getComputedStyle(L),Ce=parseInt(Re.borderLeftWidth,10),pe=parseInt(Re.borderTopWidth,10),me=parseInt(Re.borderRightWidth,10),se=parseInt(Re.borderBottomWidth,10),be=0,ae=0,fe="offsetWidth"in L?L.offsetWidth-L.clientWidth-Ce-me:0,Fe="offsetHeight"in L?L.offsetHeight-L.clientHeight-pe-se:0;if(h===L)be=t==="start"?X:t==="end"?X-O:t==="nearest"?y(w,w+O,O,pe,se,w+X,w+X+A,A):X-O/2,ae=a==="start"?k:a==="center"?k-x/2:a==="end"?k-x:y(C,C+x,x,Ce,me,C+k,C+k+D,D),be=Math.max(0,be+w),ae=Math.max(0,ae+C);else{be=t==="start"?X-he-pe:t==="end"?X-ke+se+Fe:t==="nearest"?y(he,ke,Z,pe,se+Fe,X,X+A,A):X-(he+Z/2)+Fe/2,ae=a==="start"?k-te-Ce:a==="center"?k-(te+re/2)+fe/2:a==="end"?k-Se+me+fe:y(te,Se,re,Ce,me+fe,k,k+D,D);var ie=L.scrollLeft,q=L.scrollTop;X+=q-(be=Math.max(0,Math.min(q+be,L.scrollHeight-Z+Fe))),k+=ie-(ae=Math.max(0,Math.min(ie+ae,L.scrollWidth-re+fe)))}F.push({el:L,top:be,left:ae})}return F};function s(n){return n===Object(n)&&Object.keys(n).length!==0}function _(n,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;n.forEach(function(i){var t=i.el,a=i.top,c=i.left;t.scroll&&r?t.scroll({top:a,left:c,behavior:l}):(t.scrollTop=a,t.scrollLeft=c)})}function p(n){return n===!1?{block:"end",inline:"nearest"}:s(n)?n:{block:"start",inline:"nearest"}}function e(n,l){var r=!n.ownerDocument.documentElement.contains(n);if(s(l)&&typeof l.behavior=="function")return l.behavior(r?[]:g(n,l));if(r)return;var i=p(l);return _(g(n,i),i.behavior)}var o=H.a=e},Zss7:function(j,H,b){var I;(function(v){var T=/^\s+/,y=/\s+$/,g=0,s=v.round,_=v.min,p=v.max,e=v.random;function o(se,be){if(se=se||"",be=be||{},se instanceof o)return se;if(!(this instanceof o))return new o(se,be);var ae=n(se);this._originalInput=se,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=s(100*this._a)/100,this._format=be.format||ae.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=ae.ok,this._tc_id=g++}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),be,ae,fe,Fe,ie,q;return be=se.r/255,ae=se.g/255,fe=se.b/255,be<=.03928?Fe=be/12.92:Fe=v.pow((be+.055)/1.055,2.4),ae<=.03928?ie=ae/12.92:ie=v.pow((ae+.055)/1.055,2.4),fe<=.03928?q=fe/12.92:q=v.pow((fe+.055)/1.055,2.4),.2126*Fe+.7152*ie+.0722*q},setAlpha:function(se){return this._a=F(se),this._roundA=s(100*this._a)/100,this},toHsv:function(){var se=t(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=t(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.v*100);return this._a==1?"hsv("+be+", "+ae+"%, "+fe+"%)":"hsva("+be+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var se=r(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=r(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.l*100);return this._a==1?"hsl("+be+", "+ae+"%, "+fe+"%)":"hsla("+be+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(se){return c(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return d(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(U(this._r,255)*100)+"%",g:s(U(this._g,255)*100)+"%",b:s(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%)":"rgba("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var be="#"+f(this._r,this._g,this._b,this._a),ae=be,fe=this._gradientType?"GradientType = 1, ":"";if(se){var Fe=o(se);ae="#"+f(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+be+",endColorstr="+ae+")"},toString:function(se){var be=!!se;se=se||this._format;var ae=!1,fe=this._a<1&&this._a>=0,Fe=!be&&fe&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return Fe?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(ae=this.toRgbString()),se==="prgb"&&(ae=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(ae=this.toHexString()),se==="hex3"&&(ae=this.toHexString(!0)),se==="hex4"&&(ae=this.toHex8String(!0)),se==="hex8"&&(ae=this.toHex8String()),se==="name"&&(ae=this.toName()),se==="hsl"&&(ae=this.toHslString()),se==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(se,be){var ae=se.apply(null,[this].concat([].slice.call(be)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(O,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(se,be){return se.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(D,arguments)}},o.fromRatio=function(se,be){if(typeof se=="object"){var ae={};for(var fe in se)se.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=se[fe]:ae[fe]=Se(se[fe]));se=ae}return o(se,be)};function n(se){var be={r:0,g:0,b:0},ae=1,fe=null,Fe=null,ie=null,q=!1,Q=!1;return typeof se=="string"&&(se=pe(se)),typeof se=="object"&&(Ce(se.r)&&Ce(se.g)&&Ce(se.b)?(be=l(se.r,se.g,se.b),q=!0,Q=String(se.r).substr(-1)==="%"?"prgb":"rgb"):Ce(se.h)&&Ce(se.s)&&Ce(se.v)?(fe=Se(se.s),Fe=Se(se.v),be=a(se.h,fe,Fe),q=!0,Q="hsv"):Ce(se.h)&&Ce(se.s)&&Ce(se.l)&&(fe=Se(se.s),ie=Se(se.l),be=i(se.h,fe,ie),q=!0,Q="hsl"),se.hasOwnProperty("a")&&(ae=se.a)),ae=F(ae),{ok:q,format:se.format||Q,r:_(255,p(be.r,0)),g:_(255,p(be.g,0)),b:_(255,p(be.b,0)),a:ae}}function l(se,be,ae){return{r:U(se,255)*255,g:U(be,255)*255,b:U(ae,255)*255}}function r(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=(fe+Fe)/2;if(fe==Fe)ie=q=0;else{var Y=fe-Fe;q=Q>.5?Y/(2-fe-Fe):Y/(fe+Fe);switch(fe){case se:ie=(be-ae)/Y+(be1&&(Ee-=1),Ee<1/6?oe+(le-oe)*6*Ee:Ee<1/2?le:Ee<2/3?oe+(le-oe)*(2/3-Ee)*6:oe}if(be===0)fe=Fe=ie=ae;else{var Q=ae<.5?ae*(1+be):ae+be-ae*be,Y=2*ae-Q;fe=q(Y,Q,se+1/3),Fe=q(Y,Q,se),ie=q(Y,Q,se-1/3)}return{r:fe*255,g:Fe*255,b:ie*255}}function t(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=fe,Y=fe-Fe;if(q=fe===0?0:Y/fe,fe==Fe)ie=0;else{switch(fe){case se:ie=(be-ae)/Y+(be>1)+720)%360;--be;)fe.h=(fe.h+Fe)%360,ie.push(o(fe));return ie}function P(se,be){be=be||6;for(var ae=o(se).toHsv(),fe=ae.h,Fe=ae.s,ie=ae.v,q=[],Q=1/be;be--;)q.push(o({h:fe,s:Fe,v:ie})),ie=(ie+Q)%1;return q}o.mix=function(se,be,ae){ae=ae===0?0:ae||50;var fe=o(se).toRgb(),Fe=o(be).toRgb(),ie=ae/100,q={r:(Fe.r-fe.r)*ie+fe.r,g:(Fe.g-fe.g)*ie+fe.g,b:(Fe.b-fe.b)*ie+fe.b,a:(Fe.a-fe.a)*ie+fe.a};return o(q)},o.readability=function(se,be){var ae=o(se),fe=o(be);return(v.max(ae.getLuminance(),fe.getLuminance())+.05)/(v.min(ae.getLuminance(),fe.getLuminance())+.05)},o.isReadable=function(se,be,ae){var fe=o.readability(se,be),Fe,ie;ie=!1,Fe=me(ae);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":ie=fe>=4.5;break;case"AAlarge":ie=fe>=3;break;case"AAAsmall":ie=fe>=7;break}return ie},o.mostReadable=function(se,be,ae){var fe=null,Fe=0,ie,q,Q,Y;ae=ae||{},q=ae.includeFallbackColors,Q=ae.level,Y=ae.size;for(var oe=0;oeFe&&(Fe=ie,fe=o(be[oe]));return o.isReadable(se,fe,{level:Q,size:Y})||!q?fe:(ae.includeFallbackColors=!1,o.mostReadable(se,["#fff","#000"],ae))};var z=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=o.hexNames=k(z);function k(se){var be={};for(var ae in se)se.hasOwnProperty(ae)&&(be[se[ae]]=ae);return be}function F(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function U(se,be){Z(se)&&(se="100%");var ae=re(se);return se=_(be,p(0,parseFloat(se))),ae&&(se=parseInt(se*be,10)/100),v.abs(se-be)<1e-6?1:se%be/parseFloat(be)}function L(se){return _(1,p(0,se))}function B(se){return parseInt(se,16)}function Z(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function re(se){return typeof se=="string"&&se.indexOf("%")!=-1}function he(se){return se.length==1?"0"+se:""+se}function Se(se){return se<=1&&(se=se*100+"%"),se}function ke(se){return v.round(parseFloat(se)*255).toString(16)}function te(se){return B(se)/255}var Re=function(){var se="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+be+")|(?:"+se+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",Fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+Fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ce(se){return!!Re.CSS_UNIT.exec(se)}function pe(se){se=se.replace(T,"").replace(y,"").toLowerCase();var be=!1;if(z[se])se=z[se],be=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=Re.rgb.exec(se))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=Re.rgba.exec(se))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=Re.hsl.exec(se))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=Re.hsla.exec(se))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=Re.hsv.exec(se))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=Re.hsva.exec(se))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=Re.hex8.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),a:te(ae[4]),format:be?"name":"hex8"}:(ae=Re.hex6.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),format:be?"name":"hex"}:(ae=Re.hex4.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),a:te(ae[4]+""+ae[4]),format:be?"name":"hex8"}:(ae=Re.hex3.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),format:be?"name":"hex"}:!1}function me(se){var be,ae;return se=se||{level:"AA",size:"small"},be=(se.level||"AA").toUpperCase(),ae=(se.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:be,size:ae}}j.exports?j.exports=o:!(I=function(){return o}.call(H,b,H,j),I!==void 0&&(j.exports=I))})(Math)},aVK0:function(j,H,b){j.exports={flex_box_center:"flex_box_center___21Vfj",flex_space_between:"flex_space_between___uZYuI",flex_box_vertical_center:"flex_box_vertical_center___YbtWj",flex_box_center_end:"flex_box_center_end_____Dod",flex_box_column:"flex_box_column___38gQH",headLeft:"headLeft___2agg1",colorBlue:"colorBlue___3Vx0N",wrap:"wrap___2WfDC",nodata:"nodata___2f07p",nodataText:"nodataText___3TEWn",content:"content___2_atz",gitCode:"gitCode___3gBXU",ellipsis:"ellipsis___1HiNM",menu:"menu___1DQOO",overlayClass:"overlayClass___2EPCd",tips:"tips___3g6oq"}},b1fT:function(j,H,b){j.exports={"choose-game-item":"choose-game-item___3Vmdr","output-title-container":"output-title-container___15c7x","output-title":"output-title___wqGBh","test-case-list":"test-case-list___134lr","test-header":"test-header___3YSEo",active:"active___3o9Hq","test-result":"test-result___2OIUv","markdown-body":"markdown-body___1mq0e",success:"success___2M7U8",failer:"failer___3JK5X",count:"count___3ViIk","test-case-item":"test-case-item___JBhkJ","case-header":"case-header___27Lc0",iconfont:"iconfont___3UAOT",description:"description___1SgkG","item-desc":"item-desc___29cRg",show:"show___3qunF","item-tip":"item-tip___1pJqj","arrow-down":"arrow-down___3rUfL","test-title":"test-title___1eTn_","arrow-right":"arrow-right___36G7Q","case-info":"case-info___21-4n","test-case-run-header":"test-case-run-header___1BrpP","test-case-run-wrp":"test-case-run-wrp___2T5BC","diff-panel-container":"diff-panel-container___CQu-S","line-break":"line-break___1hJQp",empty:"empty___19Ozf"}},bCnd:function(j,H,b){"use strict";b.d(H,"b",function(){return y}),b.d(H,"a",function(){return g});var I=b("je13"),v=b.n(I),T=!1;function y(s,_){var p=v.a.get("__ec");p||(p={}),p[s]=_,v.a.set("__ec",p)}function g(s,_){var p=v.a.get("__ec");return p?p[s]===void 0?_:p[s]:_}},bPs0:function(j,H,b){"use strict";b.d(H,"b",function(){return h});var I=b("k1fw"),v=b("9og8"),T=b("2qtc"),y=b("kLXV"),g=b("tJVT"),s=b("PpiC"),_=b("aHsQ"),p=b("sGsY"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("bntm"),i=b("V0Rq"),t=b("wd/R"),a=b.n(t),c=b("Ty5D"),d=b("9kvl"),f=p.a.Countdown,h=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],u=function(x){var O=x.globalSetting,C=x.loading,w=x.user,S=x.exercise,A=x.socket,D=x.dispatch,M=Object(s.a)(x,["globalSetting","loading","user","exercise","socket","dispatch"]),N=Object(n.useState)({}),P=Object(g.a)(N,2),z=P[0],X=P[1],k=y.a.useModal(),F=Object(g.a)(k,2),U=F[0],L=F[1],B=Object(n.useRef)(),Z=Object(n.useRef)(null),re=Object(n.useRef)(null),he=Object(n.useState)(!0),Se=Object(g.a)(he,2),ke=Se[0],te=Se[1],Re=Object(c.h)().query,Ce=Object(c.i)();Object(n.useEffect)(function(){var Y,oe,le,Ee,Le;if(clearTimeout(Z.current),document.addEventListener(Object(r.c)(),Q,!1),window.addEventListener("blur",ie,!1),(Y=S.exerciseUserInfo)!==null&&Y!==void 0&&Y.screen_open&&Object(r.a)()&&(D({type:"globalSetting/headerFooterToggle",payload:!1}),te(!1)),(oe=S.exerciseUserInfo)!==null&&oe!==void 0&&oe.screen_at&&a()().diff(a()((le=S.exerciseUserInfo)===null||le===void 0?void 0:le.screen_at),"seconds")>0)pe();else if((Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_open&&!Object(r.a)()){var ge=document.domain==="kepukehuan.educoder.net"?30:S.exerciseUserInfo.screen_sec+10+1;B.current=y.a.info({icon:null,content:l.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",l.a.createElement("br",null),"\u5207\u6362\u9875\u9762"," ",S.exerciseUserInfo.screen_num-S.exerciseUserInfo.used_screen_num," ","\u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",l.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:l.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:function(){var _e;pe(),(_e=B.current)===null||_e===void 0||_e.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+ge*1e3})),"S\uFF09"),onOk:function(){var _e;(_e=B.current)===null||_e===void 0||_e.destroy(),te(!1),Object(r.d)(document.body),document.getElementById("root").addEventListener("click",me,!1)}})}return(Le=S.exerciseUserInfo)!==null&&Le!==void 0&&Le.screen_open&&!Object(r.a)()||document.getElementById("root").addEventListener("click",me,!1),function(){document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1),window.removeEventListener("blur",ie,!1),clearTimeout(Z.current)}},[]),Object(n.useEffect)(function(){setTimeout(function(){S.actionTabs.removeEventListenerExitScreen&&(clearTimeout(Z.current),document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1))},500),se()},[S.actionTabs]),Object(n.useEffect)(function(){setTimeout(function(){S.exerciseUserInfo.used_screen_num>S.exerciseUserInfo.screen_num?fe():!ke},500)},[S.exerciseUserInfo]);var pe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le;return o.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,q();case 2:le=Le.sent,setTimeout(function(){var ge,De;(ge=B.current)===null||ge===void 0||ge.destroy(),B.current=y.a.info({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(De=S.exerciseUserInfo)===null||De===void 0?void 0:De.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var _e=Object(v.a)(o.a.mark(function tt(){return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Object(r.d)(document.body);case 1:case"end":return Me.stop()}},tt)}));function Xe(){return _e.apply(this,arguments)}return Xe}()})},1e3);case 4:case"end":return Le.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),me=function(oe){!Object(r.a)()&&oe.target.nodeName!=="A"&&oe.target.nodeName!=="BUTTON"&&oe.target.innerHTML!=="\u786E \u5B9A"&&(Object(r.d)(document.body),console.log("documentClick.full"))},se=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e;return o.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,D({type:"exercise/getExerciseUserInfo",payload:Object(I.a)({},Ce)});case 2:return _e=tt.sent,De(_e==null?void 0:_e.data),tt.abrupt("return",_e==null?void 0:_e.data);case 5:case"end":return tt.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),be=function(){var Y=Object(v.a)(o.a.mark(function oe(le){var Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:(Ee=B.current)===null||Ee===void 0||((Le=Ee.destroyAll)===null||Le===void 0)||Le.call(Ee),B.current=y.a.info({maskClosable:!1,keyboard:!1,okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:q,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(S.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(ge=S.exerciseUserInfo)===null||ge===void 0?void 0:ge.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",l.a.createElement("span",{className:"c-red"},S.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",l.a.createElement("br",null),l.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var Xe=Object(v.a)(o.a.mark(function Ge(){return o.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:clearTimeout(re.current),Object(r.d)(document.body),B.current.destroy();case 3:case"end":return Et.stop()}},Ge)}));function tt(){return Xe.apply(this,arguments)}return tt}()}),re.current=setTimeout(function(){var Xe;B.current.update({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(Xe=S.exerciseUserInfo)===null||Xe===void 0?void 0:Xe.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(S.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return _e.stop()}},oe)}));return function(le){return Y.apply(this,arguments)}}(),ae=function(){location.href="/classrooms/".concat(Ce.coursesId,"/exercise/").concat(Ce.categoryId,"/detail")},fe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le;return o.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return(le=B.current)===null||le===void 0||((Ee=le.destroyAll)===null||Ee===void 0)||Ee.call(le),De.next=3,Object(i.ab)({categoryId:Ce.categoryId,commit_method:1});case 3:if(Le=De.sent,Le){try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(_e){}Fe()}case 5:case"end":return De.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Fe=function(){var oe,le;document.removeEventListener(Object(r.c)(),Q,!1),Object(r.b)(),(oe=B.current)===null||oe===void 0||((le=oe.destroyAll)===null||le===void 0)||le.call(oe);try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(Ee){}U.info({content:l.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",l.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){ae()}})},ie=function(oe){Object(r.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(r.b)()},q=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e,Xe,tt;return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!((_e=S.exerciseUserInfo)!==null&&_e!==void 0&&_e.screen_at)){Me.next=3;break}return Me.next=3,Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0}));case 3:return Me.next=5,Object(i.R)({id:Ce.categoryId});case 5:if(Xe=Me.sent,!(Xe!=null&&Xe.is_commit)){Me.next=9;break}return Fe(),Me.abrupt("return");case 9:return Me.next=11,se();case 11:tt=Me.sent,De(tt);case 13:case"end":return Me.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Q=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(le=!1,console.log("fullscreen change"),!Object(r.a)()){_e.next=7;break}(Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_at&&Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0})),clearTimeout(Z.current),_e.next=17;break;case 7:return le=!0,_e.next=10,Object(i.h)(Object(I.a)({},Ce));case 10:return _e.next=12,se();case 12:Le=_e.sent,be(Le.used_screen_num),ge=setTimeout(Object(v.a)(o.a.mark(function Xe(){return o.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:case"end":return Ge.stop()}},Xe)})),S.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),Z.current=ge;case 17:D({type:"globalSetting/headerFooterToggle",payload:le});case 18:case"end":return _e.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}();return l.a.createElement("div",null,L)};H.a=Object(d.a)(function(E){var x=E.loading,O=E.user,C=E.exercise,w=E.globalSetting;return{globalSetting:w,user:O,exercise:C,loading:x.effects}})(u)},bQjk:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.CipherParams,s=T.enc,_=s.Hex,p=T.format,e=p.Hex={stringify:function(o){return o.ciphertext.toString(_)},parse:function(o){var n=_.parse(o);return g.create({ciphertext:n})}}}(),I.format.Hex})},bT9E:function(j,H,b){"use strict";b.d(H,"a",function(){return v});var I=b("VTBJ");function v(T,y){var g=Object(I.a)({},T);return Array.isArray(y)&&y.forEach(function(s){delete g[s]}),g}},biw7:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=I.createContext(null);H.a=T},c5Ni:function(j,H,b){},c5fP:function(j,H,b){"use strict";function I(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(Je){return typeof Je}:I=function(Je){return Je&&typeof Symbol=="function"&&Je.constructor===Symbol&&Je!==Symbol.prototype?"symbol":typeof Je},I(Oe)}Object.defineProperty(H,"__esModule",{value:!0}),H._tr_init=Xe,H._tr_stored_block=tt,H._tr_flush_block=Me,H._tr_tally=Et,H._tr_align=Ge;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var Oe=new WeakMap;return T=function(){return Oe},Oe}function y(Oe){if(Oe&&Oe.__esModule)return Oe;if(Oe===null||I(Oe)!=="object"&&typeof Oe!="function")return{default:Oe};var Ve=T();if(Ve&&Ve.has(Oe))return Ve.get(Oe);var Je={},Ye=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ne in Oe)if(Object.prototype.hasOwnProperty.call(Oe,Ne)){var He=Ye?Object.getOwnPropertyDescriptor(Oe,Ne):null;He&&(He.get||He.set)?Object.defineProperty(Je,Ne,He):Je[Ne]=Oe[Ne]}return Je.default=Oe,Ve&&Ve.set(Oe,Je),Je}var g=4,s=0,_=1,p=2;function e(Oe){for(var Ve=Oe.length;--Ve>=0;)Oe[Ve]=0}var o=0,n=1,l=2,r=3,i=258,t=29,a=256,c=a+1+t,d=30,f=19,h=2*c+1,u=15,E=16,x=7,O=256,C=16,w=17,S=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],P=512,z=new Array((c+2)*2);e(z);var X=new Array(d*2);e(X);var k=new Array(P);e(k);var F=new Array(i-r+1);e(F);var U=new Array(t);e(U);var L=new Array(d);e(L);function B(Oe,Ve,Je,Ye,Ne){this.static_tree=Oe,this.extra_bits=Ve,this.extra_base=Je,this.elems=Ye,this.max_length=Ne,this.has_stree=Oe&&Oe.length}var Z,re,he;function Se(Oe,Ve){this.dyn_tree=Oe,this.max_code=0,this.stat_desc=Ve}function ke(Oe){return Oe<256?k[Oe]:k[256+(Oe>>>7)]}function te(Oe,Ve){Oe.pending_buf[Oe.pending++]=Ve&255,Oe.pending_buf[Oe.pending++]=Ve>>>8&255}function Re(Oe,Ve,Je){Oe.bi_valid>E-Je?(Oe.bi_buf|=Ve<>E-Oe.bi_valid,Oe.bi_valid+=Je-E):(Oe.bi_buf|=Ve<>>=1,Je<<=1;while(--Ve>0);return Je>>>1}function me(Oe){Oe.bi_valid===16?(te(Oe,Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0):Oe.bi_valid>=8&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf&255,Oe.bi_buf>>=8,Oe.bi_valid-=8)}function se(Oe,Ve){var Je=Ve.dyn_tree,Ye=Ve.max_code,Ne=Ve.stat_desc.static_tree,He=Ve.stat_desc.has_stree,ve=Ve.stat_desc.extra_bits,xe=Ve.stat_desc.extra_base,de=Ve.stat_desc.max_length,je,Qe,ne,Ze,lt,Be,$e=0;for(Ze=0;Ze<=u;Ze++)Oe.bl_count[Ze]=0;for(Je[Oe.heap[Oe.heap_max]*2+1]=0,je=Oe.heap_max+1;jede&&(Ze=de,$e++),Je[Qe*2+1]=Ze,Qe>Ye)continue;Oe.bl_count[Ze]++,lt=0,Qe>=xe&&(lt=ve[Qe-xe]),Be=Je[Qe*2],Oe.opt_len+=Be*(Ze+lt),He&&(Oe.static_len+=Be*(Ne[Qe*2+1]+lt))}if($e===0)return;do{for(Ze=de-1;Oe.bl_count[Ze]===0;)Ze--;Oe.bl_count[Ze]--,Oe.bl_count[Ze+1]+=2,Oe.bl_count[de]--,$e-=2}while($e>0);for(Ze=de;Ze!==0;Ze--)for(Qe=Oe.bl_count[Ze];Qe!==0;){if(ne=Oe.heap[--je],ne>Ye)continue;Je[ne*2+1]!==Ze&&(Oe.opt_len+=(Ze-Je[ne*2+1])*Je[ne*2],Je[ne*2+1]=Ze),Qe--}}function be(Oe,Ve,Je){var Ye=new Array(u+1),Ne=0,He,ve;for(He=1;He<=u;He++)Ye[He]=Ne=Ne+Je[He-1]<<1;for(ve=0;ve<=Ve;ve++){var xe=Oe[ve*2+1];if(xe===0)continue;Oe[ve*2]=pe(Ye[xe]++,xe)}}function ae(){var Oe,Ve,Je,Ye,Ne,He=new Array(u+1);for(Je=0,Ye=0;Ye>=7;Ye8?te(Oe,Oe.bi_buf):Oe.bi_valid>0&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0}function ie(Oe,Ve,Je,Ye){Fe(Oe),Ye&&(te(Oe,Je),te(Oe,~Je)),v.arraySet(Oe.pending_buf,Oe.window,Ve,Je,Oe.pending),Oe.pending+=Je}function q(Oe,Ve,Je,Ye){var Ne=Ve*2,He=Je*2;return Oe[Ne]>1;ve>=1;ve--)Q(Oe,Je,ve);je=He;do ve=Oe.heap[1],Oe.heap[1]=Oe.heap[Oe.heap_len--],Q(Oe,Je,1),xe=Oe.heap[1],Oe.heap[--Oe.heap_max]=ve,Oe.heap[--Oe.heap_max]=xe,Je[je*2]=Je[ve*2]+Je[xe*2],Oe.depth[je]=(Oe.depth[ve]>=Oe.depth[xe]?Oe.depth[ve]:Oe.depth[xe])+1,Je[ve*2+1]=Je[xe*2+1]=je,Oe.heap[1]=je++,Q(Oe,Je,1);while(Oe.heap_len>=2);Oe.heap[--Oe.heap_max]=Oe.heap[1],se(Oe,Ve),be(Je,de,Oe.bl_count)}function le(Oe,Ve,Je){var Ye,Ne=-1,He,ve=Ve[0*2+1],xe=0,de=7,je=4;for(ve===0&&(de=138,je=3),Ve[(Je+1)*2+1]=65535,Ye=0;Ye<=Je;Ye++){if(He=ve,ve=Ve[(Ye+1)*2+1],++xe=3&&!(Oe.bl_tree[N[Ve]*2+1]!==0);Ve--);return Oe.opt_len+=3*(Ve+1)+5+5+4,Ve}function ge(Oe,Ve,Je,Ye){var Ne;for(Re(Oe,Ve-257,5),Re(Oe,Je-1,5),Re(Oe,Ye-4,4),Ne=0;Ne>>=1)if(Ve&1&&Oe.dyn_ltree[Je*2]!==0)return s;if(Oe.dyn_ltree[9*2]!==0||Oe.dyn_ltree[10*2]!==0||Oe.dyn_ltree[13*2]!==0)return _;for(Je=32;Je0?(Oe.strm.data_type===p&&(Oe.strm.data_type=De(Oe)),oe(Oe,Oe.l_desc),oe(Oe,Oe.d_desc),ve=Le(Oe),Ne=Oe.opt_len+3+7>>>3,He=Oe.static_len+3+7>>>3,He<=Ne&&(Ne=He)):Ne=He=Je+5,Je+4<=Ne&&Ve!==-1?tt(Oe,Ve,Je,Ye):Oe.strategy===g||He===Ne?(Re(Oe,(n<<1)+(Ye?1:0),3),Y(Oe,z,X)):(Re(Oe,(l<<1)+(Ye?1:0),3),ge(Oe,Oe.l_desc.max_code+1,Oe.d_desc.max_code+1,ve+1),Y(Oe,Oe.dyn_ltree,Oe.dyn_dtree)),fe(Oe),Ye&&Fe(Oe)}function Et(Oe,Ve,Je){return Oe.pending_buf[Oe.d_buf+Oe.last_lit*2]=Ve>>>8&255,Oe.pending_buf[Oe.d_buf+Oe.last_lit*2+1]=Ve&255,Oe.pending_buf[Oe.l_buf+Oe.last_lit]=Je&255,Oe.last_lit++,Ve===0?Oe.dyn_ltree[Je*2]++:(Oe.matches++,Ve--,Oe.dyn_ltree[(F[Je]+a+1)*2]++,Oe.dyn_dtree[ke(Ve)*2]++),Oe.last_lit===Oe.lit_bufsize-1}},cRFk:function(j,H,b){j.exports=b.p+"static/RepositoryNoneData.828085a8.png"},"cf+g":function(j,H,b){j.exports=b.p+"static/mark.ad150797.svg"},csWT:function(j,H,b){j.exports=b.p+"static/choose.4ad1045f.svg"},cv67:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.algo,p=[];(function(){for(var i=0;i<64;i++)p[i]=v.abs(v.sin(i+1))*4294967296|0})();var e=_.MD5=s.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,t){for(var a=0;a<16;a++){var c=t+a,d=i[c];i[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var f=this._hash.words,h=i[t+0],u=i[t+1],E=i[t+2],x=i[t+3],O=i[t+4],C=i[t+5],w=i[t+6],S=i[t+7],A=i[t+8],D=i[t+9],M=i[t+10],N=i[t+11],P=i[t+12],z=i[t+13],X=i[t+14],k=i[t+15],F=f[0],U=f[1],L=f[2],B=f[3];F=o(F,U,L,B,h,7,p[0]),B=o(B,F,U,L,u,12,p[1]),L=o(L,B,F,U,E,17,p[2]),U=o(U,L,B,F,x,22,p[3]),F=o(F,U,L,B,O,7,p[4]),B=o(B,F,U,L,C,12,p[5]),L=o(L,B,F,U,w,17,p[6]),U=o(U,L,B,F,S,22,p[7]),F=o(F,U,L,B,A,7,p[8]),B=o(B,F,U,L,D,12,p[9]),L=o(L,B,F,U,M,17,p[10]),U=o(U,L,B,F,N,22,p[11]),F=o(F,U,L,B,P,7,p[12]),B=o(B,F,U,L,z,12,p[13]),L=o(L,B,F,U,X,17,p[14]),U=o(U,L,B,F,k,22,p[15]),F=n(F,U,L,B,u,5,p[16]),B=n(B,F,U,L,w,9,p[17]),L=n(L,B,F,U,N,14,p[18]),U=n(U,L,B,F,h,20,p[19]),F=n(F,U,L,B,C,5,p[20]),B=n(B,F,U,L,M,9,p[21]),L=n(L,B,F,U,k,14,p[22]),U=n(U,L,B,F,O,20,p[23]),F=n(F,U,L,B,D,5,p[24]),B=n(B,F,U,L,X,9,p[25]),L=n(L,B,F,U,x,14,p[26]),U=n(U,L,B,F,A,20,p[27]),F=n(F,U,L,B,z,5,p[28]),B=n(B,F,U,L,E,9,p[29]),L=n(L,B,F,U,S,14,p[30]),U=n(U,L,B,F,P,20,p[31]),F=l(F,U,L,B,C,4,p[32]),B=l(B,F,U,L,A,11,p[33]),L=l(L,B,F,U,N,16,p[34]),U=l(U,L,B,F,X,23,p[35]),F=l(F,U,L,B,u,4,p[36]),B=l(B,F,U,L,O,11,p[37]),L=l(L,B,F,U,S,16,p[38]),U=l(U,L,B,F,M,23,p[39]),F=l(F,U,L,B,z,4,p[40]),B=l(B,F,U,L,h,11,p[41]),L=l(L,B,F,U,x,16,p[42]),U=l(U,L,B,F,w,23,p[43]),F=l(F,U,L,B,D,4,p[44]),B=l(B,F,U,L,P,11,p[45]),L=l(L,B,F,U,k,16,p[46]),U=l(U,L,B,F,E,23,p[47]),F=r(F,U,L,B,h,6,p[48]),B=r(B,F,U,L,S,10,p[49]),L=r(L,B,F,U,X,15,p[50]),U=r(U,L,B,F,C,21,p[51]),F=r(F,U,L,B,P,6,p[52]),B=r(B,F,U,L,x,10,p[53]),L=r(L,B,F,U,M,15,p[54]),U=r(U,L,B,F,u,21,p[55]),F=r(F,U,L,B,A,6,p[56]),B=r(B,F,U,L,k,10,p[57]),L=r(L,B,F,U,w,15,p[58]),U=r(U,L,B,F,z,21,p[59]),F=r(F,U,L,B,O,6,p[60]),B=r(B,F,U,L,N,10,p[61]),L=r(L,B,F,U,E,15,p[62]),U=r(U,L,B,F,D,21,p[63]),f[0]=f[0]+F|0,f[1]=f[1]+U|0,f[2]=f[2]+L|0,f[3]=f[3]+B|0},_doFinalize:function(){var i=this._data,t=i.words,a=this._nDataBytes*8,c=i.sigBytes*8;t[c>>>5]|=128<<24-c%32;var d=v.floor(a/4294967296),f=a;t[(c+64>>>9<<4)+15]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,t[(c+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,i.sigBytes=(t.length+1)*4,this._process();for(var h=this._hash,u=h.words,E=0;E<4;E++){var x=u[E];u[E]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return h},clone:function(){var i=s.clone.call(this);return i._hash=this._hash.clone(),i}});function o(i,t,a,c,d,f,h){var u=i+(t&a|~t&c)+d+h;return(u<>>32-f)+t}function n(i,t,a,c,d,f,h){var u=i+(t&c|a&~c)+d+h;return(u<>>32-f)+t}function l(i,t,a,c,d,f,h){var u=i+(t^a^c)+d+h;return(u<>>32-f)+t}function r(i,t,a,c,d,f,h){var u=i+(a^(t|~c))+d+h;return(u<>>32-f)+t}T.MD5=s._createHelper(e),T.HmacMD5=s._createHmacHelper(e)}(Math),I.MD5})},dPi7:function(j,H,b){j.exports=b.p+"static/appoint1.9457cf22.svg"},dTJi:function(j,H,b){},dViP:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAATxJREFUWEftmE9Kw1AQxr8ZYqhYoWL34kJwW/QIeoku2q7SI/QMPUK76z16BG/gQtxXurBiScMbeWIQxDLTQOITXhbJ4s2f7/0yYfKG8HWJCGE8Pkeed+HcMYqCy7VankniwPyONF1hNnshIvF5yN8ky46w3V6iKE5rSa4FTZJXtFpPNJ/v6JPMcHj1Z2JKsV7UYvFIkmVdbDYX2iYaWW+3n0lGo2vk+UkjCbUkafpGMhj0ai9gTcj3a3Mk/f6N1b4JuyhIo/yPCTl3B2AC4Ezb5Y/1NYApmJcWPzshkSVEOpagv9iswXxv8bULcu7BEnCvDfOtxT8K0ihFQpFQ/Mq0GoiEIqG9BIJrriK+W08qdPyafj8qF89hjvZedljcytZRkIYuwINicEfp4IYNoY1jfJEFNbAqqz6Ukd4H/d3NFUaXf7AAAAAASUVORK5CYII="},dejd:function(j,H,b){},djh8:function(j,H,b){j.exports=b.p+"static/qrCode.d852fdfc.png"},dmUQ:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("rePB"),T=b("1OyB"),y=b("vuIU"),g=b("Ji7U"),s=b("md7G"),_=b("foSv"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=b("4IlW");function r(A,D){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(A);D&&(N=N.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),M.push.apply(M,N)}return M}function i(A){for(var D=1;D1?re-1:0),Se=1;Se1?U-1:0),B=1;B=0)return parseInt(F.slice(F.indexOf("e-")+2),10);var U=0;return F.indexOf(".")>=0&&(U=F.length-F.indexOf(".")-1),U},P.getInputDisplayValue=function(k){var F=k||P.state,U=F.focused,L=F.inputValue,B=F.value,Z;U?Z=L:Z=P.toPrecisionAsStep(B),Z==null&&(Z="");var re=P.formatWrapper(Z);return x(P.props.decimalSeparator)&&(re=re.toString().replace(".",P.props.decimalSeparator)),re},P.recordCursorPosition=function(){try{P.cursorStart=P.input.selectionStart,P.cursorEnd=P.input.selectionEnd,P.currentValue=P.input.value,P.cursorBefore=P.input.value.substring(0,P.cursorStart),P.cursorAfter=P.input.value.substring(P.cursorEnd)}catch(k){}},P.restoreByAfter=function(k){if(k===void 0)return!1;var F=P.input.value,U=F.lastIndexOf(k);if(U===-1)return!1;var L=P.cursorBefore.length;return P.lastKeyCode===l.a.DELETE&&P.cursorBefore.charAt(L-1)===k[0]?(P.fixCaret(L,L),!0):U+k.length===F.length?(P.fixCaret(U,U),!0):!1},P.partRestoreByAfter=function(k){return k===void 0?!1:Array.prototype.some.call(k,function(F,U){var L=k.substring(U);return P.restoreByAfter(L)})},P.isNotCompleteNumber=function(k){return isNaN(k)||k===""||k===null||k&&k.toString().indexOf(".")===k.toString().length-1},P.stop=function(){P.autoStepTimer&&clearTimeout(P.autoStepTimer)},P.down=function(k,F,U){P.pressingUpOrDown=!0,P.step("down",k,F,U)},P.up=function(k,F,U){P.pressingUpOrDown=!0,P.step("up",k,F,U)},P.saveInput=function(k){P.input=k};var z=N.value;z===void 0&&(z=N.defaultValue),P.state={focused:N.autoFocus};var X=P.getValidValue(P.toNumber(z));return P.state=i(i({},P.state),{},{inputValue:P.toPrecisionAsStep(X),value:X}),P}return Object(y.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(P){var z=this.props,X=z.value,k=z.onChange,F=z.max,U=z.min,L=this.state.focused;if(P){if(!O(P.value,X)||!O(P.max,F)||!O(P.min,U)){var B=L?X:this.getValidValue(X),Z;this.pressingUpOrDown?Z=B:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(B),this.setState({value:B,inputValue:Z})}var re="value"in this.props?X:this.state.value;"max"in this.props&&P.max!==F&&typeof re=="number"&&re>F&&k&&k(F),"min"in this.props&&P.min!==U&&typeof re=="number"&&re1&&arguments[1]!==void 0?arguments[1]:this.props.min,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,k=parseFloat(P);return isNaN(k)?P:(kX&&(k=X),k)}},{key:"setValue",value:function(P,z){var X=this.props.precision,k=this.isNotCompleteNumber(parseFloat(P))?null:parseFloat(P),F=this.state.value,U=F===void 0?null:F,L=this.state.inputValue,B=L===void 0?null:L,Z=typeof k=="number"?k.toFixed(X):"".concat(k),re=k!==U||Z!=="".concat(B);return"value"in this.props?(B=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:B},z)):this.setState({value:k,inputValue:this.toPrecisionAsStep(P)},z),re&&this.props.onChange(k),k}},{key:"getMaxPrecision",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.props,k=X.precision,F=X.step;if(x(k))return k;var U=this.getPrecision(z),L=this.getPrecision(F),B=this.getPrecision(P);return P?Math.max(B,U+L):U+L}},{key:"getPrecisionFactor",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.getMaxPrecision(P,z);return Math.pow(10,X)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(P){return this.props.formatter?this.props.formatter(P):P}},{key:"toPrecisionAsStep",value:function(P){if(this.isNotCompleteNumber(P)||P==="")return P;var z=Math.abs(this.getMaxPrecision(P));return isNaN(z)?P.toString():Number(P).toFixed(z)}},{key:"toNumber",value:function(P){var z=this.props.precision,X=this.state.focused,k=P&&P.length>16&&X;return this.isNotCompleteNumber(P)||k?P:x(z)?Math.round(P*Math.pow(10,z))/Math.pow(10,z):Number(P)}},{key:"upStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P+k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"downStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P-k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"step",value:function(P,z){var X=this,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,F=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var U=this.props;if(U.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var B=this["".concat(P,"Step")](L,k),Z=B>U.max||BU.max?B=U.max:B=he),Je=(Xe||Xe===0)&&(isNaN(Xe)||Number(Xe)<=Se),Ye=Ve||k||F,Ne=Je||k||F,He=n()("".concat(X,"-handler"),"".concat(X,"-handler-up"),Object(v.a)({},"".concat(X,"-handler-up-disabled"),Ye)),ve=n()("".concat(X,"-handler"),"".concat(X,"-handler-down"),Object(v.a)({},"".concat(X,"-handler-down-disabled"),Ne)),xe=U?{onTouchStart:Ye?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ye?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},de=U?{onTouchStart:Ne?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Ne?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Ge,style:ke,title:te,onMouseEnter:Re,onMouseLeave:Ce,onMouseOver:pe,onMouseOut:me,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(X,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":Ye,className:He}),B||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-up-inner"),onClick:d})),e.a.createElement("span",Object.assign({unselectable:"on"},de,{role:"button","aria-label":"Decrease Value","aria-disabled":Ne,className:ve}),Z||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-down-inner"),onClick:d}))),e.a.createElement("div",{className:"".concat(X,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":he,"aria-valuenow":Xe,required:se,type:fe,placeholder:Fe,onPaste:Le,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(X,"-input"),tabIndex:ae,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Et?this.onKeyDown:c,onKeyUp:Et?this.onKeyUp:c,autoFocus:le,maxLength:oe,readOnly:F,disabled:k,max:he,min:Se,step:Y,name:Ee,title:te,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Oe),pattern:Q,inputMode:q,onInput:ge},Me))))}}]),M}(e.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:f,required:!1,autoComplete:"off"};var w=C,S=H.a=w},e7zE:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.SHA1,p=s.HMAC,e=s.PBKDF2=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,n){for(var l=this.cfg,r=p.create(l.hasher,o),i=g.create(),t=g.create([1]),a=i.words,c=t.words,d=l.keySize,f=l.iterations;a.length>>24&255)+(ve>>>8&65280)+((ve&65280)<<8)+((ve&255)<<24)}function Ee(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Le(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,ve.total_in=ve.total_out=xe.total=0,ve.msg="",xe.wrap&&(ve.adler=xe.wrap&1),xe.mode=O,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new v.Buf32(q),xe.distcode=xe.distdyn=new v.Buf32(Q),xe.sane=1,xe.back=-1,a)}function ge(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Le(ve))}function De(ve,xe){var de,je;return!ve||!ve.state?f:(je=ve.state,xe<0?(de=0,xe=-xe):(de=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15)?f:(je.window!==null&&je.wbits!==xe&&(je.window=null),je.wrap=de,je.wbits=xe,ge(ve)))}function _e(ve,xe){var de,je;return ve?(je=new Ee,ve.state=je,je.window=null,de=De(ve,xe),de!==a&&(ve.state=null),de):f}function Xe(ve){return _e(ve,oe)}var tt=!0,Ge,Me;function Et(ve){if(tt){var xe;for(Ge=new v.Buf32(512),Me=new v.Buf32(32),xe=0;xe<144;)ve.lens[xe++]=8;for(;xe<256;)ve.lens[xe++]=9;for(;xe<280;)ve.lens[xe++]=7;for(;xe<288;)ve.lens[xe++]=8;for((0,s.default)(n,ve.lens,0,288,Ge,0,ve.work,{bits:9}),xe=0;xe<32;)ve.lens[xe++]=5;(0,s.default)(l,ve.lens,0,32,Me,0,ve.work,{bits:5}),tt=!1}ve.lencode=Ge,ve.lenbits=9,ve.distcode=Me,ve.distbits=5}function Oe(ve,xe,de,je){var Qe,ne=ve.state;return ne.window===null&&(ne.wsize=1<=ne.wsize?(v.arraySet(ne.window,xe,de-ne.wsize,ne.wsize,0),ne.wnext=0,ne.whave=ne.wsize):(Qe=ne.wsize-ne.wnext,Qe>je&&(Qe=je),v.arraySet(ne.window,xe,de-je,Qe,ne.wnext),je-=Qe,je?(v.arraySet(ne.window,xe,de-je,je,0),ne.wnext=je,ne.whave=ne.wsize):(ne.wnext+=Qe,ne.wnext===ne.wsize&&(ne.wnext=0),ne.whave>>8&255,de.check=(0,y.default)(de.check,Kt,2,0),$e=0,rt=0,de.mode=C;break}if(de.flags=0,de.head&&(de.head.done=!1),!(de.wrap&1)||((($e&255)<<8)+($e>>8))%31){ve.msg="incorrect header check",de.mode=fe;break}if(($e&15)!==x){ve.msg="unknown compression method",de.mode=fe;break}if($e>>>=4,rt-=4,Ut=($e&15)+8,de.wbits===0)de.wbits=Ut;else if(Ut>de.wbits){ve.msg="invalid window size",de.mode=fe;break}de.dmax=1<>8&1),de.flags&512&&(Kt[0]=$e&255,Kt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,rt=0,de.mode=w;case w:for(;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>8&255,Kt[2]=$e>>>16&255,Kt[3]=$e>>>24&255,de.check=(0,y.default)(de.check,Kt,4,0)),$e=0,rt=0,de.mode=S;case S:for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<>8),de.flags&512&&(Kt[0]=$e&255,Kt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,rt=0,de.mode=A;case A:if(de.flags&1024){for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<>>8&255,de.check=(0,y.default)(de.check,Kt,2,0)),$e=0,rt=0}else de.head&&(de.head.extra=null);de.mode=D;case D:if(de.flags&1024&&(st=de.length,st>lt&&(st=lt),st&&(de.head&&(Ut=de.head.extra_len-de.length,de.head.extra||(de.head.extra=new Array(de.head.extra_len)),v.arraySet(de.head.extra,je,ne,st,Ut)),de.flags&512&&(de.check=(0,y.default)(de.check,je,st,ne)),lt-=st,ne+=st,de.length-=st),de.length))break e;de.length=0,de.mode=M;case M:if(de.flags&2048){if(lt===0)break e;st=0;do Ut=je[ne+st++],de.head&&Ut&&de.length<65536&&(de.head.name+=String.fromCharCode(Ut));while(Ut&&st>9&1,de.head.done=!0),ve.adler=de.check=0,de.mode=k;break;case z:for(;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=rt&7,rt-=rt&7,de.mode=se;break}for(;rt<3;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=1,rt-=1;switch($e&3){case 0:de.mode=U;break;case 1:if(Et(de),de.mode=Se,xe===t){$e>>>=2,rt-=2;break e}break;case 2:de.mode=Z;break;case 3:ve.msg="invalid block type",de.mode=fe}$e>>>=2,rt-=2;break;case U:for($e>>>=rt&7,rt-=rt&7;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<>>16^65535)){ve.msg="invalid stored block lengths",de.mode=fe;break}if(de.length=$e&65535,$e=0,rt=0,de.mode=L,xe===t)break e;case L:de.mode=B;case B:if(st=de.length,st){if(st>lt&&(st=lt),st>Be&&(st=Be),st===0)break e;v.arraySet(Qe,je,ne,st,Ze),lt-=st,ne+=st,Be-=st,Ze+=st,de.length-=st;break}de.mode=k;break;case Z:for(;rt<14;){if(lt===0)break e;lt--,$e+=je[ne++]<>>=5,rt-=5,de.ndist=($e&31)+1,$e>>>=5,rt-=5,de.ncode=($e&15)+4,$e>>>=4,rt-=4,de.nlen>286||de.ndist>30){ve.msg="too many length or distance symbols",de.mode=fe;break}de.have=0,de.mode=re;case re:for(;de.have>>=3,rt-=3}for(;de.have<19;)de.lens[$t[de.have++]]=0;if(de.lencode=de.lendyn,de.lenbits=7,rn={bits:de.lenbits},It=(0,s.default)(o,de.lens,0,19,de.lencode,0,de.work,rn),de.lenbits=rn.bits,It){ve.msg="invalid code lengths set",de.mode=fe;break}de.have=0,de.mode=he;case he:for(;de.have>>24,Bt=xt>>>16&255,Ht=xt&65535,ht<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=ht,rt-=ht,de.lens[de.have++]=Ht;else{if(Ht===16){for(zt=ht+2;rt>>=ht,rt-=ht,de.have===0){ve.msg="invalid bit length repeat",de.mode=fe;break}Ut=de.lens[de.have-1],st=3+($e&3),$e>>>=2,rt-=2}else if(Ht===17){for(zt=ht+3;rt>>=ht,rt-=ht,Ut=0,st=3+($e&7),$e>>>=3,rt-=3}else{for(zt=ht+7;rt>>=ht,rt-=ht,Ut=0,st=11+($e&127),$e>>>=7,rt-=7}if(de.have+st>de.nlen+de.ndist){ve.msg="invalid bit length repeat",de.mode=fe;break}for(;st--;)de.lens[de.have++]=Ut}}if(de.mode===fe)break;if(de.lens[256]===0){ve.msg="invalid code -- missing end-of-block",de.mode=fe;break}if(de.lenbits=9,rn={bits:de.lenbits},It=(0,s.default)(n,de.lens,0,de.nlen,de.lencode,0,de.work,rn),de.lenbits=rn.bits,It){ve.msg="invalid literal/lengths set",de.mode=fe;break}if(de.distbits=6,de.distcode=de.distdyn,rn={bits:de.distbits},It=(0,s.default)(l,de.lens,de.nlen,de.ndist,de.distcode,0,de.work,rn),de.distbits=rn.bits,It){ve.msg="invalid distances set",de.mode=fe;break}if(de.mode=Se,xe===t)break e;case Se:de.mode=ke;case ke:if(lt>=6&&Be>=258){ve.next_out=Ze,ve.avail_out=Be,ve.next_in=ne,ve.avail_in=lt,de.hold=$e,de.bits=rt,(0,g.default)(ve,pt),Ze=ve.next_out,Qe=ve.output,Be=ve.avail_out,ne=ve.next_in,je=ve.input,lt=ve.avail_in,$e=de.hold,rt=de.bits,de.mode===k&&(de.back=-1);break}for(de.back=0;!(xt=de.lencode[$e&(1<>>24,Bt=xt>>>16&255,Ht=xt&65535,ht<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<>gt)],ht=xt>>>24,Bt=xt>>>16&255,Ht=xt&65535,gt+ht<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=gt,rt-=gt,de.back+=gt}if($e>>>=ht,rt-=ht,de.back+=ht,de.length=Ht,Bt===0){de.mode=me;break}if(Bt&32){de.back=-1,de.mode=k;break}if(Bt&64){ve.msg="invalid literal/length code",de.mode=fe;break}de.extra=Bt&15,de.mode=te;case te:if(de.extra){for(zt=de.extra;rt>>=de.extra,rt-=de.extra,de.back+=de.extra}de.was=de.length,de.mode=Re;case Re:for(;!(xt=de.distcode[$e&(1<>>24,Bt=xt>>>16&255,Ht=xt&65535,ht<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<>gt)],ht=xt>>>24,Bt=xt>>>16&255,Ht=xt&65535,gt+ht<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<>>=gt,rt-=gt,de.back+=gt}if($e>>>=ht,rt-=ht,de.back+=ht,Bt&64){ve.msg="invalid distance code",de.mode=fe;break}de.offset=Ht,de.extra=Bt&15,de.mode=Ce;case Ce:if(de.extra){for(zt=de.extra;rt>>=de.extra,rt-=de.extra,de.back+=de.extra}if(de.offset>de.dmax){ve.msg="invalid distance too far back",de.mode=fe;break}de.mode=pe;case pe:if(Be===0)break e;if(st=pt-Be,de.offset>st){if(st=de.offset-st,st>de.whave&&de.sane){ve.msg="invalid distance too far back",de.mode=fe;break}st>de.wnext?(st-=de.wnext,Pe=de.wsize-st):Pe=de.wnext-st,st>de.length&&(st=de.length),ze=de.window}else ze=Qe,Pe=Ze-de.offset,st=de.length;st>Be&&(st=Be),Be-=st,de.length-=st;do Qe[Ze++]=ze[Pe++];while(--st);de.length===0&&(de.mode=ke);break;case me:if(Be===0)break e;Qe[Ze++]=de.length,Be--,de.mode=ke;break;case se:if(de.wrap){for(;rt<32;){if(lt===0)break e;lt--,$e|=je[ne++]<0&&arguments[0]!==void 0?arguments[0]:[],Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=he.length,te=Se.length;if(Math.abs(ke-te)!==1)return{add:!1,key:null};function Re(Ce,pe){var me=new Map;Ce.forEach(function(be){me.set(be,!0)});var se=pe.filter(function(be){return!me.has(be)});return se.length===1?se[0]:null}return ke ").concat(Se);return Se}var k=function(Se,ke){var te=Se.prefixCls,Re=Se.data,Ce=Se.selectable,pe=Se.checkable,me=Se.expandedKeys,se=Se.selectedKeys,be=Se.checkedKeys,ae=Se.loadedKeys,fe=Se.loadingKeys,Fe=Se.halfCheckedKeys,ie=Se.keyEntities,q=Se.disabled,Q=Se.dragging,Y=Se.dragOverNodeKey,oe=Se.dropPosition,le=Se.motion,Ee=Se.height,Le=Se.itemHeight,ge=Se.virtual,De=Se.focusable,_e=Se.activeItem,Xe=Se.focused,tt=Se.tabIndex,Ge=Se.onKeyDown,Me=Se.onFocus,Et=Se.onBlur,Oe=Se.onActiveChange,Ve=Se.onListChangeStart,Je=Se.onListChangeEnd,Ye=Object(c.a)(Se,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Ne=p.useRef(null);p.useImperativeHandle(ke,function(){return{scrollTo:function(Ut){Ne.current.scrollTo(Ut)}}});var He=p.useState(me),ve=Object(a.a)(He,2),xe=ve[0],de=ve[1],je=p.useState(Re),Qe=Object(a.a)(je,2),ne=Qe[0],Ze=Qe[1],lt=p.useState(Re),Be=Object(a.a)(lt,2),$e=Be[0],rt=Be[1],St=p.useState([]),pt=Object(a.a)(St,2),st=pt[0],Pe=pt[1],ze=p.useState(null),xt=Object(a.a)(ze,2),ht=xt[0],Bt=xt[1];function Ht(){Ze(Re),rt(Re),Pe([]),Bt(null),Je()}p.useEffect(function(){de(me);var jt=O(xe,me);if(jt.key!==null)if(jt.add){var Ut=ne.findIndex(function(Pn){var fn=Pn.data.key;return fn===jt.key}),It=P(C(ne,Re,jt.key),ge,Ee,Le),Kt=ne.slice();Kt.splice(Ut+1,0,N),rt(Kt),Pe(It),Bt("show")}else{var rn=Re.findIndex(function(Pn){var fn=Pn.data.key;return fn===jt.key}),zt=P(C(Re,ne,jt.key),ge,Ee,Le),$t=Re.slice();$t.splice(rn+1,0,N),rt($t),Pe(zt),Bt("hide")}else ne!==Re&&(Ze(Re),rt(Re))},[me,Re]),p.useEffect(function(){Q||Ht()},[Q]);var gt=le?$e:Re,Xt={expandedKeys:me,selectedKeys:se,loadedKeys:ae,loadingKeys:fe,checkedKeys:be,halfCheckedKeys:Fe,dragOverNodeKey:Y,dropPosition:oe,keyEntities:ie};return p.createElement(p.Fragment,null,Xe&&_e&&p.createElement("span",{style:w,"aria-live":"assertive"},X(_e)),p.createElement("div",{role:"tree"},p.createElement("input",{style:w,disabled:De===!1||q,tabIndex:De!==!1?tt:null,onKeyDown:Ge,onFocus:Me,onBlur:Et,value:"",onChange:S})),p.createElement(d.a,Object.assign({},Ye,{data:gt,itemKey:z,height:Ee,fullHeight:!1,virtual:ge,itemHeight:Le,prefixCls:"".concat(te,"-list"),ref:Ne}),function(jt){var Ut=jt.pos,It=jt.data,Kt=It.key,rn=Object(c.a)(It,["key"]),zt=jt.isStart,$t=jt.isEnd,Pn=Object(t.e)(Kt,Ut);delete rn.children;var fn=Object(t.f)(Pn,Xt);return p.createElement(x,Object.assign({},rn,fn,{active:_e&&Kt===_e.data.key,pos:Ut,data:jt.data,isStart:zt,isEnd:$t,motion:le,motionNodes:Kt===A?st:null,motionType:ht,onMotionStart:Ve,onMotionEnd:Ht,treeNodeRequiredProps:Xt,onMouseMove:function(){Oe(null)}}))}))},F=p.forwardRef(k);F.displayName="NodeList";var U=F,L=b("NvD2"),B=function(he){Object(s.a)(ke,he);var Se=Object(_.a)(ke);function ke(){var te;return Object(y.a)(this,ke),te=Se.apply(this,arguments),te.destroyed=!1,te.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},te.listRef=p.createRef(),te.onNodeDragStart=function(Re,Ce){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=te.props.onDragStart,ae=Ce.props.eventKey;te.dragNode=Ce;var fe=Object(i.b)(me,ae);te.setState({dragging:!0,dragNodesKeys:Object(i.g)(ae,se)}),te.setExpandedKeys(fe),be&&be({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragEnter=function(Re,Ce){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=pe.dragNodesKeys,ae=te.props.onDragEnter,fe=Ce.props,Fe=fe.pos,ie=fe.eventKey;if(!te.dragNode||be.indexOf(ie)!==-1)return;var q=Object(i.c)(Re,Ce);if(te.dragNode.props.eventKey===ie&&q===0){te.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){te.setState({dragOverNodeKey:ie,dropPosition:q}),te.delayedDragEnterLogic||(te.delayedDragEnterLogic={}),Object.keys(te.delayedDragEnterLogic).forEach(function(Q){clearTimeout(te.delayedDragEnterLogic[Q])}),te.delayedDragEnterLogic[Fe]=window.setTimeout(function(){if(!te.state.dragging)return;var Q=Object(T.a)(me),Y=se[ie];Y&&(Y.children||[]).length&&(Q=Object(i.a)(me,ie)),"expandedKeys"in te.props||te.setExpandedKeys(Q),ae&&ae({event:Re,node:Object(t.b)(Ce.props),expandedKeys:Q})},400)},0)},te.onNodeDragOver=function(Re,Ce){var pe=te.state.dragNodesKeys,me=te.props.onDragOver,se=Ce.props.eventKey;if(pe.indexOf(se)!==-1)return;if(te.dragNode&&se===te.state.dragOverNodeKey){var be=Object(i.c)(Re,Ce);if(be===te.state.dropPosition)return;te.setState({dropPosition:be})}me&&me({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragLeave=function(Re,Ce){var pe=te.props.onDragLeave;te.setState({dragOverNodeKey:""}),pe&&pe({event:Re,node:Object(t.b)(Ce.props)})},te.onNodeDragEnd=function(Re,Ce){var pe=te.props.onDragEnd;te.setState({dragOverNodeKey:""}),te.cleanDragState(),pe&&pe({event:Re,node:Object(t.b)(Ce.props)}),te.dragNode=null},te.onNodeDrop=function(Re,Ce){var pe=te.state,me=pe.dragNodesKeys,se=me===void 0?[]:me,be=pe.dropPosition,ae=te.props.onDrop,fe=Ce.props,Fe=fe.eventKey,ie=fe.pos;if(te.setState({dragOverNodeKey:""}),te.cleanDragState(),se.indexOf(Fe)!==-1){Object(o.a)(!1,"Can not drop to dragNode(include it's children node)");return}var q=Object(i.k)(ie),Q={event:Re,node:Object(t.b)(Ce.props),dragNode:te.dragNode?Object(t.b)(te.dragNode.props):null,dragNodesKeys:se.slice(),dropPosition:be+Number(q[q.length-1]),dropToGap:!1};be!==0&&(Q.dropToGap=!0),ae&&ae(Q),te.dragNode=null},te.cleanDragState=function(){var Re=te.state.dragging;Re&&te.setState({dragging:!1})},te.onNodeClick=function(Re,Ce){var pe=te.props.onClick;pe&&pe(Re,Ce)},te.onNodeDoubleClick=function(Re,Ce){var pe=te.props.onDoubleClick;pe&&pe(Re,Ce)},te.onNodeSelect=function(Re,Ce){var pe=te.state.selectedKeys,me=te.state.keyEntities,se=te.props,be=se.onSelect,ae=se.multiple,fe=Ce.selected,Fe=Ce.key,ie=!fe;ie?ae?pe=Object(i.a)(pe,Fe):pe=[Fe]:pe=Object(i.b)(pe,Fe);var q=pe.map(function(Q){var Y=me[Q];return Y?Y.node:null}).filter(function(Q){return Q});te.setUncontrolledState({selectedKeys:pe}),be&&be(pe,{event:"select",selected:ie,node:Ce,selectedNodes:q,nativeEvent:Re.nativeEvent})},te.onNodeCheck=function(Re,Ce,pe){var me=te.state,se=me.keyEntities,be=me.checkedKeys,ae=me.halfCheckedKeys,fe=te.props,Fe=fe.checkStrictly,ie=fe.onCheck,q=Ce.key,Q,Y={event:"check",node:Ce,checked:pe,nativeEvent:Re.nativeEvent};if(Fe){var oe=pe?Object(i.a)(be,q):Object(i.b)(be,q),le=Object(i.b)(ae,q);Q={checked:oe,halfChecked:le},Y.checkedNodes=oe.map(function(Xe){return se[Xe]}).filter(function(Xe){return Xe}).map(function(Xe){return Xe.node}),te.setUncontrolledState({checkedKeys:oe})}else{var Ee=Object(L.a)([].concat(Object(T.a)(be),[q]),!0,se),Le=Ee.checkedKeys,ge=Ee.halfCheckedKeys;if(!pe){var De=new Set(Le);De.delete(q);var _e=Object(L.a)(Array.from(De),{checked:!1,halfCheckedKeys:ge},se);Le=_e.checkedKeys,ge=_e.halfCheckedKeys}Q=Le,Y.checkedNodes=[],Y.checkedNodesPositions=[],Y.halfCheckedKeys=ge,Le.forEach(function(Xe){var tt=se[Xe];if(!tt)return;var Ge=tt.node,Me=tt.pos;Y.checkedNodes.push(Ge),Y.checkedNodesPositions.push({node:Ge,pos:Me})}),te.setUncontrolledState({checkedKeys:Le},!1,{halfCheckedKeys:ge})}ie&&ie(Q,Y)},te.onNodeLoad=function(Re){return new Promise(function(Ce){te.setState(function(pe){var me=pe.loadedKeys,se=me===void 0?[]:me,be=pe.loadingKeys,ae=be===void 0?[]:be,fe=te.props,Fe=fe.loadData,ie=fe.onLoad,q=Re.key;if(!Fe||se.indexOf(q)!==-1||ae.indexOf(q)!==-1)return{};var Q=Fe(Re);return Q.then(function(){var Y=te.state,oe=Y.loadedKeys,le=Y.loadingKeys,Ee=Object(i.a)(oe,q),Le=Object(i.b)(le,q);ie&&ie(Ee,{event:"load",node:Re}),te.setUncontrolledState({loadedKeys:Ee}),te.setState({loadingKeys:Le}),Ce()}),{loadingKeys:Object(i.a)(ae,q)}})})},te.onNodeMouseEnter=function(Re,Ce){var pe=te.props.onMouseEnter;pe&&pe({event:Re,node:Ce})},te.onNodeMouseLeave=function(Re,Ce){var pe=te.props.onMouseLeave;pe&&pe({event:Re,node:Ce})},te.onNodeContextMenu=function(Re,Ce){var pe=te.props.onRightClick;pe&&(Re.preventDefault(),pe({event:Re,node:Ce}))},te.onFocus=function(){var Re=te.props.onFocus;te.setState({focused:!0}),Re&&Re.apply(void 0,arguments)},te.onBlur=function(){var Re=te.props.onBlur;te.setState({focused:!1}),te.onActiveChange(null),Re&&Re.apply(void 0,arguments)},te.getTreeNodeRequiredProps=function(){var Re=te.state,Ce=Re.expandedKeys,pe=Re.selectedKeys,me=Re.loadedKeys,se=Re.loadingKeys,be=Re.checkedKeys,ae=Re.halfCheckedKeys,fe=Re.dragOverNodeKey,Fe=Re.dropPosition,ie=Re.keyEntities;return{expandedKeys:Ce||[],selectedKeys:pe||[],loadedKeys:me||[],loadingKeys:se||[],checkedKeys:be||[],halfCheckedKeys:ae||[],dragOverNodeKey:fe,dropPosition:Fe,keyEntities:ie}},te.setExpandedKeys=function(Re){var Ce=te.state.treeData,pe=Object(t.d)(Ce,Re);te.setUncontrolledState({expandedKeys:Re,flattenNodes:pe},!0)},te.onNodeExpand=function(Re,Ce){var pe=te.state.expandedKeys,me=te.state.listChanging,se=te.props,be=se.onExpand,ae=se.loadData,fe=Ce.key,Fe=Ce.expanded;if(me)return;var ie=pe.indexOf(fe),q=!Fe;if(Object(o.a)(Fe&&ie!==-1||!Fe&&ie===-1,"Expand state not sync with index check"),q?pe=Object(i.a)(pe,fe):pe=Object(i.b)(pe,fe),te.setExpandedKeys(pe),be&&be(pe,{node:Ce,expanded:q,nativeEvent:Re.nativeEvent}),q&&ae){var Q=te.onNodeLoad(Ce);Q&&Q.then(function(){var Y=Object(t.d)(te.state.treeData,pe);te.setUncontrolledState({flattenNodes:Y})})}},te.onListChangeStart=function(){te.setUncontrolledState({listChanging:!0})},te.onListChangeEnd=function(){setTimeout(function(){te.setUncontrolledState({listChanging:!1})})},te.onActiveChange=function(Re){var Ce=te.state.activeKey,pe=te.props.onActiveChange;if(Ce===Re)return;te.setState({activeKey:Re}),Re!==null&&te.scrollTo({key:Re}),pe&&pe(Re)},te.getActiveItem=function(){var Re=te.state,Ce=Re.activeKey,pe=Re.flattenNodes;return Ce===null?null:pe.find(function(me){var se=me.data.key;return se===Ce})||null},te.offsetActiveKey=function(Re){var Ce=te.state,pe=Ce.flattenNodes,me=Ce.activeKey,se=pe.findIndex(function(fe){var Fe=fe.data.key;return Fe===me});se===-1&&Re<0&&(se=pe.length),se=(se+Re+pe.length)%pe.length;var be=pe[se];if(be){var ae=be.data.key;te.onActiveChange(ae)}else te.onActiveChange(null)},te.onKeyDown=function(Re){var Ce=te.state,pe=Ce.activeKey,me=Ce.expandedKeys,se=Ce.checkedKeys,be=te.props,ae=be.onKeyDown,fe=be.checkable,Fe=be.selectable;switch(Re.which){case e.a.UP:{te.offsetActiveKey(-1),Re.preventDefault();break}case e.a.DOWN:{te.offsetActiveKey(1),Re.preventDefault();break}}var ie=te.getActiveItem();if(ie&&ie.data){var q=te.getTreeNodeRequiredProps(),Q=ie.data.isLeaf===!1||!!(ie.data.children||[]).length,Y=Object(t.b)(Object(v.a)(Object(v.a)({},Object(t.f)(pe,q)),{},{data:ie.data,active:!0}));switch(Re.which){case e.a.LEFT:{Q&&me.includes(pe)?te.onNodeExpand({},Y):ie.parent&&te.onActiveChange(ie.parent.data.key),Re.preventDefault();break}case e.a.RIGHT:{Q&&!me.includes(pe)?te.onNodeExpand({},Y):ie.children&&ie.children.length&&te.onActiveChange(ie.children[0].data.key),Re.preventDefault();break}case e.a.ENTER:case e.a.SPACE:{fe&&!Y.disabled&&Y.checkable!==!1&&!Y.disableCheckbox?te.onNodeCheck({},Y,!se.includes(pe)):!fe&&Fe&&!Y.disabled&&Y.selectable!==!1&&te.onNodeSelect({},Y);break}}}ae&&ae(Re)},te.setUncontrolledState=function(Re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(te.destroyed)return;var me=!1,se=!0,be={};Object.keys(Re).forEach(function(ae){if(ae in te.props){se=!1;return}me=!0,be[ae]=Re[ae]}),me&&(!Ce||se)&&te.setState(Object(v.a)(Object(v.a)({},be),pe))},te.scrollTo=function(Re){te.listRef.current.scrollTo(Re)},te}return Object(g.a)(ke,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var Re,Ce=this.state,pe=Ce.focused,me=Ce.flattenNodes,se=Ce.keyEntities,be=Ce.dragging,ae=Ce.activeKey,fe=this.props,Fe=fe.prefixCls,ie=fe.className,q=fe.style,Q=fe.showLine,Y=fe.focusable,oe=fe.tabIndex,le=oe===void 0?0:oe,Ee=fe.selectable,Le=fe.showIcon,ge=fe.icon,De=fe.switcherIcon,_e=fe.draggable,Xe=fe.checkable,tt=fe.checkStrictly,Ge=fe.disabled,Me=fe.motion,Et=fe.loadData,Oe=fe.filterTreeNode,Ve=fe.height,Je=fe.itemHeight,Ye=fe.virtual,Ne=fe.titleRender,He=fe.onContextMenu,ve=Object(i.f)(this.props);return p.createElement(r.a.Provider,{value:{prefixCls:Fe,selectable:Ee,showIcon:Le,icon:ge,switcherIcon:De,draggable:_e,checkable:Xe,checkStrictly:tt,disabled:Ge,keyEntities:se,loadData:Et,filterTreeNode:Oe,titleRender:Ne,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},p.createElement("div",{className:l()(Fe,ie,(Re={},Object(I.a)(Re,"".concat(Fe,"-show-line"),Q),Object(I.a)(Re,"".concat(Fe,"-focused"),pe),Object(I.a)(Re,"".concat(Fe,"-active-focused"),ae!==null),Re))},p.createElement(U,Object.assign({ref:this.listRef,prefixCls:Fe,style:q,data:me,disabled:Ge,selectable:Ee,checkable:!!Xe,motion:Me,dragging:be,height:Ve,itemHeight:Je,virtual:Ye,focusable:Y,focused:pe,tabIndex:le,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:He},this.getTreeNodeRequiredProps(),ve))))}}],[{key:"getDerivedStateFromProps",value:function(Re,Ce){var pe=Ce.prevProps,me={prevProps:Re};function se(ge){return!pe&&ge in Re||pe&&pe[ge]!==Re[ge]}var be;if(se("treeData")?be=Re.treeData:se("children")&&(Object(o.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=Object(t.c)(Re.children)),be){me.treeData=be;var ae=Object(t.a)(be);me.keyEntities=Object(v.a)(Object(I.a)({},A,M),ae.keyEntities)}var fe=me.keyEntities||Ce.keyEntities;if(se("expandedKeys")||pe&&se("autoExpandParent"))me.expandedKeys=Re.autoExpandParent||!pe&&Re.defaultExpandParent?Object(i.e)(Re.expandedKeys,fe):Re.expandedKeys;else if(!pe&&Re.defaultExpandAll){var Fe=Object(v.a)({},fe);delete Fe[A],me.expandedKeys=Object.keys(Fe).map(function(ge){return Fe[ge].key})}else!pe&&Re.defaultExpandedKeys&&(me.expandedKeys=Re.autoExpandParent||Re.defaultExpandParent?Object(i.e)(Re.defaultExpandedKeys,fe):Re.defaultExpandedKeys);if(me.expandedKeys||delete me.expandedKeys,be||me.expandedKeys){var ie=Object(t.d)(be||Ce.treeData,me.expandedKeys||Ce.expandedKeys);me.flattenNodes=ie}if(Re.selectable&&(se("selectedKeys")?me.selectedKeys=Object(i.d)(Re.selectedKeys,Re):!pe&&Re.defaultSelectedKeys&&(me.selectedKeys=Object(i.d)(Re.defaultSelectedKeys,Re))),Re.checkable){var q;if(se("checkedKeys")?q=Object(i.j)(Re.checkedKeys)||{}:!pe&&Re.defaultCheckedKeys?q=Object(i.j)(Re.defaultCheckedKeys)||{}:be&&(q=Object(i.j)(Re.checkedKeys)||{checkedKeys:Ce.checkedKeys,halfCheckedKeys:Ce.halfCheckedKeys}),q){var Q=q,Y=Q.checkedKeys,oe=Y===void 0?[]:Y,le=Q.halfCheckedKeys,Ee=le===void 0?[]:le;if(!Re.checkStrictly){var Le=Object(L.a)(oe,!0,fe);oe=Le.checkedKeys,Ee=Le.halfCheckedKeys}me.checkedKeys=oe,me.halfCheckedKeys=Ee}}return se("loadedKeys")&&(me.loadedKeys=Re.loadedKeys),me}}]),ke}(p.Component);B.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},B.TreeNode=h.a;var Z=B,re=H.b=Z},fXAG:function(j,H,b){"use strict";b.d(H,"j",function(){return I}),b.d(H,"i",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"eb",function(){return y}),b.d(H,"o",function(){return g}),b.d(H,"S",function(){return s}),b.d(H,"fb",function(){return _}),b.d(H,"u",function(){return p}),b.d(H,"v",function(){return e}),b.d(H,"cb",function(){return o}),b.d(H,"A",function(){return n}),b.d(H,"m",function(){return l}),b.d(H,"Y",function(){return r}),b.d(H,"s",function(){return i}),b.d(H,"N",function(){return t}),b.d(H,"bb",function(){return a}),b.d(H,"db",function(){return c}),b.d(H,"l",function(){return d}),b.d(H,"Q",function(){return f}),b.d(H,"ab",function(){return h}),b.d(H,"x",function(){return u}),b.d(H,"z",function(){return E}),b.d(H,"X",function(){return x}),b.d(H,"b",function(){return O}),b.d(H,"H",function(){return C}),b.d(H,"a",function(){return w}),b.d(H,"c",function(){return A}),b.d(H,"P",function(){return D}),b.d(H,"g",function(){return M}),b.d(H,"t",function(){return N}),b.d(H,"Z",function(){return P}),b.d(H,"y",function(){return z}),b.d(H,"B",function(){return X}),b.d(H,"f",function(){return k}),b.d(H,"e",function(){return F}),b.d(H,"W",function(){return U}),b.d(H,"h",function(){return L}),b.d(H,"d",function(){return B}),b.d(H,"R",function(){return re}),b.d(H,"n",function(){return he}),b.d(H,"F",function(){return Se}),b.d(H,"I",function(){return ke}),b.d(H,"D",function(){return te}),b.d(H,"E",function(){return Re}),b.d(H,"C",function(){return Ce}),b.d(H,"G",function(){return pe}),b.d(H,"U",function(){return me}),b.d(H,"q",function(){return se}),b.d(H,"r",function(){return be}),b.d(H,"V",function(){return ae}),b.d(H,"T",function(){return fe}),b.d(H,"p",function(){return Fe}),b.d(H,"M",function(){return ie}),b.d(H,"L",function(){return q}),b.d(H,"J",function(){return Q}),b.d(H,"K",function(){return Y}),b.d(H,"O",function(){return oe}),b.d(H,"w",function(){return le});var I="FETCH_TASK_START",v="FETCH_TASK_FAILURE",T="FETCH_TASK_SUCCESS",y="UPDATE_TASK_DATA",g="HIDE_EVALUATE_RESULT",s="SHOW_EVALUATE_RESULT",_="UPDATE_TIMESTRAP",p="MOVE_X",e="MOVE_Y",o="TRIGGER_RIGHT_PANEL_MASK ",n="SET_ACTIVE_INDEX",l="GET_TASK_LIST",r="SHOW_TASK_LIST",i="HIDE_TASK_LIST",t="SET_TASK_STAR",a="TRIGGER_ENLARGE_UNITY3D ",c="TRIGGER_TAB_FIXED ",d="GET_DISCUSSES",f="SHOW_DISCUSSES_LOADING",h="TOP_OR_DOWN_DISCUSS",u="PLUS_DISCUSS",E="SET_ACTION_TYPE",x="SHOW_REWARD_DIALOG",O="CANCEL_REWARD_DIALOG",C="SET_REWARD",w="ACTIVE_DISCUSS_INDEX",S="CREATE_DISCUSS",A="DISABLE_DISCUSS",D="SHOW_ANSWER_LOADING",M="FETCH_ANSWER_INFO",N="HIGH_TIP_MODAL",P="SHOW_TIP_MODAL",z="SELECT_UNLOCK_ANSWER",X="SET_CHOOSE_ANSWERS",k="EVAL_CHOOSE_START",F="EVAL_CHOOSE_END",U="SHOW_REP_loading",L="FETCH_REP_CONTENT",B="EDIT_REP_CONTENT",Z="SET_REP_PATH",re="SHOW_EVALUATE_LOADING",he="HIDE_EVALUATE_LOADING",Se="SET_EVALUATE_MESSAGE",ke="SET_SHOW_DIR",te="SET_EDITOR_SETTING",Re="SET_EDITOR_THEME",Ce="SET_EDITOR_FONTSIZE",pe="SET_REPOS",me="SHOW_PATH_LIST",se="HIDE_PATH_LIST",be="HIDE_PICTURE_VIEW",ae="SHOW_PICTURE_VIEW",fe="SHOW_NOTICE",Fe="HIDE_NOTICE",ie="SET_TAB_INDEX",q="SET_SSH_TABS",Q="SET_SSH_CONFIGDATA",Y="SET_SSH_CONFIGDATAARR",oe="SET_VNC_LOADING ",le="ON_TAB_TO_SPACE "},fcSX:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("md7G"),s=b("foSv"),_=b("1W/9"),p=b("q1tI"),e=b("rePB"),o=b("JX7q"),n=b("TSYQ"),l=b.n(n),r=b("qx4F"),i=b("4IlW");function t(k){return Array.isArray(k)?k:[k]}var a={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},c=Object.keys(a).filter(function(k){if(typeof document=="undefined")return!1;var F=document.getElementsByTagName("html")[0];return k in(F?F.style:{})})[0],d=a[c];function f(k,F,U,L){k.addEventListener?k.addEventListener(F,U,L):k.attachEvent&&k.attachEvent("on".concat(F),U)}function h(k,F,U,L){k.removeEventListener?k.removeEventListener(F,U,L):k.attachEvent&&k.detachEvent("on".concat(F),U)}function u(k,F){var U=typeof k=="function"?k(F):k;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var E=function(F){return!isNaN(parseFloat(F))&&isFinite(F)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),O=function k(F,U,L,B){if(!U||U===document||U instanceof Document)return!1;if(U===F.parentNode)return!0;var Z=Math.max(Math.abs(L),Math.abs(B))===Math.abs(B),re=Math.max(Math.abs(L),Math.abs(B))===Math.abs(L),he=U.scrollHeight-U.clientHeight,Se=U.scrollWidth-U.clientWidth,ke=document.defaultView.getComputedStyle(U),te=ke.overflowY==="auto"||ke.overflowY==="scroll",Re=ke.overflowX==="auto"||ke.overflowX==="scroll",Ce=he&&te,pe=Se&ℜreturn Z&&(!Ce||Ce&&(U.scrollTop>=he&&B<0||U.scrollTop<=0&&B>0))||re&&(!pe||pe&&(U.scrollLeft>=Se&&L<0||U.scrollLeft<=0&&L>0))?k(F,U.parentNode,L,B):!1};function C(k){var F=w();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.a)(this,B)}}function w(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(k){return!1}}var S={},A=function(k){Object(y.a)(U,k);var F=C(U);function U(L){var B;return Object(v.a)(this,U),B=F.call(this,L),B.domFocus=function(){B.dom&&B.dom.focus()},B.removeStartHandler=function(Z){if(Z.touches.length>1)return;B.startPos={x:Z.touches[0].clientX,y:Z.touches[0].clientY}},B.removeMoveHandler=function(Z){if(Z.changedTouches.length>1)return;var re=Z.currentTarget,he=Z.changedTouches[0].clientX-B.startPos.x,Se=Z.changedTouches[0].clientY-B.startPos.y;(re===B.maskDom||re===B.handlerDom||re===B.contentDom&&O(re,Z.target,he,Se))&&Z.cancelable&&Z.preventDefault()},B.transitionEnd=function(Z){var re=Z.target;h(re,d,B.transitionEnd),re.style.transition=""},B.onKeyDown=function(Z){if(Z.keyCode===i.a.ESC){var re=B.props.onClose;Z.stopPropagation(),re&&re(Z)}},B.onWrapperTransitionEnd=function(Z){var re=B.props,he=re.open,Se=re.afterVisibleChange;Z.target===B.contentWrapper&&Z.propertyName.match(/transform$/)&&(B.dom.style.transition="",!he&&B.getCurrentDrawerSome()&&(document.body.style.overflowX="",B.maskDom&&(B.maskDom.style.left="",B.maskDom.style.width="")),Se&&Se(!!he))},B.openLevelTransition=function(){var Z=B.props,re=Z.open,he=Z.width,Se=Z.height,ke=B.getHorizontalBoolAndPlacementName(),te=ke.isHorizontal,Re=ke.placementName,Ce=B.contentDom?B.contentDom.getBoundingClientRect()[te?"width":"height"]:0,pe=(te?he:Se)||Ce;B.setLevelAndScrolling(re,Re,pe)},B.setLevelTransform=function(Z,re,he,Se){var ke=B.props,te=ke.placement,Re=ke.levelMove,Ce=ke.duration,pe=ke.ease,me=ke.showMask;B.levelDom.forEach(function(se){se.style.transition="transform ".concat(Ce," ").concat(pe),f(se,d,B.transitionEnd);var be=Z?he:0;if(Re){var ae=u(Re,{target:se,open:Z});be=Z?ae[0]:ae[1]||0}var fe=typeof be=="number"?"".concat(be,"px"):be,Fe=te==="left"||te==="top"?fe:"-".concat(fe);Fe=me&&te==="right"&&Se?"calc(".concat(Fe," + ").concat(Se,"px)"):Fe,se.style.transform=be?"".concat(re,"(").concat(Fe,")"):""})},B.setLevelAndScrolling=function(Z,re,he){var Se=B.props.onChange;if(!x){var ke=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;B.setLevelTransform(Z,re,he,ke),B.toggleScrollingToDrawerAndBody(ke)}Se&&Se(Z)},B.toggleScrollingToDrawerAndBody=function(Z){var re=B.props,he=re.getOpenCount,Se=re.getContainer,ke=re.showMask,te=re.open,Re=Se&&Se(),Ce=he&&he();if(Re&&Re.parentNode===document.body&&ke){var pe=["touchstart"],me=[document.body,B.maskDom,B.handlerDom,B.contentDom];te&&document.body.style.overflow!=="hidden"?(Z&&B.addScrollingEffect(Z),Ce===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",me.forEach(function(se,be){if(!se)return;f(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)})):B.getCurrentDrawerSome()&&(Ce||(document.body.style.overflow=""),document.body.style.touchAction="",Z&&B.remScrollingEffect(Z),me.forEach(function(se,be){if(!se)return;h(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)}))}},B.addScrollingEffect=function(Z){var re=B.props,he=re.placement,Se=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Ce=te&&te();Ce===1&&Re();var pe="width ".concat(Se," ").concat(ke),me="transform ".concat(Se," ").concat(ke);B.dom.style.transition="none";switch(he){case"right":B.dom.style.transform="translateX(-".concat(Z,"px)");break;case"top":case"bottom":B.dom.style.width="calc(100% - ".concat(Z,"px)"),B.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(me,",").concat(pe),B.dom.style.width="",B.dom.style.transform="")})},B.remScrollingEffect=function(Z){var re=B.props,he=re.placement,Se=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Ce=te&&te();Ce||Re(!0),c&&(document.body.style.overflowX="hidden"),B.dom.style.transition="none";var pe,me="width ".concat(Se," ").concat(ke),se="transform ".concat(Se," ").concat(ke);switch(he){case"left":{B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Se);break}case"right":{B.dom.style.transform="translateX(".concat(Z,"px)"),B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Se),B.maskDom&&(B.maskDom.style.left="-".concat(Z,"px"),B.maskDom.style.width="calc(100% + ".concat(Z,"px)"));break}case"top":case"bottom":{B.dom.style.width="calc(100% + ".concat(Z,"px)"),B.dom.style.height="100%",B.dom.style.transform="translateZ(0)",pe="height 0s ".concat(ke," ").concat(Se);break}default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(se,",").concat(pe?"".concat(pe,","):"").concat(me),B.dom.style.transform="",B.dom.style.width="",B.dom.style.height="")})},B.getCurrentDrawerSome=function(){return!Object.keys(S).some(function(Z){return S[Z]})},B.getLevelDom=function(Z){var re=Z.level,he=Z.getContainer;if(x)return;var Se=he&&he(),ke=Se?Se.parentNode:null;if(B.levelDom=[],re==="all"){var te=ke?Array.prototype.slice.call(ke.children):[];te.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==Se&&B.levelDom.push(Re)})}else re&&t(re).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Ce){B.levelDom.push(Ce)})})},B.getHorizontalBoolAndPlacementName=function(){var Z=B.props.placement,re=Z==="left"||Z==="right",he="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:he}},B.state={_self:Object(o.a)(B)},B}return Object(T.a)(U,[{key:"componentDidMount",value:function(){var B=this;if(!x){var Z=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Z=!0,null}}))}catch(te){}this.passive=Z?{passive:!1}:!1}var re=this.props,he=re.open,Se=re.getContainer,ke=Se&&Se();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),he&&(ke&&ke.parentNode===document.body&&(S[this.drawerId]=he),this.openLevelTransition(),this.forceUpdate(function(){B.domFocus()}))}},{key:"componentDidUpdate",value:function(B){var Z=this.props,re=Z.open,he=Z.getContainer,Se=he&&he();re!==B.open&&(re&&this.domFocus(),Se&&Se.parentNode===document.body&&(S[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var B=this.props,Z=B.getOpenCount,re=B.open,he=B.switchScrollingEffect,Se=typeof Z=="function"&&Z();delete S[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Se||(document.body.style.overflow="",he(!0))}},{key:"render",value:function(){var B,Z=this,re=this.props,he=re.className,Se=re.children,ke=re.style,te=re.width,Re=re.height,Ce=re.defaultOpen,pe=re.open,me=re.prefixCls,se=re.placement,be=re.level,ae=re.levelMove,fe=re.ease,Fe=re.duration,ie=re.getContainer,q=re.handler,Q=re.onChange,Y=re.afterVisibleChange,oe=re.showMask,le=re.maskClosable,Ee=re.maskStyle,Le=re.onClose,ge=re.onHandleClick,De=re.keyboard,_e=re.getOpenCount,Xe=re.switchScrollingEffect,tt=Object(I.a)(re,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Ge=this.dom?pe:!1,Me=l()(me,(B={},Object(e.a)(B,"".concat(me,"-").concat(se),!0),Object(e.a)(B,"".concat(me,"-open"),Ge),Object(e.a)(B,he||"",!!he),Object(e.a)(B,"no-mask",!oe),B)),Et=this.getHorizontalBoolAndPlacementName(),Oe=Et.placementName,Ve=se==="left"||se==="top"?"-100%":"100%",Je=Ge?"":"".concat(Oe,"(").concat(Ve,")"),Ye=q&&p.cloneElement(q,{onClick:function(He){q.props.onClick&&q.props.onClick(),ge&&ge(He)},ref:function(He){Z.handlerDom=He}});return p.createElement("div",Object.assign({},tt,{tabIndex:-1,className:Me,style:ke,ref:function(He){Z.dom=He},onKeyDown:Ge&&De?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),oe&&p.createElement("div",{className:"".concat(me,"-mask"),onClick:le?Le:void 0,style:Ee,ref:function(He){Z.maskDom=He}}),p.createElement("div",{className:"".concat(me,"-content-wrapper"),style:{transform:Je,msTransform:Je,width:E(te)?"".concat(te,"px"):te,height:E(Re)?"".concat(Re,"px"):Re},ref:function(He){Z.contentWrapper=He}},p.createElement("div",{className:"".concat(me,"-content"),ref:function(He){Z.contentDom=He},onTouchStart:Ge&&oe?this.removeStartHandler:void 0,onTouchMove:Ge&&oe?this.removeMoveHandler:void 0},Se),Ye))}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he=Z._self,Se={prevProps:B};if(re!==void 0){var ke=B.placement,te=B.level;ke!==re.placement&&(he.contentDom=null),te!==re.level&&he.getLevelDom(B)}return Se}}]),U}(p.Component);A.defaultProps={switchScrollingEffect:function(){}};var D=A;function M(k){var F=N();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.a)(this,B)}}function N(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(k){return!1}}var P=function(k){Object(y.a)(U,k);var F=M(U);function U(L){var B;Object(v.a)(this,U),B=F.call(this,L),B.onHandleClick=function(re){var he=B.props,Se=he.onHandleClick,ke=he.open;if(Se&&Se(re),typeof ke=="undefined"){var te=B.state.open;B.setState({open:!te})}},B.onClose=function(re){var he=B.props,Se=he.onClose,ke=he.open;Se&&Se(re),typeof ke=="undefined"&&B.setState({open:!1})};var Z=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return B.state={open:Z},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),B}return Object(T.a)(U,[{key:"render",value:function(){var B=this,Z=this.props,re=Z.defaultOpen,he=Z.getContainer,Se=Z.wrapperClassName,ke=Z.forceRender,te=Z.handler,Re=Object(I.a)(Z,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ce=this.state.open;if(!he)return p.createElement("div",{className:Se,ref:function(se){B.dom=se}},p.createElement(D,Object.assign({},Re,{open:Ce,handler:te,getContainer:function(){return B.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!te||ke;return p.createElement(_.a,{visible:Ce,forceRender:pe,getContainer:he,wrapperClassName:Se},function(me){var se=me.visible,be=me.afterClose,ae=Object(I.a)(me,["visible","afterClose"]);return p.createElement(D,Object.assign({},Re,ae,{open:se!==void 0?se:Ce,afterVisibleChange:be!==void 0?be:Re.afterVisibleChange,handler:te,onClose:B.onClose,onHandleClick:B.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he={prevProps:B};return typeof re!="undefined"&&B.open!==re.open&&(he.open=B.open),he}}]),U}(p.Component);P.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:p.createElement("div",{className:"drawer-handle"},p.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var z=P,X=H.a=z},fjLI:function(j,H,b){"use strict";b.d(H,"f",function(){return r}),b.d(H,"b",function(){return i}),b.d(H,"a",function(){return t}),b.d(H,"d",function(){return a}),b.d(H,"e",function(){return c}),b.d(H,"c",function(){return d});var I=b("8HAY"),v=b("Vhoy"),T=b("MI8n"),y=b("JYp7"),g=b("pmY6"),s=b("24hK"),_=b("nnTU"),p=b("T8No"),e=b("Cg/j"),o=b("t9D7"),n=function(f,h,u,E){var x=arguments.length,O=x<3?h:E===null?E=Object.getOwnPropertyDescriptor(h,u):E,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,u,E);else for(var w=f.length-1;w>=0;w--)(C=f[w])&&(O=(x<3?C(O):x>3?C(h,u,O):C(h,u))||O);return x>3&&O&&Object.defineProperty(h,u,O),O},l=function(f,h){return function(u,E){h(u,E,f)}};function r(f){return f.command!==void 0}class i{constructor(f){this.id=i._idPool++,this._debugName=f}}i._idPool=0,i.CommandPalette=new i("CommandPalette"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.InlineCompletionsActions=new i("InlineCompletionsActions");const t=Object(e.c)("menuService"),a=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new T.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:f=>f===i.CommandPalette}}addCommand(f){return this.addCommands(y.a.single(f))}addCommands(f){for(const h of f)this._commands.set(h.id,h);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(g.i)(()=>{let h=!1;for(const u of f)h=this._commands.delete(u.id)||h;h&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(f){return this._commands.get(f)}getCommands(){const f=new Map;return this._commands.forEach((h,u)=>f.set(u,h)),f}appendMenuItem(f,h){return this.appendMenuItems(y.a.single({id:f,item:h}))}appendMenuItems(f){const h=new Set,u=new s.a;for(const{id:E,item:x}of f){let O=this._menuItems.get(E);O||(O=new s.a,this._menuItems.set(E,O)),u.push(O.push(x)),h.add(E)}return this._onDidChangeMenu.fire(h),Object(g.i)(()=>{if(u.size>0){for(let E of u)E();this._onDidChangeMenu.fire(h),u.clear()}})}getMenuItems(f){let h;return this._menuItems.has(f)?h=[...this._menuItems.get(f)]:h=[],f===i.CommandPalette&&this._appendImplicitItems(h),h}_appendImplicitItems(f){const h=new Set;for(const u of f)r(u)&&(h.add(u.command.id),u.alt&&h.add(u.alt.id));this._commands.forEach((u,E)=>{h.has(E)||f.push({command:u})})}};class c extends I.e{constructor(f,h,u,E){super(`submenuitem.${f.submenu.id}`,typeof f.title=="string"?f.title:f.title.value,[],"submenu");this.item=f,this._menuService=h,this._contextKeyService=u,this._options=E}get actions(){const f=[],h=this._menuService.createMenu(this.item.submenu,this._contextKeyService),u=h.getActions(this._options);h.dispose();for(const[,E]of u)E.length>0&&(f.push(...E),f.push(new I.d));return f.length&&f.pop(),f}}let d=class f{constructor(h,u,E,x,O){var C,w;if(this._commandService=O,this.id=h.id,this.label=(E==null?void 0:E.renderShortTitle)&&h.shortTitle?typeof h.shortTitle=="string"?h.shortTitle:h.shortTitle.value:typeof h.title=="string"?h.title:h.title.value,this.tooltip=(w=typeof h.tooltip=="string"?h.tooltip:(C=h.tooltip)===null||C===void 0?void 0:C.value)!==null&&w!==void 0?w:"",this.enabled=!h.precondition||x.contextMatchesRules(h.precondition),this.checked=void 0,h.toggled){const S=h.toggled.condition?h.toggled:{condition:h.toggled};this.checked=x.contextMatchesRules(S.condition),this.checked&&S.tooltip&&(this.tooltip=typeof S.tooltip=="string"?S.tooltip:S.tooltip.value),S.title&&(this.label=typeof S.title=="string"?S.title:S.title.value)}this.item=h,this.alt=u?new f(u,void 0,E,x,O):void 0,this._options=E,o.d.isThemeIcon(h.icon)&&(this.class=v.a.asClassName(h.icon))}dispose(){}run(...h){var u,E;let x=[];return((u=this._options)===null||u===void 0?void 0:u.arg)&&(x=[...x,this._options.arg]),((E=this._options)===null||E===void 0?void 0:E.shouldForwardArgs)&&(x=[...x,...h]),this._commandService.executeCommand(this.id,...x)}};d=n([l(3,p.b),l(4,_.b)],d)},fxth:function(j,H,b){j.exports={"action-bar-container":"action-bar-container___3Et9N","edit-status":"edit-status___1BgGg","action-bar":"action-bar___Q-6Wi",iconfont:"iconfont___3Ar9E"}},fyJ8:function(j,H,b){"use strict";var I=b("rePB"),v=b("VTBJ"),T=b("Ff2n"),y=b("U8pU"),g=b("q1tI"),s=b.n(g),_=b("TSYQ"),p=b.n(_),e=b("c+Xe"),o=b("sR1s");function n(a){return a&&Object(y.a)(a)==="object"&&!Array.isArray(a)&&!g.isValidElement(a)}function l(a){return typeof a=="string"?!0:Object(e.c)(a)}function r(a,c){var d,f=a.prefixCls,h=a.className,u=a.record,E=a.index,x=a.dataIndex,O=a.render,C=a.children,w=a.component,S=w===void 0?"td":w,A=a.colSpan,D=a.rowSpan,M=a.fixLeft,N=a.fixRight,P=a.firstFixLeft,z=a.lastFixLeft,X=a.firstFixRight,k=a.lastFixRight,F=a.appendNode,U=a.additionalProps,L=U===void 0?{}:U,B=a.ellipsis,Z=a.align,re=a.rowType,he=a.isSticky,Se="".concat(f,"-cell"),ke,te;if(C)te=C;else{var Re=Object(o.b)(u,x);if(te=Re,O){var Ce=O(Re,u,E);n(Ce)?(te=Ce.children,ke=Ce.props):te=Ce}}Object(y.a)(te)==="object"&&!Array.isArray(te)&&!g.isValidElement(te)&&(te=null),B&&(z||X)&&(te=g.createElement("span",{className:"".concat(Se,"-content")},te));var pe=ke||{},me=pe.colSpan,se=pe.rowSpan,be=pe.style,ae=pe.className,fe=Object(T.a)(pe,["colSpan","rowSpan","style","className"]),Fe=me!==void 0?me:A,ie=se!==void 0?se:D;if(Fe===0||ie===0)return null;var q={},Q=typeof M=="number",Y=typeof N=="number";Q&&(q.position="sticky",q.left=M),Y&&(q.position="sticky",q.right=N);var oe={};Z&&(oe.textAlign=Z);var le,Ee=B===!0?{showTitle:!0}:B;Ee&&(Ee.showTitle||re==="header")&&(typeof te=="string"||typeof te=="number"?le=te.toString():g.isValidElement(te)&&typeof te.props.children=="string"&&(le=te.props.children));var Le=Object(v.a)(Object(v.a)(Object(v.a)({title:le},fe),L),{},{colSpan:Fe&&Fe!==1?Fe:null,rowSpan:ie&&ie!==1?ie:null,className:p()(Se,h,(d={},Object(I.a)(d,"".concat(Se,"-fix-left"),Q),Object(I.a)(d,"".concat(Se,"-fix-left-first"),P),Object(I.a)(d,"".concat(Se,"-fix-left-last"),z),Object(I.a)(d,"".concat(Se,"-fix-right"),Y),Object(I.a)(d,"".concat(Se,"-fix-right-first"),X),Object(I.a)(d,"".concat(Se,"-fix-right-last"),k),Object(I.a)(d,"".concat(Se,"-ellipsis"),B),Object(I.a)(d,"".concat(Se,"-with-append"),F),Object(I.a)(d,"".concat(Se,"-fix-sticky"),(Q||Y)&&he),d),L.className,ae),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},L.style),oe),q),be),ref:l(S)?c:null});return g.createElement(S,Object.assign({},Le),F,te)}var i=g.forwardRef(r);i.displayName="Cell";var t=g.memo(i,function(a,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,a.record):!1});H.a=t},gIYZ:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};H.default=I},gRFJ:function(j,H,b){j.exports=[b("rdUC"),b("ynwM"),b("RELg"),b("DlR+"),b("CrYA"),b("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(j){return j<10?"0"+j:j}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(j){return rx_escapable.lastIndex=0,rx_escapable.test(j)?'"'+j.replace(rx_escapable,function(H){var b=meta[H];return typeof b=="string"?b:"\\u"+("0000"+H.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+j+'"'}function str(j,H){var b,I,v,T,y=gap,g,s=H[j];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(j)),typeof rep=="function"&&(s=rep.call(H,j,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,g=[],Object.prototype.toString.apply(s)==="[object Array]"){for(T=s.length,b=0;bX.length)&&(k=X.length);for(var F=0,U=new Array(k);F=0)continue;if(!Object.prototype.propertyIsEnumerable.call(X,U))continue;F[U]=X[U]}}return F}function w(X,k){if(X==null)return{};var F={},U=Object.keys(X),L,B;for(B=0;B=0)continue;F[L]=X[L]}return F}var S=0;function A(X){return+X.replace("%","")}function D(X){return Array.isArray(X)?X:[X]}function M(X,k,F,U){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,B=arguments.length>5?arguments[5]:void 0,Z=50-U/2,re=0,he=-Z,Se=0,ke=-2*Z;switch(B){case"left":re=-Z,he=0,Se=2*Z,ke=0;break;case"right":re=Z,he=0,Se=-2*Z,ke=0;break;case"bottom":he=Z,ke=2*Z;break;default:}var te="M 50,50 m ".concat(re,",").concat(he,` a `).concat(Z,",").concat(Z," 0 1 1 ").concat(Se,",").concat(-ke,` - a `).concat(Z,",").concat(Z," 0 1 1 ").concat(-Se,",").concat(ke),Re=Math.PI*2*Z,Ce={stroke:F,strokeDasharray:"".concat(k/100*(Re-L),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(L/2+X/100*(Re-L),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:te,pathStyle:Ce}}var N=function(k){var F=k.prefixCls,U=k.strokeWidth,L=k.trailWidth,B=k.gapDegree,Z=k.gapPosition,re=k.trailColor,he=k.strokeLinecap,Se=k.style,ke=k.className,te=k.strokeColor,Re=k.percent,Ce=C(k,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),pe=Object(I.useMemo)(function(){return S+=1,S},[]),me=M(0,100,re,U,B,Z),se=me.pathString,be=me.pathStyle,ae=D(Re),fe=D(te),Fe=fe.find(function(oe){return Object.prototype.toString.call(oe)==="[object Object]"}),ie=s(ae),q=f(ie,1),Q=q[0],Y=function(){var le=0;return ae.map(function(Ee,Le){var ge=fe[Le]||fe[fe.length-1],De=Object.prototype.toString.call(ge)==="[object Object]"?"url(#".concat(F,"-gradient-").concat(pe,")"):"",_e=M(le,Ee,ge,U,B,Z);return le+=Ee,v.a.createElement("path",{key:Le,className:"".concat(F,"-circle-path"),d:_e.pathString,stroke:De,strokeLinecap:he,strokeWidth:U,opacity:Ee===0?0:1,fillOpacity:"0",style:_e.pathStyle,ref:Q[Le]})})};return v.a.createElement("svg",d({className:y()("".concat(F,"-circle"),ke),viewBox:"0 0 100 100",style:Se},Ce),Fe&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(F,"-gradient-").concat(pe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Fe).sort(function(oe,le){return A(oe)-A(le)}).map(function(oe,le){return v.a.createElement("stop",{key:le,offset:oe,stopColor:Fe[oe]})}))),v.a.createElement("path",{className:"".concat(F,"-circle-trail"),d:se,stroke:re,strokeLinecap:he,strokeWidth:L||U,fillOpacity:"0",style:be}),Y().reverse())};N.defaultProps=g;var P=N,z={Line:c,Circle:P}},hW8S:function(j,H,b){"use strict";b.d(H,"a",function(){return y}),b.d(H,"c",function(){return g}),b.d(H,"b",function(){return s});var I=b("VTBJ"),v=b("Ff2n"),T=b("Kwbf"),y="RC_TABLE_INTERNAL_COL_DEFINE";function g(_){var p=_.expandable,e=Object(v.a)(_,["expandable"]);return"expandable"in _?Object(I.a)(Object(I.a)({},e),p):e}function s(_){return Object.keys(_).reduce(function(p,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(p[e]=_[e]),p},{})}},hXwI:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_>>3]&1<>>10,this.keys[B]|=(re&4032)>>>6,++B,this.keys[B]=(Z&258048)<<12,this.keys[B]|=(Z&63)<<16,this.keys[B]|=(re&258048)>>>4,this.keys[B]|=re&63,++B}}return T(E,[{key:"enc8",value:function(O){var C=O.slice(),w=0,S,A,D;S=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],A=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],D=(S>>>4^A)&252645135,A^=D,S^=D<<4,D=(S>>>16^A)&65535,A^=D,S^=D<<16,D=(A>>>2^S)&858993459,S^=D,A^=D<<2,D=(A>>>8^S)&16711935,S^=D,A^=D<<8,A=A<<1|A>>>31&1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<1|S>>>31&1;for(var M=0,N=0;M<8;++M){D=A<<28|A>>>4,D^=this.keys[N++];var P=f[D&63];P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=A^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],S^=P,D=S<<28|S>>>4,D^=this.keys[N++],P=f[D&63],P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=S^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],A^=P}for(A=A<<31|A>>>1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<31|S>>>1,D=(S>>>8^A)&16711935,A^=D,S^=D<<8,D=(S>>>2^A)&858993459,A^=D,S^=D<<2,D=(A>>>16^S)&65535,S^=D,A^=D<<16,D=(A>>>4^S)&252645135,S^=D,A^=D<<4,D=[A,S],w=0;w<8;w++)C[w]=(D[w>>>2]>>>8*(3-w%4))%256,C[w]<0&&(C[w]+=256);return C}},{key:"encrypt",value:function(O){return this.enc8(O.slice(0,8)).concat(this.enc8(O.slice(8,16)))}}]),E}();H.default=u},ic2d:function(j,H,b){"use strict";b.d(H,"a",function(){return y});var I=b("FWmy"),v=b("746U");class T{constructor(){this.data=new Map}add(g,s){I.a(v.l(g)),I.a(v.k(s)),I.a(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,s)}as(g){return this.data.get(g)||null}}const y=new T},jO9C:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso97971={pad:function(v,T){v.concat(I.lib.WordArray.create([2147483648],1)),I.pad.ZeroPadding.pad(v,T)},unpad:function(v){I.pad.ZeroPadding.unpad(v),v.sigBytes--}},I.pad.Iso97971})},je13:function(j,H,b){var I=b("5nXd"),v=b("gRFJ"),T=[b("uQRt")];j.exports=I.createStore(v,T)},ji0R:function(j,H,b){j.exports=b.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(j,H,b){"use strict";b.d(H,"a",function(){return Co});var I=b("rePB"),v=b("ODXe"),T=b("Ff2n"),y=b("VTBJ"),g=b("q1tI"),s=b("TSYQ"),_=b.n(s),p=b("Zm9Q"),e=b("6cGi"),o=b("KQm4"),n=b("xEkU"),l=b.n(n),r=b("t23M");function i(ot){var xt=Object(g.useRef)(),Rt=Object(g.useRef)(!1);function ut(){for(var Ue=arguments.length,et=new Array(Ue),We=0;WePt&&(fn=Pt-hn),Object(g.useMemo)(function(){if(!et.length)return[0,0];for(var On=et.length,yr=On,Vr=0;VrTt+fn){yr=Vr-1;break}}for(var Wr=0,Yr=On-1;Yr>=0;Yr-=1){var Xr=ot.get(et[Yr].key)||u;if(Xr[Ot]1&&arguments[1]!==void 0?arguments[1]:!1,ut=xt&&typeof xt.getBoundingClientRect=="function"&&xt.getBoundingClientRect().width;if(ut){if(Rt){var Ue=getComputedStyle(xt),et=Ue.marginLeft,We=Ue.marginRight;ut+=+et.replace("px","")+ +We.replace("px","")}ut=+ut.toFixed(6)}return ut||0},le=function(xt,Rt,ut){xt&&Object(X.a)(xt.style)==="object"&&(xt.style[Rt]=ut)},Ee=function(){return ae.any},Le=b("bdgK"),ge=b("i8i4"),De=b.n(ge),_e=b("wgJM"),Xe=b("l4aY"),tt=b("m+aA"),Ge=b("c+Xe"),Me=b("zT1h"),bt=b("QC+M");function Oe(ot,xt,Rt){return Rt?ot[0]===xt[0]:ot[0]===xt[0]&&ot[1]===xt[1]}function Ve(ot,xt,Rt){var ut=ot[xt]||{};return Object(y.a)(Object(y.a)({},ut),Rt)}function Je(ot,xt,Rt,ut){for(var Ue=Rt.points,et=Object.keys(ot),We=0;We1&&arguments[1]!==void 0?arguments[1]:2;xt();var et=Object(_e.a)(function(){Ue<=1?ut({isCanceled:function(){return et!==ot.current}}):Rt(ut,Ue-1)});ot.current=et}return g.useEffect(function(){return function(){xt()}},[]),[Rt,xt]},Kt=[ht,Bt,Ht,mt],rn=!1,Gt=!0;function $t(ot){return ot===Ht||ot===mt}var Ln=function(ot,xt){var Rt=g.useState(Et),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=kt(),ct=Object(v.a)(We,2),ft=ct[0],Ot=ct[1];function Tt(){et(ht)}return Ut(function(){if(Ue!==Et&&Ue!==mt){var Pt=Kt.indexOf(Ue),Zt=Kt[Pt+1],hn=xt(Ue);hn===rn?et(Zt):ft(function(fn){function On(){if(fn.isCanceled())return;et(Zt)}hn===!0?On():Promise.resolve(hn).then(On)})}},[ot,Ue]),g.useEffect(function(){return function(){Ot()}},[]),[Tt,Ue]},pn=function(ot){var xt=Object(g.useRef)(),Rt=Object(g.useRef)(ot);Rt.current=ot;var ut=g.useCallback(function(We){Rt.current(We)},[]);function Ue(We){We&&(We.removeEventListener(it,ut),We.removeEventListener($e,ut))}function et(We){xt.current&&xt.current!==We&&Ue(xt.current),We&&We!==xt.current&&(We.addEventListener(it,ut),We.addEventListener($e,ut),xt.current=We)}return g.useEffect(function(){return function(){Ue(xt.current)}},[]),[et,Ue]};function Dn(ot,xt,Rt,ut){var Ue=ut.motionEnter,et=Ue===void 0?!0:Ue,We=ut.motionAppear,ct=We===void 0?!0:We,ft=ut.motionLeave,Ot=ft===void 0?!0:ft,Tt=ut.motionDeadline,Pt=ut.motionLeaveImmediately,Zt=ut.onAppearPrepare,hn=ut.onEnterPrepare,fn=ut.onLeavePrepare,On=ut.onAppearStart,yr=ut.onEnterStart,Vr=ut.onLeaveStart,Mr=ut.onAppearActive,Wr=ut.onEnterActive,Yr=ut.onLeaveActive,Xr=ut.onAppearEnd,zr=ut.onEnterEnd,si=ut.onLeaveEnd,Jr=ut.onVisibleChanged,Zi=Xt(),Zr=Object(v.a)(Zi,2),hr=Zr[0],ur=Zr[1],ni=Xt(pt),pi=Object(v.a)(ni,2),tr=pi[0],vi=pi[1],ea=Xt(null),xi=Object(v.a)(ea,2),Si=xi[0],Ii=xi[1],ha=Object(g.useRef)(!1),Ta=Object(g.useRef)(null),aa=Object(g.useRef)(!1),$a=Object(g.useRef)(null);function To(){var Ni=Rt();return Ni||$a.current}var vo=Object(g.useRef)(!1);function Aa(Ni){var Oi=To();if(Ni&&!Ni.deadline&&Ni.target!==Oi)return;var Oa;tr===st&&vo.current?Oa=Xr==null?void 0:Xr(Oi,Ni):tr===Pe&&vo.current?Oa=zr==null?void 0:zr(Oi,Ni):tr===ze&&vo.current&&(Oa=si==null?void 0:si(Oi,Ni)),Oa!==!1&&!aa.current&&(vi(pt),Ii(null))}var Gi=pn(Aa),ji=Object(v.a)(Gi,1),oa=ji[0],ta=g.useMemo(function(){var Ni,Oi,Oa;switch(tr){case"appear":return Ni={},Object(I.a)(Ni,ht,Zt),Object(I.a)(Ni,Bt,On),Object(I.a)(Ni,Ht,Mr),Ni;case"enter":return Oi={},Object(I.a)(Oi,ht,hn),Object(I.a)(Oi,Bt,yr),Object(I.a)(Oi,Ht,Wr),Oi;case"leave":return Oa={},Object(I.a)(Oa,ht,fn),Object(I.a)(Oa,Bt,Vr),Object(I.a)(Oa,Ht,Yr),Oa;default:return{}}},[tr]),Ao=Ln(tr,function(Ni){if(Ni===ht){var Oi=ta[ht];return Oi?Oi(To()):rn}if(ki in ta){var Oa;Ii(((Oa=ta[ki])===null||Oa===void 0?void 0:Oa.call(ta,To(),null))||null)}return ki===Ht&&(oa(To()),Tt>0&&(clearTimeout(Ta.current),Ta.current=setTimeout(function(){Aa({deadline:!0})},Tt))),Gt}),Vo=Object(v.a)(Ao,2),Yo=Vo[0],ki=Vo[1],Xo=$t(ki);vo.current=Xo,Ut(function(){ur(xt);var Ni=ha.current;if(ha.current=!0,!ot)return;var Oi;!Ni&&xt&&ct&&(Oi=st),Ni&&xt&&et&&(Oi=Pe),(Ni&&!xt&&Ot||!Ni&&Pt&&!xt&&Ot)&&(Oi=ze),Oi&&(vi(Oi),Yo())},[xt]),Object(g.useEffect)(function(){(tr===st&&!ct||tr===Pe&&!et||tr===ze&&!Ot)&&vi(pt)},[ct,et,Ot]),Object(g.useEffect)(function(){return function(){clearTimeout(Ta.current),aa.current=!0}},[]),Object(g.useEffect)(function(){hr!==void 0&&tr===pt&&(Jr==null||Jr(hr))},[hr,tr]);var Qo=Si;return ta[ht]&&ki===Bt&&(Qo=Object(y.a)({transition:"none"},Qo)),[tr,ki,Qo,hr!=null?hr:xt]}var sn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){return Object(O.a)(this,Rt),xt.apply(this,arguments)}return Object(C.a)(Rt,[{key:"render",value:function(){return this.props.children}}]),Rt}(g.Component),Sn=sn;function Kn(ot){var xt=ot;Object(X.a)(ot)==="object"&&(xt=ot.transitionSupport);function Rt(Ue){return!!(Ue.motionName&&xt)}var ut=g.forwardRef(function(Ue,et){var We=Ue.visible,ct=We===void 0?!0:We,ft=Ue.removeOnLeave,Ot=ft===void 0?!0:ft,Tt=Ue.forceRender,Pt=Ue.children,Zt=Ue.motionName,hn=Ue.leavedClassName,fn=Ue.eventProps,On=Rt(Ue),yr=Object(g.useRef)(),Vr=Object(g.useRef)();function Mr(){try{return Object(tt.a)(yr.current||Vr.current)}catch(vi){return null}}var Wr=Dn(On,ct,Mr,Ue),Yr=Object(v.a)(Wr,4),Xr=Yr[0],zr=Yr[1],si=Yr[2],Jr=Yr[3],Zi=g.useRef(Jr);Jr&&(Zi.current=!0);var Zr=Object(g.useRef)(et);Zr.current=et;var hr=g.useCallback(function(vi){yr.current=vi,Object(Ge.b)(Zr.current,vi)},[]),ur,ni=Object(y.a)(Object(y.a)({},fn),{},{visible:ct});if(!Pt)ur=null;else if(Xr===pt||!Rt(Ue))Jr?ur=Pt(Object(y.a)({},ni),hr):!Ot&&Zi.current?ur=Pt(Object(y.a)(Object(y.a)({},ni),{},{className:hn}),hr):Tt?ur=Pt(Object(y.a)(Object(y.a)({},ni),{},{style:{display:"none"}}),hr):ur=null;else{var pi,tr;zr===ht?tr="prepare":$t(zr)?tr="active":zr===Bt&&(tr="start"),ur=Pt(Object(y.a)(Object(y.a)({},ni),{},{className:_()(wt(Zt,Xr),(pi={},Object(I.a)(pi,wt(Zt,"".concat(Xr,"-").concat(tr)),tr),Object(I.a)(pi,Zt,typeof Zt=="string"),pi)),style:si}),hr)}return g.createElement(Sn,{ref:Vr},ur)});return ut.displayName="CSSMotion",ut}var Qn=Kn(Be),Vt="add",wn="keep",$n="remove",ir="removed";function Tr(ot){var xt;return ot&&Object(X.a)(ot)==="object"&&"key"in ot?xt=ot:xt={key:ot},Object(y.a)(Object(y.a)({},xt),{},{key:String(xt.key)})}function qn(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ot.map(Tr)}function ce(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Rt=[],ut=0,Ue=xt.length,et=qn(ot),We=qn(xt);et.forEach(function(Ot){for(var Tt=!1,Pt=ut;Pt1});return ft.forEach(function(Ot){Rt=Rt.filter(function(Tt){var Pt=Tt.key,Zt=Tt.status;return Pt!==Ot||Zt!==$n}),Rt.forEach(function(Tt){Tt.key===Ot&&(Tt.status=wn)})}),Rt}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function J(ot){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn,Rt=function(ut){Object(S.a)(et,ut);var Ue=Object(A.a)(et);function et(){var We;return Object(O.a)(this,et),We=Ue.apply(this,arguments),We.state={keyEntities:[]},We.removeKey=function(ct){We.setState(function(ft){var Ot=ft.keyEntities;return{keyEntities:Ot.map(function(Tt){return Tt.key!==ct?Tt:Object(y.a)(Object(y.a)({},Tt),{},{status:ir})})}})},We}return Object(C.a)(et,[{key:"render",value:function(){var ct=this,ft=this.state.keyEntities,Ot=this.props,Tt=Ot.component,Pt=Ot.children,Zt=Ot.onVisibleChanged,hn=Object(T.a)(Ot,["component","children","onVisibleChanged"]),fn=Tt||g.Fragment,On={};return V.forEach(function(yr){On[yr]=hn[yr],delete hn[yr]}),delete hn.keys,g.createElement(fn,hn,ft.map(function(yr){var Vr=yr.status,Mr=Object(T.a)(yr,["status"]),Wr=Vr===Vt||Vr===wn;return g.createElement(xt,Object(x.a)({},On,{key:Mr.key,visible:Wr,eventProps:Mr,onVisibleChanged:function(Xr){Zt==null||Zt(Xr,{key:Mr.key}),Xr||ct.removeKey(Mr.key)}}),Pt)}))}}],[{key:"getDerivedStateFromProps",value:function(ct,ft){var Ot=ct.keys,Tt=ft.keyEntities,Pt=qn(Ot),Zt=ce(Tt,Pt);return{keyEntities:Zt.filter(function(hn){var fn=Tt.find(function(On){var yr=On.key;return hn.key===yr});return!(fn&&fn.status===ir&&hn.status===$n)})}}}]),et}(g.Component);return Rt.defaultProps={component:"div"},Rt}var ee=J(Be),Te=Qn;function ue(ot){var xt=ot.prefixCls,Rt=ot.motion,ut=ot.animation,Ue=ot.transitionName;return Rt||(ut?{motionName:"".concat(xt,"-").concat(ut)}:Ue?{motionName:Ue}:null)}function nt(ot){var xt=ot.prefixCls,Rt=ot.visible,ut=ot.zIndex,Ue=ot.mask,et=ot.maskMotion,We=ot.maskAnimation,ct=ot.maskTransitionName;if(!Ue)return null;var ft={};return(et||ct||We)&&(ft=Object(y.a)({motionAppear:!0},ue({motion:et,prefixCls:xt,transitionName:ct,animation:We}))),g.createElement(Te,Object(x.a)({},ft,{visible:Rt,removeOnLeave:!0}),function(Ot){var Tt=Ot.className;return g.createElement("div",{style:{zIndex:ut},className:_()("".concat(xt,"-mask"),Tt)})})}var Lt=b("9mu1"),Yt=b("o0o1"),on=b.n(Yt),Qt=b("HaE+"),In=["measure","align",null,"motion"],Gn=function(ot,xt){var Rt=Object(g.useState)(null),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=Object(g.useRef)(),ct=Object(g.useRef)(!1);function ft(Pt){ct.current||et(Pt)}function Ot(){_e.a.cancel(We.current)}function Tt(Pt){Ot(),We.current=Object(_e.a)(function(){ft(function(Zt){switch(Ue){case"align":return"motion";case"motion":return"stable";default:}return Zt}),Pt==null||Pt()})}return Object(g.useEffect)(function(){ft("measure")},[ot]),Object(g.useEffect)(function(){switch(Ue){case"measure":xt();break;default:}Ue&&(We.current=Object(_e.a)(Object(Qt.a)(on.a.mark(function Pt(){var Zt,hn;return on.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:Zt=In.indexOf(Ue),hn=In[Zt+1],hn&&Zt!==-1&&ft(hn);case 3:case"end":return On.stop()}},Pt)}))))},[Ue]),Object(g.useEffect)(function(){return function(){ct.current=!0,Ot()}},[]),[Ue,Tt]},lr=function(ot){var xt=g.useState({width:0,height:0}),Rt=Object(v.a)(xt,2),ut=Rt[0],Ue=Rt[1];function et(ct){Ue({width:ct.offsetWidth,height:ct.offsetHeight})}var We=g.useMemo(function(){var ct={};if(ot){var ft=ut.width,Ot=ut.height;ot.indexOf("height")!==-1&&Ot?ct.height=Ot:ot.indexOf("minHeight")!==-1&&Ot&&(ct.minHeight=Ot),ot.indexOf("width")!==-1&&ft?ct.width=ft:ot.indexOf("minWidth")!==-1&&ft&&(ct.minWidth=ft)}return ct},[ot,ut]);return[We,et]},Ar=g.forwardRef(function(ot,xt){var Rt=ot.visible,ut=ot.prefixCls,Ue=ot.className,et=ot.style,We=ot.children,ct=ot.zIndex,ft=ot.stretch,Ot=ot.destroyPopupOnHide,Tt=ot.forceRender,Pt=ot.align,Zt=ot.point,hn=ot.getRootDomNode,fn=ot.getClassNameFromAlign,On=ot.onAlign,yr=ot.onMouseEnter,Vr=ot.onMouseLeave,Mr=ot.onMouseDown,Wr=ot.onTouchStart,Yr=Object(g.useRef)(),Xr=Object(g.useRef)(),zr=Object(g.useState)(),si=Object(v.a)(zr,2),Jr=si[0],Zi=si[1],Zr=lr(ft),hr=Object(v.a)(Zr,2),ur=hr[0],ni=hr[1];function pi(){ft&&ni(hn())}var tr=Gn(Rt,pi),vi=Object(v.a)(tr,2),ea=vi[0],xi=vi[1],Si=Object(g.useRef)();function Ii(){return Zt||hn}function ha(){var Gi;(Gi=Yr.current)===null||Gi===void 0||Gi.forceAlign()}function Ta(Gi,ji){var oa=fn(ji);Jr!==oa&&Zi(oa),ea==="align"&&(Jr!==oa?Promise.resolve().then(function(){ha()}):xi(function(){var ta;(ta=Si.current)===null||ta===void 0||ta.call(Si)}),On==null||On(Gi,ji))}var aa=Object(y.a)({},ue(ot));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Gi){var ji=aa[Gi];aa[Gi]=function(oa,ta){return xi(),ji==null?void 0:ji(oa,ta)}});function $a(){return new Promise(function(Gi){Si.current=Gi})}g.useEffect(function(){!aa.motionName&&ea==="motion"&&xi()},[aa.motionName,ea]),g.useImperativeHandle(xt,function(){return{forceAlign:ha,getElement:function(){return Xr.current}}});var To=Object(y.a)(Object(y.a)({},ur),{},{zIndex:ct,opacity:ea==="motion"||ea==="stable"||!Rt?void 0:0,pointerEvents:ea==="stable"?void 0:"none"},et),vo=!0;(Pt==null?void 0:Pt.points)&&(ea==="align"||ea==="stable")&&(vo=!1);var Aa=We;return g.Children.count(We)>1&&(Aa=g.createElement("div",{className:"".concat(ut,"-content")},We)),g.createElement(Te,Object(x.a)({visible:Rt,ref:Xr,leavedClassName:"".concat(ut,"-hidden")},aa,{onAppearPrepare:$a,onEnterPrepare:$a,removeOnLeave:Ot,forceRender:Tt}),function(Gi,ji){var oa=Gi.className,ta=Gi.style,Ao=_()(ut,Ue,Jr,oa);return g.createElement(Lt.a,{target:Ii(),key:"popup",ref:Yr,monitorWindowResize:!0,disabled:vo,align:Pt,onAlign:Ta},g.createElement("div",{ref:ji,className:Ao,onMouseEnter:yr,onMouseLeave:Vr,onMouseDownCapture:Mr,onTouchStartCapture:Wr,style:Object(y.a)(Object(y.a)({},ta),To)},Aa))})});Ar.displayName="PopupInner";var vr=Ar,ar=g.forwardRef(function(ot,xt){var Rt=ot.prefixCls,ut=ot.visible,Ue=ot.zIndex,et=ot.children,We=ot.mobile;We=We===void 0?{}:We;var ct=We.popupClassName,ft=We.popupStyle,Ot=We.popupMotion,Tt=Ot===void 0?{}:Ot,Pt=We.popupRender,Zt=g.useRef();g.useImperativeHandle(xt,function(){return{forceAlign:function(){},getElement:function(){return Zt.current}}});var hn=Object(y.a)({zIndex:Ue},ft),fn=et;return g.Children.count(et)>1&&(fn=g.createElement("div",{className:"".concat(Rt,"-content")},et)),Pt&&(fn=Pt(fn)),g.createElement(Te,Object(x.a)({visible:ut,ref:Zt,removeOnLeave:!0},Tt),function(On,yr){var Vr=On.className,Mr=On.style,Wr=_()(Rt,ct,Vr);return g.createElement("div",{ref:yr,className:Wr,style:Object(y.a)(Object(y.a)({},Mr),hn)},fn)})});ar.displayName="MobilePopupInner";var xr=ar,qi=["visible","mobile"],Gr=g.forwardRef(function(ot,xt){var Rt=ot.visible,ut=ot.mobile,Ue=Object(T.a)(ot,qi),et=Object(g.useState)(Rt),We=Object(v.a)(et,2),ct=We[0],ft=We[1],Ot=Object(g.useState)(!1),Tt=Object(v.a)(Ot,2),Pt=Tt[0],Zt=Tt[1],hn=Object(y.a)(Object(y.a)({},Ue),{},{visible:ct});Object(g.useEffect)(function(){ft(Rt),Rt&&ut&&Zt(Ye())},[Rt,ut]);var fn=Pt?g.createElement(xr,Object(x.a)({},hn,{mobile:ut,ref:xt})):g.createElement(vr,Object(x.a)({},hn,{ref:xt}));return g.createElement("div",null,g.createElement(nt,hn),fn)});Gr.displayName="Popup";var ai=Gr,da=g.createContext(null),Fi=da;function ia(){}function Ca(){return""}function po(ot){return ot?ot.ownerDocument:window.document}var so=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function xo(ot){var xt=function(Rt){Object(S.a)(Ue,Rt);var ut=Object(A.a)(Ue);function Ue(et){var We;Object(O.a)(this,Ue),We=ut.call(this,et),We.popupRef=g.createRef(),We.triggerRef=g.createRef(),We.attachId=void 0,We.clickOutsideHandler=void 0,We.touchOutsideHandler=void 0,We.contextMenuOutsideHandler1=void 0,We.contextMenuOutsideHandler2=void 0,We.mouseDownTimeout=void 0,We.focusTime=void 0,We.preClickTime=void 0,We.preTouchTime=void 0,We.delayTimer=void 0,We.hasPopupMouseDown=void 0,We.onMouseEnter=function(ft){var Ot=We.props.mouseEnterDelay;We.fireEvents("onMouseEnter",ft),We.delaySetPopupVisible(!0,Ot,Ot?null:ft)},We.onMouseMove=function(ft){We.fireEvents("onMouseMove",ft),We.setPoint(ft)},We.onMouseLeave=function(ft){We.fireEvents("onMouseLeave",ft),We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onPopupMouseEnter=function(){We.clearDelayTimer()},We.onPopupMouseLeave=function(ft){var Ot;if(ft.relatedTarget&&!ft.relatedTarget.setTimeout&&Object(Xe.a)((Ot=We.popupRef.current)===null||Ot===void 0?void 0:Ot.getElement(),ft.relatedTarget))return;We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onFocus=function(ft){We.fireEvents("onFocus",ft),We.clearDelayTimer(),We.isFocusToShow()&&(We.focusTime=Date.now(),We.delaySetPopupVisible(!0,We.props.focusDelay))},We.onMouseDown=function(ft){We.fireEvents("onMouseDown",ft),We.preClickTime=Date.now()},We.onTouchStart=function(ft){We.fireEvents("onTouchStart",ft),We.preTouchTime=Date.now()},We.onBlur=function(ft){We.fireEvents("onBlur",ft),We.clearDelayTimer(),We.isBlurToHide()&&We.delaySetPopupVisible(!1,We.props.blurDelay)},We.onContextMenu=function(ft){ft.preventDefault(),We.fireEvents("onContextMenu",ft),We.setPopupVisible(!0,ft)},We.onContextMenuClose=function(){We.isContextMenuToShow()&&We.close()},We.onClick=function(ft){if(We.fireEvents("onClick",ft),We.focusTime){var Ot;if(We.preClickTime&&We.preTouchTime?Ot=Math.min(We.preClickTime,We.preTouchTime):We.preClickTime?Ot=We.preClickTime:We.preTouchTime&&(Ot=We.preTouchTime),Math.abs(Ot-We.focusTime)<20)return;We.focusTime=0}We.preClickTime=0,We.preTouchTime=0,We.isClickToShow()&&(We.isClickToHide()||We.isBlurToHide())&&ft&&ft.preventDefault&&ft.preventDefault();var Tt=!We.state.popupVisible;(We.isClickToHide()&&!Tt||Tt&&We.isClickToShow())&&We.setPopupVisible(!We.state.popupVisible,ft)},We.onPopupMouseDown=function(){if(We.hasPopupMouseDown=!0,clearTimeout(We.mouseDownTimeout),We.mouseDownTimeout=window.setTimeout(function(){We.hasPopupMouseDown=!1},0),We.context){var ft;(ft=We.context).onPopupMouseDown.apply(ft,arguments)}},We.onDocumentClick=function(ft){if(We.props.mask&&!We.props.maskClosable)return;var Ot=ft.target,Tt=We.getRootDomNode(),Pt=We.getPopupDomNode();(!Object(Xe.a)(Tt,Ot)||We.isContextMenuOnly())&&!Object(Xe.a)(Pt,Ot)&&!We.hasPopupMouseDown&&We.close()},We.getRootDomNode=function(){var ft=We.props.getTriggerDOMNode;if(ft)return ft(We.triggerRef.current);try{var Ot=Object(tt.a)(We.triggerRef.current);if(Ot)return Ot}catch(Tt){}return De.a.findDOMNode(Object(w.a)(We))},We.getPopupClassNameFromAlign=function(ft){var Ot=[],Tt=We.props,Pt=Tt.popupPlacement,Zt=Tt.builtinPlacements,hn=Tt.prefixCls,fn=Tt.alignPoint,On=Tt.getPopupClassNameFromAlign;return Pt&&Zt&&Ot.push(Je(Zt,hn,ft,fn)),On&&Ot.push(On(ft)),Ot.join(" ")},We.getComponent=function(){var ft=We.props,Ot=ft.prefixCls,Tt=ft.destroyPopupOnHide,Pt=ft.popupClassName,Zt=ft.onPopupAlign,hn=ft.popupMotion,fn=ft.popupAnimation,On=ft.popupTransitionName,yr=ft.popupStyle,Vr=ft.mask,Mr=ft.maskAnimation,Wr=ft.maskTransitionName,Yr=ft.maskMotion,Xr=ft.zIndex,zr=ft.popup,si=ft.stretch,Jr=ft.alignPoint,Zi=ft.mobile,Zr=ft.forceRender,hr=We.state,ur=hr.popupVisible,ni=hr.point,pi=We.getPopupAlign(),tr={};return We.isMouseEnterToShow()&&(tr.onMouseEnter=We.onPopupMouseEnter),We.isMouseLeaveToHide()&&(tr.onMouseLeave=We.onPopupMouseLeave),tr.onMouseDown=We.onPopupMouseDown,tr.onTouchStart=We.onPopupMouseDown,g.createElement(ai,Object(x.a)({prefixCls:Ot,destroyPopupOnHide:Tt,visible:ur,point:Jr&&ni,className:Pt,align:pi,onAlign:Zt,animation:fn,getClassNameFromAlign:We.getPopupClassNameFromAlign},tr,{stretch:si,getRootDomNode:We.getRootDomNode,style:yr,mask:Vr,zIndex:Xr,transitionName:On,maskAnimation:Mr,maskTransitionName:Wr,maskMotion:Yr,ref:We.popupRef,motion:hn,mobile:Zi,forceRender:Zr}),typeof zr=="function"?zr():zr)},We.attachParent=function(ft){_e.a.cancel(We.attachId);var Ot=We.props,Tt=Ot.getPopupContainer,Pt=Ot.getDocument,Zt=We.getRootDomNode(),hn;Tt?(Zt||Tt.length===0)&&(hn=Tt(Zt)):hn=Pt(We.getRootDomNode()).body,hn?hn.appendChild(ft):We.attachId=Object(_e.a)(function(){We.attachParent(ft)})},We.getContainer=function(){var ft=We.props.getDocument,Ot=ft(We.getRootDomNode()).createElement("div");return Ot.style.position="absolute",Ot.style.top="0",Ot.style.left="0",Ot.style.width="100%",We.attachParent(Ot),Ot},We.setPoint=function(ft){var Ot=We.props.alignPoint;if(!Ot||!ft)return;We.setState({point:{pageX:ft.pageX,pageY:ft.pageY}})},We.handlePortalUpdate=function(){We.state.prevPopupVisible!==We.state.popupVisible&&We.props.afterPopupVisibleChange(We.state.popupVisible)},We.triggerContextValue={onPopupMouseDown:We.onPopupMouseDown};var ct;return"popupVisible"in et?ct=!!et.popupVisible:ct=!!et.defaultPopupVisible,We.state={prevPopupVisible:ct,popupVisible:ct},so.forEach(function(ft){We["fire".concat(ft)]=function(Ot){We.fireEvents(ft,Ot)}}),We}return Object(C.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var We=this.props,ct=this.state;if(ct.popupVisible){var ft;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ft=We.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Me.a)(ft,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ft=ft||We.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Me.a)(ft,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ft=ft||We.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Me.a)(ft,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Me.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),_e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var We;return((We=this.popupRef.current)===null||We===void 0?void 0:We.getElement())||null}},{key:"getPopupAlign",value:function(){var We=this.props,ct=We.popupPlacement,ft=We.popupAlign,Ot=We.builtinPlacements;return ct&&Ot?Ve(Ot,ct,ft):ft}},{key:"setPopupVisible",value:function(We,ct){var ft=this.props.alignPoint,Ot=this.state.popupVisible;this.clearDelayTimer(),Ot!==We&&("popupVisible"in this.props||this.setState({popupVisible:We,prevPopupVisible:Ot}),this.props.onPopupVisibleChange(We)),ft&&ct&&We&&this.setPoint(ct)}},{key:"delaySetPopupVisible",value:function(We,ct,ft){var Ot=this,Tt=ct*1e3;if(this.clearDelayTimer(),Tt){var Pt=ft?{pageX:ft.pageX,pageY:ft.pageY}:null;this.delayTimer=window.setTimeout(function(){Ot.setPopupVisible(We,Pt),Ot.clearDelayTimer()},Tt)}else this.setPopupVisible(We,ft)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(We){var ct=this.props.children.props,ft=this.props;return ct[We]&&ft[We]?this["fire".concat(We)]:ct[We]||ft[We]}},{key:"isClickToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("click")!==-1||ft.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var We=this.props.action;return We==="contextMenu"||We.length===1&&We[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("contextMenu")!==-1||ft.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("click")!==-1||ft.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("hover")!==-1||ft.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("hover")!==-1||ft.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("focus")!==-1||ft.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("focus")!==-1||ft.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var We;(We=this.popupRef.current)===null||We===void 0||We.forceAlign()}}},{key:"fireEvents",value:function(We,ct){var ft=this.props.children.props[We];ft&&ft(ct);var Ot=this.props[We];Ot&&Ot(ct)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var We=this.state.popupVisible,ct=this.props,ft=ct.children,Ot=ct.forceRender,Tt=ct.alignPoint,Pt=ct.className,Zt=ct.autoDestroy,hn=g.Children.only(ft),fn={key:"trigger"};this.isContextMenuToShow()?fn.onContextMenu=this.onContextMenu:fn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(fn.onClick=this.onClick,fn.onMouseDown=this.onMouseDown,fn.onTouchStart=this.onTouchStart):(fn.onClick=this.createTwoChains("onClick"),fn.onMouseDown=this.createTwoChains("onMouseDown"),fn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(fn.onMouseEnter=this.onMouseEnter,Tt&&(fn.onMouseMove=this.onMouseMove)):fn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?fn.onMouseLeave=this.onMouseLeave:fn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(fn.onFocus=this.onFocus,fn.onBlur=this.onBlur):(fn.onFocus=this.createTwoChains("onFocus"),fn.onBlur=this.createTwoChains("onBlur"));var On=_()(hn&&hn.props&&hn.props.className,Pt);On&&(fn.className=On);var yr=Object(y.a)({},fn);Object(Ge.c)(hn)&&(yr.ref=Object(Ge.a)(this.triggerRef,hn.ref));var Vr=g.cloneElement(hn,yr),Mr;return(We||this.popupRef.current||Ot)&&(Mr=g.createElement(ot,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!We&&Zt&&(Mr=null),g.createElement(Fi.Provider,{value:this.triggerContextValue},Vr,Mr)}}],[{key:"getDerivedStateFromProps",value:function(We,ct){var ft=We.popupVisible,Ot={};return ft!==void 0&&ct.popupVisible!==ft&&(Ot.popupVisible=ft,Ot.prevPopupVisible=ct.popupVisible),Ot}}]),Ue}(g.Component);return xt.contextType=Fi,xt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ca,getDocument:po,onPopupVisibleChange:ia,afterPopupVisibleChange:ia,onPopupAlign:ia,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},xt}var ka=xo(bt.a),Yi={adjustX:1,adjustY:1},Nr={topLeft:{points:["bl","tl"],overflow:Yi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Yi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Yi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Yi,offset:[4,0]}},Qr={topLeft:{points:["bl","tl"],overflow:Yi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Yi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Yi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Yi,offset:[4,0]}},yi=Nr,Fr=0,wr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ei=function(xt,Rt,ut){var Ue=ie(Rt),et=xt.getState();xt.setState({defaultActiveFirst:Object(y.a)(Object(y.a)({},et.defaultActiveFirst),{},Object(I.a)({},Ue,ut))})},_r=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=xt.call(this,ut),Ue.onDestroy=function(Tt){Ue.props.onDestroy(Tt)},Ue.onKeyDown=function(Tt){var Pt=Tt.keyCode,Zt=Ue.menuInstance,hn=Ue.props.store,fn=Ue.getVisible();if(Pt===a.a.ENTER)return Ue.onTitleClick(Tt),ei(hn,Ue.props.eventKey,!0),!0;if(Pt===a.a.RIGHT)return fn?Zt.onKeyDown(Tt):(Ue.triggerOpenChange(!0),ei(hn,Ue.props.eventKey,!0)),!0;if(Pt===a.a.LEFT){var On;if(fn)On=Zt.onKeyDown(Tt);else return;return On||(Ue.triggerOpenChange(!1),On=!0),On}return fn&&(Pt===a.a.UP||Pt===a.a.DOWN)?Zt.onKeyDown(Tt):void 0},Ue.onOpenChange=function(Tt){Ue.props.onOpenChange(Tt)},Ue.onPopupVisibleChange=function(Tt){Ue.triggerOpenChange(Tt,Tt?"mouseenter":"mouseleave")},Ue.onMouseEnter=function(Tt){var Pt=Ue.props,Zt=Pt.eventKey,hn=Pt.onMouseEnter,fn=Pt.store;ei(fn,Ue.props.eventKey,!1),hn({key:Zt,domEvent:Tt})},Ue.onMouseLeave=function(Tt){var Pt=Ue.props,Zt=Pt.parentMenu,hn=Pt.eventKey,fn=Pt.onMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),fn({key:hn,domEvent:Tt})},Ue.onTitleMouseEnter=function(Tt){var Pt=Ue.props,Zt=Pt.eventKey,hn=Pt.onItemHover,fn=Pt.onTitleMouseEnter;hn({key:Zt,hover:!0}),fn({key:Zt,domEvent:Tt})},Ue.onTitleMouseLeave=function(Tt){var Pt=Ue.props,Zt=Pt.parentMenu,hn=Pt.eventKey,fn=Pt.onItemHover,On=Pt.onTitleMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),fn({key:hn,hover:!1}),On({key:hn,domEvent:Tt})},Ue.onTitleClick=function(Tt){var Pt=Object(w.a)(Ue),Zt=Pt.props;if(Zt.onTitleClick({key:Zt.eventKey,domEvent:Tt}),Zt.triggerSubMenuAction==="hover")return;Ue.triggerOpenChange(!Ue.getVisible(),"click"),ei(Zt.store,Ue.props.eventKey,!1)},Ue.onSubMenuClick=function(Tt){typeof Ue.props.onClick=="function"&&Ue.props.onClick(Ue.addKeyPath(Tt))},Ue.onSelect=function(Tt){Ue.props.onSelect(Tt)},Ue.onDeselect=function(Tt){Ue.props.onDeselect(Tt)},Ue.getPrefixCls=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu")},Ue.getActiveClassName=function(){return"".concat(Ue.getPrefixCls(),"-active")},Ue.getDisabledClassName=function(){return"".concat(Ue.getPrefixCls(),"-disabled")},Ue.getSelectedClassName=function(){return"".concat(Ue.getPrefixCls(),"-selected")},Ue.getOpenClassName=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu-open")},Ue.getVisible=function(){return Ue.state.isOpen},Ue.getMode=function(){return Ue.state.mode},Ue.saveMenuInstance=function(Tt){Ue.menuInstance=Tt},Ue.addKeyPath=function(Tt){return Object(y.a)(Object(y.a)({},Tt),{},{keyPath:(Tt.keyPath||[]).concat(Ue.props.eventKey)})},Ue.triggerOpenChange=function(Tt,Pt){var Zt=Ue.props.eventKey,hn=function(){Ue.onOpenChange({key:Zt,item:Object(w.a)(Ue),trigger:Pt,open:Tt})};Pt==="mouseenter"?Ue.mouseenterTimeout=setTimeout(function(){hn()},0):hn()},Ue.isChildrenSelected=function(){var Tt={find:!1};return Q(Ue.props.children,Ue.props.selectedKeys,Tt),Tt.find},Ue.isInlineMode=function(){return Ue.getMode()==="inline"},Ue.adjustWidth=function(){if(!Ue.subMenuTitle||!Ue.menuInstance)return;var Tt=ge.findDOMNode(Ue.menuInstance);if(Tt.offsetWidth>=Ue.subMenuTitle.offsetWidth)return;Tt.style.minWidth="".concat(Ue.subMenuTitle.offsetWidth,"px")},Ue.saveSubMenuTitle=function(Tt){Ue.subMenuTitle=Tt},Ue.getBaseProps=function(){var Tt=Object(w.a)(Ue),Pt=Tt.props,Zt=Ue.getMode();return{mode:Zt==="horizontal"?"vertical":Zt,visible:Ue.getVisible(),level:Pt.level+1,inlineIndent:Pt.inlineIndent,focusable:!1,onClick:Ue.onSubMenuClick,onSelect:Ue.onSelect,onDeselect:Ue.onDeselect,onDestroy:Ue.onDestroy,selectedKeys:Pt.selectedKeys,eventKey:"".concat(Pt.eventKey,"-menu-"),openKeys:Pt.openKeys,motion:Pt.motion,onOpenChange:Ue.onOpenChange,subMenuOpenDelay:Pt.subMenuOpenDelay,parentMenu:Object(w.a)(Ue),subMenuCloseDelay:Pt.subMenuCloseDelay,forceSubMenuRender:Pt.forceSubMenuRender,triggerSubMenuAction:Pt.triggerSubMenuAction,builtinPlacements:Pt.builtinPlacements,defaultActiveFirst:Pt.store.getState().defaultActiveFirst[ie(Pt.eventKey)],multiple:Pt.multiple,prefixCls:Pt.rootPrefixCls,id:Ue.internalMenuId,manualRef:Ue.saveMenuInstance,itemIcon:Pt.itemIcon,expandIcon:Pt.expandIcon,direction:Pt.direction}},Ue.getMotion=function(Tt,Pt){var Zt=Object(w.a)(Ue),hn=Zt.haveRendered,fn=Ue.props,On=fn.motion,yr=fn.rootPrefixCls,Vr=Object(y.a)(Object(y.a)({},On),{},{leavedClassName:"".concat(yr,"-hidden"),removeOnLeave:!1,motionAppear:hn||!Pt||Tt!=="inline"});return Vr};var et=ut.store,We=ut.eventKey,ct=et.getState(),ft=ct.defaultActiveFirst;Ue.isRootMenu=!1;var Ot=!1;return ft&&(Ot=ft[We]),ei(et,We,Ot),Ue.state={mode:ut.mode,isOpen:ut.isOpen},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ue=this,et=this.props,We=et.mode,ct=et.parentMenu,ft=et.manualRef,Ot=et.isOpen,Tt=function(){Ue.setState({mode:We,isOpen:Ot})},Pt=Ot!==this.state.isOpen,Zt=We!==this.state.mode;if((Zt||Pt)&&(_e.a.cancel(this.updateStateRaf),Zt?this.updateStateRaf=Object(_e.a)(Tt):Tt()),ft&&ft(this),We!=="horizontal"||!(ct==null?void 0:ct.isRootMenu)||!Ot)return;this.minWidthTimeout=setTimeout(function(){return Ue.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ue=this.props,et=Ue.onDestroy,We=Ue.eventKey;et&&et(We),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),_e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ue,et){var We=this.getBaseProps();return g.createElement(So,Object(x.a)({},We,{id:this.internalMenuId,className:Ue,style:et}),this.props.children)}},{key:"renderChildren",value:function(){var Ue=this,et=this.getBaseProps(),We=et.mode,ct=et.visible,ft=et.forceSubMenuRender,Ot=et.direction,Tt=this.getMotion(We,ct);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct||ft,!this.haveOpened)return g.createElement("div",null);var Pt=_()("".concat(et.prefixCls,"-sub"),Object(I.a)({},"".concat(et.prefixCls,"-rtl"),Ot==="rtl"));return this.isInlineMode()?g.createElement(Te,Object(x.a)({visible:et.visible,forceRender:ft},Tt),function(Zt){var hn=Zt.className,fn=Zt.style,On=_()(Pt,hn);return Ue.renderPopupMenu(On,fn)}):this.renderPopupMenu(Pt)}},{key:"render",value:function(){var Ue,et,We,ct=Object(y.a)({},this.props),ft=this.getVisible(),Ot=this.getPrefixCls(),Tt=this.isInlineMode(),Pt=this.getMode(),Zt=_()(Ot,"".concat(Ot,"-").concat(Pt),(Ue={},Object(I.a)(Ue,ct.className,!!ct.className),Object(I.a)(Ue,this.getOpenClassName(),ft),Object(I.a)(Ue,this.getActiveClassName(),ct.active||ft&&!Tt),Object(I.a)(Ue,this.getDisabledClassName(),ct.disabled),Object(I.a)(Ue,this.getSelectedClassName(),this.isChildrenSelected()),Ue));this.internalMenuId||(ct.eventKey?this.internalMenuId="".concat(ct.eventKey,"$Menu"):(Fr+=1,this.internalMenuId="$__$".concat(Fr,"$Menu")));var hn={},fn={},On={};ct.disabled||(hn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},fn={onClick:this.onTitleClick},On={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var yr={},Vr=ct.direction,Mr=Vr==="rtl";Tt&&(Mr?yr.paddingRight=ct.inlineIndent*ct.level:yr.paddingLeft=ct.inlineIndent*ct.level);var Wr={};this.getVisible()&&(Wr={"aria-owns":this.internalMenuId});var Yr=null;Pt!=="horizontal"&&(Yr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Yr=g.createElement(this.props.expandIcon,Object(y.a)({},this.props))));var Xr=g.createElement("div",Object(x.a)({ref:this.saveSubMenuTitle,style:yr,className:"".concat(Ot,"-title"),role:"button"},On,fn,{"aria-expanded":ft},Wr,{"aria-haspopup":"true",title:typeof ct.title=="string"?ct.title:void 0}),ct.title,Yr||g.createElement("i",{className:"".concat(Ot,"-arrow")})),zr=this.renderChildren(),si=((et=ct.parentMenu)===null||et===void 0?void 0:et.isRootMenu)?ct.parentMenu.props.getPopupContainer:function(Ii){return Ii.parentNode},Jr=wr[Pt],Zi=ct.popupOffset?{offset:ct.popupOffset}:{},Zr=_()((We={},Object(I.a)(We,ct.popupClassName,ct.popupClassName&&!Tt),Object(I.a)(We,"".concat(Ot,"-rtl"),Mr),We)),hr=ct.disabled,ur=ct.triggerSubMenuAction,ni=ct.subMenuOpenDelay,pi=ct.forceSubMenuRender,tr=ct.subMenuCloseDelay,vi=ct.builtinPlacements;Y.forEach(function(Ii){return delete ct[Ii]}),delete ct.onClick;var ea=Mr?Object(y.a)(Object(y.a)({},Qr),vi):Object(y.a)(Object(y.a)({},Nr),vi);delete ct.direction;var xi=this.getBaseProps(),Si=Tt?null:this.getMotion(xi.mode,xi.visible);return g.createElement("li",Object(x.a)({},ct,hn,{className:Zt,role:"menuitem"}),g.createElement(ka,{prefixCls:Ot,popupClassName:_()("".concat(Ot,"-popup"),Zr),getPopupContainer:si,builtinPlacements:ea,popupPlacement:Jr,popupVisible:Tt?!1:ft,popupAlign:Zi,popup:Tt?null:zr,action:hr||Tt?[]:[ur],mouseEnterDelay:ni,mouseLeaveDelay:tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:pi,popupMotion:Si},Xr),Tt?zr:null)}}]),Rt}(g.Component);_r.defaultProps={onMouseEnter:fe,onMouseLeave:fe,onTitleMouseEnter:fe,onTitleMouseLeave:fe,onTitleClick:fe,manualRef:fe,mode:"vertical",title:""};var oi=Object(D.b)(function(ot,xt){var Rt=ot.openKeys,ut=ot.activeKey,Ue=ot.selectedKeys,et=xt.eventKey,We=xt.subMenuKey;return{isOpen:Rt.indexOf(et)>-1,active:ut[We]===et,selectedKeys:Ue}})(_r);oi.isSubMenu=!0;var or=oi,Wi="menuitem-overflowed",Mi=.5,$i=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=xt.apply(this,arguments),ut.resizeObserver=null,ut.mutationObserver=null,ut.originalTotalWidth=0,ut.overflowedItems=[],ut.menuItemSizes=[],ut.cancelFrameId=null,ut.state={lastVisibleIndex:void 0},ut.childRef=g.createRef(),ut.getMenuItemNodes=function(){var Ue=ut.props.prefixCls,et=ut.childRef.current;return et?[].slice.call(et.children).filter(function(We){return We.className.split(" ").indexOf("".concat(Ue,"-overflowed-submenu"))<0}):[]},ut.getOverflowedSubMenuItem=function(Ue,et,We){var ct=ut.props,ft=ct.overflowedIndicator,Ot=ct.level,Tt=ct.mode,Pt=ct.prefixCls,Zt=ct.theme;if(Ot!==1||Tt!=="horizontal")return null;var hn=ut.props.children[0],fn=hn.props,On=fn.children,yr=fn.title,Vr=fn.style,Mr=Object(T.a)(fn,["children","title","style"]),Wr=Object(y.a)({},Vr),Yr="".concat(Ue,"-overflowed-indicator"),Xr="".concat(Ue,"-overflowed-indicator");et.length===0&&We!==!0?Wr=Object(y.a)(Object(y.a)({},Wr),{},{display:"none"}):We&&(Wr=Object(y.a)(Object(y.a)({},Wr),{},{visibility:"hidden",position:"absolute"}),Yr="".concat(Yr,"-placeholder"),Xr="".concat(Xr,"-placeholder"));var zr=Zt?"".concat(Pt,"-").concat(Zt):"",si={};return Y.forEach(function(Jr){Mr[Jr]!==void 0&&(si[Jr]=Mr[Jr])}),g.createElement(or,Object(x.a)({title:ft,className:"".concat(Pt,"-overflowed-submenu"),popupClassName:zr},si,{key:Yr,eventKey:Xr,disabled:!1,style:Wr}),et)},ut.setChildrenWidthAndResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=Ue.children;if(!et||et.length===0)return;var We=Ue.children[et.length-1];le(We,"display","inline-block");var ct=ut.getMenuItemNodes(),ft=ct.filter(function(Ot){return Ot.className.split(" ").indexOf(Wi)>=0});ft.forEach(function(Ot){le(Ot,"display","inline-block")}),ut.menuItemSizes=ct.map(function(Ot){return oe(Ot,!0)}),ft.forEach(function(Ot){le(Ot,"display","none")}),ut.overflowedIndicatorWidth=oe(Ue.children[Ue.children.length-1],!0),ut.originalTotalWidth=ut.menuItemSizes.reduce(function(Ot,Tt){return Ot+Tt},0),ut.handleResize(),le(We,"display","none")},ut.handleResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=oe(Ue);ut.overflowedItems=[];var We=0,ct;ut.originalTotalWidth>et+Mi&&(ct=-1,ut.menuItemSizes.forEach(function(ft){We+=ft,We+ut.overflowedIndicatorWidth<=et&&(ct+=1)})),ut.setState({lastVisibleIndex:ct})},ut}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){var Ue=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var et=this.childRef.current;if(!et)return;this.resizeObserver=new Le.default(function(We){We.forEach(function(){var ct=Ue.cancelFrameId;cancelAnimationFrame(ct),Ue.cancelFrameId=requestAnimationFrame(Ue.setChildrenWidthAndResize)})}),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ue.resizeObserver.disconnect(),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),Ue.setChildrenWidthAndResize()}),this.mutationObserver.observe(et,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ue){var et=this,We=this.state.lastVisibleIndex;return(Ue||[]).reduce(function(ct,ft,Ot){var Tt=ft;if(et.props.mode==="horizontal"){var Pt=et.getOverflowedSubMenuItem(ft.props.eventKey,[]);We!==void 0&&et.props.className.indexOf("".concat(et.props.prefixCls,"-root"))!==-1&&(Ot>We&&(Tt=g.cloneElement(ft,{style:{display:"none"},eventKey:"".concat(ft.props.eventKey,"-hidden"),className:"".concat(Wi)})),Ot===We+1&&(et.overflowedItems=Ue.slice(We+1).map(function(hn){return g.cloneElement(hn,{key:hn.props.eventKey,mode:"vertical-left"})}),Pt=et.getOverflowedSubMenuItem(ft.props.eventKey,et.overflowedItems)));var Zt=[].concat(Object(o.a)(ct),[Pt,Tt]);return Ot===Ue.length-1&&Zt.push(et.getOverflowedSubMenuItem(ft.props.eventKey,[],!0)),Zt}return[].concat(Object(o.a)(ct),[Tt])},[])}},{key:"render",value:function(){var Ue=this.props,et=Ue.visible,We=Ue.prefixCls,ct=Ue.overflowedIndicator,ft=Ue.mode,Ot=Ue.level,Tt=Ue.tag,Pt=Ue.children,Zt=Ue.theme,hn=Object(T.a)(Ue,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),fn=Tt;return g.createElement(fn,Object(x.a)({ref:this.childRef},hn),this.renderChildren(Pt))}}]),Rt}(g.Component);$i.defaultProps={tag:"div",className:""};var mo=$i;function Qi(ot){return ot.length?ot.every(function(xt){return!!xt.props.disabled}):!0}function Ka(ot,xt,Rt){var ut=ot.getState();ot.setState({activeKey:Object(y.a)(Object(y.a)({},ut.activeKey),{},Object(I.a)({},xt,Rt))})}function La(ot){return ot.eventKey||"0-menu-"}function ti(ot,xt){var Rt=xt,ut=ot.children,Ue=ot.eventKey;if(Rt){var et;if(q(ut,function(We,ct){We&&We.props&&!We.props.disabled&&Rt===Fe(We,Ue,ct)&&(et=!0)}),et)return Rt}return Rt=null,ot.defaultActiveFirst&&q(ut,function(We,ct){!Rt&&We&&!We.props.disabled&&(Rt=Fe(We,Ue,ct))}),Rt}function Bo(ot){if(!ot)return;var xt=this.instanceArray.indexOf(ot);xt!==-1?this.instanceArray[xt]=ot:this.instanceArray.push(ot)}var Ha=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ut){var Ue;return Object(O.a)(this,Rt),Ue=xt.call(this,ut),Ue.onKeyDown=function(et,We){var ct=et.keyCode,ft;if(Ue.getFlatInstanceArray().forEach(function(Tt){Tt&&Tt.props.active&&Tt.onKeyDown&&(ft=Tt.onKeyDown(et))}),ft)return 1;var Ot=null;return(ct===a.a.UP||ct===a.a.DOWN)&&(Ot=Ue.step(ct===a.a.UP?-1:1)),Ot?(et.preventDefault(),Ka(Ue.props.store,La(Ue.props),Ot.props.eventKey),typeof We=="function"&&We(Ot),1):void 0},Ue.onItemHover=function(et){var We=et.key,ct=et.hover;Ka(Ue.props.store,La(Ue.props),ct?We:null)},Ue.onDeselect=function(et){Ue.props.onDeselect(et)},Ue.onSelect=function(et){Ue.props.onSelect(et)},Ue.onClick=function(et){Ue.props.onClick(et)},Ue.onOpenChange=function(et){Ue.props.onOpenChange(et)},Ue.onDestroy=function(et){Ue.props.onDestroy(et)},Ue.getFlatInstanceArray=function(){return Ue.instanceArray},Ue.step=function(et){var We=Ue.getFlatInstanceArray(),ct=Ue.props.store.getState().activeKey[La(Ue.props)],ft=We.length;if(!ft)return null;et<0&&(We=We.concat().reverse());var Ot=-1;if(We.every(function(hn,fn){return hn&&hn.props.eventKey===ct?(Ot=fn,!1):!0}),!Ue.props.defaultActiveFirst&&Ot!==-1&&Qi(We.slice(Ot,ft-1)))return;var Tt=(Ot+1)%ft,Pt=Tt;do{var Zt=We[Pt];if(!Zt||Zt.props.disabled)Pt=(Pt+1)%ft;else return Zt}while(Pt!==Tt);return null},Ue.renderCommonMenuItem=function(et,We,ct){var ft=Ue.props.store.getState(),Ot=Object(w.a)(Ue),Tt=Ot.props,Pt=Fe(et,Tt.eventKey,We),Zt=et.props;if(!Zt||typeof et.type=="string")return et;var hn=Pt===ft.activeKey,fn=Object(y.a)(Object(y.a)({mode:Zt.mode||Tt.mode,level:Tt.level,inlineIndent:Tt.inlineIndent,renderMenuItem:Ue.renderMenuItem,rootPrefixCls:Tt.prefixCls,index:We,parentMenu:Tt.parentMenu,manualRef:Zt.disabled?void 0:Object(N.a)(et.ref,Bo.bind(Object(w.a)(Ue))),eventKey:Pt,active:!Zt.disabled&&hn,multiple:Tt.multiple,onClick:function(yr){(Zt.onClick||fe)(yr),Ue.onClick(yr)},onItemHover:Ue.onItemHover,motion:Tt.motion,subMenuOpenDelay:Tt.subMenuOpenDelay,subMenuCloseDelay:Tt.subMenuCloseDelay,forceSubMenuRender:Tt.forceSubMenuRender,onOpenChange:Ue.onOpenChange,onDeselect:Ue.onDeselect,onSelect:Ue.onSelect,builtinPlacements:Tt.builtinPlacements,itemIcon:Zt.itemIcon||Ue.props.itemIcon,expandIcon:Zt.expandIcon||Ue.props.expandIcon},ct),{},{direction:Tt.direction});return(Tt.mode==="inline"||Ee())&&(fn.triggerSubMenuAction="click"),g.cloneElement(et,Object(y.a)(Object(y.a)({},fn),{},{key:Pt||We}))},Ue.renderMenuItem=function(et,We,ct){if(!et)return null;var ft=Ue.props.store.getState(),Ot={openKeys:ft.openKeys,selectedKeys:ft.selectedKeys,triggerSubMenuAction:Ue.props.triggerSubMenuAction,subMenuKey:ct};return Ue.renderCommonMenuItem(et,We,Ot)},ut.store.setState({activeKey:Object(y.a)(Object(y.a)({},ut.store.getState().activeKey),{},Object(I.a)({},ut.eventKey,ti(ut,ut.activeKey)))}),Ue.instanceArray=[],Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ue){return this.props.visible||Ue.visible||this.props.className!==Ue.className||!z()(this.props.style,Ue.style)}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We="activeKey"in et?et.activeKey:et.store.getState().activeKey[La(et)],ct=ti(et,We);if(ct!==We)Ka(et.store,La(et),ct);else if("activeKey"in Ue){var ft=ti(Ue,Ue.activeKey);ct!==ft&&Ka(et.store,La(et),ct)}}},{key:"render",value:function(){var Ue=this,et=Object(x.a)({},this.props);this.instanceArray=[];var We=_()(et.prefixCls,et.className,"".concat(et.prefixCls,"-").concat(et.mode)),ct={className:We,role:et.role||"menu"};et.id&&(ct.id=et.id),et.focusable&&(ct.tabIndex=0,ct.onKeyDown=this.onKeyDown);var ft=et.prefixCls,Ot=et.eventKey,Tt=et.visible,Pt=et.level,Zt=et.mode,hn=et.overflowedIndicator,fn=et.theme;return Y.forEach(function(On){return delete et[On]}),delete et.onClick,g.createElement(mo,Object(x.a)({},et,{prefixCls:ft,mode:Zt,tag:"ul",level:Pt,theme:fn,visible:Tt,overflowedIndicator:hn},ct),Object(p.a)(et.children).map(function(On,yr){return Ue.renderMenuItem(On,yr,Ot||"0-menu-")}))}}]),Rt}(g.Component);Ha.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:fe};var go=Object(D.b)()(Ha),So=go,Wa=b("Kwbf");function Ko(ot,xt,Rt){var ut=ot.prefixCls,Ue=ot.motion,et=ot.defaultMotions,We=et===void 0?{}:et,ct=ot.openAnimation,ft=ot.openTransitionName,Ot=xt.switchingModeFromInline;if(Ue)return Ue;if(Object(X.a)(ct)==="object"&&ct)Object(Wa.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ct=="string")return{motionName:"".concat(ut,"-open-").concat(ct)};if(ft)return{motionName:ft};var Tt=We[Rt];return Tt||(Ot?null:We.other)}var Jn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=xt.call(this,ut),Ue.onSelect=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props;if(Ot.selectable){var Tt=Ue.store.getState(),Pt=Tt.selectedKeys,Zt=ct.key;Ot.multiple?Pt=Pt.concat([Zt]):Pt=[Zt],"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Pt}),Ot.onSelect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Pt}))}},Ue.onClick=function(ct){var ft=Ue.getRealMenuMode(),Ot=Object(w.a)(Ue),Tt=Ot.store,Pt=Ot.props.onOpenChange;ft!=="inline"&&!("openKeys"in Ue.props)&&(Tt.setState({openKeys:[]}),Pt([])),Ue.props.onClick(ct)},Ue.onKeyDown=function(ct,ft){Ue.innerMenu.getWrappedInstance().onKeyDown(ct,ft)},Ue.onOpenChange=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props,Tt=Ue.store.getState().openKeys.concat(),Pt=!1,Zt=function(fn){var On=!1;if(fn.open)On=Tt.indexOf(fn.key)===-1,On&&Tt.push(fn.key);else{var yr=Tt.indexOf(fn.key);On=yr!==-1,On&&Tt.splice(yr,1)}Pt=Pt||On};Array.isArray(ct)?ct.forEach(Zt):Zt(ct),Pt&&("openKeys"in Ue.props||Ue.store.setState({openKeys:Tt}),Ot.onOpenChange(Tt))},Ue.onDeselect=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props;if(Ot.selectable){var Tt=Ue.store.getState().selectedKeys.concat(),Pt=ct.key,Zt=Tt.indexOf(Pt);Zt!==-1&&Tt.splice(Zt,1),"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Tt}),Ot.onDeselect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Tt}))}},Ue.onMouseEnter=function(ct){Ue.restoreModeVerticalFromInline();var ft=Ue.props.onMouseEnter;ft&&ft(ct)},Ue.onTransitionEnd=function(ct){var ft=ct.propertyName==="width"&&ct.target===ct.currentTarget,Ot=ct.target.className,Tt=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,Pt=ct.propertyName==="font-size"&&Tt.indexOf("anticon")>=0;(ft||Pt)&&Ue.restoreModeVerticalFromInline()},Ue.setInnerMenu=function(ct){Ue.innerMenu=ct},Ue.isRootMenu=!0;var et=ut.defaultSelectedKeys,We=ut.defaultOpenKeys;return"selectedKeys"in ut&&(et=ut.selectedKeys||[]),"openKeys"in ut&&(We=ut.openKeys||[]),Ue.store=Object(D.c)({selectedKeys:et,openKeys:We,activeKey:{"0-menu-":ti(ut,ut.activeKey)}}),Ue.state={switchingModeFromInline:!1,prevProps:ut,inlineOpenKeys:[],store:Ue.store},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We=et.siderCollapsed,ct=et.inlineCollapsed,ft=et.onOpenChange;(!Ue.inlineCollapsed&&ct||!Ue.siderCollapsed&&We)&&ft([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ue=this.props.collapsedWidth,et=this.store,We=this.prevOpenKeys,ct=this.getInlineCollapsed()&&(Ue===0||Ue==="0"||Ue==="0px");ct?(this.prevOpenKeys=et.getState().openKeys.concat(),this.store.setState({openKeys:[]})):We&&(this.store.setState({openKeys:We}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ue=this.props.mode,et=this.state.switchingModeFromInline,We=this.getInlineCollapsed();return et&&We?"inline":We?"vertical":Ue}},{key:"getInlineCollapsed",value:function(){var Ue=this.props,et=Ue.inlineCollapsed,We=Ue.siderCollapsed;return We!==void 0?We:et}},{key:"restoreModeVerticalFromInline",value:function(){var Ue=this.state.switchingModeFromInline;Ue&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Ue=Object(y.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),et=this.getRealMenuMode();return Ue.className+=" ".concat(Ue.prefixCls,"-root"),Ue.direction==="rtl"&&(Ue.className+=" ".concat(Ue.prefixCls,"-rtl")),Ue=Object(y.a)(Object(y.a)({},Ue),{},{mode:et,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ko(this.props,this.state,et)}),delete Ue.openAnimation,delete Ue.openTransitionName,g.createElement(D.a,{store:this.store},g.createElement(So,Object(x.a)({},Ue,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ue,et){var We=et.prevProps,ct=et.store,ft=ct.getState(),Ot={},Tt={prevProps:Ue};return We.mode==="inline"&&Ue.mode!=="inline"&&(Tt.switchingModeFromInline=!0),"openKeys"in Ue?Ot.openKeys=Ue.openKeys||[]:((Ue.inlineCollapsed&&!We.inlineCollapsed||Ue.siderCollapsed&&!We.siderCollapsed)&&(Tt.switchingModeFromInline=!0,Tt.inlineOpenKeys=ft.openKeys,Ot.openKeys=[]),(!Ue.inlineCollapsed&&We.inlineCollapsed||!Ue.siderCollapsed&&We.siderCollapsed)&&(Ot.openKeys=et.inlineOpenKeys,Tt.inlineOpenKeys=[])),Object.keys(Ot).length&&ct.setState(Ot),Tt}}]),Rt}(g.Component);Jn.defaultProps={selectable:!0,onClick:fe,onSelect:fe,onOpenChange:fe,onDeselect:fe,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:g.createElement("span",null,"\xB7\xB7\xB7")};var gr=Jn,Zn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=xt.apply(this,arguments),ut.onKeyDown=function(Ue){var et=Ue.keyCode;return et===a.a.ENTER?(ut.onClick(Ue),!0):void 0},ut.onMouseLeave=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ft=et.onMouseLeave;ct({key:We,hover:!1}),ft({key:We,domEvent:Ue})},ut.onMouseEnter=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ft=et.onMouseEnter;ct({key:We,hover:!0}),ft({key:We,domEvent:Ue})},ut.onClick=function(Ue){var et=ut.props,We=et.eventKey,ct=et.multiple,ft=et.onClick,Ot=et.onSelect,Tt=et.onDeselect,Pt=et.isSelected,Zt={key:We,keyPath:[We],item:Object(w.a)(ut),domEvent:Ue};ft(Zt),ct?Pt?Tt(Zt):Ot(Zt):Pt||Ot(Zt)},ut.saveNode=function(Ue){ut.node=Ue},ut}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ue=this.props;Ue.onDestroy&&Ue.onDestroy(Ue.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Ue,et=Object(y.a)({},this.props),We=_()(this.getPrefixCls(),et.className,(Ue={},Object(I.a)(Ue,this.getActiveClassName(),!et.disabled&&et.active),Object(I.a)(Ue,this.getSelectedClassName(),et.isSelected),Object(I.a)(Ue,this.getDisabledClassName(),et.disabled),Ue)),ct=Object(y.a)(Object(y.a)({},et.attribute),{},{title:typeof et.title=="string"?et.title:void 0,className:We,role:et.role||"menuitem","aria-disabled":et.disabled});et.role==="option"?ct=Object(y.a)(Object(y.a)({},ct),{},{role:"option","aria-selected":et.isSelected}):(et.role===null||et.role==="none")&&(ct.role="none");var ft={onClick:et.disabled?null:this.onClick,onMouseLeave:et.disabled?null:this.onMouseLeave,onMouseEnter:et.disabled?null:this.onMouseEnter},Ot=Object(y.a)({},et.style);et.mode==="inline"&&(et.direction==="rtl"?Ot.paddingRight=et.inlineIndent*et.level:Ot.paddingLeft=et.inlineIndent*et.level),Y.forEach(function(Pt){return delete et[Pt]}),delete et.direction;var Tt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Tt=g.createElement(this.props.itemIcon,this.props)),g.createElement("li",Object(x.a)({},Object(M.a)(et,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ct,ft,{style:Ot,ref:this.saveNode}),et.children,Tt)}}]),Rt}(g.Component);Zn.isMenuItem=!0,Zn.defaultProps={onSelect:fe,onMouseEnter:fe,onMouseLeave:fe,manualRef:fe};var Lr=Object(D.b)(function(ot,xt){var Rt=ot.activeKey,ut=ot.selectedKeys,Ue=xt.eventKey,et=xt.subMenuKey;return{active:Rt[et]===Ue,isSelected:Array.isArray(ut)?ut.indexOf(Ue)!==-1:ut===Ue}})(Zn),Hr=Lr,gi=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=xt.apply(this,arguments),ut.renderInnerMenuItem=function(Ue){var et=ut.props,We=et.renderMenuItem,ct=et.index;return We(Ue,ct,ut.props.subMenuKey)},ut}return Object(C.a)(Rt,[{key:"render",value:function(){var Ue=Object(x.a)({},this.props),et=Ue.className,We=et===void 0?"":et,ct=Ue.rootPrefixCls,ft="".concat(ct,"-item-group-title"),Ot="".concat(ct,"-item-group-list"),Tt=Ue.title,Pt=Ue.children;return Y.forEach(function(Zt){return delete Ue[Zt]}),delete Ue.direction,g.createElement("li",Object(x.a)({},Ue,{onClick:function(hn){return hn.stopPropagation()},className:"".concat(We," ").concat(ct,"-item-group")}),g.createElement("div",{className:ft,title:typeof Tt=="string"?Tt:void 0},Tt),g.createElement("ul",{className:Ot},g.Children.map(Pt,this.renderInnerMenuItem)))}}]),Rt}(g.Component);gi.isMenuItemGroup=!0,gi.defaultProps={disabled:!0};var dr=gi,Xi=function(xt){var Rt=xt.className,ut=xt.rootPrefixCls,Ue=xt.style;return g.createElement("li",{className:"".concat(Rt," ").concat(ut,"-item-divider"),style:Ue})};Xi.defaultProps={disabled:!0,className:"",style:{}};var ga=Xi,jr=gr,qa=b("eDIo");function di(ot,xt){var Rt=ot.prefixCls,ut=ot.editable,Ue=ot.locale,et=ot.style;return!ut||ut.showAdd===!1?null:g.createElement("button",{ref:xt,type:"button",className:"".concat(Rt,"-nav-add"),style:et,"aria-label":(Ue==null?void 0:Ue.addAriaLabel)||"Add tab",onClick:function(ct){ut.onEdit("add",{event:ct})}},ut.addIcon||"+")}var Ai=g.forwardRef(di);function va(ot,xt){var Rt=ot.prefixCls,ut=ot.id,Ue=ot.tabs,et=ot.locale,We=ot.mobile,ct=ot.moreIcon,ft=ct===void 0?"More":ct,Ot=ot.moreTransitionName,Tt=ot.style,Pt=ot.className,Zt=ot.editable,hn=ot.tabBarGutter,fn=ot.rtl,On=ot.onTabClick,yr=Object(g.useState)(!1),Vr=Object(v.a)(yr,2),Mr=Vr[0],Wr=Vr[1],Yr=Object(g.useState)(null),Xr=Object(v.a)(Yr,2),zr=Xr[0],si=Xr[1],Jr="".concat(ut,"-more-popup"),Zi="".concat(Rt,"-dropdown"),Zr=zr!==null?"".concat(Jr,"-").concat(zr):null,hr=et==null?void 0:et.dropdownAriaLabel,ur=g.createElement(jr,{onClick:function(Si){var Ii=Si.key,ha=Si.domEvent;On(Ii,ha),Wr(!1)},id:Jr,tabIndex:-1,role:"listbox","aria-activedescendant":Zr,selectedKeys:[zr],"aria-label":hr!==void 0?hr:"expanded dropdown"},Ue.map(function(xi){return g.createElement(Hr,{key:xi.key,id:"".concat(Jr,"-").concat(xi.key),role:"option","aria-controls":ut&&"".concat(ut,"-panel-").concat(xi.key),disabled:xi.disabled},xi.tab)}));function ni(xi){for(var Si=Ue.filter(function($a){return!$a.disabled}),Ii=Si.findIndex(function($a){return $a.key===zr})||0,ha=Si.length,Ta=0;Tavi?(pi=ur,Jr.current="x"):(pi=ni,Jr.current="y");var ea=Date.now();ea-zr.current>100&&(si.current=!1),(xt(-pi,-pi)||si.current)&&(hr.preventDefault(),si.current=!0),zr.current=ea}var Zr=Object(g.useRef)(null);Zr.current={onTouchStart:Wr,onTouchMove:Yr,onTouchEnd:Xr,onWheel:Zi},g.useEffect(function(){function hr(tr){Zr.current.onTouchStart(tr)}function ur(tr){Zr.current.onTouchMove(tr)}function ni(tr){Zr.current.onTouchEnd(tr)}function pi(tr){Zr.current.onWheel(tr)}return document.addEventListener("touchmove",ur,{passive:!1}),document.addEventListener("touchend",ni,{passive:!1}),ot.current.addEventListener("touchstart",hr,{passive:!1}),ot.current.addEventListener("wheel",pi),function(){document.removeEventListener("touchmove",ur),document.removeEventListener("touchend",ni)}},[])}function Or(){var ot=Object(g.useRef)(new Map);function xt(ut){return ot.current.has(ut)||ot.current.set(ut,g.createRef()),ot.current.get(ut)}function Rt(ut){ot.current.delete(ut)}return[xt,Rt]}function fi(ot,xt){var Rt=g.useRef(ot),ut=g.useState({}),Ue=Object(v.a)(ut,2),et=Ue[1];function We(ct){var ft=typeof ct=="function"?ct(Rt.current):ct;ft!==Rt.current&&xt(ft,Rt.current),Rt.current=ft,et({})}return[Rt.current,We]}var bi=function(xt){var Rt=xt.position,ut=xt.prefixCls,Ue=xt.extra;if(!Ue)return null;var et,We=Ue;return Rt==="right"&&(et=We.right||!We.left&&We||null),Rt==="left"&&(et=We.left||null),et?g.createElement("div",{className:"".concat(ut,"-extra-content")},et):null};function Ji(ot,xt){var Rt,ut=g.useContext(Ho),Ue=ut.prefixCls,et=ut.tabs,We=ot.className,ct=ot.style,ft=ot.id,Ot=ot.animated,Tt=ot.activeKey,Pt=ot.rtl,Zt=ot.extra,hn=ot.editable,fn=ot.locale,On=ot.tabPosition,yr=ot.tabBarGutter,Vr=ot.children,Mr=ot.onTabClick,Wr=ot.onTabScroll,Yr=Object(g.useRef)(),Xr=Object(g.useRef)(),zr=Object(g.useRef)(),si=Object(g.useRef)(),Jr=Or(),Zi=Object(v.a)(Jr,2),Zr=Zi[0],hr=Zi[1],ur=On==="top"||On==="bottom",ni=fi(0,function(we,qe){ur&&Wr&&Wr({direction:we>qe?"left":"right"})}),pi=Object(v.a)(ni,2),tr=pi[0],vi=pi[1],ea=fi(0,function(we,qe){!ur&&Wr&&Wr({direction:we>qe?"top":"bottom"})}),xi=Object(v.a)(ea,2),Si=xi[0],Ii=xi[1],ha=Object(g.useState)(0),Ta=Object(v.a)(ha,2),aa=Ta[0],$a=Ta[1],To=Object(g.useState)(0),vo=Object(v.a)(To,2),Aa=vo[0],Gi=vo[1],ji=Object(g.useState)(0),oa=Object(v.a)(ji,2),ta=oa[0],Ao=oa[1],Vo=Object(g.useState)(0),Yo=Object(v.a)(Vo,2),ki=Yo[0],Xo=Yo[1],Qo=Object(g.useState)(null),Ni=Object(v.a)(Qo,2),Oi=Ni[0],Oa=Ni[1],ks=Object(g.useState)(null),nl=Object(v.a)(ks,2),Jo=nl[0],is=nl[1],Ls=Object(g.useState)(0),bl=Object(v.a)(Ls,2),Ms=bl[0],El=bl[1],Nl=Object(g.useState)(0),xl=Object(v.a)(Nl,2),rl=xl[0],il=xl[1],vs=t(new Map),as=Object(v.a)(vs,2),Ul=as[0],Cs=as[1],Ts=h(et,Ul,aa),os="".concat(Ue,"-nav-operations-hidden"),_s=0,Oo=0;ur?Pt?(_s=0,Oo=Math.max(0,aa-Oi)):(_s=Math.min(0,Oi-aa),Oo=0):(_s=Math.min(0,Jo-Aa),Oo=0);function ss(we){return we<_s?[_s,!1]:we>Oo?[Oo,!1]:[we,!0]}var Zo=Object(g.useRef)(),ls=Object(g.useState)(),ys=Object(v.a)(ls,2),Ps=ys[0],wl=ys[1];function Ns(){wl(Date.now())}function al(){window.clearTimeout(Zo.current)}nr(Yr,function(we,qe){var rt=!1;function At(Mt,vt){Mt(function(at){var Dt=ss(at+vt),Ct=Object(v.a)(Dt,2),_t=Ct[0],St=Ct[1];return rt=St,_t})}if(ur){if(Oi>=aa)return rt;At(vi,we)}else{if(Jo>=Aa)return rt;At(Ii,qe)}return al(),Ns(),rt}),Object(g.useEffect)(function(){return al(),Ps&&(Zo.current=window.setTimeout(function(){wl(0)},100)),al},[Ps]);function qo(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tt,qe=Ts.get(we);if(!qe)return;if(ur){var rt=tr;Pt?qe.righttr+Oi&&(rt=qe.right+qe.width-Oi):qe.left<-tr?rt=-qe.left:qe.left+qe.width>-tr+Oi&&(rt=-(qe.left+qe.width-Oi)),Ii(0),vi(ss(rt)[0])}else{var At=Si;qe.top<-Si?At=-qe.top:qe.top+qe.height>-Si+Jo&&(At=-(qe.top+qe.height-Jo)),vi(0),Ii(ss(At)[0])}}var us=E(Ts,{width:Oi,height:Jo,left:tr,top:Si},{width:ta,height:ki},{width:Ms,height:rl},Object(y.a)(Object(y.a)({},ot),{},{tabs:et})),Sl=Object(v.a)(us,2),Fl=Sl[0],ol=Sl[1],sl=et.map(function(we){var qe=we.key;return g.createElement(d,{id:ft,prefixCls:Ue,key:qe,rtl:Pt,tab:we,closable:we.closable,editable:hn,active:qe===Tt,tabPosition:On,tabBarGutter:yr,renderWrapper:Vr,removeAriaLabel:fn==null?void 0:fn.removeAriaLabel,ref:Zr(qe),onClick:function(At){Mr(qe,At)},onRemove:function(){hr(qe)},onFocus:function(){qo(qe),Ns(),Pt||(Yr.current.scrollLeft=0),Yr.current.scrollTop=0}})}),ll=i(function(){var we,qe,rt,At,Mt,vt,at,Dt,Ct,_t=((we=Yr.current)===null||we===void 0?void 0:we.offsetWidth)||0,St=((qe=Yr.current)===null||qe===void 0?void 0:qe.offsetHeight)||0,Jt=((rt=si.current)===null||rt===void 0?void 0:rt.offsetWidth)||0,Ft=((At=si.current)===null||At===void 0?void 0:At.offsetHeight)||0,It=((Mt=zr.current)===null||Mt===void 0?void 0:Mt.offsetWidth)||0,zt=((vt=zr.current)===null||vt===void 0?void 0:vt.offsetHeight)||0;Oa(_t),is(St),El(Jt),il(Ft);var qt=(((at=Xr.current)===null||at===void 0?void 0:at.offsetWidth)||0)-Jt,un=(((Dt=Xr.current)===null||Dt===void 0?void 0:Dt.offsetHeight)||0)-Ft;$a(qt),Gi(un);var gn=(Ct=zr.current)===null||Ct===void 0?void 0:Ct.className.includes(os);Ao(qt-(gn?0:It)),Xo(un-(gn?0:zt)),Cs(function(){var Cn=new Map;return et.forEach(function(Xn){var yn=Xn.key,vn=Zr(yn).current;vn&&Cn.set(yn,{width:vn.offsetWidth,height:vn.offsetHeight,left:vn.offsetLeft,top:vn.offsetTop})}),Cn})}),jl=et.slice(0,Fl),lo=et.slice(ol+1),sa=[].concat(Object(o.a)(jl),Object(o.a)(lo)),Xa=Object(g.useState)(),_a=Object(v.a)(Xa,2),As=_a[0],Bl=_a[1],Ro=Ts.get(Tt),Kl=Object(g.useRef)();function Cl(){l.a.cancel(Kl.current)}Object(g.useEffect)(function(){var we={};return Ro&&(ur?(Pt?we.right=Ro.right:we.left=Ro.left,we.width=Ro.width):(we.top=Ro.top,we.height=Ro.height)),Cl(),Kl.current=l()(function(){Bl(we)}),Cl},[Ro,ur,Pt]),Object(g.useEffect)(function(){qo()},[Tt,Ro,Ts,ur]),Object(g.useEffect)(function(){ll()},[Pt,yr,Tt,et.map(function(we){return we.key}).join("_")]);var Hl=!!sa.length,cs="".concat(Ue,"-nav-wrap"),Us,Fs,Tl,js;return ur?Pt?(Fs=tr>0,Us=tr+Oi4?9:0)}function q(ne){for(var Ze=ne.length;--Ze>=0;)ne[Ze]=0}function Q(ne){var Ze=ne.state,lt=Ze.pending;if(lt>ne.avail_out&&(lt=ne.avail_out),lt===0)return;v.arraySet(ne.output,Ze.pending_buf,Ze.pending_out,lt,ne.next_out),ne.next_out+=lt,Ze.pending_out+=lt,ne.total_out+=lt,ne.avail_out-=lt,Ze.pending-=lt,Ze.pending===0&&(Ze.pending_out=0)}function Y(ne,Ze){T._tr_flush_block(ne,ne.block_start>=0?ne.block_start:-1,ne.strstart-ne.block_start,Ze),ne.block_start=ne.strstart,Q(ne.strm)}function oe(ne,Ze){ne.pending_buf[ne.pending++]=Ze}function le(ne,Ze){ne.pending_buf[ne.pending++]=Ze>>>8&255,ne.pending_buf[ne.pending++]=Ze&255}function Ee(ne,Ze,lt,Be){var $e=ne.avail_in;return $e>Be&&($e=Be),$e===0?0:(ne.avail_in-=$e,v.arraySet(Ze,ne.input,ne.next_in,$e,lt),ne.state.wrap===1?ne.adler=(0,y.default)(ne.adler,Ze,$e,lt):ne.state.wrap===2&&(ne.adler=(0,g.default)(ne.adler,Ze,$e,lt)),ne.next_in+=$e,ne.total_in+=$e,$e)}function Le(ne,Ze){var lt=ne.max_chain_length,Be=ne.strstart,$e,it,wt=ne.prev_length,pt=ne.nice_match,st=ne.strstart>ne.w_size-Z?ne.strstart-(ne.w_size-Z):0,Pe=ne.window,ze=ne.w_mask,Et=ne.prev,ht=ne.strstart+B,Bt=Pe[Be+wt-1],Ht=Pe[Be+wt];ne.prev_length>=ne.good_match&&(lt>>=2),pt>ne.lookahead&&(pt=ne.lookahead);do{if($e=Ze,Pe[$e+wt]!==Ht||Pe[$e+wt-1]!==Bt||Pe[$e]!==Pe[Be]||Pe[++$e]!==Pe[Be+1])continue;Be+=2,$e++;do;while(Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Bewt){if(ne.match_start=Ze,wt=it,it>=pt)break;Bt=Pe[Be+wt-1],Ht=Pe[Be+wt]}}while((Ze=Et[Ze&ze])>st&&--lt!==0);return wt<=ne.lookahead?wt:ne.lookahead}function ge(ne){var Ze=ne.w_size,lt,Be,$e,it,wt;do{if(it=ne.window_size-ne.lookahead-ne.strstart,ne.strstart>=Ze+(Ze-Z)){v.arraySet(ne.window,ne.window,Ze,Ze,0),ne.match_start-=Ze,ne.strstart-=Ze,ne.block_start-=Ze,Be=ne.hash_size,lt=Be;do $e=ne.head[--lt],ne.head[lt]=$e>=Ze?$e-Ze:0;while(--Be);Be=Ze,lt=Be;do $e=ne.prev[--lt],ne.prev[lt]=$e>=Ze?$e-Ze:0;while(--Be);it+=Ze}if(ne.strm.avail_in===0)break;if(Be=Ee(ne.strm,ne.window,ne.strstart+ne.lookahead,it),ne.lookahead+=Be,ne.lookahead+ne.insert>=L)for(wt=ne.strstart-ne.insert,ne.ins_h=ne.window[wt],ne.ins_h=(ne.ins_h<ne.pending_buf_size-5&&(lt=ne.pending_buf_size-5);;){if(ne.lookahead<=1){if(ge(ne),ne.lookahead===0&&Ze===o)return me;if(ne.lookahead===0)break}ne.strstart+=ne.lookahead,ne.lookahead=0;var Be=ne.block_start+lt;if((ne.strstart===0||ne.strstart>=Be)&&(ne.lookahead=ne.strstart-Be,ne.strstart=Be,Y(ne,!1),ne.strm.avail_out===0))return me;if(ne.strstart-ne.block_start>=ne.w_size-Z&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):(ne.strstart>ne.block_start&&(Y(ne,!1),ne.strm.avail_out===0),me)}function _e(ne,Ze){for(var lt,Be;;){if(ne.lookahead=L&&(ne.ins_h=(ne.ins_h<=L)if(Be=T._tr_tally(ne,ne.strstart-ne.match_start,ne.match_length-L),ne.lookahead-=ne.match_length,ne.match_length<=ne.max_lazy_match&&ne.lookahead>=L){ne.match_length--;do ne.strstart++,ne.ins_h=(ne.ins_h<=L&&(ne.ins_h=(ne.ins_h<4096)&&(ne.match_length=L-1)),ne.prev_length>=L&&ne.match_length<=ne.prev_length){$e=ne.strstart+ne.lookahead-L,Be=T._tr_tally(ne,ne.strstart-1-ne.prev_match,ne.prev_length-L),ne.lookahead-=ne.prev_length-1,ne.prev_length-=2;do++ne.strstart<=$e&&(ne.ins_h=(ne.ins_h<=L&&ne.strstart>0&&($e=ne.strstart-1,Be=wt[$e],Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e])){it=ne.strstart+B;do;while(Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&Be===wt[++$e]&&$ene.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=L?(lt=T._tr_tally(ne,1,ne.match_length-L),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Ge(ne,Ze){for(var lt;;){if(ne.lookahead===0&&(ge(ne),ne.lookahead===0)){if(Ze===o)return me;break}if(ne.match_length=0,lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Me(ne,Ze,lt,Be,$e){this.good_length=ne,this.max_lazy=Ze,this.nice_length=lt,this.max_chain=Be,this.func=$e}var bt;bt=[new Me(0,0,0,0,De),new Me(4,4,8,4,_e),new Me(4,5,16,8,_e),new Me(4,6,32,32,_e),new Me(4,4,16,16,Xe),new Me(8,16,32,32,Xe),new Me(8,16,128,128,Xe),new Me(8,32,128,256,Xe),new Me(32,128,258,1024,Xe),new Me(32,258,258,4096,Xe)];function Oe(ne){ne.window_size=2*ne.w_size,q(ne.head),ne.max_lazy_match=bt[ne.level].max_lazy,ne.good_match=bt[ne.level].good_length,ne.nice_match=bt[ne.level].nice_length,ne.max_chain_length=bt[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=L-1,ne.match_available=0,ne.ins_h=0}function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=S,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new v.Buf16(F*2),this.dyn_dtree=new v.Buf16((2*X+1)*2),this.bl_tree=new v.Buf16((2*k+1)*2),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new v.Buf16(U+1),this.heap=new v.Buf16(2*z+1),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new v.Buf16(2*z+1),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Je(ne){var Ze;return!ne||!ne.state?Fe(ne,c):(ne.total_in=ne.total_out=0,ne.data_type=w,Ze=ne.state,Ze.pending=0,Ze.pending_out=0,Ze.wrap<0&&(Ze.wrap=-Ze.wrap),Ze.status=Ze.wrap?he:Ce,ne.adler=Ze.wrap===2?0:1,Ze.last_flush=o,T._tr_init(Ze),t)}function Ye(ne){var Ze=Je(ne);return Ze===t&&Oe(ne.state),Ze}function Ne(ne,Ze){return!ne||!ne.state||ne.state.wrap!==2?c:(ne.state.gzhead=Ze,t)}function He(ne,Ze,lt,Be,$e,it){if(!ne)return c;var wt=1;if(Ze===h&&(Ze=6),Be<0?(wt=0,Be=-Be):Be>15&&(wt=2,Be-=16),$e<1||$e>A||lt!==S||Be<8||Be>15||Ze<0||Ze>9||it<0||it>O)return Fe(ne,c);Be===8&&(Be=9);var pt=new Ve;return ne.state=pt,pt.strm=ne,pt.wrap=wt,pt.gzhead=null,pt.w_bits=Be,pt.w_size=1<i||Ze<0)return ne?Fe(ne,c):c;if(Be=ne.state,!ne.output||!ne.input&&ne.avail_in!==0||Be.status===pe&&Ze!==r)return Fe(ne,ne.avail_out===0?f:c);if(Be.strm=ne,lt=Be.last_flush,Be.last_flush=Ze,Be.status===he)if(Be.wrap===2)ne.adler=0,oe(Be,31),oe(Be,139),oe(Be,8),Be.gzhead?(oe(Be,(Be.gzhead.text?1:0)+(Be.gzhead.hcrc?2:0)+(Be.gzhead.extra?4:0)+(Be.gzhead.name?8:0)+(Be.gzhead.comment?16:0)),oe(Be,Be.gzhead.time&255),oe(Be,Be.gzhead.time>>8&255),oe(Be,Be.gzhead.time>>16&255),oe(Be,Be.gzhead.time>>24&255),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,Be.gzhead.os&255),Be.gzhead.extra&&Be.gzhead.extra.length&&(oe(Be,Be.gzhead.extra.length&255),oe(Be,Be.gzhead.extra.length>>8&255)),Be.gzhead.hcrc&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending,0)),Be.gzindex=0,Be.status=Se):(oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,fe),Be.status=Ce);else{var wt=S+(Be.w_bits-8<<4)<<8,pt=-1;Be.strategy>=E||Be.level<2?pt=0:Be.level<6?pt=1:Be.level===6?pt=2:pt=3,wt|=pt<<6,Be.strstart!==0&&(wt|=re),wt+=31-wt%31,Be.status=Ce,le(Be,wt),Be.strstart!==0&&(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),ne.adler=1}if(Be.status===Se)if(Be.gzhead.extra){for($e=Be.pending;Be.gzindex<(Be.gzhead.extra.length&65535)&&!(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size));)oe(Be,Be.gzhead.extra[Be.gzindex]&255),Be.gzindex++;Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Be.gzindex===Be.gzhead.extra.length&&(Be.gzindex=0,Be.status=ke)}else Be.status=ke;if(Be.status===ke)if(Be.gzhead.name){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){it=1;break}Be.gzindex$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),it===0&&(Be.gzindex=0,Be.status=te)}else Be.status=te;if(Be.status===te)if(Be.gzhead.comment){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){it=1;break}Be.gzindex$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),it===0&&(Be.status=Re)}else Be.status=Re;if(Be.status===Re&&(Be.gzhead.hcrc?(Be.pending+2>Be.pending_buf_size&&Q(ne),Be.pending+2<=Be.pending_buf_size&&(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),ne.adler=0,Be.status=Ce)):Be.status=Ce),Be.pending!==0){if(Q(ne),ne.avail_out===0)return Be.last_flush=-1,t}else if(ne.avail_in===0&&ie(Ze)<=ie(lt)&&Ze!==r)return Fe(ne,f);if(Be.status===pe&&ne.avail_in!==0)return Fe(ne,f);if(ne.avail_in!==0||Be.lookahead!==0||Ze!==o&&Be.status!==pe){var st=Be.strategy===E?Ge(Be,Ze):Be.strategy===x?tt(Be,Ze):bt[Be.level].func(Be,Ze);if((st===be||st===ae)&&(Be.status=pe),st===me||st===be)return ne.avail_out===0&&(Be.last_flush=-1),t;if(st===se&&(Ze===n?T._tr_align(Be):Ze!==i&&(T._tr_stored_block(Be,0,0,!1),Ze===l&&(q(Be.head),Be.lookahead===0&&(Be.strstart=0,Be.block_start=0,Be.insert=0))),Q(ne),ne.avail_out===0))return Be.last_flush=-1,t}return Ze!==r?t:Be.wrap<=0?a:(Be.wrap===2?(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),oe(Be,ne.adler>>16&255),oe(Be,ne.adler>>24&255),oe(Be,ne.total_in&255),oe(Be,ne.total_in>>8&255),oe(Be,ne.total_in>>16&255),oe(Be,ne.total_in>>24&255)):(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),Q(ne),Be.wrap>0&&(Be.wrap=-Be.wrap),Be.pending!==0?t:a)}function de(ne){var Ze;return!ne||!ne.state?c:(Ze=ne.state.status,Ze!==he&&Ze!==Se&&Ze!==ke&&Ze!==te&&Ze!==Re&&Ze!==Ce&&Ze!==pe?Fe(ne,c):(ne.state=null,Ze===Ce?Fe(ne,d):t))}function je(ne,Ze){var lt=Ze.length,Be,$e,it,wt,pt,st,Pe,ze;if(!ne||!ne.state)return c;if(Be=ne.state,wt=Be.wrap,wt===2||wt===1&&Be.status!==he||Be.lookahead)return c;for(wt===1&&(ne.adler=(0,y.default)(ne.adler,Ze,lt,0)),Be.wrap=0,lt>=Be.w_size&&(wt===0&&(q(Be.head),Be.strstart=0,Be.block_start=0,Be.insert=0),ze=new v.Buf8(Be.w_size),v.arraySet(ze,Ze,lt-Be.w_size,Be.w_size,0),Ze=ze,lt=Be.w_size),pt=ne.avail_in,st=ne.next_in,Pe=ne.input,ne.avail_in=lt,ne.next_in=0,ne.input=Ze,ge(Be);Be.lookahead>=L;){$e=Be.strstart,it=Be.lookahead-(L-1);do Be.ins_h=(Be.ins_h<>>7)^(O<<14|O>>>18)^O>>>3,w=o[x-2],S=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;o[x]=C+o[x-7]+S+o[x-16]}var A=f&h^~f&u,D=t&a^t&c^a&c,M=(t<<30|t>>>2)^(t<<19|t>>>13)^(t<<10|t>>>22),N=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),P=E+N+A+e[x]+o[x],z=M+D;E=u,u=h,h=f,f=d+P|0,d=c,c=a,a=t,t=P+z|0}i[0]=i[0]+t|0,i[1]=i[1]+a|0,i[2]=i[2]+c|0,i[3]=i[3]+d|0,i[4]=i[4]+f|0,i[5]=i[5]+h|0,i[6]=i[6]+u|0,i[7]=i[7]+E|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,t=l.sigBytes*8;return r[t>>>5]|=128<<24-t%32,r[(t+64>>>9<<4)+14]=v.floor(i/4294967296),r[(t+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});T.SHA256=s._createHelper(n),T.HmacSHA256=s._createHmacHelper(n)}(Math),I.SHA256})},lZu9:function(j,H,b){(function(I){I(b("VrN/"),b("1eCo"),b("8EBN"))})(function(I){"use strict";I.defineMode("markdown",function(v,T){var y=I.getMode(v,"text/html"),g=y.name=="null";function s(U){if(I.findModeByName){var L=I.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var B=I.getMode(v,U);return B.name=="null"?null:B}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var _={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var p in _)_.hasOwnProperty(p)&&T.tokenTypeOverrides[p]&&(_[p]=T.tokenTypeOverrides[p]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,l=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,t=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,a=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,d=" ";function f(U,L,B){return L.f=L.inline=B,B(U,L)}function h(U,L,B){return L.f=L.block=B,B(U,L)}function u(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==O){var L=g;if(!L){var B=I.innerMode(y,U.htmlState);L=B.mode.name=="xml"&&B.state.tagStart===null&&!B.state.context&&B.state.tokenize.isInText}L&&(U.f=A,U.block=x,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function x(U,L){var B=U.column()===L.indentation,Z=u(L.prevLine.stream),re=L.indentedCode,he=L.prevLine.hr,Se=L.list!==!1,ke=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var te=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,Se)){for(L.list=null;te=4&&(re||L.prevLine.fencedCodeEnd||L.prevLine.header||Z))return U.skipToEnd(),L.indentedCode=!0,_.code;if(U.eatSpace())return null;if(B&&L.indentation<=ke&&(pe=U.match(l))&&pe[1].length<=6)return L.quote=0,L.header=pe[1].length,L.thisLine.header=!0,T.highlightFormatting&&(L.formatting="header"),L.f=L.inline,w(L);if(L.indentation<=ke&&U.eat(">"))return L.quote=B?1:L.quote+1,T.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),w(L);if(!Ce&&!L.setext&&B&&L.indentation<=ke&&(pe=U.match(o))){var me=pe[1]?"ol":"ul";return L.indentation=te+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(L.taskList=!0),L.f=L.inline,T.highlightFormatting&&(L.formatting=["list","list-"+me]),w(L)}else{if(B&&L.indentation<=ke&&(pe=U.match(t,!0)))return L.quote=0,L.fencedEndRE=new RegExp(pe[1]+"+ *$"),L.localMode=T.fencedCodeBlockHighlighting&&s(pe[2]||T.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=I.startState(L.localMode)),L.f=L.block=C,T.highlightFormatting&&(L.formatting="code-block"),L.code=-1,w(L);if(L.setext||(!Re||!Se)&&!L.quote&&L.list===!1&&!L.code&&!Ce&&!a.test(U.string)&&(pe=U.lookAhead(1))&&(pe=pe.match(r)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),T.highlightFormatting&&(L.formatting="header")):(L.header=pe[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,w(L);if(Ce)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,_.hr;if(U.peek()==="[")return f(U,L,z)}return f(U,L,L.inline)}function O(U,L){var B=y.token(U,L.htmlState);if(!g){var Z=I.innerMode(y,L.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=A,L.block=x,L.htmlState=null)}return B}function C(U,L){var B=L.listStack[L.listStack.length-1]||0,Z=L.indentation=U.quote?L.push(_.formatting+"-"+U.formatting[B]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(_.linkHref,"url"):(U.strong&&L.push(_.strong),U.em&&L.push(_.em),U.strikethrough&&L.push(_.strikethrough),U.emoji&&L.push(_.emoji),U.linkText&&L.push(_.linkText),U.code&&L.push(_.code),U.image&&L.push(_.image),U.imageAltText&&L.push(_.imageAltText,"link"),U.imageMarker&&L.push(_.imageMarker)),U.header&&L.push(_.header,_.header+"-"+U.header),U.quote&&(L.push(_.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?L.push(_.quote+"-"+U.quote):L.push(_.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var Z=(U.listStack.length-1)%3;Z?Z===1?L.push(_.list2):L.push(_.list3):L.push(_.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function S(U,L){return U.match(i,!0)?w(L):void 0}function A(U,L){var B=L.text(U,L);if(typeof B!="undefined")return B;if(L.list)return L.list=null,w(L);if(L.taskList){var Z=U.match(n,!0)[1]===" ";return Z?L.taskOpen=!0:L.taskClosed=!0,T.highlightFormatting&&(L.formatting="task"),L.taskList=!1,w(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(L.formatting="header"),w(L);var re=U.next();if(L.linkTitle){L.linkTitle=!1;var he=re;re==="("&&(he=")"),he=(he+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+he+"\\\\]+|\\\\\\\\|\\\\.)"+he;if(U.match(new RegExp(Se),!0))return _.linkHref}if(re==="`"){var ke=L.formatting;T.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var te=U.current().length;if(L.code==0&&(!L.quote||te==1))return L.code=te,w(L);if(te==L.code){var Re=w(L);return L.code=0,Re}else return L.formatting=ke,w(L)}else if(L.code)return w(L);if(re==="\\"&&(U.next(),T.highlightFormatting)){var Ce=w(L),pe=_.formatting+"-escape";return Ce?Ce+" "+pe:pe}if(re==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="]"&&L.imageAltText){T.highlightFormatting&&(L.formatting="image");var Ce=w(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=M,Ce}if(re==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,T.highlightFormatting&&(L.formatting="link")),w(L);if(re==="]"&&L.linkText){T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:A,Ce}if(re==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return Ce?Ce+=" ":Ce="",Ce+_.linkInline}if(re==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return Ce?Ce+=" ":Ce="",Ce+_.linkEmail}if(T.xml&&re==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var me=U.string.indexOf(">",U.pos);if(me!=-1){var se=U.string.substring(U.start,me);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(se)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=I.startState(y),h(U,L,O)}if(T.xml&&re==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var be=1,ae=U.pos==1?" ":U.string.charAt(U.pos-2);be<3&&U.eat(re);)be++;var fe=U.peek()||" ",Fe=!/\s/.test(fe)&&(!c.test(fe)||/\s/.test(ae)||c.test(ae)),ie=!/\s/.test(ae)&&(!c.test(ae)||/\s/.test(fe)||c.test(fe)),q=null,Q=null;if(be%2&&(!L.em&&Fe&&(re==="*"||!ie||c.test(ae))?q=!0:L.em==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(q=!1)),be>1&&(!L.strong&&Fe&&(re==="*"||!ie||c.test(ae))?Q=!0:L.strong==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(Q=!1)),Q!=null||q!=null){T.highlightFormatting&&(L.formatting=q==null?"strong":Q==null?"em":"strong em"),q===!0&&(L.em=re),Q===!0&&(L.strong=re);var Re=w(L);return q===!1&&(L.em=!1),Q===!1&&(L.strong=!1),Re}}else if(re===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return w(L);U.backUp(1)}if(T.strikethrough){if(re==="~"&&U.eatWhile(re)){if(L.strikethrough){T.highlightFormatting&&(L.formatting="strikethrough");var Re=w(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,T.highlightFormatting&&(L.formatting="strikethrough"),w(L)}else if(re===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return w(L);U.backUp(2)}}if(T.emoji&&re===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,T.highlightFormatting&&(L.formatting="emoji");var Y=w(L);return L.emoji=!1,Y}return re===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),w(L)}function D(U,L){var B=U.next();if(B===">"){L.f=L.inline=A,T.highlightFormatting&&(L.formatting="link");var Z=w(L);return Z?Z+=" ":Z="",Z+_.linkInline}return U.match(/^[^>]+/,!0),_.linkInline}function M(U,L){if(U.eatSpace())return null;var B=U.next();return B==="("||B==="["?(L.f=L.inline=P(B==="("?")":"]"),T.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,w(L)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function P(U){return function(L,B){var Z=L.next();if(Z===U){B.f=B.inline=A,T.highlightFormatting&&(B.formatting="link-string");var re=w(B);return B.linkHref=!1,re}return L.match(N[U]),B.linkHref=!0,w(B)}}function z(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=X,U.next(),T.highlightFormatting&&(L.formatting="link"),L.linkText=!0,w(L)):f(U,L,A)}function X(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=k,T.highlightFormatting&&(L.formatting="link");var B=w(L);return L.linkText=!1,B}return U.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function k(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=A,_.linkHref+" url")}var F={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:A,text:S,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&I.copyState(y,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?I.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return E(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=O)){var B=U.match(/^\s*/,!0)[0].replace(/\t/g,d).length;if(L.indentation=B,L.indentationDiff=null,B>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==O?{state:U.htmlState,mode:y}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:F}},indent:function(U,L,B){return U.block==O&&y.indent?y.indent(U.htmlState,L,B):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,B):I.Pass},blankLine:E,getType:w,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return F},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})},lzim:function(j,H,b){"use strict";var I=b("E7E6"),v=b.n(I);b.d(H,"w",function(){return v.a});var T=b("/GNS"),y=b.n(T);b.d(H,"v",function(){return y.a});var g=b("FOrL"),s=b.n(g);b.d(H,"q",function(){return s.a});var _=b("HpTS"),p=b.n(_);b.d(H,"x",function(){return p.a});var e=b("tWlo"),o=b.n(e);b.d(H,"a",function(){return o.a});var n=b("7ZXX"),l=b.n(n);b.d(H,"l",function(){return l.a});var r=b("GABl"),i=b.n(r);b.d(H,"e",function(){return i.a});var t=b("onxn"),a=b.n(t);b.d(H,"n",function(){return a.a});var c=b("nKGa"),d=b.n(c);b.d(H,"m",function(){return d.a});var f=b("4qgm"),h=b.n(f);b.d(H,"y",function(){return h.a});var u=b("JeFH"),E=b.n(u);b.d(H,"b",function(){return E.a});var x=b("ji0R"),O=b.n(x);b.d(H,"i",function(){return O.a});var C=b("W6BS"),w=b.n(C);b.d(H,"z",function(){return w.a});var S=b("kPYp"),A=b.n(S);b.d(H,"A",function(){return A.a});var D=b("nukY"),M=b.n(D),N=b("4u4S"),P=b.n(N),z=b("yslc"),X=b.n(z),k=b("l2Kq"),F=b.n(k),U=b("RMFE"),L=b.n(U);b.d(H,"o",function(){return L.a});var B=b("TGq3"),Z=b.n(B),re=b("SMhR"),he=b.n(re),Se=b("8/bI"),ke=b.n(Se);b.d(H,"j",function(){return ke.a});var te=b("JWDV"),Re=b.n(te),Ce=b("Xsq0"),pe=b.n(Ce);b.d(H,"p",function(){return pe.a});var me=b("Ohmc"),se=b.n(me);b.d(H,"c",function(){return se.a});var be=b("csWT"),ae=b.n(be);b.d(H,"d",function(){return ae.a});var fe=b("7v3h"),Fe=b.n(fe);b.d(H,"k",function(){return Fe.a});var ie=b("cRFk"),q=b.n(ie);b.d(H,"u",function(){return q.a});var Q=b("kPWJ"),Y=b.n(Q);b.d(H,"t",function(){return Y.a});var oe=b("qgvg"),le=b.n(oe);b.d(H,"r",function(){return le.a});var Ee=b("FPkq"),Le=b.n(Ee);b.d(H,"s",function(){return Le.a});var ge=b("A/g1"),De=b.n(ge);b.d(H,"f",function(){return De.a});var _e=b("Nmxd"),Xe=b.n(_e);b.d(H,"g",function(){return Xe.a});var tt=b("5D2P"),Ge=b.n(tt);b.d(H,"h",function(){return Ge.a});var Me=b("djh8"),bt=b.n(Me),Oe=b("Jq4h"),Ve=b.n(Oe)},mCJh:function(j,H,b){"use strict";b.d(H,"e",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"d",function(){return y}),b.d(H,"g",function(){return g}),b.d(H,"f",function(){return s}),b.d(H,"i",function(){return _}),b.d(H,"c",function(){return p}),b.d(H,"h",function(){return e}),b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"j",function(){return l});var I=b("ErOA");function v(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Object(I.c)("/discusses.json?page=".concat(i-1,"&container_identifier=").concat(r,"&container_type=Shixun"))}function T(r,i){return Object(I.f)("/discusses/".concat(r,"/top_or_down_discuss.json"),{top:i})}function y(r,i){return Object(I.f)("/discusses/".concat(r,"/disable_or_open_discuss.json"),{is_disable:!!i})}function g(r,i){return Object(I.f)("/discusses/".concat(r,"/plus.json"),{container_type:"Discuss",type:i?1:0})}function s(r,i){return Object(I.f)("/discusses/".concat(r,"/hidden.json"),i)}function _(r,i){return Object(I.f)("/discusses/".concat(r,"/reward_code.json"),i)}function p(r){return Object(I.a)("/api/discusses/".concat(r,".json"),{method:"delete"})}function e(r,i){return Object(I.f)("/discusses/".concat(r,"/reply.json"),{container_type:"Shixun",content:i})}function o(r){return Object(I.f)("/discusses.json",r)}function n(r){return Object(I.f)("/discusses/ai_reply.json",r)}function l(r,i){return Object(I.f)("/discusses/".concat(r,"/turing.json"),i)}},mHUz:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};H.default=I},mTgk:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=v(b("mHUz"));function v(p){return p&&p.__esModule?p:{default:p}}var T={};function y(p,e){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,e]}function g(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,o,e]}function s(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,o]}g("Alt",I.default.XK_Alt_L,I.default.XK_Alt_R),y("AltGraph",I.default.XK_ISO_Level3_Shift),y("CapsLock",I.default.XK_Caps_Lock),g("Control",I.default.XK_Control_L,I.default.XK_Control_R),g("Meta",I.default.XK_Super_L,I.default.XK_Super_R),y("NumLock",I.default.XK_Num_Lock),y("ScrollLock",I.default.XK_Scroll_Lock),g("Shift",I.default.XK_Shift_L,I.default.XK_Shift_R),s("Enter",I.default.XK_Return,I.default.XK_KP_Enter),y("Tab",I.default.XK_Tab),s(" ",I.default.XK_space,I.default.XK_KP_Space),s("ArrowDown",I.default.XK_Down,I.default.XK_KP_Down),s("ArrowUp",I.default.XK_Up,I.default.XK_KP_Up),s("ArrowLeft",I.default.XK_Left,I.default.XK_KP_Left),s("ArrowRight",I.default.XK_Right,I.default.XK_KP_Right),s("End",I.default.XK_End,I.default.XK_KP_End),s("Home",I.default.XK_Home,I.default.XK_KP_Home),s("PageDown",I.default.XK_Next,I.default.XK_KP_Next),s("PageUp",I.default.XK_Prior,I.default.XK_KP_Prior),y("Backspace",I.default.XK_BackSpace),s("Clear",I.default.XK_Clear,I.default.XK_KP_Begin),y("Copy",I.default.XF86XK_Copy),y("Cut",I.default.XF86XK_Cut),s("Delete",I.default.XK_Delete,I.default.XK_KP_Delete),s("Insert",I.default.XK_Insert,I.default.XK_KP_Insert),y("Paste",I.default.XF86XK_Paste),y("Redo",I.default.XK_Redo),y("Undo",I.default.XK_Undo),y("Cancel",I.default.XK_Cancel),y("ContextMenu",I.default.XK_Menu),y("Escape",I.default.XK_Escape),y("Execute",I.default.XK_Execute),y("Find",I.default.XK_Find),y("Help",I.default.XK_Help),y("Pause",I.default.XK_Pause),y("Select",I.default.XK_Select),y("ZoomIn",I.default.XF86XK_ZoomIn),y("ZoomOut",I.default.XF86XK_ZoomOut),y("BrightnessDown",I.default.XF86XK_MonBrightnessDown),y("BrightnessUp",I.default.XF86XK_MonBrightnessUp),y("Eject",I.default.XF86XK_Eject),y("LogOff",I.default.XF86XK_LogOff),y("Power",I.default.XF86XK_PowerOff),y("PowerOff",I.default.XF86XK_PowerDown),y("PrintScreen",I.default.XK_Print),y("Hibernate",I.default.XF86XK_Hibernate),y("Standby",I.default.XF86XK_Standby),y("WakeUp",I.default.XF86XK_WakeUp),y("AllCandidates",I.default.XK_MultipleCandidate),y("Alphanumeric",I.default.XK_Eisu_Shift),y("CodeInput",I.default.XK_Codeinput),y("Compose",I.default.XK_Multi_key),y("Convert",I.default.XK_Henkan),y("GroupFirst",I.default.XK_ISO_First_Group),y("GroupLast",I.default.XK_ISO_Last_Group),y("GroupNext",I.default.XK_ISO_Next_Group),y("GroupPrevious",I.default.XK_ISO_Prev_Group),y("NonConvert",I.default.XK_Muhenkan),y("PreviousCandidate",I.default.XK_PreviousCandidate),y("SingleCandidate",I.default.XK_SingleCandidate),y("HangulMode",I.default.XK_Hangul),y("HanjaMode",I.default.XK_Hangul_Hanja),y("JunjuaMode",I.default.XK_Hangul_Jeonja),y("Eisu",I.default.XK_Eisu_toggle),y("Hankaku",I.default.XK_Hankaku),y("Hiragana",I.default.XK_Hiragana),y("HiraganaKatakana",I.default.XK_Hiragana_Katakana),y("KanaMode",I.default.XK_Kana_Shift),y("KanjiMode",I.default.XK_Kanji),y("Katakana",I.default.XK_Katakana),y("Romaji",I.default.XK_Romaji),y("Zenkaku",I.default.XK_Zenkaku),y("ZenkakuHanaku",I.default.XK_Zenkaku_Hankaku),y("F1",I.default.XK_F1),y("F2",I.default.XK_F2),y("F3",I.default.XK_F3),y("F4",I.default.XK_F4),y("F5",I.default.XK_F5),y("F6",I.default.XK_F6),y("F7",I.default.XK_F7),y("F8",I.default.XK_F8),y("F9",I.default.XK_F9),y("F10",I.default.XK_F10),y("F11",I.default.XK_F11),y("F12",I.default.XK_F12),y("F13",I.default.XK_F13),y("F14",I.default.XK_F14),y("F15",I.default.XK_F15),y("F16",I.default.XK_F16),y("F17",I.default.XK_F17),y("F18",I.default.XK_F18),y("F19",I.default.XK_F19),y("F20",I.default.XK_F20),y("F21",I.default.XK_F21),y("F22",I.default.XK_F22),y("F23",I.default.XK_F23),y("F24",I.default.XK_F24),y("F25",I.default.XK_F25),y("F26",I.default.XK_F26),y("F27",I.default.XK_F27),y("F28",I.default.XK_F28),y("F29",I.default.XK_F29),y("F30",I.default.XK_F30),y("F31",I.default.XK_F31),y("F32",I.default.XK_F32),y("F33",I.default.XK_F33),y("F34",I.default.XK_F34),y("F35",I.default.XK_F35),y("Close",I.default.XF86XK_Close),y("MailForward",I.default.XF86XK_MailForward),y("MailReply",I.default.XF86XK_Reply),y("MailSend",I.default.XF86XK_Send),y("MediaFastForward",I.default.XF86XK_AudioForward),y("MediaPause",I.default.XF86XK_AudioPause),y("MediaPlay",I.default.XF86XK_AudioPlay),y("MediaRecord",I.default.XF86XK_AudioRecord),y("MediaRewind",I.default.XF86XK_AudioRewind),y("MediaStop",I.default.XF86XK_AudioStop),y("MediaTrackNext",I.default.XF86XK_AudioNext),y("MediaTrackPrevious",I.default.XF86XK_AudioPrev),y("New",I.default.XF86XK_New),y("Open",I.default.XF86XK_Open),y("Print",I.default.XK_Print),y("Save",I.default.XF86XK_Save),y("SpellCheck",I.default.XF86XK_Spell),y("AudioVolumeDown",I.default.XF86XK_AudioLowerVolume),y("AudioVolumeUp",I.default.XF86XK_AudioRaiseVolume),y("AudioVolumeMute",I.default.XF86XK_AudioMute),y("MicrophoneVolumeMute",I.default.XF86XK_AudioMicMute),y("LaunchApplication1",I.default.XF86XK_MyComputer),y("LaunchApplication2",I.default.XF86XK_Calculator),y("LaunchCalendar",I.default.XF86XK_Calendar),y("LaunchMail",I.default.XF86XK_Mail),y("LaunchMediaPlayer",I.default.XF86XK_AudioMedia),y("LaunchMusicPlayer",I.default.XF86XK_Music),y("LaunchPhone",I.default.XF86XK_Phone),y("LaunchScreenSaver",I.default.XF86XK_ScreenSaver),y("LaunchSpreadsheet",I.default.XF86XK_Excel),y("LaunchWebBrowser",I.default.XF86XK_WWW),y("LaunchWebCam",I.default.XF86XK_WebCam),y("LaunchWordProcessor",I.default.XF86XK_Word),y("BrowserBack",I.default.XF86XK_Back),y("BrowserFavorites",I.default.XF86XK_Favorites),y("BrowserForward",I.default.XF86XK_Forward),y("BrowserHome",I.default.XF86XK_HomePage),y("BrowserRefresh",I.default.XF86XK_Refresh),y("BrowserSearch",I.default.XF86XK_Search),y("BrowserStop",I.default.XF86XK_Stop),y("Dimmer",I.default.XF86XK_BrightnessAdjust),y("MediaAudioTrack",I.default.XF86XK_AudioCycleTrack),y("RandomToggle",I.default.XF86XK_AudioRandomPlay),y("SplitScreenToggle",I.default.XF86XK_SplitScreen),y("Subtitle",I.default.XF86XK_Subtitle),y("VideoModeNext",I.default.XF86XK_Next_VMode),s("=",I.default.XK_equal,I.default.XK_KP_Equal),s("+",I.default.XK_plus,I.default.XK_KP_Add),s("-",I.default.XK_minus,I.default.XK_KP_Subtract),s("*",I.default.XK_asterisk,I.default.XK_KP_Multiply),s("/",I.default.XK_slash,I.default.XK_KP_Divide),s(".",I.default.XK_period,I.default.XK_KP_Decimal),s(",",I.default.XK_comma,I.default.XK_KP_Separator),s("0",I.default.XK_0,I.default.XK_KP_0),s("1",I.default.XK_1,I.default.XK_KP_1),s("2",I.default.XK_2,I.default.XK_KP_2),s("3",I.default.XK_3,I.default.XK_KP_3),s("4",I.default.XK_4,I.default.XK_KP_4),s("5",I.default.XK_5,I.default.XK_KP_5),s("6",I.default.XK_6,I.default.XK_KP_6),s("7",I.default.XK_7,I.default.XK_KP_7),s("8",I.default.XK_8,I.default.XK_KP_8),s("9",I.default.XK_9,I.default.XK_KP_9);var _=T;H.default=_},mdZa:function(j,H,b){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(v,T){"use strict";if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(v),g=1;g>>3]&1<>>10,this.keys[B]|=(re&4032)>>>6,++B,this.keys[B]=(Z&258048)<<12,this.keys[B]|=(Z&63)<<16,this.keys[B]|=(re&258048)>>>4,this.keys[B]|=re&63,++B}}return T(E,[{key:"enc8",value:function(O){var C=O.slice(),w=0,S,A,D;S=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],A=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],D=(S>>>4^A)&252645135,A^=D,S^=D<<4,D=(S>>>16^A)&65535,A^=D,S^=D<<16,D=(A>>>2^S)&858993459,S^=D,A^=D<<2,D=(A>>>8^S)&16711935,S^=D,A^=D<<8,A=A<<1|A>>>31&1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<1|S>>>31&1;for(var M=0,N=0;M<8;++M){D=A<<28|A>>>4,D^=this.keys[N++];var P=f[D&63];P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=A^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],S^=P,D=S<<28|S>>>4,D^=this.keys[N++],P=f[D&63],P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=S^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],A^=P}for(A=A<<31|A>>>1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<31|S>>>1,D=(S>>>8^A)&16711935,A^=D,S^=D<<8,D=(S>>>2^A)&858993459,A^=D,S^=D<<2,D=(A>>>16^S)&65535,S^=D,A^=D<<16,D=(A>>>4^S)&252645135,S^=D,A^=D<<4,D=[A,S],w=0;w<8;w++)C[w]=(D[w>>>2]>>>8*(3-w%4))%256,C[w]<0&&(C[w]+=256);return C}},{key:"encrypt",value:function(O){return this.enc8(O.slice(0,8)).concat(this.enc8(O.slice(8,16)))}}]),E}();H.default=u},ic2d:function(j,H,b){"use strict";b.d(H,"a",function(){return y});var I=b("FWmy"),v=b("746U");class T{constructor(){this.data=new Map}add(g,s){I.a(v.l(g)),I.a(v.k(s)),I.a(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,s)}as(g){return this.data.get(g)||null}}const y=new T},jO9C:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso97971={pad:function(v,T){v.concat(I.lib.WordArray.create([2147483648],1)),I.pad.ZeroPadding.pad(v,T)},unpad:function(v){I.pad.ZeroPadding.unpad(v),v.sigBytes--}},I.pad.Iso97971})},je13:function(j,H,b){var I=b("5nXd"),v=b("gRFJ"),T=[b("uQRt")];j.exports=I.createStore(v,T)},ji0R:function(j,H,b){j.exports=b.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(j,H,b){"use strict";b.d(H,"a",function(){return Ao});var I=b("rePB"),v=b("ODXe"),T=b("Ff2n"),y=b("VTBJ"),g=b("q1tI"),s=b("TSYQ"),_=b.n(s),p=b("Zm9Q"),e=b("6cGi"),o=b("KQm4"),n=b("xEkU"),l=b.n(n),r=b("t23M");function i(ot){var wt=Object(g.useRef)(),Rt=Object(g.useRef)(!1);function ut(){for(var Ue=arguments.length,et=new Array(Ue),We=0;WePt&&(hn=Pt-dn),Object(g.useMemo)(function(){if(!et.length)return[0,0];for(var Rn=et.length,yr=Rn,Vr=0;VrTt+hn){yr=Vr-1;break}}for(var Hr=0,Yr=Rn-1;Yr>=0;Yr-=1){var Wr=ot.get(et[Yr].key)||u;if(Wr[Ot]1&&arguments[1]!==void 0?arguments[1]:!1,ut=wt&&typeof wt.getBoundingClientRect=="function"&&wt.getBoundingClientRect().width;if(ut){if(Rt){var Ue=getComputedStyle(wt),et=Ue.marginLeft,We=Ue.marginRight;ut+=+et.replace("px","")+ +We.replace("px","")}ut=+ut.toFixed(6)}return ut||0},le=function(wt,Rt,ut){wt&&Object(X.a)(wt.style)==="object"&&(wt.style[Rt]=ut)},Ee=function(){return ae.any},Le=b("bdgK"),ge=b("i8i4"),De=b.n(ge),_e=b("wgJM"),Xe=b("l4aY"),tt=b("m+aA"),Ge=b("c+Xe"),Me=b("zT1h"),Et=b("QC+M");function Oe(ot,wt,Rt){return Rt?ot[0]===wt[0]:ot[0]===wt[0]&&ot[1]===wt[1]}function Ve(ot,wt,Rt){var ut=ot[wt]||{};return Object(y.a)(Object(y.a)({},ut),Rt)}function Je(ot,wt,Rt,ut){for(var Ue=Rt.points,et=Object.keys(ot),We=0;We1&&arguments[1]!==void 0?arguments[1]:2;wt();var et=Object(_e.a)(function(){Ue<=1?ut({isCanceled:function(){return et!==ot.current}}):Rt(ut,Ue-1)});ot.current=et}return g.useEffect(function(){return function(){wt()}},[]),[Rt,wt]},Kt=[ht,Bt,Ht,gt],rn=!1,zt=!0;function $t(ot){return ot===Ht||ot===gt}var Pn=function(ot,wt){var Rt=g.useState(xt),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=It(),ct=Object(v.a)(We,2),ft=ct[0],Ot=ct[1];function Tt(){et(ht)}return Ut(function(){if(Ue!==xt&&Ue!==gt){var Pt=Kt.indexOf(Ue),Zt=Kt[Pt+1],dn=wt(Ue);dn===rn?et(Zt):ft(function(hn){function Rn(){if(hn.isCanceled())return;et(Zt)}dn===!0?Rn():Promise.resolve(dn).then(Rn)})}},[ot,Ue]),g.useEffect(function(){return function(){Ot()}},[]),[Tt,Ue]},fn=function(ot){var wt=Object(g.useRef)(),Rt=Object(g.useRef)(ot);Rt.current=ot;var ut=g.useCallback(function(We){Rt.current(We)},[]);function Ue(We){We&&(We.removeEventListener(rt,ut),We.removeEventListener($e,ut))}function et(We){wt.current&&wt.current!==We&&Ue(wt.current),We&&We!==wt.current&&(We.addEventListener(rt,ut),We.addEventListener($e,ut),wt.current=We)}return g.useEffect(function(){return function(){Ue(wt.current)}},[]),[et,Ue]};function In(ot,wt,Rt,ut){var Ue=ut.motionEnter,et=Ue===void 0?!0:Ue,We=ut.motionAppear,ct=We===void 0?!0:We,ft=ut.motionLeave,Ot=ft===void 0?!0:ft,Tt=ut.motionDeadline,Pt=ut.motionLeaveImmediately,Zt=ut.onAppearPrepare,dn=ut.onEnterPrepare,hn=ut.onLeavePrepare,Rn=ut.onAppearStart,yr=ut.onEnterStart,Vr=ut.onLeaveStart,Pr=ut.onAppearActive,Hr=ut.onEnterActive,Yr=ut.onLeaveActive,Wr=ut.onAppearEnd,Xr=ut.onEnterEnd,ui=ut.onLeaveEnd,Zr=ut.onVisibleChanged,Qi=Xt(),qr=Object(v.a)(Qi,2),dr=qr[0],ur=qr[1],ri=Xt(pt),fi=Object(v.a)(ri,2),nr=fi[0],vi=fi[1],qi=Xt(null),wi=Object(v.a)(qi,2),Ai=wi[0],ki=wi[1],da=Object(g.useRef)(!1),Aa=Object(g.useRef)(null),ia=Object(g.useRef)(!1),$a=Object(g.useRef)(null);function Oo(){var Ui=Rt();return Ui||$a.current}var vo=Object(g.useRef)(!1);function Oa(Ui){var Ri=Oo();if(Ui&&!Ui.deadline&&Ui.target!==Ri)return;var Ra;nr===st&&vo.current?Ra=Wr==null?void 0:Wr(Ri,Ui):nr===Pe&&vo.current?Ra=Xr==null?void 0:Xr(Ri,Ui):nr===ze&&vo.current&&(Ra=ui==null?void 0:ui(Ri,Ui)),Ra!==!1&&!ia.current&&(vi(pt),ki(null))}var zi=fn(Oa),ji=Object(v.a)(zi,1),aa=ji[0],$i=g.useMemo(function(){var Ui,Ri,Ra;switch(nr){case"appear":return Ui={},Object(I.a)(Ui,ht,Zt),Object(I.a)(Ui,Bt,Rn),Object(I.a)(Ui,Ht,Pr),Ui;case"enter":return Ri={},Object(I.a)(Ri,ht,dn),Object(I.a)(Ri,Bt,yr),Object(I.a)(Ri,Ht,Hr),Ri;case"leave":return Ra={},Object(I.a)(Ra,ht,hn),Object(I.a)(Ra,Bt,Vr),Object(I.a)(Ra,Ht,Yr),Ra;default:return{}}},[nr]),Ro=Pn(nr,function(Ui){if(Ui===ht){var Ri=$i[ht];return Ri?Ri(Oo()):rn}if(Li in $i){var Ra;ki(((Ra=$i[Li])===null||Ra===void 0?void 0:Ra.call($i,Oo(),null))||null)}return Li===Ht&&(aa(Oo()),Tt>0&&(clearTimeout(Aa.current),Aa.current=setTimeout(function(){Oa({deadline:!0})},Tt))),zt}),Qo=Object(v.a)(Ro,2),Jo=Qo[0],Li=Qo[1],Go=$t(Li);vo.current=Go,Ut(function(){ur(wt);var Ui=da.current;if(da.current=!0,!ot)return;var Ri;!Ui&&wt&&ct&&(Ri=st),Ui&&wt&&et&&(Ri=Pe),(Ui&&!wt&&Ot||!Ui&&Pt&&!wt&&Ot)&&(Ri=ze),Ri&&(vi(Ri),Jo())},[wt]),Object(g.useEffect)(function(){(nr===st&&!ct||nr===Pe&&!et||nr===ze&&!Ot)&&vi(pt)},[ct,et,Ot]),Object(g.useEffect)(function(){return function(){clearTimeout(Aa.current),ia.current=!0}},[]),Object(g.useEffect)(function(){dr!==void 0&&nr===pt&&(Zr==null||Zr(dr))},[dr,nr]);var Zo=Ai;return $i[ht]&&Li===Bt&&(Zo=Object(y.a)({transition:"none"},Zo)),[nr,Li,Zo,dr!=null?dr:wt]}var on=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){return Object(O.a)(this,Rt),wt.apply(this,arguments)}return Object(C.a)(Rt,[{key:"render",value:function(){return this.props.children}}]),Rt}(g.Component),Cn=on;function Hn(ot){var wt=ot;Object(X.a)(ot)==="object"&&(wt=ot.transitionSupport);function Rt(Ue){return!!(Ue.motionName&&wt)}var ut=g.forwardRef(function(Ue,et){var We=Ue.visible,ct=We===void 0?!0:We,ft=Ue.removeOnLeave,Ot=ft===void 0?!0:ft,Tt=Ue.forceRender,Pt=Ue.children,Zt=Ue.motionName,dn=Ue.leavedClassName,hn=Ue.eventProps,Rn=Rt(Ue),yr=Object(g.useRef)(),Vr=Object(g.useRef)();function Pr(){try{return Object(tt.a)(yr.current||Vr.current)}catch(vi){return null}}var Hr=In(Rn,ct,Pr,Ue),Yr=Object(v.a)(Hr,4),Wr=Yr[0],Xr=Yr[1],ui=Yr[2],Zr=Yr[3],Qi=g.useRef(Zr);Zr&&(Qi.current=!0);var qr=Object(g.useRef)(et);qr.current=et;var dr=g.useCallback(function(vi){yr.current=vi,Object(Ge.b)(qr.current,vi)},[]),ur,ri=Object(y.a)(Object(y.a)({},hn),{},{visible:ct});if(!Pt)ur=null;else if(Wr===pt||!Rt(Ue))Zr?ur=Pt(Object(y.a)({},ri),dr):!Ot&&Qi.current?ur=Pt(Object(y.a)(Object(y.a)({},ri),{},{className:dn}),dr):Tt?ur=Pt(Object(y.a)(Object(y.a)({},ri),{},{style:{display:"none"}}),dr):ur=null;else{var fi,nr;Xr===ht?nr="prepare":$t(Xr)?nr="active":Xr===Bt&&(nr="start"),ur=Pt(Object(y.a)(Object(y.a)({},ri),{},{className:_()(St(Zt,Wr),(fi={},Object(I.a)(fi,St(Zt,"".concat(Wr,"-").concat(nr)),nr),Object(I.a)(fi,Zt,typeof Zt=="string"),fi)),style:ui}),dr)}return g.createElement(Cn,{ref:Vr},ur)});return ut.displayName="CSSMotion",ut}var Qn=Hn(Be),Vt="add",xn="keep",er="remove",ar="removed";function Ar(ot){var wt;return ot&&Object(X.a)(ot)==="object"&&"key"in ot?wt=ot:wt={key:ot},Object(y.a)(Object(y.a)({},wt),{},{key:String(wt.key)})}function $n(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ot.map(Ar)}function ce(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Rt=[],ut=0,Ue=wt.length,et=$n(ot),We=$n(wt);et.forEach(function(Ot){for(var Tt=!1,Pt=ut;Pt1});return ft.forEach(function(Ot){Rt=Rt.filter(function(Tt){var Pt=Tt.key,Zt=Tt.status;return Pt!==Ot||Zt!==er}),Rt.forEach(function(Tt){Tt.key===Ot&&(Tt.status=xn)})}),Rt}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function J(ot){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn,Rt=function(ut){Object(S.a)(et,ut);var Ue=Object(A.a)(et);function et(){var We;return Object(O.a)(this,et),We=Ue.apply(this,arguments),We.state={keyEntities:[]},We.removeKey=function(ct){We.setState(function(ft){var Ot=ft.keyEntities;return{keyEntities:Ot.map(function(Tt){return Tt.key!==ct?Tt:Object(y.a)(Object(y.a)({},Tt),{},{status:ar})})}})},We}return Object(C.a)(et,[{key:"render",value:function(){var ct=this,ft=this.state.keyEntities,Ot=this.props,Tt=Ot.component,Pt=Ot.children,Zt=Ot.onVisibleChanged,dn=Object(T.a)(Ot,["component","children","onVisibleChanged"]),hn=Tt||g.Fragment,Rn={};return V.forEach(function(yr){Rn[yr]=dn[yr],delete dn[yr]}),delete dn.keys,g.createElement(hn,dn,ft.map(function(yr){var Vr=yr.status,Pr=Object(T.a)(yr,["status"]),Hr=Vr===Vt||Vr===xn;return g.createElement(wt,Object(x.a)({},Rn,{key:Pr.key,visible:Hr,eventProps:Pr,onVisibleChanged:function(Wr){Zt==null||Zt(Wr,{key:Pr.key}),Wr||ct.removeKey(Pr.key)}}),Pt)}))}}],[{key:"getDerivedStateFromProps",value:function(ct,ft){var Ot=ct.keys,Tt=ft.keyEntities,Pt=$n(Ot),Zt=ce(Tt,Pt);return{keyEntities:Zt.filter(function(dn){var hn=Tt.find(function(Rn){var yr=Rn.key;return dn.key===yr});return!(hn&&hn.status===ar&&dn.status===er)})}}}]),et}(g.Component);return Rt.defaultProps={component:"div"},Rt}var ee=J(Be),Te=Qn;function ue(ot){var wt=ot.prefixCls,Rt=ot.motion,ut=ot.animation,Ue=ot.transitionName;return Rt||(ut?{motionName:"".concat(wt,"-").concat(ut)}:Ue?{motionName:Ue}:null)}function nt(ot){var wt=ot.prefixCls,Rt=ot.visible,ut=ot.zIndex,Ue=ot.mask,et=ot.maskMotion,We=ot.maskAnimation,ct=ot.maskTransitionName;if(!Ue)return null;var ft={};return(et||ct||We)&&(ft=Object(y.a)({motionAppear:!0},ue({motion:et,prefixCls:wt,transitionName:ct,animation:We}))),g.createElement(Te,Object(x.a)({},ft,{visible:Rt,removeOnLeave:!0}),function(Ot){var Tt=Ot.className;return g.createElement("div",{style:{zIndex:ut},className:_()("".concat(wt,"-mask"),Tt)})})}var kt=b("9mu1"),Yt=b("o0o1"),sn=b.n(Yt),Qt=b("HaE+"),kn=["measure","align",null,"motion"],Vn=function(ot,wt){var Rt=Object(g.useState)(null),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=Object(g.useRef)(),ct=Object(g.useRef)(!1);function ft(Pt){ct.current||et(Pt)}function Ot(){_e.a.cancel(We.current)}function Tt(Pt){Ot(),We.current=Object(_e.a)(function(){ft(function(Zt){switch(Ue){case"align":return"motion";case"motion":return"stable";default:}return Zt}),Pt==null||Pt()})}return Object(g.useEffect)(function(){ft("measure")},[ot]),Object(g.useEffect)(function(){switch(Ue){case"measure":wt();break;default:}Ue&&(We.current=Object(_e.a)(Object(Qt.a)(sn.a.mark(function Pt(){var Zt,dn;return sn.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:Zt=kn.indexOf(Ue),dn=kn[Zt+1],dn&&Zt!==-1&&ft(dn);case 3:case"end":return Rn.stop()}},Pt)}))))},[Ue]),Object(g.useEffect)(function(){return function(){ct.current=!0,Ot()}},[]),[Ue,Tt]},lr=function(ot){var wt=g.useState({width:0,height:0}),Rt=Object(v.a)(wt,2),ut=Rt[0],Ue=Rt[1];function et(ct){Ue({width:ct.offsetWidth,height:ct.offsetHeight})}var We=g.useMemo(function(){var ct={};if(ot){var ft=ut.width,Ot=ut.height;ot.indexOf("height")!==-1&&Ot?ct.height=Ot:ot.indexOf("minHeight")!==-1&&Ot&&(ct.minHeight=Ot),ot.indexOf("width")!==-1&&ft?ct.width=ft:ot.indexOf("minWidth")!==-1&&ft&&(ct.minWidth=ft)}return ct},[ot,ut]);return[We,et]},Or=g.forwardRef(function(ot,wt){var Rt=ot.visible,ut=ot.prefixCls,Ue=ot.className,et=ot.style,We=ot.children,ct=ot.zIndex,ft=ot.stretch,Ot=ot.destroyPopupOnHide,Tt=ot.forceRender,Pt=ot.align,Zt=ot.point,dn=ot.getRootDomNode,hn=ot.getClassNameFromAlign,Rn=ot.onAlign,yr=ot.onMouseEnter,Vr=ot.onMouseLeave,Pr=ot.onMouseDown,Hr=ot.onTouchStart,Yr=Object(g.useRef)(),Wr=Object(g.useRef)(),Xr=Object(g.useState)(),ui=Object(v.a)(Xr,2),Zr=ui[0],Qi=ui[1],qr=lr(ft),dr=Object(v.a)(qr,2),ur=dr[0],ri=dr[1];function fi(){ft&&ri(dn())}var nr=Vn(Rt,fi),vi=Object(v.a)(nr,2),qi=vi[0],wi=vi[1],Ai=Object(g.useRef)();function ki(){return Zt||dn}function da(){var zi;(zi=Yr.current)===null||zi===void 0||zi.forceAlign()}function Aa(zi,ji){var aa=hn(ji);Zr!==aa&&Qi(aa),qi==="align"&&(Zr!==aa?Promise.resolve().then(function(){da()}):wi(function(){var $i;($i=Ai.current)===null||$i===void 0||$i.call(Ai)}),Rn==null||Rn(zi,ji))}var ia=Object(y.a)({},ue(ot));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(zi){var ji=ia[zi];ia[zi]=function(aa,$i){return wi(),ji==null?void 0:ji(aa,$i)}});function $a(){return new Promise(function(zi){Ai.current=zi})}g.useEffect(function(){!ia.motionName&&qi==="motion"&&wi()},[ia.motionName,qi]),g.useImperativeHandle(wt,function(){return{forceAlign:da,getElement:function(){return Wr.current}}});var Oo=Object(y.a)(Object(y.a)({},ur),{},{zIndex:ct,opacity:qi==="motion"||qi==="stable"||!Rt?void 0:0,pointerEvents:qi==="stable"?void 0:"none"},et),vo=!0;(Pt==null?void 0:Pt.points)&&(qi==="align"||qi==="stable")&&(vo=!1);var Oa=We;return g.Children.count(We)>1&&(Oa=g.createElement("div",{className:"".concat(ut,"-content")},We)),g.createElement(Te,Object(x.a)({visible:Rt,ref:Wr,leavedClassName:"".concat(ut,"-hidden")},ia,{onAppearPrepare:$a,onEnterPrepare:$a,removeOnLeave:Ot,forceRender:Tt}),function(zi,ji){var aa=zi.className,$i=zi.style,Ro=_()(ut,Ue,Zr,aa);return g.createElement(kt.a,{target:ki(),key:"popup",ref:Yr,monitorWindowResize:!0,disabled:vo,align:Pt,onAlign:Aa},g.createElement("div",{ref:ji,className:Ro,onMouseEnter:yr,onMouseLeave:Vr,onMouseDownCapture:Pr,onTouchStartCapture:Hr,style:Object(y.a)(Object(y.a)({},$i),Oo)},Oa))})});Or.displayName="PopupInner";var vr=Or,or=g.forwardRef(function(ot,wt){var Rt=ot.prefixCls,ut=ot.visible,Ue=ot.zIndex,et=ot.children,We=ot.mobile;We=We===void 0?{}:We;var ct=We.popupClassName,ft=We.popupStyle,Ot=We.popupMotion,Tt=Ot===void 0?{}:Ot,Pt=We.popupRender,Zt=g.useRef();g.useImperativeHandle(wt,function(){return{forceAlign:function(){},getElement:function(){return Zt.current}}});var dn=Object(y.a)({zIndex:Ue},ft),hn=et;return g.Children.count(et)>1&&(hn=g.createElement("div",{className:"".concat(Rt,"-content")},et)),Pt&&(hn=Pt(hn)),g.createElement(Te,Object(x.a)({visible:ut,ref:Zt,removeOnLeave:!0},Tt),function(Rn,yr){var Vr=Rn.className,Pr=Rn.style,Hr=_()(Rt,ct,Vr);return g.createElement("div",{ref:yr,className:Hr,style:Object(y.a)(Object(y.a)({},Pr),dn)},hn)})});or.displayName="MobilePopupInner";var Sr=or,Ji=["visible","mobile"],Gr=g.forwardRef(function(ot,wt){var Rt=ot.visible,ut=ot.mobile,Ue=Object(T.a)(ot,Ji),et=Object(g.useState)(Rt),We=Object(v.a)(et,2),ct=We[0],ft=We[1],Ot=Object(g.useState)(!1),Tt=Object(v.a)(Ot,2),Pt=Tt[0],Zt=Tt[1],dn=Object(y.a)(Object(y.a)({},Ue),{},{visible:ct});Object(g.useEffect)(function(){ft(Rt),Rt&&ut&&Zt(Ye())},[Rt,ut]);var hn=Pt?g.createElement(Sr,Object(x.a)({},dn,{mobile:ut,ref:wt})):g.createElement(vr,Object(x.a)({},dn,{ref:wt}));return g.createElement("div",null,g.createElement(nt,dn),hn)});Gr.displayName="Popup";var si=Gr,ca=g.createContext(null),Fi=ca;function ra(){}function Ta(){return""}function po(ot){return ot?ot.ownerDocument:window.document}var io=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function wo(ot){var wt=function(Rt){Object(S.a)(Ue,Rt);var ut=Object(A.a)(Ue);function Ue(et){var We;Object(O.a)(this,Ue),We=ut.call(this,et),We.popupRef=g.createRef(),We.triggerRef=g.createRef(),We.attachId=void 0,We.clickOutsideHandler=void 0,We.touchOutsideHandler=void 0,We.contextMenuOutsideHandler1=void 0,We.contextMenuOutsideHandler2=void 0,We.mouseDownTimeout=void 0,We.focusTime=void 0,We.preClickTime=void 0,We.preTouchTime=void 0,We.delayTimer=void 0,We.hasPopupMouseDown=void 0,We.onMouseEnter=function(ft){var Ot=We.props.mouseEnterDelay;We.fireEvents("onMouseEnter",ft),We.delaySetPopupVisible(!0,Ot,Ot?null:ft)},We.onMouseMove=function(ft){We.fireEvents("onMouseMove",ft),We.setPoint(ft)},We.onMouseLeave=function(ft){We.fireEvents("onMouseLeave",ft),We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onPopupMouseEnter=function(){We.clearDelayTimer()},We.onPopupMouseLeave=function(ft){var Ot;if(ft.relatedTarget&&!ft.relatedTarget.setTimeout&&Object(Xe.a)((Ot=We.popupRef.current)===null||Ot===void 0?void 0:Ot.getElement(),ft.relatedTarget))return;We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onFocus=function(ft){We.fireEvents("onFocus",ft),We.clearDelayTimer(),We.isFocusToShow()&&(We.focusTime=Date.now(),We.delaySetPopupVisible(!0,We.props.focusDelay))},We.onMouseDown=function(ft){We.fireEvents("onMouseDown",ft),We.preClickTime=Date.now()},We.onTouchStart=function(ft){We.fireEvents("onTouchStart",ft),We.preTouchTime=Date.now()},We.onBlur=function(ft){We.fireEvents("onBlur",ft),We.clearDelayTimer(),We.isBlurToHide()&&We.delaySetPopupVisible(!1,We.props.blurDelay)},We.onContextMenu=function(ft){ft.preventDefault(),We.fireEvents("onContextMenu",ft),We.setPopupVisible(!0,ft)},We.onContextMenuClose=function(){We.isContextMenuToShow()&&We.close()},We.onClick=function(ft){if(We.fireEvents("onClick",ft),We.focusTime){var Ot;if(We.preClickTime&&We.preTouchTime?Ot=Math.min(We.preClickTime,We.preTouchTime):We.preClickTime?Ot=We.preClickTime:We.preTouchTime&&(Ot=We.preTouchTime),Math.abs(Ot-We.focusTime)<20)return;We.focusTime=0}We.preClickTime=0,We.preTouchTime=0,We.isClickToShow()&&(We.isClickToHide()||We.isBlurToHide())&&ft&&ft.preventDefault&&ft.preventDefault();var Tt=!We.state.popupVisible;(We.isClickToHide()&&!Tt||Tt&&We.isClickToShow())&&We.setPopupVisible(!We.state.popupVisible,ft)},We.onPopupMouseDown=function(){if(We.hasPopupMouseDown=!0,clearTimeout(We.mouseDownTimeout),We.mouseDownTimeout=window.setTimeout(function(){We.hasPopupMouseDown=!1},0),We.context){var ft;(ft=We.context).onPopupMouseDown.apply(ft,arguments)}},We.onDocumentClick=function(ft){if(We.props.mask&&!We.props.maskClosable)return;var Ot=ft.target,Tt=We.getRootDomNode(),Pt=We.getPopupDomNode();(!Object(Xe.a)(Tt,Ot)||We.isContextMenuOnly())&&!Object(Xe.a)(Pt,Ot)&&!We.hasPopupMouseDown&&We.close()},We.getRootDomNode=function(){var ft=We.props.getTriggerDOMNode;if(ft)return ft(We.triggerRef.current);try{var Ot=Object(tt.a)(We.triggerRef.current);if(Ot)return Ot}catch(Tt){}return De.a.findDOMNode(Object(w.a)(We))},We.getPopupClassNameFromAlign=function(ft){var Ot=[],Tt=We.props,Pt=Tt.popupPlacement,Zt=Tt.builtinPlacements,dn=Tt.prefixCls,hn=Tt.alignPoint,Rn=Tt.getPopupClassNameFromAlign;return Pt&&Zt&&Ot.push(Je(Zt,dn,ft,hn)),Rn&&Ot.push(Rn(ft)),Ot.join(" ")},We.getComponent=function(){var ft=We.props,Ot=ft.prefixCls,Tt=ft.destroyPopupOnHide,Pt=ft.popupClassName,Zt=ft.onPopupAlign,dn=ft.popupMotion,hn=ft.popupAnimation,Rn=ft.popupTransitionName,yr=ft.popupStyle,Vr=ft.mask,Pr=ft.maskAnimation,Hr=ft.maskTransitionName,Yr=ft.maskMotion,Wr=ft.zIndex,Xr=ft.popup,ui=ft.stretch,Zr=ft.alignPoint,Qi=ft.mobile,qr=ft.forceRender,dr=We.state,ur=dr.popupVisible,ri=dr.point,fi=We.getPopupAlign(),nr={};return We.isMouseEnterToShow()&&(nr.onMouseEnter=We.onPopupMouseEnter),We.isMouseLeaveToHide()&&(nr.onMouseLeave=We.onPopupMouseLeave),nr.onMouseDown=We.onPopupMouseDown,nr.onTouchStart=We.onPopupMouseDown,g.createElement(si,Object(x.a)({prefixCls:Ot,destroyPopupOnHide:Tt,visible:ur,point:Zr&&ri,className:Pt,align:fi,onAlign:Zt,animation:hn,getClassNameFromAlign:We.getPopupClassNameFromAlign},nr,{stretch:ui,getRootDomNode:We.getRootDomNode,style:yr,mask:Vr,zIndex:Wr,transitionName:Rn,maskAnimation:Pr,maskTransitionName:Hr,maskMotion:Yr,ref:We.popupRef,motion:dn,mobile:Qi,forceRender:qr}),typeof Xr=="function"?Xr():Xr)},We.attachParent=function(ft){_e.a.cancel(We.attachId);var Ot=We.props,Tt=Ot.getPopupContainer,Pt=Ot.getDocument,Zt=We.getRootDomNode(),dn;Tt?(Zt||Tt.length===0)&&(dn=Tt(Zt)):dn=Pt(We.getRootDomNode()).body,dn?dn.appendChild(ft):We.attachId=Object(_e.a)(function(){We.attachParent(ft)})},We.getContainer=function(){var ft=We.props.getDocument,Ot=ft(We.getRootDomNode()).createElement("div");return Ot.style.position="absolute",Ot.style.top="0",Ot.style.left="0",Ot.style.width="100%",We.attachParent(Ot),Ot},We.setPoint=function(ft){var Ot=We.props.alignPoint;if(!Ot||!ft)return;We.setState({point:{pageX:ft.pageX,pageY:ft.pageY}})},We.handlePortalUpdate=function(){We.state.prevPopupVisible!==We.state.popupVisible&&We.props.afterPopupVisibleChange(We.state.popupVisible)},We.triggerContextValue={onPopupMouseDown:We.onPopupMouseDown};var ct;return"popupVisible"in et?ct=!!et.popupVisible:ct=!!et.defaultPopupVisible,We.state={prevPopupVisible:ct,popupVisible:ct},io.forEach(function(ft){We["fire".concat(ft)]=function(Ot){We.fireEvents(ft,Ot)}}),We}return Object(C.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var We=this.props,ct=this.state;if(ct.popupVisible){var ft;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ft=We.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Me.a)(ft,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ft=ft||We.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Me.a)(ft,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ft=ft||We.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Me.a)(ft,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Me.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),_e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var We;return((We=this.popupRef.current)===null||We===void 0?void 0:We.getElement())||null}},{key:"getPopupAlign",value:function(){var We=this.props,ct=We.popupPlacement,ft=We.popupAlign,Ot=We.builtinPlacements;return ct&&Ot?Ve(Ot,ct,ft):ft}},{key:"setPopupVisible",value:function(We,ct){var ft=this.props.alignPoint,Ot=this.state.popupVisible;this.clearDelayTimer(),Ot!==We&&("popupVisible"in this.props||this.setState({popupVisible:We,prevPopupVisible:Ot}),this.props.onPopupVisibleChange(We)),ft&&ct&&We&&this.setPoint(ct)}},{key:"delaySetPopupVisible",value:function(We,ct,ft){var Ot=this,Tt=ct*1e3;if(this.clearDelayTimer(),Tt){var Pt=ft?{pageX:ft.pageX,pageY:ft.pageY}:null;this.delayTimer=window.setTimeout(function(){Ot.setPopupVisible(We,Pt),Ot.clearDelayTimer()},Tt)}else this.setPopupVisible(We,ft)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(We){var ct=this.props.children.props,ft=this.props;return ct[We]&&ft[We]?this["fire".concat(We)]:ct[We]||ft[We]}},{key:"isClickToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("click")!==-1||ft.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var We=this.props.action;return We==="contextMenu"||We.length===1&&We[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("contextMenu")!==-1||ft.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("click")!==-1||ft.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("hover")!==-1||ft.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("hover")!==-1||ft.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var We=this.props,ct=We.action,ft=We.showAction;return ct.indexOf("focus")!==-1||ft.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var We=this.props,ct=We.action,ft=We.hideAction;return ct.indexOf("focus")!==-1||ft.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var We;(We=this.popupRef.current)===null||We===void 0||We.forceAlign()}}},{key:"fireEvents",value:function(We,ct){var ft=this.props.children.props[We];ft&&ft(ct);var Ot=this.props[We];Ot&&Ot(ct)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var We=this.state.popupVisible,ct=this.props,ft=ct.children,Ot=ct.forceRender,Tt=ct.alignPoint,Pt=ct.className,Zt=ct.autoDestroy,dn=g.Children.only(ft),hn={key:"trigger"};this.isContextMenuToShow()?hn.onContextMenu=this.onContextMenu:hn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(hn.onClick=this.onClick,hn.onMouseDown=this.onMouseDown,hn.onTouchStart=this.onTouchStart):(hn.onClick=this.createTwoChains("onClick"),hn.onMouseDown=this.createTwoChains("onMouseDown"),hn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(hn.onMouseEnter=this.onMouseEnter,Tt&&(hn.onMouseMove=this.onMouseMove)):hn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?hn.onMouseLeave=this.onMouseLeave:hn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(hn.onFocus=this.onFocus,hn.onBlur=this.onBlur):(hn.onFocus=this.createTwoChains("onFocus"),hn.onBlur=this.createTwoChains("onBlur"));var Rn=_()(dn&&dn.props&&dn.props.className,Pt);Rn&&(hn.className=Rn);var yr=Object(y.a)({},hn);Object(Ge.c)(dn)&&(yr.ref=Object(Ge.a)(this.triggerRef,dn.ref));var Vr=g.cloneElement(dn,yr),Pr;return(We||this.popupRef.current||Ot)&&(Pr=g.createElement(ot,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!We&&Zt&&(Pr=null),g.createElement(Fi.Provider,{value:this.triggerContextValue},Vr,Pr)}}],[{key:"getDerivedStateFromProps",value:function(We,ct){var ft=We.popupVisible,Ot={};return ft!==void 0&&ct.popupVisible!==ft&&(Ot.popupVisible=ft,Ot.prevPopupVisible=ct.popupVisible),Ot}}]),Ue}(g.Component);return wt.contextType=Fi,wt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ta,getDocument:po,onPopupVisibleChange:ra,afterPopupVisibleChange:ra,onPopupAlign:ra,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},wt}var La=wo(Et.a),Gi={adjustX:1,adjustY:1},Nr={topLeft:{points:["bl","tl"],overflow:Gi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Gi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Gi,offset:[4,0]}},Jr={topLeft:{points:["bl","tl"],overflow:Gi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Gi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Gi,offset:[4,0]}},bi=Nr,Fr=0,Cr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ti=function(wt,Rt,ut){var Ue=ie(Rt),et=wt.getState();wt.setState({defaultActiveFirst:Object(y.a)(Object(y.a)({},et.defaultActiveFirst),{},Object(I.a)({},Ue,ut))})},_r=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onDestroy=function(Tt){Ue.props.onDestroy(Tt)},Ue.onKeyDown=function(Tt){var Pt=Tt.keyCode,Zt=Ue.menuInstance,dn=Ue.props.store,hn=Ue.getVisible();if(Pt===a.a.ENTER)return Ue.onTitleClick(Tt),ti(dn,Ue.props.eventKey,!0),!0;if(Pt===a.a.RIGHT)return hn?Zt.onKeyDown(Tt):(Ue.triggerOpenChange(!0),ti(dn,Ue.props.eventKey,!0)),!0;if(Pt===a.a.LEFT){var Rn;if(hn)Rn=Zt.onKeyDown(Tt);else return;return Rn||(Ue.triggerOpenChange(!1),Rn=!0),Rn}return hn&&(Pt===a.a.UP||Pt===a.a.DOWN)?Zt.onKeyDown(Tt):void 0},Ue.onOpenChange=function(Tt){Ue.props.onOpenChange(Tt)},Ue.onPopupVisibleChange=function(Tt){Ue.triggerOpenChange(Tt,Tt?"mouseenter":"mouseleave")},Ue.onMouseEnter=function(Tt){var Pt=Ue.props,Zt=Pt.eventKey,dn=Pt.onMouseEnter,hn=Pt.store;ti(hn,Ue.props.eventKey,!1),dn({key:Zt,domEvent:Tt})},Ue.onMouseLeave=function(Tt){var Pt=Ue.props,Zt=Pt.parentMenu,dn=Pt.eventKey,hn=Pt.onMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),hn({key:dn,domEvent:Tt})},Ue.onTitleMouseEnter=function(Tt){var Pt=Ue.props,Zt=Pt.eventKey,dn=Pt.onItemHover,hn=Pt.onTitleMouseEnter;dn({key:Zt,hover:!0}),hn({key:Zt,domEvent:Tt})},Ue.onTitleMouseLeave=function(Tt){var Pt=Ue.props,Zt=Pt.parentMenu,dn=Pt.eventKey,hn=Pt.onItemHover,Rn=Pt.onTitleMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),hn({key:dn,hover:!1}),Rn({key:dn,domEvent:Tt})},Ue.onTitleClick=function(Tt){var Pt=Object(w.a)(Ue),Zt=Pt.props;if(Zt.onTitleClick({key:Zt.eventKey,domEvent:Tt}),Zt.triggerSubMenuAction==="hover")return;Ue.triggerOpenChange(!Ue.getVisible(),"click"),ti(Zt.store,Ue.props.eventKey,!1)},Ue.onSubMenuClick=function(Tt){typeof Ue.props.onClick=="function"&&Ue.props.onClick(Ue.addKeyPath(Tt))},Ue.onSelect=function(Tt){Ue.props.onSelect(Tt)},Ue.onDeselect=function(Tt){Ue.props.onDeselect(Tt)},Ue.getPrefixCls=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu")},Ue.getActiveClassName=function(){return"".concat(Ue.getPrefixCls(),"-active")},Ue.getDisabledClassName=function(){return"".concat(Ue.getPrefixCls(),"-disabled")},Ue.getSelectedClassName=function(){return"".concat(Ue.getPrefixCls(),"-selected")},Ue.getOpenClassName=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu-open")},Ue.getVisible=function(){return Ue.state.isOpen},Ue.getMode=function(){return Ue.state.mode},Ue.saveMenuInstance=function(Tt){Ue.menuInstance=Tt},Ue.addKeyPath=function(Tt){return Object(y.a)(Object(y.a)({},Tt),{},{keyPath:(Tt.keyPath||[]).concat(Ue.props.eventKey)})},Ue.triggerOpenChange=function(Tt,Pt){var Zt=Ue.props.eventKey,dn=function(){Ue.onOpenChange({key:Zt,item:Object(w.a)(Ue),trigger:Pt,open:Tt})};Pt==="mouseenter"?Ue.mouseenterTimeout=setTimeout(function(){dn()},0):dn()},Ue.isChildrenSelected=function(){var Tt={find:!1};return Q(Ue.props.children,Ue.props.selectedKeys,Tt),Tt.find},Ue.isInlineMode=function(){return Ue.getMode()==="inline"},Ue.adjustWidth=function(){if(!Ue.subMenuTitle||!Ue.menuInstance)return;var Tt=ge.findDOMNode(Ue.menuInstance);if(Tt.offsetWidth>=Ue.subMenuTitle.offsetWidth)return;Tt.style.minWidth="".concat(Ue.subMenuTitle.offsetWidth,"px")},Ue.saveSubMenuTitle=function(Tt){Ue.subMenuTitle=Tt},Ue.getBaseProps=function(){var Tt=Object(w.a)(Ue),Pt=Tt.props,Zt=Ue.getMode();return{mode:Zt==="horizontal"?"vertical":Zt,visible:Ue.getVisible(),level:Pt.level+1,inlineIndent:Pt.inlineIndent,focusable:!1,onClick:Ue.onSubMenuClick,onSelect:Ue.onSelect,onDeselect:Ue.onDeselect,onDestroy:Ue.onDestroy,selectedKeys:Pt.selectedKeys,eventKey:"".concat(Pt.eventKey,"-menu-"),openKeys:Pt.openKeys,motion:Pt.motion,onOpenChange:Ue.onOpenChange,subMenuOpenDelay:Pt.subMenuOpenDelay,parentMenu:Object(w.a)(Ue),subMenuCloseDelay:Pt.subMenuCloseDelay,forceSubMenuRender:Pt.forceSubMenuRender,triggerSubMenuAction:Pt.triggerSubMenuAction,builtinPlacements:Pt.builtinPlacements,defaultActiveFirst:Pt.store.getState().defaultActiveFirst[ie(Pt.eventKey)],multiple:Pt.multiple,prefixCls:Pt.rootPrefixCls,id:Ue.internalMenuId,manualRef:Ue.saveMenuInstance,itemIcon:Pt.itemIcon,expandIcon:Pt.expandIcon,direction:Pt.direction}},Ue.getMotion=function(Tt,Pt){var Zt=Object(w.a)(Ue),dn=Zt.haveRendered,hn=Ue.props,Rn=hn.motion,yr=hn.rootPrefixCls,Vr=Object(y.a)(Object(y.a)({},Rn),{},{leavedClassName:"".concat(yr,"-hidden"),removeOnLeave:!1,motionAppear:dn||!Pt||Tt!=="inline"});return Vr};var et=ut.store,We=ut.eventKey,ct=et.getState(),ft=ct.defaultActiveFirst;Ue.isRootMenu=!1;var Ot=!1;return ft&&(Ot=ft[We]),ti(et,We,Ot),Ue.state={mode:ut.mode,isOpen:ut.isOpen},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ue=this,et=this.props,We=et.mode,ct=et.parentMenu,ft=et.manualRef,Ot=et.isOpen,Tt=function(){Ue.setState({mode:We,isOpen:Ot})},Pt=Ot!==this.state.isOpen,Zt=We!==this.state.mode;if((Zt||Pt)&&(_e.a.cancel(this.updateStateRaf),Zt?this.updateStateRaf=Object(_e.a)(Tt):Tt()),ft&&ft(this),We!=="horizontal"||!(ct==null?void 0:ct.isRootMenu)||!Ot)return;this.minWidthTimeout=setTimeout(function(){return Ue.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ue=this.props,et=Ue.onDestroy,We=Ue.eventKey;et&&et(We),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),_e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ue,et){var We=this.getBaseProps();return g.createElement(To,Object(x.a)({},We,{id:this.internalMenuId,className:Ue,style:et}),this.props.children)}},{key:"renderChildren",value:function(){var Ue=this,et=this.getBaseProps(),We=et.mode,ct=et.visible,ft=et.forceSubMenuRender,Ot=et.direction,Tt=this.getMotion(We,ct);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct||ft,!this.haveOpened)return g.createElement("div",null);var Pt=_()("".concat(et.prefixCls,"-sub"),Object(I.a)({},"".concat(et.prefixCls,"-rtl"),Ot==="rtl"));return this.isInlineMode()?g.createElement(Te,Object(x.a)({visible:et.visible,forceRender:ft},Tt),function(Zt){var dn=Zt.className,hn=Zt.style,Rn=_()(Pt,dn);return Ue.renderPopupMenu(Rn,hn)}):this.renderPopupMenu(Pt)}},{key:"render",value:function(){var Ue,et,We,ct=Object(y.a)({},this.props),ft=this.getVisible(),Ot=this.getPrefixCls(),Tt=this.isInlineMode(),Pt=this.getMode(),Zt=_()(Ot,"".concat(Ot,"-").concat(Pt),(Ue={},Object(I.a)(Ue,ct.className,!!ct.className),Object(I.a)(Ue,this.getOpenClassName(),ft),Object(I.a)(Ue,this.getActiveClassName(),ct.active||ft&&!Tt),Object(I.a)(Ue,this.getDisabledClassName(),ct.disabled),Object(I.a)(Ue,this.getSelectedClassName(),this.isChildrenSelected()),Ue));this.internalMenuId||(ct.eventKey?this.internalMenuId="".concat(ct.eventKey,"$Menu"):(Fr+=1,this.internalMenuId="$__$".concat(Fr,"$Menu")));var dn={},hn={},Rn={};ct.disabled||(dn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},hn={onClick:this.onTitleClick},Rn={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var yr={},Vr=ct.direction,Pr=Vr==="rtl";Tt&&(Pr?yr.paddingRight=ct.inlineIndent*ct.level:yr.paddingLeft=ct.inlineIndent*ct.level);var Hr={};this.getVisible()&&(Hr={"aria-owns":this.internalMenuId});var Yr=null;Pt!=="horizontal"&&(Yr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Yr=g.createElement(this.props.expandIcon,Object(y.a)({},this.props))));var Wr=g.createElement("div",Object(x.a)({ref:this.saveSubMenuTitle,style:yr,className:"".concat(Ot,"-title"),role:"button"},Rn,hn,{"aria-expanded":ft},Hr,{"aria-haspopup":"true",title:typeof ct.title=="string"?ct.title:void 0}),ct.title,Yr||g.createElement("i",{className:"".concat(Ot,"-arrow")})),Xr=this.renderChildren(),ui=((et=ct.parentMenu)===null||et===void 0?void 0:et.isRootMenu)?ct.parentMenu.props.getPopupContainer:function(ki){return ki.parentNode},Zr=Cr[Pt],Qi=ct.popupOffset?{offset:ct.popupOffset}:{},qr=_()((We={},Object(I.a)(We,ct.popupClassName,ct.popupClassName&&!Tt),Object(I.a)(We,"".concat(Ot,"-rtl"),Pr),We)),dr=ct.disabled,ur=ct.triggerSubMenuAction,ri=ct.subMenuOpenDelay,fi=ct.forceSubMenuRender,nr=ct.subMenuCloseDelay,vi=ct.builtinPlacements;Y.forEach(function(ki){return delete ct[ki]}),delete ct.onClick;var qi=Pr?Object(y.a)(Object(y.a)({},Jr),vi):Object(y.a)(Object(y.a)({},Nr),vi);delete ct.direction;var wi=this.getBaseProps(),Ai=Tt?null:this.getMotion(wi.mode,wi.visible);return g.createElement("li",Object(x.a)({},ct,dn,{className:Zt,role:"menuitem"}),g.createElement(La,{prefixCls:Ot,popupClassName:_()("".concat(Ot,"-popup"),qr),getPopupContainer:ui,builtinPlacements:qi,popupPlacement:Zr,popupVisible:Tt?!1:ft,popupAlign:Qi,popup:Tt?null:Xr,action:dr||Tt?[]:[ur],mouseEnterDelay:ri,mouseLeaveDelay:nr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fi,popupMotion:Ai},Wr),Tt?Xr:null)}}]),Rt}(g.Component);_r.defaultProps={onMouseEnter:fe,onMouseLeave:fe,onTitleMouseEnter:fe,onTitleMouseLeave:fe,onTitleClick:fe,manualRef:fe,mode:"vertical",title:""};var li=Object(D.b)(function(ot,wt){var Rt=ot.openKeys,ut=ot.activeKey,Ue=ot.selectedKeys,et=wt.eventKey,We=wt.subMenuKey;return{isOpen:Rt.indexOf(et)>-1,active:ut[We]===et,selectedKeys:Ue}})(_r);li.isSubMenu=!0;var sr=li,Hi="menuitem-overflowed",Pi=.5,Zi=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.resizeObserver=null,ut.mutationObserver=null,ut.originalTotalWidth=0,ut.overflowedItems=[],ut.menuItemSizes=[],ut.cancelFrameId=null,ut.state={lastVisibleIndex:void 0},ut.childRef=g.createRef(),ut.getMenuItemNodes=function(){var Ue=ut.props.prefixCls,et=ut.childRef.current;return et?[].slice.call(et.children).filter(function(We){return We.className.split(" ").indexOf("".concat(Ue,"-overflowed-submenu"))<0}):[]},ut.getOverflowedSubMenuItem=function(Ue,et,We){var ct=ut.props,ft=ct.overflowedIndicator,Ot=ct.level,Tt=ct.mode,Pt=ct.prefixCls,Zt=ct.theme;if(Ot!==1||Tt!=="horizontal")return null;var dn=ut.props.children[0],hn=dn.props,Rn=hn.children,yr=hn.title,Vr=hn.style,Pr=Object(T.a)(hn,["children","title","style"]),Hr=Object(y.a)({},Vr),Yr="".concat(Ue,"-overflowed-indicator"),Wr="".concat(Ue,"-overflowed-indicator");et.length===0&&We!==!0?Hr=Object(y.a)(Object(y.a)({},Hr),{},{display:"none"}):We&&(Hr=Object(y.a)(Object(y.a)({},Hr),{},{visibility:"hidden",position:"absolute"}),Yr="".concat(Yr,"-placeholder"),Wr="".concat(Wr,"-placeholder"));var Xr=Zt?"".concat(Pt,"-").concat(Zt):"",ui={};return Y.forEach(function(Zr){Pr[Zr]!==void 0&&(ui[Zr]=Pr[Zr])}),g.createElement(sr,Object(x.a)({title:ft,className:"".concat(Pt,"-overflowed-submenu"),popupClassName:Xr},ui,{key:Yr,eventKey:Wr,disabled:!1,style:Hr}),et)},ut.setChildrenWidthAndResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=Ue.children;if(!et||et.length===0)return;var We=Ue.children[et.length-1];le(We,"display","inline-block");var ct=ut.getMenuItemNodes(),ft=ct.filter(function(Ot){return Ot.className.split(" ").indexOf(Hi)>=0});ft.forEach(function(Ot){le(Ot,"display","inline-block")}),ut.menuItemSizes=ct.map(function(Ot){return oe(Ot,!0)}),ft.forEach(function(Ot){le(Ot,"display","none")}),ut.overflowedIndicatorWidth=oe(Ue.children[Ue.children.length-1],!0),ut.originalTotalWidth=ut.menuItemSizes.reduce(function(Ot,Tt){return Ot+Tt},0),ut.handleResize(),le(We,"display","none")},ut.handleResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=oe(Ue);ut.overflowedItems=[];var We=0,ct;ut.originalTotalWidth>et+Pi&&(ct=-1,ut.menuItemSizes.forEach(function(ft){We+=ft,We+ut.overflowedIndicatorWidth<=et&&(ct+=1)})),ut.setState({lastVisibleIndex:ct})},ut}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){var Ue=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var et=this.childRef.current;if(!et)return;this.resizeObserver=new Le.default(function(We){We.forEach(function(){var ct=Ue.cancelFrameId;cancelAnimationFrame(ct),Ue.cancelFrameId=requestAnimationFrame(Ue.setChildrenWidthAndResize)})}),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ue.resizeObserver.disconnect(),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),Ue.setChildrenWidthAndResize()}),this.mutationObserver.observe(et,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ue){var et=this,We=this.state.lastVisibleIndex;return(Ue||[]).reduce(function(ct,ft,Ot){var Tt=ft;if(et.props.mode==="horizontal"){var Pt=et.getOverflowedSubMenuItem(ft.props.eventKey,[]);We!==void 0&&et.props.className.indexOf("".concat(et.props.prefixCls,"-root"))!==-1&&(Ot>We&&(Tt=g.cloneElement(ft,{style:{display:"none"},eventKey:"".concat(ft.props.eventKey,"-hidden"),className:"".concat(Hi)})),Ot===We+1&&(et.overflowedItems=Ue.slice(We+1).map(function(dn){return g.cloneElement(dn,{key:dn.props.eventKey,mode:"vertical-left"})}),Pt=et.getOverflowedSubMenuItem(ft.props.eventKey,et.overflowedItems)));var Zt=[].concat(Object(o.a)(ct),[Pt,Tt]);return Ot===Ue.length-1&&Zt.push(et.getOverflowedSubMenuItem(ft.props.eventKey,[],!0)),Zt}return[].concat(Object(o.a)(ct),[Tt])},[])}},{key:"render",value:function(){var Ue=this.props,et=Ue.visible,We=Ue.prefixCls,ct=Ue.overflowedIndicator,ft=Ue.mode,Ot=Ue.level,Tt=Ue.tag,Pt=Ue.children,Zt=Ue.theme,dn=Object(T.a)(Ue,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),hn=Tt;return g.createElement(hn,Object(x.a)({ref:this.childRef},dn),this.renderChildren(Pt))}}]),Rt}(g.Component);Zi.defaultProps={tag:"div",className:""};var mo=Zi;function Vi(ot){return ot.length?ot.every(function(wt){return!!wt.props.disabled}):!0}function Wa(ot,wt,Rt){var ut=ot.getState();ot.setState({activeKey:Object(y.a)(Object(y.a)({},ut.activeKey),{},Object(I.a)({},wt,Rt))})}function Ma(ot){return ot.eventKey||"0-menu-"}function ni(ot,wt){var Rt=wt,ut=ot.children,Ue=ot.eventKey;if(Rt){var et;if(q(ut,function(We,ct){We&&We.props&&!We.props.disabled&&Rt===Fe(We,Ue,ct)&&(et=!0)}),et)return Rt}return Rt=null,ot.defaultActiveFirst&&q(ut,function(We,ct){!Rt&&We&&!We.props.disabled&&(Rt=Fe(We,Ue,ct))}),Rt}function Ho(ot){if(!ot)return;var wt=this.instanceArray.indexOf(ot);wt!==-1?this.instanceArray[wt]=ot:this.instanceArray.push(ot)}var Xa=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;return Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onKeyDown=function(et,We){var ct=et.keyCode,ft;if(Ue.getFlatInstanceArray().forEach(function(Tt){Tt&&Tt.props.active&&Tt.onKeyDown&&(ft=Tt.onKeyDown(et))}),ft)return 1;var Ot=null;return(ct===a.a.UP||ct===a.a.DOWN)&&(Ot=Ue.step(ct===a.a.UP?-1:1)),Ot?(et.preventDefault(),Wa(Ue.props.store,Ma(Ue.props),Ot.props.eventKey),typeof We=="function"&&We(Ot),1):void 0},Ue.onItemHover=function(et){var We=et.key,ct=et.hover;Wa(Ue.props.store,Ma(Ue.props),ct?We:null)},Ue.onDeselect=function(et){Ue.props.onDeselect(et)},Ue.onSelect=function(et){Ue.props.onSelect(et)},Ue.onClick=function(et){Ue.props.onClick(et)},Ue.onOpenChange=function(et){Ue.props.onOpenChange(et)},Ue.onDestroy=function(et){Ue.props.onDestroy(et)},Ue.getFlatInstanceArray=function(){return Ue.instanceArray},Ue.step=function(et){var We=Ue.getFlatInstanceArray(),ct=Ue.props.store.getState().activeKey[Ma(Ue.props)],ft=We.length;if(!ft)return null;et<0&&(We=We.concat().reverse());var Ot=-1;if(We.every(function(dn,hn){return dn&&dn.props.eventKey===ct?(Ot=hn,!1):!0}),!Ue.props.defaultActiveFirst&&Ot!==-1&&Vi(We.slice(Ot,ft-1)))return;var Tt=(Ot+1)%ft,Pt=Tt;do{var Zt=We[Pt];if(!Zt||Zt.props.disabled)Pt=(Pt+1)%ft;else return Zt}while(Pt!==Tt);return null},Ue.renderCommonMenuItem=function(et,We,ct){var ft=Ue.props.store.getState(),Ot=Object(w.a)(Ue),Tt=Ot.props,Pt=Fe(et,Tt.eventKey,We),Zt=et.props;if(!Zt||typeof et.type=="string")return et;var dn=Pt===ft.activeKey,hn=Object(y.a)(Object(y.a)({mode:Zt.mode||Tt.mode,level:Tt.level,inlineIndent:Tt.inlineIndent,renderMenuItem:Ue.renderMenuItem,rootPrefixCls:Tt.prefixCls,index:We,parentMenu:Tt.parentMenu,manualRef:Zt.disabled?void 0:Object(N.a)(et.ref,Ho.bind(Object(w.a)(Ue))),eventKey:Pt,active:!Zt.disabled&&dn,multiple:Tt.multiple,onClick:function(yr){(Zt.onClick||fe)(yr),Ue.onClick(yr)},onItemHover:Ue.onItemHover,motion:Tt.motion,subMenuOpenDelay:Tt.subMenuOpenDelay,subMenuCloseDelay:Tt.subMenuCloseDelay,forceSubMenuRender:Tt.forceSubMenuRender,onOpenChange:Ue.onOpenChange,onDeselect:Ue.onDeselect,onSelect:Ue.onSelect,builtinPlacements:Tt.builtinPlacements,itemIcon:Zt.itemIcon||Ue.props.itemIcon,expandIcon:Zt.expandIcon||Ue.props.expandIcon},ct),{},{direction:Tt.direction});return(Tt.mode==="inline"||Ee())&&(hn.triggerSubMenuAction="click"),g.cloneElement(et,Object(y.a)(Object(y.a)({},hn),{},{key:Pt||We}))},Ue.renderMenuItem=function(et,We,ct){if(!et)return null;var ft=Ue.props.store.getState(),Ot={openKeys:ft.openKeys,selectedKeys:ft.selectedKeys,triggerSubMenuAction:Ue.props.triggerSubMenuAction,subMenuKey:ct};return Ue.renderCommonMenuItem(et,We,Ot)},ut.store.setState({activeKey:Object(y.a)(Object(y.a)({},ut.store.getState().activeKey),{},Object(I.a)({},ut.eventKey,ni(ut,ut.activeKey)))}),Ue.instanceArray=[],Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ue){return this.props.visible||Ue.visible||this.props.className!==Ue.className||!z()(this.props.style,Ue.style)}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We="activeKey"in et?et.activeKey:et.store.getState().activeKey[Ma(et)],ct=ni(et,We);if(ct!==We)Wa(et.store,Ma(et),ct);else if("activeKey"in Ue){var ft=ni(Ue,Ue.activeKey);ct!==ft&&Wa(et.store,Ma(et),ct)}}},{key:"render",value:function(){var Ue=this,et=Object(x.a)({},this.props);this.instanceArray=[];var We=_()(et.prefixCls,et.className,"".concat(et.prefixCls,"-").concat(et.mode)),ct={className:We,role:et.role||"menu"};et.id&&(ct.id=et.id),et.focusable&&(ct.tabIndex=0,ct.onKeyDown=this.onKeyDown);var ft=et.prefixCls,Ot=et.eventKey,Tt=et.visible,Pt=et.level,Zt=et.mode,dn=et.overflowedIndicator,hn=et.theme;return Y.forEach(function(Rn){return delete et[Rn]}),delete et.onClick,g.createElement(mo,Object(x.a)({},et,{prefixCls:ft,mode:Zt,tag:"ul",level:Pt,theme:hn,visible:Tt,overflowedIndicator:dn},ct),Object(p.a)(et.children).map(function(Rn,yr){return Ue.renderMenuItem(Rn,yr,Ot||"0-menu-")}))}}]),Rt}(g.Component);Xa.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:fe};var go=Object(D.b)()(Xa),To=go,za=b("Kwbf");function Wo(ot,wt,Rt){var ut=ot.prefixCls,Ue=ot.motion,et=ot.defaultMotions,We=et===void 0?{}:et,ct=ot.openAnimation,ft=ot.openTransitionName,Ot=wt.switchingModeFromInline;if(Ue)return Ue;if(Object(X.a)(ct)==="object"&&ct)Object(za.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ct=="string")return{motionName:"".concat(ut,"-open-").concat(ct)};if(ft)return{motionName:ft};var Tt=We[Rt];return Tt||(Ot?null:We.other)}var Jn=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onSelect=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props;if(Ot.selectable){var Tt=Ue.store.getState(),Pt=Tt.selectedKeys,Zt=ct.key;Ot.multiple?Pt=Pt.concat([Zt]):Pt=[Zt],"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Pt}),Ot.onSelect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Pt}))}},Ue.onClick=function(ct){var ft=Ue.getRealMenuMode(),Ot=Object(w.a)(Ue),Tt=Ot.store,Pt=Ot.props.onOpenChange;ft!=="inline"&&!("openKeys"in Ue.props)&&(Tt.setState({openKeys:[]}),Pt([])),Ue.props.onClick(ct)},Ue.onKeyDown=function(ct,ft){Ue.innerMenu.getWrappedInstance().onKeyDown(ct,ft)},Ue.onOpenChange=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props,Tt=Ue.store.getState().openKeys.concat(),Pt=!1,Zt=function(hn){var Rn=!1;if(hn.open)Rn=Tt.indexOf(hn.key)===-1,Rn&&Tt.push(hn.key);else{var yr=Tt.indexOf(hn.key);Rn=yr!==-1,Rn&&Tt.splice(yr,1)}Pt=Pt||Rn};Array.isArray(ct)?ct.forEach(Zt):Zt(ct),Pt&&("openKeys"in Ue.props||Ue.store.setState({openKeys:Tt}),Ot.onOpenChange(Tt))},Ue.onDeselect=function(ct){var ft=Object(w.a)(Ue),Ot=ft.props;if(Ot.selectable){var Tt=Ue.store.getState().selectedKeys.concat(),Pt=ct.key,Zt=Tt.indexOf(Pt);Zt!==-1&&Tt.splice(Zt,1),"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Tt}),Ot.onDeselect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Tt}))}},Ue.onMouseEnter=function(ct){Ue.restoreModeVerticalFromInline();var ft=Ue.props.onMouseEnter;ft&&ft(ct)},Ue.onTransitionEnd=function(ct){var ft=ct.propertyName==="width"&&ct.target===ct.currentTarget,Ot=ct.target.className,Tt=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,Pt=ct.propertyName==="font-size"&&Tt.indexOf("anticon")>=0;(ft||Pt)&&Ue.restoreModeVerticalFromInline()},Ue.setInnerMenu=function(ct){Ue.innerMenu=ct},Ue.isRootMenu=!0;var et=ut.defaultSelectedKeys,We=ut.defaultOpenKeys;return"selectedKeys"in ut&&(et=ut.selectedKeys||[]),"openKeys"in ut&&(We=ut.openKeys||[]),Ue.store=Object(D.c)({selectedKeys:et,openKeys:We,activeKey:{"0-menu-":ni(ut,ut.activeKey)}}),Ue.state={switchingModeFromInline:!1,prevProps:ut,inlineOpenKeys:[],store:Ue.store},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We=et.siderCollapsed,ct=et.inlineCollapsed,ft=et.onOpenChange;(!Ue.inlineCollapsed&&ct||!Ue.siderCollapsed&&We)&&ft([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ue=this.props.collapsedWidth,et=this.store,We=this.prevOpenKeys,ct=this.getInlineCollapsed()&&(Ue===0||Ue==="0"||Ue==="0px");ct?(this.prevOpenKeys=et.getState().openKeys.concat(),this.store.setState({openKeys:[]})):We&&(this.store.setState({openKeys:We}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ue=this.props.mode,et=this.state.switchingModeFromInline,We=this.getInlineCollapsed();return et&&We?"inline":We?"vertical":Ue}},{key:"getInlineCollapsed",value:function(){var Ue=this.props,et=Ue.inlineCollapsed,We=Ue.siderCollapsed;return We!==void 0?We:et}},{key:"restoreModeVerticalFromInline",value:function(){var Ue=this.state.switchingModeFromInline;Ue&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Ue=Object(y.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),et=this.getRealMenuMode();return Ue.className+=" ".concat(Ue.prefixCls,"-root"),Ue.direction==="rtl"&&(Ue.className+=" ".concat(Ue.prefixCls,"-rtl")),Ue=Object(y.a)(Object(y.a)({},Ue),{},{mode:et,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Wo(this.props,this.state,et)}),delete Ue.openAnimation,delete Ue.openTransitionName,g.createElement(D.a,{store:this.store},g.createElement(To,Object(x.a)({},Ue,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ue,et){var We=et.prevProps,ct=et.store,ft=ct.getState(),Ot={},Tt={prevProps:Ue};return We.mode==="inline"&&Ue.mode!=="inline"&&(Tt.switchingModeFromInline=!0),"openKeys"in Ue?Ot.openKeys=Ue.openKeys||[]:((Ue.inlineCollapsed&&!We.inlineCollapsed||Ue.siderCollapsed&&!We.siderCollapsed)&&(Tt.switchingModeFromInline=!0,Tt.inlineOpenKeys=ft.openKeys,Ot.openKeys=[]),(!Ue.inlineCollapsed&&We.inlineCollapsed||!Ue.siderCollapsed&&We.siderCollapsed)&&(Ot.openKeys=et.inlineOpenKeys,Tt.inlineOpenKeys=[])),Object.keys(Ot).length&&ct.setState(Ot),Tt}}]),Rt}(g.Component);Jn.defaultProps={selectable:!0,onClick:fe,onSelect:fe,onOpenChange:fe,onDeselect:fe,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:g.createElement("span",null,"\xB7\xB7\xB7")};var gr=Jn,Zn=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.onKeyDown=function(Ue){var et=Ue.keyCode;return et===a.a.ENTER?(ut.onClick(Ue),!0):void 0},ut.onMouseLeave=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ft=et.onMouseLeave;ct({key:We,hover:!1}),ft({key:We,domEvent:Ue})},ut.onMouseEnter=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ft=et.onMouseEnter;ct({key:We,hover:!0}),ft({key:We,domEvent:Ue})},ut.onClick=function(Ue){var et=ut.props,We=et.eventKey,ct=et.multiple,ft=et.onClick,Ot=et.onSelect,Tt=et.onDeselect,Pt=et.isSelected,Zt={key:We,keyPath:[We],item:Object(w.a)(ut),domEvent:Ue};ft(Zt),ct?Pt?Tt(Zt):Ot(Zt):Pt||Ot(Zt)},ut.saveNode=function(Ue){ut.node=Ue},ut}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ue=this.props;Ue.onDestroy&&Ue.onDestroy(Ue.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Ue,et=Object(y.a)({},this.props),We=_()(this.getPrefixCls(),et.className,(Ue={},Object(I.a)(Ue,this.getActiveClassName(),!et.disabled&&et.active),Object(I.a)(Ue,this.getSelectedClassName(),et.isSelected),Object(I.a)(Ue,this.getDisabledClassName(),et.disabled),Ue)),ct=Object(y.a)(Object(y.a)({},et.attribute),{},{title:typeof et.title=="string"?et.title:void 0,className:We,role:et.role||"menuitem","aria-disabled":et.disabled});et.role==="option"?ct=Object(y.a)(Object(y.a)({},ct),{},{role:"option","aria-selected":et.isSelected}):(et.role===null||et.role==="none")&&(ct.role="none");var ft={onClick:et.disabled?null:this.onClick,onMouseLeave:et.disabled?null:this.onMouseLeave,onMouseEnter:et.disabled?null:this.onMouseEnter},Ot=Object(y.a)({},et.style);et.mode==="inline"&&(et.direction==="rtl"?Ot.paddingRight=et.inlineIndent*et.level:Ot.paddingLeft=et.inlineIndent*et.level),Y.forEach(function(Pt){return delete et[Pt]}),delete et.direction;var Tt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Tt=g.createElement(this.props.itemIcon,this.props)),g.createElement("li",Object(x.a)({},Object(M.a)(et,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ct,ft,{style:Ot,ref:this.saveNode}),et.children,Tt)}}]),Rt}(g.Component);Zn.isMenuItem=!0,Zn.defaultProps={onSelect:fe,onMouseEnter:fe,onMouseLeave:fe,manualRef:fe};var Mr=Object(D.b)(function(ot,wt){var Rt=ot.activeKey,ut=ot.selectedKeys,Ue=wt.eventKey,et=wt.subMenuKey;return{active:Rt[et]===Ue,isSelected:Array.isArray(ut)?ut.indexOf(Ue)!==-1:ut===Ue}})(Zn),Kr=Mr,gi=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.renderInnerMenuItem=function(Ue){var et=ut.props,We=et.renderMenuItem,ct=et.index;return We(Ue,ct,ut.props.subMenuKey)},ut}return Object(C.a)(Rt,[{key:"render",value:function(){var Ue=Object(x.a)({},this.props),et=Ue.className,We=et===void 0?"":et,ct=Ue.rootPrefixCls,ft="".concat(ct,"-item-group-title"),Ot="".concat(ct,"-item-group-list"),Tt=Ue.title,Pt=Ue.children;return Y.forEach(function(Zt){return delete Ue[Zt]}),delete Ue.direction,g.createElement("li",Object(x.a)({},Ue,{onClick:function(dn){return dn.stopPropagation()},className:"".concat(We," ").concat(ct,"-item-group")}),g.createElement("div",{className:ft,title:typeof Tt=="string"?Tt:void 0},Tt),g.createElement("ul",{className:Ot},g.Children.map(Pt,this.renderInnerMenuItem)))}}]),Rt}(g.Component);gi.isMenuItemGroup=!0,gi.defaultProps={disabled:!0};var cr=gi,Wi=function(wt){var Rt=wt.className,ut=wt.rootPrefixCls,Ue=wt.style;return g.createElement("li",{className:"".concat(Rt," ").concat(ut,"-item-divider"),style:Ue})};Wi.defaultProps={disabled:!0,className:"",style:{}};var ma=Wi,Br=gr,qa=b("eDIo");function ci(ot,wt){var Rt=ot.prefixCls,ut=ot.editable,Ue=ot.locale,et=ot.style;return!ut||ut.showAdd===!1?null:g.createElement("button",{ref:wt,type:"button",className:"".concat(Rt,"-nav-add"),style:et,"aria-label":(Ue==null?void 0:Ue.addAriaLabel)||"Add tab",onClick:function(ct){ut.onEdit("add",{event:ct})}},ut.addIcon||"+")}var Oi=g.forwardRef(ci);function ga(ot,wt){var Rt=ot.prefixCls,ut=ot.id,Ue=ot.tabs,et=ot.locale,We=ot.mobile,ct=ot.moreIcon,ft=ct===void 0?"More":ct,Ot=ot.moreTransitionName,Tt=ot.style,Pt=ot.className,Zt=ot.editable,dn=ot.tabBarGutter,hn=ot.rtl,Rn=ot.onTabClick,yr=Object(g.useState)(!1),Vr=Object(v.a)(yr,2),Pr=Vr[0],Hr=Vr[1],Yr=Object(g.useState)(null),Wr=Object(v.a)(Yr,2),Xr=Wr[0],ui=Wr[1],Zr="".concat(ut,"-more-popup"),Qi="".concat(Rt,"-dropdown"),qr=Xr!==null?"".concat(Zr,"-").concat(Xr):null,dr=et==null?void 0:et.dropdownAriaLabel,ur=g.createElement(Br,{onClick:function(Ai){var ki=Ai.key,da=Ai.domEvent;Rn(ki,da),Hr(!1)},id:Zr,tabIndex:-1,role:"listbox","aria-activedescendant":qr,selectedKeys:[Xr],"aria-label":dr!==void 0?dr:"expanded dropdown"},Ue.map(function(wi){return g.createElement(Kr,{key:wi.key,id:"".concat(Zr,"-").concat(wi.key),role:"option","aria-controls":ut&&"".concat(ut,"-panel-").concat(wi.key),disabled:wi.disabled},wi.tab)}));function ri(wi){for(var Ai=Ue.filter(function($a){return!$a.disabled}),ki=Ai.findIndex(function($a){return $a.key===Xr})||0,da=Ai.length,Aa=0;Aavi?(fi=ur,Zr.current="x"):(fi=ri,Zr.current="y");var qi=Date.now();qi-Xr.current>100&&(ui.current=!1),(wt(-fi,-fi)||ui.current)&&(dr.preventDefault(),ui.current=!0),Xr.current=qi}var qr=Object(g.useRef)(null);qr.current={onTouchStart:Hr,onTouchMove:Yr,onTouchEnd:Wr,onWheel:Qi},g.useEffect(function(){function dr(nr){qr.current.onTouchStart(nr)}function ur(nr){qr.current.onTouchMove(nr)}function ri(nr){qr.current.onTouchEnd(nr)}function fi(nr){qr.current.onWheel(nr)}return document.addEventListener("touchmove",ur,{passive:!1}),document.addEventListener("touchend",ri,{passive:!1}),ot.current.addEventListener("touchstart",dr,{passive:!1}),ot.current.addEventListener("wheel",fi),function(){document.removeEventListener("touchmove",ur),document.removeEventListener("touchend",ri)}},[])}function Rr(){var ot=Object(g.useRef)(new Map);function wt(ut){return ot.current.has(ut)||ot.current.set(ut,g.createRef()),ot.current.get(ut)}function Rt(ut){ot.current.delete(ut)}return[wt,Rt]}function hi(ot,wt){var Rt=g.useRef(ot),ut=g.useState({}),Ue=Object(v.a)(ut,2),et=Ue[1];function We(ct){var ft=typeof ct=="function"?ct(Rt.current):ct;ft!==Rt.current&&wt(ft,Rt.current),Rt.current=ft,et({})}return[Rt.current,We]}var Ei=function(wt){var Rt=wt.position,ut=wt.prefixCls,Ue=wt.extra;if(!Ue)return null;var et,We=Ue;return Rt==="right"&&(et=We.right||!We.left&&We||null),Rt==="left"&&(et=We.left||null),et?g.createElement("div",{className:"".concat(ut,"-extra-content")},et):null};function Yi(ot,wt){var Rt,ut=g.useContext(Xo),Ue=ut.prefixCls,et=ut.tabs,We=ot.className,ct=ot.style,ft=ot.id,Ot=ot.animated,Tt=ot.activeKey,Pt=ot.rtl,Zt=ot.extra,dn=ot.editable,hn=ot.locale,Rn=ot.tabPosition,yr=ot.tabBarGutter,Vr=ot.children,Pr=ot.onTabClick,Hr=ot.onTabScroll,Yr=Object(g.useRef)(),Wr=Object(g.useRef)(),Xr=Object(g.useRef)(),ui=Object(g.useRef)(),Zr=Rr(),Qi=Object(v.a)(Zr,2),qr=Qi[0],dr=Qi[1],ur=Rn==="top"||Rn==="bottom",ri=hi(0,function(we,qe){ur&&Hr&&Hr({direction:we>qe?"left":"right"})}),fi=Object(v.a)(ri,2),nr=fi[0],vi=fi[1],qi=hi(0,function(we,qe){!ur&&Hr&&Hr({direction:we>qe?"top":"bottom"})}),wi=Object(v.a)(qi,2),Ai=wi[0],ki=wi[1],da=Object(g.useState)(0),Aa=Object(v.a)(da,2),ia=Aa[0],$a=Aa[1],Oo=Object(g.useState)(0),vo=Object(v.a)(Oo,2),Oa=vo[0],zi=vo[1],ji=Object(g.useState)(0),aa=Object(v.a)(ji,2),$i=aa[0],Ro=aa[1],Qo=Object(g.useState)(0),Jo=Object(v.a)(Qo,2),Li=Jo[0],Go=Jo[1],Zo=Object(g.useState)(null),Ui=Object(v.a)(Zo,2),Ri=Ui[0],Ra=Ui[1],Ms=Object(g.useState)(null),rl=Object(v.a)(Ms,2),qo=rl[0],ss=rl[1],Ps=Object(g.useState)(0),El=Object(v.a)(Ps,2),Ns=El[0],xl=El[1],Ul=Object(g.useState)(0),wl=Object(v.a)(Ul,2),il=wl[0],al=wl[1],ys=t(new Map),ls=Object(v.a)(ys,2),Fl=ls[0],Os=ls[1],Rs=h(et,Fl,ia),us="".concat(Ue,"-nav-operations-hidden"),bs=0,Do=0;ur?Pt?(bs=0,Do=Math.max(0,ia-Ri)):(bs=Math.min(0,Ri-ia),Do=0):(bs=Math.min(0,qo-Oa),Do=0);function cs(we){return weDo?[Do,!1]:[we,!0]}var $o=Object(g.useRef)(),ds=Object(g.useState)(),Es=Object(v.a)(ds,2),Us=Es[0],Sl=Es[1];function Fs(){Sl(Date.now())}function ol(){window.clearTimeout($o.current)}rr(Yr,function(we,qe){var it=!1;function At(Mt,vt){Mt(function(at){var Lt=cs(at+vt),Ct=Object(v.a)(Lt,2),_t=Ct[0],yt=Ct[1];return it=yt,_t})}if(ur){if(Ri>=ia)return it;At(vi,we)}else{if(qo>=Oa)return it;At(ki,qe)}return ol(),Fs(),it}),Object(g.useEffect)(function(){return ol(),Us&&($o.current=window.setTimeout(function(){Sl(0)},100)),ol},[Us]);function es(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tt,qe=Rs.get(we);if(!qe)return;if(ur){var it=nr;Pt?qe.rightnr+Ri&&(it=qe.right+qe.width-Ri):qe.left<-nr?it=-qe.left:qe.left+qe.width>-nr+Ri&&(it=-(qe.left+qe.width-Ri)),ki(0),vi(cs(it)[0])}else{var At=Ai;qe.top<-Ai?At=-qe.top:qe.top+qe.height>-Ai+qo&&(At=-(qe.top+qe.height-qo)),vi(0),ki(cs(At)[0])}}var hs=E(Rs,{width:Ri,height:qo,left:nr,top:Ai},{width:$i,height:Li},{width:Ns,height:il},Object(y.a)(Object(y.a)({},ot),{},{tabs:et})),Cl=Object(v.a)(hs,2),jl=Cl[0],sl=Cl[1],ll=et.map(function(we){var qe=we.key;return g.createElement(d,{id:ft,prefixCls:Ue,key:qe,rtl:Pt,tab:we,closable:we.closable,editable:dn,active:qe===Tt,tabPosition:Rn,tabBarGutter:yr,renderWrapper:Vr,removeAriaLabel:hn==null?void 0:hn.removeAriaLabel,ref:qr(qe),onClick:function(At){Pr(qe,At)},onRemove:function(){dr(qe)},onFocus:function(){es(qe),Fs(),Pt||(Yr.current.scrollLeft=0),Yr.current.scrollTop=0}})}),ul=i(function(){var we,qe,it,At,Mt,vt,at,Lt,Ct,_t=((we=Yr.current)===null||we===void 0?void 0:we.offsetWidth)||0,yt=((qe=Yr.current)===null||qe===void 0?void 0:qe.offsetHeight)||0,Jt=((it=ui.current)===null||it===void 0?void 0:it.offsetWidth)||0,Ft=((At=ui.current)===null||At===void 0?void 0:At.offsetHeight)||0,Dt=((Mt=Xr.current)===null||Mt===void 0?void 0:Mt.offsetWidth)||0,Gt=((vt=Xr.current)===null||vt===void 0?void 0:vt.offsetHeight)||0;Ra(_t),ss(yt),xl(Jt),al(Ft);var qt=(((at=Wr.current)===null||at===void 0?void 0:at.offsetWidth)||0)-Jt,un=(((Lt=Wr.current)===null||Lt===void 0?void 0:Lt.offsetHeight)||0)-Ft;$a(qt),zi(un);var ln=(Ct=Xr.current)===null||Ct===void 0?void 0:Ct.className.includes(us);Ro(qt-(ln?0:Dt)),Go(un-(ln?0:Gt)),Os(function(){var Sn=new Map;return et.forEach(function(zn){var vn=zn.key,mn=qr(vn).current;mn&&Sn.set(vn,{width:mn.offsetWidth,height:mn.offsetHeight,left:mn.offsetLeft,top:mn.offsetTop})}),Sn})}),Bl=et.slice(0,jl),ao=et.slice(sl+1),oa=[].concat(Object(o.a)(Bl),Object(o.a)(ao)),Ga=Object(g.useState)(),va=Object(v.a)(Ga,2),Ds=va[0],Kl=va[1],Io=Rs.get(Tt),Hl=Object(g.useRef)();function Tl(){l.a.cancel(Hl.current)}Object(g.useEffect)(function(){var we={};return Io&&(ur?(Pt?we.right=Io.right:we.left=Io.left,we.width=Io.width):(we.top=Io.top,we.height=Io.height)),Tl(),Hl.current=l()(function(){Kl(we)}),Tl},[Io,ur,Pt]),Object(g.useEffect)(function(){es()},[Tt,Io,Rs,ur]),Object(g.useEffect)(function(){ul()},[Pt,yr,Tt,et.map(function(we){return we.key}).join("_")]);var Wl=!!oa.length,fs="".concat(Ue,"-nav-wrap"),js,Bs,Al,Ks;return ur?Pt?(Bs=nr>0,js=nr+Ri4?9:0)}function q(ne){for(var Ze=ne.length;--Ze>=0;)ne[Ze]=0}function Q(ne){var Ze=ne.state,lt=Ze.pending;if(lt>ne.avail_out&&(lt=ne.avail_out),lt===0)return;v.arraySet(ne.output,Ze.pending_buf,Ze.pending_out,lt,ne.next_out),ne.next_out+=lt,Ze.pending_out+=lt,ne.total_out+=lt,ne.avail_out-=lt,Ze.pending-=lt,Ze.pending===0&&(Ze.pending_out=0)}function Y(ne,Ze){T._tr_flush_block(ne,ne.block_start>=0?ne.block_start:-1,ne.strstart-ne.block_start,Ze),ne.block_start=ne.strstart,Q(ne.strm)}function oe(ne,Ze){ne.pending_buf[ne.pending++]=Ze}function le(ne,Ze){ne.pending_buf[ne.pending++]=Ze>>>8&255,ne.pending_buf[ne.pending++]=Ze&255}function Ee(ne,Ze,lt,Be){var $e=ne.avail_in;return $e>Be&&($e=Be),$e===0?0:(ne.avail_in-=$e,v.arraySet(Ze,ne.input,ne.next_in,$e,lt),ne.state.wrap===1?ne.adler=(0,y.default)(ne.adler,Ze,$e,lt):ne.state.wrap===2&&(ne.adler=(0,g.default)(ne.adler,Ze,$e,lt)),ne.next_in+=$e,ne.total_in+=$e,$e)}function Le(ne,Ze){var lt=ne.max_chain_length,Be=ne.strstart,$e,rt,St=ne.prev_length,pt=ne.nice_match,st=ne.strstart>ne.w_size-Z?ne.strstart-(ne.w_size-Z):0,Pe=ne.window,ze=ne.w_mask,xt=ne.prev,ht=ne.strstart+B,Bt=Pe[Be+St-1],Ht=Pe[Be+St];ne.prev_length>=ne.good_match&&(lt>>=2),pt>ne.lookahead&&(pt=ne.lookahead);do{if($e=Ze,Pe[$e+St]!==Ht||Pe[$e+St-1]!==Bt||Pe[$e]!==Pe[Be]||Pe[++$e]!==Pe[Be+1])continue;Be+=2,$e++;do;while(Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&Pe[++Be]===Pe[++$e]&&BeSt){if(ne.match_start=Ze,St=rt,rt>=pt)break;Bt=Pe[Be+St-1],Ht=Pe[Be+St]}}while((Ze=xt[Ze&ze])>st&&--lt!==0);return St<=ne.lookahead?St:ne.lookahead}function ge(ne){var Ze=ne.w_size,lt,Be,$e,rt,St;do{if(rt=ne.window_size-ne.lookahead-ne.strstart,ne.strstart>=Ze+(Ze-Z)){v.arraySet(ne.window,ne.window,Ze,Ze,0),ne.match_start-=Ze,ne.strstart-=Ze,ne.block_start-=Ze,Be=ne.hash_size,lt=Be;do $e=ne.head[--lt],ne.head[lt]=$e>=Ze?$e-Ze:0;while(--Be);Be=Ze,lt=Be;do $e=ne.prev[--lt],ne.prev[lt]=$e>=Ze?$e-Ze:0;while(--Be);rt+=Ze}if(ne.strm.avail_in===0)break;if(Be=Ee(ne.strm,ne.window,ne.strstart+ne.lookahead,rt),ne.lookahead+=Be,ne.lookahead+ne.insert>=L)for(St=ne.strstart-ne.insert,ne.ins_h=ne.window[St],ne.ins_h=(ne.ins_h<ne.pending_buf_size-5&&(lt=ne.pending_buf_size-5);;){if(ne.lookahead<=1){if(ge(ne),ne.lookahead===0&&Ze===o)return me;if(ne.lookahead===0)break}ne.strstart+=ne.lookahead,ne.lookahead=0;var Be=ne.block_start+lt;if((ne.strstart===0||ne.strstart>=Be)&&(ne.lookahead=ne.strstart-Be,ne.strstart=Be,Y(ne,!1),ne.strm.avail_out===0))return me;if(ne.strstart-ne.block_start>=ne.w_size-Z&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):(ne.strstart>ne.block_start&&(Y(ne,!1),ne.strm.avail_out===0),me)}function _e(ne,Ze){for(var lt,Be;;){if(ne.lookahead=L&&(ne.ins_h=(ne.ins_h<=L)if(Be=T._tr_tally(ne,ne.strstart-ne.match_start,ne.match_length-L),ne.lookahead-=ne.match_length,ne.match_length<=ne.max_lazy_match&&ne.lookahead>=L){ne.match_length--;do ne.strstart++,ne.ins_h=(ne.ins_h<=L&&(ne.ins_h=(ne.ins_h<4096)&&(ne.match_length=L-1)),ne.prev_length>=L&&ne.match_length<=ne.prev_length){$e=ne.strstart+ne.lookahead-L,Be=T._tr_tally(ne,ne.strstart-1-ne.prev_match,ne.prev_length-L),ne.lookahead-=ne.prev_length-1,ne.prev_length-=2;do++ne.strstart<=$e&&(ne.ins_h=(ne.ins_h<=L&&ne.strstart>0&&($e=ne.strstart-1,Be=St[$e],Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e])){rt=ne.strstart+B;do;while(Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&Be===St[++$e]&&$ene.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=L?(lt=T._tr_tally(ne,1,ne.match_length-L),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Ge(ne,Ze){for(var lt;;){if(ne.lookahead===0&&(ge(ne),ne.lookahead===0)){if(Ze===o)return me;break}if(ne.match_length=0,lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Me(ne,Ze,lt,Be,$e){this.good_length=ne,this.max_lazy=Ze,this.nice_length=lt,this.max_chain=Be,this.func=$e}var Et;Et=[new Me(0,0,0,0,De),new Me(4,4,8,4,_e),new Me(4,5,16,8,_e),new Me(4,6,32,32,_e),new Me(4,4,16,16,Xe),new Me(8,16,32,32,Xe),new Me(8,16,128,128,Xe),new Me(8,32,128,256,Xe),new Me(32,128,258,1024,Xe),new Me(32,258,258,4096,Xe)];function Oe(ne){ne.window_size=2*ne.w_size,q(ne.head),ne.max_lazy_match=Et[ne.level].max_lazy,ne.good_match=Et[ne.level].good_length,ne.nice_match=Et[ne.level].nice_length,ne.max_chain_length=Et[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=L-1,ne.match_available=0,ne.ins_h=0}function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=S,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new v.Buf16(F*2),this.dyn_dtree=new v.Buf16((2*X+1)*2),this.bl_tree=new v.Buf16((2*k+1)*2),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new v.Buf16(U+1),this.heap=new v.Buf16(2*z+1),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new v.Buf16(2*z+1),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Je(ne){var Ze;return!ne||!ne.state?Fe(ne,c):(ne.total_in=ne.total_out=0,ne.data_type=w,Ze=ne.state,Ze.pending=0,Ze.pending_out=0,Ze.wrap<0&&(Ze.wrap=-Ze.wrap),Ze.status=Ze.wrap?he:Ce,ne.adler=Ze.wrap===2?0:1,Ze.last_flush=o,T._tr_init(Ze),t)}function Ye(ne){var Ze=Je(ne);return Ze===t&&Oe(ne.state),Ze}function Ne(ne,Ze){return!ne||!ne.state||ne.state.wrap!==2?c:(ne.state.gzhead=Ze,t)}function He(ne,Ze,lt,Be,$e,rt){if(!ne)return c;var St=1;if(Ze===h&&(Ze=6),Be<0?(St=0,Be=-Be):Be>15&&(St=2,Be-=16),$e<1||$e>A||lt!==S||Be<8||Be>15||Ze<0||Ze>9||rt<0||rt>O)return Fe(ne,c);Be===8&&(Be=9);var pt=new Ve;return ne.state=pt,pt.strm=ne,pt.wrap=St,pt.gzhead=null,pt.w_bits=Be,pt.w_size=1<i||Ze<0)return ne?Fe(ne,c):c;if(Be=ne.state,!ne.output||!ne.input&&ne.avail_in!==0||Be.status===pe&&Ze!==r)return Fe(ne,ne.avail_out===0?f:c);if(Be.strm=ne,lt=Be.last_flush,Be.last_flush=Ze,Be.status===he)if(Be.wrap===2)ne.adler=0,oe(Be,31),oe(Be,139),oe(Be,8),Be.gzhead?(oe(Be,(Be.gzhead.text?1:0)+(Be.gzhead.hcrc?2:0)+(Be.gzhead.extra?4:0)+(Be.gzhead.name?8:0)+(Be.gzhead.comment?16:0)),oe(Be,Be.gzhead.time&255),oe(Be,Be.gzhead.time>>8&255),oe(Be,Be.gzhead.time>>16&255),oe(Be,Be.gzhead.time>>24&255),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,Be.gzhead.os&255),Be.gzhead.extra&&Be.gzhead.extra.length&&(oe(Be,Be.gzhead.extra.length&255),oe(Be,Be.gzhead.extra.length>>8&255)),Be.gzhead.hcrc&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending,0)),Be.gzindex=0,Be.status=Se):(oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,fe),Be.status=Ce);else{var St=S+(Be.w_bits-8<<4)<<8,pt=-1;Be.strategy>=E||Be.level<2?pt=0:Be.level<6?pt=1:Be.level===6?pt=2:pt=3,St|=pt<<6,Be.strstart!==0&&(St|=re),St+=31-St%31,Be.status=Ce,le(Be,St),Be.strstart!==0&&(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),ne.adler=1}if(Be.status===Se)if(Be.gzhead.extra){for($e=Be.pending;Be.gzindex<(Be.gzhead.extra.length&65535)&&!(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size));)oe(Be,Be.gzhead.extra[Be.gzindex]&255),Be.gzindex++;Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Be.gzindex===Be.gzhead.extra.length&&(Be.gzindex=0,Be.status=ke)}else Be.status=ke;if(Be.status===ke)if(Be.gzhead.name){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){rt=1;break}Be.gzindex$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),rt===0&&(Be.gzindex=0,Be.status=te)}else Be.status=te;if(Be.status===te)if(Be.gzhead.comment){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){rt=1;break}Be.gzindex$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),rt===0&&(Be.status=Re)}else Be.status=Re;if(Be.status===Re&&(Be.gzhead.hcrc?(Be.pending+2>Be.pending_buf_size&&Q(ne),Be.pending+2<=Be.pending_buf_size&&(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),ne.adler=0,Be.status=Ce)):Be.status=Ce),Be.pending!==0){if(Q(ne),ne.avail_out===0)return Be.last_flush=-1,t}else if(ne.avail_in===0&&ie(Ze)<=ie(lt)&&Ze!==r)return Fe(ne,f);if(Be.status===pe&&ne.avail_in!==0)return Fe(ne,f);if(ne.avail_in!==0||Be.lookahead!==0||Ze!==o&&Be.status!==pe){var st=Be.strategy===E?Ge(Be,Ze):Be.strategy===x?tt(Be,Ze):Et[Be.level].func(Be,Ze);if((st===be||st===ae)&&(Be.status=pe),st===me||st===be)return ne.avail_out===0&&(Be.last_flush=-1),t;if(st===se&&(Ze===n?T._tr_align(Be):Ze!==i&&(T._tr_stored_block(Be,0,0,!1),Ze===l&&(q(Be.head),Be.lookahead===0&&(Be.strstart=0,Be.block_start=0,Be.insert=0))),Q(ne),ne.avail_out===0))return Be.last_flush=-1,t}return Ze!==r?t:Be.wrap<=0?a:(Be.wrap===2?(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),oe(Be,ne.adler>>16&255),oe(Be,ne.adler>>24&255),oe(Be,ne.total_in&255),oe(Be,ne.total_in>>8&255),oe(Be,ne.total_in>>16&255),oe(Be,ne.total_in>>24&255)):(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),Q(ne),Be.wrap>0&&(Be.wrap=-Be.wrap),Be.pending!==0?t:a)}function de(ne){var Ze;return!ne||!ne.state?c:(Ze=ne.state.status,Ze!==he&&Ze!==Se&&Ze!==ke&&Ze!==te&&Ze!==Re&&Ze!==Ce&&Ze!==pe?Fe(ne,c):(ne.state=null,Ze===Ce?Fe(ne,d):t))}function je(ne,Ze){var lt=Ze.length,Be,$e,rt,St,pt,st,Pe,ze;if(!ne||!ne.state)return c;if(Be=ne.state,St=Be.wrap,St===2||St===1&&Be.status!==he||Be.lookahead)return c;for(St===1&&(ne.adler=(0,y.default)(ne.adler,Ze,lt,0)),Be.wrap=0,lt>=Be.w_size&&(St===0&&(q(Be.head),Be.strstart=0,Be.block_start=0,Be.insert=0),ze=new v.Buf8(Be.w_size),v.arraySet(ze,Ze,lt-Be.w_size,Be.w_size,0),Ze=ze,lt=Be.w_size),pt=ne.avail_in,st=ne.next_in,Pe=ne.input,ne.avail_in=lt,ne.next_in=0,ne.input=Ze,ge(Be);Be.lookahead>=L;){$e=Be.strstart,rt=Be.lookahead-(L-1);do Be.ins_h=(Be.ins_h<>>7)^(O<<14|O>>>18)^O>>>3,w=o[x-2],S=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;o[x]=C+o[x-7]+S+o[x-16]}var A=f&h^~f&u,D=t&a^t&c^a&c,M=(t<<30|t>>>2)^(t<<19|t>>>13)^(t<<10|t>>>22),N=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),P=E+N+A+e[x]+o[x],z=M+D;E=u,u=h,h=f,f=d+P|0,d=c,c=a,a=t,t=P+z|0}i[0]=i[0]+t|0,i[1]=i[1]+a|0,i[2]=i[2]+c|0,i[3]=i[3]+d|0,i[4]=i[4]+f|0,i[5]=i[5]+h|0,i[6]=i[6]+u|0,i[7]=i[7]+E|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,t=l.sigBytes*8;return r[t>>>5]|=128<<24-t%32,r[(t+64>>>9<<4)+14]=v.floor(i/4294967296),r[(t+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});T.SHA256=s._createHelper(n),T.HmacSHA256=s._createHmacHelper(n)}(Math),I.SHA256})},lZu9:function(j,H,b){(function(I){I(b("VrN/"),b("1eCo"),b("8EBN"))})(function(I){"use strict";I.defineMode("markdown",function(v,T){var y=I.getMode(v,"text/html"),g=y.name=="null";function s(U){if(I.findModeByName){var L=I.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var B=I.getMode(v,U);return B.name=="null"?null:B}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var _={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var p in _)_.hasOwnProperty(p)&&T.tokenTypeOverrides[p]&&(_[p]=T.tokenTypeOverrides[p]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,l=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,t=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,a=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,d=" ";function f(U,L,B){return L.f=L.inline=B,B(U,L)}function h(U,L,B){return L.f=L.block=B,B(U,L)}function u(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==O){var L=g;if(!L){var B=I.innerMode(y,U.htmlState);L=B.mode.name=="xml"&&B.state.tagStart===null&&!B.state.context&&B.state.tokenize.isInText}L&&(U.f=A,U.block=x,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function x(U,L){var B=U.column()===L.indentation,Z=u(L.prevLine.stream),re=L.indentedCode,he=L.prevLine.hr,Se=L.list!==!1,ke=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var te=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,Se)){for(L.list=null;te=4&&(re||L.prevLine.fencedCodeEnd||L.prevLine.header||Z))return U.skipToEnd(),L.indentedCode=!0,_.code;if(U.eatSpace())return null;if(B&&L.indentation<=ke&&(pe=U.match(l))&&pe[1].length<=6)return L.quote=0,L.header=pe[1].length,L.thisLine.header=!0,T.highlightFormatting&&(L.formatting="header"),L.f=L.inline,w(L);if(L.indentation<=ke&&U.eat(">"))return L.quote=B?1:L.quote+1,T.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),w(L);if(!Ce&&!L.setext&&B&&L.indentation<=ke&&(pe=U.match(o))){var me=pe[1]?"ol":"ul";return L.indentation=te+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(L.taskList=!0),L.f=L.inline,T.highlightFormatting&&(L.formatting=["list","list-"+me]),w(L)}else{if(B&&L.indentation<=ke&&(pe=U.match(t,!0)))return L.quote=0,L.fencedEndRE=new RegExp(pe[1]+"+ *$"),L.localMode=T.fencedCodeBlockHighlighting&&s(pe[2]||T.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=I.startState(L.localMode)),L.f=L.block=C,T.highlightFormatting&&(L.formatting="code-block"),L.code=-1,w(L);if(L.setext||(!Re||!Se)&&!L.quote&&L.list===!1&&!L.code&&!Ce&&!a.test(U.string)&&(pe=U.lookAhead(1))&&(pe=pe.match(r)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),T.highlightFormatting&&(L.formatting="header")):(L.header=pe[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,w(L);if(Ce)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,_.hr;if(U.peek()==="[")return f(U,L,z)}return f(U,L,L.inline)}function O(U,L){var B=y.token(U,L.htmlState);if(!g){var Z=I.innerMode(y,L.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=A,L.block=x,L.htmlState=null)}return B}function C(U,L){var B=L.listStack[L.listStack.length-1]||0,Z=L.indentation=U.quote?L.push(_.formatting+"-"+U.formatting[B]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(_.linkHref,"url"):(U.strong&&L.push(_.strong),U.em&&L.push(_.em),U.strikethrough&&L.push(_.strikethrough),U.emoji&&L.push(_.emoji),U.linkText&&L.push(_.linkText),U.code&&L.push(_.code),U.image&&L.push(_.image),U.imageAltText&&L.push(_.imageAltText,"link"),U.imageMarker&&L.push(_.imageMarker)),U.header&&L.push(_.header,_.header+"-"+U.header),U.quote&&(L.push(_.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?L.push(_.quote+"-"+U.quote):L.push(_.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var Z=(U.listStack.length-1)%3;Z?Z===1?L.push(_.list2):L.push(_.list3):L.push(_.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function S(U,L){return U.match(i,!0)?w(L):void 0}function A(U,L){var B=L.text(U,L);if(typeof B!="undefined")return B;if(L.list)return L.list=null,w(L);if(L.taskList){var Z=U.match(n,!0)[1]===" ";return Z?L.taskOpen=!0:L.taskClosed=!0,T.highlightFormatting&&(L.formatting="task"),L.taskList=!1,w(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(L.formatting="header"),w(L);var re=U.next();if(L.linkTitle){L.linkTitle=!1;var he=re;re==="("&&(he=")"),he=(he+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+he+"\\\\]+|\\\\\\\\|\\\\.)"+he;if(U.match(new RegExp(Se),!0))return _.linkHref}if(re==="`"){var ke=L.formatting;T.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var te=U.current().length;if(L.code==0&&(!L.quote||te==1))return L.code=te,w(L);if(te==L.code){var Re=w(L);return L.code=0,Re}else return L.formatting=ke,w(L)}else if(L.code)return w(L);if(re==="\\"&&(U.next(),T.highlightFormatting)){var Ce=w(L),pe=_.formatting+"-escape";return Ce?Ce+" "+pe:pe}if(re==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="]"&&L.imageAltText){T.highlightFormatting&&(L.formatting="image");var Ce=w(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=M,Ce}if(re==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,T.highlightFormatting&&(L.formatting="link")),w(L);if(re==="]"&&L.linkText){T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:A,Ce}if(re==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return Ce?Ce+=" ":Ce="",Ce+_.linkInline}if(re==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Ce=w(L);return Ce?Ce+=" ":Ce="",Ce+_.linkEmail}if(T.xml&&re==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var me=U.string.indexOf(">",U.pos);if(me!=-1){var se=U.string.substring(U.start,me);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(se)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=I.startState(y),h(U,L,O)}if(T.xml&&re==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var be=1,ae=U.pos==1?" ":U.string.charAt(U.pos-2);be<3&&U.eat(re);)be++;var fe=U.peek()||" ",Fe=!/\s/.test(fe)&&(!c.test(fe)||/\s/.test(ae)||c.test(ae)),ie=!/\s/.test(ae)&&(!c.test(ae)||/\s/.test(fe)||c.test(fe)),q=null,Q=null;if(be%2&&(!L.em&&Fe&&(re==="*"||!ie||c.test(ae))?q=!0:L.em==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(q=!1)),be>1&&(!L.strong&&Fe&&(re==="*"||!ie||c.test(ae))?Q=!0:L.strong==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(Q=!1)),Q!=null||q!=null){T.highlightFormatting&&(L.formatting=q==null?"strong":Q==null?"em":"strong em"),q===!0&&(L.em=re),Q===!0&&(L.strong=re);var Re=w(L);return q===!1&&(L.em=!1),Q===!1&&(L.strong=!1),Re}}else if(re===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return w(L);U.backUp(1)}if(T.strikethrough){if(re==="~"&&U.eatWhile(re)){if(L.strikethrough){T.highlightFormatting&&(L.formatting="strikethrough");var Re=w(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,T.highlightFormatting&&(L.formatting="strikethrough"),w(L)}else if(re===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return w(L);U.backUp(2)}}if(T.emoji&&re===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,T.highlightFormatting&&(L.formatting="emoji");var Y=w(L);return L.emoji=!1,Y}return re===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),w(L)}function D(U,L){var B=U.next();if(B===">"){L.f=L.inline=A,T.highlightFormatting&&(L.formatting="link");var Z=w(L);return Z?Z+=" ":Z="",Z+_.linkInline}return U.match(/^[^>]+/,!0),_.linkInline}function M(U,L){if(U.eatSpace())return null;var B=U.next();return B==="("||B==="["?(L.f=L.inline=P(B==="("?")":"]"),T.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,w(L)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function P(U){return function(L,B){var Z=L.next();if(Z===U){B.f=B.inline=A,T.highlightFormatting&&(B.formatting="link-string");var re=w(B);return B.linkHref=!1,re}return L.match(N[U]),B.linkHref=!0,w(B)}}function z(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=X,U.next(),T.highlightFormatting&&(L.formatting="link"),L.linkText=!0,w(L)):f(U,L,A)}function X(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=k,T.highlightFormatting&&(L.formatting="link");var B=w(L);return L.linkText=!1,B}return U.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function k(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=A,_.linkHref+" url")}var F={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:A,text:S,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&I.copyState(y,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?I.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return E(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=O)){var B=U.match(/^\s*/,!0)[0].replace(/\t/g,d).length;if(L.indentation=B,L.indentationDiff=null,B>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==O?{state:U.htmlState,mode:y}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:F}},indent:function(U,L,B){return U.block==O&&y.indent?y.indent(U.htmlState,L,B):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,B):I.Pass},blankLine:E,getType:w,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return F},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})},lzim:function(j,H,b){"use strict";var I=b("E7E6"),v=b.n(I);b.d(H,"w",function(){return v.a});var T=b("/GNS"),y=b.n(T);b.d(H,"v",function(){return y.a});var g=b("FOrL"),s=b.n(g);b.d(H,"q",function(){return s.a});var _=b("HpTS"),p=b.n(_);b.d(H,"x",function(){return p.a});var e=b("tWlo"),o=b.n(e);b.d(H,"a",function(){return o.a});var n=b("7ZXX"),l=b.n(n);b.d(H,"l",function(){return l.a});var r=b("GABl"),i=b.n(r);b.d(H,"e",function(){return i.a});var t=b("onxn"),a=b.n(t);b.d(H,"n",function(){return a.a});var c=b("nKGa"),d=b.n(c);b.d(H,"m",function(){return d.a});var f=b("4qgm"),h=b.n(f);b.d(H,"y",function(){return h.a});var u=b("JeFH"),E=b.n(u);b.d(H,"b",function(){return E.a});var x=b("ji0R"),O=b.n(x);b.d(H,"i",function(){return O.a});var C=b("W6BS"),w=b.n(C);b.d(H,"z",function(){return w.a});var S=b("kPYp"),A=b.n(S);b.d(H,"A",function(){return A.a});var D=b("nukY"),M=b.n(D),N=b("4u4S"),P=b.n(N),z=b("yslc"),X=b.n(z),k=b("l2Kq"),F=b.n(k),U=b("RMFE"),L=b.n(U);b.d(H,"o",function(){return L.a});var B=b("TGq3"),Z=b.n(B),re=b("SMhR"),he=b.n(re),Se=b("8/bI"),ke=b.n(Se);b.d(H,"j",function(){return ke.a});var te=b("JWDV"),Re=b.n(te),Ce=b("Xsq0"),pe=b.n(Ce);b.d(H,"p",function(){return pe.a});var me=b("Ohmc"),se=b.n(me);b.d(H,"c",function(){return se.a});var be=b("csWT"),ae=b.n(be);b.d(H,"d",function(){return ae.a});var fe=b("7v3h"),Fe=b.n(fe);b.d(H,"k",function(){return Fe.a});var ie=b("cRFk"),q=b.n(ie);b.d(H,"u",function(){return q.a});var Q=b("kPWJ"),Y=b.n(Q);b.d(H,"t",function(){return Y.a});var oe=b("qgvg"),le=b.n(oe);b.d(H,"r",function(){return le.a});var Ee=b("FPkq"),Le=b.n(Ee);b.d(H,"s",function(){return Le.a});var ge=b("A/g1"),De=b.n(ge);b.d(H,"f",function(){return De.a});var _e=b("Nmxd"),Xe=b.n(_e);b.d(H,"g",function(){return Xe.a});var tt=b("5D2P"),Ge=b.n(tt);b.d(H,"h",function(){return Ge.a});var Me=b("djh8"),Et=b.n(Me),Oe=b("Jq4h"),Ve=b.n(Oe)},mCJh:function(j,H,b){"use strict";b.d(H,"e",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"d",function(){return y}),b.d(H,"g",function(){return g}),b.d(H,"f",function(){return s}),b.d(H,"i",function(){return _}),b.d(H,"c",function(){return p}),b.d(H,"h",function(){return e}),b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"j",function(){return l});var I=b("ErOA");function v(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Object(I.c)("/discusses.json?page=".concat(i-1,"&container_identifier=").concat(r,"&container_type=Shixun"))}function T(r,i){return Object(I.f)("/discusses/".concat(r,"/top_or_down_discuss.json"),{top:i})}function y(r,i){return Object(I.f)("/discusses/".concat(r,"/disable_or_open_discuss.json"),{is_disable:!!i})}function g(r,i){return Object(I.f)("/discusses/".concat(r,"/plus.json"),{container_type:"Discuss",type:i?1:0})}function s(r,i){return Object(I.f)("/discusses/".concat(r,"/hidden.json"),i)}function _(r,i){return Object(I.f)("/discusses/".concat(r,"/reward_code.json"),i)}function p(r){return Object(I.a)("/api/discusses/".concat(r,".json"),{method:"delete"})}function e(r,i){return Object(I.f)("/discusses/".concat(r,"/reply.json"),{container_type:"Shixun",content:i})}function o(r){return Object(I.f)("/discusses.json",r)}function n(r){return Object(I.f)("/discusses/ai_reply.json",r)}function l(r,i){return Object(I.f)("/discusses/".concat(r,"/turing.json"),i)}},mHUz:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};H.default=I},mTgk:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=v(b("mHUz"));function v(p){return p&&p.__esModule?p:{default:p}}var T={};function y(p,e){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,e]}function g(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,o,e]}function s(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,o]}g("Alt",I.default.XK_Alt_L,I.default.XK_Alt_R),y("AltGraph",I.default.XK_ISO_Level3_Shift),y("CapsLock",I.default.XK_Caps_Lock),g("Control",I.default.XK_Control_L,I.default.XK_Control_R),g("Meta",I.default.XK_Super_L,I.default.XK_Super_R),y("NumLock",I.default.XK_Num_Lock),y("ScrollLock",I.default.XK_Scroll_Lock),g("Shift",I.default.XK_Shift_L,I.default.XK_Shift_R),s("Enter",I.default.XK_Return,I.default.XK_KP_Enter),y("Tab",I.default.XK_Tab),s(" ",I.default.XK_space,I.default.XK_KP_Space),s("ArrowDown",I.default.XK_Down,I.default.XK_KP_Down),s("ArrowUp",I.default.XK_Up,I.default.XK_KP_Up),s("ArrowLeft",I.default.XK_Left,I.default.XK_KP_Left),s("ArrowRight",I.default.XK_Right,I.default.XK_KP_Right),s("End",I.default.XK_End,I.default.XK_KP_End),s("Home",I.default.XK_Home,I.default.XK_KP_Home),s("PageDown",I.default.XK_Next,I.default.XK_KP_Next),s("PageUp",I.default.XK_Prior,I.default.XK_KP_Prior),y("Backspace",I.default.XK_BackSpace),s("Clear",I.default.XK_Clear,I.default.XK_KP_Begin),y("Copy",I.default.XF86XK_Copy),y("Cut",I.default.XF86XK_Cut),s("Delete",I.default.XK_Delete,I.default.XK_KP_Delete),s("Insert",I.default.XK_Insert,I.default.XK_KP_Insert),y("Paste",I.default.XF86XK_Paste),y("Redo",I.default.XK_Redo),y("Undo",I.default.XK_Undo),y("Cancel",I.default.XK_Cancel),y("ContextMenu",I.default.XK_Menu),y("Escape",I.default.XK_Escape),y("Execute",I.default.XK_Execute),y("Find",I.default.XK_Find),y("Help",I.default.XK_Help),y("Pause",I.default.XK_Pause),y("Select",I.default.XK_Select),y("ZoomIn",I.default.XF86XK_ZoomIn),y("ZoomOut",I.default.XF86XK_ZoomOut),y("BrightnessDown",I.default.XF86XK_MonBrightnessDown),y("BrightnessUp",I.default.XF86XK_MonBrightnessUp),y("Eject",I.default.XF86XK_Eject),y("LogOff",I.default.XF86XK_LogOff),y("Power",I.default.XF86XK_PowerOff),y("PowerOff",I.default.XF86XK_PowerDown),y("PrintScreen",I.default.XK_Print),y("Hibernate",I.default.XF86XK_Hibernate),y("Standby",I.default.XF86XK_Standby),y("WakeUp",I.default.XF86XK_WakeUp),y("AllCandidates",I.default.XK_MultipleCandidate),y("Alphanumeric",I.default.XK_Eisu_Shift),y("CodeInput",I.default.XK_Codeinput),y("Compose",I.default.XK_Multi_key),y("Convert",I.default.XK_Henkan),y("GroupFirst",I.default.XK_ISO_First_Group),y("GroupLast",I.default.XK_ISO_Last_Group),y("GroupNext",I.default.XK_ISO_Next_Group),y("GroupPrevious",I.default.XK_ISO_Prev_Group),y("NonConvert",I.default.XK_Muhenkan),y("PreviousCandidate",I.default.XK_PreviousCandidate),y("SingleCandidate",I.default.XK_SingleCandidate),y("HangulMode",I.default.XK_Hangul),y("HanjaMode",I.default.XK_Hangul_Hanja),y("JunjuaMode",I.default.XK_Hangul_Jeonja),y("Eisu",I.default.XK_Eisu_toggle),y("Hankaku",I.default.XK_Hankaku),y("Hiragana",I.default.XK_Hiragana),y("HiraganaKatakana",I.default.XK_Hiragana_Katakana),y("KanaMode",I.default.XK_Kana_Shift),y("KanjiMode",I.default.XK_Kanji),y("Katakana",I.default.XK_Katakana),y("Romaji",I.default.XK_Romaji),y("Zenkaku",I.default.XK_Zenkaku),y("ZenkakuHanaku",I.default.XK_Zenkaku_Hankaku),y("F1",I.default.XK_F1),y("F2",I.default.XK_F2),y("F3",I.default.XK_F3),y("F4",I.default.XK_F4),y("F5",I.default.XK_F5),y("F6",I.default.XK_F6),y("F7",I.default.XK_F7),y("F8",I.default.XK_F8),y("F9",I.default.XK_F9),y("F10",I.default.XK_F10),y("F11",I.default.XK_F11),y("F12",I.default.XK_F12),y("F13",I.default.XK_F13),y("F14",I.default.XK_F14),y("F15",I.default.XK_F15),y("F16",I.default.XK_F16),y("F17",I.default.XK_F17),y("F18",I.default.XK_F18),y("F19",I.default.XK_F19),y("F20",I.default.XK_F20),y("F21",I.default.XK_F21),y("F22",I.default.XK_F22),y("F23",I.default.XK_F23),y("F24",I.default.XK_F24),y("F25",I.default.XK_F25),y("F26",I.default.XK_F26),y("F27",I.default.XK_F27),y("F28",I.default.XK_F28),y("F29",I.default.XK_F29),y("F30",I.default.XK_F30),y("F31",I.default.XK_F31),y("F32",I.default.XK_F32),y("F33",I.default.XK_F33),y("F34",I.default.XK_F34),y("F35",I.default.XK_F35),y("Close",I.default.XF86XK_Close),y("MailForward",I.default.XF86XK_MailForward),y("MailReply",I.default.XF86XK_Reply),y("MailSend",I.default.XF86XK_Send),y("MediaFastForward",I.default.XF86XK_AudioForward),y("MediaPause",I.default.XF86XK_AudioPause),y("MediaPlay",I.default.XF86XK_AudioPlay),y("MediaRecord",I.default.XF86XK_AudioRecord),y("MediaRewind",I.default.XF86XK_AudioRewind),y("MediaStop",I.default.XF86XK_AudioStop),y("MediaTrackNext",I.default.XF86XK_AudioNext),y("MediaTrackPrevious",I.default.XF86XK_AudioPrev),y("New",I.default.XF86XK_New),y("Open",I.default.XF86XK_Open),y("Print",I.default.XK_Print),y("Save",I.default.XF86XK_Save),y("SpellCheck",I.default.XF86XK_Spell),y("AudioVolumeDown",I.default.XF86XK_AudioLowerVolume),y("AudioVolumeUp",I.default.XF86XK_AudioRaiseVolume),y("AudioVolumeMute",I.default.XF86XK_AudioMute),y("MicrophoneVolumeMute",I.default.XF86XK_AudioMicMute),y("LaunchApplication1",I.default.XF86XK_MyComputer),y("LaunchApplication2",I.default.XF86XK_Calculator),y("LaunchCalendar",I.default.XF86XK_Calendar),y("LaunchMail",I.default.XF86XK_Mail),y("LaunchMediaPlayer",I.default.XF86XK_AudioMedia),y("LaunchMusicPlayer",I.default.XF86XK_Music),y("LaunchPhone",I.default.XF86XK_Phone),y("LaunchScreenSaver",I.default.XF86XK_ScreenSaver),y("LaunchSpreadsheet",I.default.XF86XK_Excel),y("LaunchWebBrowser",I.default.XF86XK_WWW),y("LaunchWebCam",I.default.XF86XK_WebCam),y("LaunchWordProcessor",I.default.XF86XK_Word),y("BrowserBack",I.default.XF86XK_Back),y("BrowserFavorites",I.default.XF86XK_Favorites),y("BrowserForward",I.default.XF86XK_Forward),y("BrowserHome",I.default.XF86XK_HomePage),y("BrowserRefresh",I.default.XF86XK_Refresh),y("BrowserSearch",I.default.XF86XK_Search),y("BrowserStop",I.default.XF86XK_Stop),y("Dimmer",I.default.XF86XK_BrightnessAdjust),y("MediaAudioTrack",I.default.XF86XK_AudioCycleTrack),y("RandomToggle",I.default.XF86XK_AudioRandomPlay),y("SplitScreenToggle",I.default.XF86XK_SplitScreen),y("Subtitle",I.default.XF86XK_Subtitle),y("VideoModeNext",I.default.XF86XK_Next_VMode),s("=",I.default.XK_equal,I.default.XK_KP_Equal),s("+",I.default.XK_plus,I.default.XK_KP_Add),s("-",I.default.XK_minus,I.default.XK_KP_Subtract),s("*",I.default.XK_asterisk,I.default.XK_KP_Multiply),s("/",I.default.XK_slash,I.default.XK_KP_Divide),s(".",I.default.XK_period,I.default.XK_KP_Decimal),s(",",I.default.XK_comma,I.default.XK_KP_Separator),s("0",I.default.XK_0,I.default.XK_KP_0),s("1",I.default.XK_1,I.default.XK_KP_1),s("2",I.default.XK_2,I.default.XK_KP_2),s("3",I.default.XK_3,I.default.XK_KP_3),s("4",I.default.XK_4,I.default.XK_KP_4),s("5",I.default.XK_5,I.default.XK_KP_5),s("6",I.default.XK_6,I.default.XK_KP_6),s("7",I.default.XK_7,I.default.XK_KP_7),s("8",I.default.XK_8,I.default.XK_KP_8),s("9",I.default.XK_9,I.default.XK_KP_9);var _=T;H.default=_},mdZa:function(j,H,b){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(v,T){"use strict";if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(v),g=1;g0&&r(M).to(P),z=this._divideParts(S,A),X=z.length,k=!1,F=function(Re,Ce){var pe=this;return new g.default(function(se,be){var ae,fe,Fe,ie;return _.default.async(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(Q.prev=0,Re.isCancel()){Q.next=18;break}return ae=z[Ce-1],fe={stream:Re._createStream(w,ae.start,ae.end),size:ae.end-ae.start},Q.next=6,_.default.awrap(Re._uploadPart(N,D,Ce,fe));case 6:if(Fe=Q.sent,!(!Re.isCancel()&&!k)){Q.next=15;break}if(x.doneParts.push({number:Ce,etag:Fe.res.headers.etag}),!O.progress){Q.next=12;break}return Q.next=12,_.default.awrap(O.progress(M.length/X,x,Fe.res));case 12:se({number:Ce,etag:Fe.res.headers.etag}),Q.next=16;break;case 15:se();case 16:Q.next=19;break;case 18:se();case 19:Q.next=30;break;case 21:Q.prev=21,Q.t0=Q.catch(0),ie=new Error,ie.name=Q.t0.name,ie.message=Q.t0.message,ie.stack=Q.t0.stack,ie.partNum=Ce,r(Q.t0).to(ie),be(ie);case 30:case"end":return Q.stop()}},null,pe,[[0,21]])})},U=(0,T.default)(new Array(X),function(te,Re){return Re+1}),L=P.map(function(te){return te.number}),B=U.filter(function(te){return L.indexOf(te)<0}),Z=5,re=O.parallel||Z,ke.next=17,_.default.awrap(this._parallel(B,re,function(te){return new g.default(function(Re,Ce){F(C,te).then(function(pe){pe&&P.push(pe),Re()}).catch(function(pe){Ce(pe)})})}));case 17:if(he=ke.sent,k=!0,!this.isCancel()){ke.next=22;break}throw F=null,this._makeCancelEvent();case 22:if(!(he&&he.length>0)){ke.next=25;break}throw he[0].message="Failed to upload some parts with error: "+he[0].toString()+" part_num: "+he[0].partNum,he[0];case 25:return ke.next=27,_.default.awrap(this.completeMultipartUpload(N,D,P,O));case 27:return ke.abrupt("return",ke.sent);case 28:case"end":return ke.stop()}},null,this)},d._getFileSize=function(x){return _.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!e.buffer(x)){C.next=4;break}return C.abrupt("return",x.length);case 4:if(!(t(x)||c(x))){C.next=6;break}return C.abrupt("return",x.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var f=j("stream"),h=f.Readable;function u(E,x){if(!(this instanceof u))return new u(E,x);h.call(this,x),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}o.inherits(u,h),u.prototype.readFileAndPush=function(x){if(this.fileBuffer)for(var O=!0;O&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:w,this.start=w,O=this.push(this.fileBuffer.slice(C,w))}},u.prototype._read=function(x){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var O=16*1024;x=x||O;var C=this;this.reader.onload=function(S){C.fileBuffer=I.from(new Uint8Array(S.target.result)),C.file=null,C.readFileAndPush(x)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(x)},d._createStream=function(x,O,C){if(t(x)||c(x))return new u(x.slice(O,C));throw new Error("_createStream requires File/Blob.")},d._getPartSize=function(x,O){var C=10*1e3,w=1024*1024;return O?Math.max(Math.ceil(x/C),O):w},d._divideParts=function(x,O){for(var C=Math.ceil(x/O),w=[],S=0;S255)throw new Error("ID is composed of 255 bytes at most");if(x.prefix===""||x.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(x.status))throw new Error("Status must be Enabled or Disabled");if(x.transition){if(!["IA","Archive"].includes(x.transition.storageClass))throw new Error("StorageClass must be IA or Archive");h(x.transition,"Transition")}if(x.expiration){if(!x.expiration.expiredObjectDeleteMarker)h(x.expiration,"Expiration");else if(x.expiration.days||x.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(x.abortMultipartUpload&&h(x.abortMultipartUpload,"AbortMultipartUpload"),!x.expiration&&!x.abortMultipartUpload&&!x.transition&&!x.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(x.tag){if(x.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");u(x.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(e){return e&&e.__esModule?e:{default:e}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/obj2xml"),_=s.obj2xml,p=b;p.putBucketVersioning=function(o,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(g(o),["Enabled","Suspended"].includes(n)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",o,"versioning",l),i={VersioningConfiguration:{Status:n}},r.mime="xml",r.content=_(i,{headers:!0}),c.next=9,v.default.awrap(this.request(r));case 9:return t=c.sent,c.abrupt("return",{res:t.res,status:t.status});case 11:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/obj2xml"),_=s.obj2xml,p=j("../utils/isArray"),e=p.isArray,o=b;o.putBucketWebsite=function(l){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],t,a,c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(g(l),t=this._bucketRequestParams("PUT",l,"website",i),a={Suffix:r.index||"index.html"},c={IndexDocument:a},d={WebsiteConfiguration:c},r.supportSubDir&&(a.SupportSubDir=r.supportSubDir),r.type&&(a.Type=r.type),r.error&&(c.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){u.next=12;break}if(e(r.routingRules)){u.next=11;break}throw new Error("RoutingRules must be Array");case 11:c.RoutingRules={RoutingRule:r.routingRules};case 12:return d=_(d),t.content=d,t.mime="xml",t.successStatuses=[200],u.next=18,v.default.awrap(this.request(t));case 18:return f=u.sent,u.abrupt("return",{res:f.res});case 20:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/object/keys"),T=s(v),y=j("babel-runtime/core-js/json/stringify"),g=s(y);function s(_){return _&&_.__esModule?_:{default:_}}b.encodeCallback=function(p,e){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&e.callback){var o={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(o.callbackHost=e.callback.host),e.callback.contentType&&(o.callbackBodyType=e.callback.contentType);var n=I.from((0,g.default)(o)).toString("base64");if(p.headers["x-oss-callback"]=n,e.callback.customValue){var l={};(0,T.default)(e.callback.customValue).forEach(function(r){l["x:"+r]=e.callback.customValue[r]}),p.headers["x-oss-callback-var"]=I.from((0,g.default)(l)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/assign"),v=T(I);function T(o){return o&&o.__esModule?o:{default:o}}var y=j("humanize-ms"),g=j("url"),s=j("../utils/checkBucketName"),_=s.checkBucketName;function p(o,n){var l=g.parse(o);if(l.protocol||(l=g.parse("http"+(n?"s":"")+"://"+o)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function e(o,n,l){var r=l?"https://":"http://",i=n?"-internal.aliyuncs.com":".aliyuncs.com",t="vpc100-oss-cn-";return o.substr(0,t.length)===t&&(i=".aliyuncs.com"),g.parse(r+o+i)}H.exports=function(o){if(!o||!o.accessKeyId||!o.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");o.bucket&&_(o.bucket);var n=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},o);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=y(n.timeout)),n.endpoint)n.endpoint=p(n.endpoint,n.secure);else if(n.region)n.endpoint=e(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(j,H,b){"use strict";var I=j("merge-descriptors"),v=b;I(v,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("querystring"),_=j("js-base64"),p=_.Base64.encode,e=b;e.processObjectSave=function(l,r,i,t){var a,c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return o(l,"sourceObject"),o(r,"targetObject"),o(i,"process"),r=this._objectName(r),t&&g(t),a=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),c=t?",b_"+p(t):"",r=p(r),d={"x-oss-process":i+"|sys/saveas,o_"+r+c},a.content=s.stringify(d),u.next=12,v.default.awrap(this.request(a));case 12:return f=u.sent,u.abrupt("return",{res:f.res,status:f.res.status});case 14:case"end":return u.stop()}},null,this)};function o(n,l){if(!n)throw new Error(l+" is required");if(typeof n!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(e){return e&&e.__esModule?e:{default:e}}var y=j("copy-to"),g=j("./callback"),s=j("./utils/deepCopy"),_=s.deepCopy,p=b;p.listUploads=function(o,n){var l,r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return n=n||{},l={},y(n).to(l),l.subres="uploads",r=this._objectRequestParams("GET","",l),r.query=o,r.xmlResponse=!0,r.successStatuses=[200],c.next=10,v.default.awrap(this.request(r));case 10:return i=c.sent,t=i.data.Upload||[],Array.isArray(t)||(t=[t]),t=t.map(function(d){return{name:d.Key,uploadId:d.UploadId,initiated:d.Initiated}}),c.abrupt("return",{res:i.res,uploads:t,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return c.stop()}},null,this)},p.listParts=function(o,n,l,r){var i,t,a;return v.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},i={},y(r).to(i),i.subres={uploadId:n},t=this._objectRequestParams("GET",o,i),t.query=l,t.xmlResponse=!0,t.successStatuses=[200],d.next=10,v.default.awrap(this.request(t));case 10:return a=d.sent,d.abrupt("return",{res:a.res,uploadId:a.data.UploadId,bucket:a.data.Bucket,name:a.data.Key,partNumberMarker:a.data.PartNumberMarker,nextPartNumberMarker:a.data.NextPartNumberMarker,maxParts:a.data.MaxParts,isTruncated:a.data.IsTruncated,parts:a.data.Part||[]});case 12:case"end":return d.stop()}},null,this)},p.abortMultipartUpload=function(o,n,l){var r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return this._stop(),l=l||{},r={},y(l).to(r),r.subres={uploadId:n},i=this._objectRequestParams("DELETE",o,r),i.successStatuses=[204],c.next=9,v.default.awrap(this.request(i));case 9:return t=c.sent,c.abrupt("return",{res:t.res});case 11:case"end":return c.stop()}},null,this)},p.initMultipartUpload=function(o,n){var l,r,i;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return n=n||{},l={},y(n).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(n.meta,l.headers),l.subres="uploads",r=this._objectRequestParams("POST",o,l),r.mime=n.mime,r.xmlResponse=!0,r.successStatuses=[200],a.next=12,v.default.awrap(this.request(r));case 12:return i=a.sent,a.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return a.stop()}},null,this)},p.uploadPart=function(o,n,l,r,i,t,a){var c;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return c={stream:this._createStream(r,i,t),size:t-i},f.next=3,v.default.awrap(this._uploadPart(o,n,l,c,a));case 3:return f.abrupt("return",f.sent);case 4:case"end":return f.stop()}},null,this)},p.completeMultipartUpload=function(o,n,l,r){var i,t,a,c,d,f,h,u;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:for(i=l.concat().sort(function(O,C){return O.number-C.number}).filter(function(O,C,w){return!C||O.number!==w[C-1].number}),t=` `,a=0;a @@ -477,13 +477,13 @@ raw xml: `+F,Z.t1.status=X.status,Z.t1.requestId=X.headers["x-oss-request-id"],Z * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license - */(function(){"use strict";var v={function:!0,object:!0},T=v[typeof window]&&window||this,y=T,g=v[typeof b]&&b,s=v[typeof H]&&H&&!H.nodeType&&H,_=g&&s&&typeof I=="object"&&I;_&&(_.global===_||_.window===_||_.self===_)&&(T=_);var p=Math.pow(2,53)-1,e=/\bOpera/,o=this,n=Object.prototype,l=n.hasOwnProperty,r=n.toString;function i(w){return w=String(w),w.charAt(0).toUpperCase()+w.slice(1)}function t(w,S,A){var D={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return S&&A&&/^Win/i.test(w)&&!/^Windows Phone /i.test(w)&&(D=D[/[\d.]+$/.exec(w)])&&(w="Windows "+D),w=String(w),S&&A&&(w=w.replace(RegExp(S,"i"),A)),w=c(w.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),w}function a(w,S){var A=-1,D=w?w.length:0;if(typeof D=="number"&&D>-1&&D<=p)for(;++A3&&"WebKit"||/\bOpera\b/.test(fe)&&(/\bOPR\b/.test(w)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(w)&&!/^(?:Trident|EdgeHTML)$/.test(ae)&&"WebKit"||!ae&&/\bMSIE\b/i.test(w)&&(q=="Mac OS"?"Tasman":"Trident")||ae=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(fe)&&"NetFront")&&(ae=[te]),fe=="IE"&&(te=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(w)||0)[1])?(fe+=" Mobile",q="Windows Phone "+(/\+$/.test(te)?te:te+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(w)?(fe="IE Mobile",q="Windows Phone 8.x",Ce.unshift("desktop mode"),se||(se=(/\brv:([\d.]+)/.exec(w)||0)[1])):fe!="IE"&&ae=="Trident"&&(te=/\brv:([\d.]+)/.exec(w))&&(fe&&Ce.push("identifying as "+fe+(se?" "+se:"")),fe="IE",se=te[1]),me){if(h(S,"global"))if(L&&(te=L.lang.System,Re=te.getProperty("os.arch"),q=q||te.getProperty("os.name")+" "+te.getProperty("os.version")),B){try{se=S.require("ringo/engine").version.join("."),fe="RingoJS"}catch(_e){(te=S.system)&&te.global.system==S.system&&(fe="Narwhal",q||(q=te[0].os||null))}fe||(fe="Rhino")}else typeof S.process=="object"&&!S.process.browser&&(te=S.process)&&(typeof te.versions=="object"&&(typeof te.versions.electron=="string"?(Ce.push("Node "+te.versions.node),fe="Electron",se=te.versions.electron):typeof te.versions.nw=="string"&&(Ce.push("Chromium "+se,"Node "+te.versions.node),fe="NW.js",se=te.versions.nw)),fe||(fe="Node.js",Re=te.arch,q=te.platform,se=/[\d.]+/.exec(te.version),se=se?se[0]:null));else f(te=S.runtime)==X?(fe="Adobe AIR",q=te.flash.system.Capabilities.os):f(te=S.phantom)==U?(fe="PhantomJS",se=(te=te.version||null)&&te.major+"."+te.minor+"."+te.patch):typeof he.documentMode=="number"&&(te=/\bTrident\/(\d+)/i.exec(w))?(se=[se,he.documentMode],(te=+te[1]+4)!=se[1]&&(Ce.push("IE "+se[1]+" mode"),ae&&(ae[1]=""),se[1]=te),se=fe=="IE"?String(se[1].toFixed(1)):se[0]):typeof he.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(fe)&&(Ce.push("masking as "+fe+" "+se),fe="IE",se="11.0",ae=["Trident"],q="Windows");q=q&&c(q)}if(se&&(te=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(se)||/(?:alpha|beta)(?: ?\d)?/i.exec(w+";"+(me&&D.appMinorVersion))||/\bMinefield\b/i.test(w)&&"a")&&(pe=/b/i.test(te)?"beta":"alpha",se=se.replace(RegExp(te+"\\+?$"),"")+(pe=="beta"?re:Z)+(/\d+\+?/.exec(te)||"")),fe=="Fennec"||fe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))fe="Firefox Mobile";else if(fe=="Maxthon"&&se)se=se.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Fe))Fe=="Xbox 360"&&(q=null),Fe=="Xbox 360"&&/\bIEMobile\b/.test(w)&&Ce.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(fe)||fe&&!Fe&&!/Browser|Mobi/.test(fe))&&(q=="Windows CE"||/Mobi/i.test(w)))fe+=" Mobile";else if(fe=="IE"&&me)try{S.external===null&&Ce.unshift("platform preview")}catch(_e){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(Fe)||/\bBB10\b/.test(w))&&(te=(RegExp(Fe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(w)||0)[1]||se)?(te=[te,/BB10/.test(w)],q=(te[1]?(Fe=null,ie="BlackBerry"):"Device Software")+" "+te[0],se=null):this!=d&&Fe!="Wii"&&(me&&Se||/Opera/.test(fe)&&/\b(?:MSIE|Firefox)\b/i.test(w)||fe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||fe=="IE"&&(q&&!/^Win/.test(q)&&se>5.5||/\bWindows XP\b/.test(q)&&se>8||se==8&&!/\bTrident\b/.test(w)))&&!e.test(te=O.call(d,w.replace(e,"")+";"))&&te.name&&(te="ing as "+te.name+((te=te.version)?" "+te:""),e.test(fe)?(/\bIE\b/.test(te)&&q=="Mac OS"&&(q=null),te="identify"+te):(te="mask"+te,ke?fe=c(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):fe="Opera",/\bIE\b/.test(te)&&(q=null),me||(se=null)),ae=["Presto"],Ce.push(te));(te=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(w)||0)[1])&&(te=[parseFloat(te.replace(/\.(\d)$/,".0$1")),te],fe=="Safari"&&te[1].slice(-1)=="+"?(fe="WebKit Nightly",pe="alpha",se=te[1].slice(0,-1)):(se==te[1]||se==(te[2]=(/\bSafari\/([\d.]+\+?)/i.exec(w)||0)[1]))&&(se=null),te[1]=(/\bChrome\/([\d.]+)/i.exec(w)||0)[1],te[0]==537.36&&te[2]==537.36&&parseFloat(te[1])>=28&&ae=="WebKit"&&(ae=["Blink"]),!me||!P&&!te[1]?(ae&&(ae[1]="like Safari"),te=(te=te[0],te<400?1:te<500?2:te<526?3:te<533?4:te<534?"4+":te<535?5:te<537?6:te<538?7:te<601?8:"8")):(ae&&(ae[1]="like Chrome"),te=te[1]||(te=te[0],te<530?1:te<532?2:te<532.05?3:te<533?4:te<534.03?5:te<534.07?6:te<534.1?7:te<534.13?8:te<534.16?9:te<534.24?10:te<534.3?11:te<535.01?12:te<535.02?"13+":te<535.07?15:te<535.11?16:te<535.19?17:te<536.05?18:te<536.1?19:te<537.01?20:te<537.11?"21+":te<537.13?23:te<537.18?24:te<537.24?25:te<537.36?26:ae!="Blink"?"27":"28")),ae&&(ae[1]+=" "+(te+=typeof te=="number"?".x":/[.+]/.test(te)?"":"+")),fe=="Safari"&&(!se||parseInt(se)>45)&&(se=te)),fe=="Opera"&&(te=/\bzbov|zvav$/.exec(q))?(fe+=" ",Ce.unshift("desktop mode"),te=="zvav"?(fe+="Mini",se=null):fe+="Mobile",q=q.replace(RegExp(" *"+te+"$"),"")):fe=="Safari"&&/\bChrome\b/.exec(ae&&ae[1])&&(Ce.unshift("desktop mode"),fe="Chrome Mobile",se=null,/\bOS X\b/.test(q)?(ie="Apple",q="iOS 4.3+"):q=null),se&&se.indexOf(te=/[\d.]+$/.exec(q))==0&&w.indexOf("/"+te+"-")>-1&&(q=x(q.replace(te,""))),ae&&!/\b(?:Avant|Nook)\b/.test(fe)&&(/Browser|Lunascape|Maxthon/.test(fe)||fe!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ae[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(fe)&&ae[1])&&((te=ae[ae.length-1])&&Ce.push(te)),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ie&&Fe&&Fe.indexOf(ie)<0&&Ce.push("on "+ie),Fe&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+Fe),q&&(te=/ ([\d.+]+)$/.exec(q),be=te&&q.charAt(q.length-te[0].length-1)=="/",q={architecture:32,family:te&&!be?q.replace(te[0],""):q,version:te?te[1]:null,toString:function(){var _e=this.version;return this.family+(_e&&!be?" "+_e:"")+(this.architecture==64?" 64-bit":"")}}),(te=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+te),"")),fe&&(/\bWOW64\b/i.test(w)||me&&/\w(?:86|32)$/.test(D.cpuClass||D.platform)&&!/\bWin64; x64\b/i.test(w))&&Ce.unshift("32-bit")):q&&/^OS X/.test(q.family)&&fe=="Chrome"&&parseFloat(se)>=39&&(q.architecture=64),w||(w=null);var De={};return De.description=w,De.layout=ae&&ae[0],De.manufacturer=ie,De.name=fe,De.prerelease=pe,De.product=Fe,De.ua=w,De.version=fe&&se,De.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},De.parse=O,De.toString=ge,De.version&&Ce.unshift(se),De.name&&Ce.unshift(fe),q&&fe&&!(q==String(q).split(" ")[0]&&(q==fe.split(" ")[0]||Fe))&&Ce.push(Fe?"("+q+")":"on "+q),Ce.length&&(De.description=Ce.join(" ")),De}var C=O();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=C,define(function(){return C})):g&&s?d(C,function(w,S){g[S]=w}):T.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,H,b){(function(I){"use strict";typeof I=="undefined"||!I.version||I.version.indexOf("v0.")===0||I.version.indexOf("v1.")===0&&I.version.indexOf("v1.8.")!==0?H.exports={nextTick:v}:H.exports=I;function v(T,y,g,s){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var _=arguments.length,p,e;switch(_){case 0:case 1:return I.nextTick(T);case 2:return I.nextTick(function(){T.call(null,y)});case 3:return I.nextTick(function(){T.call(null,y,g)});case 4:return I.nextTick(function(){T.call(null,y,g,s)});default:for(p=new Array(_-1),e=0;e1)for(var d=1;d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=p-e,u=Math.floor,E=String.fromCharCode,x;function O(F){throw new RangeError(f[F])}function C(F,U){for(var L=F.length,B=[];L--;)B[L]=U(F[L]);return B}function w(F,U){var L=F.split("@"),B="";L.length>1&&(B=L[0]+"@",F=L[1]),F=F.replace(d,".");var Z=F.split("."),re=C(Z,U).join(".");return B+re}function S(F){for(var U=[],L=0,B=F.length,Z,re;L=55296&&Z<=56319&&L65535&&(U-=65536,L+=E(U>>>10&1023|55296),U=56320|U&1023),L+=E(U),L}).join("")}function D(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:p}function M(F,U){return F+22+75*(F<26)-((U!=0)<<5)}function N(F,U,L){var B=0;for(F=L?u(F/l):F>>1,F+=u(F/U);F>h*o>>1;B+=p)F=u(F/h);return u(B+(h+1)*F/(F+n))}function P(F){var U=[],L=F.length,B,Z=0,re=i,he=r,Se,ke,te,Re,Ce,pe,me,se,be;for(Se=F.lastIndexOf(t),Se<0&&(Se=0),ke=0;ke=128&&O("not-basic"),U.push(F.charCodeAt(ke));for(te=Se>0?Se+1:0;te=L&&O("invalid-input"),me=D(F.charCodeAt(te++)),(me>=p||me>u((_-Z)/Ce))&&O("overflow"),Z+=me*Ce,se=pe<=he?e:pe>=he+o?o:pe-he,meu(_/be)&&O("overflow"),Ce*=be;B=U.length+1,he=N(Z-Re,B,Re==0),u(Z/B)>_-re&&O("overflow"),re+=u(Z/B),Z%=B,U.splice(Z++,0,re)}return A(U)}function z(F){var U,L,B,Z,re,he,Se,ke,te,Re,Ce,pe=[],me,se,be,ae;for(F=S(F),me=F.length,U=i,L=0,re=r,he=0;he=U&&Ceu((_-L)/se)&&O("overflow"),L+=(Se-U)*se,U=Se,he=0;he_&&O("overflow"),Ce==U){for(ke=L,te=p;!(Re=te<=re?e:te>=re+o?o:te-re,ke0&&o>e&&(o=e);for(var n=0;n=0?(i=l.substr(0,r),t=l.substr(r+1)):(i=l,t=""),a=decodeURIComponent(i),c=decodeURIComponent(t),I(_,a)?v(_[a])?_[a].push(c):_[a]=[_[a],c]:_[a]=c}return _};var v=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,H,b){"use strict";var I=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};H.exports=function(g,s,_,p){return s=s||"&",_=_||"=",g===null&&(g=void 0),typeof g=="object"?T(y(g),function(e){var o=encodeURIComponent(I(e))+_;return v(g[e])?T(g[e],function(n){return o+encodeURIComponent(I(n))}).join(s):o+encodeURIComponent(I(g[e]))}).join(s):p?encodeURIComponent(I(p))+_+encodeURIComponent(I(g)):""};var v=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function T(g,s){if(g.map)return g.map(s);for(var _=[],p=0;p0?(typeof fe!="string"&&!Q.objectMode&&(0,y.default)(fe)!==i.prototype&&(fe=a(fe)),ie?Q.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):D(ae,Q,fe,!0):Q.ended?ae.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!Fe?(fe=Q.decoder.write(fe),Q.objectMode||fe.length!==0?D(ae,Q,fe,!1):L(ae,Q)):D(ae,Q,fe,!1))):ie||(Q.reading=!1)}return N(Q)}function D(ae,fe,Fe,ie){fe.flowing&&fe.length===0&&!fe.sync?(ae.emit("data",Fe),ae.read(0)):(fe.length+=fe.objectMode?1:Fe.length,ie?fe.buffer.unshift(Fe):fe.buffer.push(Fe),fe.needReadable&&F(ae)),L(ae,fe)}function M(ae,fe){var Fe;return!c(fe)&&typeof fe!="string"&&fe!==void 0&&!ae.objectMode&&(Fe=new TypeError("Invalid non-string/buffer chunk")),Fe}function N(ae){return!ae.ended&&(ae.needReadable||ae.length=P?ae=P:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}function X(ae,fe){return ae<=0||fe.length===0&&fe.ended?0:fe.objectMode?1:ae!==ae?fe.flowing&&fe.length?fe.buffer.head.data.length:fe.length:(ae>fe.highWaterMark&&(fe.highWaterMark=z(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}S.prototype.read=function(ae){h("read",ae),ae=parseInt(ae,10);var fe=this._readableState,Fe=ae;if(ae!==0&&(fe.emittedReadable=!1),ae===0&&fe.needReadable&&(fe.length>=fe.highWaterMark||fe.ended))return h("read: emitReadable",fe.length,fe.ended),fe.length===0&&fe.ended?me(this):F(this),null;if(ae=X(ae,fe),ae===0&&fe.ended)return fe.length===0&&me(this),null;var ie=fe.needReadable;h("need readable",ie),(fe.length===0||fe.length-ae0?q=te(ae,fe):q=null,q===null?(fe.needReadable=!0,ae=0):fe.length-=ae,fe.length===0&&(fe.ended||(fe.needReadable=!0),Fe!==ae&&fe.ended&&me(this)),q!==null&&this.emit("data",q),q};function k(ae,fe){if(fe.ended)return;if(fe.decoder){var Fe=fe.decoder.end();Fe&&Fe.length&&(fe.buffer.push(Fe),fe.length+=fe.objectMode?1:Fe.length)}fe.ended=!0,F(ae)}function F(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(h("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?p.nextTick(U,ae):U(ae))}function U(ae){h("emit readable"),ae.emit("readable"),ke(ae)}function L(ae,fe){fe.readingMore||(fe.readingMore=!0,p.nextTick(B,ae,fe))}function B(ae,fe){for(var Fe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length1&&be(ie.pipes,ae)!==-1)&&!Ee&&(h("false write response, pause",Fe._readableState.awaitDrain),Fe._readableState.awaitDrain++,ge=!0),Fe.pause())}function _e(Me){h("onerror",Me),Ge(),ae.removeListener("error",_e),l(ae,"error")===0&&ae.emit("error",Me)}C(ae,"error",_e);function Xe(){ae.removeListener("finish",tt),Ge()}ae.once("close",Xe);function tt(){h("onfinish"),ae.removeListener("close",Xe),Ge()}ae.once("finish",tt);function Ge(){h("unpipe"),Fe.unpipe(ae)}return ae.emit("pipe",Fe),ie.flowing||(h("pipe resume"),Fe.resume()),ae};function Z(ae){return function(){var fe=ae._readableState;h("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&l(ae,"data")&&(fe.flowing=!0,ke(ae))}}S.prototype.unpipe=function(ae){var fe=this._readableState,Fe={hasUnpiped:!1};if(fe.pipesCount===0)return this;if(fe.pipesCount===1)return ae&&ae!==fe.pipes?this:(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,Fe),this);if(!ae){var ie=fe.pipes,q=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var Q=0;Q=fe.length?(fe.decoder?Fe=fe.buffer.join(""):fe.buffer.length===1?Fe=fe.buffer.head.data:Fe=fe.buffer.concat(fe.length),fe.buffer.clear()):Fe=Re(ae,fe.buffer,fe.decoder),Fe}function Re(ae,fe,Fe){var ie;return aeQ.length?Q.length:ae;if(Y===Q.length?q+=Q:q+=Q.slice(0,ae),ae-=Y,ae===0){Y===Q.length?(++ie,Fe.next?fe.head=Fe.next:fe.head=fe.tail=null):(fe.head=Fe,Fe.data=Q.slice(Y));break}++ie}return fe.length-=ie,q}function pe(ae,fe){var Fe=i.allocUnsafe(ae),ie=fe.head,q=1;for(ie.data.copy(Fe),ae-=ie.data.length;ie=ie.next;){var Q=ie.data,Y=ae>Q.length?Q.length:ae;if(Q.copy(Fe,Fe.length-ae,0,Y),ae-=Y,ae===0){Y===Q.length?(++q,ie.next?fe.head=ie.next:fe.head=fe.tail=null):(fe.head=ie,ie.data=Q.slice(Y));break}++q}return fe.length-=q,Fe}function me(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,p.nextTick(se,fe,ae))}function se(ae,fe){!ae.endEmitted&&ae.length===0&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function be(ae,fe){for(var Fe=0,ie=ae.length;Fe-1?l.default:i.nextTick,d;M.WritableState=A;var f=(0,o.default)(j("core-util-is"));f.inherits=j("inherits");var h={deprecate:j("util-deprecate")},u=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,x=v.Uint8Array||function(){};function O(pe){return E.from(pe)}function C(pe){return E.isBuffer(pe)||pe instanceof x}var w=j("./internal/streams/destroy");f.inherits(M,u);function S(){}function A(pe,me){d=d||j("./_stream_duplex"),pe=pe||{};var se=me instanceof d;this.objectMode=!!pe.objectMode,se&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var be=pe.highWaterMark,ae=pe.writableHighWaterMark,fe=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:se&&(ae||ae===0)?this.highWaterMark=ae:this.highWaterMark=fe,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Fe=pe.decodeStrings===!1;this.decodeStrings=!Fe,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(me,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}A.prototype.getBuffer=function(){for(var me=this.bufferedRequest,se=[];me;)se.push(me),me=me.next;return se},function(){try{Object.defineProperty(A.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pe){}}();var D;typeof p.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(D=Function.prototype[s.default],(0,y.default)(M,s.default,{value:function(me){return D.call(this,me)?!0:this!==M?!1:me&&me._writableState instanceof A}})):D=function(me){return me instanceof this};function M(pe){if(d=d||j("./_stream_duplex"),!D.call(M,this)&&!(this instanceof d))return new M(pe);this._writableState=new A(pe,this),this.writable=!0,pe&&(typeof pe.write=="function"&&(this._write=pe.write),typeof pe.writev=="function"&&(this._writev=pe.writev),typeof pe.destroy=="function"&&(this._destroy=pe.destroy),typeof pe.final=="function"&&(this._final=pe.final)),u.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(pe,me){var se=new Error("write after end");pe.emit("error",se),i.nextTick(me,se)}function P(pe,me,se,be){var ae=!0,fe=!1;return se===null?fe=new TypeError("May not write null values to stream"):typeof se!="string"&&se!==void 0&&!me.objectMode&&(fe=new TypeError("Invalid non-string/buffer chunk")),fe&&(pe.emit("error",fe),i.nextTick(be,fe),ae=!1),ae}M.prototype.write=function(pe,me,se){var be=this._writableState,ae=!1,fe=!be.objectMode&&C(pe);return fe&&!E.isBuffer(pe)&&(pe=O(pe)),typeof me=="function"&&(se=me,me=null),fe?me="buffer":me||(me=be.defaultEncoding),typeof se!="function"&&(se=S),be.ended?N(this,se):(fe||P(this,be,pe,se))&&(be.pendingcb++,ae=X(this,be,fe,pe,me,se)),ae},M.prototype.cork=function(){var pe=this._writableState;pe.corked++},M.prototype.uncork=function(){var pe=this._writableState;pe.corked&&(pe.corked--,!pe.writing&&!pe.corked&&!pe.finished&&!pe.bufferProcessing&&pe.bufferedRequest&&re(this,pe))},M.prototype.setDefaultEncoding=function(me){if(typeof me=="string"&&(me=me.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((me+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+me);return this._writableState.defaultEncoding=me,this};function z(pe,me,se){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof me=="string"&&(me=E.from(me,se)),me}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(pe,me,se,be,ae,fe){if(!se){var Fe=z(me,be,ae);be!==Fe&&(se=!0,ae="buffer",be=Fe)}var ie=me.objectMode?1:be.length;me.length+=ie;var q=me.length0?this.tail.next=p:this.head=p,this.tail=p,++this.length},g.prototype.unshift=function(_){var p={data:_,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length},g.prototype.shift=function(){if(this.length===0)return;var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(_){if(this.length===0)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=_+p.data;return e},g.prototype.concat=function(_){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var p=v.allocUnsafe(_>>>0),e=this.head,o=0;e;)y(e.data,p,o),o+=e.data.length,e=e.next;return p},g}(),T&&T.inspect&&T.inspect.custom&&(H.exports.prototype[T.inspect.custom]=function(){var g=T.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":228,util:71}],220:[function(j,H,b){"use strict";var I=j("process-nextick-args");function v(g,s){var _=this,p=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return p||e?(s?s(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&I.nextTick(y,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(o){!s&&o?(I.nextTick(y,_,o),_._writableState&&(_._writableState.errorEmitted=!0)):s&&s(o)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(g,s){g.emit("error",s)}H.exports={destroy:v,undestroy:T}},{"process-nextick-args":207}],221:[function(j,H,b){"use strict";H.exports=j("events").EventEmitter},{events:192}],222:[function(j,H,b){H.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,H,b){b=H.exports=j("./lib/_stream_readable.js"),b.Stream=b,b.Readable=b,b.Writable=j("./lib/_stream_writable.js"),b.Duplex=j("./lib/_stream_duplex.js"),b.Transform=j("./lib/_stream_transform.js"),b.PassThrough=j("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(j,H,b){H.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,H,b){H.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,H,b){var I=function(){return this}()||Function("return this")(),v=I.regeneratorRuntime&&Object.getOwnPropertyNames(I).indexOf("regeneratorRuntime")>=0,T=v&&I.regeneratorRuntime;if(I.regeneratorRuntime=void 0,H.exports=j("./runtime"),v)I.regeneratorRuntime=T;else try{delete I.regeneratorRuntime}catch(y){I.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,H,b){!function(I){"use strict";var v=Object.prototype,T=v.hasOwnProperty,y,g=typeof Symbol=="function"?Symbol:{},s=g.iterator||"@@iterator",_=g.asyncIterator||"@@asyncIterator",p=g.toStringTag||"@@toStringTag",e=typeof H=="object",o=I.regeneratorRuntime;if(o){e&&(H.exports=o);return}o=I.regeneratorRuntime=e?H.exports:{};function n(X,k,F,U){var L=k&&k.prototype instanceof d?k:d,B=Object.create(L.prototype),Z=new N(U||[]);return B._invoke=S(X,F,Z),B}o.wrap=n;function l(X,k,F){try{return{type:"normal",arg:X.call(k,F)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",t="executing",a="completed",c={};function d(){}function f(){}function h(){}var u={};u[s]=function(){return this};var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==v&&T.call(x,s)&&(u=x);var O=h.prototype=d.prototype=Object.create(u);f.prototype=O.constructor=h,h.constructor=f,h[p]=f.displayName="GeneratorFunction";function C(X){["next","throw","return"].forEach(function(k){X[k]=function(F){return this._invoke(k,F)}})}o.isGeneratorFunction=function(X){var k=typeof X=="function"&&X.constructor;return k?k===f||(k.displayName||k.name)==="GeneratorFunction":!1},o.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,h):(X.__proto__=h,p in X||(X[p]="GeneratorFunction")),X.prototype=Object.create(O),X},o.awrap=function(X){return{__await:X}};function w(X){function k(L,B,Z,re){var he=l(X[L],X,B);if(he.type==="throw")re(he.arg);else{var Se=he.arg,ke=Se.value;return ke&&typeof ke=="object"&&T.call(ke,"__await")?Promise.resolve(ke.__await).then(function(te){k("next",te,Z,re)},function(te){k("throw",te,Z,re)}):Promise.resolve(ke).then(function(te){Se.value=te,Z(Se)},re)}}var F;function U(L,B){function Z(){return new Promise(function(re,he){k(L,B,re,he)})}return F=F?F.then(Z,Z):Z()}this._invoke=U}C(w.prototype),w.prototype[_]=function(){return this},o.AsyncIterator=w,o.async=function(X,k,F,U){var L=new w(n(X,k,F,U));return o.isGeneratorFunction(k)?L:L.next().then(function(B){return B.done?B.value:L.next()})};function S(X,k,F){var U=r;return function(B,Z){if(U===t)throw new Error("Generator is already running");if(U===a){if(B==="throw")throw Z;return z()}for(F.method=B,F.arg=Z;;){var re=F.delegate;if(re){var he=A(re,F);if(he){if(he===c)continue;return he}}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(U===r)throw U=a,F.arg;F.dispatchException(F.arg)}else F.method==="return"&&F.abrupt("return",F.arg);U=t;var Se=l(X,k,F);if(Se.type==="normal"){if(U=F.done?a:i,Se.arg===c)continue;return{value:Se.arg,done:F.done}}else Se.type==="throw"&&(U=a,F.method="throw",F.arg=Se.arg)}}}function A(X,k){var F=X.iterator[k.method];if(F===y){if(k.delegate=null,k.method==="throw"){if(X.iterator.return&&(k.method="return",k.arg=y,A(X,k),k.method==="throw"))return c;k.method="throw",k.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var U=l(F,X.iterator,k.arg);if(U.type==="throw")return k.method="throw",k.arg=U.arg,k.delegate=null,c;var L=U.arg;if(!L)return k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,c;if(L.done)k[X.resultName]=L.value,k.next=X.nextLoc,k.method!=="return"&&(k.method="next",k.arg=y);else return L;return k.delegate=null,c}C(O),O[p]="Generator",O[s]=function(){return this},O.toString=function(){return"[object Generator]"};function D(X){var k={tryLoc:X[0]};1 in X&&(k.catchLoc=X[1]),2 in X&&(k.finallyLoc=X[2],k.afterLoc=X[3]),this.tryEntries.push(k)}function M(X){var k=X.completion||{};k.type="normal",delete k.arg,X.completion=k}function N(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(D,this),this.reset(!0)}o.keys=function(X){var k=[];for(var F in X)k.push(F);return k.reverse(),function U(){for(;k.length;){var L=k.pop();if(L in X)return U.value=L,U.done=!1,U}return U.done=!0,U}};function P(X){if(X){var k=X[s];if(k)return k.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length)){var F=-1,U=function L(){for(;++F=0;--U){var L=this.tryEntries[U],B=L.completion;if(L.tryLoc==="root")return F("end");if(L.tryLoc<=this.prev){var Z=T.call(L,"catchLoc"),re=T.call(L,"finallyLoc");if(Z&&re){if(this.prev=0;--F){var U=this.tryEntries[F];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev=0;--k){var F=this.tryEntries[k];if(F.finallyLoc===X)return this.complete(F.completion,F.afterLoc),M(F),c}},catch:function(X){for(var k=this.tryEntries.length-1;k>=0;--k){var F=this.tryEntries[k];if(F.tryLoc===X){var U=F.completion;if(U.type==="throw"){var L=U.arg;M(F)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(X,k,F){return this.delegate={iterator:P(X),resultName:k,nextLoc:F},this.method==="next"&&(this.arg=y),c}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,H,b){var I=j("buffer"),v=I.Buffer;function T(g,s){for(var _ in g)s[_]=g[_]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?H.exports=I:(T(I,b),b.Buffer=y);function y(g,s,_){return v(g,s,_)}T(v,y),y.from=function(g,s,_){if(typeof g=="number")throw new TypeError("Argument must not be a number");return v(g,s,_)},y.alloc=function(g,s,_){if(typeof g!="number")throw new TypeError("Argument must be a number");var p=v(g);return s!==void 0?typeof _=="string"?p.fill(s,_):p.fill(s):p.fill(0),p},y.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return v(g)},y.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(g)}},{buffer:73}],229:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/string/from-code-point"),T=i(v),y=j("babel-runtime/core-js/json/stringify"),g=i(y),s=j("babel-runtime/helpers/typeof"),_=i(s),p=j("babel-runtime/core-js/object/define-property"),e=i(p),o=j("babel-runtime/core-js/object/keys"),n=i(o),l=j("babel-runtime/core-js/object/create"),r=i(l);function i(t){return t&&t.__esModule?t:{default:t}}(function(t){t.parser=function(Q,Y){return new c(Q,Y)},t.SAXParser=c,t.SAXStream=O,t.createStream=x,t.MAX_BUFFER_LENGTH=64*1024;var a=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(Q,Y){if(!(this instanceof c))return new c(Q,Y);var oe=this;f(oe),oe.q=oe.c="",oe.bufferCheckPosition=t.MAX_BUFFER_LENGTH,oe.opt=Y||{},oe.opt.lowercase=oe.opt.lowercase||oe.opt.lowercasetags,oe.looseCase=oe.opt.lowercase?"toLowerCase":"toUpperCase",oe.tags=[],oe.closed=oe.closedRoot=oe.sawRoot=!1,oe.tag=oe.error=null,oe.strict=!!Q,oe.noscript=!!(Q||oe.opt.noscript),oe.state=B.BEGIN,oe.strictEntities=oe.opt.strictEntities,oe.ENTITIES=oe.strictEntities?(0,r.default)(t.XML_ENTITIES):(0,r.default)(t.ENTITIES),oe.attribList=[],oe.opt.xmlns&&(oe.ns=(0,r.default)(D)),oe.trackPosition=oe.opt.position!==!1,oe.trackPosition&&(oe.position=oe.line=oe.column=0),re(oe,"onready")}r.default||(Object.create=function(Q){function Y(){}Y.prototype=Q;var oe=new Y;return oe}),n.default||(Object.keys=function(Q){var Y=[];for(var oe in Q)Q.hasOwnProperty(oe)&&Y.push(oe);return Y});function d(Q){for(var Y=Math.max(t.MAX_BUFFER_LENGTH,10),oe=0,le=0,Ee=a.length;leY)switch(a[le]){case"textNode":Se(Q);break;case"cdata":he(Q,"oncdata",Q.cdata),Q.cdata="";break;case"script":he(Q,"onscript",Q.script),Q.script="";break;default:te(Q,"Max buffer length exceeded: "+a[le])}oe=Math.max(oe,Le)}var ge=t.MAX_BUFFER_LENGTH-oe;Q.bufferCheckPosition=ge+Q.position}function f(Q){for(var Y=0,oe=a.length;Y-1&&D<=p)for(;++A3&&"WebKit"||/\bOpera\b/.test(fe)&&(/\bOPR\b/.test(w)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(w)&&!/^(?:Trident|EdgeHTML)$/.test(ae)&&"WebKit"||!ae&&/\bMSIE\b/i.test(w)&&(q=="Mac OS"?"Tasman":"Trident")||ae=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(fe)&&"NetFront")&&(ae=[te]),fe=="IE"&&(te=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(w)||0)[1])?(fe+=" Mobile",q="Windows Phone "+(/\+$/.test(te)?te:te+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(w)?(fe="IE Mobile",q="Windows Phone 8.x",Ce.unshift("desktop mode"),se||(se=(/\brv:([\d.]+)/.exec(w)||0)[1])):fe!="IE"&&ae=="Trident"&&(te=/\brv:([\d.]+)/.exec(w))&&(fe&&Ce.push("identifying as "+fe+(se?" "+se:"")),fe="IE",se=te[1]),me){if(h(S,"global"))if(L&&(te=L.lang.System,Re=te.getProperty("os.arch"),q=q||te.getProperty("os.name")+" "+te.getProperty("os.version")),B){try{se=S.require("ringo/engine").version.join("."),fe="RingoJS"}catch(_e){(te=S.system)&&te.global.system==S.system&&(fe="Narwhal",q||(q=te[0].os||null))}fe||(fe="Rhino")}else typeof S.process=="object"&&!S.process.browser&&(te=S.process)&&(typeof te.versions=="object"&&(typeof te.versions.electron=="string"?(Ce.push("Node "+te.versions.node),fe="Electron",se=te.versions.electron):typeof te.versions.nw=="string"&&(Ce.push("Chromium "+se,"Node "+te.versions.node),fe="NW.js",se=te.versions.nw)),fe||(fe="Node.js",Re=te.arch,q=te.platform,se=/[\d.]+/.exec(te.version),se=se?se[0]:null));else f(te=S.runtime)==X?(fe="Adobe AIR",q=te.flash.system.Capabilities.os):f(te=S.phantom)==U?(fe="PhantomJS",se=(te=te.version||null)&&te.major+"."+te.minor+"."+te.patch):typeof he.documentMode=="number"&&(te=/\bTrident\/(\d+)/i.exec(w))?(se=[se,he.documentMode],(te=+te[1]+4)!=se[1]&&(Ce.push("IE "+se[1]+" mode"),ae&&(ae[1]=""),se[1]=te),se=fe=="IE"?String(se[1].toFixed(1)):se[0]):typeof he.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(fe)&&(Ce.push("masking as "+fe+" "+se),fe="IE",se="11.0",ae=["Trident"],q="Windows");q=q&&c(q)}if(se&&(te=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(se)||/(?:alpha|beta)(?: ?\d)?/i.exec(w+";"+(me&&D.appMinorVersion))||/\bMinefield\b/i.test(w)&&"a")&&(pe=/b/i.test(te)?"beta":"alpha",se=se.replace(RegExp(te+"\\+?$"),"")+(pe=="beta"?re:Z)+(/\d+\+?/.exec(te)||"")),fe=="Fennec"||fe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))fe="Firefox Mobile";else if(fe=="Maxthon"&&se)se=se.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Fe))Fe=="Xbox 360"&&(q=null),Fe=="Xbox 360"&&/\bIEMobile\b/.test(w)&&Ce.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(fe)||fe&&!Fe&&!/Browser|Mobi/.test(fe))&&(q=="Windows CE"||/Mobi/i.test(w)))fe+=" Mobile";else if(fe=="IE"&&me)try{S.external===null&&Ce.unshift("platform preview")}catch(_e){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(Fe)||/\bBB10\b/.test(w))&&(te=(RegExp(Fe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(w)||0)[1]||se)?(te=[te,/BB10/.test(w)],q=(te[1]?(Fe=null,ie="BlackBerry"):"Device Software")+" "+te[0],se=null):this!=d&&Fe!="Wii"&&(me&&Se||/Opera/.test(fe)&&/\b(?:MSIE|Firefox)\b/i.test(w)||fe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||fe=="IE"&&(q&&!/^Win/.test(q)&&se>5.5||/\bWindows XP\b/.test(q)&&se>8||se==8&&!/\bTrident\b/.test(w)))&&!e.test(te=O.call(d,w.replace(e,"")+";"))&&te.name&&(te="ing as "+te.name+((te=te.version)?" "+te:""),e.test(fe)?(/\bIE\b/.test(te)&&q=="Mac OS"&&(q=null),te="identify"+te):(te="mask"+te,ke?fe=c(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):fe="Opera",/\bIE\b/.test(te)&&(q=null),me||(se=null)),ae=["Presto"],Ce.push(te));(te=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(w)||0)[1])&&(te=[parseFloat(te.replace(/\.(\d)$/,".0$1")),te],fe=="Safari"&&te[1].slice(-1)=="+"?(fe="WebKit Nightly",pe="alpha",se=te[1].slice(0,-1)):(se==te[1]||se==(te[2]=(/\bSafari\/([\d.]+\+?)/i.exec(w)||0)[1]))&&(se=null),te[1]=(/\bChrome\/([\d.]+)/i.exec(w)||0)[1],te[0]==537.36&&te[2]==537.36&&parseFloat(te[1])>=28&&ae=="WebKit"&&(ae=["Blink"]),!me||!P&&!te[1]?(ae&&(ae[1]="like Safari"),te=(te=te[0],te<400?1:te<500?2:te<526?3:te<533?4:te<534?"4+":te<535?5:te<537?6:te<538?7:te<601?8:"8")):(ae&&(ae[1]="like Chrome"),te=te[1]||(te=te[0],te<530?1:te<532?2:te<532.05?3:te<533?4:te<534.03?5:te<534.07?6:te<534.1?7:te<534.13?8:te<534.16?9:te<534.24?10:te<534.3?11:te<535.01?12:te<535.02?"13+":te<535.07?15:te<535.11?16:te<535.19?17:te<536.05?18:te<536.1?19:te<537.01?20:te<537.11?"21+":te<537.13?23:te<537.18?24:te<537.24?25:te<537.36?26:ae!="Blink"?"27":"28")),ae&&(ae[1]+=" "+(te+=typeof te=="number"?".x":/[.+]/.test(te)?"":"+")),fe=="Safari"&&(!se||parseInt(se)>45)&&(se=te)),fe=="Opera"&&(te=/\bzbov|zvav$/.exec(q))?(fe+=" ",Ce.unshift("desktop mode"),te=="zvav"?(fe+="Mini",se=null):fe+="Mobile",q=q.replace(RegExp(" *"+te+"$"),"")):fe=="Safari"&&/\bChrome\b/.exec(ae&&ae[1])&&(Ce.unshift("desktop mode"),fe="Chrome Mobile",se=null,/\bOS X\b/.test(q)?(ie="Apple",q="iOS 4.3+"):q=null),se&&se.indexOf(te=/[\d.]+$/.exec(q))==0&&w.indexOf("/"+te+"-")>-1&&(q=x(q.replace(te,""))),ae&&!/\b(?:Avant|Nook)\b/.test(fe)&&(/Browser|Lunascape|Maxthon/.test(fe)||fe!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ae[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(fe)&&ae[1])&&((te=ae[ae.length-1])&&Ce.push(te)),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ie&&Fe&&Fe.indexOf(ie)<0&&Ce.push("on "+ie),Fe&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+Fe),q&&(te=/ ([\d.+]+)$/.exec(q),be=te&&q.charAt(q.length-te[0].length-1)=="/",q={architecture:32,family:te&&!be?q.replace(te[0],""):q,version:te?te[1]:null,toString:function(){var _e=this.version;return this.family+(_e&&!be?" "+_e:"")+(this.architecture==64?" 64-bit":"")}}),(te=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+te),"")),fe&&(/\bWOW64\b/i.test(w)||me&&/\w(?:86|32)$/.test(D.cpuClass||D.platform)&&!/\bWin64; x64\b/i.test(w))&&Ce.unshift("32-bit")):q&&/^OS X/.test(q.family)&&fe=="Chrome"&&parseFloat(se)>=39&&(q.architecture=64),w||(w=null);var De={};return De.description=w,De.layout=ae&&ae[0],De.manufacturer=ie,De.name=fe,De.prerelease=pe,De.product=Fe,De.ua=w,De.version=fe&&se,De.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},De.parse=O,De.toString=ge,De.version&&Ce.unshift(se),De.name&&Ce.unshift(fe),q&&fe&&!(q==String(q).split(" ")[0]&&(q==fe.split(" ")[0]||Fe))&&Ce.push(Fe?"("+q+")":"on "+q),Ce.length&&(De.description=Ce.join(" ")),De}var C=O();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=C,define(function(){return C})):g&&s?d(C,function(w,S){g[S]=w}):T.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,H,b){(function(I){"use strict";typeof I=="undefined"||!I.version||I.version.indexOf("v0.")===0||I.version.indexOf("v1.")===0&&I.version.indexOf("v1.8.")!==0?H.exports={nextTick:v}:H.exports=I;function v(T,y,g,s){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var _=arguments.length,p,e;switch(_){case 0:case 1:return I.nextTick(T);case 2:return I.nextTick(function(){T.call(null,y)});case 3:return I.nextTick(function(){T.call(null,y,g)});case 4:return I.nextTick(function(){T.call(null,y,g,s)});default:for(p=new Array(_-1),e=0;e1)for(var d=1;d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=p-e,u=Math.floor,E=String.fromCharCode,x;function O(F){throw new RangeError(f[F])}function C(F,U){for(var L=F.length,B=[];L--;)B[L]=U(F[L]);return B}function w(F,U){var L=F.split("@"),B="";L.length>1&&(B=L[0]+"@",F=L[1]),F=F.replace(d,".");var Z=F.split("."),re=C(Z,U).join(".");return B+re}function S(F){for(var U=[],L=0,B=F.length,Z,re;L=55296&&Z<=56319&&L65535&&(U-=65536,L+=E(U>>>10&1023|55296),U=56320|U&1023),L+=E(U),L}).join("")}function D(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:p}function M(F,U){return F+22+75*(F<26)-((U!=0)<<5)}function N(F,U,L){var B=0;for(F=L?u(F/l):F>>1,F+=u(F/U);F>h*o>>1;B+=p)F=u(F/h);return u(B+(h+1)*F/(F+n))}function P(F){var U=[],L=F.length,B,Z=0,re=i,he=r,Se,ke,te,Re,Ce,pe,me,se,be;for(Se=F.lastIndexOf(t),Se<0&&(Se=0),ke=0;ke=128&&O("not-basic"),U.push(F.charCodeAt(ke));for(te=Se>0?Se+1:0;te=L&&O("invalid-input"),me=D(F.charCodeAt(te++)),(me>=p||me>u((_-Z)/Ce))&&O("overflow"),Z+=me*Ce,se=pe<=he?e:pe>=he+o?o:pe-he,meu(_/be)&&O("overflow"),Ce*=be;B=U.length+1,he=N(Z-Re,B,Re==0),u(Z/B)>_-re&&O("overflow"),re+=u(Z/B),Z%=B,U.splice(Z++,0,re)}return A(U)}function z(F){var U,L,B,Z,re,he,Se,ke,te,Re,Ce,pe=[],me,se,be,ae;for(F=S(F),me=F.length,U=i,L=0,re=r,he=0;he=U&&Ceu((_-L)/se)&&O("overflow"),L+=(Se-U)*se,U=Se,he=0;he_&&O("overflow"),Ce==U){for(ke=L,te=p;!(Re=te<=re?e:te>=re+o?o:te-re,ke0&&o>e&&(o=e);for(var n=0;n=0?(i=l.substr(0,r),t=l.substr(r+1)):(i=l,t=""),a=decodeURIComponent(i),c=decodeURIComponent(t),I(_,a)?v(_[a])?_[a].push(c):_[a]=[_[a],c]:_[a]=c}return _};var v=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,H,b){"use strict";var I=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};H.exports=function(g,s,_,p){return s=s||"&",_=_||"=",g===null&&(g=void 0),typeof g=="object"?T(y(g),function(e){var o=encodeURIComponent(I(e))+_;return v(g[e])?T(g[e],function(n){return o+encodeURIComponent(I(n))}).join(s):o+encodeURIComponent(I(g[e]))}).join(s):p?encodeURIComponent(I(p))+_+encodeURIComponent(I(g)):""};var v=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function T(g,s){if(g.map)return g.map(s);for(var _=[],p=0;p0?(typeof fe!="string"&&!Q.objectMode&&(0,y.default)(fe)!==i.prototype&&(fe=a(fe)),ie?Q.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):D(ae,Q,fe,!0):Q.ended?ae.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!Fe?(fe=Q.decoder.write(fe),Q.objectMode||fe.length!==0?D(ae,Q,fe,!1):L(ae,Q)):D(ae,Q,fe,!1))):ie||(Q.reading=!1)}return N(Q)}function D(ae,fe,Fe,ie){fe.flowing&&fe.length===0&&!fe.sync?(ae.emit("data",Fe),ae.read(0)):(fe.length+=fe.objectMode?1:Fe.length,ie?fe.buffer.unshift(Fe):fe.buffer.push(Fe),fe.needReadable&&F(ae)),L(ae,fe)}function M(ae,fe){var Fe;return!c(fe)&&typeof fe!="string"&&fe!==void 0&&!ae.objectMode&&(Fe=new TypeError("Invalid non-string/buffer chunk")),Fe}function N(ae){return!ae.ended&&(ae.needReadable||ae.length=P?ae=P:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}function X(ae,fe){return ae<=0||fe.length===0&&fe.ended?0:fe.objectMode?1:ae!==ae?fe.flowing&&fe.length?fe.buffer.head.data.length:fe.length:(ae>fe.highWaterMark&&(fe.highWaterMark=z(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}S.prototype.read=function(ae){h("read",ae),ae=parseInt(ae,10);var fe=this._readableState,Fe=ae;if(ae!==0&&(fe.emittedReadable=!1),ae===0&&fe.needReadable&&(fe.length>=fe.highWaterMark||fe.ended))return h("read: emitReadable",fe.length,fe.ended),fe.length===0&&fe.ended?me(this):F(this),null;if(ae=X(ae,fe),ae===0&&fe.ended)return fe.length===0&&me(this),null;var ie=fe.needReadable;h("need readable",ie),(fe.length===0||fe.length-ae0?q=te(ae,fe):q=null,q===null?(fe.needReadable=!0,ae=0):fe.length-=ae,fe.length===0&&(fe.ended||(fe.needReadable=!0),Fe!==ae&&fe.ended&&me(this)),q!==null&&this.emit("data",q),q};function k(ae,fe){if(fe.ended)return;if(fe.decoder){var Fe=fe.decoder.end();Fe&&Fe.length&&(fe.buffer.push(Fe),fe.length+=fe.objectMode?1:Fe.length)}fe.ended=!0,F(ae)}function F(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(h("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?p.nextTick(U,ae):U(ae))}function U(ae){h("emit readable"),ae.emit("readable"),ke(ae)}function L(ae,fe){fe.readingMore||(fe.readingMore=!0,p.nextTick(B,ae,fe))}function B(ae,fe){for(var Fe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length1&&be(ie.pipes,ae)!==-1)&&!Ee&&(h("false write response, pause",Fe._readableState.awaitDrain),Fe._readableState.awaitDrain++,ge=!0),Fe.pause())}function _e(Me){h("onerror",Me),Ge(),ae.removeListener("error",_e),l(ae,"error")===0&&ae.emit("error",Me)}C(ae,"error",_e);function Xe(){ae.removeListener("finish",tt),Ge()}ae.once("close",Xe);function tt(){h("onfinish"),ae.removeListener("close",Xe),Ge()}ae.once("finish",tt);function Ge(){h("unpipe"),Fe.unpipe(ae)}return ae.emit("pipe",Fe),ie.flowing||(h("pipe resume"),Fe.resume()),ae};function Z(ae){return function(){var fe=ae._readableState;h("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&l(ae,"data")&&(fe.flowing=!0,ke(ae))}}S.prototype.unpipe=function(ae){var fe=this._readableState,Fe={hasUnpiped:!1};if(fe.pipesCount===0)return this;if(fe.pipesCount===1)return ae&&ae!==fe.pipes?this:(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,Fe),this);if(!ae){var ie=fe.pipes,q=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var Q=0;Q=fe.length?(fe.decoder?Fe=fe.buffer.join(""):fe.buffer.length===1?Fe=fe.buffer.head.data:Fe=fe.buffer.concat(fe.length),fe.buffer.clear()):Fe=Re(ae,fe.buffer,fe.decoder),Fe}function Re(ae,fe,Fe){var ie;return aeQ.length?Q.length:ae;if(Y===Q.length?q+=Q:q+=Q.slice(0,ae),ae-=Y,ae===0){Y===Q.length?(++ie,Fe.next?fe.head=Fe.next:fe.head=fe.tail=null):(fe.head=Fe,Fe.data=Q.slice(Y));break}++ie}return fe.length-=ie,q}function pe(ae,fe){var Fe=i.allocUnsafe(ae),ie=fe.head,q=1;for(ie.data.copy(Fe),ae-=ie.data.length;ie=ie.next;){var Q=ie.data,Y=ae>Q.length?Q.length:ae;if(Q.copy(Fe,Fe.length-ae,0,Y),ae-=Y,ae===0){Y===Q.length?(++q,ie.next?fe.head=ie.next:fe.head=fe.tail=null):(fe.head=ie,ie.data=Q.slice(Y));break}++q}return fe.length-=q,Fe}function me(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,p.nextTick(se,fe,ae))}function se(ae,fe){!ae.endEmitted&&ae.length===0&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function be(ae,fe){for(var Fe=0,ie=ae.length;Fe-1?l.default:i.nextTick,d;M.WritableState=A;var f=(0,o.default)(j("core-util-is"));f.inherits=j("inherits");var h={deprecate:j("util-deprecate")},u=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,x=v.Uint8Array||function(){};function O(pe){return E.from(pe)}function C(pe){return E.isBuffer(pe)||pe instanceof x}var w=j("./internal/streams/destroy");f.inherits(M,u);function S(){}function A(pe,me){d=d||j("./_stream_duplex"),pe=pe||{};var se=me instanceof d;this.objectMode=!!pe.objectMode,se&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var be=pe.highWaterMark,ae=pe.writableHighWaterMark,fe=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:se&&(ae||ae===0)?this.highWaterMark=ae:this.highWaterMark=fe,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Fe=pe.decodeStrings===!1;this.decodeStrings=!Fe,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(me,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}A.prototype.getBuffer=function(){for(var me=this.bufferedRequest,se=[];me;)se.push(me),me=me.next;return se},function(){try{Object.defineProperty(A.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pe){}}();var D;typeof p.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(D=Function.prototype[s.default],(0,y.default)(M,s.default,{value:function(me){return D.call(this,me)?!0:this!==M?!1:me&&me._writableState instanceof A}})):D=function(me){return me instanceof this};function M(pe){if(d=d||j("./_stream_duplex"),!D.call(M,this)&&!(this instanceof d))return new M(pe);this._writableState=new A(pe,this),this.writable=!0,pe&&(typeof pe.write=="function"&&(this._write=pe.write),typeof pe.writev=="function"&&(this._writev=pe.writev),typeof pe.destroy=="function"&&(this._destroy=pe.destroy),typeof pe.final=="function"&&(this._final=pe.final)),u.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(pe,me){var se=new Error("write after end");pe.emit("error",se),i.nextTick(me,se)}function P(pe,me,se,be){var ae=!0,fe=!1;return se===null?fe=new TypeError("May not write null values to stream"):typeof se!="string"&&se!==void 0&&!me.objectMode&&(fe=new TypeError("Invalid non-string/buffer chunk")),fe&&(pe.emit("error",fe),i.nextTick(be,fe),ae=!1),ae}M.prototype.write=function(pe,me,se){var be=this._writableState,ae=!1,fe=!be.objectMode&&C(pe);return fe&&!E.isBuffer(pe)&&(pe=O(pe)),typeof me=="function"&&(se=me,me=null),fe?me="buffer":me||(me=be.defaultEncoding),typeof se!="function"&&(se=S),be.ended?N(this,se):(fe||P(this,be,pe,se))&&(be.pendingcb++,ae=X(this,be,fe,pe,me,se)),ae},M.prototype.cork=function(){var pe=this._writableState;pe.corked++},M.prototype.uncork=function(){var pe=this._writableState;pe.corked&&(pe.corked--,!pe.writing&&!pe.corked&&!pe.finished&&!pe.bufferProcessing&&pe.bufferedRequest&&re(this,pe))},M.prototype.setDefaultEncoding=function(me){if(typeof me=="string"&&(me=me.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((me+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+me);return this._writableState.defaultEncoding=me,this};function z(pe,me,se){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof me=="string"&&(me=E.from(me,se)),me}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(pe,me,se,be,ae,fe){if(!se){var Fe=z(me,be,ae);be!==Fe&&(se=!0,ae="buffer",be=Fe)}var ie=me.objectMode?1:be.length;me.length+=ie;var q=me.length0?this.tail.next=p:this.head=p,this.tail=p,++this.length},g.prototype.unshift=function(_){var p={data:_,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length},g.prototype.shift=function(){if(this.length===0)return;var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(_){if(this.length===0)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=_+p.data;return e},g.prototype.concat=function(_){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var p=v.allocUnsafe(_>>>0),e=this.head,o=0;e;)y(e.data,p,o),o+=e.data.length,e=e.next;return p},g}(),T&&T.inspect&&T.inspect.custom&&(H.exports.prototype[T.inspect.custom]=function(){var g=T.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":228,util:71}],220:[function(j,H,b){"use strict";var I=j("process-nextick-args");function v(g,s){var _=this,p=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return p||e?(s?s(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&I.nextTick(y,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(o){!s&&o?(I.nextTick(y,_,o),_._writableState&&(_._writableState.errorEmitted=!0)):s&&s(o)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(g,s){g.emit("error",s)}H.exports={destroy:v,undestroy:T}},{"process-nextick-args":207}],221:[function(j,H,b){"use strict";H.exports=j("events").EventEmitter},{events:192}],222:[function(j,H,b){H.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,H,b){b=H.exports=j("./lib/_stream_readable.js"),b.Stream=b,b.Readable=b,b.Writable=j("./lib/_stream_writable.js"),b.Duplex=j("./lib/_stream_duplex.js"),b.Transform=j("./lib/_stream_transform.js"),b.PassThrough=j("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(j,H,b){H.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,H,b){H.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,H,b){var I=function(){return this}()||Function("return this")(),v=I.regeneratorRuntime&&Object.getOwnPropertyNames(I).indexOf("regeneratorRuntime")>=0,T=v&&I.regeneratorRuntime;if(I.regeneratorRuntime=void 0,H.exports=j("./runtime"),v)I.regeneratorRuntime=T;else try{delete I.regeneratorRuntime}catch(y){I.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,H,b){!function(I){"use strict";var v=Object.prototype,T=v.hasOwnProperty,y,g=typeof Symbol=="function"?Symbol:{},s=g.iterator||"@@iterator",_=g.asyncIterator||"@@asyncIterator",p=g.toStringTag||"@@toStringTag",e=typeof H=="object",o=I.regeneratorRuntime;if(o){e&&(H.exports=o);return}o=I.regeneratorRuntime=e?H.exports:{};function n(X,k,F,U){var L=k&&k.prototype instanceof d?k:d,B=Object.create(L.prototype),Z=new N(U||[]);return B._invoke=S(X,F,Z),B}o.wrap=n;function l(X,k,F){try{return{type:"normal",arg:X.call(k,F)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",t="executing",a="completed",c={};function d(){}function f(){}function h(){}var u={};u[s]=function(){return this};var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==v&&T.call(x,s)&&(u=x);var O=h.prototype=d.prototype=Object.create(u);f.prototype=O.constructor=h,h.constructor=f,h[p]=f.displayName="GeneratorFunction";function C(X){["next","throw","return"].forEach(function(k){X[k]=function(F){return this._invoke(k,F)}})}o.isGeneratorFunction=function(X){var k=typeof X=="function"&&X.constructor;return k?k===f||(k.displayName||k.name)==="GeneratorFunction":!1},o.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,h):(X.__proto__=h,p in X||(X[p]="GeneratorFunction")),X.prototype=Object.create(O),X},o.awrap=function(X){return{__await:X}};function w(X){function k(L,B,Z,re){var he=l(X[L],X,B);if(he.type==="throw")re(he.arg);else{var Se=he.arg,ke=Se.value;return ke&&typeof ke=="object"&&T.call(ke,"__await")?Promise.resolve(ke.__await).then(function(te){k("next",te,Z,re)},function(te){k("throw",te,Z,re)}):Promise.resolve(ke).then(function(te){Se.value=te,Z(Se)},re)}}var F;function U(L,B){function Z(){return new Promise(function(re,he){k(L,B,re,he)})}return F=F?F.then(Z,Z):Z()}this._invoke=U}C(w.prototype),w.prototype[_]=function(){return this},o.AsyncIterator=w,o.async=function(X,k,F,U){var L=new w(n(X,k,F,U));return o.isGeneratorFunction(k)?L:L.next().then(function(B){return B.done?B.value:L.next()})};function S(X,k,F){var U=r;return function(B,Z){if(U===t)throw new Error("Generator is already running");if(U===a){if(B==="throw")throw Z;return z()}for(F.method=B,F.arg=Z;;){var re=F.delegate;if(re){var he=A(re,F);if(he){if(he===c)continue;return he}}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(U===r)throw U=a,F.arg;F.dispatchException(F.arg)}else F.method==="return"&&F.abrupt("return",F.arg);U=t;var Se=l(X,k,F);if(Se.type==="normal"){if(U=F.done?a:i,Se.arg===c)continue;return{value:Se.arg,done:F.done}}else Se.type==="throw"&&(U=a,F.method="throw",F.arg=Se.arg)}}}function A(X,k){var F=X.iterator[k.method];if(F===y){if(k.delegate=null,k.method==="throw"){if(X.iterator.return&&(k.method="return",k.arg=y,A(X,k),k.method==="throw"))return c;k.method="throw",k.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var U=l(F,X.iterator,k.arg);if(U.type==="throw")return k.method="throw",k.arg=U.arg,k.delegate=null,c;var L=U.arg;if(!L)return k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,c;if(L.done)k[X.resultName]=L.value,k.next=X.nextLoc,k.method!=="return"&&(k.method="next",k.arg=y);else return L;return k.delegate=null,c}C(O),O[p]="Generator",O[s]=function(){return this},O.toString=function(){return"[object Generator]"};function D(X){var k={tryLoc:X[0]};1 in X&&(k.catchLoc=X[1]),2 in X&&(k.finallyLoc=X[2],k.afterLoc=X[3]),this.tryEntries.push(k)}function M(X){var k=X.completion||{};k.type="normal",delete k.arg,X.completion=k}function N(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(D,this),this.reset(!0)}o.keys=function(X){var k=[];for(var F in X)k.push(F);return k.reverse(),function U(){for(;k.length;){var L=k.pop();if(L in X)return U.value=L,U.done=!1,U}return U.done=!0,U}};function P(X){if(X){var k=X[s];if(k)return k.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length)){var F=-1,U=function L(){for(;++F=0;--U){var L=this.tryEntries[U],B=L.completion;if(L.tryLoc==="root")return F("end");if(L.tryLoc<=this.prev){var Z=T.call(L,"catchLoc"),re=T.call(L,"finallyLoc");if(Z&&re){if(this.prev=0;--F){var U=this.tryEntries[F];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev=0;--k){var F=this.tryEntries[k];if(F.finallyLoc===X)return this.complete(F.completion,F.afterLoc),M(F),c}},catch:function(X){for(var k=this.tryEntries.length-1;k>=0;--k){var F=this.tryEntries[k];if(F.tryLoc===X){var U=F.completion;if(U.type==="throw"){var L=U.arg;M(F)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(X,k,F){return this.delegate={iterator:P(X),resultName:k,nextLoc:F},this.method==="next"&&(this.arg=y),c}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,H,b){var I=j("buffer"),v=I.Buffer;function T(g,s){for(var _ in g)s[_]=g[_]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?H.exports=I:(T(I,b),b.Buffer=y);function y(g,s,_){return v(g,s,_)}T(v,y),y.from=function(g,s,_){if(typeof g=="number")throw new TypeError("Argument must not be a number");return v(g,s,_)},y.alloc=function(g,s,_){if(typeof g!="number")throw new TypeError("Argument must be a number");var p=v(g);return s!==void 0?typeof _=="string"?p.fill(s,_):p.fill(s):p.fill(0),p},y.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return v(g)},y.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(g)}},{buffer:73}],229:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/string/from-code-point"),T=i(v),y=j("babel-runtime/core-js/json/stringify"),g=i(y),s=j("babel-runtime/helpers/typeof"),_=i(s),p=j("babel-runtime/core-js/object/define-property"),e=i(p),o=j("babel-runtime/core-js/object/keys"),n=i(o),l=j("babel-runtime/core-js/object/create"),r=i(l);function i(t){return t&&t.__esModule?t:{default:t}}(function(t){t.parser=function(Q,Y){return new c(Q,Y)},t.SAXParser=c,t.SAXStream=O,t.createStream=x,t.MAX_BUFFER_LENGTH=64*1024;var a=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(Q,Y){if(!(this instanceof c))return new c(Q,Y);var oe=this;f(oe),oe.q=oe.c="",oe.bufferCheckPosition=t.MAX_BUFFER_LENGTH,oe.opt=Y||{},oe.opt.lowercase=oe.opt.lowercase||oe.opt.lowercasetags,oe.looseCase=oe.opt.lowercase?"toLowerCase":"toUpperCase",oe.tags=[],oe.closed=oe.closedRoot=oe.sawRoot=!1,oe.tag=oe.error=null,oe.strict=!!Q,oe.noscript=!!(Q||oe.opt.noscript),oe.state=B.BEGIN,oe.strictEntities=oe.opt.strictEntities,oe.ENTITIES=oe.strictEntities?(0,r.default)(t.XML_ENTITIES):(0,r.default)(t.ENTITIES),oe.attribList=[],oe.opt.xmlns&&(oe.ns=(0,r.default)(D)),oe.trackPosition=oe.opt.position!==!1,oe.trackPosition&&(oe.position=oe.line=oe.column=0),re(oe,"onready")}r.default||(Object.create=function(Q){function Y(){}Y.prototype=Q;var oe=new Y;return oe}),n.default||(Object.keys=function(Q){var Y=[];for(var oe in Q)Q.hasOwnProperty(oe)&&Y.push(oe);return Y});function d(Q){for(var Y=Math.max(t.MAX_BUFFER_LENGTH,10),oe=0,le=0,Ee=a.length;leY)switch(a[le]){case"textNode":Se(Q);break;case"cdata":he(Q,"oncdata",Q.cdata),Q.cdata="";break;case"script":he(Q,"onscript",Q.script),Q.script="";break;default:te(Q,"Max buffer length exceeded: "+a[le])}oe=Math.max(oe,Le)}var ge=t.MAX_BUFFER_LENGTH-oe;Q.bufferCheckPosition=ge+Q.position}function f(Q){for(var Y=0,oe=a.length;Y"||X(Q)}function U(Q,Y){return Q.test(Y)}function L(Q,Y){return!U(Q,Y)}var B=0;t.STATE={BEGIN:B++,BEGIN_WHITESPACE:B++,TEXT:B++,TEXT_ENTITY:B++,OPEN_WAKA:B++,SGML_DECL:B++,SGML_DECL_QUOTED:B++,DOCTYPE:B++,DOCTYPE_QUOTED:B++,DOCTYPE_DTD:B++,DOCTYPE_DTD_QUOTED:B++,COMMENT_STARTING:B++,COMMENT:B++,COMMENT_ENDING:B++,COMMENT_ENDED:B++,CDATA:B++,CDATA_ENDING:B++,CDATA_ENDING_2:B++,PROC_INST:B++,PROC_INST_BODY:B++,PROC_INST_ENDING:B++,OPEN_TAG:B++,OPEN_TAG_SLASH:B++,ATTRIB:B++,ATTRIB_NAME:B++,ATTRIB_NAME_SAW_WHITE:B++,ATTRIB_VALUE:B++,ATTRIB_VALUE_QUOTED:B++,ATTRIB_VALUE_CLOSED:B++,ATTRIB_VALUE_UNQUOTED:B++,ATTRIB_VALUE_ENTITY_Q:B++,ATTRIB_VALUE_ENTITY_U:B++,CLOSE_TAG:B++,CLOSE_TAG_SAW_WHITE:B++,SCRIPT:B++,SCRIPT_ENDING:B++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(t.ENTITIES).forEach(function(Q){var Y=t.ENTITIES[Q],oe=typeof Y=="number"?String.fromCharCode(Y):Y;t.ENTITIES[Q]=oe});for(var Z in t.STATE)t.STATE[t.STATE[Z]]=Z;B=t.STATE;function re(Q,Y,oe){Q[Y]&&Q[Y](oe)}function he(Q,Y,oe){Q.textNode&&Se(Q),re(Q,Y,oe)}function Se(Q){Q.textNode=ke(Q.opt,Q.textNode),Q.textNode&&re(Q,"ontext",Q.textNode),Q.textNode=""}function ke(Q,Y){return Q.trim&&(Y=Y.trim()),Q.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function te(Q,Y){return Se(Q),Q.trackPosition&&(Y+=` Line: `+Q.line+` Column: `+Q.column+` Char: `+Q.c),Y=new Error(Y),Q.error=Y,re(Q,"onerror",Y),Q}function Re(Q){return Q.sawRoot&&!Q.closedRoot&&Ce(Q,"Unclosed root tag"),Q.state!==B.BEGIN&&Q.state!==B.BEGIN_WHITESPACE&&Q.state!==B.TEXT&&te(Q,"Unexpected end"),Se(Q),Q.c="",Q.closed=!0,re(Q,"onend"),c.call(Q,Q.strict,Q.opt),Q}function Ce(Q,Y){if((typeof Q=="undefined"?"undefined":(0,_.default)(Q))!=="object"||!(Q instanceof c))throw new Error("bad call to strictFail");Q.strict&&te(Q,Y)}function pe(Q){Q.strict||(Q.tagName=Q.tagName[Q.looseCase]());var Y=Q.tags[Q.tags.length-1]||Q,oe=Q.tag={name:Q.tagName,attributes:{}};Q.opt.xmlns&&(oe.ns=Y.ns),Q.attribList.length=0,he(Q,"onopentagstart",oe)}function me(Q,Y){var oe=Q.indexOf(":"),le=oe<0?["",Q]:Q.split(":"),Ee=le[0],Le=le[1];return Y&&Q==="xmlns"&&(Ee="xmlns",Le=""),{prefix:Ee,local:Le}}function se(Q){if(Q.strict||(Q.attribName=Q.attribName[Q.looseCase]()),Q.attribList.indexOf(Q.attribName)!==-1||Q.tag.attributes.hasOwnProperty(Q.attribName)){Q.attribName=Q.attribValue="";return}if(Q.opt.xmlns){var Y=me(Q.attribName,!0),oe=Y.prefix,le=Y.local;if(oe==="xmlns")if(le==="xml"&&Q.attribValue!==S)Ce(Q,"xml: prefix must be bound to "+S+` Actual: `+Q.attribValue);else if(le==="xmlns"&&Q.attribValue!==A)Ce(Q,"xmlns: prefix must be bound to "+A+` -Actual: `+Q.attribValue);else{var Ee=Q.tag,Le=Q.tags[Q.tags.length-1]||Q;Ee.ns===Le.ns&&(Ee.ns=(0,r.default)(Le.ns)),Ee.ns[le]=Q.attribValue}Q.attribList.push([Q.attribName,Q.attribValue])}else Q.tag.attributes[Q.attribName]=Q.attribValue,he(Q,"onattribute",{name:Q.attribName,value:Q.attribValue});Q.attribName=Q.attribValue=""}function be(Q,Y){if(Q.opt.xmlns){var oe=Q.tag,le=me(Q.tagName);oe.prefix=le.prefix,oe.local=le.local,oe.uri=oe.ns[le.prefix]||"",oe.prefix&&!oe.uri&&(Ce(Q,"Unbound namespace prefix: "+(0,g.default)(Q.tagName)),oe.uri=le.prefix);var Ee=Q.tags[Q.tags.length-1]||Q;oe.ns&&Ee.ns!==oe.ns&&(0,n.default)(oe.ns).forEach(function(Ve){he(Q,"onopennamespace",{prefix:Ve,uri:oe.ns[Ve]})});for(var Le=0,ge=Q.attribList.length;Le",Q.tagName="",Q.state=B.SCRIPT;return}he(Q,"onscript",Q.script),Q.script=""}var Y=Q.tags.length,oe=Q.tagName;Q.strict||(oe=oe[Q.looseCase]());for(var le=oe;Y--;){var Ee=Q.tags[Y];if(Ee.name!==le)Ce(Q,"Unexpected close tag");else break}if(Y<0){Ce(Q,"Unmatched closing tag: "+Q.tagName),Q.textNode+="",Q.state=B.TEXT;return}Q.tagName=oe;for(var Le=Q.tags.length;Le-- >Y;){var ge=Q.tag=Q.tags.pop();Q.tagName=Q.tag.name,he(Q,"onclosetag",Q.tagName);var De={};for(var _e in ge.ns)De[_e]=ge.ns[_e];var Xe=Q.tags[Q.tags.length-1]||Q;Q.opt.xmlns&&ge.ns!==Xe.ns&&(0,n.default)(ge.ns).forEach(function(tt){var Ge=ge.ns[tt];he(Q,"onclosenamespace",{prefix:tt,uri:Ge})})}Y===0&&(Q.closedRoot=!0),Q.tagName=Q.attribValue=Q.attribName="",Q.attribList.length=0,Q.state=B.TEXT}function fe(Q){var Y=Q.entity,oe=Y.toLowerCase(),le,Ee="";return Q.ENTITIES[Y]?Q.ENTITIES[Y]:Q.ENTITIES[oe]?Q.ENTITIES[oe]:(Y=oe,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),le=parseInt(Y,16),Ee=le.toString(16)):(Y=Y.slice(1),le=parseInt(Y,10),Ee=le.toString(10))),Y=Y.replace(/^0+/,""),isNaN(le)||Ee.toLowerCase()!==Y?(Ce(Q,"Invalid character entity"),"&"+Q.entity+";"):(0,T.default)(le))}function Fe(Q,Y){Y==="<"?(Q.state=B.OPEN_WAKA,Q.startTagPosition=Q.position):X(Y)||(Ce(Q,"Non-whitespace before first tag."),Q.textNode=Y,Q.state=B.TEXT)}function ie(Q,Y){var oe="";return Y",Q.tagName="",Q.state=B.SCRIPT;return}he(Q,"onscript",Q.script),Q.script=""}var Y=Q.tags.length,oe=Q.tagName;Q.strict||(oe=oe[Q.looseCase]());for(var le=oe;Y--;){var Ee=Q.tags[Y];if(Ee.name!==le)Ce(Q,"Unexpected close tag");else break}if(Y<0){Ce(Q,"Unmatched closing tag: "+Q.tagName),Q.textNode+="",Q.state=B.TEXT;return}Q.tagName=oe;for(var Le=Q.tags.length;Le-- >Y;){var ge=Q.tag=Q.tags.pop();Q.tagName=Q.tag.name,he(Q,"onclosetag",Q.tagName);var De={};for(var _e in ge.ns)De[_e]=ge.ns[_e];var Xe=Q.tags[Q.tags.length-1]||Q;Q.opt.xmlns&&ge.ns!==Xe.ns&&(0,n.default)(ge.ns).forEach(function(tt){var Ge=ge.ns[tt];he(Q,"onclosenamespace",{prefix:tt,uri:Ge})})}Y===0&&(Q.closedRoot=!0),Q.tagName=Q.attribValue=Q.attribName="",Q.attribList.length=0,Q.state=B.TEXT}function fe(Q){var Y=Q.entity,oe=Y.toLowerCase(),le,Ee="";return Q.ENTITIES[Y]?Q.ENTITIES[Y]:Q.ENTITIES[oe]?Q.ENTITIES[oe]:(Y=oe,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),le=parseInt(Y,16),Ee=le.toString(16)):(Y=Y.slice(1),le=parseInt(Y,10),Ee=le.toString(10))),Y=Y.replace(/^0+/,""),isNaN(le)||Ee.toLowerCase()!==Y?(Ce(Q,"Invalid character entity"),"&"+Q.entity+";"):(0,T.default)(le))}function Fe(Q,Y){Y==="<"?(Q.state=B.OPEN_WAKA,Q.startTagPosition=Q.position):X(Y)||(Ce(Q,"Non-whitespace before first tag."),Q.textNode=Y,Q.state=B.TEXT)}function ie(Q,Y){var oe="";return Y"?(he(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=B.TEXT):(k(le)&&(Y.state=B.SGML_DECL_QUOTED),Y.sgmlDecl+=le);continue;case B.SGML_DECL_QUOTED:le===Y.q&&(Y.state=B.SGML_DECL,Y.q=""),Y.sgmlDecl+=le;continue;case B.DOCTYPE:le===">"?(Y.state=B.TEXT,he(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=le,le==="["?Y.state=B.DOCTYPE_DTD:k(le)&&(Y.state=B.DOCTYPE_QUOTED,Y.q=le));continue;case B.DOCTYPE_QUOTED:Y.doctype+=le,le===Y.q&&(Y.q="",Y.state=B.DOCTYPE);continue;case B.DOCTYPE_DTD:Y.doctype+=le,le==="]"?Y.state=B.DOCTYPE:k(le)&&(Y.state=B.DOCTYPE_DTD_QUOTED,Y.q=le);continue;case B.DOCTYPE_DTD_QUOTED:Y.doctype+=le,le===Y.q&&(Y.state=B.DOCTYPE_DTD,Y.q="");continue;case B.COMMENT:le==="-"?Y.state=B.COMMENT_ENDING:Y.comment+=le;continue;case B.COMMENT_ENDING:le==="-"?(Y.state=B.COMMENT_ENDED,Y.comment=ke(Y.opt,Y.comment),Y.comment&&he(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+le,Y.state=B.COMMENT);continue;case B.COMMENT_ENDED:le!==">"?(Ce(Y,"Malformed comment"),Y.comment+="--"+le,Y.state=B.COMMENT):Y.state=B.TEXT;continue;case B.CDATA:le==="]"?Y.state=B.CDATA_ENDING:Y.cdata+=le;continue;case B.CDATA_ENDING:le==="]"?Y.state=B.CDATA_ENDING_2:(Y.cdata+="]"+le,Y.state=B.CDATA);continue;case B.CDATA_ENDING_2:le===">"?(Y.cdata&&he(Y,"oncdata",Y.cdata),he(Y,"onclosecdata"),Y.cdata="",Y.state=B.TEXT):le==="]"?Y.cdata+="]":(Y.cdata+="]]"+le,Y.state=B.CDATA);continue;case B.PROC_INST:le==="?"?Y.state=B.PROC_INST_ENDING:X(le)?Y.state=B.PROC_INST_BODY:Y.procInstName+=le;continue;case B.PROC_INST_BODY:if(!Y.procInstBody&&X(le))continue;le==="?"?Y.state=B.PROC_INST_ENDING:Y.procInstBody+=le;continue;case B.PROC_INST_ENDING:le===">"?(he(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=B.TEXT):(Y.procInstBody+="?"+le,Y.state=B.PROC_INST_BODY);continue;case B.OPEN_TAG:U(N,le)?Y.tagName+=le:(pe(Y),le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:(X(le)||Ce(Y,"Invalid character in tag name"),Y.state=B.ATTRIB));continue;case B.OPEN_TAG_SLASH:le===">"?(be(Y,!0),ae(Y)):(Ce(Y,"Forward-slash in opening tag not followed by >"),Y.state=B.ATTRIB);continue;case B.ATTRIB:if(X(le))continue;le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:U(M,le)?(Y.attribName=le,Y.attribValue="",Y.state=B.ATTRIB_NAME):Ce(Y,"Invalid attribute name");continue;case B.ATTRIB_NAME:le==="="?Y.state=B.ATTRIB_VALUE:le===">"?(Ce(Y,"Attribute without value"),Y.attribValue=Y.attribName,se(Y),be(Y)):X(le)?Y.state=B.ATTRIB_NAME_SAW_WHITE:U(N,le)?Y.attribName+=le:Ce(Y,"Invalid attribute name");continue;case B.ATTRIB_NAME_SAW_WHITE:if(le==="=")Y.state=B.ATTRIB_VALUE;else{if(X(le))continue;Ce(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",he(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",le===">"?be(Y):U(M,le)?(Y.attribName=le,Y.state=B.ATTRIB_NAME):(Ce(Y,"Invalid attribute name"),Y.state=B.ATTRIB)}continue;case B.ATTRIB_VALUE:if(X(le))continue;k(le)?(Y.q=le,Y.state=B.ATTRIB_VALUE_QUOTED):(Ce(Y,"Unquoted attribute value"),Y.state=B.ATTRIB_VALUE_UNQUOTED,Y.attribValue=le);continue;case B.ATTRIB_VALUE_QUOTED:if(le!==Y.q){le==="&"?Y.state=B.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=le;continue}se(Y),Y.q="",Y.state=B.ATTRIB_VALUE_CLOSED;continue;case B.ATTRIB_VALUE_CLOSED:X(le)?Y.state=B.ATTRIB:le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:U(M,le)?(Ce(Y,"No whitespace between attributes"),Y.attribName=le,Y.attribValue="",Y.state=B.ATTRIB_NAME):Ce(Y,"Invalid attribute name");continue;case B.ATTRIB_VALUE_UNQUOTED:if(!F(le)){le==="&"?Y.state=B.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=le;continue}se(Y),le===">"?be(Y):Y.state=B.ATTRIB;continue;case B.CLOSE_TAG:if(Y.tagName)le===">"?ae(Y):U(N,le)?Y.tagName+=le:Y.script?(Y.script+=""?ae(Y):Ce(Y,"Invalid characters in closing tag");continue;case B.TEXT_ENTITY:case B.ATTRIB_VALUE_ENTITY_Q:case B.ATTRIB_VALUE_ENTITY_U:var ge,De;switch(Y.state){case B.TEXT_ENTITY:ge=B.TEXT,De="textNode";break;case B.ATTRIB_VALUE_ENTITY_Q:ge=B.ATTRIB_VALUE_QUOTED,De="attribValue";break;case B.ATTRIB_VALUE_ENTITY_U:ge=B.ATTRIB_VALUE_UNQUOTED,De="attribValue";break}le===";"?(Y[De]+=fe(Y),Y.entity="",Y.state=ge):U(Y.entity.length?z:P,le)?Y.entity+=le:(Ce(Y,"Invalid character in entity name"),Y[De]+="&"+Y.entity+le,Y.entity="",Y.state=ge);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}}return Y.position>=Y.bufferCheckPosition&&d(Y),Y}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var Q=String.fromCharCode,Y=Math.floor,oe=function(){var Ee=16384,Le=[],ge,De,_e=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++_e1114111||Y(Ge)!==Ge)throw RangeError("Invalid code point: "+Ge);Ge<=65535?Le.push(Ge):(Ge-=65536,ge=(Ge>>10)+55296,De=Ge%1024+56320,Le.push(ge,De)),(_e+1===Xe||Le.length>Ee)&&(tt+=Q.apply(null,Le),Le.length=0)}return tt};e.default?Object.defineProperty(String,"fromCodePoint",{value:oe,configurable:!0,writable:!0}):String.fromCodePoint=oe}()})(typeof b=="undefined"?(void 0).sax={}:b)}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(j,H,b){H.exports=T;var I=j("events").EventEmitter,v=j("inherits");v(T,I),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){I.call(this)}T.prototype.pipe=function(y,g){var s=this;function _(i){y.writable&&(y.write(i)===!1&&s.pause&&s.pause())}s.on("data",_);function p(){s.readable&&s.resume&&s.resume()}y.on("drain",p),!y._isStdio&&(!g||g.end!==!1)&&(s.on("end",o),s.on("close",n));var e=!1;function o(){if(e)return;e=!0,y.end()}function n(){if(e)return;e=!0,typeof y.destroy=="function"&&y.destroy()}function l(i){if(r(),I.listenerCount(this,"error")===0)throw i}s.on("error",l),y.on("error",l);function r(){s.removeListener("data",_),y.removeListener("drain",p),s.removeListener("end",o),s.removeListener("close",n),s.removeListener("error",l),y.removeListener("error",l),s.removeListener("end",r),s.removeListener("close",r),y.removeListener("close",r)}return s.on("end",r),s.on("close",r),y.on("close",r),y.emit("pipe",s),y}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(j,H,b){(function(I){var v=j("./lib/request"),T=j("./lib/response"),y=j("xtend"),g=j("builtin-status-codes"),s=j("url"),_=b;_.request=function(p,e){typeof p=="string"?p=s.parse(p):p=y(p);var o=I.location.protocol.search(/^https?:$/)===-1?"http:":"",n=p.protocol||o,l=p.hostname||p.host,r=p.port,i=p.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),p.url=(l?n+"//"+l:"")+(r?":"+r:"")+i,p.method=(p.method||"GET").toUpperCase(),p.headers=p.headers||{};var t=new v(p);return e&&t.on("response",e),t},_.get=function(e,o){var n=_.request(e,o);return n.end(),n},_.ClientRequest=v,_.IncomingMessage=T.IncomingMessage,_.Agent=function(){},_.Agent.defaultMaxSockets=4,_.globalAgent=new _.Agent,_.STATUS_CODES=g,_.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(j,H,b){(function(I){"use strict";b.fetch=_(I.fetch)&&_(I.ReadableStream),b.writableStream=_(I.WritableStream),b.abortController=_(I.AbortController),b.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),b.blobConstructor=!0}catch(p){}var v;function T(){if(v!==void 0)return v;if(I.XMLHttpRequest){v=new I.XMLHttpRequest;try{v.open("GET",I.XDomainRequest?"/":"https://example.com")}catch(p){v=null}}else v=null;return v}function y(p){var e=T();if(!e)return!1;try{return e.responseType=p,e.responseType===p}catch(o){}return!1}var g=typeof I.ArrayBuffer!="undefined",s=g&&_(I.ArrayBuffer.prototype.slice);b.arraybuffer=b.fetch||g&&y("arraybuffer"),b.msstream=!b.fetch&&s&&y("ms-stream"),b.mozchunkedarraybuffer=!b.fetch&&g&&y("moz-chunked-arraybuffer"),b.overrideMimeType=b.fetch||(T()?_(T().overrideMimeType):!1),b.vbArray=_(I.VBArray);function _(p){return typeof p=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,H,b){(function(I,v,T){"use strict";var y=j("babel-runtime/core-js/object/keys"),g=s(y);function s(d){return d&&d.__esModule?d:{default:d}}var _=j("./capability"),p=j("inherits"),e=j("./response"),o=j("readable-stream"),n=j("to-arraybuffer"),l=e.IncomingMessage,r=e.readyStates;function i(d,f){return _.fetch&&f?"fetch":_.mozchunkedarraybuffer?"moz-chunked-arraybuffer":_.msstream?"ms-stream":_.arraybuffer&&d?"arraybuffer":_.vbArray&&d?"text:vbarray":"text"}var t=H.exports=function(d){var f=this;o.Writable.call(f),f._opts=d,f._body=[],f._headers={},d.auth&&f.setHeader("Authorization","Basic "+new T(d.auth).toString("base64")),(0,g.default)(d.headers).forEach(function(E){f.setHeader(E,d.headers[E])});var h,u=!0;if(d.mode==="disable-fetch"||"requestTimeout"in d&&!_.abortController)u=!1,h=!0;else if(d.mode==="prefer-streaming")h=!1;else if(d.mode==="allow-wrong-content-type")h=!_.overrideMimeType;else if(!d.mode||d.mode==="default"||d.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");f._mode=i(h,u),f._fetchTimer=null,f.on("finish",function(){f._onFinish()})};p(t,o.Writable),t.prototype.setHeader=function(d,f){var h=this,u=d.toLowerCase();if(c.indexOf(u)!==-1)return;h._headers[u]={name:d,value:f}},t.prototype.getHeader=function(d){var f=this._headers[d.toLowerCase()];return f?f.value:null},t.prototype.removeHeader=function(d){var f=this;delete f._headers[d.toLowerCase()]},t.prototype._onFinish=function(){var d=this;if(d._destroyed)return;var f=d._opts,h=d._headers,u=null;f.method!=="GET"&&f.method!=="HEAD"&&(_.arraybuffer?u=n(T.concat(d._body)):_.blobConstructor?u=new v.Blob(d._body.map(function(S){return n(S)}),{type:(h["content-type"]||{}).value||""}):u=T.concat(d._body).toString());var E=[];if((0,g.default)(h).forEach(function(S){var A=h[S].name,D=h[S].value;Array.isArray(D)?D.forEach(function(M){E.push([A,M])}):E.push([A,D])}),d._mode==="fetch"){var x=null,O=null;if(_.abortController){var C=new AbortController;x=C.signal,d._fetchAbortController=C,"requestTimeout"in f&&f.requestTimeout!==0&&(d._fetchTimer=v.setTimeout(function(){d.emit("requestTimeout"),d._fetchAbortController&&d._fetchAbortController.abort()},f.requestTimeout))}v.fetch(d._opts.url,{method:d._opts.method,headers:E,body:u||void 0,mode:"cors",credentials:f.withCredentials?"include":"same-origin",signal:x}).then(function(S){d._fetchResponse=S,d._connect()},function(S){v.clearTimeout(d._fetchTimer),d._destroyed||d.emit("error",S)})}else{var w=d._xhr=new v.XMLHttpRequest;try{w.open(d._opts.method,d._opts.url,!0)}catch(S){I.nextTick(function(){d.emit("error",S)});return}"responseType"in w&&(w.responseType=d._mode.split(":")[0]),"withCredentials"in w&&(w.withCredentials=!!f.withCredentials),d._mode==="text"&&"overrideMimeType"in w&&w.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in f&&(w.timeout=f.requestTimeout,w.ontimeout=function(){d.emit("requestTimeout")}),E.forEach(function(S){w.setRequestHeader(S[0],S[1])}),d._response=null,w.onreadystatechange=function(){switch(w.readyState){case r.LOADING:case r.DONE:d._onXHRProgress();break}},d._mode==="moz-chunked-arraybuffer"&&(w.onprogress=function(){d._onXHRProgress()}),w.onerror=function(){if(d._destroyed)return;d.emit("error",new Error("XHR error"))};try{w.send(u)}catch(S){I.nextTick(function(){d.emit("error",S)});return}}};function a(d){try{var f=d.status;return f!==null&&f!==0}catch(h){return!1}}t.prototype._onXHRProgress=function(){var d=this;if(!a(d._xhr)||d._destroyed)return;d._response||d._connect(),d._response._onXHRProgress()},t.prototype._connect=function(){var d=this;if(d._destroyed)return;d._response=new l(d._xhr,d._fetchResponse,d._mode,d._fetchTimer),d._response.on("error",function(f){d.emit("error",f)}),d.emit("response",d._response)},t.prototype._write=function(d,f,h){var u=this;u._body.push(d),h()},t.prototype.abort=t.prototype.destroy=function(){var d=this;d._destroyed=!0,v.clearTimeout(d._fetchTimer),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort()},t.prototype.end=function(d,f,h){var u=this;typeof d=="function"&&(h=d,d=void 0),o.Writable.prototype.end.call(u,d,f,h)},t.prototype.flushHeaders=function(){},t.prototype.setTimeout=function(){},t.prototype.setNoDelay=function(){},t.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(j,H,b){(function(I,v,T){"use strict";var y=j("babel-runtime/core-js/promise"),g=s(y);function s(l){return l&&l.__esModule?l:{default:l}}var _=j("./capability"),p=j("inherits"),e=j("readable-stream"),o=b.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=b.IncomingMessage=function(l,r,i,t){var a=this;if(e.Readable.call(a),a._mode=i,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){I.nextTick(function(){a.emit("close")})}),i==="fetch"){var c=function x(){f.read().then(function(O){if(a._destroyed)return;if(O.done){v.clearTimeout(t),a.push(null);return}a.push(new T(O.value)),x()}).catch(function(O){v.clearTimeout(t),a._destroyed||a.emit("error",O)})};if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(x,O){a.headers[O.toLowerCase()]=x,a.rawHeaders.push(O,x)}),_.writableStream){var d=new WritableStream({write:function(O){return new g.default(function(C,w){a._destroyed?w():a.push(new T(O))?C():a._resumeFetch=C})},close:function(){v.clearTimeout(t),a._destroyed||a.push(null)},abort:function(O){a._destroyed||a.emit("error",O)}});try{r.body.pipeTo(d).catch(function(x){v.clearTimeout(t),a._destroyed||a.emit("error",x)});return}catch(x){}}var f=r.body.getReader();c()}else{a._xhr=l,a._pos=0,a.url=l.responseURL,a.statusCode=l.status,a.statusMessage=l.statusText;var h=l.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(x){var O=x.match(/^([^:]+):\s*(.*)/);if(O){var C=O[1].toLowerCase();C==="set-cookie"?(a.headers[C]===void 0&&(a.headers[C]=[]),a.headers[C].push(O[2])):a.headers[C]!==void 0?a.headers[C]+=", "+O[2]:a.headers[C]=O[2],a.rawHeaders.push(O[1],O[2])}}),a._charset="x-user-defined",!_.overrideMimeType){var u=a.rawHeaders["mime-type"];if(u){var E=u.match(/;\s*charset=([^;])(;|$)/);E&&(a._charset=E[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};p(n,e.Readable),n.prototype._read=function(){var l=this,r=l._resumeFetch;r&&(l._resumeFetch=null,r())},n.prototype._onXHRProgress=function(){var l=this,r=l._xhr,i=null;switch(l._mode){case"text:vbarray":if(r.readyState!==o.DONE)break;try{i=new v.VBArray(r.responseBody).toArray()}catch(f){}if(i!==null){l.push(new T(i));break}case"text":try{i=r.responseText}catch(f){l._mode="text:vbarray";break}if(i.length>l._pos){var t=i.substr(l._pos);if(l._charset==="x-user-defined"){for(var a=new T(t.length),c=0;cl._pos&&(l.push(new T(new Uint8Array(d.result.slice(l._pos)))),l._pos=d.result.byteLength)},d.onload=function(){l.push(null)},d.readAsArrayBuffer(i);break}l._xhr.readyState===o.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,H,b){"use strict";var I=j("safe-buffer").Buffer,v=I.isEncoding||function(d){d=""+d;switch(d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(d){if(!d)return"utf8";for(var f;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(f)return;d=(""+d).toLowerCase(),f=!0}}function y(d){var f=T(d);if(typeof f!="string"&&(I.isEncoding===v||!v(d)))throw new Error("Unknown encoding: "+d);return f||d}b.StringDecoder=g;function g(d){this.encoding=y(d);var f;switch(this.encoding){case"utf16le":this.text=l,this.end=r,f=4;break;case"utf8":this.fillLast=e,f=4;break;case"base64":this.text=i,this.end=t,f=3;break;default:this.write=a,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(f)}g.prototype.write=function(d){if(d.length===0)return"";var f,h;if(this.lastNeed){if(f=this.fillLast(d),f===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;return h>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function _(d,f,h){var u=f.length-1;if(u=0?(E>0&&(d.lastNeed=E-1),E):--u=0?(E>0&&(d.lastNeed=E-2),E):--u=0?(E>0&&(E===2?E=0:d.lastNeed=E-3),E):0))}function p(d,f,h){if((f[0]&192)!==128)return d.lastNeed=0,"\uFFFD";if(d.lastNeed>1&&f.length>1){if((f[1]&192)!==128)return d.lastNeed=1,"\uFFFD";if(d.lastNeed>2&&f.length>2&&(f[2]&192)!==128)return d.lastNeed=2,"\uFFFD"}}function e(d){var f=this.lastTotal-this.lastNeed,h=p(this,d,f);if(h!==void 0)return h;if(this.lastNeed<=d.length)return d.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,f,0,d.length),this.lastNeed-=d.length}function o(d,f){var h=_(this,d,f);if(!this.lastNeed)return d.toString("utf8",f);this.lastTotal=h;var u=d.length-(h-this.lastNeed);return d.copy(this.lastChar,0,u),d.toString("utf8",f,u)}function n(d){var f=d&&d.length?this.write(d):"";return this.lastNeed?f+"\uFFFD":f}function l(d,f){if((d.length-f)%2===0){var h=d.toString("utf16le",f);if(h){var u=h.charCodeAt(h.length-1);if(u>=55296&&u<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",f,d.length-1)}function r(d){var f=d&&d.length?this.write(d):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return f+this.lastChar.toString("utf16le",0,h)}return f}function i(d,f){var h=(d.length-f)%3;return h===0?d.toString("base64",f):(this.lastNeed=3-h,this.lastTotal=3,h===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",f,d.length-h))}function t(d){var f=d&&d.length?this.write(d):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function a(d){return d.toString(this.encoding)}function c(d){return d&&d.length?this.write(d):""}},{"safe-buffer":228}],236:[function(j,H,b){(function(I,v){var T=j("process/browser.js").nextTick,y=Function.prototype.apply,g=Array.prototype.slice,s={},_=0;b.setTimeout=function(){return new p(y.call(setTimeout,window,arguments),clearTimeout)},b.setInterval=function(){return new p(y.call(setInterval,window,arguments),clearInterval)},b.clearTimeout=b.clearInterval=function(e){e.close()};function p(e,o){this._id=e,this._clearFn=o}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},b.enroll=function(e,o){clearTimeout(e._idleTimeoutId),e._idleTimeout=o},b.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},b._unrefActive=b.active=function(e){clearTimeout(e._idleTimeoutId);var o=e._idleTimeout;o>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},o))},b.setImmediate=typeof I=="function"?I:function(e){var o=_++,n=arguments.length<2?!1:g.call(arguments,1);return s[o]=!0,T(function(){s[o]&&(n?e.apply(null,n):e.call(null),b.clearImmediate(o))}),o},b.clearImmediate=typeof v=="function"?v:function(e){delete s[e]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,H,b){var I=j("buffer").Buffer;H.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(I.isBuffer(v)){for(var T=new Uint8Array(v.length),y=v.length,g=0;g",'"',"`"," ","\r",` `," "],p=["{","}","|","\\","^","`"].concat(_),e=["'"].concat(p),o=["%","/","?",";","#"].concat(e),n=["/","?","#"],l=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,t={javascript:!0,"javascript:":!0},a={javascript:!0,"javascript:":!0},c={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},d=j("querystring");function f(x,O,C){if(x&&v.isObject(x)&&x instanceof T)return x;var w=new T;return w.parse(x,O,C),w}T.prototype.parse=function(x,O,C){if(!v.isString(x))throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var w=x.indexOf("?"),S=w!==-1&&w127?ke+="x":ke+=Se[te];if(!ke.match(r)){var Ce=re.slice(0,F),pe=re.slice(F+1),me=Se.match(i);me&&(Ce.push(me[1]),pe.unshift(me[2])),pe.length&&(M="/"+pe.join(".")+M),this.hostname=Ce.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),Z||(this.hostname=I.toASCII(this.hostname));var se=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+se,this.href+=this.host,Z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!t[z])for(var F=0,he=e.length;F0?C.host.split("@"):!1;ke&&(C.auth=ke.shift(),C.host=C.hostname=ke.shift())}return C.search=x.search,C.query=x.query,(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!re.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var te=re.slice(-1)[0],Re=(C.host||x.host||re.length>1)&&(te==="."||te==="..")||te==="",Ce=0,pe=re.length;pe>=0;pe--)te=re[pe],te==="."?re.splice(pe,1):te===".."?(re.splice(pe,1),Ce++):Ce&&(re.splice(pe,1),Ce--);if(!B&&!Z)for(;Ce--;Ce)re.unshift("..");B&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),Re&&re.join("/").substr(-1)!=="/"&&re.push("");var me=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(Se){C.hostname=C.host=me?"":re.length?re.shift():"";var ke=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;ke&&(C.auth=ke.shift(),C.host=C.hostname=ke.shift())}return B=B||C.host&&re.length,B&&!me&&re.unshift(""),re.length?C.pathname=re.join("/"):(C.pathname=null,C.path=null),(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=x.auth||C.auth,C.slashes=C.slashes||x.slashes,C.href=C.format(),C},T.prototype.parseHost=function(){var x=this.host,O=g.exec(x);O&&(O=O[0],O!==":"&&(this.port=O.substr(1)),x=x.substr(0,x.length-O.length)),x&&(this.hostname=x)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,H,b){"use strict";H.exports={isString:function(I){return typeof I=="string"},isObject:function(I){return typeof I=="object"&&I!==null},isNull:function(I){return I===null},isNullOrUndefined:function(I){return I==null}}},{}],240:[function(j,H,b){(function(I){H.exports=v;function v(y,g){if(T("noDeprecation"))return y;var s=!1;function _(){if(!s){if(T("throwDeprecation"))throw new Error(g);T("traceDeprecation")?console.trace(g):console.warn(g),s=!0}return y.apply(this,arguments)}return _}function T(y){try{if(!I.localStorage)return!1}catch(s){return!1}var g=I.localStorage[y];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,H,b){typeof Object.create=="function"?H.exports=function(v,T){v.super_=T,v.prototype=Object.create(T.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:H.exports=function(v,T){v.super_=T;var y=function(){};y.prototype=T.prototype,v.prototype=new y,v.prototype.constructor=v}},{}],242:[function(j,H,b){H.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(j,H,b){(function(I,v){var T=/%[sdj%]/g;b.format=function(k){if(!u(k)){for(var F=[],U=0;U=B)return he;switch(he){case"%s":return String(L[U++]);case"%d":return Number(L[U++]);case"%j":try{return JSON.stringify(L[U++])}catch(Se){return"[Circular]"}default:return he}}),re=L[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),c(F)?U.showHidden=F:F&&b._extend(U,F),x(U.showHidden)&&(U.showHidden=!1),x(U.depth)&&(U.depth=2),x(U.colors)&&(U.colors=!1),x(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=_),o(U,k,U.depth)}b.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _(k,F){var U=s.styles[F];return U?"["+s.colors[U][0]+"m"+k+"["+s.colors[U][1]+"m":k}function p(k,F){return k}function e(k){var F={};return k.forEach(function(U,L){F[U]=!0}),F}function o(k,F,U){if(k.customInspect&&F&&A(F.inspect)&&F.inspect!==b.inspect&&!(F.constructor&&F.constructor.prototype===F)){var L=F.inspect(U,k);return u(L)||(L=o(k,L,U)),L}var B=n(k,F);if(B)return B;var Z=Object.keys(F),re=e(Z);if(k.showHidden&&(Z=Object.getOwnPropertyNames(F)),S(F)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return l(F);if(Z.length===0){if(A(F)){var he=F.name?": "+F.name:"";return k.stylize("[Function"+he+"]","special")}if(O(F))return k.stylize(RegExp.prototype.toString.call(F),"regexp");if(w(F))return k.stylize(Date.prototype.toString.call(F),"date");if(S(F))return l(F)}var Se="",ke=!1,te=["{","}"];if(a(F)&&(ke=!0,te=["[","]"]),A(F)){var Re=F.name?": "+F.name:"";Se=" [Function"+Re+"]"}if(O(F)&&(Se=" "+RegExp.prototype.toString.call(F)),w(F)&&(Se=" "+Date.prototype.toUTCString.call(F)),S(F)&&(Se=" "+l(F)),Z.length===0&&(!ke||F.length==0))return te[0]+Se+te[1];if(U<0)return O(F)?k.stylize(RegExp.prototype.toString.call(F),"regexp"):k.stylize("[Object]","special");k.seen.push(F);var Ce;return ke?Ce=r(k,F,U,re,Z):Ce=Z.map(function(pe){return i(k,F,U,re,pe,ke)}),k.seen.pop(),t(Ce,Se,te)}function n(k,F){if(x(F))return k.stylize("undefined","undefined");if(u(F)){var U="'"+JSON.stringify(F).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return k.stylize(U,"string")}if(h(F))return k.stylize(""+F,"number");if(c(F))return k.stylize(""+F,"boolean");if(d(F))return k.stylize("null","null")}function l(k){return"["+Error.prototype.toString.call(k)+"]"}function r(k,F,U,L,B){for(var Z=[],re=0,he=F.length;re=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},o=function(r){return""},p=function(r){return r.replace("]]>","]]]]>")},b.Builder=function(){function l(r){var i,t,a;this.options={},t=_["0.2"];for(i in t){if(!n.call(t,i))continue;a=t[i],this.options[i]=a}for(i in r){if(!n.call(r,i))continue;a=r[i],this.options[i]=a}}return l.prototype.buildObject=function(r){var i,t,a,c,d;return i=this.options.attrkey,t=this.options.charkey,(0,y.default)(r).length===1&&this.options.rootName===_["0.2"].rootName?(d=(0,y.default)(r)[0],r=r[d]):d=this.options.rootName,a=function(f){return function(h,u){var E,x,O,C,w,S;if((typeof u=="undefined"?"undefined":(0,v.default)(u))!=="object")f.options.cdata&&e(u)?h.raw(o(u)):h.txt(u);else if(Array.isArray(u))for(C in u){if(!n.call(u,C))continue;x=u[C];for(w in x)O=x[w],h=a(h.ele(w),O).up()}else for(w in u){if(!n.call(u,w))continue;if(x=u[w],w===i){if((typeof x=="undefined"?"undefined":(0,v.default)(x))==="object")for(E in x)S=x[E],h=h.att(E,S)}else if(w===t)f.options.cdata&&e(x)?h=h.raw(o(x)):h=h.txt(x);else if(Array.isArray(x))for(C in x){if(!n.call(x,C))continue;O=x[C],typeof O=="string"?f.options.cdata&&e(O)?h=h.ele(w).raw(o(O)).up():h=h.ele(w,O).up():h=a(h.ele(w),O).up()}else(typeof x=="undefined"?"undefined":(0,v.default)(x))==="object"?h=a(h.ele(w),x).up():typeof x=="string"&&f.options.cdata&&e(x)?h=h.ele(w).raw(o(x)).up():(x==null&&(x=""),h=h.ele(w,x.toString()).up())}return h}}(this),c=s.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),a(c,r).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,H,b){"use strict";(function(){b.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/promise"),v=e(I),T=j("babel-runtime/core-js/object/get-own-property-names"),y=e(T),g=j("babel-runtime/core-js/object/keys"),s=e(g),_=j("babel-runtime/helpers/typeof"),p=e(_);function e(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,n,l,r,i,t,a,c,d=function(E,x){return function(){return E.apply(x,arguments)}},f=function(E,x){for(var O in x)h.call(x,O)&&(E[O]=x[O]);function C(){this.constructor=E}return C.prototype=x.prototype,E.prototype=new C,E.__super__=x.prototype,E},h={}.hasOwnProperty;a=j("sax"),l=j("events"),o=j("./bom"),t=j("./processors"),c=j("timers").setImmediate,n=j("./defaults").defaults,r=function(E){return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&E!=null&&(0,s.default)(E).length===0},i=function(E,x,O){var C,w,S;for(C=0,w=E.length;C0&&(N[S.options.childkey]=z),z=N;else if(F){F[S.options.childkey]=F[S.options.childkey]||[],X={};for(M in z){if(!h.call(z,M))continue;X[M]=z[M]}F[S.options.childkey].push(X),delete z["#name"],(0,s.default)(z).length===1&&O in z&&!S.EXPLICIT_CHARKEY&&(z=z[O])}}return w.length>0?S.assignOrPush(F,P,z):(S.options.explicitRoot&&(k=z,z={},z[P]=k),S.resultObject=z,S.saxParser.ended=!0,S.emit("end",S.resultObject))}}(this),C=function(S){return function(A){var D,M;if(M=w[w.length-1],M)return M[O]+=A,S.options.explicitChildren&&S.options.preserveChildrenOrder&&S.options.charsAsChildren&&(S.options.includeWhiteChars||A.replace(/\\n/g,"").trim()!=="")&&(M[S.options.childkey]=M[S.options.childkey]||[],D={"#name":"__text__"},D[O]=A,S.options.normalize&&(D[O]=D[O].replace(/\s{2,}/g," ").trim()),M[S.options.childkey].push(D)),M}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(S){return function(A){var D;if(D=C(A),D)return D.cdata=!0}}(this)},E.prototype.parseString=function(x,O){var C;O!=null&&typeof O=="function"&&(this.on("end",function(w){return this.reset(),O(null,w)}),this.on("error",function(w){return this.reset(),O(w)}));try{return x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=o.stripBOM(x),this.options.async?(this.remaining=x,c(this.processAsync),this.saxParser):this.saxParser.write(x).close())}catch(w){if(C=w,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(x){return new v.default(function(O){return function(C,w){return O.parseString(x,function(S,A){return S?w(S):C(A)})}}(this))},E}(l),b.parseString=function(u,E,x){var O,C,w;return x!=null?(typeof x=="function"&&(O=x),(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(C=E)):(typeof E=="function"&&(O=E),C={}),w=new b.Parser(C),w.parseString(u,O)},b.parseStringPromise=function(u,E){var x,O;return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(x=E),O=new b.Parser(x),O.parseStringPromise(u)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(j,H,b){"use strict";(function(){"use strict";var I;I=new RegExp(/(?!xmlns)^.*:/),b.normalize=function(v){return v.toLowerCase()},b.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},b.stripPrefix=function(v){return v.replace(I,"")},b.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},b.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(j,H,b){"use strict";(function(){"use strict";var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;v=j("./defaults"),I=j("./builder"),T=j("./parser"),y=j("./processors"),b.defaults=v.defaults,b.processors=y,b.ValidationError=function(_){g(p,_);function p(e){this.message=e}return p}(Error),b.Builder=I.Builder,b.Parser=T.Parser,b.parseString=T.parseString,b.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,H,b){"use strict";(function(){H.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,H,b){"use strict";(function(){H.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/get-prototype-of"),v=_(I),T=j("babel-runtime/helpers/typeof"),y=_(T),g=j("babel-runtime/core-js/object/assign"),s=_(g);function _(p){return p&&p.__esModule?p:{default:p}}(function(){var p,e,o,n,l,r,i,t=[].slice,a={}.hasOwnProperty;p=function(){var d,f,h,u,E,x;if(x=arguments[0],E=2<=arguments.length?t.call(arguments,1):[],l(s.default))s.default.apply(null,arguments);else for(d=0,h=E.length;d":"attribute: {"+p+"}, parent: <"+this.parent.name+">"},_.prototype.isEqualNode=function(p){return p.namespaceURI!==this.namespaceURI||(p.prefix!==this.prefix||p.localName!==this.localName)?!1:!(p.value!==this.value)},_}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),s=j("./XMLCharacterData"),H.exports=g=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=y.CData,this.value=this.stringify.cdata(l)}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s=function(e,o){for(var n in o)_.call(o,n)&&(e[n]=o[n]);function l(){this.constructor=e}return l.prototype=o.prototype,e.prototype=new l,e.__super__=o.prototype,e},_={}.hasOwnProperty;g=j("./XMLNode"),H.exports=y=function(p){s(e,p);function e(o){e.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),e.prototype.clone=function(){return(0,v.default)(this)},e.prototype.substringData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(o,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(o){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?!(o.data!==this.data):!1},e}(g)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),g=j("./XMLCharacterData"),H.exports=s=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=y.Comment,this.value=this.stringify.comment(l)}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},o}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=g(I),T=j("babel-runtime/core-js/object/create"),y=g(T);function g(s){return s&&s.__esModule?s:{default:s}}(function(){var s,_,p;_=j("./XMLDOMErrorHandler"),p=j("./XMLDOMStringList"),H.exports=s=function(){function e(){var o;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new _,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=o=(0,y.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new p((0,v.default)(this.defaultParams))}}),e.prototype.getParameter=function(o){return this.params.hasOwnProperty(o)?this.params[o]:null},e.prototype.canSetParameter=function(o,n){return!0},e.prototype.setParameter=function(o,n){return n!=null?this.params[o]=n:delete this.params[o]},e}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(){}return v.prototype.handleError=function(T){throw new Error(T)},v}()}).call(void 0)},{}],260:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(){}return v.prototype.hasFeature=function(T,y){return!0},v.prototype.createDocumentType=function(T,y,g){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(T,y,g){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(T,y){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(T){this.arr=T||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(T){return this.arr[T]||null},v.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},v}()}).call(void 0)},{}],262:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o,n,l,r){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(o==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(e));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(e));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(e));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(e));if(r&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(e));this.elementName=this.stringify.name(e),this.type=I.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(n),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=l}return _.prototype.toString=function(p){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(e),this.type=I.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return _.prototype.toString=function(p){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,H,b){"use strict";(function(){var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;y=j("./Utility").isObject,T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(_){g(p,_);function p(e,o,n,l){if(p.__super__.constructor.call(this,e),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!o,this.name=this.stringify.name(n),this.type=I.EntityDeclaration,!y(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(p.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlVersion",{get:function(){return null}}),p.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(e));this.name=this.stringify.name(e),this.type=I.NotationDeclaration,o.pubID!=null&&(this.pubID=this.stringify.dtdPubID(o.pubID)),o.sysID!=null&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),_.prototype.toString=function(p){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,H,b){"use strict";(function(){var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;y=j("./Utility").isObject,T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(_){g(p,_);function p(e,o,n,l){var r;p.__super__.constructor.call(this,e),y(o)&&(r=o,o=r.version,n=r.encoding,l=r.standalone),o||(o="1.0"),this.type=I.Declaration,this.version=this.stringify.xmlVersion(o),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return p.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o=function(r,i){for(var t in i)n.call(i,t)&&(r[t]=i[t]);function a(){this.constructor=r}return a.prototype=i.prototype,r.prototype=new a,r.__super__=i.prototype,r},n={}.hasOwnProperty;e=j("./Utility").isObject,p=j("./XMLNode"),I=j("./NodeType"),v=j("./XMLDTDAttList"),y=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),g=j("./XMLDTDNotation"),_=j("./XMLNamedNodeMap"),H.exports=s=function(l){o(r,l);function r(i,t,a){var c,d,f,h,u,E;if(r.__super__.constructor.call(this,i),this.type=I.DocType,i.children){for(h=i.children,d=0,f=h.length;d=0;)this.up();return this.onEnd()},w.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},w.prototype.openNode=function(S){var A,D,M,N;if(!S.isOpen){if(!this.root&&this.currentLevel===0&&S.type===I.Element&&(this.root=S),D="",S.type===I.Element){this.writerOptions.state=v.OpenTag,D=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<"+S.name,N=S.attribs;for(M in N){if(!C.call(N,M))continue;A=N[M],D+=this.writer.attribute(A,this.writerOptions,this.currentLevel)}D+=(S.children?">":"/>")+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,D=this.writer.indent(S,this.writerOptions,this.currentLevel)+""),D+=this.writer.endline(S,this.writerOptions,this.currentLevel);return this.onData(D,this.currentLevel),S.isOpen=!0}},w.prototype.closeNode=function(S){var A;if(!S.isClosed)return A="",this.writerOptions.state=v.CloseTag,S.type===I.Element?A=this.writer.indent(S,this.writerOptions,this.currentLevel)+""+this.writer.endline(S,this.writerOptions,this.currentLevel):A=this.writer.indent(S,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=v.None,this.onData(A,this.currentLevel),S.isClosed=!0},w.prototype.onData=function(S,A){return this.documentStarted=!0,this.onDataCallback(S,A+1)},w.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},w.prototype.debugInfo=function(S){return S==null?"":"node: <"+S+">"},w.prototype.ele=function(){return this.element.apply(this,arguments)},w.prototype.nod=function(S,A,D){return this.node(S,A,D)},w.prototype.txt=function(S){return this.text(S)},w.prototype.dat=function(S){return this.cdata(S)},w.prototype.com=function(S){return this.comment(S)},w.prototype.ins=function(S,A){return this.instruction(S,A)},w.prototype.dec=function(S,A,D){return this.declaration(S,A,D)},w.prototype.dtd=function(S,A,D){return this.doctype(S,A,D)},w.prototype.e=function(S,A,D){return this.element(S,A,D)},w.prototype.n=function(S,A,D){return this.node(S,A,D)},w.prototype.t=function(S){return this.text(S)},w.prototype.d=function(S){return this.cdata(S)},w.prototype.c=function(S){return this.comment(S)},w.prototype.r=function(S){return this.raw(S)},w.prototype.i=function(S,A){return this.instruction(S,A)},w.prototype.att=function(){return this.currentNode&&this.currentNode.type===I.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},w.prototype.a=function(){return this.currentNode&&this.currentNode.type===I.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},w.prototype.ent=function(S,A){return this.entity(S,A)},w.prototype.pent=function(S,A){return this.pEntity(S,A)},w.prototype.not=function(S,A){return this.notation(S,A)},w}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;s=j("./XMLNode"),y=j("./NodeType"),H.exports=g=function(e){_(o,e);function o(n){o.__super__.constructor.call(this,n),this.type=y.Dummy}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return""},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_,p,e,o,n,l,r=function(a,c){for(var d in c)i.call(c,d)&&(a[d]=c[d]);function f(){this.constructor=a}return f.prototype=c.prototype,a.prototype=new f,a.__super__=c.prototype,a},i={}.hasOwnProperty;l=j("./Utility"),n=l.isObject,o=l.isFunction,e=l.getValue,p=j("./XMLNode"),y=j("./NodeType"),g=j("./XMLAttribute"),_=j("./XMLNamedNodeMap"),H.exports=s=function(t){r(a,t);function a(c,d,f){var h,u,E,x;if(a.__super__.constructor.call(this,c),d==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(d),this.type=y.Element,this.attribs={},this.schemaTypeInfo=null,f!=null&&this.attribute(f),c.type===y.Document&&(this.isRoot=!0,this.documentObject=c,c.rootObject=this,c.children)){for(x=c.children,u=0,E=x.length;u=h;d=0<=h?++f:--f)if(!this.attribs[d].isEqualNode(c.attribs[d]))return!1;return!0},a}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y;H.exports=y=function(){function g(s){this.nodes=s}return Object.defineProperty(g.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.getNamedItem=function(s){return this.nodes[s]},g.prototype.setNamedItem=function(s){var _;return _=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,_||null},g.prototype.removeNamedItem=function(s){var _;return _=this.nodes[s],delete this.nodes[s],_||null},g.prototype.item=function(s){return this.nodes[(0,v.default)(this.nodes)[s]]||null},g.prototype.getNamedItemNS=function(s,_){throw new Error("This DOM method is not implemented.")},g.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},g.prototype.removeNamedItemNS=function(s,_){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o,n,l,r,i,t,a,c,d,f,h={}.hasOwnProperty;f=j("./Utility"),d=f.isObject,c=f.isFunction,a=f.isEmpty,t=f.getValue,p=null,T=null,y=null,g=null,s=null,r=null,i=null,l=null,_=null,v=null,n=null,e=null,I=null,H.exports=o=function(){function u(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,p||(p=j("./XMLElement"),T=j("./XMLCData"),y=j("./XMLComment"),g=j("./XMLDeclaration"),s=j("./XMLDocType"),r=j("./XMLRaw"),i=j("./XMLText"),l=j("./XMLProcessingInstruction"),_=j("./XMLDummy"),v=j("./NodeType"),n=j("./XMLNodeList"),e=j("./XMLNamedNodeMap"),I=j("./DocumentPosition"))}return Object.defineProperty(u.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(u.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(u.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(u.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(u.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(u.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(u.prototype,"previousSibling",{get:function(){var x;return x=this.parent.children.indexOf(this),this.parent.children[x-1]||null}}),Object.defineProperty(u.prototype,"nextSibling",{get:function(){var x;return x=this.parent.children.indexOf(this),this.parent.children[x+1]||null}}),Object.defineProperty(u.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(u.prototype,"textContent",{get:function(){var x,O,C,w,S;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(S="",w=this.children,O=0,C=w.length;O":((O=this.parent)!=null?O.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},u.prototype.ele=function(E,x,O){return this.element(E,x,O)},u.prototype.nod=function(E,x,O){return this.node(E,x,O)},u.prototype.txt=function(E){return this.text(E)},u.prototype.dat=function(E){return this.cdata(E)},u.prototype.com=function(E){return this.comment(E)},u.prototype.ins=function(E,x){return this.instruction(E,x)},u.prototype.doc=function(){return this.document()},u.prototype.dec=function(E,x,O){return this.declaration(E,x,O)},u.prototype.e=function(E,x,O){return this.element(E,x,O)},u.prototype.n=function(E,x,O){return this.node(E,x,O)},u.prototype.t=function(E){return this.text(E)},u.prototype.d=function(E){return this.cdata(E)},u.prototype.c=function(E){return this.comment(E)},u.prototype.r=function(E){return this.raw(E)},u.prototype.i=function(E,x){return this.instruction(E,x)},u.prototype.u=function(){return this.up()},u.prototype.importXMLBuilder=function(E){return this.importDocument(E)},u.prototype.replaceChild=function(E,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.hasChildNodes=function(){return this.children.length!==0},u.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isSupported=function(E,x){return!0},u.prototype.hasAttributes=function(){return this.attribs.length!==0},u.prototype.compareDocumentPosition=function(E){var x,O;return x=this,x===E?0:this.document()!==E.document()?(O=I.Disconnected|I.ImplementationSpecific,Math.random()<.5?O|=I.Preceding:O|=I.Following,O):x.isAncestor(E)?I.Contains|I.Preceding:x.isDescendant(E)?I.Contains|I.Following:x.isPreceding(E)?I.Preceding:I.Following},u.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isEqualNode=function(E){var x,O,C;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(x=O=0,C=this.children.length-1;0<=C?O<=C:O>=C;x=0<=C?++O:--O)if(!this.children[x].isEqualNode(E.children[x]))return!1;return!0},u.prototype.getFeature=function(E,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setUserData=function(E,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},u.prototype.isDescendant=function(E){var x,O,C,w,S;for(S=this.children,C=0,w=S.length;CO},u.prototype.treePosition=function(E){var x,O;return O=0,x=!1,this.foreachTreeNode(this.document(),function(C){if(O++,!x&&C===E)return x=!0}),x?O:-1},u.prototype.foreachTreeNode=function(E,x){var O,C,w,S,A;for(E||(E=this.document()),S=E.children,C=0,w=S.length;C0){for(this.stream.write(" ["),this.stream.write(this.endline(e,o,n)),o.state=v.InsideTag,t=e.children,r=0,i=t.length;r"),this.stream.write(this.endline(e,o,n)),o.state=v.None,this.closeNode(e,o,n)},p.prototype.element=function(e,o,n){var l,r,i,t,a,c,d,f,h,u;n||(n=0),this.openNode(e,o,n),o.state=v.OpenTag,this.stream.write(this.indent(e,o,n)+"<"+e.name),h=e.attribs;for(d in h){if(!s.call(h,d))continue;l=h[d],this.attribute(l,o,n)}if(i=e.children.length,t=i===0?null:e.children[0],i===0||e.children.every(function(E){return(E.type===I.Text||E.type===I.Raw)&&E.value===""}))o.allowEmpty?(this.stream.write(">"),o.state=v.CloseTag,this.stream.write("")):(o.state=v.CloseTag,this.stream.write(o.spaceBeforeSlash+"/>"));else if(o.pretty&&i===1&&(t.type===I.Text||t.type===I.Raw)&&t.value!=null)this.stream.write(">"),o.state=v.InsideTag,o.suppressPrettyCount++,f=!0,this.writeChildNode(t,o,n+1),o.suppressPrettyCount--,f=!1,o.state=v.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(e,o,n)),o.state=v.InsideTag,u=e.children,a=0,c=u.length;a")}return this.stream.write(this.endline(e,o,n)),o.state=v.None,this.closeNode(e,o,n)},p.prototype.processingInstruction=function(e,o,n){return this.stream.write(p.__super__.processingInstruction.call(this,e,o,n))},p.prototype.raw=function(e,o,n){return this.stream.write(p.__super__.raw.call(this,e,o,n))},p.prototype.text=function(e,o,n){return this.stream.write(p.__super__.text.call(this,e,o,n))},p.prototype.dtdAttList=function(e,o,n){return this.stream.write(p.__super__.dtdAttList.call(this,e,o,n))},p.prototype.dtdElement=function(e,o,n){return this.stream.write(p.__super__.dtdElement.call(this,e,o,n))},p.prototype.dtdEntity=function(e,o,n){return this.stream.write(p.__super__.dtdEntity.call(this,e,o,n))},p.prototype.dtdNotation=function(e,o,n){return this.stream.write(p.__super__.dtdNotation.call(this,e,o,n))},p}(y)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,H,b){"use strict";(function(){var I,v,T=function(s,_){for(var p in _)y.call(_,p)&&(s[p]=_[p]);function e(){this.constructor=s}return e.prototype=_.prototype,s.prototype=new e,s.__super__=_.prototype,s},y={}.hasOwnProperty;v=j("./XMLWriterBase"),H.exports=I=function(g){T(s,g);function s(_){s.__super__.constructor.call(this,_)}return s.prototype.document=function(_,p){var e,o,n,l,r;for(p=this.filterOptions(p),l="",r=_.children,o=0,n=r.length;o","]]]]>"),this.assertLegalChar(g))},y.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},y.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},y.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},y.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},y.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},y.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},y.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},y.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(g){var s,_;if(this.options.noValidation)return g;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=g.match(s))throw new Error("Invalid character in string: "+g+" at index "+_.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=g.match(s)))throw new Error("Invalid character in string: "+g+" at index "+_.index);return g},y.prototype.assertLegalName=function(g){var s;if(this.options.noValidation)return g;if(this.assertLegalChar(g),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(s))throw new Error("Invalid character in name");return g},y.prototype.textEscape=function(g){var s;return this.options.noValidation?g:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(s,"&").replace(//g,">").replace(/\r/g," "))},y.prototype.attEscape=function(g){var s;return this.options.noValidation?g:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(s,"&").replace(/0)?new Array(x).join(u.indent):""},f.prototype.endline=function(h,u,E){return!u.pretty||u.suppressPrettyCount?"":u.newline},f.prototype.attribute=function(h,u,E){var x;return this.openAttribute(h,u,E),x=" "+h.name+'="'+h.value+'"',this.closeAttribute(h,u,E),x},f.prototype.cdata=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.comment=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.declaration=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"",x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.docType=function(h,u,E){var x,O,C,w,S;if(E||(E=0),this.openNode(h,u,E),u.state=v.OpenTag,w=this.indent(h,u,E),w+="0){for(w+=" [",w+=this.endline(h,u,E),u.state=v.InsideTag,S=h.children,O=0,C=S.length;O",w+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),w},f.prototype.element=function(h,u,E){var x,O,C,w,S,A,D,M,N,P,z,X,k,F;E||(E=0),P=!1,z="",this.openNode(h,u,E),u.state=v.OpenTag,z+=this.indent(h,u,E)+"<"+h.name,X=h.attribs;for(N in X){if(!d.call(X,N))continue;x=X[N],z+=this.attribute(x,u,E)}if(C=h.children.length,w=C===0?null:h.children[0],C===0||h.children.every(function(U){return(U.type===I.Text||U.type===I.Raw)&&U.value===""}))u.allowEmpty?(z+=">",u.state=v.CloseTag,z+=""+this.endline(h,u,E)):(u.state=v.CloseTag,z+=u.spaceBeforeSlash+"/>"+this.endline(h,u,E));else if(u.pretty&&C===1&&(w.type===I.Text||w.type===I.Raw)&&w.value!=null)z+=">",u.state=v.InsideTag,u.suppressPrettyCount++,P=!0,z+=this.writeChildNode(w,u,E+1),u.suppressPrettyCount--,P=!1,u.state=v.CloseTag,z+=""+this.endline(h,u,E);else{if(u.dontPrettyTextNodes){for(k=h.children,S=0,D=k.length;S"+this.endline(h,u,E),u.state=v.InsideTag,F=h.children,A=0,M=F.length;A",P&&u.suppressPrettyCount--,z+=this.endline(h,u,E),u.state=v.None}return this.closeNode(h,u,E),z},f.prototype.writeChildNode=function(h,u,E){switch(h.type){case I.CData:return this.cdata(h,u,E);case I.Comment:return this.comment(h,u,E);case I.Element:return this.element(h,u,E);case I.Raw:return this.raw(h,u,E);case I.Text:return this.text(h,u,E);case I.ProcessingInstruction:return this.processingInstruction(h,u,E);case I.Dummy:return"";case I.Declaration:return this.declaration(h,u,E);case I.DocType:return this.docType(h,u,E);case I.AttributeDeclaration:return this.dtdAttList(h,u,E);case I.ElementDeclaration:return this.dtdElement(h,u,E);case I.EntityDeclaration:return this.dtdEntity(h,u,E);case I.NotationDeclaration:return this.dtdNotation(h,u,E);default:throw new Error("Unknown XML node type: "+h.constructor.name)}},f.prototype.processingInstruction=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"",x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.raw=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E),u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.text=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E),u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdAttList=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdElement=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdEntity=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdNotation=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+""+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.openNode=function(h,u,E){},f.prototype.closeNode=function(h,u,E){},f.prototype.openAttribute=function(h,u,E){},f.prototype.closeAttribute=function(h,u,E){},f}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o;o=j("./Utility"),p=o.assign,e=o.isFunction,T=j("./XMLDOMImplementation"),y=j("./XMLDocument"),g=j("./XMLDocumentCB"),_=j("./XMLStringWriter"),s=j("./XMLStreamWriter"),I=j("./NodeType"),v=j("./WriterState"),H.exports.create=function(n,l,r,i){var t,a;if(n==null)throw new Error("Root element needs a name.");return i=p({},l,r,i),t=new y(i),a=t.element(n),i.headless||(t.declaration(i),(i.pubID!=null||i.sysID!=null)&&t.dtd(i)),a},H.exports.begin=function(n,l,r){var i;return e(n)&&(i=[n,l],l=i[0],r=i[1],n={}),l?new g(n,l,r):new y(n)},H.exports.stringWriter=function(n){return new _(n)},H.exports.streamWriter=function(n,l){return new s(n,l)},H.exports.implementation=new T,H.exports.nodeType=I,H.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,H,b){H.exports=v;var I=Object.prototype.hasOwnProperty;function v(){for(var T={},y=0;yg?n=o(n):n.length>5]|=128<>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,t=-1732584194,a=271733878,c=0;c>16)+(l>>16)+(r>>16);return i<<16|r&65535}function o(n,l){return n<>>32-l}H.exports=function(l){return I.hash(l,T,16)}},{"./helpers":285}],287:[function(j,H,b){"use strict";var I=j("./helpers");function v(_,p){_[p>>5]|=128<<24-p%32,_[(p+64>>9<<4)+15]=p;for(var e=Array(80),o=1732584193,n=-271733879,l=-1732584194,r=271733878,i=-1009589776,t=0;t<_.length;t+=16){for(var a=o,c=n,d=l,f=r,h=i,u=0;u<80;u++){u<16?e[u]=_[t+u]:e[u]=s(e[u-3]^e[u-8]^e[u-14]^e[u-16],1);var E=g(g(s(o,5),T(u,n,l,r)),g(g(i,e[u]),y(u)));i=r,r=l,l=s(n,30),n=o,o=E}o=g(o,a),n=g(n,c),l=g(l,d),r=g(r,f),i=g(i,h)}return Array(o,n,l,r,i)}function T(_,p,e,o){return _<20?p&e|~p&o:_<40?p^e^o:_<60?p&e|p&o|e&o:p^e^o}function y(_){return _<20?1518500249:_<40?1859775393:_<60?-1894007588:-899497514}function g(_,p){var e=(_&65535)+(p&65535),o=(_>>16)+(p>>16)+(e>>16);return o<<16|e&65535}function s(_,p){return _<>>32-p}H.exports=function(p){return I.hash(p,v,20,!0)}},{"./helpers":285}],288:[function(j,H,b){"use strict";H.exports=function(){return function(){}}},{}],289:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/helpers/typeof"),T=y(v);function y(o){return o&&o.__esModule?o:{default:o}}var g=j("stream"),s=g.Stream,_=j("../lib/common/utils/isArray"),p=_.isArray;H.exports.string=function(n){return typeof n=="string"},H.exports.array=p,H.exports.buffer=I.isBuffer;function e(o){return o instanceof s}H.exports.writableStream=function(n){return e(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(j,H,b){"use strict";b.encodeURIComponent=function(I){try{return encodeURIComponent(I)}catch(v){return I}},b.escape=j("escape-html"),b.timestamp=function(v){if(v){var T=v;return typeof T=="string"&&(T=Number(T)),String(v).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/json/stringify"),y=_(T),g=j("babel-runtime/helpers/typeof"),s=_(g);function _(u){return u&&u.__esModule?u:{default:u}}var p=j("util"),e=j("url"),o=j("http"),n=j("https"),l=j("debug")("urllib"),r=j("humanize-ms"),i,t=0,a=Math.pow(2,31)-10,c=/^https?:\/\//i;function d(u,E){return u===void 0?E:u}function f(u,E){return function(x,O,C){if(x)return E(x);u({data:O,status:C.statusCode,headers:C.headers,res:C})}}b.TIMEOUTS=[r("300s"),r("300s")];var h=["json","text"];b.request=function(E,x,O){return arguments.length===2&&typeof x=="function"&&(O=x,x=null),typeof O=="function"?b.requestWithCallback(E,x,O):(i||(i=j("any-promise")),new i(function(C,w){b.requestWithCallback(E,x,f(C,w))}))},b.requestWithCallback=function(E,x,O){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,s.default)(E))!=="object"){var C=p.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(C)}arguments.length===2&&typeof x=="function"&&(O=x,x=null),x=x||{},t>=a&&(t=0);var w=++t;x.requestUrls=x.requestUrls||[];var S={requestId:w,url:E,args:x,ctx:x.ctx};x.emitter&&x.emitter.emit("request",S),x.timeout=x.timeout||b.TIMEOUTS,x.maxRedirects=x.maxRedirects||10,x.streaming=x.streaming||x.customResponse;var A=Date.now(),D;typeof E=="string"?(c.test(E)||(E="http://"+E),D=e.parse(E)):D=E;var M=(x.type||x.method||D.method||"GET").toUpperCase(),N=D.port||80,P=o,z=d(x.agent,b.agent),X=x.fixJSONCtlChars;D.protocol==="https:"&&(P=n,z=d(x.httpsAgent,b.httpsAgent),D.port||(N=443));var k={host:D.hostname||D.host||"localhost",path:D.path||"/",method:M,port:N,agent:z,headers:x.headers||{},lookup:x.lookup};Array.isArray(x.timeout)?k.requestTimeout=x.timeout[x.timeout.length-1]:typeof x.timeout!="undefined"&&(k.requestTimeout=x.timeout);for(var F=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,E,Ye),x.headers=x.headers||{},x.headers.Authorization=digestAuthHeader(k.method,k.path,Ye,x.digestAuth),l("Request#%d %s: auth with digest header: %s",w,E,x.headers.Authorization),Oe.headers["set-cookie"]&&(x.headers.Cookie=Oe.headers["set-cookie"].join(";")),b.requestWithCallback(E,x,Ve)}var Ne=Date.now()-A;ie&&(ie.contentDownload=Ne),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ne,se,be,k.method,k.host,k.path,me,ie);var He={status:be,statusCode:be,headers:Je,size:se,aborted:ae,rt:Ne,keepAliveSocket:me,data:bt,requestUrls:x.requestUrls,timing:ie,remoteAddress:fe,remotePort:Fe};if(Me){var ve="";z&&typeof z.getCurrentStatus=="function"&&(ve=", agent status: "+(0,y.default)(z.getCurrentStatus())),Me.message+=", "+k.method+" "+E+" "+be+" (connected: "+pe+", keepalive socket: "+me+ve+`) -headers: `+(0,y.default)(Je),Me.data=bt,Me.path=k.path,Me.status=be,Me.headers=Je,Me.res=He}Ve(Me,bt,x.streaming?Oe:He),x.emitter&&(S.url=E,S.socket=tt&&tt.connection,S.options=k,S.size=Se,x.emitter.emit("response",{requestId:w,error:Me,ctx:x.ctx,req:S,res:He}))}function oe(Me){var bt=null;if(x.followRedirect&&statuses.redirect[Me.statusCode]){x._followRedirectCount=(x._followRedirectCount||0)+1;var Oe=Me.headers.location;if(!Oe)bt=new Error("Got statusCode "+Me.statusCode+" but cannot resolve next location from headers"),bt.name="FollowRedirectError";else if(x._followRedirectCount>x.maxRedirects)bt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),bt.name="MaxRedirectError";else{var Ve=x.formatRedirectUrl?x.formatRedirectUrl(E,Oe):e.resolve(E,Oe);l("Request#%d %s: `redirected` from %s to %s",w,k.path,E,Ve),Q(),x.headers&&x.headers.Host&&c.test(Oe)&&(x.headers.Host=null);var Je=O;return O=null,b.requestWithCallback(Ve,x,Je),{redirect:!0,error:null}}}return{redirect:!1,error:bt}}!k.headers["User-Agent"]&&!k.headers["user-agent"]&&(k.headers["User-Agent"]=navigator.userAgent),x.gzip&&(!k.headers["Accept-Encoding"]&&!k.headers["accept-encoding"]&&(k.headers["Accept-Encoding"]="gzip"));function le(Me,bt,Oe){var Ve=Me.headers["content-encoding"];return Oe(null,bt,Ve)}var Ee=x.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",w,M,E,k.headers,k.path),x.requestUrls.push(E);function Le(Me){if(ie&&(ie.waiting=Date.now()-A),l("Request#%d %s `req response` event emit: status %d, headers: %j",w,E,Me.statusCode,Me.headers),x.streaming){var bt=oe(Me);if(bt.redirect){Me.resume();return}return bt.error?(Me.resume(),Y(bt.error,null,Me)):Y(null,null,Me)}if(Me.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",w,E,se)}),Me.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",w,E,se)}),Me.on("aborted",function(){ae=!0,l("Request#%d %s: `res aborted` event emit, total size %d",w,E,se)}),Ee){var bt=oe(Me);if(bt.redirect){Me.resume();return}return bt.error?(Me.resume(),Ee.end(),Y(bt.error,null,Me)):(x.consumeWriteStream===!1?Me.on("end",Y.bind(null,null,null,Me)):isNode010||isNode012?first([[Ee,"close"],[Me,"aborted"]],function(Je,Ye,Ne){l("Request#%d %s: writeStream or res %s event emitted",w,E,Ne),Y(Ce||null,null,Me)}):Ee.on("close",function(){l("Request#%d %s: writeStream close event emitted",w,E),Y(Ce||null,null,Me)}),Me.pipe(Ee))}var Oe=[];Me.on("data",function(Ve){l("Request#%d %s: `res data` event emit, size %d",w,E,Ve.length),se+=Ve.length,Oe.push(Ve)}),Me.on("end",function(){var Ve=v.concat(Oe,se);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,E,se,Me._dumped),Ce)return Y(Ce,Ve,Me);var Je=oe(Me);if(Je.error)return Y(Je.error,Ve,Me);if(Je.redirect)return;le(Me,Ve,function(Ye,Ne,He){if(Ye)return Y(Ye,Ve,Me);if(!He&&h.indexOf(x.dataType)>=0){try{Ne=decodeBodyByCharset(Ne,Me)}catch(xe){return l("decodeBodyByCharset error: %s",xe),Y(null,Ne,Me)}if(x.dataType==="json")if(se===0)Ne=null;else{var ve=parseJSON(Ne,X);ve.error?Ye=ve.error:Ne=ve.data}}ae&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,E),Y(Ye,Ne,Me)})})}var ge,De;Array.isArray(x.timeout)?(ge=r(x.timeout[0]),De=r(x.timeout[1])):ge=De=r(x.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",ge,De);function _e(){l("Connect timer ticking, timeout: %d",ge),te=setTimeout(function(){te=null,be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",bt="ConnectionTimeoutError";tt.socket||(bt="SocketAssignTimeoutError",Me+=", working sockets is full"),Ce=new Error(Me),Ce.name=bt,Ce.requestId=w,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Me,pe),Ge()},ge)}function Xe(){l("Response timer ticking, timeout: %d",De),Re=setTimeout(function(){Re=null;var Me="Response timeout for "+De+"ms",bt="ResponseTimeoutError";Ce=new Error(Me),Ce.name=bt,Ce.requestId=w,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Me,pe),Ge()},De)}var tt;k.mode=x.mode?x.mode:"";try{tt=P.request(k,Le)}catch(Me){return Y(Me)}typeof window=="undefined"?_e():tt.on("requestTimeout",function(){be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",bt="ConnectionTimeoutError";Ce=new Error(Me),Ce.name=bt,Ce.requestId=w,Ge()});function Ge(){l("Request#%d %s abort, connected: %s",w,E,pe),tt.socket||(Ce.noSocket=!0,Y(Ce)),tt.abort()}return ie&&tt.on("finish",function(){ie.requestSent=Date.now()-A}),tt.once("socket",function(Me){ie&&(ie.queuing=Date.now()-A),isNode010&&Me.socket&&(Me=Me.socket);var bt=Me.readyState;if(bt==="opening"){Me.once("lookup",function(Oe,Ve,Je){l("Request#%d %s lookup: %s, %s, %s",w,E,Oe,Ve,Je),ie&&(ie.dnslookup=Date.now()-A),Ve&&(fe=Ve)}),Me.once("connect",function(){ie&&(ie.connected=Date.now()-A),q(),Xe(),l("Request#%d %s new socket connected",w,E),pe=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",w,E,bt),pe=!0,me=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort,q(),Xe()}),tt.on("error",function(Me){(Me.name==="Error"||Me.name==="TypeError")&&(Me.name=pe?"ResponseError":"RequestError"),Me.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",w,E,Me.name,Me.message),Y(Ce||Me)}),Ee&&Ee.once("error",function(Me){Me.message+=' (writeStream "error")',Ce=Me,l("Request#%d %s `writeStream error` event emit, %s: %s",w,E,Me.name,Me.message),Ge()}),x.stream?(x.stream.pipe(tt),x.stream.once("error",function(Me){Me.message+=' (stream "error")',Ce=Me,l("Request#%d %s `readStream error` event emit, %s: %s",w,E,Me.name,Me.message),Ge()})):tt.end(Z),tt.requestId=w,tt}}).call(this,j("_process"),j("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n0Id:function(j,H,b){j.exports=b.p+"static/disappoint2.7a4bdf92.svg"},n6Qo:function(j,H,b){"use strict";b.d(H,"a",function(){return p});var I=b("q1tI"),v=b("biw7"),T=b("fyJ8");function y(e){var o=e.className,n=e.index,l=e.children,r=e.colSpan,i=e.rowSpan,t=I.useContext(v.a),a=t.prefixCls,c=t.fixedInfoList,d=c[n];return I.createElement(T.a,Object.assign({className:o,index:n,component:"td",prefixCls:a,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},d))}function g(e){return I.createElement("tr",Object.assign({},e))}function s(e){var o=e.children,n=I.useContext(v.a),l=n.prefixCls;return I.createElement("tfoot",{className:"".concat(l,"-summary")},o)}var _=H.b=s,p={Cell:y,Row:g}},nEHx:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){v.DARK="dark",v.LIGHT="light",v.HIGH_CONTRAST="hc"})(I||(I={}))},nKGa:function(j,H,b){j.exports=b.p+"static/export_exercise-template.f7655c19.png"},nWbc:function(j,H,b){},nnTU:function(j,H,b){"use strict";b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n"),v=b("JYp7"),T=b("pmY6"),y=b("24hK"),g=b("746U"),s=b("Cg/j");const _=Object(s.c)("commandService"),p=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new I.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,o){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!o)throw new Error("invalid command");return this.registerCommand({id:e,handler:o})}if(e.description){const t=[];for(let c of e.description.args)t.push(c.constraint);const a=e.handler;e.handler=function(c,...d){return Object(g.o)(d,t),a(c,...d)}}const{id:n}=e;let l=this._commands.get(n);l||(l=new y.a,this._commands.set(n,l));let r=l.unshift(e),i=Object(T.i)(()=>{r();const t=this._commands.get(n);(t==null?void 0:t.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),i}registerCommandAlias(e,o){return p.registerCommand(e,(n,...l)=>n.get(_).executeCommand(o,...l))}getCommand(e){const o=this._commands.get(e);return!o||o.isEmpty()?void 0:v.a.first(o)}getCommands(){const e=new Map;for(const o of this._commands.keys()){const n=this.getCommand(o);n&&e.set(o,n)}return e}};p.registerCommand("noop",()=>{})},nukY:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},oRuE:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso10126={pad:function(v,T){var y=T*4,g=y-v.sigBytes%y;v.concat(I.lib.WordArray.random(g-1)).concat(I.lib.WordArray.create([g<<24],1))},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Iso10126})},onxn:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v=I.Pos;function T(c,d){return c.line-d.line||c.ch-d.ch}var y="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",g=y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+y+"]["+g+"]*)","g");function _(c,d,f,h){this.line=d,this.ch=f,this.cm=c,this.text=c.getLine(d),this.min=h?Math.max(h.from,c.firstLine()):c.firstLine(),this.max=h?Math.min(h.to-1,c.lastLine()):c.lastLine()}function p(c,d){var f=c.cm.getTokenTypeAt(v(c.line,d));return f&&/\btag\b/.test(f)}function e(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function o(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function n(c){for(;;){var d=c.text.indexOf(">",c.ch);if(d==-1){if(e(c))continue;return}if(!p(c,d+1)){c.ch=d+1;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function l(c){for(;;){var d=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}s.lastIndex=d,c.ch=d;var f=s.exec(c.text);if(f&&f.index==d)return f}}function r(c){for(;;){s.lastIndex=c.ch;var d=s.exec(c.text);if(!d){if(e(c))continue;return}if(!p(c,d.index+1)){c.ch=d.index+1;continue}return c.ch=d.index+d[0].length,d}}function i(c){for(;;){var d=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function t(c,d){for(var f=[];;){var h=r(c),u,E=c.line,x=c.ch-(h?h[0].length:0);if(!h||!(u=n(c)))return;if(u=="selfClose")continue;if(h[1]){for(var O=f.length-1;O>=0;--O)if(f[O]==h[2]){f.length=O;break}if(O<0&&(!d||d==h[2]))return{tag:h[2],from:v(E,x),to:v(c.line,c.ch)}}else f.push(h[2])}}function a(c,d){for(var f=[];;){var h=i(c);if(!h)return;if(h=="selfClose"){l(c);continue}var u=c.line,E=c.ch,x=l(c);if(!x)return;if(x[1])f.push(x[2]);else{for(var O=f.length-1;O>=0;--O)if(f[O]==x[2]){f.length=O;break}if(O<0&&(!d||d==x[2]))return{tag:x[2],from:v(c.line,c.ch),to:v(u,E)}}}}I.registerHelper("fold","xml",function(c,d){for(var f=new _(c,d.line,0);;){var h=r(f);if(!h||f.line!=d.line)return;var u=n(f);if(!u)return;if(!h[1]&&u!="selfClose"){var E=v(f.line,f.ch),x=t(f,h[2]);return x&&T(x.from,E)>0?{from:E,to:x.from}:null}}}),I.findMatchingTag=function(c,d,f){var h=new _(c,d.line,d.ch,f);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var u=n(h),E=u&&v(h.line,h.ch),x=u&&l(h);if(!u||!x||T(h,d)>0)return;var O={from:v(h.line,h.ch),to:E,tag:x[2]};return u=="selfClose"?{open:O,close:null,at:"open"}:x[1]?{open:a(h,x[2]),close:O,at:"close"}:(h=new _(c,E.line,E.ch,f),{open:O,close:t(h,x[2]),at:"open"})},I.findEnclosingTag=function(c,d,f,h){for(var u=new _(c,d.line,d.ch,f);;){var E=a(u,h);if(!E)break;var x=new _(c,d.line,d.ch,f),O=t(x,E.tag);if(O)return{open:E,close:O}}},I.scanForClosingTag=function(c,d,f,h){var u=new _(c,d.line,d.ch,h?{from:0,to:h}:null);return t(u,f)}})},p4vh:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAaVBMVEUAAAD/vwD/vwD/ugD/ugD/uwD/vAD8vAP8ugP9uwL9uwL9uwL9ugL9ugL9ugL8uwP8uwP8ugP9ugL9ugL9ugL9uwL9uwL9uwL9uwP9zkn+1WT+34r+45n/7bz/8s//9+D/+/D//fj///8yardZAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAABpUlEQVRYw+3XwXKDIBAG4AVKoiRBDSq0adrG93/ImphSWwV2jYce+t+SGb5RWBcAmEQeji6acicgHVE6RA4s5cjWoVInHkognV6KP1Pt0NExJ3OE8AhUUKB9BKI4rpoM3+7KWzaMBLWwGcbttsNC+QlWcn7Eqesz8z+ocTHw7wUPQKdLEnItB+3i0PO569JQXwxtFHo5f3QoqB4v1BR663wSkItD738O6vN6WQlyZyRk1oGq8Xf6CFSMO8cjUAbMrgHZvl+qNSDVf/3MT7cSSyFza+DcepYEGQ/Ze9cVzSKo+oIavzUxfYeaJZAeb0xC2ytUUKD9FbJ6slMKySGnQBK4DO23ggJFd1qLh4oopPBQFoU4GmoSxxqNhbIExJHbbJM8aSkcJNNnv+rRk4h/OZt2DAPMcdSu46Qli3RSkhGADovMuGZASagK7AaI4XqOUQzo4ftfDdPkS5jByr1lssXKzzpXAP/QpLyfrvGXycPtJyczMnDhOgri44RvILQqiNy3aJPVUm5XsOziRoOaMFSQIB2GchLEgj3SEOuI6dm3M8E1+wTzvvO4HPYw7wAAAABJRU5ErkJggg=="},p5ED:function(j,H,b){"use strict";var I=b("+L6B"),v=b("2/Rp"),T=b("5Dmo"),y=b("3S7+"),g=b("k1fw"),s=b("9og8"),_=b("tJVT"),p=b("WmNS"),e=b.n(p),o=b("q1tI"),n=b.n(o),l=b("vHTk"),r=b.n(l),i=b("yEEn"),t=b("ZW9T"),a=b("1vsH"),c=b("V0Rq"),d=b("m3rI");H.a=function(f){var h,u,E,x,O,C,w,S=f.editOffice,A=S===void 0?"view":S,D=f.data,M=f.theme,N=f.type,P=f.filename,z=f.monacoEditor,X=f.className,k=f.style,F=f.close,U=f.onClose,L=f.hasMask,B=f.disabledDownload,Z=Object(o.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),re=Object(_.a)(Z,2),he=re[0],Se=re[1],ke=Object(o.useState)(""),te=Object(_.a)(ke,2),Re=te[0],Ce=te[1],pe=Object(o.useState)(),me=Object(_.a)(pe,2),se=me[0],be=me[1],ae=window.ENV==="build"?"/react/build":"",fe=d.a.PROXY_SERVER||location.origin,Fe,ie=1024*1024,q=10*ie,Q=Object(o.useRef)();(h=D)!==null&&h!==void 0&&h.startsWith("/api")&&N!=="txt"&&(D=d.a.API_SERVER+D),N==="office"&&(Fe=Object(a.T)(D).filesize,Fe>q&&(N="other")),P&&z&&(z.filename=P),Object(o.useEffect)(function(){var Ee,Le,ge=(Ee=document.cookie)===null||Ee===void 0||((Le=Ee.replace(/\s/g,""))===null||Le===void 0)?void 0:Le.split(";");ge==null||ge.map(function(De){var _e=De.split("=");_e[0]==="_educoder_session"&&Ce(_e[1])})},[]),Object(o.useEffect)(function(){N==="office"&&Y()},[N,D]);var Y=function(){var Ee=Object(s.a)(e.a.mark(function Le(){var ge,De,_e;return e.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return console.log("data:",D),ge=D,D.startsWith("http")||(ge=location.origin+ge),De=new URL(ge).pathname.split("/").pop(),tt.next=6,Object(c.V)({attachment_id:De});case 6:_e=tt.sent,be(_e);case 8:case"end":return tt.stop()}},Le)}));return function(){return Ee.apply(this,arguments)}}(),oe=function(){if(D.startsWith("http")||D.startsWith("blob:")){le();return}Object(a.z)(P||"educoder",D,P)},le=function(){Object(a.x)(P||"educoder",decodeURIComponent(D))};return n.a.createElement("div",{style:Object(g.a)({},k||{}),className:"".concat(L&&r.a.bgBlack," ").concat(N?r.a.wrp:"hide")},F&&n.a.createElement("div",{className:r.a.close,ref:Q},!B&&n.a.createElement(y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{onClick:le},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(r.a[X]," ").concat(X," ").concat(r.a.monaco," ").concat(N==="txt"?"show":"hide")},N==="txt"&&n.a.createElement(t.b,z)),N==="audio"&&n.a.createElement("audio",{src:"".concat(((u=D)===null||u===void 0?void 0:u.indexOf("http://"))>-1||((E=D)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(D),autoPlay:!0}),N==="video"&&n.a.createElement(n.a.Fragment,null,((x=D)===null||x===void 0?void 0:x.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(D),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(D),autoPlay:!0})),N==="office"&&se&&n.a.createElement("iframe",{src:"".concat(ae,"/office.html?key=").concat(se.key,"&url=").concat(fe+se.url,"&callbackUrl=").concat(fe+se.callbackUrl,"&fileType=").concat(se.fileType,"&title=").concat(se.title,"&model=").concat(A,"&officeServer=").concat(d.a.OFFICE_SERVER,"&disabledDownload=").concat(!!B)}),N==="html"&&n.a.createElement("iframe",{src:D+"&disposition=inline"}),N==="pdf"&&n.a.createElement("iframe",{src:"".concat(ae,"/js/pdfview/index.html?url=").concat(D,"&disabledDownload=").concat(!!B)}),N==="image"&&n.a.createElement("img",{src:"".concat(((O=D)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((C=D)===null||C===void 0?void 0:C.indexOf("https://"))>-1||(w=D)!==null&&w!==void 0&&w.startsWith("/api")?"":"data:image/png;base64,").concat(D)}),N==="other"&&n.a.createElement("div",null,n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),N==="download"&&n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,H,b){},pA7S:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.BlockCipher,s=v.algo,_=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],p=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=s.DES=g.extend({_doReset:function(){for(var a=this._key,c=a.words,d=[],f=0;f<56;f++){var h=_[f]-1;d[f]=c[h>>>5]>>>31-h%32&1}for(var u=this._subKeys=[],E=0;E<16;E++){for(var x=u[E]=[],O=e[E],f=0;f<24;f++)x[f/6|0]|=d[(p[f]-1+O)%28]<<31-f%6,x[4+(f/6|0)]|=d[28+(p[f+24]-1+O)%28]<<31-f%6;x[0]=x[0]<<1|x[0]>>>31;for(var f=1;f<7;f++)x[f]=x[f]>>>(f-1)*4+3;x[7]=x[7]<<5|x[7]>>>27}for(var C=this._invSubKeys=[],f=0;f<16;f++)C[f]=u[15-f]},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._subKeys)},decryptBlock:function(a,c){this._doCryptBlock(a,c,this._invSubKeys)},_doCryptBlock:function(a,c,d){this._lBlock=a[c],this._rBlock=a[c+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var f=0;f<16;f++){for(var h=d[f],u=this._lBlock,E=this._rBlock,x=0,O=0;O<8;O++)x|=o[O][((E^h[O])&n[O])>>>0];this._lBlock=E,this._rBlock=u^x}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),a[c]=this._lBlock,a[c+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(a,c){var d=(this._lBlock>>>a^this._rBlock)&c;this._rBlock^=d,this._lBlock^=d<>>a^this._lBlock)&c;this._lBlock^=d,this._rBlock^=d<192.");var d=c.slice(0,2),f=c.length<4?c.slice(0,2):c.slice(2,4),h=c.length<6?c.slice(0,2):c.slice(4,6);this._des1=l.createEncryptor(y.create(d)),this._des2=l.createEncryptor(y.create(f)),this._des3=l.createEncryptor(y.create(h))},encryptBlock:function(a,c){this._des1.encryptBlock(a,c),this._des2.decryptBlock(a,c),this._des3.encryptBlock(a,c)},decryptBlock:function(a,c){this._des3.decryptBlock(a,c),this._des2.encryptBlock(a,c),this._des1.decryptBlock(a,c)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=g._createHelper(t)}(),I.TripleDES})},pmY6:function(j,H,b){"use strict";b.d(H,"h",function(){return o}),b.d(H,"g",function(){return l}),b.d(H,"f",function(){return r}),b.d(H,"e",function(){return i}),b.d(H,"i",function(){return t}),b.d(H,"b",function(){return a}),b.d(H,"a",function(){return c}),b.d(H,"d",function(){return d}),b.d(H,"c",function(){return f});var I=b("C/vA"),v=b("JYp7");const T=!1;let y=null;function g(h){y=h}if(T){const h="__is_disposable_tracked__";g(new class{trackDisposable(u){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{u[h]||console.log(E)},3e3)}setParent(u,E){if(u&&u!==c.None)try{u[h]=!0}catch(x){}}markAsDisposed(u){if(u&&u!==c.None)try{u[h]=!0}catch(E){}}markAsSingleton(u){}})}function s(h){return y==null||y.trackDisposable(h),h}function _(h){y==null||y.markAsDisposed(h)}function p(h,u){y==null||y.setParent(h,u)}function e(h,u){if(!y)return;for(const E of h)y.setParent(E,u)}function o(h){return y==null||y.markAsSingleton(h),h}class n extends Error{constructor(h){super(`Encountered errors while disposing of store. Errors: [${h.join(", ")}]`);this.errors=h}}function l(h){return typeof h.dispose=="function"&&h.dispose.length===0}function r(h){if(v.a.is(h)){let u=[];for(const E of h)if(E)try{E.dispose()}catch(x){u.push(x)}if(u.length===1)throw u[0];if(u.length>1)throw new n(u);return Array.isArray(h)?[]:h}else if(h)return h.dispose(),h}function i(...h){const u=t(()=>r(h));return e(h,u),u}function t(h){const u=s({dispose:Object(I.a)(()=>{_(u),h()})});return u}class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,s(this)}dispose(){if(this._isDisposed)return;_(this),this._isDisposed=!0,this.clear()}clear(){try{r(this._toDispose.values())}finally{this._toDispose.clear()}}add(h){if(!h)return h;if(h===this)throw new Error("Cannot register a disposable on itself!");return p(h,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(h),h}}a.DISABLE_DISPOSED_WARNING=!1;class c{constructor(){this._store=new a,s(this),p(this._store,this)}dispose(){_(this),this._store.dispose()}_register(h){if(h===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(h)}}c.None=Object.freeze({dispose(){}});class d{constructor(){this._isDisposed=!1,s(this)}get value(){return this._isDisposed?void 0:this._value}set value(h){var u;if(this._isDisposed||h===this._value)return;(u=this._value)===null||u===void 0||u.dispose(),h&&p(h,this),this._value=h}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,_(this),(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}clearAndLeak(){const h=this._value;return this._value=void 0,h&&p(h,null),h}}class f{constructor(h){this.object=h}dispose(){}}},popq:function(j,H,b){},psGv:function(j,H,b){var I,v;(function(){var T;(function(){"use strict";var _=[,,function(n){function l(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var t=new l(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},l.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},l.prototype.has_match=function(t){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(t))return!0;return!1},l.prototype.set_indent=function(t,a){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(t){this.__items.push(t);var a=t.lastIndexOf(` +`))}b.createHash=function(o){return p(o)},b.createHmac=function(o,n){return p(o,n)},b.createCredentials=function(){e("sorry,createCredentials is not implemented yet")},b.createCipher=function(){e("sorry,createCipher is not implemented yet")},b.createCipheriv=function(){e("sorry,createCipheriv is not implemented yet")},b.createDecipher=function(){e("sorry,createDecipher is not implemented yet")},b.createDecipheriv=function(){e("sorry,createDecipheriv is not implemented yet")},b.createSign=function(){e("sorry,createSign is not implemented yet")},b.createVerify=function(){e("sorry,createVerify is not implemented yet")},b.createDiffieHellman=function(){e("sorry,createDiffieHellman is not implemented yet")},b.pbkdf2=function(){e("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,H,b){"use strict";var I=j("buffer").Buffer,v=4,T=I.alloc(v);T.fill(0);var y=8;function g(p,e){if(p.length%v!==0){var o=p.length+(v-p.length%v);p=I.concat([p,T],o)}for(var n=[],l=e?p.readInt32BE:p.readInt32LE,r=0;r>5]|=128<>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,t=-1732584194,a=271733878,c=0;c>16)+(l>>16)+(r>>16);return i<<16|r&65535}function o(n,l){return n<>>32-l}H.exports=function(l){return I.hash(l,T,16)}},{"./helpers":285}],287:[function(j,H,b){"use strict";var I=j("./helpers");function v(_,p){_[p>>5]|=128<<24-p%32,_[(p+64>>9<<4)+15]=p;for(var e=Array(80),o=1732584193,n=-271733879,l=-1732584194,r=271733878,i=-1009589776,t=0;t<_.length;t+=16){for(var a=o,c=n,d=l,f=r,h=i,u=0;u<80;u++){u<16?e[u]=_[t+u]:e[u]=s(e[u-3]^e[u-8]^e[u-14]^e[u-16],1);var E=g(g(s(o,5),T(u,n,l,r)),g(g(i,e[u]),y(u)));i=r,r=l,l=s(n,30),n=o,o=E}o=g(o,a),n=g(n,c),l=g(l,d),r=g(r,f),i=g(i,h)}return Array(o,n,l,r,i)}function T(_,p,e,o){return _<20?p&e|~p&o:_<40?p^e^o:_<60?p&e|p&o|e&o:p^e^o}function y(_){return _<20?1518500249:_<40?1859775393:_<60?-1894007588:-899497514}function g(_,p){var e=(_&65535)+(p&65535),o=(_>>16)+(p>>16)+(e>>16);return o<<16|e&65535}function s(_,p){return _<>>32-p}H.exports=function(p){return I.hash(p,v,20,!0)}},{"./helpers":285}],288:[function(j,H,b){"use strict";H.exports=function(){return function(){}}},{}],289:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/helpers/typeof"),T=y(v);function y(o){return o&&o.__esModule?o:{default:o}}var g=j("stream"),s=g.Stream,_=j("../lib/common/utils/isArray"),p=_.isArray;H.exports.string=function(n){return typeof n=="string"},H.exports.array=p,H.exports.buffer=I.isBuffer;function e(o){return o instanceof s}H.exports.writableStream=function(n){return e(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(j,H,b){"use strict";b.encodeURIComponent=function(I){try{return encodeURIComponent(I)}catch(v){return I}},b.escape=j("escape-html"),b.timestamp=function(v){if(v){var T=v;return typeof T=="string"&&(T=Number(T)),String(v).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/json/stringify"),y=_(T),g=j("babel-runtime/helpers/typeof"),s=_(g);function _(u){return u&&u.__esModule?u:{default:u}}var p=j("util"),e=j("url"),o=j("http"),n=j("https"),l=j("debug")("urllib"),r=j("humanize-ms"),i,t=0,a=Math.pow(2,31)-10,c=/^https?:\/\//i;function d(u,E){return u===void 0?E:u}function f(u,E){return function(x,O,C){if(x)return E(x);u({data:O,status:C.statusCode,headers:C.headers,res:C})}}b.TIMEOUTS=[r("300s"),r("300s")];var h=["json","text"];b.request=function(E,x,O){return arguments.length===2&&typeof x=="function"&&(O=x,x=null),typeof O=="function"?b.requestWithCallback(E,x,O):(i||(i=j("any-promise")),new i(function(C,w){b.requestWithCallback(E,x,f(C,w))}))},b.requestWithCallback=function(E,x,O){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,s.default)(E))!=="object"){var C=p.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(C)}arguments.length===2&&typeof x=="function"&&(O=x,x=null),x=x||{},t>=a&&(t=0);var w=++t;x.requestUrls=x.requestUrls||[];var S={requestId:w,url:E,args:x,ctx:x.ctx};x.emitter&&x.emitter.emit("request",S),x.timeout=x.timeout||b.TIMEOUTS,x.maxRedirects=x.maxRedirects||10,x.streaming=x.streaming||x.customResponse;var A=Date.now(),D;typeof E=="string"?(c.test(E)||(E="http://"+E),D=e.parse(E)):D=E;var M=(x.type||x.method||D.method||"GET").toUpperCase(),N=D.port||80,P=o,z=d(x.agent,b.agent),X=x.fixJSONCtlChars;D.protocol==="https:"&&(P=n,z=d(x.httpsAgent,b.httpsAgent),D.port||(N=443));var k={host:D.hostname||D.host||"localhost",path:D.path||"/",method:M,port:N,agent:z,headers:x.headers||{},lookup:x.lookup};Array.isArray(x.timeout)?k.requestTimeout=x.timeout[x.timeout.length-1]:typeof x.timeout!="undefined"&&(k.requestTimeout=x.timeout);for(var F=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,E,Ye),x.headers=x.headers||{},x.headers.Authorization=digestAuthHeader(k.method,k.path,Ye,x.digestAuth),l("Request#%d %s: auth with digest header: %s",w,E,x.headers.Authorization),Oe.headers["set-cookie"]&&(x.headers.Cookie=Oe.headers["set-cookie"].join(";")),b.requestWithCallback(E,x,Ve)}var Ne=Date.now()-A;ie&&(ie.contentDownload=Ne),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ne,se,be,k.method,k.host,k.path,me,ie);var He={status:be,statusCode:be,headers:Je,size:se,aborted:ae,rt:Ne,keepAliveSocket:me,data:Et,requestUrls:x.requestUrls,timing:ie,remoteAddress:fe,remotePort:Fe};if(Me){var ve="";z&&typeof z.getCurrentStatus=="function"&&(ve=", agent status: "+(0,y.default)(z.getCurrentStatus())),Me.message+=", "+k.method+" "+E+" "+be+" (connected: "+pe+", keepalive socket: "+me+ve+`) +headers: `+(0,y.default)(Je),Me.data=Et,Me.path=k.path,Me.status=be,Me.headers=Je,Me.res=He}Ve(Me,Et,x.streaming?Oe:He),x.emitter&&(S.url=E,S.socket=tt&&tt.connection,S.options=k,S.size=Se,x.emitter.emit("response",{requestId:w,error:Me,ctx:x.ctx,req:S,res:He}))}function oe(Me){var Et=null;if(x.followRedirect&&statuses.redirect[Me.statusCode]){x._followRedirectCount=(x._followRedirectCount||0)+1;var Oe=Me.headers.location;if(!Oe)Et=new Error("Got statusCode "+Me.statusCode+" but cannot resolve next location from headers"),Et.name="FollowRedirectError";else if(x._followRedirectCount>x.maxRedirects)Et=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Et.name="MaxRedirectError";else{var Ve=x.formatRedirectUrl?x.formatRedirectUrl(E,Oe):e.resolve(E,Oe);l("Request#%d %s: `redirected` from %s to %s",w,k.path,E,Ve),Q(),x.headers&&x.headers.Host&&c.test(Oe)&&(x.headers.Host=null);var Je=O;return O=null,b.requestWithCallback(Ve,x,Je),{redirect:!0,error:null}}}return{redirect:!1,error:Et}}!k.headers["User-Agent"]&&!k.headers["user-agent"]&&(k.headers["User-Agent"]=navigator.userAgent),x.gzip&&(!k.headers["Accept-Encoding"]&&!k.headers["accept-encoding"]&&(k.headers["Accept-Encoding"]="gzip"));function le(Me,Et,Oe){var Ve=Me.headers["content-encoding"];return Oe(null,Et,Ve)}var Ee=x.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",w,M,E,k.headers,k.path),x.requestUrls.push(E);function Le(Me){if(ie&&(ie.waiting=Date.now()-A),l("Request#%d %s `req response` event emit: status %d, headers: %j",w,E,Me.statusCode,Me.headers),x.streaming){var Et=oe(Me);if(Et.redirect){Me.resume();return}return Et.error?(Me.resume(),Y(Et.error,null,Me)):Y(null,null,Me)}if(Me.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",w,E,se)}),Me.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",w,E,se)}),Me.on("aborted",function(){ae=!0,l("Request#%d %s: `res aborted` event emit, total size %d",w,E,se)}),Ee){var Et=oe(Me);if(Et.redirect){Me.resume();return}return Et.error?(Me.resume(),Ee.end(),Y(Et.error,null,Me)):(x.consumeWriteStream===!1?Me.on("end",Y.bind(null,null,null,Me)):isNode010||isNode012?first([[Ee,"close"],[Me,"aborted"]],function(Je,Ye,Ne){l("Request#%d %s: writeStream or res %s event emitted",w,E,Ne),Y(Ce||null,null,Me)}):Ee.on("close",function(){l("Request#%d %s: writeStream close event emitted",w,E),Y(Ce||null,null,Me)}),Me.pipe(Ee))}var Oe=[];Me.on("data",function(Ve){l("Request#%d %s: `res data` event emit, size %d",w,E,Ve.length),se+=Ve.length,Oe.push(Ve)}),Me.on("end",function(){var Ve=v.concat(Oe,se);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,E,se,Me._dumped),Ce)return Y(Ce,Ve,Me);var Je=oe(Me);if(Je.error)return Y(Je.error,Ve,Me);if(Je.redirect)return;le(Me,Ve,function(Ye,Ne,He){if(Ye)return Y(Ye,Ve,Me);if(!He&&h.indexOf(x.dataType)>=0){try{Ne=decodeBodyByCharset(Ne,Me)}catch(xe){return l("decodeBodyByCharset error: %s",xe),Y(null,Ne,Me)}if(x.dataType==="json")if(se===0)Ne=null;else{var ve=parseJSON(Ne,X);ve.error?Ye=ve.error:Ne=ve.data}}ae&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,E),Y(Ye,Ne,Me)})})}var ge,De;Array.isArray(x.timeout)?(ge=r(x.timeout[0]),De=r(x.timeout[1])):ge=De=r(x.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",ge,De);function _e(){l("Connect timer ticking, timeout: %d",ge),te=setTimeout(function(){te=null,be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",Et="ConnectionTimeoutError";tt.socket||(Et="SocketAssignTimeoutError",Me+=", working sockets is full"),Ce=new Error(Me),Ce.name=Et,Ce.requestId=w,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Me,pe),Ge()},ge)}function Xe(){l("Response timer ticking, timeout: %d",De),Re=setTimeout(function(){Re=null;var Me="Response timeout for "+De+"ms",Et="ResponseTimeoutError";Ce=new Error(Me),Ce.name=Et,Ce.requestId=w,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Me,pe),Ge()},De)}var tt;k.mode=x.mode?x.mode:"";try{tt=P.request(k,Le)}catch(Me){return Y(Me)}typeof window=="undefined"?_e():tt.on("requestTimeout",function(){be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",Et="ConnectionTimeoutError";Ce=new Error(Me),Ce.name=Et,Ce.requestId=w,Ge()});function Ge(){l("Request#%d %s abort, connected: %s",w,E,pe),tt.socket||(Ce.noSocket=!0,Y(Ce)),tt.abort()}return ie&&tt.on("finish",function(){ie.requestSent=Date.now()-A}),tt.once("socket",function(Me){ie&&(ie.queuing=Date.now()-A),isNode010&&Me.socket&&(Me=Me.socket);var Et=Me.readyState;if(Et==="opening"){Me.once("lookup",function(Oe,Ve,Je){l("Request#%d %s lookup: %s, %s, %s",w,E,Oe,Ve,Je),ie&&(ie.dnslookup=Date.now()-A),Ve&&(fe=Ve)}),Me.once("connect",function(){ie&&(ie.connected=Date.now()-A),q(),Xe(),l("Request#%d %s new socket connected",w,E),pe=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",w,E,Et),pe=!0,me=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort,q(),Xe()}),tt.on("error",function(Me){(Me.name==="Error"||Me.name==="TypeError")&&(Me.name=pe?"ResponseError":"RequestError"),Me.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",w,E,Me.name,Me.message),Y(Ce||Me)}),Ee&&Ee.once("error",function(Me){Me.message+=' (writeStream "error")',Ce=Me,l("Request#%d %s `writeStream error` event emit, %s: %s",w,E,Me.name,Me.message),Ge()}),x.stream?(x.stream.pipe(tt),x.stream.once("error",function(Me){Me.message+=' (stream "error")',Ce=Me,l("Request#%d %s `readStream error` event emit, %s: %s",w,E,Me.name,Me.message),Ge()})):tt.end(Z),tt.requestId=w,tt}}).call(this,j("_process"),j("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n0Id:function(j,H,b){j.exports=b.p+"static/disappoint2.7a4bdf92.svg"},n6Qo:function(j,H,b){"use strict";b.d(H,"a",function(){return p});var I=b("q1tI"),v=b("biw7"),T=b("fyJ8");function y(e){var o=e.className,n=e.index,l=e.children,r=e.colSpan,i=e.rowSpan,t=I.useContext(v.a),a=t.prefixCls,c=t.fixedInfoList,d=c[n];return I.createElement(T.a,Object.assign({className:o,index:n,component:"td",prefixCls:a,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},d))}function g(e){return I.createElement("tr",Object.assign({},e))}function s(e){var o=e.children,n=I.useContext(v.a),l=n.prefixCls;return I.createElement("tfoot",{className:"".concat(l,"-summary")},o)}var _=H.b=s,p={Cell:y,Row:g}},nEHx:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){v.DARK="dark",v.LIGHT="light",v.HIGH_CONTRAST="hc"})(I||(I={}))},nKGa:function(j,H,b){j.exports=b.p+"static/export_exercise-template.f7655c19.png"},nWbc:function(j,H,b){},nnTU:function(j,H,b){"use strict";b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n"),v=b("JYp7"),T=b("pmY6"),y=b("24hK"),g=b("746U"),s=b("Cg/j");const _=Object(s.c)("commandService"),p=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new I.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,o){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!o)throw new Error("invalid command");return this.registerCommand({id:e,handler:o})}if(e.description){const t=[];for(let c of e.description.args)t.push(c.constraint);const a=e.handler;e.handler=function(c,...d){return Object(g.o)(d,t),a(c,...d)}}const{id:n}=e;let l=this._commands.get(n);l||(l=new y.a,this._commands.set(n,l));let r=l.unshift(e),i=Object(T.i)(()=>{r();const t=this._commands.get(n);(t==null?void 0:t.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),i}registerCommandAlias(e,o){return p.registerCommand(e,(n,...l)=>n.get(_).executeCommand(o,...l))}getCommand(e){const o=this._commands.get(e);return!o||o.isEmpty()?void 0:v.a.first(o)}getCommands(){const e=new Map;for(const o of this._commands.keys()){const n=this.getCommand(o);n&&e.set(o,n)}return e}};p.registerCommand("noop",()=>{})},nukY:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},oRuE:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso10126={pad:function(v,T){var y=T*4,g=y-v.sigBytes%y;v.concat(I.lib.WordArray.random(g-1)).concat(I.lib.WordArray.create([g<<24],1))},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Iso10126})},onxn:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v=I.Pos;function T(c,d){return c.line-d.line||c.ch-d.ch}var y="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",g=y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+y+"]["+g+"]*)","g");function _(c,d,f,h){this.line=d,this.ch=f,this.cm=c,this.text=c.getLine(d),this.min=h?Math.max(h.from,c.firstLine()):c.firstLine(),this.max=h?Math.min(h.to-1,c.lastLine()):c.lastLine()}function p(c,d){var f=c.cm.getTokenTypeAt(v(c.line,d));return f&&/\btag\b/.test(f)}function e(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function o(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function n(c){for(;;){var d=c.text.indexOf(">",c.ch);if(d==-1){if(e(c))continue;return}if(!p(c,d+1)){c.ch=d+1;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function l(c){for(;;){var d=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}s.lastIndex=d,c.ch=d;var f=s.exec(c.text);if(f&&f.index==d)return f}}function r(c){for(;;){s.lastIndex=c.ch;var d=s.exec(c.text);if(!d){if(e(c))continue;return}if(!p(c,d.index+1)){c.ch=d.index+1;continue}return c.ch=d.index+d[0].length,d}}function i(c){for(;;){var d=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function t(c,d){for(var f=[];;){var h=r(c),u,E=c.line,x=c.ch-(h?h[0].length:0);if(!h||!(u=n(c)))return;if(u=="selfClose")continue;if(h[1]){for(var O=f.length-1;O>=0;--O)if(f[O]==h[2]){f.length=O;break}if(O<0&&(!d||d==h[2]))return{tag:h[2],from:v(E,x),to:v(c.line,c.ch)}}else f.push(h[2])}}function a(c,d){for(var f=[];;){var h=i(c);if(!h)return;if(h=="selfClose"){l(c);continue}var u=c.line,E=c.ch,x=l(c);if(!x)return;if(x[1])f.push(x[2]);else{for(var O=f.length-1;O>=0;--O)if(f[O]==x[2]){f.length=O;break}if(O<0&&(!d||d==x[2]))return{tag:x[2],from:v(c.line,c.ch),to:v(u,E)}}}}I.registerHelper("fold","xml",function(c,d){for(var f=new _(c,d.line,0);;){var h=r(f);if(!h||f.line!=d.line)return;var u=n(f);if(!u)return;if(!h[1]&&u!="selfClose"){var E=v(f.line,f.ch),x=t(f,h[2]);return x&&T(x.from,E)>0?{from:E,to:x.from}:null}}}),I.findMatchingTag=function(c,d,f){var h=new _(c,d.line,d.ch,f);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var u=n(h),E=u&&v(h.line,h.ch),x=u&&l(h);if(!u||!x||T(h,d)>0)return;var O={from:v(h.line,h.ch),to:E,tag:x[2]};return u=="selfClose"?{open:O,close:null,at:"open"}:x[1]?{open:a(h,x[2]),close:O,at:"close"}:(h=new _(c,E.line,E.ch,f),{open:O,close:t(h,x[2]),at:"open"})},I.findEnclosingTag=function(c,d,f,h){for(var u=new _(c,d.line,d.ch,f);;){var E=a(u,h);if(!E)break;var x=new _(c,d.line,d.ch,f),O=t(x,E.tag);if(O)return{open:E,close:O}}},I.scanForClosingTag=function(c,d,f,h){var u=new _(c,d.line,d.ch,h?{from:0,to:h}:null);return t(u,f)}})},p4vh:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAaVBMVEUAAAD/vwD/vwD/ugD/ugD/uwD/vAD8vAP8ugP9uwL9uwL9uwL9ugL9ugL9ugL8uwP8uwP8ugP9ugL9ugL9ugL9uwL9uwL9uwL9uwP9zkn+1WT+34r+45n/7bz/8s//9+D/+/D//fj///8yardZAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAABpUlEQVRYw+3XwXKDIBAG4AVKoiRBDSq0adrG93/ImphSWwV2jYce+t+SGb5RWBcAmEQeji6acicgHVE6RA4s5cjWoVInHkognV6KP1Pt0NExJ3OE8AhUUKB9BKI4rpoM3+7KWzaMBLWwGcbttsNC+QlWcn7Eqesz8z+ocTHw7wUPQKdLEnItB+3i0PO569JQXwxtFHo5f3QoqB4v1BR663wSkItD738O6vN6WQlyZyRk1oGq8Xf6CFSMO8cjUAbMrgHZvl+qNSDVf/3MT7cSSyFza+DcepYEGQ/Ze9cVzSKo+oIavzUxfYeaJZAeb0xC2ytUUKD9FbJ6slMKySGnQBK4DO23ggJFd1qLh4oopPBQFoU4GmoSxxqNhbIExJHbbJM8aSkcJNNnv+rRk4h/OZt2DAPMcdSu46Qli3RSkhGADovMuGZASagK7AaI4XqOUQzo4ftfDdPkS5jByr1lssXKzzpXAP/QpLyfrvGXycPtJyczMnDhOgri44RvILQqiNy3aJPVUm5XsOziRoOaMFSQIB2GchLEgj3SEOuI6dm3M8E1+wTzvvO4HPYw7wAAAABJRU5ErkJggg=="},p5ED:function(j,H,b){"use strict";var I=b("+L6B"),v=b("2/Rp"),T=b("5Dmo"),y=b("3S7+"),g=b("k1fw"),s=b("9og8"),_=b("tJVT"),p=b("WmNS"),e=b.n(p),o=b("q1tI"),n=b.n(o),l=b("vHTk"),r=b.n(l),i=b("yEEn"),t=b("ZW9T"),a=b("1vsH"),c=b("V0Rq"),d=b("m3rI");H.a=function(f){var h,u,E,x,O,C,w,S=f.editOffice,A=S===void 0?"view":S,D=f.data,M=f.theme,N=f.type,P=f.filename,z=f.monacoEditor,X=f.className,k=f.style,F=f.close,U=f.onClose,L=f.hasMask,B=f.disabledDownload,Z=Object(o.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),re=Object(_.a)(Z,2),he=re[0],Se=re[1],ke=Object(o.useState)(""),te=Object(_.a)(ke,2),Re=te[0],Ce=te[1],pe=Object(o.useState)(),me=Object(_.a)(pe,2),se=me[0],be=me[1],ae=window.ENV==="build"?"/react/build":"",fe=d.a.PROXY_SERVER||location.origin,Fe,ie=1024*1024,q=10*ie,Q=Object(o.useRef)();(h=D)!==null&&h!==void 0&&h.startsWith("/api")&&N!=="txt"&&(D=d.a.API_SERVER+D),N==="office"&&(Fe=Object(a.T)(D).filesize,Fe>q&&(N="other")),P&&z&&(z.filename=P),Object(o.useEffect)(function(){var Ee,Le,ge=(Ee=document.cookie)===null||Ee===void 0||((Le=Ee.replace(/\s/g,""))===null||Le===void 0)?void 0:Le.split(";");ge==null||ge.map(function(De){var _e=De.split("=");_e[0]==="_educoder_session"&&Ce(_e[1])})},[]),Object(o.useEffect)(function(){N==="office"&&Y()},[N,D]);var Y=function(){var Ee=Object(s.a)(e.a.mark(function Le(){var ge,De,_e;return e.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return console.log("data:",D),ge=D,D.startsWith("http")||(ge=location.origin+ge),De=new URL(ge).pathname.split("/").pop(),tt.next=6,Object(c.V)({attachment_id:De});case 6:_e=tt.sent,be(_e);case 8:case"end":return tt.stop()}},Le)}));return function(){return Ee.apply(this,arguments)}}(),oe=function(){if(D.startsWith("http")||D.startsWith("blob:")){le();return}Object(a.z)(P||"educoder",D,P)},le=function(){Object(a.x)(P||"educoder",decodeURIComponent(D))};return n.a.createElement("div",{style:Object(g.a)({},k||{}),className:"".concat(L&&r.a.bgBlack," ").concat(N?r.a.wrp:"hide")},F&&n.a.createElement("div",{className:r.a.close,ref:Q},!B&&n.a.createElement(y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{onClick:le},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(r.a[X]," ").concat(X," ").concat(r.a.monaco," ").concat(N==="txt"?"show":"hide")},N==="txt"&&n.a.createElement(t.b,z)),N==="audio"&&n.a.createElement("audio",{src:"".concat(((u=D)===null||u===void 0?void 0:u.indexOf("http://"))>-1||((E=D)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(D),autoPlay:!0}),N==="video"&&n.a.createElement(n.a.Fragment,null,((x=D)===null||x===void 0?void 0:x.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(D),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(D),autoPlay:!0})),N==="office"&&se&&n.a.createElement("iframe",{src:"".concat(ae,"/office.html?key=").concat(se.key,"&url=").concat(fe+se.url,"&callbackUrl=").concat(fe+se.callbackUrl,"&fileType=").concat(se.fileType,"&title=").concat(se.title,"&model=").concat(A,"&officeServer=").concat(d.a.OFFICE_SERVER,"&disabledDownload=").concat(!!B)}),N==="html"&&n.a.createElement("iframe",{src:D+"&disposition=inline"}),N==="pdf"&&n.a.createElement("iframe",{src:"".concat(ae,"/js/pdfview/index.html?url=").concat(D,"&disabledDownload=").concat(!!B)}),N==="image"&&n.a.createElement("img",{src:"".concat(((O=D)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((C=D)===null||C===void 0?void 0:C.indexOf("https://"))>-1||(w=D)!==null&&w!==void 0&&w.startsWith("/api")?"":"data:image/png;base64,").concat(D)}),N==="other"&&n.a.createElement("div",null,n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),N==="download"&&n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,H,b){},pA7S:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.BlockCipher,s=v.algo,_=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],p=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=s.DES=g.extend({_doReset:function(){for(var a=this._key,c=a.words,d=[],f=0;f<56;f++){var h=_[f]-1;d[f]=c[h>>>5]>>>31-h%32&1}for(var u=this._subKeys=[],E=0;E<16;E++){for(var x=u[E]=[],O=e[E],f=0;f<24;f++)x[f/6|0]|=d[(p[f]-1+O)%28]<<31-f%6,x[4+(f/6|0)]|=d[28+(p[f+24]-1+O)%28]<<31-f%6;x[0]=x[0]<<1|x[0]>>>31;for(var f=1;f<7;f++)x[f]=x[f]>>>(f-1)*4+3;x[7]=x[7]<<5|x[7]>>>27}for(var C=this._invSubKeys=[],f=0;f<16;f++)C[f]=u[15-f]},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._subKeys)},decryptBlock:function(a,c){this._doCryptBlock(a,c,this._invSubKeys)},_doCryptBlock:function(a,c,d){this._lBlock=a[c],this._rBlock=a[c+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var f=0;f<16;f++){for(var h=d[f],u=this._lBlock,E=this._rBlock,x=0,O=0;O<8;O++)x|=o[O][((E^h[O])&n[O])>>>0];this._lBlock=E,this._rBlock=u^x}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),a[c]=this._lBlock,a[c+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(a,c){var d=(this._lBlock>>>a^this._rBlock)&c;this._rBlock^=d,this._lBlock^=d<>>a^this._lBlock)&c;this._lBlock^=d,this._rBlock^=d<192.");var d=c.slice(0,2),f=c.length<4?c.slice(0,2):c.slice(2,4),h=c.length<6?c.slice(0,2):c.slice(4,6);this._des1=l.createEncryptor(y.create(d)),this._des2=l.createEncryptor(y.create(f)),this._des3=l.createEncryptor(y.create(h))},encryptBlock:function(a,c){this._des1.encryptBlock(a,c),this._des2.decryptBlock(a,c),this._des3.encryptBlock(a,c)},decryptBlock:function(a,c){this._des3.decryptBlock(a,c),this._des2.encryptBlock(a,c),this._des1.decryptBlock(a,c)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=g._createHelper(t)}(),I.TripleDES})},pmY6:function(j,H,b){"use strict";b.d(H,"h",function(){return o}),b.d(H,"g",function(){return l}),b.d(H,"f",function(){return r}),b.d(H,"e",function(){return i}),b.d(H,"i",function(){return t}),b.d(H,"b",function(){return a}),b.d(H,"a",function(){return c}),b.d(H,"d",function(){return d}),b.d(H,"c",function(){return f});var I=b("C/vA"),v=b("JYp7");const T=!1;let y=null;function g(h){y=h}if(T){const h="__is_disposable_tracked__";g(new class{trackDisposable(u){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{u[h]||console.log(E)},3e3)}setParent(u,E){if(u&&u!==c.None)try{u[h]=!0}catch(x){}}markAsDisposed(u){if(u&&u!==c.None)try{u[h]=!0}catch(E){}}markAsSingleton(u){}})}function s(h){return y==null||y.trackDisposable(h),h}function _(h){y==null||y.markAsDisposed(h)}function p(h,u){y==null||y.setParent(h,u)}function e(h,u){if(!y)return;for(const E of h)y.setParent(E,u)}function o(h){return y==null||y.markAsSingleton(h),h}class n extends Error{constructor(h){super(`Encountered errors while disposing of store. Errors: [${h.join(", ")}]`);this.errors=h}}function l(h){return typeof h.dispose=="function"&&h.dispose.length===0}function r(h){if(v.a.is(h)){let u=[];for(const E of h)if(E)try{E.dispose()}catch(x){u.push(x)}if(u.length===1)throw u[0];if(u.length>1)throw new n(u);return Array.isArray(h)?[]:h}else if(h)return h.dispose(),h}function i(...h){const u=t(()=>r(h));return e(h,u),u}function t(h){const u=s({dispose:Object(I.a)(()=>{_(u),h()})});return u}class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,s(this)}dispose(){if(this._isDisposed)return;_(this),this._isDisposed=!0,this.clear()}clear(){try{r(this._toDispose.values())}finally{this._toDispose.clear()}}add(h){if(!h)return h;if(h===this)throw new Error("Cannot register a disposable on itself!");return p(h,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(h),h}}a.DISABLE_DISPOSED_WARNING=!1;class c{constructor(){this._store=new a,s(this),p(this._store,this)}dispose(){_(this),this._store.dispose()}_register(h){if(h===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(h)}}c.None=Object.freeze({dispose(){}});class d{constructor(){this._isDisposed=!1,s(this)}get value(){return this._isDisposed?void 0:this._value}set value(h){var u;if(this._isDisposed||h===this._value)return;(u=this._value)===null||u===void 0||u.dispose(),h&&p(h,this),this._value=h}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,_(this),(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}clearAndLeak(){const h=this._value;return this._value=void 0,h&&p(h,null),h}}class f{constructor(h){this.object=h}dispose(){}}},popq:function(j,H,b){},psGv:function(j,H,b){var I,v;(function(){var T;(function(){"use strict";var _=[,,function(n){function l(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var t=new l(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},l.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},l.prototype.has_match=function(t){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(t))return!0;return!1},l.prototype.set_indent=function(t,a){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(t){this.__items.push(t);var a=t.lastIndexOf(` `);a!==-1?this.__character_count=t.length-a:this.__character_count+=t.length},l.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function r(t,a){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),a=a||"",t.indent_level>0&&(a=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}r.prototype.get_indent_size=function(t,a){var c=this.__base_string_length;return a=a||0,t<0&&(c=0),c+=t*this.__indent_size,c+=a,c},r.prototype.get_indent_string=function(t,a){var c=this.__base_string;return a=a||0,t<0&&(t=0,c=""),a+=t*this.__indent_size,this.__ensure_cache(a),c+=this.__cache[a],c},r.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var t=this.__cache.length,a=0,c="";this.__indent_size&&t>=this.__indent_size&&(a=Math.floor(t/this.__indent_size),t-=a*this.__indent_size,c=new Array(a+1).join(this.__indent_string)),t&&(c+=new Array(t+1).join(" ")),this.__cache.push(c)};function i(t,a){this.__indent_cache=new r(t,a),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,a){return this.__indent_cache.get_indent_string(t,a)},i.prototype.get_indent_size=function(t,a){return this.__indent_cache.get_indent_size(t,a)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===` `&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` `);return t!==` @@ -519,7 +519,7 @@ You passed in: '`+this.raw_options[t]+"'");return d},l.prototype._is_valid_selec `)),X=B+X.replace(/\n/g,` `+B)}U&&(X?X=U+X+` `+L:X=U+L),M.print_newline(!1),X&&(N.text=X,N.whitespace_before="",N.newlines=0,M.add_raw_token(N),M.print_newline(!0))}},w.prototype._handle_tag_open=function(M,N,P,z){var X=this._get_tag_open_token(N);return(P.is_unformatted||P.is_content_unformatted)&&!P.is_empty_element&&N.type===c.TAG_OPEN&&N.text.indexOf("]*)/),this.tag_check=P?P[1]:""):(P=N.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=P?P[1]:"",(N.text.startsWith("{{#>")||N.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&N.next!==null?this.tag_check=N.next.text.split(" ")[0]:this.tag_check=N.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),N.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||N.closed&&N.closed.text==="/>";var z=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(z=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(z)))}};w.prototype._get_tag_open_token=function(M){var N=new S(this._tag_stack.get_parser_token(),M);return N.alignment_size=this._options.wrap_attributes_indent_size,N.is_end_tag=N.is_end_tag||x(N.tag_check,this._options.void_elements),N.is_empty_element=N.tag_complete||N.is_start_tag&&N.is_end_tag,N.is_unformatted=!N.tag_complete&&x(N.tag_check,this._options.unformatted),N.is_content_unformatted=!N.is_empty_element&&x(N.tag_check,this._options.content_unformatted),N.is_inline_element=x(N.tag_name,this._options.inline)||N.tag_name.includes("-")||N.tag_start_char==="{",N},w.prototype._set_tag_position=function(M,N,P,z,X){if(P.is_empty_element||(P.is_end_tag?P.start_tag_token=this._tag_stack.try_pop(P.tag_name):(this._do_optional_end_element(P)&&(P.is_inline_element||M.print_newline(!1)),this._tag_stack.record_tag(P),(P.tag_name==="script"||P.tag_name==="style")&&!(P.is_unformatted||P.is_content_unformatted)&&(P.custom_beautifier_name=E(P.tag_check,N)))),x(P.tag_check,this._options.extra_liners)&&(M.print_newline(!1),M._output.just_added_blankline()||M.print_newline(!0)),P.is_empty_element){if(P.tag_start_char==="{"&&P.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),P.indent_content=!0;var k=M.current_line_has_match(/{{#if/);k||M.print_newline(!1)}P.tag_name==="!--"&&X.type===c.TAG_CLOSE&&z.is_end_tag&&P.text.indexOf(` -`)===-1||(P.is_inline_element||P.is_unformatted||M.print_newline(!1),this._calcluate_parent_multiline(M,P))}else if(P.is_end_tag){var F=!1;F=P.start_tag_token&&P.start_tag_token.multiline_content,F=F||!P.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(X.type===c.TAG_CLOSE&&P.start_tag_token===z)&&X.type!=="TK_CONTENT",(P.is_content_unformatted||P.is_unformatted)&&(F=!1),F&&M.print_newline(!1)}else P.indent_content=!P.custom_beautifier_name,P.tag_start_char==="<"&&(P.tag_name==="html"?P.indent_content=this._options.indent_inner_html:P.tag_name==="head"?P.indent_content=this._options.indent_head_inner_html:P.tag_name==="body"&&(P.indent_content=this._options.indent_body_inner_html)),!(P.is_inline_element||P.is_unformatted)&&(X.type!=="TK_CONTENT"||P.is_content_unformatted)&&M.print_newline(!1),this._calcluate_parent_multiline(M,P)},w.prototype._calcluate_parent_multiline=function(M,N){N.parent&&M._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.parent.multiline_content=!0)};var A=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],D=["a","audio","del","ins","map","noscript","video"];w.prototype._do_optional_end_element=function(M){var N=null;if(M.is_empty_element||!M.is_start_tag||!M.parent)return;if(M.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(M.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul"]);else if(M.tag_name==="dd"||M.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(M.parent.tag_name==="p"&&A.indexOf(M.tag_name)!==-1){var P=M.parent.parent;(!P||D.indexOf(P.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else M.tag_name==="rp"||M.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):M.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):M.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):M.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):M.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):M.tag_name==="tbody"||M.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):M.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(M.tag_name==="th"||M.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return M.parent=this._tag_stack.get_parser_token(),N},n.exports.Beautifier=w},function(n,l,r){var i=r(6).Options;function t(a){i.call(this,a,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}t.prototype=new i,n.exports.Options=t},function(n,l,r){var i=r(9).Tokenizer,t=r(9).TOKEN,a=r(13).Directives,c=r(14).TemplatablePattern,d=r(12).Pattern,f={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},h=new a(/<\!--/,/-->/),u=function(E,x){i.call(this,E,x),this._current_tag_name="";var O=new c(this._input).read_options(this._options),C=new d(this._input);if(this.__patterns={word:O.until(/[\n\r\t <]/),single_quote:O.until_after(/'/),double_quote:O.until_after(/"/),attribute:O.until(/[\n\r\t =>]|\/>/),element_name:O.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(//),cdata:C.starting_with(//),conditional_comment:C.starting_with(//),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var w=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(w).until_after(w)}};u.prototype=new i,u.prototype._is_comment=function(E){return!1},u.prototype._is_opening=function(E){return E.type===f.TAG_OPEN},u.prototype._is_closing=function(E,x){return E.type===f.TAG_CLOSE&&x&&((E.text===">"||E.text==="/>")&&x.text[0]==="<"||E.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},u.prototype._reset=function(){this._current_tag_name=""},u.prototype._get_next_token=function(E,x){var O=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(f.EOF,""):(O=O||this._read_open_handlebars(C,x),O=O||this._read_attribute(C,E,x),O=O||this._read_close(C,x),O=O||this._read_raw_content(C,E,x),O=O||this._read_content_word(C),O=O||this._read_comment_or_cdata(C),O=O||this._read_processing(C),O=O||this._read_open(C,x),O=O||this._create_token(f.UNKNOWN,this._input.next()),O)},u.prototype._read_comment_or_cdata=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);w==="!"&&(O=this.__patterns.comment.read(),O?(C=h.get_directives(O),C&&C.ignore==="start"&&(O+=h.readIgnored(this._input))):O=this.__patterns.cdata.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_processing=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);(w==="!"||w==="?")&&(O=this.__patterns.conditional_comment.read(),O=O||this.__patterns.processing.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_open=function(E,x){var O=null,C=null;return x||E==="<"&&(O=this._input.next(),this._input.peek()==="/"&&(O+=this._input.next()),O+=this.__patterns.element_name.read(),C=this._create_token(f.TAG_OPEN,O)),C},u.prototype._read_open_handlebars=function(E,x){var O=null,C=null;return x||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(O=this.__patterns.handlebars_comment.read(),O=O||this.__patterns.handlebars.read(),C=this._create_token(f.COMMENT,O)):(O=this.__patterns.handlebars_open.read(),C=this._create_token(f.TAG_OPEN,O))),C},u.prototype._read_close=function(E,x){var O=null,C=null;return x&&(x.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(O=this._input.next(),E==="/"&&(O+=this._input.next()),C=this._create_token(f.TAG_CLOSE,O)):x.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(f.TAG_CLOSE,"}}"))),C},u.prototype._read_attribute=function(E,x,O){var C=null,w="";if(O&&O.text[0]==="<")if(E==="=")C=this._create_token(f.EQUALS,this._input.next());else if(E==='"'||E==="'"){var S=this._input.next();E==='"'?S+=this.__patterns.double_quote.read():S+=this.__patterns.single_quote.read(),C=this._create_token(f.VALUE,S)}else w=this.__patterns.attribute.read(),w&&(x.type===f.EQUALS?C=this._create_token(f.VALUE,w):C=this._create_token(f.ATTRIBUTE,w));return C},u.prototype._is_content_unformatted=function(E){return this._options.void_elements.indexOf(E)===-1&&(this._options.content_unformatted.indexOf(E)!==-1||this._options.unformatted.indexOf(E)!==-1)},u.prototype._read_raw_content=function(E,x,O){var C="";if(O&&O.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(x.type===f.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var w=x.opened.text.substr(1).toLowerCase();if(w==="script"||w==="style"){var S=this._read_comment_or_cdata(E);if(S)return S.type=f.TEXT,S;C=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(w)&&(C=this._input.readUntil(new RegExp("","ig")))}return C?this._create_token(f.TEXT,C):null},u.prototype._read_content_word=function(E){var x="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(x=this.__patterns.unformatted_content_delimiter.read())),x||(x=this.__patterns.word.read()),x)return this._create_token(f.TEXT,x)},n.exports.Tokenizer=u,n.exports.TOKEN=f}],p={};function e(n){var l=p[n];if(l!==void 0)return l.exports;var r=p[n]={exports:{}};return _[n](r,r.exports,e),r.exports}var o=e(18);T=o})();var y=T;if(!0)!(I=[b,b("6UM0"),b("TXwP")],v=function(_){var p=b("6UM0"),e=b("TXwP");return{html_beautify:function(o,n){return y(o,n,p.js_beautify,e.css_beautify)}}}.apply(H,I),v!==void 0&&(j.exports=v));else var g,s})()},q7KB:function(j,H,b){},qBft:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.AnsiX923={pad:function(v,T){var y=v.sigBytes,g=T*4,s=g-y%g,_=y+s-1;v.clamp(),v.words[_>>>2]|=s<<24-_%4*8,v.sigBytes+=s},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Ansix923})},qM6L:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Utf16=g.Utf16BE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l>>2]>>>16-l%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n>>1]|=p.charCodeAt(n)<<16-n%2*16;return y.create(o,e*2)}};g.Utf16LE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l>>2]>>>16-l%4*8&65535);n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n>>1]|=_(p.charCodeAt(n)<<16-n%2*16);return y.create(o,e*2)}};function _(p){return p<<8&4278255360|p>>>8&16711935}}(),I.enc.Utf16})},qZJd:function(j,H,b){"use strict";var I=b("MXD1"),v=b("CFYs"),T=b("14J3"),y=b("BMrR"),g=b("+L6B"),s=b("2/Rp"),_=b("jCWc"),p=b("kPKH"),e=b("miYZ"),o=b("tsqr"),n=b("2qtc"),l=b("kLXV"),r=b("9og8"),i=b("rAM+"),t=b("tJVT"),a=b("k1fw"),c=b("WmNS"),d=b.n(c),f=b("q1tI"),h=b.n(f),u=b("IxHN"),E=b("bdgK"),x=b("M8RZ"),O=b("Ty5D"),C=b("1vsH"),w=b("1dTM"),S=b.n(w),A=b("dhSg"),D=b("5NDa"),M=b("5rEg"),N=b("AKST"),P=M.a.TextArea,z=function(se){var be=se.onCancel,ae=se.onSave,fe=se.content,Fe=Object(f.useState)(fe),ie=Object(t.a)(Fe,2),q=ie[0],Q=ie[1];function Y(le){Q(le.target.value)}function oe(){ae(q)}return Object(f.useEffect)(function(){Q(fe)},[fe]),h.a.createElement("div",{className:"clipboard-box"},h.a.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),h.a.createElement(P,{value:q,onChange:Y,className:"clipboard"}),h.a.createElement("p",null," ",h.a.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," ","\u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002"," "),h.a.createElement("p",null," ",h.a.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," ","\u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002"," "),h.a.createElement("div",{className:"btn-action-container"},h.a.createElement(s.a,{type:"ghost",onClick:be,style:{marginRight:10}},"\u53D6\u6D88"),h.a.createElement(s.a,{type:"primary",onClick:oe},"\u4FDD\u5B58")))},X=b("ErOA"),k=b("IZBM"),F=b("ye1Q"),U=b("bntm"),L=b("i72Y"),B=b.n(L),Z=b("wd/R"),re=b.n(Z),he=b("J66h"),Se=h.a.createElement(F.a,{style:{fontSize:24},spin:!0});function ke(se){return se.replace(/\\u([\dA-Za-z]{4})/g,function(be,ae){return String.fromCharCode(parseInt("0x"+ae))})}function te(se){se||(se=window.location.search);var be=se.substr(1),ae={};return be.split("&").forEach(function(fe){var Fe=fe.split("=");ae[Fe[0]]=decodeURIComponent(Fe[1])}),ae}var Re={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"},Ce;(function(se){se[se.SET_LOADING=0]="SET_LOADING",se[se.SET_IS_LARGE=1]="SET_IS_LARGE",se[se.SET_MES=2]="SET_MES",se[se.SET_STATE=3]="SET_STATE",se[se.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",se[se.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",se[se.UPDATE_ALL=6]="UPDATE_ALL"})(Ce||(Ce={}));function pe(se,be){switch(be.type){case Ce.SET_LOADING:return Object(a.a)(Object(a.a)({},se),{},{loading:be.payload});case Ce.SET_IS_LARGE:return Object(a.a)({},Object(a.a)(Object(a.a)({},se),{},{isLarge:be.payload}));case Ce.SET_MES:return Object(a.a)(Object(a.a)({},se),{},{mes:be.payload});case Ce.SET_STATE:return Object(a.a)(Object(a.a)({},se),be.payload);case Ce.SET_TRANSFER_CONTENT:return Object(a.a)(Object(a.a)({},se),{},{transferContent:be.payload});case Ce.SHOW_CLIPBOARD_BOX:return Object(a.a)(Object(a.a)({},se),{},{showClipBoardBox:be.payload});case Ce.UPDATE_ALL:return Object(a.a)({loading:se.loading},be.payload);default:throw new Error}}var me=H.a=function(se){var be,ae=se.vnc_url,fe=se.window_vnc_url,Fe=se.linux_vnc,ie=se.virtual_machine,q=se.taskId,Q=se.taskData,Y=Object(f.useRef)(),oe=Object(f.useRef)(),le=Object(f.useRef)(),Ee=Object(f.useRef)(),Le=Object(f.useState)(),ge=Object(t.a)(Le,2),De=ge[0],_e=ge[1],Xe=Object(f.useState)(!1),tt=Object(t.a)(Xe,2),Ge=tt[0],Me=tt[1],bt=Object(f.useReducer)(pe,Re),Oe=Object(t.a)(bt,2),Ve=Oe[0],Je=Oe[1],Ye=Object(f.useState)(0),Ne=Object(t.a)(Ye,2),He=Ne[0],ve=Ne[1],xe=Ve.mes,de=Ve.loading,je=Ve.showClipBoardBox,Qe=Ve.isLarge,ne=Ve.transferContent,Ze=Object(f.useState)(0),lt=Object(t.a)(Ze,2),Be=lt[0],$e=lt[1],it=Object(f.useRef)(),wt=Object(O.i)(),pt=wt;Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Pe),function(){var kt,Kt;(kt=oe.current)===null||kt===void 0||((Kt=kt.disconnect)===null||Kt===void 0)||Kt.call(kt),window.removeEventListener("visibilitychange",Pe)}},[]),Object(f.useEffect)(function(){return window.sessionStorage.imageId=De,function(){window.sessionStorage.removeItem("imageId")}},[De]);var st=function(){var Kt,rn;(Q==null||((Kt=Q.shixun)===null||Kt===void 0)?void 0:Kt.windows_connection_mode)==="rdp"?setTimeout(function(){Xt()},1500):(le==null||((rn=le.current)===null||rn===void 0)?void 0:rn.resizeSession)!==void 0&&(Object(U.a)()?le.current.resizeSession=!0:setTimeout(function(){le.current.resizeSession=!1},900))};Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Pe),document.addEventListener(Object(U.c)(),st),function(){document.removeEventListener(Object(U.c)(),st),window.removeEventListener("visibilitychange",Pe)}},[]);var Pe=function(Kt){if(document.visibilityState==="visible"){var rn=sessionStorage.vncPageLeaveTime;re()(new Date).diff(re()(rn),"minutes")>2&&ve(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function ze(){Je({type:Ce.SHOW_CLIPBOARD_BOX,payload:!1})}function Et(){Je({type:Ce.SET_IS_LARGE,payload:!Qe})}function ht(kt){var Kt;return Y.current&&(Kt=new E.default(function(rn){var Gt=Object(i.a)(rn),$t;try{for(Gt.s();!($t=Gt.n()).done;){var Ln,pn=$t.value;if((Q==null||((Ln=Q.shixun)===null||Ln===void 0)?void 0:Ln.windows_connection_mode)==="rdp"&&Xt(),pn.target.offsetHeight>0||pn.target.offsetWidth>0){var Dn;kt==null||((Dn=kt._eventHandlers)===null||Dn===void 0)||Dn.windowResize()}}}catch(sn){Gt.e(sn)}finally{Gt.f()}}),Kt.observe(Y.current)),Kt}var Bt=function(){var kt=Object(r.a)(d.a.mark(function Kt(){var rn,Gt,$t,Ln,pn,Dn,sn,Sn,Kn,Qn,Vt;return d.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return Dn=(rn=te())!==null&&rn!==void 0&&rn.homework_common_id?{homework_common_id:(Gt=te())===null||Gt===void 0?void 0:Gt.homework_common_id}:{},$n.next=3,Object(X.a)("/api/myshixuns/".concat(($t=Q.myshixun)===null||$t===void 0?void 0:$t.identifier,"/start.json"),{method:"get",params:Object(a.a)(Object(a.a)(Object(a.a)({},wt),Dn),{},{template_id:De||""})});case 3:if(sn=$n.sent,!(sn!=null&&(Ln=sn.data)!==null&&Ln!==void 0&&(pn=Ln.data_list)!==null&&pn!==void 0&&pn.length)){$n.next=7;break}return A.a.publish("pod-restrict-data",{identifier:sn==null||((Sn=sn.data)===null||Sn===void 0)?void 0:Sn.identifier,data_list:sn==null||((Kn=sn.data)===null||Kn===void 0)?void 0:Kn.data_list}),$n.abrupt("return");case 7:if(!((sn==null?void 0:sn.status)===-3)){$n.next=9;break}return $n.abrupt("return",new Promise(function(){var ir=Object(r.a)(d.a.mark(function Tr(qn,ce){return d.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:l.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var ee=Object(r.a)(d.a.mark(function ue(){return d.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return clearTimeout(it.current),$e(0),Lt.next=4,Object(k.f)(wt.taskId,sn==null?void 0:sn.message);case 4:return ve(He+1),Lt.abrupt("return");case 6:case"end":return Lt.stop()}},ue)}));function Te(){return ee.apply(this,arguments)}return Te}()});case 1:case"end":return J.stop()}},Tr)}));return function(Tr,qn){return ir.apply(this,arguments)}}()));case 9:if(!((sn==null?void 0:sn.status)===-1)){$n.next=11;break}throw new String(sn==null?void 0:sn.message);case 11:return ie&&(Object(C.W)("PVEAuthCookie",sn==null||((Qn=sn.data)===null||Qn===void 0||((Vt=Qn.cookie_options)===null||Vt===void 0))?void 0:Vt.cookies_value,1),Object(C.W)("PVELangCookie","zh_CN",1)),A.a.publish("update-windows-time",sn==null?void 0:sn.data),$n.abrupt("return",sn);case 14:case"end":return $n.stop()}},Kt)}));return function(){return kt.apply(this,arguments)}}();Object(f.useEffect)(function(){var kt,Kt;function rn(Sn){fe&&(o.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),Je({type:Ce.SET_LOADING,payload:!0}),ve(He+1))}A.a.subscribe("reset-linux-windows-loading",function(){Je({type:Ce.SET_LOADING,payload:!0})}),A.a.subscribe("reset-linux-windos-vnc",function(){ve(He+1)});function Gt(Sn){$e(100),clearTimeout(it.current),setTimeout(function(){le.current.resizeSession=!1,Je({type:Ce.SET_LOADING,payload:!1})},1300),A.a.subscribe("send-ctrl-alt-delete",function(){var Kn;(Kn=kt)===null||Kn===void 0||Kn.sendCtrlAltDel()})}function $t(Sn){var Kn=ke(Sn.detail.text);Je({type:Ce.SET_TRANSFER_CONTENT,payload:Kn})}if((fe||ae||Fe||ie&&De)&&Y.current){var Ln;clearTimeout(it.current),(Q==null||((Ln=Q.shixun)===null||Ln===void 0)?void 0:Ln.windows_connection_mode)==="rdp"&&Xt(),new Promise(Object(r.a)(d.a.mark(function Sn(){var Kn,Qn,Vt,wn,$n,ir,Tr,qn,ce,V,J,ee,Te,ue,nt;return d.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Qn=te(),Vt="",Yt.next=4,Bt();case 4:if($n=Yt.sent,!(Fe||ie)){Yt.next=11;break}return Ee.current.src=($n==null||((ir=$n.data)===null||ir===void 0)?void 0:ir.link_url)+"&time="+Date.now(),Je({type:Ce.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),Yt.abrupt("return");case 11:fe?(wn="Edu123",Vt=decodeURIComponent($n==null||((Tr=$n.data)===null||Tr===void 0)?void 0:Tr.link_url)):(ce=new URL(decodeURIComponent($n==null||((qn=$n.data)===null||qn===void 0)?void 0:qn.link_url)),V=ce.protocol,J=ce.searchParams,ee=ce.host,Te=ce.search,ue=Object(C.T)(Te),wn=J.get("password"),Vt="".concat(V==="https:"?"wss":"ws","://").concat(ee,"/").concat(ue.path||"websockify"));case 12:if(!((Q==null||((Kn=Q.shixun)===null||Kn===void 0)?void 0:Kn.windows_connection_mode)==="rdp")){Yt.next=18;break}return ht(),Ee.current.style.cssText=Ee.current.style.cssText+"width:1920px;height:1080px;position:initial",Ee.current.src="/rdp.html?tpiId=".concat(Q==null||((nt=Q.myshixun)===null||nt===void 0)?void 0:nt.id),Je({type:Ce.SET_LOADING,payload:!1}),Yt.abrupt("return");case 18:kt=new S.a(Y.current,Vt,{credentials:{password:wn},wsProtocols:["binary"],resize:"scale",show_dot:!0}),Kt=ht(kt),kt.viewOnly=Qn.view_only||!1,fe?kt.scaleViewport=!0:kt.scaleViewport=Qn.scale||!1,kt.scaleViewport=Qn.scale||!0,kt.showDotCursor=!0,kt.resizeSession=!0,le.current=kt,kt.addEventListener("disconnect",rn),kt.addEventListener("connect",Gt),kt.addEventListener("clipboard",$t);case 29:case"end":return Yt.stop()}},Sn)})));var pn=A.a.subscribe("vnc-reseting",function(){$e(0),Je({type:Ce.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),Dn=A.a.subscribe("vnc-enlarge",function(Sn){}),sn=A.a.subscribe("show-clipboard-box",function(){Je({type:Ce.SHOW_CLIPBOARD_BOX,payload:!0})});return $e(0),function(){var Sn,Kn,Qn,Vt;(Sn=kt)===null||Sn===void 0||Sn.removeEventListener("disconnect",rn),(Kn=kt)===null||Kn===void 0||Kn.removeEventListener("connect",Gt),(Qn=kt)===null||Qn===void 0||Qn.removeEventListener("clipboard",$t),pn(),Dn(),sn(),(Vt=Kt)===null||Vt===void 0||Vt.unobserve(Y.current)}}},[ae,fe,Fe,He,De]),Object(f.useEffect)(function(){var kt,Kt;if(ie&&(Q==null||((kt=Q.shixun_virtual_templates)===null||kt===void 0)?void 0:kt.length)===1){var rn,Gt;_e(Q==null||((rn=Q.shixun_virtual_templates)===null||rn===void 0||((Gt=rn[0])===null||Gt===void 0))?void 0:Gt.template_id)}else ie&&(Q==null||((Kt=Q.shixun_virtual_templates)===null||Kt===void 0)?void 0:Kt.length)>1&&Me(!0)},[ie]);function Ht(kt){return mt.apply(this,arguments)}function mt(){return mt=Object(r.a)(d.a.mark(function kt(Kt){var rn,Gt,$t;return d.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(!ae){pn.next=8;break}return rn=Kt,pn.next=4,Object(X.a)("/api/tasks/".concat(wt.taskId,"/vnc_paste.json"),{method:"post",body:{content:he.Base64.encode(rn)}});case 4:Gt=pn.sent,(Gt==null?void 0:Gt.status)===0&&(Je({type:Ce.SET_TRANSFER_CONTENT,payload:Kt}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),ze()),pn.next=12;break;case 8:($t=le.current)===null||$t===void 0||$t.clipboardPasteFrom(Kt),Je({type:Ce.SET_TRANSFER_CONTENT,payload:Kt}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),ze();case 12:case"end":return pn.stop()}},kt)})),mt.apply(this,arguments)}function Xt(){var kt,Kt;kt=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ee.current.parentElement.className="wh1080p",Ee.current.parentElement.style.cssText="transform:scale(".concat(kt,");transform-origin:center center"),Y.current.style.cssText="translate(-50%, -50%) scale("+kt+")"}Object(f.useEffect)(function(){Be==0&&(clearTimeout(it.current),jt())},[Be]);var jt=function kt(){Be>99?Be=99:(Be=Be+1,it.current=setTimeout(function(){kt()},1500)),Be<100&&$e(Be)},Ut=Object(f.useMemo)(function(){var kt;return de?"none":Fe||ie||fe&&(Q==null||((kt=Q.shixun)===null||kt===void 0)?void 0:kt.windows_connection_mode)==="rdp"?"block":"none"},[Fe,de,ie,fe]);return h.a.createElement(f.Fragment,null,Ge&&h.a.createElement("div",{className:B.a.selectImage},h.a.createElement("section",{className:B.a.container},h.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),h.a.createElement("aside",null,Q==null||((be=Q.shixun_virtual_templates)===null||be===void 0)?void 0:be.map(function(kt,Kt){return h.a.createElement(y.a,{align:"middle",key:Kt},h.a.createElement(p.a,{flex:"1"},kt.template_name),h.a.createElement(p.a,null,h.a.createElement(s.a,{type:"primary",onClick:function(){_e(kt.template_id),Me(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),Qe&&h.a.createElement("a",{className:"btn-vnc-resize",onClick:Et},h.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),h.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:Ut==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},h.a.createElement("div",null,h.a.createElement("iframe",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},frameBorder:"0",ref:Ee,allowFullScreen:!0}))),h.a.createElement("div",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(Qe?"full-screen":"")},de?h.a.createElement(u.a,{message:xe,style:{color:"#0152d9"}},h.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},h.a.createElement(v.a,{percent:Be,format:function(Kt){return h.a.createElement("span",{className:"c-white"},Kt,"%")}}))):null,h.a.createElement("div",{ref:Y,className:"vnc-panel ".concat(de?"hidden zIndexf1":"animated fadeIn")})),h.a.createElement(x.a,null,h.a.createElement(l.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:je,onCancel:ze,footer:null},h.a.createElement(z,{onCancel:ze,onSave:Ht,content:ne}))))}},qgvg:function(j,H){j.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},qu8F:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){/** @preserve +`)===-1||(P.is_inline_element||P.is_unformatted||M.print_newline(!1),this._calcluate_parent_multiline(M,P))}else if(P.is_end_tag){var F=!1;F=P.start_tag_token&&P.start_tag_token.multiline_content,F=F||!P.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(X.type===c.TAG_CLOSE&&P.start_tag_token===z)&&X.type!=="TK_CONTENT",(P.is_content_unformatted||P.is_unformatted)&&(F=!1),F&&M.print_newline(!1)}else P.indent_content=!P.custom_beautifier_name,P.tag_start_char==="<"&&(P.tag_name==="html"?P.indent_content=this._options.indent_inner_html:P.tag_name==="head"?P.indent_content=this._options.indent_head_inner_html:P.tag_name==="body"&&(P.indent_content=this._options.indent_body_inner_html)),!(P.is_inline_element||P.is_unformatted)&&(X.type!=="TK_CONTENT"||P.is_content_unformatted)&&M.print_newline(!1),this._calcluate_parent_multiline(M,P)},w.prototype._calcluate_parent_multiline=function(M,N){N.parent&&M._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.parent.multiline_content=!0)};var A=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],D=["a","audio","del","ins","map","noscript","video"];w.prototype._do_optional_end_element=function(M){var N=null;if(M.is_empty_element||!M.is_start_tag||!M.parent)return;if(M.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(M.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul"]);else if(M.tag_name==="dd"||M.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(M.parent.tag_name==="p"&&A.indexOf(M.tag_name)!==-1){var P=M.parent.parent;(!P||D.indexOf(P.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else M.tag_name==="rp"||M.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):M.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):M.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):M.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):M.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):M.tag_name==="tbody"||M.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):M.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(M.tag_name==="th"||M.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return M.parent=this._tag_stack.get_parser_token(),N},n.exports.Beautifier=w},function(n,l,r){var i=r(6).Options;function t(a){i.call(this,a,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}t.prototype=new i,n.exports.Options=t},function(n,l,r){var i=r(9).Tokenizer,t=r(9).TOKEN,a=r(13).Directives,c=r(14).TemplatablePattern,d=r(12).Pattern,f={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},h=new a(/<\!--/,/-->/),u=function(E,x){i.call(this,E,x),this._current_tag_name="";var O=new c(this._input).read_options(this._options),C=new d(this._input);if(this.__patterns={word:O.until(/[\n\r\t <]/),single_quote:O.until_after(/'/),double_quote:O.until_after(/"/),attribute:O.until(/[\n\r\t =>]|\/>/),element_name:O.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(//),cdata:C.starting_with(//),conditional_comment:C.starting_with(//),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var w=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(w).until_after(w)}};u.prototype=new i,u.prototype._is_comment=function(E){return!1},u.prototype._is_opening=function(E){return E.type===f.TAG_OPEN},u.prototype._is_closing=function(E,x){return E.type===f.TAG_CLOSE&&x&&((E.text===">"||E.text==="/>")&&x.text[0]==="<"||E.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},u.prototype._reset=function(){this._current_tag_name=""},u.prototype._get_next_token=function(E,x){var O=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(f.EOF,""):(O=O||this._read_open_handlebars(C,x),O=O||this._read_attribute(C,E,x),O=O||this._read_close(C,x),O=O||this._read_raw_content(C,E,x),O=O||this._read_content_word(C),O=O||this._read_comment_or_cdata(C),O=O||this._read_processing(C),O=O||this._read_open(C,x),O=O||this._create_token(f.UNKNOWN,this._input.next()),O)},u.prototype._read_comment_or_cdata=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);w==="!"&&(O=this.__patterns.comment.read(),O?(C=h.get_directives(O),C&&C.ignore==="start"&&(O+=h.readIgnored(this._input))):O=this.__patterns.cdata.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_processing=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);(w==="!"||w==="?")&&(O=this.__patterns.conditional_comment.read(),O=O||this.__patterns.processing.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_open=function(E,x){var O=null,C=null;return x||E==="<"&&(O=this._input.next(),this._input.peek()==="/"&&(O+=this._input.next()),O+=this.__patterns.element_name.read(),C=this._create_token(f.TAG_OPEN,O)),C},u.prototype._read_open_handlebars=function(E,x){var O=null,C=null;return x||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(O=this.__patterns.handlebars_comment.read(),O=O||this.__patterns.handlebars.read(),C=this._create_token(f.COMMENT,O)):(O=this.__patterns.handlebars_open.read(),C=this._create_token(f.TAG_OPEN,O))),C},u.prototype._read_close=function(E,x){var O=null,C=null;return x&&(x.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(O=this._input.next(),E==="/"&&(O+=this._input.next()),C=this._create_token(f.TAG_CLOSE,O)):x.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(f.TAG_CLOSE,"}}"))),C},u.prototype._read_attribute=function(E,x,O){var C=null,w="";if(O&&O.text[0]==="<")if(E==="=")C=this._create_token(f.EQUALS,this._input.next());else if(E==='"'||E==="'"){var S=this._input.next();E==='"'?S+=this.__patterns.double_quote.read():S+=this.__patterns.single_quote.read(),C=this._create_token(f.VALUE,S)}else w=this.__patterns.attribute.read(),w&&(x.type===f.EQUALS?C=this._create_token(f.VALUE,w):C=this._create_token(f.ATTRIBUTE,w));return C},u.prototype._is_content_unformatted=function(E){return this._options.void_elements.indexOf(E)===-1&&(this._options.content_unformatted.indexOf(E)!==-1||this._options.unformatted.indexOf(E)!==-1)},u.prototype._read_raw_content=function(E,x,O){var C="";if(O&&O.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(x.type===f.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var w=x.opened.text.substr(1).toLowerCase();if(w==="script"||w==="style"){var S=this._read_comment_or_cdata(E);if(S)return S.type=f.TEXT,S;C=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(w)&&(C=this._input.readUntil(new RegExp("","ig")))}return C?this._create_token(f.TEXT,C):null},u.prototype._read_content_word=function(E){var x="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(x=this.__patterns.unformatted_content_delimiter.read())),x||(x=this.__patterns.word.read()),x)return this._create_token(f.TEXT,x)},n.exports.Tokenizer=u,n.exports.TOKEN=f}],p={};function e(n){var l=p[n];if(l!==void 0)return l.exports;var r=p[n]={exports:{}};return _[n](r,r.exports,e),r.exports}var o=e(18);T=o})();var y=T;if(!0)!(I=[b,b("6UM0"),b("TXwP")],v=function(_){var p=b("6UM0"),e=b("TXwP");return{html_beautify:function(o,n){return y(o,n,p.js_beautify,e.css_beautify)}}}.apply(H,I),v!==void 0&&(j.exports=v));else var g,s})()},q7KB:function(j,H,b){},qBft:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.AnsiX923={pad:function(v,T){var y=v.sigBytes,g=T*4,s=g-y%g,_=y+s-1;v.clamp(),v.words[_>>>2]|=s<<24-_%4*8,v.sigBytes+=s},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Ansix923})},qM6L:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Utf16=g.Utf16BE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l>>2]>>>16-l%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n>>1]|=p.charCodeAt(n)<<16-n%2*16;return y.create(o,e*2)}};g.Utf16LE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l>>2]>>>16-l%4*8&65535);n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n>>1]|=_(p.charCodeAt(n)<<16-n%2*16);return y.create(o,e*2)}};function _(p){return p<<8&4278255360|p>>>8&16711935}}(),I.enc.Utf16})},qZJd:function(j,H,b){"use strict";var I=b("MXD1"),v=b("CFYs"),T=b("14J3"),y=b("BMrR"),g=b("+L6B"),s=b("2/Rp"),_=b("jCWc"),p=b("kPKH"),e=b("miYZ"),o=b("tsqr"),n=b("2qtc"),l=b("kLXV"),r=b("9og8"),i=b("rAM+"),t=b("tJVT"),a=b("k1fw"),c=b("WmNS"),d=b.n(c),f=b("q1tI"),h=b.n(f),u=b("IxHN"),E=b("bdgK"),x=b("M8RZ"),O=b("Ty5D"),C=b("1vsH"),w=b("1dTM"),S=b.n(w),A=b("dhSg"),D=b("5NDa"),M=b("5rEg"),N=b("AKST"),P=M.a.TextArea,z=function(se){var be=se.onCancel,ae=se.onSave,fe=se.content,Fe=Object(f.useState)(fe),ie=Object(t.a)(Fe,2),q=ie[0],Q=ie[1];function Y(le){Q(le.target.value)}function oe(){ae(q)}return Object(f.useEffect)(function(){Q(fe)},[fe]),h.a.createElement("div",{className:"clipboard-box"},h.a.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),h.a.createElement(P,{value:q,onChange:Y,className:"clipboard"}),h.a.createElement("p",null," ",h.a.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," ","\u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002"," "),h.a.createElement("p",null," ",h.a.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," ","\u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002"," "),h.a.createElement("div",{className:"btn-action-container"},h.a.createElement(s.a,{type:"ghost",onClick:be,style:{marginRight:10}},"\u53D6\u6D88"),h.a.createElement(s.a,{type:"primary",onClick:oe},"\u4FDD\u5B58")))},X=b("ErOA"),k=b("IZBM"),F=b("ye1Q"),U=b("bntm"),L=b("i72Y"),B=b.n(L),Z=b("wd/R"),re=b.n(Z),he=b("J66h"),Se=h.a.createElement(F.a,{style:{fontSize:24},spin:!0});function ke(se){return se.replace(/\\u([\dA-Za-z]{4})/g,function(be,ae){return String.fromCharCode(parseInt("0x"+ae))})}function te(se){se||(se=window.location.search);var be=se.substr(1),ae={};return be.split("&").forEach(function(fe){var Fe=fe.split("=");ae[Fe[0]]=decodeURIComponent(Fe[1])}),ae}var Re={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"},Ce;(function(se){se[se.SET_LOADING=0]="SET_LOADING",se[se.SET_IS_LARGE=1]="SET_IS_LARGE",se[se.SET_MES=2]="SET_MES",se[se.SET_STATE=3]="SET_STATE",se[se.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",se[se.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",se[se.UPDATE_ALL=6]="UPDATE_ALL"})(Ce||(Ce={}));function pe(se,be){switch(be.type){case Ce.SET_LOADING:return Object(a.a)(Object(a.a)({},se),{},{loading:be.payload});case Ce.SET_IS_LARGE:return Object(a.a)({},Object(a.a)(Object(a.a)({},se),{},{isLarge:be.payload}));case Ce.SET_MES:return Object(a.a)(Object(a.a)({},se),{},{mes:be.payload});case Ce.SET_STATE:return Object(a.a)(Object(a.a)({},se),be.payload);case Ce.SET_TRANSFER_CONTENT:return Object(a.a)(Object(a.a)({},se),{},{transferContent:be.payload});case Ce.SHOW_CLIPBOARD_BOX:return Object(a.a)(Object(a.a)({},se),{},{showClipBoardBox:be.payload});case Ce.UPDATE_ALL:return Object(a.a)({loading:se.loading},be.payload);default:throw new Error}}var me=H.a=function(se){var be,ae=se.vnc_url,fe=se.window_vnc_url,Fe=se.linux_vnc,ie=se.virtual_machine,q=se.taskId,Q=se.taskData,Y=Object(f.useRef)(),oe=Object(f.useRef)(),le=Object(f.useRef)(),Ee=Object(f.useRef)(),Le=Object(f.useState)(),ge=Object(t.a)(Le,2),De=ge[0],_e=ge[1],Xe=Object(f.useState)(!1),tt=Object(t.a)(Xe,2),Ge=tt[0],Me=tt[1],Et=Object(f.useReducer)(pe,Re),Oe=Object(t.a)(Et,2),Ve=Oe[0],Je=Oe[1],Ye=Object(f.useState)(0),Ne=Object(t.a)(Ye,2),He=Ne[0],ve=Ne[1],xe=Ve.mes,de=Ve.loading,je=Ve.showClipBoardBox,Qe=Ve.isLarge,ne=Ve.transferContent,Ze=Object(f.useState)(0),lt=Object(t.a)(Ze,2),Be=lt[0],$e=lt[1],rt=Object(f.useRef)(),St=Object(O.i)(),pt=St;Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Pe),function(){var It,Kt;(It=oe.current)===null||It===void 0||((Kt=It.disconnect)===null||Kt===void 0)||Kt.call(It),window.removeEventListener("visibilitychange",Pe)}},[]),Object(f.useEffect)(function(){return window.sessionStorage.imageId=De,function(){window.sessionStorage.removeItem("imageId")}},[De]);var st=function(){var Kt,rn;(Q==null||((Kt=Q.shixun)===null||Kt===void 0)?void 0:Kt.windows_connection_mode)==="rdp"?setTimeout(function(){Xt()},1500):(le==null||((rn=le.current)===null||rn===void 0)?void 0:rn.resizeSession)!==void 0&&(Object(U.a)()?le.current.resizeSession=!0:setTimeout(function(){le.current.resizeSession=!1},900))};Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Pe),document.addEventListener(Object(U.c)(),st),function(){document.removeEventListener(Object(U.c)(),st),window.removeEventListener("visibilitychange",Pe)}},[]);var Pe=function(Kt){if(document.visibilityState==="visible"){var rn=sessionStorage.vncPageLeaveTime;re()(new Date).diff(re()(rn),"minutes")>2&&ve(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function ze(){Je({type:Ce.SHOW_CLIPBOARD_BOX,payload:!1})}function xt(){Je({type:Ce.SET_IS_LARGE,payload:!Qe})}function ht(It){var Kt;return Y.current&&(Kt=new E.default(function(rn){var zt=Object(i.a)(rn),$t;try{for(zt.s();!($t=zt.n()).done;){var Pn,fn=$t.value;if((Q==null||((Pn=Q.shixun)===null||Pn===void 0)?void 0:Pn.windows_connection_mode)==="rdp"&&Xt(),fn.target.offsetHeight>0||fn.target.offsetWidth>0){var In;It==null||((In=It._eventHandlers)===null||In===void 0)||In.windowResize()}}}catch(on){zt.e(on)}finally{zt.f()}}),Kt.observe(Y.current)),Kt}var Bt=function(){var It=Object(r.a)(d.a.mark(function Kt(){var rn,zt,$t,Pn,fn,In,on,Cn,Hn,Qn,Vt;return d.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return In=(rn=te())!==null&&rn!==void 0&&rn.homework_common_id?{homework_common_id:(zt=te())===null||zt===void 0?void 0:zt.homework_common_id}:{},er.next=3,Object(X.a)("/api/myshixuns/".concat(($t=Q.myshixun)===null||$t===void 0?void 0:$t.identifier,"/start.json"),{method:"get",params:Object(a.a)(Object(a.a)(Object(a.a)({},St),In),{},{template_id:De||""})});case 3:if(on=er.sent,!(on!=null&&(Pn=on.data)!==null&&Pn!==void 0&&(fn=Pn.data_list)!==null&&fn!==void 0&&fn.length)){er.next=7;break}return A.a.publish("pod-restrict-data",{identifier:on==null||((Cn=on.data)===null||Cn===void 0)?void 0:Cn.identifier,data_list:on==null||((Hn=on.data)===null||Hn===void 0)?void 0:Hn.data_list}),er.abrupt("return");case 7:if(!((on==null?void 0:on.status)===-3)){er.next=9;break}return er.abrupt("return",new Promise(function(){var ar=Object(r.a)(d.a.mark(function Ar($n,ce){return d.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:l.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var ee=Object(r.a)(d.a.mark(function ue(){return d.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return clearTimeout(rt.current),$e(0),kt.next=4,Object(k.f)(St.taskId,on==null?void 0:on.message);case 4:return ve(He+1),kt.abrupt("return");case 6:case"end":return kt.stop()}},ue)}));function Te(){return ee.apply(this,arguments)}return Te}()});case 1:case"end":return J.stop()}},Ar)}));return function(Ar,$n){return ar.apply(this,arguments)}}()));case 9:if(!((on==null?void 0:on.status)===-1)){er.next=11;break}throw new String(on==null?void 0:on.message);case 11:return ie&&(Object(C.W)("PVEAuthCookie",on==null||((Qn=on.data)===null||Qn===void 0||((Vt=Qn.cookie_options)===null||Vt===void 0))?void 0:Vt.cookies_value,1),Object(C.W)("PVELangCookie","zh_CN",1)),A.a.publish("vnc-res-data",on==null?void 0:on.data),A.a.publish("update-windows-time",on==null?void 0:on.data),er.abrupt("return",on);case 15:case"end":return er.stop()}},Kt)}));return function(){return It.apply(this,arguments)}}();Object(f.useEffect)(function(){var It,Kt;function rn(Cn){fe&&(o.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),Je({type:Ce.SET_LOADING,payload:!0}),ve(He+1))}A.a.subscribe("reset-linux-windows-loading",function(){Je({type:Ce.SET_LOADING,payload:!0})}),A.a.subscribe("reset-linux-windos-vnc",function(){ve(He+1)});function zt(Cn){$e(100),clearTimeout(rt.current),setTimeout(function(){le.current.resizeSession=!1,Je({type:Ce.SET_LOADING,payload:!1})},1300),A.a.subscribe("send-ctrl-alt-delete",function(){var Hn;(Hn=It)===null||Hn===void 0||Hn.sendCtrlAltDel()})}function $t(Cn){var Hn=ke(Cn.detail.text);Je({type:Ce.SET_TRANSFER_CONTENT,payload:Hn})}if((fe||ae||Fe||ie&&De)&&Y.current){var Pn;clearTimeout(rt.current),(Q==null||((Pn=Q.shixun)===null||Pn===void 0)?void 0:Pn.windows_connection_mode)==="rdp"&&Xt(),new Promise(Object(r.a)(d.a.mark(function Cn(){var Hn,Qn,Vt,xn,er,ar,Ar,$n,ce,V,J,ee,Te,ue,nt;return d.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Qn=te(),Vt="",Yt.next=4,Bt();case 4:if(er=Yt.sent,!(Fe||ie)){Yt.next=11;break}return Ee.current.src=(er==null||((ar=er.data)===null||ar===void 0)?void 0:ar.link_url)+"&time="+Date.now(),Je({type:Ce.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),Yt.abrupt("return");case 11:fe?(xn="Edu123",Vt=decodeURIComponent(er==null||((Ar=er.data)===null||Ar===void 0)?void 0:Ar.link_url)):(ce=new URL(decodeURIComponent(er==null||(($n=er.data)===null||$n===void 0)?void 0:$n.link_url)),V=ce.protocol,J=ce.searchParams,ee=ce.host,Te=ce.search,ue=Object(C.T)(Te),xn=J.get("password"),Vt="".concat(V==="https:"?"wss":"ws","://").concat(ee,"/").concat(ue.path||"websockify"));case 12:if(!((Q==null||((Hn=Q.shixun)===null||Hn===void 0)?void 0:Hn.windows_connection_mode)==="rdp")){Yt.next=18;break}return ht(),Ee.current.style.cssText=Ee.current.style.cssText+"width:1920px;height:1080px;position:initial",Ee.current.src="/rdp.html?tpiId=".concat(Q==null||((nt=Q.myshixun)===null||nt===void 0)?void 0:nt.id),Je({type:Ce.SET_LOADING,payload:!1}),Yt.abrupt("return");case 18:It=new S.a(Y.current,Vt,{credentials:{password:xn},wsProtocols:["binary"],resize:"scale",show_dot:!0}),Kt=ht(It),It.viewOnly=Qn.view_only||!1,fe?It.scaleViewport=!0:It.scaleViewport=Qn.scale||!1,It.scaleViewport=Qn.scale||!0,It.showDotCursor=!0,It.resizeSession=!0,le.current=It,It.addEventListener("disconnect",rn),It.addEventListener("connect",zt),It.addEventListener("clipboard",$t);case 29:case"end":return Yt.stop()}},Cn)})));var fn=A.a.subscribe("vnc-reseting",function(){$e(0),Je({type:Ce.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),In=A.a.subscribe("vnc-enlarge",function(Cn){}),on=A.a.subscribe("show-clipboard-box",function(){Je({type:Ce.SHOW_CLIPBOARD_BOX,payload:!0})});return $e(0),function(){var Cn,Hn,Qn,Vt;(Cn=It)===null||Cn===void 0||Cn.removeEventListener("disconnect",rn),(Hn=It)===null||Hn===void 0||Hn.removeEventListener("connect",zt),(Qn=It)===null||Qn===void 0||Qn.removeEventListener("clipboard",$t),fn(),In(),on(),(Vt=Kt)===null||Vt===void 0||Vt.unobserve(Y.current)}}},[ae,fe,Fe,He,De]),Object(f.useEffect)(function(){var It,Kt;if(ie&&(Q==null||((It=Q.shixun_virtual_templates)===null||It===void 0)?void 0:It.length)===1){var rn,zt;_e(Q==null||((rn=Q.shixun_virtual_templates)===null||rn===void 0||((zt=rn[0])===null||zt===void 0))?void 0:zt.template_id)}else ie&&(Q==null||((Kt=Q.shixun_virtual_templates)===null||Kt===void 0)?void 0:Kt.length)>1&&Me(!0)},[ie]);function Ht(It){return gt.apply(this,arguments)}function gt(){return gt=Object(r.a)(d.a.mark(function It(Kt){var rn,zt,$t;return d.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(!ae){fn.next=8;break}return rn=Kt,fn.next=4,Object(X.a)("/api/tasks/".concat(St.taskId,"/vnc_paste.json"),{method:"post",body:{content:he.Base64.encode(rn)}});case 4:zt=fn.sent,(zt==null?void 0:zt.status)===0&&(Je({type:Ce.SET_TRANSFER_CONTENT,payload:Kt}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),ze()),fn.next=12;break;case 8:($t=le.current)===null||$t===void 0||$t.clipboardPasteFrom(Kt),Je({type:Ce.SET_TRANSFER_CONTENT,payload:Kt}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),ze();case 12:case"end":return fn.stop()}},It)})),gt.apply(this,arguments)}function Xt(){var It,Kt;It=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ee.current.parentElement.className="wh1080p",Ee.current.parentElement.style.cssText="transform:scale(".concat(It,");transform-origin:center center"),Y.current.style.cssText="translate(-50%, -50%) scale("+It+")"}Object(f.useEffect)(function(){Be==0&&(clearTimeout(rt.current),jt())},[Be]);var jt=function It(){Be>99?Be=99:(Be=Be+1,rt.current=setTimeout(function(){It()},1500)),Be<100&&$e(Be)},Ut=Object(f.useMemo)(function(){var It;return de?"none":Fe||ie||fe&&(Q==null||((It=Q.shixun)===null||It===void 0)?void 0:It.windows_connection_mode)==="rdp"?"block":"none"},[Fe,de,ie,fe]);return h.a.createElement(f.Fragment,null,Ge&&h.a.createElement("div",{className:B.a.selectImage},h.a.createElement("section",{className:B.a.container},h.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),h.a.createElement("aside",null,Q==null||((be=Q.shixun_virtual_templates)===null||be===void 0)?void 0:be.map(function(It,Kt){return h.a.createElement(y.a,{align:"middle",key:Kt},h.a.createElement(p.a,{flex:"1"},It.template_name),h.a.createElement(p.a,null,h.a.createElement(s.a,{type:"primary",onClick:function(){_e(It.template_id),Me(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),Qe&&h.a.createElement("a",{className:"btn-vnc-resize",onClick:xt},h.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),h.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:Ut==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},h.a.createElement("div",null,h.a.createElement("iframe",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},frameBorder:"0",ref:Ee,allowFullScreen:!0}))),h.a.createElement("div",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(Qe?"full-screen":"")},de?h.a.createElement(u.a,{message:xe,style:{color:"#0152d9"}},h.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},h.a.createElement(v.a,{percent:Be,format:function(Kt){return h.a.createElement("span",{className:"c-white"},Kt,"%")}}))):null,h.a.createElement("div",{ref:Y,className:"vnc-panel ".concat(de?"hidden zIndexf1":"animated fadeIn")})),h.a.createElement(x.a,null,h.a.createElement(l.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:je,onCancel:ze,footer:null},h.a.createElement(z,{onCancel:ze,onSave:Ht,content:ne}))))}},qgvg:function(j,H){j.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},qu8F:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com @@ -535,7 +535,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho trackSwitch: `+k+` contiguous: `+L+` accurateTimeOffset: `+C+` - timeOffset: `+N);var re=new _.TransmuxConfig(h,u,f,O,S);this.configureTransmuxer(re)}if(this.frag=E,this.part=x,M)M.postMessage({cmd:"demux",data:d,decryptdata:P,chunkMeta:w,state:Z},d instanceof ArrayBuffer?[d]:[]);else if(D){var he=D.push(d,P,w,Z);Object(_.isPromise)(he)?he.then(function(Se){A.handleTransmuxComplete(Se)}):this.handleTransmuxComplete(he)}},a.flush=function(d){var f=this;d.transmuxing.start=self.performance.now();var h=this.transmuxer,u=this.worker;if(u)u.postMessage({cmd:"flush",chunkMeta:d});else if(h){var E=h.flush(d);Object(_.isPromise)(E)?E.then(function(x){f.handleFlushResult(x,d)}):this.handleFlushResult(E,d)}},a.handleFlushResult=function(d,f){var h=this;d.forEach(function(u){h.handleTransmuxComplete(u)}),this.onFlush(f)},a.onWorkerMessage=function(d){var f=d.data,h=this.hls;switch(f.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(f.data);break}case"flush":{this.onFlush(f.data);break}default:{f.data=f.data||{},f.data.frag=this.frag,f.data.id=this.id,h.trigger(f.event,f.data);break}}},a.configureTransmuxer=function(d){var f=this.worker,h=this.transmuxer;f?f.postMessage({cmd:"configure",config:d}):h&&h.configure(d)},a.handleTransmuxComplete=function(d){d.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(d)},t}()},"./src/demux/transmuxer-worker.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return e});var y=T("./src/demux/transmuxer.ts"),g=T("./src/events.ts"),s=T("./src/utils/logger.ts"),_=T("./node_modules/eventemitter3/index.js"),p=T.n(_);function e(i){var t=new _.EventEmitter,a=function(d,f){i.postMessage({event:d,data:f})};t.on(g.Events.FRAG_DECRYPTED,a),t.on(g.Events.ERROR,a),i.addEventListener("message",function(c){var d=c.data;switch(d.cmd){case"init":{var f=JSON.parse(d.config);i.transmuxer=new y.default(t,d.typeSupported,f,d.vendor,d.id),Object(s.enableLogs)(f.debug),a("init",null);break}case"configure":{i.transmuxer.configure(d.config);break}case"demux":{var h=i.transmuxer.push(d.data,d.decryptdata,d.chunkMeta,d.state);Object(y.isPromise)(h)?h.then(function(x){o(i,x)}):o(i,h);break}case"flush":{var u=d.chunkMeta,E=i.transmuxer.flush(u);Object(y.isPromise)(E)?E.then(function(x){l(i,x,u)}):l(i,E,u);break}default:break}})}function o(i,t){if(r(t.remuxResult))return;var a=[],c=t.remuxResult,d=c.audio,f=c.video;d&&n(a,d),f&&n(a,f),i.postMessage({event:"transmuxComplete",data:t},a)}function n(i,t){t.data1&&i.push(t.data1.buffer),t.data2&&i.push(t.data2.buffer)}function l(i,t,a){t.forEach(function(c){o(i,c)}),i.postMessage({event:"flush",data:a})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"isPromise",function(){return E}),T.d(v,"TransmuxConfig",function(){return x}),T.d(v,"TransmuxState",function(){return O});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/crypt/decrypter.ts"),_=T("./src/demux/aacdemuxer.ts"),p=T("./src/demux/mp4demuxer.ts"),e=T("./src/demux/tsdemuxer.ts"),o=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),l=T("./src/remux/passthrough-remuxer.ts"),r=T("./src/demux/chunk-cache.ts"),i=T("./src/utils/mp4-tools.ts"),t=T("./src/utils/logger.ts"),a;try{a=self.performance.now.bind(self.performance)}catch(C){t.logger.debug("Unable to use Performance API on this environment"),a=self.Date.now}var c=[{demux:e.default,remux:n.default},{demux:p.default,remux:l.default},{demux:_.default,remux:n.default},{demux:o.default,remux:n.default}],d=1024;c.forEach(function(C){var w=C.demux;d=Math.max(d,w.minProbeByteLength)});var f=function(){function C(S,A,D,M,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new r.default,this.observer=S,this.typeSupported=A,this.config=D,this.vendor=M,this.id=N}var w=C.prototype;return w.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},w.push=function(A,D,M,N){var P=this,z=M.transmuxing;z.executeStart=a();var X=new Uint8Array(A),k=this.cache,F=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;N&&(this.currentTransmuxState=N);var B=h(X,D);if(B&&B.method==="AES-128"){var Z=this.getDecrypter();if(F.enableSoftwareAES){var re=Z.softwareDecrypt(X,B.key.buffer,B.iv.buffer);if(!re)return z.executeEnd=a(),u(M);X=new Uint8Array(re)}else return this.decryptionPromise=Z.webCryptoDecrypt(X,B.key.buffer,B.iv.buffer).then(function(q){var Q=P.push(q,null,M);return P.decryptionPromise=null,Q}),this.decryptionPromise}var he=N||U,Se=he.contiguous,ke=he.discontinuity,te=he.trackSwitch,Re=he.accurateTimeOffset,Ce=he.timeOffset,pe=L.audioCodec,me=L.videoCodec,se=L.defaultInitPts,be=L.duration,ae=L.initSegmentData;if((ke||te)&&this.resetInitSegment(ae,pe,me,be),ke&&this.resetInitialTimestamp(se),Se||this.resetContiguity(),this.needsProbing(X,ke,te)){if(k.dataLength){var fe=k.flush();X=Object(i.appendUint8Array)(fe,X)}this.configureTransmuxer(X,L)}var Fe=this.transmux(X,B,Ce,Re,M),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,z.executeEnd=a(),Fe},w.flush=function(A){var D=this,M=A.transmuxing;M.executeStart=a();var N=this.decrypter,P=this.cache,z=this.currentTransmuxState,X=this.decryptionPromise;if(X)return X.then(function(){return D.flush(A)});var k=[],F=z.timeOffset;if(N){var U=N.flush();U&&k.push(this.push(U,null,A))}var L=P.dataLength;P.reset();var B=this.demuxer,Z=this.remuxer;if(!B||!Z)return L>=d&&this.observer.emit(y.Events.ERROR,y.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=a(),[u(A)];var re=B.flush(F);return E(re)?re.then(function(he){return D.flushRemux(k,he,A),k}):(this.flushRemux(k,re,A),k)},w.flushRemux=function(A,D,M){var N=D.audioTrack,P=D.avcTrack,z=D.id3Track,X=D.textTrack,k=this.currentTransmuxState,F=k.accurateTimeOffset,U=k.timeOffset;t.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var L=this.remuxer.remux(N,P,z,X,U,F,!0,this.id);A.push({remuxResult:L,chunkMeta:M}),M.transmuxing.executeEnd=a()},w.resetInitialTimestamp=function(A){var D=this.demuxer,M=this.remuxer;if(!D||!M)return;D.resetTimeStamp(A),M.resetTimeStamp(A)},w.resetContiguity=function(){var A=this.demuxer,D=this.remuxer;if(!A||!D)return;A.resetContiguity(),D.resetNextTimestamp()},w.resetInitSegment=function(A,D,M,N){var P=this.demuxer,z=this.remuxer;if(!P||!z)return;P.resetInitSegment(D,M,N),z.resetInitSegment(A,D,M)},w.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},w.transmux=function(A,D,M,N,P){var z;return D&&D.method==="SAMPLE-AES"?z=this.transmuxSampleAes(A,D,M,N,P):z=this.transmuxUnencrypted(A,M,N,P),z},w.transmuxUnencrypted=function(A,D,M,N){var P=this.demuxer.demux(A,D,!1,!this.config.progressive),z=P.audioTrack,X=P.avcTrack,k=P.id3Track,F=P.textTrack,U=this.remuxer.remux(z,X,k,F,D,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},w.transmuxSampleAes=function(A,D,M,N,P){var z=this;return this.demuxer.demuxSampleAes(A,D,M).then(function(X){var k=z.remuxer.remux(X.audioTrack,X.avcTrack,X.id3Track,X.textTrack,M,N,!1,z.id);return{remuxResult:k,chunkMeta:P}})},w.configureTransmuxer=function(A,D){for(var M=this.config,N=this.observer,P=this.typeSupported,z=this.vendor,X=D.audioCodec,k=D.defaultInitPts,F=D.duration,U=D.initSegmentData,L=D.videoCodec,B,Z=0,re=c.length;Z0&&w!=null&&w.key!=null&&w.iv!==null&&w.method!=null&&(S=w),S}var u=function(w){return{remuxResult:{},chunkMeta:w}};function E(C){return"then"in C&&C.then instanceof Function}var x=function(w,S,A,D,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=w,this.videoCodec=S,this.initSegmentData=A,this.duration=D,this.defaultInitPts=M},O=function(w,S,A,D,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=w,this.contiguous=S,this.accurateTimeOffset=A,this.trackSwitch=D,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"discardEPB",function(){return u});var y=T("./src/demux/adts.ts"),g=T("./src/demux/mpegaudio.ts"),s=T("./src/demux/exp-golomb.ts"),_=T("./src/demux/id3.ts"),p=T("./src/demux/sample-aes.ts"),e=T("./src/events.ts"),o=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),l=T("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function E(O,C,w){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=O,this.config=C,this.typeSupported=w}E.probe=function(C){var w=E.syncOffset(C);return w<0?!1:(w&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+w+", junk ahead ?"),!0)},E.syncOffset=function(C){for(var w=Math.min(1e3,C.length-3*188),S=0;S>4,pe=void 0;if(Ce>1){if(pe=ke+5+C[ke+4],pe===ke+188)continue}else pe=ke+4;switch(Re){case z:te&&(X&&(D=d(X))&&this.parseAVCPES(D,!1),X={data:[],size:0}),X&&(X.data.push(C.subarray(pe,ke+188)),X.size+=ke+188-pe);break;case k:te&&(U&&(D=d(U))&&(N.isAAC?this.parseAACPES(D):this.parseMPEGPES(D)),U={data:[],size:0}),U&&(U.data.push(C.subarray(pe,ke+188)),U.size+=ke+188-pe);break;case F:te&&(L&&(D=d(L))&&this.parseID3PES(D),L={data:[],size:0}),L&&(L.data.push(C.subarray(pe,ke+188)),L.size+=ke+188-pe);break;case 0:te&&(pe+=C[pe]+1),re=this._pmtId=a(C,pe);break;case re:{te&&(pe+=C[pe]+1);var me=c(C,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,S);z=me.avc,z>0&&(M.pid=z),k=me.audio,k>0&&(N.pid=k,N.isAAC=me.isAAC),F=me.id3,F>0&&(P.pid=F),B&&!Z&&(n.logger.log("reparse from beginning"),B=!1,ke=Se-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:B=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=X,N.pesData=U,P.pesData=L;var se={audioTrack:N,avcTrack:M,id3Track:P,textTrack:this._txtTrack};return A&&this.extractRemainingSamples(se),se},x.flush=function(){var C=this.remainderData;this.remainderData=null;var w;return C?w=this.demux(C,-1,!1,!0):w={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(w),this.sampleAes?this.decrypt(w,this.sampleAes):w},x.extractRemainingSamples=function(C){var w=C.audioTrack,S=C.avcTrack,A=C.id3Track,D=S.pesData,M=w.pesData,N=A.pesData,P;D&&(P=d(D))?(this.parseAVCPES(P,!0),S.pesData=null):S.pesData=D,M&&(P=d(M))?(w.isAAC?this.parseAACPES(P):this.parseMPEGPES(P),w.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=M),N&&(P=d(N))?(this.parseID3PES(P),A.pesData=null):A.pesData=N},x.demuxSampleAes=function(C,w,S){var A=this.demux(C,S,!0,!this.config.progressive),D=this.sampleAes=new p.default(this.observer,this.config,w);return this.decrypt(A,D)},x.decrypt=function(C,w){return new Promise(function(S){var A=C.audioTrack,D=C.avcTrack;A.samples&&A.isAAC?w.decryptAacSamples(A.samples,0,function(){D.samples?w.decryptAvcSamples(D.samples,0,0,function(){S(C)}):S(C)}):D.samples&&w.decryptAvcSamples(D.samples,0,0,function(){S(C)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(C,w){var S=this,A=this._avcTrack,D=this.parseAVCNALu(C.data),M=!1,N=this.avcSample,P,z=!1;C.data=null,N&&D.length&&!A.audFound&&(f(N,A),N=this.avcSample=t(!1,C.pts,C.dts,"")),D.forEach(function(X){switch(X.type){case 1:{P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var k=X.data;if(z&&k.length>4){var F=new s.default(k).readSliceType();(F===2||F===4||F===7||F===9)&&(N.key=!0)}break}case 5:P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{P=!0,M&&N&&(N.debug+="SEI ");var U=new s.default(u(X.data));U.readUByte();for(var L=0,B=0,Z=!1,re=0;!Z&&U.bytesAvailable>1;){L=0;do re=U.readUByte(),L+=re;while(re===255);B=0;do re=U.readUByte(),B+=re;while(re===255);if(L===4&&U.bytesAvailable!==0){Z=!0;var he=U.readUByte();if(he===181){var Se=U.readUShort();if(Se===49){var ke=U.readUInt();if(ke===1195456820){var te=U.readUByte();if(te===3){for(var Re=U.readUByte(),Ce=U.readUByte(),pe=31&Re,me=[Re,Ce],se=0;se16){for(var be=[],ae=0;ae<16;ae++)be.push(U.readUByte().toString(16)),(ae===3||ae===5||ae===7||ae===9)&&be.push("-");for(var fe=B-16,Fe=new Uint8Array(fe),ie=0;ie=0){var U={data:C.subarray(k,N-A-1),type:F};M.push(U)}else{var L=this.getLastNalUnit();if(L&&(D&&N<=4-D&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-D))),z=N-A-1,z>0)){var B=new Uint8Array(L.data.byteLength+z);B.set(L.data,0),B.set(C.subarray(0,z),L.data.byteLength),L.data=B,L.state=0}}N=0&&A>=0){var Z={data:C.subarray(k,w),type:F,state:A};M.push(Z)}if(M.length===0){var re=this.getLastNalUnit();if(re){var he=new Uint8Array(re.data.byteLength+C.byteLength);he.set(re.data,0),he.set(C,re.data.byteLength),re.data=he}}return S.naluState=A,M},x.parseAACPES=function(C){var w=0,S=this._audioTrack,A=this.aacOverFlow,D=C.data;if(A){this.aacOverFlow=null;var M=A.sample.unit.byteLength,N=Math.min(A.missing,M),P=M-N;A.sample.unit.set(D.subarray(0,N),P),S.samples.push(A.sample),w=A.missing}var z,X;for(z=w,X=D.length;z1;){var M=new Uint8Array(D[0].length+D[1].length);M.set(D[0]),M.set(D[1],D[0].length),D[0]=M,D.splice(1,1)}O=D[0];var N=(O[0]<<16)+(O[1]<<8)+O[2];if(N===1){if(C=(O[4]<<8)+O[5],C&&C>E.size-6)return null;var P=O[7];P&192&&(S=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,P&64?(A=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[18]&254)/2,S-A>60*9e4&&(n.logger.warn(Math.round((S-A)/9e4)+"s delta between PTS and DTS, align them"),S=A)):A=S),w=O[8];var z=w+9;if(E.size<=z)return null;E.size-=z;for(var X=new Uint8Array(E.size),k=0,F=D.length;kU){z-=U;continue}else O=O.subarray(z),U-=z,z=0;X.set(O,x),x+=U}return C&&(C-=w+3),{data:X,pts:S,dts:A,len:C}}return null}function f(E,x){if(E.units.length&&E.frame){if(E.pts===void 0){var O=x.samples,C=O.length;if(C){var w=O[C-1];E.pts=w.pts,E.dts=w.dts}else{x.dropped++;return}}x.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function h(E,x){var O=E.length;if(O>0){if(x.pts>=E[O-1].pts)E.push(x);else for(var C=O-1;C>=0;C--)if(x.ptsS)return D;return 0}},{key:"maxAutoLevel",get:function(){var w=this.levels,S=this.autoLevelCapping,A;return S===-1&&w&&w.length?A=w.length-1:A=S,A}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(w){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,w)}},{key:"audioTracks",get:function(){var w=this.audioTrackController;return w?w.audioTracks:[]}},{key:"audioTrack",get:function(){var w=this.audioTrackController;return w?w.audioTrack:-1},set:function(w){var S=this.audioTrackController;S&&(S.audioTrack=w)}},{key:"subtitleTracks",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTrack:-1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleTrack=w)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var w=this.subtitleTrackController;return w?w.subtitleDisplay:!1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleDisplay=w)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(w){this.config.lowLatencyMode=w}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return d.Events}},{key:"ErrorTypes",get:function(){return f.ErrorTypes}},{key:"ErrorDetails",get:function(){return f.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:t.hlsDefaultConfig},set:function(w){x.defaultConfig=w}}]),x}();E.defaultConfig=void 0},"./src/is-supported.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isSupported",function(){return s}),T.d(v,"changeTypeSupported",function(){return _});var y=T("./src/utils/mediasource-helper.ts");function g(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var p=Object(y.getMediaSource)();if(!p)return!1;var e=g(),o=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!o&&!!n}function _(){var p,e=g();return typeof(e==null||((p=e.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i}),T.d(v,"LoadError",function(){return a});var y=T("./src/polyfills/number.ts"),g=T("./src/errors.ts");function s(c,d){c.prototype=Object.create(d.prototype),c.prototype.constructor=c,n(c,d)}function _(c){var d=typeof Map=="function"?new Map:void 0;return _=function(h){if(h===null||!o(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof d!="undefined"){if(d.has(h))return d.get(h);d.set(h,u)}function u(){return p(h,arguments,l(this).constructor)}return u.prototype=Object.create(h.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),n(u,h)},_(c)}function p(c,d,f){return e()?p=Reflect.construct:p=function(u,E,x){var O=[null];O.push.apply(O,E);var C=Function.bind.apply(u,O),w=new C;return x&&n(w,x.prototype),w},p.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function o(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function n(c,d){return n=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},n(c,d)}function l(c){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},l(c)}var r=Math.pow(2,17),i=function(){function c(f){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=f}var d=c.prototype;return d.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},d.abort=function(){this.loader&&this.loader.abort()},d.load=function(h,u){var E=this,x=h.url;if(!x)return Promise.reject(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){E.loader&&E.loader.destroy();var D=E.loader=h.loader=C?new C(O):new w(O),M=t(h),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};h.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){E.resetLoader(h,D),S({frag:h,part:null,payload:z.data,networkDetails:F})},onError:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:z,networkDetails:k}))},onAbort:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:k}))},onTimeout:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:k}))},onProgress:function(z,X,k,F){u&&u({frag:h,part:null,payload:k,networkDetails:F})}})})},d.loadPart=function(h,u,E){var x=this;this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){x.loader&&x.loader.destroy();var D=x.loader=h.loader=C?new C(O):new w(O),M=t(h,u),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};u.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){x.resetLoader(h,D),x.updateStatsFromPart(h,u);var U={frag:h,part:u,payload:z.data,networkDetails:F};E(U),S(U)},onError:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:u,response:z,networkDetails:k}))},onAbort:function(z,X,k){h.stats.aborted=u.stats.aborted,x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:u,networkDetails:k}))},onTimeout:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:u,networkDetails:k}))}})})},d.updateStatsFromPart=function(h,u){var E=h.stats,x=u.stats,O=x.total;if(E.loaded+=x.loaded,O){var C=Math.round(h.duration/u.duration),w=Math.min(Math.round(E.loaded/O),C),S=C-w,A=S*Math.round(E.loaded/w);E.total=E.loaded+A}else E.total=Math.max(E.loaded,E.total);var D=E.loading,M=x.loading;D.start?D.first+=M.first-M.start:(D.start=M.start,D.first=M.first),D.end=M.end},d.resetLoader=function(h,u){h.loader=null,this.loader===u&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),u.destroy()},c}();function t(c,d){d===void 0&&(d=null);var f=d||c,h={frag:c,part:d,responseType:"arraybuffer",url:f.url,headers:{},rangeStart:0,rangeEnd:0},u=f.byteRangeStartOffset,E=f.byteRangeEndOffset;return Object(y.isFiniteNumber)(u)&&Object(y.isFiniteNumber)(E)&&(h.rangeStart=u,h.rangeEnd=E),h}var a=function(c){s(d,c);function d(f){for(var h,u=arguments.length,E=new Array(u>1?u-1:0),x=1;x>8*(15-O)&255;return x},h.setDecryptDataFromLevelKey=function(E,x){var O=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(O=p.LevelKey.fromURI(E.uri),O.method=E.method,O.iv=this.createInitializationVector(x),O.keyFormat="identity"),O},h.setElementaryStreamInfo=function(E,x,O,C,w,S){S===void 0&&(S=!1);var A=this.elementaryStreams,D=A[E];if(!D){A[E]={startPTS:x,endPTS:O,startDTS:C,endDTS:w,partial:S};return}D.startPTS=Math.min(D.startPTS,x),D.endPTS=Math.max(D.endPTS,O),D.startDTS=Math.min(D.startDTS,C),D.endDTS=Math.max(D.endDTS,w)},h.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[i.AUDIO]=null,E[i.VIDEO]=null,E[i.AUDIOVIDEO]=null},r(f,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&_.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(y.isFiniteNumber)(this.programDateTime))return null;var E=Object(y.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),f}(t),c=function(d){o(f,d);function f(h,u,E,x,O){var C;C=d.call(this,E)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new e.LoadStats,C.duration=h.decimalFloatingPoint("DURATION"),C.gap=h.bool("GAP"),C.independent=h.bool("INDEPENDENT"),C.relurl=h.enumeratedString("URI"),C.fragment=u,C.index=x;var w=h.enumeratedString("BYTERANGE");return w&&C.setByteRange(w,O),O&&(C.fragOffset=O.fragOffset+O.duration),C}return r(f,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var u=this.elementaryStreams;return!!(u.audio||u.video||u.audiovideo)}}]),f}(t)},"./src/loader/key-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return _});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/utils/logger.ts"),_=function(){function p(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var e=p.prototype;return e._registerListeners=function(){this.hls.on(y.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(y.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy()}this.loaders={}},e.onKeyLoading=function(n,l){var r=l.frag,i=r.type,t=this.loaders[i];if(!r.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var a=r.decryptdata.uri;if(a!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(t&&(s.logger.warn("abort previous key loader for type:"+i),t.abort()),!a){s.logger.warn("key uri is falsy");return}var d=c.loader,f=r.loader=this.loaders[i]=new d(c);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:r,responseType:"arraybuffer"},u={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};f.load(h,u,E)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(y.Events.KEY_LOADED,{frag:r}))},e.loadsuccess=function(n,l,r){var i=r.frag;if(!i.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(n.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(y.Events.KEY_LOADED,{frag:i})},e.loaderror=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:n})},e.loadtimeout=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},p}()},"./src/loader/level-details.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelDetails",function(){return p});var y=T("./src/polyfills/number.ts");function g(e,o){for(var n=0;nl.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},s(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(y.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||_}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelKey",function(){return p});var y=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(y);function s(e,o){for(var n=0;n2){var A=S.shift()+".";return A+=parseInt(S.shift()).toString(16),A+=("000"+parseInt(S.shift()).toString(16)).substr(-4),A}return w},O.resolve=function(w,S){return g.buildAbsoluteURL(S,w,{alwaysNormalize:!0})},O.parseMasterPlaylist=function(w,S){var A=[],D={},M=!1;r.lastIndex=0;for(var N;(N=r.exec(w))!=null;)if(N[1]){var P=new o.AttrList(N[1]),z={attrs:P,bitrate:P.decimalInteger("AVERAGE-BANDWIDTH")||P.decimalInteger("BANDWIDTH"),name:P.NAME,url:O.resolve(N[2],S)},X=P.decimalResolution("RESOLUTION");X&&(z.width=X.width,z.height=X.height),h((P.CODECS||"").split(/[ ,]+/).filter(function(F){return F}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=O.convertAVC1ToAVCOTI(z.videoCodec)),A.push(z)}else if(N[3]){var k=new o.AttrList(N[3]);k["DATA-ID"]&&(M=!0,D[k["DATA-ID"]]=k)}return{levels:A,sessionData:M?D:null}},O.parseMasterPlaylistMedia=function(w,S,A,D){D===void 0&&(D=[]);var M,N=[],P=0;for(i.lastIndex=0;(M=i.exec(w))!==null;){var z=new o.AttrList(M[1]);if(z.TYPE===A){var X={attrs:z,bitrate:0,id:P++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:A,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?O.resolve(z.URI,S):""};if(D.length){var k=O.findGroup(D,X.groupId)||D[0];u(X,k,"audioCodec"),u(X,k,"textCodec")}N.push(X)}}return N},O.parseLevelPlaylist=function(w,S,A,D,M){var N=new p.LevelDetails(S),P=N.fragments,z=null,X=0,k=0,F=0,U=0,L=null,B=new _.Fragment(D,S),Z,re,he,Se=-1,ke=!1;for(t.lastIndex=0,N.m3u8=w;(Z=t.exec(w))!==null;){ke&&(ke=!1,B=new _.Fragment(D,S),B.start=F,B.sn=X,B.cc=U,B.level=A,z&&(B.initSegment=z,B.rawProgramDateTime=z.rawProgramDateTime));var te=Z[1];if(te){B.duration=parseFloat(te);var Re=(" "+Z[2]).slice(1);B.title=Re||null,B.tagList.push(Re?["INF",te,Re]:["INF",te])}else if(Z[3])Object(y.isFiniteNumber)(B.duration)&&(B.start=F,he&&(B.levelkey=he),B.sn=X,B.level=A,B.cc=U,B.urlId=M,P.push(B),B.relurl=(" "+Z[3]).slice(1),x(B,L),L=B,F+=B.duration,X++,k=0,ke=!0);else if(Z[4]){var Ce=(" "+Z[4]).slice(1);L?B.setByteRange(Ce,L):B.setByteRange(Ce)}else if(Z[5])B.rawProgramDateTime=(" "+Z[5]).slice(1),B.tagList.push(["PROGRAM-DATE-TIME",B.rawProgramDateTime]),Se===-1&&(Se=P.length);else{if(Z=Z[0].match(a),!Z){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re-1){n.logger.warn("Keyformat "+Le+" is not supported from the manifest");continue}else if(Le!=="identity")continue;Q&&(he=e.LevelKey.fromURL(S,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Q)>=0&&(he.method=Q,he.keyFormat=Le,Ee&&(he.keyID=Ee),le&&(he.keyFormatVersions=le),he.iv=oe));break}case"START":{var De=new o.AttrList(me),_e=De.decimalFloatingPoint("TIME-OFFSET");Object(y.isFiniteNumber)(_e)&&(N.startTimeOffset=_e);break}case"MAP":{var Xe=new o.AttrList(me);B.relurl=Xe.URI,Xe.BYTERANGE&&B.setByteRange(Xe.BYTERANGE),B.level=A,B.sn="initSegment",he&&(B.levelkey=he),B.initSegment=null,z=B,ke=!0;break}case"SERVER-CONTROL":{var tt=new o.AttrList(me);N.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ge=new o.AttrList(me);N.partTarget=Ge.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=N.partList;Me||(Me=N.partList=[]);var bt=k>0?Me[Me.length-1]:void 0,Oe=k++,Ve=new _.Part(new o.AttrList(me),B,S,Oe,bt);Me.push(Ve),B.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Je=new o.AttrList(me);N.preloadHint=Je;break}case"RENDITION-REPORT":{var Ye=new o.AttrList(me);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Ye);break}default:n.logger.warn("line parsed but not handled: "+Z);break}}}L&&!L.relurl?(P.pop(),F-=L.duration,N.partList&&(N.fragmentHint=L)):N.partList&&(x(B,L),B.cc=U,N.fragmentHint=B);var Ne=P.length,He=P[0],ve=P[Ne-1];if(F+=N.skippedSegments*N.targetduration,F>0&&Ne&&ve){N.averagetargetduration=F/Ne;var xe=ve.sn;N.endSN=xe!=="initSegment"?xe:0,He&&(N.startCC=He.cc,He.initSegment||N.fragments.every(function(de){return de.relurl&&d(de.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),B=new _.Fragment(D,S),B.relurl=ve.relurl,B.level=A,B.sn="initSegment",He.initSegment=B,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(F+=N.fragmentHint.duration),N.totalduration=F,N.endCC=U,Se>0&&E(P,Se),N},O}();function h(O,C){["video","audio","text"].forEach(function(w){var S=O.filter(function(D){return Object(l.isCodecType)(D,w)});if(S.length){var A=S.filter(function(D){return D.lastIndexOf("avc1",0)===0||D.lastIndexOf("mp4a",0)===0});C[w+"Codec"]=A.length>0?A[0]:S[0],O=O.filter(function(D){return S.indexOf(D)===-1})}}),C.unknownCodecs=O}function u(O,C,w){var S=C[w];S&&(O[w]=S)}function E(O,C){for(var w=O[C],S=C;S--;){var A=O[S];if(!A)return;A.programDateTime=w.programDateTime-A.duration*1e3,w=A}}function x(O,C){O.rawProgramDateTime?O.programDateTime=Date.parse(O.rawProgramDateTime):C!=null&&C.programDateTime&&(O.programDateTime=C.endProgramDateTime),Object(y.isFiniteNumber)(O.programDateTime)||(O.programDateTime=null,O.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/events.ts"),s=T("./src/errors.ts"),_=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),e=T("./src/loader/m3u8-parser.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function l(t){var a=t.type;switch(a){case o.PlaylistContextType.AUDIO_TRACK:return o.PlaylistLevelType.AUDIO;case o.PlaylistContextType.SUBTITLE_TRACK:return o.PlaylistLevelType.SUBTITLE;default:return o.PlaylistLevelType.MAIN}}function r(t,a){var c=t.url;return(c===void 0||c.indexOf("data:")===0)&&(c=a.url),c}var i=function(){function t(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var a=t.prototype;return a.registerListeners=function(){var d=this.hls;d.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.on(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.unregisterListeners=function(){var d=this.hls;d.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.off(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.createInternalLoader=function(d){var f=this.hls.config,h=f.pLoader,u=f.loader,E=h||u,x=new E(f);return d.loader=x,this.loaders[d.type]=x,x},a.getInternalLoader=function(d){return this.loaders[d.type]},a.resetInternalLoader=function(d){this.loaders[d]&&delete this.loaders[d]},a.destroyInternalLoaders=function(){for(var d in this.loaders){var f=this.loaders[d];f&&f.destroy(),this.resetInternalLoader(d)}},a.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},a.onManifestLoading=function(d,f){var h=f.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:o.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},a.onLevelLoading=function(d,f){var h=f.id,u=f.level,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:null,level:u,responseType:"text",type:o.PlaylistContextType.LEVEL,url:E,deliveryDirectives:x})},a.onAudioTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:x})},a.onSubtitleTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:x})},a.load=function(d){var f,h=this.hls.config,u=this.getInternalLoader(d);if(u){var E=u.context;if(E&&E.url===d.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+d.type),u.abort()}var x,O,C,w;switch(d.type){case o.PlaylistContextType.MANIFEST:x=h.manifestLoadingMaxRetry,O=h.manifestLoadingTimeOut,C=h.manifestLoadingRetryDelay,w=h.manifestLoadingMaxRetryTimeout;break;case o.PlaylistContextType.LEVEL:case o.PlaylistContextType.AUDIO_TRACK:case o.PlaylistContextType.SUBTITLE_TRACK:x=0,O=h.levelLoadingTimeOut;break;default:x=h.levelLoadingMaxRetry,O=h.levelLoadingTimeOut,C=h.levelLoadingRetryDelay,w=h.levelLoadingMaxRetryTimeout;break}if(u=this.createInternalLoader(d),(f=d.deliveryDirectives)!==null&&f!==void 0&&f.part){var S;if(d.type===o.PlaylistContextType.LEVEL&&d.level!==null?S=this.hls.levels[d.level].details:d.type===o.PlaylistContextType.AUDIO_TRACK&&d.id!==null?S=this.hls.audioTracks[d.id].details:d.type===o.PlaylistContextType.SUBTITLE_TRACK&&d.id!==null&&(S=this.hls.subtitleTracks[d.id].details),S){var A=S.partTarget,D=S.targetduration;A&&D&&(O=Math.min(Math.max(A*3,D*.8)*1e3,O))}}var M={timeout:O,maxRetry:x,retryDelay:C,maxRetryDelay:w,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,M,N)},a.loadsuccess=function(d,f,h,u){if(u===void 0&&(u=null),h.isSidxRequest){this.handleSidxRequest(d,h),this.handlePlaylistLoaded(d,f,h,u);return}this.resetInternalLoader(h.type);var E=d.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(d,h,"no EXTM3U delimiter",u);return}f.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(d,f,h,u):this.handleMasterPlaylist(d,f,h,u)},a.loaderror=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!1,d)},a.loadtimeout=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!0)},a.handleMasterPlaylist=function(d,f,h,u){var E=this.hls,x=d.data,O=r(d,h),C=e.default.parseMasterPlaylist(x,O),w=C.levels,S=C.sessionData;if(!w.length){this.handleManifestParsingError(d,h,"no level found in manifest",u);return}var A=w.map(function(X){return{id:X.attrs.AUDIO,audioCodec:X.audioCodec}}),D=w.map(function(X){return{id:X.attrs.SUBTITLES,textCodec:X.textCodec}}),M=e.default.parseMasterPlaylistMedia(x,O,"AUDIO",A),N=e.default.parseMasterPlaylistMedia(x,O,"SUBTITLES",D),P=e.default.parseMasterPlaylistMedia(x,O,"CLOSED-CAPTIONS");if(M.length){var z=M.some(function(X){return!X.url});!z&&w[0].audioCodec&&!w[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(g.Events.MANIFEST_LOADED,{levels:w,audioTracks:M,subtitles:N,captions:P,url:O,stats:f,networkDetails:u,sessionData:S})},a.handleTrackOrLevelPlaylist=function(d,f,h,u){var E=this.hls,x=h.id,O=h.level,C=h.type,w=r(d,h),S=Object(y.isFiniteNumber)(x)?x:0,A=Object(y.isFiniteNumber)(O)?O:S,D=l(h),M=e.default.parseLevelPlaylist(d.data,w,A,D,S);if(!M.fragments.length){E.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:w,reason:"no fragments found in level",level:typeof h.level=="number"?h.level:void 0});return}if(C===o.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:w};E.trigger(g.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:w,stats:f,networkDetails:u,sessionData:null})}if(f.parsing.end=performance.now(),M.needSidxRanges){var P,z=(P=M.fragments[0].initSegment)===null||P===void 0?void 0:P.url;this.load({url:z,isSidxRequest:!0,type:C,level:O,levelDetails:M,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}h.levelDetails=M,this.handlePlaylistLoaded(d,f,h,u)},a.handleSidxRequest=function(d,f){var h=Object(p.parseSegmentIndex)(new Uint8Array(d.data));if(!h)return;var u=h.references,E=f.levelDetails;u.forEach(function(x,O){var C=x.info,w=E.fragments[O];w.byteRange.length===0&&w.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),w.initSegment&&w.initSegment.setByteRange(String(h.moovEndOffset)+"@0")})},a.handleManifestParsingError=function(d,f,h,u){this.hls.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:f.type===o.PlaylistContextType.MANIFEST,url:d.url,reason:h,response:d,context:f,networkDetails:u})},a.handleNetworkError=function(d,f,h,u){h===void 0&&(h=!1),_.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+d.type+" level: "+d.level+" id: "+d.id+' group-id: "'+d.groupId+'"');var E=s.ErrorDetails.UNKNOWN,x=!1,O=this.getInternalLoader(d);switch(d.type){case o.PlaylistContextType.MANIFEST:E=h?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case o.PlaylistContextType.LEVEL:E=h?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.AUDIO_TRACK:E=h?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.SUBTITLE_TRACK:E=h?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}O&&this.resetInternalLoader(d.type);var C={type:s.ErrorTypes.NETWORK_ERROR,details:E,fatal:x,url:d.url,loader:O,context:d,networkDetails:f};u&&(C.response=u),this.hls.trigger(g.Events.ERROR,C)},a.handlePlaylistLoaded=function(d,f,h,u){var E=h.type,x=h.level,O=h.id,C=h.groupId,w=h.loader,S=h.levelDetails,A=h.deliveryDirectives;if(!(S!=null&&S.targetduration)){this.handleManifestParsingError(d,h,"invalid target duration",u);return}if(!w)return;S.live&&(w.getCacheAge&&(S.ageHeader=w.getCacheAge()||0),(!w.getCacheAge||isNaN(S.ageHeader))&&(S.ageHeader=0));switch(E){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(g.Events.LEVEL_LOADED,{details:S,level:x||0,id:O||0,stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(g.Events.AUDIO_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(g.Events.SUBTITLE_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break}},t}();v.default=i},"./src/polyfills/number.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isFiniteNumber",function(){return y}),T.d(v,"MAX_SAFE_INTEGER",function(){return g});var y=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},g=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(I,v,T){"use strict";T.r(v);var y=function(){function g(){}return g.getSilentFrame=function(_,p){switch(_){case"mp4a.40.2":if(p===1)return new Uint8Array([0,200,0,128,35,128]);if(p===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(p===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(p===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(p===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(p===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(p===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},g}();v.default=y},"./src/remux/mp4-generator.ts":function(I,v,T){"use strict";T.r(v);var y=Math.pow(2,32)-1,g=function(){function s(){}return s.init=function(){s.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var p;for(p in s.types)s.types.hasOwnProperty(p)&&(s.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),o=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);s.HDLR_TYPES={video:e,audio:o};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=l,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),t=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,r,t,r,i),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,n))},s.box=function(p){for(var e=8,o=arguments.length,n=new Array(o>1?o-1:0),l=1;l>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t.set(p,4),r=0,e=8;r>24&255,p>>16&255,p>>8&255,p&255,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},s.mdia=function(p){return s.box(s.types.mdia,s.mdhd(p.timescale,p.duration),s.hdlr(p.type),s.minf(p))},s.mfhd=function(p){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},s.minf=function(p){return p.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(p)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(p))},s.moof=function(p,e,o){return s.box(s.types.moof,s.mfhd(p),s.traf(o,e))},s.moov=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trak(p[e]);return s.box.apply(null,[s.types.moov,s.mvhd(p[0].timescale,p[0].duration)].concat(o).concat(s.mvex(p)))},s.mvex=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trex(p[e]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(p,e){e*=p;var o=Math.floor(e/(y+1)),n=Math.floor(e%(y+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return s.box(s.types.mvhd,l)},s.sdtp=function(p){var e=p.samples||[],o=new Uint8Array(4+e.length),n,l;for(n=0;n>>8&255),e.push(r&255),e=e.concat(Array.prototype.slice.call(l));for(n=0;n>>8&255),o.push(r&255),o=o.concat(Array.prototype.slice.call(l));var i=s.box(s.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|p.sps.length].concat(e).concat([p.pps.length]).concat(o))),t=p.width,a=p.height,c=p.pixelRatio[0],d=p.pixelRatio[1];return s.box(s.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t>>8&255,t&255,a>>8&255,a&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))},s.esds=function(p){var e=p.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(p.config).concat([6,1,2]))},s.mp4a=function(p){var e=p.samplerate;return s.box(s.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),s.box(s.types.esds,s.esds(p)))},s.mp3=function(p){var e=p.samplerate;return s.box(s.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},s.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(p)):s.box(s.types.stsd,s.STSD,s.mp4a(p)):s.box(s.types.stsd,s.STSD,s.avc1(p))},s.tkhd=function(p){var e=p.id,o=p.duration*p.timescale,n=p.width,l=p.height,r=Math.floor(o/(y+1)),i=Math.floor(o%(y+1));return s.box(s.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,l>>8&255,l&255,0,0]))},s.traf=function(p,e){var o=s.sdtp(p),n=p.id,l=Math.floor(e/(y+1)),r=Math.floor(e%(y+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),s.trun(p,o.length+16+20+8+16+8+8),o)},s.trak=function(p){return p.duration=p.duration||4294967295,s.box(s.types.trak,s.tkhd(p),s.mdia(p))},s.trex=function(p){var e=p.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(p,e){var o=p.samples||[],n=o.length,l=12+16*n,r=new Uint8Array(l),i,t,a,c,d,f;for(e+=8+l,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),i=0;i>>24&255,a>>>16&255,a>>>8&255,a&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&240<<8,d.degradPrio&15,f>>>24&255,f>>>16&255,f>>>8&255,f&255],12+16*i);return s.box(s.types.trun,r)},s.initSegment=function(p){s.types||s.init();var e=s.moov(p),o=new Uint8Array(s.FTYP.byteLength+e.byteLength);return o.set(s.FTYP),o.set(e,s.FTYP.byteLength),o},s}();g.types=void 0,g.HDLR_TYPES=void 0,g.STTS=void 0,g.STSC=void 0,g.STCO=void 0,g.STSZ=void 0,g.VMHD=void 0,g.SMHD=void 0,g.STSD=void 0,g.FTYP=void 0,g.DINF=void 0,v.default=g},"./src/remux/mp4-remuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"normalizePts",function(){return h});var y=T("./src/polyfills/number.ts"),g=T("./src/remux/aac-helper.ts"),s=T("./src/remux/mp4-generator.ts"),_=T("./src/events.ts"),p=T("./src/errors.ts"),e=T("./src/utils/logger.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(O){for(var C=1;C0?M:N.pts},S[0].pts);return A&&e.logger.debug("PTS rollover detected"),D},C.remux=function(S,A,D,M,N,P,z,X){var k,F,U,L,B,Z,re=N,he=N,Se=S.pid>-1,ke=A.pid>-1,te=A.samples.length,Re=S.samples.length>0,Ce=te>1,pe=(!Se||Re)&&(!ke||Ce)||this.ISGenerated||z;if(pe){this.ISGenerated||(U=this.generateIS(S,A,N));var me=this.isVideoContiguous,se=-1;if(Ce&&(se=u(A.samples),!me&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,se>0){e.logger.warn("[mp4-remuxer]: Dropped "+se+" out of "+te+" video samples due to a missing keyframe");var be=this.getVideoStartPts(A.samples);A.samples=A.samples.slice(se),A.dropped+=se,he+=(A.samples[0].pts-be)/(A.timescale||9e4)}else se===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+te+" video samples"),Z=!1);if(this.ISGenerated){if(Re&&Ce){var ae=this.getVideoStartPts(A.samples),fe=h(S.samples[0].pts,ae)-ae,Fe=fe/A.inputTimeScale;re+=Math.max(0,Fe),he+=Math.max(0,-Fe)}if(Re){if(S.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(S,A,N)),F=this.remuxAudio(S,re,this.isAudioContiguous,P,ke||Ce||X===o.PlaylistLevelType.AUDIO?he:void 0),Ce){var ie=F?F.endPTS-F.startPTS:0;A.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(S,A,N)),k=this.remuxVideo(A,he,me,ie)}}else Ce&&(k=this.remuxVideo(A,he,me,0));k&&(k.firstKeyFrame=se,k.independent=se!==-1)}}return this.ISGenerated&&(D.samples.length&&(B=this.remuxID3(D,N)),M.samples.length&&(L=this.remuxText(M,N))),{audio:F,video:k,initSegment:U,independent:Z,text:L,id3:B}},C.generateIS=function(S,A,D){var M=S.samples,N=A.samples,P=this.typeSupported,z={},X=!Object(y.isFiniteNumber)(this._initPTS),k="audio/mp4",F,U,L;if(X&&(F=U=Infinity),S.config&&M.length&&(S.timescale=S.samplerate,S.isAAC||(P.mpeg?(k="audio/mpeg",S.codec=""):P.mp3&&(S.codec="mp3")),z.audio={id:"audio",container:k,codec:S.codec,initSegment:!S.isAAC&&P.mpeg?new Uint8Array(0):s.default.initSegment([S]),metadata:{channelCount:S.channelCount}},X&&(L=S.inputTimeScale,F=U=M[0].pts-Math.round(L*D))),A.sps&&A.pps&&N.length&&(A.timescale=A.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:A.codec,initSegment:s.default.initSegment([A]),metadata:{width:A.width,height:A.height}},X)){L=A.inputTimeScale;var B=this.getVideoStartPts(N),Z=Math.round(L*D);U=Math.min(U,h(N[0].dts,B)-Z),F=Math.min(F,B-Z)}if(Object.keys(z).length)return this.ISGenerated=!0,X&&(this._initPTS=F,this._initDTS=U),{tracks:z,initPTS:F,timescale:L}},C.remuxVideo=function(S,A,D,M){var N=S.inputTimeScale,P=S.samples,z=[],X=P.length,k=this._initPTS,F=this.nextAvcDts,U=8,L,B,Z,re=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,Se=0,ke=!1;if(!D||F===null){var te=A*N,Re=P[0].pts-h(P[0].dts,P[0].pts);F=te-Re}for(var Ce=0;Cepe.pts){var me=9e4*.2;Se=Math.max(Math.min(Se,pe.pts-pe.dts),-1*me)}pe.dts0?Ce-1:Ce].dts&&(ke=!0)}ke&&P.sort(function(it,wt){var pt=it.dts-wt.dts,st=it.pts-wt.pts;return pt||st}),B=P[0].dts,Z=P[P.length-1].dts;var se=Math.round((Z-B)/(X-1));if(Se<0){if(Sese,q=Fe<-1;if(ie||q){ie?e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),B=F;var Q=P[0].pts-Fe;P[0].dts=B,P[0].pts=Q,e.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(Q,!0)+"/"+Object(n.toMsFromMpegTsClock)(B,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms")}}d&&(B=Math.max(0,B));for(var Y=0,oe=0,le=0;le0?Me-1:Me].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var je=Math.floor(xe.maxBufferHole*N),Qe=(M?re+M*N:this.nextAudioPts)-bt.pts;Qe>je?(L=Qe-de,L<0&&(L=de),e.logger.log("[mp4-remuxer]: It is approximately "+Qe/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=de}else L=de}var ne=Math.round(bt.pts-bt.dts);z.push(new E(bt.key,L,Ve,ne))}if(z.length&&a&&a<70){var Ze=z[0].flags;Ze.dependsOn=2,Ze.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=F=Z+L,this.isVideoContiguous=!0;var lt=s.default.moof(S.sequenceNumber++,B,l({},S,{samples:z})),Be="video",$e={data1:lt,data2:tt,startPTS:re/N,endPTS:(he+L)/N,startDTS:B/N,endDTS:F/N,type:Be,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:S.dropped};return S.samples=[],S.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),$e},C.remuxAudio=function(S,A,D,M,N){var P=S.inputTimeScale,z=S.samplerate?S.samplerate:P,X=P/z,k=S.isAAC?i:t,F=k*X,U=this._initPTS,L=!S.isAAC&&this.typeSupported.mpeg,B=[],Z=S.samples,re=L?0:8,he=this.nextAudioPts||-1,Se=A*P;if(this.isAudioContiguous=D=D||Z.length&&he>0&&(M&&Math.abs(Se-he)<9e3||Math.abs(h(Z[0].pts-U,Se)-he)<20*F),Z.forEach(function(He){He.pts=h(He.pts-U,Se)}),!D||he<0){if(Z=Z.filter(function(He){return He.pts>=0}),!Z.length)return;N===0?he=0:M?he=Math.max(0,Se):he=Z[0].pts}if(S.isAAC)for(var ke=N!==void 0,te=this.config.maxAudioFramesDrift,Re=0,Ce=he;Re=te*F&&be0){oe+=re;try{Y=new Uint8Array(oe)}catch(He){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:oe,reason:"fail allocating audio mdat "+oe});return}if(!L){var tt=new DataView(Y.buffer);tt.setUint32(0,oe),Y.set(s.default.types.mdat,4)}}else return;Y.set(De,re);var Ge=De.byteLength;re+=Ge,B.push(new E(!0,k,Ge,0)),Q=_e}var Me=B.length;if(!Me)return;var bt=B[B.length-1];this.nextAudioPts=he=Q+X*bt.duration;var Oe=L?new Uint8Array(0):s.default.moof(S.sequenceNumber++,q/X,l({},S,{samples:B}));S.samples=[];var Ve=q/P,Je=he/P,Ye="audio",Ne={data1:Oe,data2:Y,startPTS:Ve,endPTS:Je,startDTS:Ve,endDTS:Je,type:Ye,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),Ne},C.remuxEmptyAudio=function(S,A,D,M){var N=S.inputTimeScale,P=S.samplerate?S.samplerate:N,z=N/P,X=this.nextAudioPts,k=(X!==null?X:M.startDTS*N)+this._initDTS,F=M.endDTS*N+this._initDTS,U=z*i,L=Math.ceil((F-k)/U),B=g.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!B){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],re=0;re4294967296;)O+=w;return O}function u(O){for(var C=0;C0?this.lastEndDTS=S:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var A=!!O.audio,D=!!O.video,M="";A&&(M+="audio"),D&&(M+="video");var N={data1:E,startPTS:w,startDTS:w,endPTS:S,endDTS:S,type:M,hasAudio:A,hasVideo:D,nb:1,dropped:0};return u.audio=N.type==="audio"?N:void 0,u.video=N.type!=="audio"?N:void 0,u.text=c,u.id3=a,u.initSegment=x,u},n}(),e=function(l,r,i){return Object(g.getStartDTS)(l,r)-i};function o(n,l){var r=n==null?void 0:n.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=p},"./src/task-loop.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=g.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},g}()},"./src/types/cmcd.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"CMCDVersion",function(){return y}),T.d(v,"CMCDObjectType",function(){return g}),T.d(v,"CMCDStreamingFormat",function(){return s}),T.d(v,"CMCDStreamType",function(){return _});var y=1,g;(function(p){p.MANIFEST="m",p.AUDIO="a",p.VIDEO="v",p.MUXED="av",p.INIT="i",p.CAPTION="c",p.TIMED_TEXT="tt",p.KEY="k",p.OTHER="o"})(g||(g={}));var s;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(s||(s={}));var _;(function(p){p.VOD="v",p.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"HlsSkip",function(){return s}),T.d(v,"getSkipValue",function(){return _}),T.d(v,"HlsUrlParameters",function(){return p}),T.d(v,"Level",function(){return e});function y(o,n){for(var l=0;lNumber.MAX_SAFE_INTEGER?Infinity:n},p.hexadecimalInteger=function(o){if(this[o]){var n=(this[o]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var l=new Uint8Array(n.length/2),r=0;rNumber.MAX_SAFE_INTEGER?Infinity:n},p.decimalFloatingPoint=function(o){return parseFloat(this[o])},p.optionalFloat=function(o,n){var l=this[o];return l?parseFloat(l):n},p.enumeratedString=function(o){return this[o]},p.bool=function(o){return this[o]==="YES"},p.decimalResolution=function(o){var n=y.exec(this[o]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},_.parseAttrList=function(o){var n,l={},r='"';for(g.lastIndex=0;(n=g.exec(o))!==null;){var i=n[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[n[1]]=i}return l},_}()},"./src/utils/binary-search.ts":function(I,v,T){"use strict";T.r(v);var y={search:function(s,_){for(var p=0,e=s.length-1,o=null,n=null;p<=e;){o=(p+e)/2|0,n=s[o];var l=_(n);if(l>0)p=o+1;else if(l<0)e=o-1;else return n}return null}};v.default=y},"./src/utils/buffer-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"BufferHelper",function(){return s});var y=T("./src/utils/logger.ts"),g={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function _(){}return _.isBuffered=function(e,o){try{if(e){for(var n=_.getBuffered(e),l=0;l=n.start(l)&&o<=n.end(l))return!0}}catch(r){}return!1},_.bufferInfo=function(e,o,n){try{if(e){var l=_.getBuffered(e),r=[],i;for(i=0;it&&(l[i-1].end=e[r].end):l.push(e[r])}else l.push(e[r])}else l=e;for(var a=0,c,d=o,f=o,h=0;h=u&&o=D&&y.logger.log(this.time+" ["+D+"] "+M)},w}(),a=function(S){for(var A=[],D=0;Dp&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=p)},S.moveCursor=function(D){var M=this.pos+D;if(D>1)for(var N=this.pos+1;N=144&&this.backSpace();var M=s(D);if(this.pos>=p){this.logger.log(i.ERROR,"Cannot insert "+D.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},S.clearFromPos=function(D){var M;for(M=D;M0&&(D?N="["+M.join(" | ")+"]":N=M.join(` + timeOffset: `+N);var re=new _.TransmuxConfig(h,u,f,O,S);this.configureTransmuxer(re)}if(this.frag=E,this.part=x,M)M.postMessage({cmd:"demux",data:d,decryptdata:P,chunkMeta:w,state:Z},d instanceof ArrayBuffer?[d]:[]);else if(D){var he=D.push(d,P,w,Z);Object(_.isPromise)(he)?he.then(function(Se){A.handleTransmuxComplete(Se)}):this.handleTransmuxComplete(he)}},a.flush=function(d){var f=this;d.transmuxing.start=self.performance.now();var h=this.transmuxer,u=this.worker;if(u)u.postMessage({cmd:"flush",chunkMeta:d});else if(h){var E=h.flush(d);Object(_.isPromise)(E)?E.then(function(x){f.handleFlushResult(x,d)}):this.handleFlushResult(E,d)}},a.handleFlushResult=function(d,f){var h=this;d.forEach(function(u){h.handleTransmuxComplete(u)}),this.onFlush(f)},a.onWorkerMessage=function(d){var f=d.data,h=this.hls;switch(f.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(f.data);break}case"flush":{this.onFlush(f.data);break}default:{f.data=f.data||{},f.data.frag=this.frag,f.data.id=this.id,h.trigger(f.event,f.data);break}}},a.configureTransmuxer=function(d){var f=this.worker,h=this.transmuxer;f?f.postMessage({cmd:"configure",config:d}):h&&h.configure(d)},a.handleTransmuxComplete=function(d){d.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(d)},t}()},"./src/demux/transmuxer-worker.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return e});var y=T("./src/demux/transmuxer.ts"),g=T("./src/events.ts"),s=T("./src/utils/logger.ts"),_=T("./node_modules/eventemitter3/index.js"),p=T.n(_);function e(i){var t=new _.EventEmitter,a=function(d,f){i.postMessage({event:d,data:f})};t.on(g.Events.FRAG_DECRYPTED,a),t.on(g.Events.ERROR,a),i.addEventListener("message",function(c){var d=c.data;switch(d.cmd){case"init":{var f=JSON.parse(d.config);i.transmuxer=new y.default(t,d.typeSupported,f,d.vendor,d.id),Object(s.enableLogs)(f.debug),a("init",null);break}case"configure":{i.transmuxer.configure(d.config);break}case"demux":{var h=i.transmuxer.push(d.data,d.decryptdata,d.chunkMeta,d.state);Object(y.isPromise)(h)?h.then(function(x){o(i,x)}):o(i,h);break}case"flush":{var u=d.chunkMeta,E=i.transmuxer.flush(u);Object(y.isPromise)(E)?E.then(function(x){l(i,x,u)}):l(i,E,u);break}default:break}})}function o(i,t){if(r(t.remuxResult))return;var a=[],c=t.remuxResult,d=c.audio,f=c.video;d&&n(a,d),f&&n(a,f),i.postMessage({event:"transmuxComplete",data:t},a)}function n(i,t){t.data1&&i.push(t.data1.buffer),t.data2&&i.push(t.data2.buffer)}function l(i,t,a){t.forEach(function(c){o(i,c)}),i.postMessage({event:"flush",data:a})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"isPromise",function(){return E}),T.d(v,"TransmuxConfig",function(){return x}),T.d(v,"TransmuxState",function(){return O});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/crypt/decrypter.ts"),_=T("./src/demux/aacdemuxer.ts"),p=T("./src/demux/mp4demuxer.ts"),e=T("./src/demux/tsdemuxer.ts"),o=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),l=T("./src/remux/passthrough-remuxer.ts"),r=T("./src/demux/chunk-cache.ts"),i=T("./src/utils/mp4-tools.ts"),t=T("./src/utils/logger.ts"),a;try{a=self.performance.now.bind(self.performance)}catch(C){t.logger.debug("Unable to use Performance API on this environment"),a=self.Date.now}var c=[{demux:e.default,remux:n.default},{demux:p.default,remux:l.default},{demux:_.default,remux:n.default},{demux:o.default,remux:n.default}],d=1024;c.forEach(function(C){var w=C.demux;d=Math.max(d,w.minProbeByteLength)});var f=function(){function C(S,A,D,M,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new r.default,this.observer=S,this.typeSupported=A,this.config=D,this.vendor=M,this.id=N}var w=C.prototype;return w.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},w.push=function(A,D,M,N){var P=this,z=M.transmuxing;z.executeStart=a();var X=new Uint8Array(A),k=this.cache,F=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;N&&(this.currentTransmuxState=N);var B=h(X,D);if(B&&B.method==="AES-128"){var Z=this.getDecrypter();if(F.enableSoftwareAES){var re=Z.softwareDecrypt(X,B.key.buffer,B.iv.buffer);if(!re)return z.executeEnd=a(),u(M);X=new Uint8Array(re)}else return this.decryptionPromise=Z.webCryptoDecrypt(X,B.key.buffer,B.iv.buffer).then(function(q){var Q=P.push(q,null,M);return P.decryptionPromise=null,Q}),this.decryptionPromise}var he=N||U,Se=he.contiguous,ke=he.discontinuity,te=he.trackSwitch,Re=he.accurateTimeOffset,Ce=he.timeOffset,pe=L.audioCodec,me=L.videoCodec,se=L.defaultInitPts,be=L.duration,ae=L.initSegmentData;if((ke||te)&&this.resetInitSegment(ae,pe,me,be),ke&&this.resetInitialTimestamp(se),Se||this.resetContiguity(),this.needsProbing(X,ke,te)){if(k.dataLength){var fe=k.flush();X=Object(i.appendUint8Array)(fe,X)}this.configureTransmuxer(X,L)}var Fe=this.transmux(X,B,Ce,Re,M),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,z.executeEnd=a(),Fe},w.flush=function(A){var D=this,M=A.transmuxing;M.executeStart=a();var N=this.decrypter,P=this.cache,z=this.currentTransmuxState,X=this.decryptionPromise;if(X)return X.then(function(){return D.flush(A)});var k=[],F=z.timeOffset;if(N){var U=N.flush();U&&k.push(this.push(U,null,A))}var L=P.dataLength;P.reset();var B=this.demuxer,Z=this.remuxer;if(!B||!Z)return L>=d&&this.observer.emit(y.Events.ERROR,y.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=a(),[u(A)];var re=B.flush(F);return E(re)?re.then(function(he){return D.flushRemux(k,he,A),k}):(this.flushRemux(k,re,A),k)},w.flushRemux=function(A,D,M){var N=D.audioTrack,P=D.avcTrack,z=D.id3Track,X=D.textTrack,k=this.currentTransmuxState,F=k.accurateTimeOffset,U=k.timeOffset;t.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var L=this.remuxer.remux(N,P,z,X,U,F,!0,this.id);A.push({remuxResult:L,chunkMeta:M}),M.transmuxing.executeEnd=a()},w.resetInitialTimestamp=function(A){var D=this.demuxer,M=this.remuxer;if(!D||!M)return;D.resetTimeStamp(A),M.resetTimeStamp(A)},w.resetContiguity=function(){var A=this.demuxer,D=this.remuxer;if(!A||!D)return;A.resetContiguity(),D.resetNextTimestamp()},w.resetInitSegment=function(A,D,M,N){var P=this.demuxer,z=this.remuxer;if(!P||!z)return;P.resetInitSegment(D,M,N),z.resetInitSegment(A,D,M)},w.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},w.transmux=function(A,D,M,N,P){var z;return D&&D.method==="SAMPLE-AES"?z=this.transmuxSampleAes(A,D,M,N,P):z=this.transmuxUnencrypted(A,M,N,P),z},w.transmuxUnencrypted=function(A,D,M,N){var P=this.demuxer.demux(A,D,!1,!this.config.progressive),z=P.audioTrack,X=P.avcTrack,k=P.id3Track,F=P.textTrack,U=this.remuxer.remux(z,X,k,F,D,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},w.transmuxSampleAes=function(A,D,M,N,P){var z=this;return this.demuxer.demuxSampleAes(A,D,M).then(function(X){var k=z.remuxer.remux(X.audioTrack,X.avcTrack,X.id3Track,X.textTrack,M,N,!1,z.id);return{remuxResult:k,chunkMeta:P}})},w.configureTransmuxer=function(A,D){for(var M=this.config,N=this.observer,P=this.typeSupported,z=this.vendor,X=D.audioCodec,k=D.defaultInitPts,F=D.duration,U=D.initSegmentData,L=D.videoCodec,B,Z=0,re=c.length;Z0&&w!=null&&w.key!=null&&w.iv!==null&&w.method!=null&&(S=w),S}var u=function(w){return{remuxResult:{},chunkMeta:w}};function E(C){return"then"in C&&C.then instanceof Function}var x=function(w,S,A,D,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=w,this.videoCodec=S,this.initSegmentData=A,this.duration=D,this.defaultInitPts=M},O=function(w,S,A,D,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=w,this.contiguous=S,this.accurateTimeOffset=A,this.trackSwitch=D,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"discardEPB",function(){return u});var y=T("./src/demux/adts.ts"),g=T("./src/demux/mpegaudio.ts"),s=T("./src/demux/exp-golomb.ts"),_=T("./src/demux/id3.ts"),p=T("./src/demux/sample-aes.ts"),e=T("./src/events.ts"),o=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),l=T("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function E(O,C,w){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=O,this.config=C,this.typeSupported=w}E.probe=function(C){var w=E.syncOffset(C);return w<0?!1:(w&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+w+", junk ahead ?"),!0)},E.syncOffset=function(C){for(var w=Math.min(1e3,C.length-3*188),S=0;S>4,pe=void 0;if(Ce>1){if(pe=ke+5+C[ke+4],pe===ke+188)continue}else pe=ke+4;switch(Re){case z:te&&(X&&(D=d(X))&&this.parseAVCPES(D,!1),X={data:[],size:0}),X&&(X.data.push(C.subarray(pe,ke+188)),X.size+=ke+188-pe);break;case k:te&&(U&&(D=d(U))&&(N.isAAC?this.parseAACPES(D):this.parseMPEGPES(D)),U={data:[],size:0}),U&&(U.data.push(C.subarray(pe,ke+188)),U.size+=ke+188-pe);break;case F:te&&(L&&(D=d(L))&&this.parseID3PES(D),L={data:[],size:0}),L&&(L.data.push(C.subarray(pe,ke+188)),L.size+=ke+188-pe);break;case 0:te&&(pe+=C[pe]+1),re=this._pmtId=a(C,pe);break;case re:{te&&(pe+=C[pe]+1);var me=c(C,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,S);z=me.avc,z>0&&(M.pid=z),k=me.audio,k>0&&(N.pid=k,N.isAAC=me.isAAC),F=me.id3,F>0&&(P.pid=F),B&&!Z&&(n.logger.log("reparse from beginning"),B=!1,ke=Se-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:B=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=X,N.pesData=U,P.pesData=L;var se={audioTrack:N,avcTrack:M,id3Track:P,textTrack:this._txtTrack};return A&&this.extractRemainingSamples(se),se},x.flush=function(){var C=this.remainderData;this.remainderData=null;var w;return C?w=this.demux(C,-1,!1,!0):w={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(w),this.sampleAes?this.decrypt(w,this.sampleAes):w},x.extractRemainingSamples=function(C){var w=C.audioTrack,S=C.avcTrack,A=C.id3Track,D=S.pesData,M=w.pesData,N=A.pesData,P;D&&(P=d(D))?(this.parseAVCPES(P,!0),S.pesData=null):S.pesData=D,M&&(P=d(M))?(w.isAAC?this.parseAACPES(P):this.parseMPEGPES(P),w.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=M),N&&(P=d(N))?(this.parseID3PES(P),A.pesData=null):A.pesData=N},x.demuxSampleAes=function(C,w,S){var A=this.demux(C,S,!0,!this.config.progressive),D=this.sampleAes=new p.default(this.observer,this.config,w);return this.decrypt(A,D)},x.decrypt=function(C,w){return new Promise(function(S){var A=C.audioTrack,D=C.avcTrack;A.samples&&A.isAAC?w.decryptAacSamples(A.samples,0,function(){D.samples?w.decryptAvcSamples(D.samples,0,0,function(){S(C)}):S(C)}):D.samples&&w.decryptAvcSamples(D.samples,0,0,function(){S(C)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(C,w){var S=this,A=this._avcTrack,D=this.parseAVCNALu(C.data),M=!1,N=this.avcSample,P,z=!1;C.data=null,N&&D.length&&!A.audFound&&(f(N,A),N=this.avcSample=t(!1,C.pts,C.dts,"")),D.forEach(function(X){switch(X.type){case 1:{P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var k=X.data;if(z&&k.length>4){var F=new s.default(k).readSliceType();(F===2||F===4||F===7||F===9)&&(N.key=!0)}break}case 5:P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{P=!0,M&&N&&(N.debug+="SEI ");var U=new s.default(u(X.data));U.readUByte();for(var L=0,B=0,Z=!1,re=0;!Z&&U.bytesAvailable>1;){L=0;do re=U.readUByte(),L+=re;while(re===255);B=0;do re=U.readUByte(),B+=re;while(re===255);if(L===4&&U.bytesAvailable!==0){Z=!0;var he=U.readUByte();if(he===181){var Se=U.readUShort();if(Se===49){var ke=U.readUInt();if(ke===1195456820){var te=U.readUByte();if(te===3){for(var Re=U.readUByte(),Ce=U.readUByte(),pe=31&Re,me=[Re,Ce],se=0;se16){for(var be=[],ae=0;ae<16;ae++)be.push(U.readUByte().toString(16)),(ae===3||ae===5||ae===7||ae===9)&&be.push("-");for(var fe=B-16,Fe=new Uint8Array(fe),ie=0;ie=0){var U={data:C.subarray(k,N-A-1),type:F};M.push(U)}else{var L=this.getLastNalUnit();if(L&&(D&&N<=4-D&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-D))),z=N-A-1,z>0)){var B=new Uint8Array(L.data.byteLength+z);B.set(L.data,0),B.set(C.subarray(0,z),L.data.byteLength),L.data=B,L.state=0}}N=0&&A>=0){var Z={data:C.subarray(k,w),type:F,state:A};M.push(Z)}if(M.length===0){var re=this.getLastNalUnit();if(re){var he=new Uint8Array(re.data.byteLength+C.byteLength);he.set(re.data,0),he.set(C,re.data.byteLength),re.data=he}}return S.naluState=A,M},x.parseAACPES=function(C){var w=0,S=this._audioTrack,A=this.aacOverFlow,D=C.data;if(A){this.aacOverFlow=null;var M=A.sample.unit.byteLength,N=Math.min(A.missing,M),P=M-N;A.sample.unit.set(D.subarray(0,N),P),S.samples.push(A.sample),w=A.missing}var z,X;for(z=w,X=D.length;z1;){var M=new Uint8Array(D[0].length+D[1].length);M.set(D[0]),M.set(D[1],D[0].length),D[0]=M,D.splice(1,1)}O=D[0];var N=(O[0]<<16)+(O[1]<<8)+O[2];if(N===1){if(C=(O[4]<<8)+O[5],C&&C>E.size-6)return null;var P=O[7];P&192&&(S=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,P&64?(A=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[18]&254)/2,S-A>60*9e4&&(n.logger.warn(Math.round((S-A)/9e4)+"s delta between PTS and DTS, align them"),S=A)):A=S),w=O[8];var z=w+9;if(E.size<=z)return null;E.size-=z;for(var X=new Uint8Array(E.size),k=0,F=D.length;kU){z-=U;continue}else O=O.subarray(z),U-=z,z=0;X.set(O,x),x+=U}return C&&(C-=w+3),{data:X,pts:S,dts:A,len:C}}return null}function f(E,x){if(E.units.length&&E.frame){if(E.pts===void 0){var O=x.samples,C=O.length;if(C){var w=O[C-1];E.pts=w.pts,E.dts=w.dts}else{x.dropped++;return}}x.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function h(E,x){var O=E.length;if(O>0){if(x.pts>=E[O-1].pts)E.push(x);else for(var C=O-1;C>=0;C--)if(x.ptsS)return D;return 0}},{key:"maxAutoLevel",get:function(){var w=this.levels,S=this.autoLevelCapping,A;return S===-1&&w&&w.length?A=w.length-1:A=S,A}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(w){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,w)}},{key:"audioTracks",get:function(){var w=this.audioTrackController;return w?w.audioTracks:[]}},{key:"audioTrack",get:function(){var w=this.audioTrackController;return w?w.audioTrack:-1},set:function(w){var S=this.audioTrackController;S&&(S.audioTrack=w)}},{key:"subtitleTracks",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTrack:-1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleTrack=w)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var w=this.subtitleTrackController;return w?w.subtitleDisplay:!1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleDisplay=w)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(w){this.config.lowLatencyMode=w}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return d.Events}},{key:"ErrorTypes",get:function(){return f.ErrorTypes}},{key:"ErrorDetails",get:function(){return f.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:t.hlsDefaultConfig},set:function(w){x.defaultConfig=w}}]),x}();E.defaultConfig=void 0},"./src/is-supported.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isSupported",function(){return s}),T.d(v,"changeTypeSupported",function(){return _});var y=T("./src/utils/mediasource-helper.ts");function g(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var p=Object(y.getMediaSource)();if(!p)return!1;var e=g(),o=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!o&&!!n}function _(){var p,e=g();return typeof(e==null||((p=e.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i}),T.d(v,"LoadError",function(){return a});var y=T("./src/polyfills/number.ts"),g=T("./src/errors.ts");function s(c,d){c.prototype=Object.create(d.prototype),c.prototype.constructor=c,n(c,d)}function _(c){var d=typeof Map=="function"?new Map:void 0;return _=function(h){if(h===null||!o(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof d!="undefined"){if(d.has(h))return d.get(h);d.set(h,u)}function u(){return p(h,arguments,l(this).constructor)}return u.prototype=Object.create(h.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),n(u,h)},_(c)}function p(c,d,f){return e()?p=Reflect.construct:p=function(u,E,x){var O=[null];O.push.apply(O,E);var C=Function.bind.apply(u,O),w=new C;return x&&n(w,x.prototype),w},p.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function o(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function n(c,d){return n=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},n(c,d)}function l(c){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},l(c)}var r=Math.pow(2,17),i=function(){function c(f){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=f}var d=c.prototype;return d.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},d.abort=function(){this.loader&&this.loader.abort()},d.load=function(h,u){var E=this,x=h.url;if(!x)return Promise.reject(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){E.loader&&E.loader.destroy();var D=E.loader=h.loader=C?new C(O):new w(O),M=t(h),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};h.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){E.resetLoader(h,D),S({frag:h,part:null,payload:z.data,networkDetails:F})},onError:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:z,networkDetails:k}))},onAbort:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:k}))},onTimeout:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:k}))},onProgress:function(z,X,k,F){u&&u({frag:h,part:null,payload:k,networkDetails:F})}})})},d.loadPart=function(h,u,E){var x=this;this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){x.loader&&x.loader.destroy();var D=x.loader=h.loader=C?new C(O):new w(O),M=t(h,u),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};u.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){x.resetLoader(h,D),x.updateStatsFromPart(h,u);var U={frag:h,part:u,payload:z.data,networkDetails:F};E(U),S(U)},onError:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:u,response:z,networkDetails:k}))},onAbort:function(z,X,k){h.stats.aborted=u.stats.aborted,x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:u,networkDetails:k}))},onTimeout:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:u,networkDetails:k}))}})})},d.updateStatsFromPart=function(h,u){var E=h.stats,x=u.stats,O=x.total;if(E.loaded+=x.loaded,O){var C=Math.round(h.duration/u.duration),w=Math.min(Math.round(E.loaded/O),C),S=C-w,A=S*Math.round(E.loaded/w);E.total=E.loaded+A}else E.total=Math.max(E.loaded,E.total);var D=E.loading,M=x.loading;D.start?D.first+=M.first-M.start:(D.start=M.start,D.first=M.first),D.end=M.end},d.resetLoader=function(h,u){h.loader=null,this.loader===u&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),u.destroy()},c}();function t(c,d){d===void 0&&(d=null);var f=d||c,h={frag:c,part:d,responseType:"arraybuffer",url:f.url,headers:{},rangeStart:0,rangeEnd:0},u=f.byteRangeStartOffset,E=f.byteRangeEndOffset;return Object(y.isFiniteNumber)(u)&&Object(y.isFiniteNumber)(E)&&(h.rangeStart=u,h.rangeEnd=E),h}var a=function(c){s(d,c);function d(f){for(var h,u=arguments.length,E=new Array(u>1?u-1:0),x=1;x>8*(15-O)&255;return x},h.setDecryptDataFromLevelKey=function(E,x){var O=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(O=p.LevelKey.fromURI(E.uri),O.method=E.method,O.iv=this.createInitializationVector(x),O.keyFormat="identity"),O},h.setElementaryStreamInfo=function(E,x,O,C,w,S){S===void 0&&(S=!1);var A=this.elementaryStreams,D=A[E];if(!D){A[E]={startPTS:x,endPTS:O,startDTS:C,endDTS:w,partial:S};return}D.startPTS=Math.min(D.startPTS,x),D.endPTS=Math.max(D.endPTS,O),D.startDTS=Math.min(D.startDTS,C),D.endDTS=Math.max(D.endDTS,w)},h.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[i.AUDIO]=null,E[i.VIDEO]=null,E[i.AUDIOVIDEO]=null},r(f,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&_.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(y.isFiniteNumber)(this.programDateTime))return null;var E=Object(y.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),f}(t),c=function(d){o(f,d);function f(h,u,E,x,O){var C;C=d.call(this,E)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new e.LoadStats,C.duration=h.decimalFloatingPoint("DURATION"),C.gap=h.bool("GAP"),C.independent=h.bool("INDEPENDENT"),C.relurl=h.enumeratedString("URI"),C.fragment=u,C.index=x;var w=h.enumeratedString("BYTERANGE");return w&&C.setByteRange(w,O),O&&(C.fragOffset=O.fragOffset+O.duration),C}return r(f,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var u=this.elementaryStreams;return!!(u.audio||u.video||u.audiovideo)}}]),f}(t)},"./src/loader/key-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return _});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/utils/logger.ts"),_=function(){function p(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var e=p.prototype;return e._registerListeners=function(){this.hls.on(y.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(y.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy()}this.loaders={}},e.onKeyLoading=function(n,l){var r=l.frag,i=r.type,t=this.loaders[i];if(!r.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var a=r.decryptdata.uri;if(a!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(t&&(s.logger.warn("abort previous key loader for type:"+i),t.abort()),!a){s.logger.warn("key uri is falsy");return}var d=c.loader,f=r.loader=this.loaders[i]=new d(c);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:r,responseType:"arraybuffer"},u={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};f.load(h,u,E)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(y.Events.KEY_LOADED,{frag:r}))},e.loadsuccess=function(n,l,r){var i=r.frag;if(!i.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(n.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(y.Events.KEY_LOADED,{frag:i})},e.loaderror=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:n})},e.loadtimeout=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},p}()},"./src/loader/level-details.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelDetails",function(){return p});var y=T("./src/polyfills/number.ts");function g(e,o){for(var n=0;nl.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},s(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(y.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||_}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelKey",function(){return p});var y=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(y);function s(e,o){for(var n=0;n2){var A=S.shift()+".";return A+=parseInt(S.shift()).toString(16),A+=("000"+parseInt(S.shift()).toString(16)).substr(-4),A}return w},O.resolve=function(w,S){return g.buildAbsoluteURL(S,w,{alwaysNormalize:!0})},O.parseMasterPlaylist=function(w,S){var A=[],D={},M=!1;r.lastIndex=0;for(var N;(N=r.exec(w))!=null;)if(N[1]){var P=new o.AttrList(N[1]),z={attrs:P,bitrate:P.decimalInteger("AVERAGE-BANDWIDTH")||P.decimalInteger("BANDWIDTH"),name:P.NAME,url:O.resolve(N[2],S)},X=P.decimalResolution("RESOLUTION");X&&(z.width=X.width,z.height=X.height),h((P.CODECS||"").split(/[ ,]+/).filter(function(F){return F}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=O.convertAVC1ToAVCOTI(z.videoCodec)),A.push(z)}else if(N[3]){var k=new o.AttrList(N[3]);k["DATA-ID"]&&(M=!0,D[k["DATA-ID"]]=k)}return{levels:A,sessionData:M?D:null}},O.parseMasterPlaylistMedia=function(w,S,A,D){D===void 0&&(D=[]);var M,N=[],P=0;for(i.lastIndex=0;(M=i.exec(w))!==null;){var z=new o.AttrList(M[1]);if(z.TYPE===A){var X={attrs:z,bitrate:0,id:P++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:A,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?O.resolve(z.URI,S):""};if(D.length){var k=O.findGroup(D,X.groupId)||D[0];u(X,k,"audioCodec"),u(X,k,"textCodec")}N.push(X)}}return N},O.parseLevelPlaylist=function(w,S,A,D,M){var N=new p.LevelDetails(S),P=N.fragments,z=null,X=0,k=0,F=0,U=0,L=null,B=new _.Fragment(D,S),Z,re,he,Se=-1,ke=!1;for(t.lastIndex=0,N.m3u8=w;(Z=t.exec(w))!==null;){ke&&(ke=!1,B=new _.Fragment(D,S),B.start=F,B.sn=X,B.cc=U,B.level=A,z&&(B.initSegment=z,B.rawProgramDateTime=z.rawProgramDateTime));var te=Z[1];if(te){B.duration=parseFloat(te);var Re=(" "+Z[2]).slice(1);B.title=Re||null,B.tagList.push(Re?["INF",te,Re]:["INF",te])}else if(Z[3])Object(y.isFiniteNumber)(B.duration)&&(B.start=F,he&&(B.levelkey=he),B.sn=X,B.level=A,B.cc=U,B.urlId=M,P.push(B),B.relurl=(" "+Z[3]).slice(1),x(B,L),L=B,F+=B.duration,X++,k=0,ke=!0);else if(Z[4]){var Ce=(" "+Z[4]).slice(1);L?B.setByteRange(Ce,L):B.setByteRange(Ce)}else if(Z[5])B.rawProgramDateTime=(" "+Z[5]).slice(1),B.tagList.push(["PROGRAM-DATE-TIME",B.rawProgramDateTime]),Se===-1&&(Se=P.length);else{if(Z=Z[0].match(a),!Z){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re-1){n.logger.warn("Keyformat "+Le+" is not supported from the manifest");continue}else if(Le!=="identity")continue;Q&&(he=e.LevelKey.fromURL(S,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Q)>=0&&(he.method=Q,he.keyFormat=Le,Ee&&(he.keyID=Ee),le&&(he.keyFormatVersions=le),he.iv=oe));break}case"START":{var De=new o.AttrList(me),_e=De.decimalFloatingPoint("TIME-OFFSET");Object(y.isFiniteNumber)(_e)&&(N.startTimeOffset=_e);break}case"MAP":{var Xe=new o.AttrList(me);B.relurl=Xe.URI,Xe.BYTERANGE&&B.setByteRange(Xe.BYTERANGE),B.level=A,B.sn="initSegment",he&&(B.levelkey=he),B.initSegment=null,z=B,ke=!0;break}case"SERVER-CONTROL":{var tt=new o.AttrList(me);N.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ge=new o.AttrList(me);N.partTarget=Ge.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=N.partList;Me||(Me=N.partList=[]);var Et=k>0?Me[Me.length-1]:void 0,Oe=k++,Ve=new _.Part(new o.AttrList(me),B,S,Oe,Et);Me.push(Ve),B.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Je=new o.AttrList(me);N.preloadHint=Je;break}case"RENDITION-REPORT":{var Ye=new o.AttrList(me);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Ye);break}default:n.logger.warn("line parsed but not handled: "+Z);break}}}L&&!L.relurl?(P.pop(),F-=L.duration,N.partList&&(N.fragmentHint=L)):N.partList&&(x(B,L),B.cc=U,N.fragmentHint=B);var Ne=P.length,He=P[0],ve=P[Ne-1];if(F+=N.skippedSegments*N.targetduration,F>0&&Ne&&ve){N.averagetargetduration=F/Ne;var xe=ve.sn;N.endSN=xe!=="initSegment"?xe:0,He&&(N.startCC=He.cc,He.initSegment||N.fragments.every(function(de){return de.relurl&&d(de.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),B=new _.Fragment(D,S),B.relurl=ve.relurl,B.level=A,B.sn="initSegment",He.initSegment=B,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(F+=N.fragmentHint.duration),N.totalduration=F,N.endCC=U,Se>0&&E(P,Se),N},O}();function h(O,C){["video","audio","text"].forEach(function(w){var S=O.filter(function(D){return Object(l.isCodecType)(D,w)});if(S.length){var A=S.filter(function(D){return D.lastIndexOf("avc1",0)===0||D.lastIndexOf("mp4a",0)===0});C[w+"Codec"]=A.length>0?A[0]:S[0],O=O.filter(function(D){return S.indexOf(D)===-1})}}),C.unknownCodecs=O}function u(O,C,w){var S=C[w];S&&(O[w]=S)}function E(O,C){for(var w=O[C],S=C;S--;){var A=O[S];if(!A)return;A.programDateTime=w.programDateTime-A.duration*1e3,w=A}}function x(O,C){O.rawProgramDateTime?O.programDateTime=Date.parse(O.rawProgramDateTime):C!=null&&C.programDateTime&&(O.programDateTime=C.endProgramDateTime),Object(y.isFiniteNumber)(O.programDateTime)||(O.programDateTime=null,O.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/events.ts"),s=T("./src/errors.ts"),_=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),e=T("./src/loader/m3u8-parser.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function l(t){var a=t.type;switch(a){case o.PlaylistContextType.AUDIO_TRACK:return o.PlaylistLevelType.AUDIO;case o.PlaylistContextType.SUBTITLE_TRACK:return o.PlaylistLevelType.SUBTITLE;default:return o.PlaylistLevelType.MAIN}}function r(t,a){var c=t.url;return(c===void 0||c.indexOf("data:")===0)&&(c=a.url),c}var i=function(){function t(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var a=t.prototype;return a.registerListeners=function(){var d=this.hls;d.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.on(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.unregisterListeners=function(){var d=this.hls;d.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.off(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.createInternalLoader=function(d){var f=this.hls.config,h=f.pLoader,u=f.loader,E=h||u,x=new E(f);return d.loader=x,this.loaders[d.type]=x,x},a.getInternalLoader=function(d){return this.loaders[d.type]},a.resetInternalLoader=function(d){this.loaders[d]&&delete this.loaders[d]},a.destroyInternalLoaders=function(){for(var d in this.loaders){var f=this.loaders[d];f&&f.destroy(),this.resetInternalLoader(d)}},a.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},a.onManifestLoading=function(d,f){var h=f.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:o.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},a.onLevelLoading=function(d,f){var h=f.id,u=f.level,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:null,level:u,responseType:"text",type:o.PlaylistContextType.LEVEL,url:E,deliveryDirectives:x})},a.onAudioTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:x})},a.onSubtitleTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:x})},a.load=function(d){var f,h=this.hls.config,u=this.getInternalLoader(d);if(u){var E=u.context;if(E&&E.url===d.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+d.type),u.abort()}var x,O,C,w;switch(d.type){case o.PlaylistContextType.MANIFEST:x=h.manifestLoadingMaxRetry,O=h.manifestLoadingTimeOut,C=h.manifestLoadingRetryDelay,w=h.manifestLoadingMaxRetryTimeout;break;case o.PlaylistContextType.LEVEL:case o.PlaylistContextType.AUDIO_TRACK:case o.PlaylistContextType.SUBTITLE_TRACK:x=0,O=h.levelLoadingTimeOut;break;default:x=h.levelLoadingMaxRetry,O=h.levelLoadingTimeOut,C=h.levelLoadingRetryDelay,w=h.levelLoadingMaxRetryTimeout;break}if(u=this.createInternalLoader(d),(f=d.deliveryDirectives)!==null&&f!==void 0&&f.part){var S;if(d.type===o.PlaylistContextType.LEVEL&&d.level!==null?S=this.hls.levels[d.level].details:d.type===o.PlaylistContextType.AUDIO_TRACK&&d.id!==null?S=this.hls.audioTracks[d.id].details:d.type===o.PlaylistContextType.SUBTITLE_TRACK&&d.id!==null&&(S=this.hls.subtitleTracks[d.id].details),S){var A=S.partTarget,D=S.targetduration;A&&D&&(O=Math.min(Math.max(A*3,D*.8)*1e3,O))}}var M={timeout:O,maxRetry:x,retryDelay:C,maxRetryDelay:w,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,M,N)},a.loadsuccess=function(d,f,h,u){if(u===void 0&&(u=null),h.isSidxRequest){this.handleSidxRequest(d,h),this.handlePlaylistLoaded(d,f,h,u);return}this.resetInternalLoader(h.type);var E=d.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(d,h,"no EXTM3U delimiter",u);return}f.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(d,f,h,u):this.handleMasterPlaylist(d,f,h,u)},a.loaderror=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!1,d)},a.loadtimeout=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!0)},a.handleMasterPlaylist=function(d,f,h,u){var E=this.hls,x=d.data,O=r(d,h),C=e.default.parseMasterPlaylist(x,O),w=C.levels,S=C.sessionData;if(!w.length){this.handleManifestParsingError(d,h,"no level found in manifest",u);return}var A=w.map(function(X){return{id:X.attrs.AUDIO,audioCodec:X.audioCodec}}),D=w.map(function(X){return{id:X.attrs.SUBTITLES,textCodec:X.textCodec}}),M=e.default.parseMasterPlaylistMedia(x,O,"AUDIO",A),N=e.default.parseMasterPlaylistMedia(x,O,"SUBTITLES",D),P=e.default.parseMasterPlaylistMedia(x,O,"CLOSED-CAPTIONS");if(M.length){var z=M.some(function(X){return!X.url});!z&&w[0].audioCodec&&!w[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(g.Events.MANIFEST_LOADED,{levels:w,audioTracks:M,subtitles:N,captions:P,url:O,stats:f,networkDetails:u,sessionData:S})},a.handleTrackOrLevelPlaylist=function(d,f,h,u){var E=this.hls,x=h.id,O=h.level,C=h.type,w=r(d,h),S=Object(y.isFiniteNumber)(x)?x:0,A=Object(y.isFiniteNumber)(O)?O:S,D=l(h),M=e.default.parseLevelPlaylist(d.data,w,A,D,S);if(!M.fragments.length){E.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:w,reason:"no fragments found in level",level:typeof h.level=="number"?h.level:void 0});return}if(C===o.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:w};E.trigger(g.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:w,stats:f,networkDetails:u,sessionData:null})}if(f.parsing.end=performance.now(),M.needSidxRanges){var P,z=(P=M.fragments[0].initSegment)===null||P===void 0?void 0:P.url;this.load({url:z,isSidxRequest:!0,type:C,level:O,levelDetails:M,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}h.levelDetails=M,this.handlePlaylistLoaded(d,f,h,u)},a.handleSidxRequest=function(d,f){var h=Object(p.parseSegmentIndex)(new Uint8Array(d.data));if(!h)return;var u=h.references,E=f.levelDetails;u.forEach(function(x,O){var C=x.info,w=E.fragments[O];w.byteRange.length===0&&w.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),w.initSegment&&w.initSegment.setByteRange(String(h.moovEndOffset)+"@0")})},a.handleManifestParsingError=function(d,f,h,u){this.hls.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:f.type===o.PlaylistContextType.MANIFEST,url:d.url,reason:h,response:d,context:f,networkDetails:u})},a.handleNetworkError=function(d,f,h,u){h===void 0&&(h=!1),_.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+d.type+" level: "+d.level+" id: "+d.id+' group-id: "'+d.groupId+'"');var E=s.ErrorDetails.UNKNOWN,x=!1,O=this.getInternalLoader(d);switch(d.type){case o.PlaylistContextType.MANIFEST:E=h?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case o.PlaylistContextType.LEVEL:E=h?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.AUDIO_TRACK:E=h?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.SUBTITLE_TRACK:E=h?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}O&&this.resetInternalLoader(d.type);var C={type:s.ErrorTypes.NETWORK_ERROR,details:E,fatal:x,url:d.url,loader:O,context:d,networkDetails:f};u&&(C.response=u),this.hls.trigger(g.Events.ERROR,C)},a.handlePlaylistLoaded=function(d,f,h,u){var E=h.type,x=h.level,O=h.id,C=h.groupId,w=h.loader,S=h.levelDetails,A=h.deliveryDirectives;if(!(S!=null&&S.targetduration)){this.handleManifestParsingError(d,h,"invalid target duration",u);return}if(!w)return;S.live&&(w.getCacheAge&&(S.ageHeader=w.getCacheAge()||0),(!w.getCacheAge||isNaN(S.ageHeader))&&(S.ageHeader=0));switch(E){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(g.Events.LEVEL_LOADED,{details:S,level:x||0,id:O||0,stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(g.Events.AUDIO_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(g.Events.SUBTITLE_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break}},t}();v.default=i},"./src/polyfills/number.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isFiniteNumber",function(){return y}),T.d(v,"MAX_SAFE_INTEGER",function(){return g});var y=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},g=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(I,v,T){"use strict";T.r(v);var y=function(){function g(){}return g.getSilentFrame=function(_,p){switch(_){case"mp4a.40.2":if(p===1)return new Uint8Array([0,200,0,128,35,128]);if(p===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(p===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(p===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(p===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(p===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(p===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},g}();v.default=y},"./src/remux/mp4-generator.ts":function(I,v,T){"use strict";T.r(v);var y=Math.pow(2,32)-1,g=function(){function s(){}return s.init=function(){s.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var p;for(p in s.types)s.types.hasOwnProperty(p)&&(s.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),o=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);s.HDLR_TYPES={video:e,audio:o};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=l,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),t=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,r,t,r,i),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,n))},s.box=function(p){for(var e=8,o=arguments.length,n=new Array(o>1?o-1:0),l=1;l>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t.set(p,4),r=0,e=8;r>24&255,p>>16&255,p>>8&255,p&255,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},s.mdia=function(p){return s.box(s.types.mdia,s.mdhd(p.timescale,p.duration),s.hdlr(p.type),s.minf(p))},s.mfhd=function(p){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},s.minf=function(p){return p.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(p)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(p))},s.moof=function(p,e,o){return s.box(s.types.moof,s.mfhd(p),s.traf(o,e))},s.moov=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trak(p[e]);return s.box.apply(null,[s.types.moov,s.mvhd(p[0].timescale,p[0].duration)].concat(o).concat(s.mvex(p)))},s.mvex=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trex(p[e]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(p,e){e*=p;var o=Math.floor(e/(y+1)),n=Math.floor(e%(y+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return s.box(s.types.mvhd,l)},s.sdtp=function(p){var e=p.samples||[],o=new Uint8Array(4+e.length),n,l;for(n=0;n>>8&255),e.push(r&255),e=e.concat(Array.prototype.slice.call(l));for(n=0;n>>8&255),o.push(r&255),o=o.concat(Array.prototype.slice.call(l));var i=s.box(s.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|p.sps.length].concat(e).concat([p.pps.length]).concat(o))),t=p.width,a=p.height,c=p.pixelRatio[0],d=p.pixelRatio[1];return s.box(s.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t>>8&255,t&255,a>>8&255,a&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))},s.esds=function(p){var e=p.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(p.config).concat([6,1,2]))},s.mp4a=function(p){var e=p.samplerate;return s.box(s.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),s.box(s.types.esds,s.esds(p)))},s.mp3=function(p){var e=p.samplerate;return s.box(s.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},s.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(p)):s.box(s.types.stsd,s.STSD,s.mp4a(p)):s.box(s.types.stsd,s.STSD,s.avc1(p))},s.tkhd=function(p){var e=p.id,o=p.duration*p.timescale,n=p.width,l=p.height,r=Math.floor(o/(y+1)),i=Math.floor(o%(y+1));return s.box(s.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,l>>8&255,l&255,0,0]))},s.traf=function(p,e){var o=s.sdtp(p),n=p.id,l=Math.floor(e/(y+1)),r=Math.floor(e%(y+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),s.trun(p,o.length+16+20+8+16+8+8),o)},s.trak=function(p){return p.duration=p.duration||4294967295,s.box(s.types.trak,s.tkhd(p),s.mdia(p))},s.trex=function(p){var e=p.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(p,e){var o=p.samples||[],n=o.length,l=12+16*n,r=new Uint8Array(l),i,t,a,c,d,f;for(e+=8+l,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),i=0;i>>24&255,a>>>16&255,a>>>8&255,a&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&240<<8,d.degradPrio&15,f>>>24&255,f>>>16&255,f>>>8&255,f&255],12+16*i);return s.box(s.types.trun,r)},s.initSegment=function(p){s.types||s.init();var e=s.moov(p),o=new Uint8Array(s.FTYP.byteLength+e.byteLength);return o.set(s.FTYP),o.set(e,s.FTYP.byteLength),o},s}();g.types=void 0,g.HDLR_TYPES=void 0,g.STTS=void 0,g.STSC=void 0,g.STCO=void 0,g.STSZ=void 0,g.VMHD=void 0,g.SMHD=void 0,g.STSD=void 0,g.FTYP=void 0,g.DINF=void 0,v.default=g},"./src/remux/mp4-remuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"normalizePts",function(){return h});var y=T("./src/polyfills/number.ts"),g=T("./src/remux/aac-helper.ts"),s=T("./src/remux/mp4-generator.ts"),_=T("./src/events.ts"),p=T("./src/errors.ts"),e=T("./src/utils/logger.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(O){for(var C=1;C0?M:N.pts},S[0].pts);return A&&e.logger.debug("PTS rollover detected"),D},C.remux=function(S,A,D,M,N,P,z,X){var k,F,U,L,B,Z,re=N,he=N,Se=S.pid>-1,ke=A.pid>-1,te=A.samples.length,Re=S.samples.length>0,Ce=te>1,pe=(!Se||Re)&&(!ke||Ce)||this.ISGenerated||z;if(pe){this.ISGenerated||(U=this.generateIS(S,A,N));var me=this.isVideoContiguous,se=-1;if(Ce&&(se=u(A.samples),!me&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,se>0){e.logger.warn("[mp4-remuxer]: Dropped "+se+" out of "+te+" video samples due to a missing keyframe");var be=this.getVideoStartPts(A.samples);A.samples=A.samples.slice(se),A.dropped+=se,he+=(A.samples[0].pts-be)/(A.timescale||9e4)}else se===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+te+" video samples"),Z=!1);if(this.ISGenerated){if(Re&&Ce){var ae=this.getVideoStartPts(A.samples),fe=h(S.samples[0].pts,ae)-ae,Fe=fe/A.inputTimeScale;re+=Math.max(0,Fe),he+=Math.max(0,-Fe)}if(Re){if(S.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(S,A,N)),F=this.remuxAudio(S,re,this.isAudioContiguous,P,ke||Ce||X===o.PlaylistLevelType.AUDIO?he:void 0),Ce){var ie=F?F.endPTS-F.startPTS:0;A.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(S,A,N)),k=this.remuxVideo(A,he,me,ie)}}else Ce&&(k=this.remuxVideo(A,he,me,0));k&&(k.firstKeyFrame=se,k.independent=se!==-1)}}return this.ISGenerated&&(D.samples.length&&(B=this.remuxID3(D,N)),M.samples.length&&(L=this.remuxText(M,N))),{audio:F,video:k,initSegment:U,independent:Z,text:L,id3:B}},C.generateIS=function(S,A,D){var M=S.samples,N=A.samples,P=this.typeSupported,z={},X=!Object(y.isFiniteNumber)(this._initPTS),k="audio/mp4",F,U,L;if(X&&(F=U=Infinity),S.config&&M.length&&(S.timescale=S.samplerate,S.isAAC||(P.mpeg?(k="audio/mpeg",S.codec=""):P.mp3&&(S.codec="mp3")),z.audio={id:"audio",container:k,codec:S.codec,initSegment:!S.isAAC&&P.mpeg?new Uint8Array(0):s.default.initSegment([S]),metadata:{channelCount:S.channelCount}},X&&(L=S.inputTimeScale,F=U=M[0].pts-Math.round(L*D))),A.sps&&A.pps&&N.length&&(A.timescale=A.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:A.codec,initSegment:s.default.initSegment([A]),metadata:{width:A.width,height:A.height}},X)){L=A.inputTimeScale;var B=this.getVideoStartPts(N),Z=Math.round(L*D);U=Math.min(U,h(N[0].dts,B)-Z),F=Math.min(F,B-Z)}if(Object.keys(z).length)return this.ISGenerated=!0,X&&(this._initPTS=F,this._initDTS=U),{tracks:z,initPTS:F,timescale:L}},C.remuxVideo=function(S,A,D,M){var N=S.inputTimeScale,P=S.samples,z=[],X=P.length,k=this._initPTS,F=this.nextAvcDts,U=8,L,B,Z,re=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,Se=0,ke=!1;if(!D||F===null){var te=A*N,Re=P[0].pts-h(P[0].dts,P[0].pts);F=te-Re}for(var Ce=0;Cepe.pts){var me=9e4*.2;Se=Math.max(Math.min(Se,pe.pts-pe.dts),-1*me)}pe.dts0?Ce-1:Ce].dts&&(ke=!0)}ke&&P.sort(function(rt,St){var pt=rt.dts-St.dts,st=rt.pts-St.pts;return pt||st}),B=P[0].dts,Z=P[P.length-1].dts;var se=Math.round((Z-B)/(X-1));if(Se<0){if(Sese,q=Fe<-1;if(ie||q){ie?e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),B=F;var Q=P[0].pts-Fe;P[0].dts=B,P[0].pts=Q,e.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(Q,!0)+"/"+Object(n.toMsFromMpegTsClock)(B,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms")}}d&&(B=Math.max(0,B));for(var Y=0,oe=0,le=0;le0?Me-1:Me].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var je=Math.floor(xe.maxBufferHole*N),Qe=(M?re+M*N:this.nextAudioPts)-Et.pts;Qe>je?(L=Qe-de,L<0&&(L=de),e.logger.log("[mp4-remuxer]: It is approximately "+Qe/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=de}else L=de}var ne=Math.round(Et.pts-Et.dts);z.push(new E(Et.key,L,Ve,ne))}if(z.length&&a&&a<70){var Ze=z[0].flags;Ze.dependsOn=2,Ze.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=F=Z+L,this.isVideoContiguous=!0;var lt=s.default.moof(S.sequenceNumber++,B,l({},S,{samples:z})),Be="video",$e={data1:lt,data2:tt,startPTS:re/N,endPTS:(he+L)/N,startDTS:B/N,endDTS:F/N,type:Be,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:S.dropped};return S.samples=[],S.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),$e},C.remuxAudio=function(S,A,D,M,N){var P=S.inputTimeScale,z=S.samplerate?S.samplerate:P,X=P/z,k=S.isAAC?i:t,F=k*X,U=this._initPTS,L=!S.isAAC&&this.typeSupported.mpeg,B=[],Z=S.samples,re=L?0:8,he=this.nextAudioPts||-1,Se=A*P;if(this.isAudioContiguous=D=D||Z.length&&he>0&&(M&&Math.abs(Se-he)<9e3||Math.abs(h(Z[0].pts-U,Se)-he)<20*F),Z.forEach(function(He){He.pts=h(He.pts-U,Se)}),!D||he<0){if(Z=Z.filter(function(He){return He.pts>=0}),!Z.length)return;N===0?he=0:M?he=Math.max(0,Se):he=Z[0].pts}if(S.isAAC)for(var ke=N!==void 0,te=this.config.maxAudioFramesDrift,Re=0,Ce=he;Re=te*F&&be0){oe+=re;try{Y=new Uint8Array(oe)}catch(He){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:oe,reason:"fail allocating audio mdat "+oe});return}if(!L){var tt=new DataView(Y.buffer);tt.setUint32(0,oe),Y.set(s.default.types.mdat,4)}}else return;Y.set(De,re);var Ge=De.byteLength;re+=Ge,B.push(new E(!0,k,Ge,0)),Q=_e}var Me=B.length;if(!Me)return;var Et=B[B.length-1];this.nextAudioPts=he=Q+X*Et.duration;var Oe=L?new Uint8Array(0):s.default.moof(S.sequenceNumber++,q/X,l({},S,{samples:B}));S.samples=[];var Ve=q/P,Je=he/P,Ye="audio",Ne={data1:Oe,data2:Y,startPTS:Ve,endPTS:Je,startDTS:Ve,endDTS:Je,type:Ye,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),Ne},C.remuxEmptyAudio=function(S,A,D,M){var N=S.inputTimeScale,P=S.samplerate?S.samplerate:N,z=N/P,X=this.nextAudioPts,k=(X!==null?X:M.startDTS*N)+this._initDTS,F=M.endDTS*N+this._initDTS,U=z*i,L=Math.ceil((F-k)/U),B=g.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!B){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],re=0;re4294967296;)O+=w;return O}function u(O){for(var C=0;C0?this.lastEndDTS=S:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var A=!!O.audio,D=!!O.video,M="";A&&(M+="audio"),D&&(M+="video");var N={data1:E,startPTS:w,startDTS:w,endPTS:S,endDTS:S,type:M,hasAudio:A,hasVideo:D,nb:1,dropped:0};return u.audio=N.type==="audio"?N:void 0,u.video=N.type!=="audio"?N:void 0,u.text=c,u.id3=a,u.initSegment=x,u},n}(),e=function(l,r,i){return Object(g.getStartDTS)(l,r)-i};function o(n,l){var r=n==null?void 0:n.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=p},"./src/task-loop.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=g.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},g}()},"./src/types/cmcd.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"CMCDVersion",function(){return y}),T.d(v,"CMCDObjectType",function(){return g}),T.d(v,"CMCDStreamingFormat",function(){return s}),T.d(v,"CMCDStreamType",function(){return _});var y=1,g;(function(p){p.MANIFEST="m",p.AUDIO="a",p.VIDEO="v",p.MUXED="av",p.INIT="i",p.CAPTION="c",p.TIMED_TEXT="tt",p.KEY="k",p.OTHER="o"})(g||(g={}));var s;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(s||(s={}));var _;(function(p){p.VOD="v",p.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"HlsSkip",function(){return s}),T.d(v,"getSkipValue",function(){return _}),T.d(v,"HlsUrlParameters",function(){return p}),T.d(v,"Level",function(){return e});function y(o,n){for(var l=0;lNumber.MAX_SAFE_INTEGER?Infinity:n},p.hexadecimalInteger=function(o){if(this[o]){var n=(this[o]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var l=new Uint8Array(n.length/2),r=0;rNumber.MAX_SAFE_INTEGER?Infinity:n},p.decimalFloatingPoint=function(o){return parseFloat(this[o])},p.optionalFloat=function(o,n){var l=this[o];return l?parseFloat(l):n},p.enumeratedString=function(o){return this[o]},p.bool=function(o){return this[o]==="YES"},p.decimalResolution=function(o){var n=y.exec(this[o]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},_.parseAttrList=function(o){var n,l={},r='"';for(g.lastIndex=0;(n=g.exec(o))!==null;){var i=n[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[n[1]]=i}return l},_}()},"./src/utils/binary-search.ts":function(I,v,T){"use strict";T.r(v);var y={search:function(s,_){for(var p=0,e=s.length-1,o=null,n=null;p<=e;){o=(p+e)/2|0,n=s[o];var l=_(n);if(l>0)p=o+1;else if(l<0)e=o-1;else return n}return null}};v.default=y},"./src/utils/buffer-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"BufferHelper",function(){return s});var y=T("./src/utils/logger.ts"),g={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function _(){}return _.isBuffered=function(e,o){try{if(e){for(var n=_.getBuffered(e),l=0;l=n.start(l)&&o<=n.end(l))return!0}}catch(r){}return!1},_.bufferInfo=function(e,o,n){try{if(e){var l=_.getBuffered(e),r=[],i;for(i=0;it&&(l[i-1].end=e[r].end):l.push(e[r])}else l.push(e[r])}else l=e;for(var a=0,c,d=o,f=o,h=0;h=u&&o=D&&y.logger.log(this.time+" ["+D+"] "+M)},w}(),a=function(S){for(var A=[],D=0;Dp&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=p)},S.moveCursor=function(D){var M=this.pos+D;if(D>1)for(var N=this.pos+1;N=144&&this.backSpace();var M=s(D);if(this.pos>=p){this.logger.log(i.ERROR,"Cannot insert "+D.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},S.clearFromPos=function(D){var M;for(M=D;M0&&(D?N="["+M.join(" | ")+"]":N=M.join(` `)),N},S.getTextAndFormat=function(){return this.rows},w}(),u=function(){function w(A,D,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=A,this.outputFilter=D,this.mode=null,this.verbose=0,this.displayedMemory=new h(M),this.nonDisplayedMemory=new h(M),this.lastOutputScreen=new h(M),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var S=w.prototype;return S.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},S.getHandler=function(){return this.outputFilter},S.setHandler=function(D){this.outputFilter=D},S.setPAC=function(D){this.writeScreen.setPAC(D)},S.setBkgData=function(D){this.writeScreen.setBkgData(D)},S.setMode=function(D){if(D===this.mode)return;this.mode=D,this.logger.log(i.INFO,"MODE="+D),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=D},S.insertChars=function(D){for(var M=0;M=46,M.italics)M.foreground="white";else{var N=Math.floor(D/2)-16,P=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=P[N]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},S.outputDataUpdate=function(D){D===void 0&&(D=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),D&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},S.cueSplitAtTime=function(D){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,D,this.displayedMemory),this.cueStartTime=D))},w}(),E=function(){function w(A,D,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new t;this.channels=[null,new u(A,D,N),new u(A+1,M,N)],this.cmdHistory=C(),this.logger=N}var S=w.prototype;return S.getHandler=function(D){return this.channels[D].getHandler()},S.setHandler=function(D,M){this.channels[D].setHandler(M)},S.addData=function(D,M){var N,P,z,X=!1;this.logger.time=D;for(var k=0;k ("+a([P,z])+")"),N=this.parseCmd(P,z),N||(N=this.parseMidrow(P,z)),N||(N=this.parsePAC(P,z)),N||(N=this.parseBackgroundAttributes(P,z)),!N&&(X=this.parseChars(P,z),X)){var F=this.currentChannel;if(F&&F>0){var U=this.channels[F];U.insertChars(X)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!X&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+a([P,z])+" orig: "+a([M[k],M[k+1]]))}},S.parseCmd=function(D,M){var N=this.cmdHistory,P=(D===20||D===28||D===21||D===29)&&M>=32&&M<=47,z=(D===23||D===31)&&M>=33&&M<=35;if(!(P||z))return!1;if(O(D,M,N))return x(null,null,N),this.logger.log(i.DEBUG,"Repeated command ("+a([D,M])+") is dropped"),!0;var X=D===20||D===21||D===23?1:2,k=this.channels[X];return D===20||D===21||D===28||D===29?M===32?k.ccRCL():M===33?k.ccBS():M===34?k.ccAOF():M===35?k.ccAON():M===36?k.ccDER():M===37?k.ccRU(2):M===38?k.ccRU(3):M===39?k.ccRU(4):M===40?k.ccFON():M===41?k.ccRDC():M===42?k.ccTR():M===43?k.ccRTD():M===44?k.ccEDM():M===45?k.ccCR():M===46?k.ccENM():M===47&&k.ccEOC():k.ccTO(M-32),x(D,M,N),this.currentChannel=X,!0},S.parseMidrow=function(D,M){var N=0;if((D===17||D===25)&&M>=32&&M<=47){if(D===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var P=this.channels[N];return P?(P.ccMIDROW(M),this.logger.log(i.DEBUG,"MIDROW ("+a([D,M])+")"),!0):!1}return!1},S.parsePAC=function(D,M){var N,P=this.cmdHistory,z=(D>=17&&D<=23||D>=25&&D<=31)&&M>=64&&M<=127,X=(D===16||D===24)&&M>=64&&M<=95;if(!(z||X))return!1;if(O(D,M,P))return x(null,null,P),!0;var k=D<=23?1:2;M>=64&&M<=95?N=k===1?e[D]:n[D]:N=k===1?o[D]:l[D];var F=this.channels[k];return F?(F.setPAC(this.interpretPAC(N,M)),x(D,M,P),this.currentChannel=k,!0):!1},S.interpretPAC=function(D,M){var N,P={color:null,italics:!1,indent:null,underline:!1,row:D};return M>95?N=M-96:N=M-64,P.underline=(N&1)===1,N<=13?P.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(P.italics=!0,P.color="white"):P.indent=Math.floor((N-16)/2)*4,P},S.parseChars=function(D,M){var N,P=null,z=null;if(D>=25?(N=2,z=D-8):(N=1,z=D),z>=17&&z<=19){var X;z===17?X=M+80:z===18?X=M+112:X=M+144,this.logger.log(i.INFO,"Special char '"+s(X)+"' in channel "+N),P=[X]}else D>=32&&D<=127&&(P=M===0?[D]:[D,M]);if(P){var k=a(P);this.logger.log(i.DEBUG,"Char codes = "+k.join(",")),x(D,M,this.cmdHistory)}return P},S.parseBackgroundAttributes=function(D,M){var N=(D===16||D===24)&&M>=32&&M<=47,P=(D===23||D===31)&&M>=45&&M<=47;if(!(N||P))return!1;var z,X={};D===16||D===24?(z=Math.floor((M-32)/2),X.background=r[z],M%2===1&&(X.background=X.background+"_semi")):M===45?X.background="transparent":(X.foreground="black",M===47&&(X.underline=!0));var k=D<=23?1:2,F=this.channels[k];return F.setBkgData(X),x(D,M,this.cmdHistory),!0},S.reset=function(){for(var D=0;D=16?d--:d++;var x=Object(y.fixLineBreaks)(f.trim()),O=Object(g.generateCueId)(n,l,x);(!o||!o.cues||!o.cues.getCueById(O))&&(a=new h(n,l,x),a.id=O,a.line=u+1,a.align="left",a.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(a))}return o&&i.length&&(i.sort(function(C,w){return C.line==="auto"||w.line==="auto"?0:C.line>8&&w.line>8?w.line-C.line:C.line-w.line}),i.forEach(function(C){return Object(s.addCueToTrack)(o,C)})),i}};v.default=p},"./src/utils/discontinuities.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"findFirstFragWithCC",function(){return _}),T.d(v,"shouldAlignOnDiscontinuities",function(){return p}),T.d(v,"findDiscontinuousReferenceFrag",function(){return e}),T.d(v,"adjustSlidingStart",function(){return n}),T.d(v,"alignStream",function(){return l}),T.d(v,"alignPDT",function(){return i}),T.d(v,"alignFragmentByPDTDelta",function(){return t}),T.d(v,"alignMediaPlaylistByPDT",function(){return a});var y=T("./src/polyfills/number.ts"),g=T("./src/utils/logger.ts"),s=T("./src/controller/level-helper.ts");function _(c,d){for(var f=null,h=0,u=c.length;hf.startCC||c&&c.cc=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},s}();v.default=g},"./src/utils/ewma.ts":function(I,v,T){"use strict";T.r(v);var y=function(){function g(_,p,e){p===void 0&&(p=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=p,this.totalWeight_=e}var s=g.prototype;return s.sample=function(p,e){var o=Math.pow(this.alpha_,p);this.estimate_=e*(1-o)+o*this.estimate_,this.totalWeight_+=p},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var p=1-Math.pow(this.alpha_,this.totalWeight_);if(p)return this.estimate_/p}return this.estimate_},g}();v.default=y},"./src/utils/fetch-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"fetchSupported",function(){return t});var y=T("./src/polyfills/number.ts"),g=T("./src/loader/load-stats.ts"),s=T("./src/demux/chunk-cache.ts");function _(h,u){h.prototype=Object.create(u.prototype),h.prototype.constructor=h,l(h,u)}function p(h){var u=typeof Map=="function"?new Map:void 0;return p=function(x){if(x===null||!n(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(x))return u.get(x);u.set(x,O)}function O(){return e(x,arguments,r(this).constructor)}return O.prototype=Object.create(x.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),l(O,x)},p(h)}function e(h,u,E){return o()?e=Reflect.construct:e=function(O,C,w){var S=[null];S.push.apply(S,C);var A=Function.bind.apply(O,S),D=new A;return w&&l(D,w.prototype),D},e.apply(null,arguments)}function o(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}function n(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function l(h,u){return l=Object.setPrototypeOf||function(x,O){return x.__proto__=O,x},l(h,u)}function r(h){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},r(h)}function i(){return i=Object.assign||function(h){for(var u=1;u=w&&S(O,C,A.flush(),x)):S(O,C,z,x),N()}).catch(function(){return Promise.reject()})};return M()},h}();function c(h,u){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:u,headers:new self.Headers(i({},h.headers))};return h.rangeEnd&&E.headers.set("Range","bytes="+h.rangeStart+"-"+String(h.rangeEnd-1)),E}function d(h,u){return new self.Request(h.url,u)}var f=function(h){_(u,h);function u(E,x,O){var C;return C=h.call(this,E)||this,C.code=void 0,C.details=void 0,C.code=x,C.details=O,C}return u}(p(Error));v.default=a},"./src/utils/imsc1-ttml-parser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"IMSC1_CODEC",function(){return n}),T.d(v,"parseIMSC1",function(){return t});var y=T("./src/utils/mp4-tools.ts"),g=T("./src/utils/vttparser.ts"),s=T("./src/utils/vttcue.ts"),_=T("./src/demux/id3.ts"),p=T("./src/utils/timescale-conversion.ts"),e=T("./src/utils/webvtt-parser.ts");function o(){return o=Object.assign||function(w){for(var S=1;S"):y}function p(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i>24,u[E+1]=x>>16&255,u[E+2]=x>>8&255,u[E+3]=x&255}function l(u,E){var x=[];if(!E.length)return x;var O,C,w;"data"in u?(O=u.data,C=u.start,w=u.end):(O=u,C=0,w=O.byteLength);for(var S=C;S1?S+A:w;if(D===E[0])if(E.length===1)x.push({data:O,start:S+8,end:M});else{var N=l({data:O,start:S+8,end:M},E.slice(1));N.length&&_.apply(x,N)}S=M}return x}function r(u){var E=l(u,["moov"]),x=E[0],O=x?x.end:null,C=l(u,["sidx"]);if(!C||!C[0])return null;var w=[],S=C[0],A=S.data[0],D=A===0?8:16,M=o(S,D);D+=4;var N=0,P=0;A===0?D+=8:D+=16,D+=2;var z=S.end+P,X=e(S,D);D+=2;for(var k=0;k>>31;if(B===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=o(S,F);F+=4,w.push({referenceSize:L,subsegmentDuration:Z,info:{duration:Z/M,start:z,end:z+L-1}}),z+=L,F+=4,D=F}return{earliestPresentationTime:N,timescale:M,version:A,referencesCount:X,references:w,moovEndOffset:O}}function i(u){for(var E=[],x=l(u,["moov","trak"]),O=0;Op)&&(this.startTime=p),this.endTime=e,this.screen=o,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},g}()},"./src/utils/texttrack-utils.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"sendAddTrackEvent",function(){return g}),T.d(v,"addCueToTrack",function(){return s}),T.d(v,"clearCurrentCues",function(){return _}),T.d(v,"removeCuesInRange",function(){return p}),T.d(v,"getCuesInRange",function(){return o});var y=T("./src/utils/logger.ts");function g(n,l){var r;try{r=new Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=n,l.dispatchEvent(r)}function s(n,l){var r=n.mode;if(r==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(l.id))try{if(n.addCue(l),!n.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(t){y.logger.debug("[texttrack-utils]: "+t);var i=new self.TextTrackCue(l.startTime,l.endTime,l.text);i.id=l.id,n.addCue(i)}r==="disabled"&&(n.mode=r)}function _(n){var l=n.mode;if(l==="disabled"&&(n.mode="hidden"),n.cues)for(var r=n.cues.length;r--;)n.removeCue(n.cues[r]);l==="disabled"&&(n.mode=l)}function p(n,l,r){var i=n.mode;if(i==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var t=o(n.cues,l,r),a=0;an[r].endTime)return-1;for(var i=0,t=r;i<=t;){var a=Math.floor((t+i)/2);if(ln[a].startTime&&i-1)for(var a=t,c=n.length;a=l&&d.endTime<=r)i.push(d);else if(d.startTime>r)return i}return i}},"./src/utils/time-ranges.ts":function(I,v,T){"use strict";T.r(v);var y={toString:function(s){for(var _="",p=s.length,e=0;e1?l-1:0),i=1;i100)throw new Error("Position must be between 0 and 100.");w=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",e({},t,{get:function(){return S},set:function(N){var P=p(N);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");S=P,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",e({},t,{get:function(){return A},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");A=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",e({},t,{get:function(){return D},set:function(N){var P=p(N);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");D=P,this.hasBeenReset=!0}})),i.displayState=void 0}return o.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"parseTimeStamp",function(){return s}),T.d(v,"fixLineBreaks",function(){return l}),T.d(v,"VTTParser",function(){return r});var y=T("./src/utils/vttcue.ts"),g=function(){function i(){}var t=i.prototype;return t.decode=function(c,d){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},i}();function s(i){function t(c,d,f,h){return(c|0)*3600+(d|0)*60+(f|0)+parseFloat(h||0)}var a=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return a?parseFloat(a[2])>59?t(a[2],a[3],0,a[4]):t(a[1],a[2],a[3],a[4]):null}var _=function(){function i(){this.values=Object.create(null)}var t=i.prototype;return t.set=function(c,d){!this.get(c)&&d!==""&&(this.values[c]=d)},t.get=function(c,d,f){return f?this.has(c)?this.values[c]:d[f]:this.has(c)?this.values[c]:d},t.has=function(c){return c in this.values},t.alt=function(c,d,f){for(var h=0;h=0&&f<=100)return this.set(c,f),!0}return!1},i}();function p(i,t,a,c){var d=c?i.split(c):[i];for(var f in d){if(typeof d[f]!="string")continue;var h=d[f].split(a);if(h.length!==2)continue;var u=h[0],E=h[1];t(u,E)}}var e=new y.default(0,0,""),o=e.align==="middle"?"middle":"center";function n(i,t,a){var c=i;function d(){var u=s(i);if(u===null)throw new Error("Malformed timestamp: "+c);return i=i.replace(/^[^\sa-zA-Z-]+/,""),u}function f(u,E){var x=new _;p(u,function(w,S){var A;switch(w){case"region":for(var D=a.length-1;D>=0;D--)if(a[D].id===S){x.set(w,a[D].region);break}break;case"vertical":x.alt(w,S,["rl","lr"]);break;case"line":A=S.split(","),x.integer(w,A[0]),x.percent(w,A[0])&&x.set("snapToLines",!1),x.alt(w,A[0],["auto"]),A.length===2&&x.alt("lineAlign",A[1],["start",o,"end"]);break;case"position":A=S.split(","),x.percent(w,A[0]),A.length===2&&x.alt("positionAlign",A[1],["start",o,"end","line-left","line-right","auto"]);break;case"size":x.percent(w,S);break;case"align":x.alt(w,S,["start",o,"end","left","right"]);break}},/:/,/\s/),E.region=x.get("region",null),E.vertical=x.get("vertical","");var O=x.get("line","auto");O==="auto"&&e.line===-1&&(O=-1),E.line=O,E.lineAlign=x.get("lineAlign","start"),E.snapToLines=x.get("snapToLines",!0),E.size=x.get("size",100),E.align=x.get("align",o);var C=x.get("position","auto");C==="auto"&&e.position===50&&(C=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=C}function h(){i=i.replace(/^\s+/,"")}if(h(),t.startTime=d(),h(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);i=i.substr(3),h(),t.endTime=d(),h(),f(i,t)}function l(i){return i.replace(//gi,` `)}var r=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new g,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=i.prototype;return t.parse=function(c){var d=this;c&&(d.buffer+=d.decoder.decode(c,{stream:!0}));function f(){var C=d.buffer,w=0;for(C=l(C);w9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(y.isFiniteNumber)(d)||!Object(y.isFiniteNumber)(f)||!Object(y.isFiniteNumber)(h)||!Object(y.isFiniteNumber)(u))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return d+=1e3*f,d+=60*1e3*h,d+=60*60*1e3*u,d},l=function(c){for(var d=5381,f=c.length;f;)d=d*33^c.charCodeAt(--f);return(d>>>0).toString()};function r(a,c,d){return l(a.toString())+l(c.toString())+l(d)}var i=function(c,d,f){var h=c[d],u=c[h.prevCC];if(!u||!u.new&&h.new){c.ccOffset=c.presentationOffset=h.start,h.new=!1;return}for(;(E=u)!==null&&E!==void 0&&E.new;){var E;c.ccOffset+=h.start-u.start,h.new=!1,h=u,u=c[h.prevCC]}c.presentationOffset=f};function t(a,c,d,f,h,u,E,x){var O=new g.VTTParser,C=Object(s.utf8ArrayToStr)(new Uint8Array(a)).trim().replace(e,` `).split(` `),w=[],S=Object(_.toMpegTsClockFromTimescale)(c,d),A="00:00.000",D=0,M=0,N,P=!0,z=!1;O.oncue=function(X){var k=f[h],F=f.ccOffset,U=(D-S)/9e4;if(k!=null&&k.new&&(M!==void 0?F=f.ccOffset=k.start:i(f,h,U)),U&&(F=U-f.presentationOffset),z){var L=X.endTime-X.startTime,B=Object(p.normalizePts)((X.startTime+F-M)*9e4,u*9e4)/9e4;X.startTime=B,X.endTime=B+L}var Z=X.text.trim();X.text=decodeURIComponent(encodeURIComponent(Z)),X.id||(X.id=r(X.startTime,X.endTime,Z)),X.endTime>0&&w.push(X)},O.onparsingerror=function(X){N=X},O.onflush=function(){if(N){x(N);return}E(w)},C.forEach(function(X){if(P)if(o(X,"X-TIMESTAMP-MAP=")){P=!1,z=!0,X.substr(16).split(",").forEach(function(k){o(k,"LOCAL:")?A=k.substr(6):o(k,"MPEGTS:")&&(D=parseInt(k.substr(7)))});try{M=n(A)/1e3}catch(k){z=!1,N=k}return}else X===""&&(P=!1);O.parse(X+` -`)}),O.flush()}},"./src/utils/xhr-loader.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/utils/logger.ts"),g=T("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,_=function(){function p(o){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=o?o.xhrSetup:null,this.stats=new g.LoadStats,this.retryDelay=0}var e=p.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},e.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(n,l,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=l,this.callbacks=r,this.retryDelay=l.retryDelay,this.loadInternal()},e.loadInternal=function(){var n=this.config,l=this.context;if(!n)return;var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var t=this.xhrSetup;try{if(t)try{t(r,l.url)}catch(d){r.open("GET",l.url,!0),t(r,l.url)}r.readyState||r.open("GET",l.url,!0);var a=this.context.headers;if(a)for(var c in a)r.setRequestHeader(c,a[c])}catch(d){this.callbacks.onError({code:r.status,text:d.message},l,r);return}l.rangeEnd&&r.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),r.send()},e.readystatechange=function(){var n=this.context,l=this.loader,r=this.stats;if(!n||!l)return;var i=l.readyState,t=this.config;if(r.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),i===4){l.onreadystatechange=null,l.onprogress=null;var a=l.status;if(a>=200&&a<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var c,d;if(n.responseType==="arraybuffer"?(c=l.response,d=c.byteLength):(c=l.responseText,d=c.length),r.loaded=r.total=d,!this.callbacks)return;var f=this.callbacks.onProgress;if(f&&f(r,n,c,l),!this.callbacks)return;var h={url:l.responseURL,data:c};this.callbacks.onSuccess(h,r,n,l)}else r.retry>=t.maxRetry||a>=400&&a<499?(y.logger.error(a+" while loading "+n.url),this.callbacks.onError({code:a,text:l.statusText},n,l)):(y.logger.warn(a+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,t.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout)},e.loadtimeout=function(){y.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(n){var l=this.stats;l.loaded=n.loaded,n.lengthComputable&&(l.total=n.total)},e.getCacheAge=function(){var n=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");n=l?parseFloat(l):null}return n},p}();v.default=_}}).default})},vHTk:function(j,H,b){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vS10:function(j,H,b){"use strict";b.d(H,"h",function(){return g}),b.d(H,"d",function(){return _}),b.d(H,"c",function(){return e}),b.d(H,"e",function(){return n}),b.d(H,"g",function(){return r}),b.d(H,"a",function(){return t}),b.d(H,"i",function(){return c}),b.d(H,"b",function(){return f}),b.d(H,"f",function(){return u});var I=b("9og8"),v=b("WmNS"),T=b.n(v),y=b("ErOA");function g(C){return s.apply(this,arguments)}function s(){return s=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/save_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),s.apply(this,arguments)}function _(C){return p.apply(this,arguments)}function p(){return p=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.identifier,"/jupyter.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),p.apply(this,arguments)}function e(C){return o.apply(this,arguments)}function o(){return o=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/start.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),o.apply(this,arguments)}function n(C){return l.apply(this,arguments)}function l(){return l=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/timeinfo_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),l.apply(this,arguments)}function r(C){return i.apply(this,arguments)}function i(){return i=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/reset_pod.json"),{method:"Get"}));case 1:case"end":return A.stop()}},C)})),i.apply(this,arguments)}function t(C){return a.apply(this,arguments)}function a(){return a=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/active_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),a.apply(this,arguments)}function c(C){return d.apply(this,arguments)}function d(){return d=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/sync_code.json"),{method:"Post",params:w}));case 1:case"end":return A.stop()}},C)})),d.apply(this,arguments)}function f(C){return h.apply(this,arguments)}function h(){return h=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/shixuns/".concat(w.identifier,"/get_data_sets.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),h.apply(this,arguments)}function u(C){return E.apply(this,arguments)}function E(){return E=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.identifier,"/reboot_esc.json"),{method:"post"}));case 1:case"end":return A.stop()}},C)})),E.apply(this,arguments)}function x(C){return O.apply(this,arguments)}function O(){return O=Object(I.a)(T.a.mark(function C(w){return T.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.taskId,"/get_latex_file_tree.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),O.apply(this,arguments)}},vewr:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.getPointerEvent=I,H.stopEvent=v,H.setCapture=p,H.releaseCapture=e;function I(o){return o.changedTouches?o.changedTouches[0]:o.touches?o.touches[0]:o}function v(o){o.stopPropagation(),o.preventDefault()}var T=!1,y=null;document.captureElement=null;function g(o){if(T)return;var n=new o.constructor(o.type,o);T=!0,document.captureElement?document.captureElement.dispatchEvent(n):y.dispatchEvent(n),T=!1,o.stopPropagation(),n.defaultPrevented&&o.preventDefault(),o.type==="mouseup"&&e()}function s(){var o=document.getElementById("noVNC_mouse_capture_elem");o.style.cursor=window.getComputedStyle(document.captureElement).cursor}var _=new MutationObserver(s);function p(o){if(o.setCapture)o.setCapture(),document.captureElement=o,o.addEventListener("mouseup",e);else{e();var n=document.getElementById("noVNC_mouse_capture_elem");n===null&&(n=document.createElement("div"),n.id="noVNC_mouse_capture_elem",n.style.position="fixed",n.style.top="0px",n.style.left="0px",n.style.width="100%",n.style.height="100%",n.style.zIndex=1e4,n.style.display="none",document.body.appendChild(n),n.addEventListener("contextmenu",g),n.addEventListener("mousemove",g),n.addEventListener("mouseup",g)),document.captureElement=o,_.observe(o,{attributes:!0}),s(),n.style.display="",window.addEventListener("mousemove",g),window.addEventListener("mouseup",g)}}function e(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;y=document.captureElement,document.captureElement=null,_.disconnect();var o=document.getElementById("noVNC_mouse_capture_elem");o.style.display="none",window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",g)}}},w7YG:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=g.RC4=y.extend({_doReset:function(){for(var e=this._key,o=e.words,n=e.sigBytes,l=this._S=[],r=0;r<256;r++)l[r]=r;for(var r=0,i=0;r<256;r++){var t=r%n,a=o[t>>>2]>>>24-t%4*8&255;i=(i+l[r]+a)%256;var c=l[r];l[r]=l[i],l[i]=c}this._i=this._j=0},_doProcessBlock:function(e,o){e[o]^=_.call(this)},keySize:256/32,ivSize:0});function _(){for(var e=this._S,o=this._i,n=this._j,l=0,r=0;r<4;r++){o=(o+1)%256,n=(n+e[o])%256;var i=e[o];e[o]=e[n],e[n]=i,l|=e[(e[o]+e[n])%256]<<24-r*8}return this._i=o,this._j=n,l}v.RC4=y._createHelper(s);var p=g.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)_.call(this)}});v.RC4Drop=y._createHelper(p)}(),I.RC4})},wCXF:function(j,H,b){"use strict";b.d(H,"a",function(){return De});var I=b("rePB"),v=b("VTBJ"),T=b("KQm4"),y=b("U8pU"),g=b("ODXe"),s=b("q1tI"),_=b("TSYQ"),p=b.n(_),e=b("Gytx"),o=b.n(e),n=b("Kwbf"),l=b("t23M"),r=b("qx4F"),i=b("6eGT"),t=b("IBYe"),a=b("Ff2n"),c=b("c+Xe"),d=b("fyJ8"),f=b("biw7");function h(Ge,Me,bt,Oe,Ve){var Je=bt[Ge]||{},Ye=bt[Me]||{},Ne,He;Je.fixed==="left"?Ne=Oe.left[Ge]:Ye.fixed==="right"&&(He=Oe.right[Me]);var ve=!1,xe=!1,de=!1,je=!1,Qe=bt[Me+1],ne=bt[Ge-1];if(Ve==="rtl"){if(Ne!==void 0){var Ze=ne&&ne.fixed==="left";je=!Ze}else if(He!==void 0){var lt=Qe&&Qe.fixed==="right";de=!lt}}else if(Ne!==void 0){var Be=Qe&&Qe.fixed==="left";ve=!Be}else if(He!==void 0){var $e=ne&&ne.fixed==="right";xe=!$e}return{fixLeft:Ne,fixRight:He,lastFixLeft:ve,firstFixRight:xe,lastFixRight:de,firstFixLeft:je,isSticky:Oe.isSticky}}var u=b("sR1s");function E(Ge){var Me=Ge.cells,bt=Ge.stickyOffsets,Oe=Ge.flattenColumns,Ve=Ge.rowComponent,Je=Ge.cellComponent,Ye=Ge.onHeaderRow,Ne=Ge.index,He=s.useContext(f.a),ve=He.prefixCls,xe=He.direction,de;Ye&&(de=Ye(Me.map(function(Qe){return Qe.column}),Ne));var je=Object(u.a)(Me.map(function(Qe){return Qe.column}));return s.createElement(Ve,Object.assign({},de),Me.map(function(Qe,ne){var Ze=Qe.column,lt=h(Qe.colStart,Qe.colEnd,Oe,bt,xe),Be;return Ze&&Ze.onHeaderCell&&(Be=Qe.column.onHeaderCell(Ze)),s.createElement(d.a,Object.assign({},Qe,{ellipsis:Ze.ellipsis,align:Ze.align,component:Je,prefixCls:ve,key:je[ne]},lt,{additionalProps:Be,rowType:"header"}))}))}E.displayName="HeaderRow";var x=E;function O(Ge){var Me=[];function bt(Ye,Ne){var He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Me[He]=Me[He]||[];var ve=Ne,xe=Ye.filter(Boolean).map(function(de){var je={key:de.key,className:de.className||"",children:de.title,column:de,colStart:ve},Qe=1,ne=de.children;return ne&&ne.length>0&&(Qe=bt(ne,ve,He+1).reduce(function(Ze,lt){return Ze+lt},0),je.hasSubColumns=!0),"colSpan"in de&&(Qe=de.colSpan),"rowSpan"in de&&(je.rowSpan=de.rowSpan),je.colSpan=Qe,je.colEnd=je.colStart+Qe-1,Me[He].push(je),ve+=Qe,Qe});return xe}bt(Ge,0);for(var Oe=Me.length,Ve=function(Ne){Me[Ne].forEach(function(He){!("rowSpan"in He)&&!He.hasSubColumns&&(He.rowSpan=Oe-Ne)})},Je=0;Je=0;Ne-=1){var He=Me[Ne],ve=bt&&bt[Ne],xe=ve&&ve[S.a];(He||xe||Ye)&&(Ve.unshift(s.createElement("col",Object.assign({key:Ne,style:{width:He,minWidth:He}},xe))),Ye=!0)}return s.createElement("colgroup",null,Ve)}var D=A;function M(Ge,Me){return Object(s.useMemo)(function(){for(var bt=[],Oe=0;Oe1?ee-1:0),ue=1;ue=de&&(kt=de-je),Ye({scrollLeft:kt/de*(xe+2)}),$e.current.x=mt.pageX},ht=function(){var mt=Object(Y.b)(Je.current).top,Xt=mt+Je.current.offsetHeight,jt=document.documentElement.scrollTop+window.innerHeight;Xt-Object(r.a)()<=jt||mt>=jt-Ne?Be(function(Ut){return Object(v.a)(Object(v.a)({},Ut),{},{isHiddenScrollBar:!0})}):Be(function(Ut){return Object(v.a)(Object(v.a)({},Ut),{},{isHiddenScrollBar:!1})})},Bt=function(mt){Be(function(Xt){return Object(v.a)(Object(v.a)({},Xt),{},{scrollLeft:mt/xe*de||0})})};return s.useImperativeHandle(bt,function(){return{setScrollLeft:Bt}}),s.useEffect(function(){var Ht=Object(Q.a)(document.body,"mouseup",Pe,!1),mt=Object(Q.a)(document.body,"mousemove",Et,!1);return ht(),function(){Ht.remove(),mt.remove()}},[je,pt]),s.useEffect(function(){var Ht=Object(Q.a)(window,"scroll",ht,!1),mt=Object(Q.a)(window,"resize",ht,!1);return function(){Ht.remove(),mt.remove()}},[]),s.useEffect(function(){lt.isHiddenScrollBar||Be(function(Ht){var mt,Xt;return Object(v.a)(Object(v.a)({},Ht),{},{scrollLeft:Je.current.scrollLeft/((mt=Je.current)===null||mt===void 0?void 0:mt.scrollWidth)*((Xt=Je.current)===null||Xt===void 0?void 0:Xt.clientWidth)})})},[lt.isHiddenScrollBar]),xe<=de||!je||lt.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(r.a)(),width:de,bottom:Ne},className:"".concat(ve,"-sticky-scroll")},s.createElement("div",{onMouseDown:ze,ref:Qe,className:p()("".concat(ve,"-sticky-scroll-bar"),Object(I.a)({},"".concat(ve,"-sticky-scroll-bar-active"),pt)),style:{width:"".concat(je,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},le=s.forwardRef(oe);function Ee(Ge,Me){return s.useMemo(function(){var bt=!!Ge;return{isSticky:bt,stickyClassName:bt?"".concat(Me,"-sticky-header"):"",offsetHeader:Object(y.a)(Ge)==="object"&&Ge.offsetHeader||0,offsetScroll:Object(y.a)(Ge)==="object"&&Ge.offsetScroll||0}},[Ge,Me])}var Le=[],ge={},De="rc-table-internal-hook",_e=s.memo(function(Ge){var Me=Ge.children;return Me},function(Ge,Me){return o()(Ge.props,Me.props)?Ge.pingLeft!==Me.pingLeft||Ge.pingRight!==Me.pingRight:!1});function Xe(Ge){var Me,bt=Ge.prefixCls,Oe=Ge.className,Ve=Ge.rowClassName,Je=Ge.style,Ye=Ge.data,Ne=Ge.rowKey,He=Ge.scroll,ve=Ge.tableLayout,xe=Ge.direction,de=Ge.title,je=Ge.footer,Qe=Ge.summary,ne=Ge.id,Ze=Ge.showHeader,lt=Ge.components,Be=Ge.emptyText,$e=Ge.onRow,it=Ge.onHeaderRow,wt=Ge.internalHooks,pt=Ge.transformColumns,st=Ge.internalRefs,Pe=Ge.sticky,ze=Ye||Le,Et=!!ze.length,ht=s.useState(0),Bt=Object(g.a)(ht,2),Ht=Bt[0],mt=Bt[1];s.useEffect(function(){mt(Object(r.a)())});var Xt=s.useMemo(function(){return Object(u.c)(lt,{})},[lt]),jt=s.useCallback(function(hi,An){return Object(u.b)(Xt,hi)||An},[Xt]),Ut=s.useMemo(function(){return typeof Ne=="function"?Ne:function(hi){var An=hi&&hi[Ne];return An}},[Ne]),kt=Object(S.c)(Ge),Kt=kt.expandIcon,rn=kt.expandedRowKeys,Gt=kt.defaultExpandedRowKeys,$t=kt.defaultExpandAllRows,Ln=kt.expandedRowRender,pn=kt.onExpand,Dn=kt.onExpandedRowsChange,sn=kt.expandRowByClick,Sn=kt.rowExpandable,Kn=kt.expandIconColumnIndex,Qn=kt.expandedRowClassName,Vt=kt.childrenColumnName,wn=kt.indentSize,$n=Kt||ie,ir=Vt||"children",Tr=s.useMemo(function(){return Ln?"row":Ge.expandable&&wt===De&&Ge.expandable.__PARENT_RENDER_ICON__||ze.some(function(hi){return hi&&Object(y.a)(hi)==="object"&&hi[ir]})?"nest":!1},[!!Ln,ze]),qn=s.useState(function(){return Gt||($t?q(ze,Ut,ir):[])}),ce=Object(g.a)(qn,2),V=ce[0],J=ce[1],ee=s.useMemo(function(){return new Set(rn||V||[])},[rn,V]),Te=s.useCallback(function(hi){var An=Ut(hi,ze.indexOf(hi)),tn,kn=ee.has(An);kn?(ee.delete(An),tn=Object(T.a)(ee)):tn=[].concat(Object(T.a)(ee),[An]),J(tn),pn&&pn(!kn,hi),Dn&&Dn(tn)},[Ut,ee,ze,pn,Dn]),ue=s.useState(0),nt=Object(g.a)(ue,2),Lt=nt[0],Yt=nt[1],on=Object(te.b)(Object(v.a)(Object(v.a)(Object(v.a)({},Ge),kt),{},{expandable:!!Ln,expandedKeys:ee,getRowKey:Ut,onTriggerExpand:Te,expandIcon:$n,expandIconColumnIndex:Kn,direction:xe}),wt===De?pt:null),Qt=Object(g.a)(on,2),In=Qt[0],Gn=Qt[1],lr=s.useMemo(function(){return{columns:In,flattenColumns:Gn}},[In,Gn]),Ar=s.useRef(),vr=s.useRef(),ar=s.useRef(),xr=s.useState(!1),qi=Object(g.a)(xr,2),Gr=qi[0],ai=qi[1],da=s.useState(!1),Fi=Object(g.a)(da,2),ia=Fi[0],Ca=Fi[1],po=pe(new Map),so=Object(g.a)(po,2),xo=so[0],ka=so[1],Yi=Object(u.a)(Gn),Nr=Yi.map(function(hi){return xo.get(hi)}),Qr=s.useMemo(function(){return Nr},[Nr.join("_")]),yi=be(Qr,Gn.length,xe),Fr=He&&Object(u.d)(He.y),wr=He&&Object(u.d)(He.x),ei=wr&&Gn.some(function(hi){var An=hi.fixed;return An}),_r=s.useRef(),oi=Ee(Pe,bt),or=oi.isSticky,Wi=oi.offsetHeader,Mi=oi.offsetScroll,$i=oi.stickyClassName,mo,Qi,Ka;Fr&&(Qi={overflowY:"scroll",maxHeight:He.y}),wr&&(mo={overflowX:"auto"},Fr||(Qi={overflowY:"hidden"}),Ka={width:He.x===!0?"auto":He.x,minWidth:"100%"});var La=s.useCallback(function(hi,An){ka(function(tn){var kn=new Map(tn);return kn.set(hi,An),kn})},[]),ti=me(null),Bo=Object(g.a)(ti,2),Ha=Bo[0],go=Bo[1];function So(hi,An){if(!An)return;typeof An=="function"?An(hi):An.scrollLeft!==hi&&(An.scrollLeft=hi)}var Wa=function(An){var tn=An.currentTarget,kn=An.scrollLeft,_n=typeof kn=="number"?kn:tn.scrollLeft,nr=tn||ge;if(!go()||go()===nr){var Or;Ha(nr),So(_n,vr.current),So(_n,ar.current),So(_n,(Or=_r.current)===null||Or===void 0?void 0:Or.setScrollLeft)}if(tn){var fi=tn.scrollWidth,bi=tn.clientWidth;ai(_n>0),Ca(_n0?[].concat(Object(v.a)(a),Object(v.a)(n(h).map(function(u){return Object(T.a)({fixed:f},u)}))):[].concat(Object(v.a)(a),[Object(T.a)(Object(T.a)({},c),{},{fixed:f})])},[])}function l(t){for(var a=!0,c=0;c=0;h-=1){var u=t[h];if(f&&u.fixed!=="right")f=!1;else if(!f&&u.fixed==="right"){Object(_.a)(!1,"Index ".concat(h+1," of `columns` missing `fixed='right'` prop."));break}}}function r(t){return t.map(function(a){var c=a.fixed,d=Object(y.a)(a,["fixed"]),f=c;return c==="left"?f="right":c==="right"&&(f="left"),Object(T.a)({fixed:f},d)})}function i(t,a){var c=t.prefixCls,d=t.columns,f=t.children,h=t.expandable,u=t.expandedKeys,E=t.getRowKey,x=t.onTriggerExpand,O=t.expandIcon,C=t.rowExpandable,w=t.expandIconColumnIndex,S=t.direction,A=t.expandRowByClick,D=g.useMemo(function(){return d||o(f)},[d,f]),M=g.useMemo(function(){if(h){var z,X=w||0,k=D[X],F=(z={},Object(I.a)(z,e.a,{className:"".concat(c,"-expand-icon-col")}),Object(I.a)(z,"title",""),Object(I.a)(z,"fixed",k?k.fixed:null),Object(I.a)(z,"className","".concat(c,"-row-expand-icon-cell")),Object(I.a)(z,"render",function(B,Z,re){var he=E(Z,re),Se=u.has(he),ke=C?C(Z):!0,te=O({prefixCls:c,expanded:Se,expandable:ke,record:Z,onExpand:x});return A?g.createElement("span",{onClick:function(Ce){return Ce.stopPropagation()}},te):te}),z),U=D.slice();return X>=0&&U.splice(X,0,F),U}return D},[h,D,E,u,O,S]),N=g.useMemo(function(){var z=M;return a&&(z=a(z)),z.length||(z=[{render:function(){return null}}]),z},[a,M,S]),P=g.useMemo(function(){return S==="rtl"?r(n(N)):n(N)},[N,S]);return[N,P]}H.b=i},wZgz:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.BlockCipher,g=v.algo,s=[],_=[],p=[],e=[],o=[],n=[],l=[],r=[],i=[],t=[];(function(){for(var d=[],f=0;f<256;f++)f<128?d[f]=f<<1:d[f]=f<<1^283;for(var h=0,u=0,f=0;f<256;f++){var E=u^u<<1^u<<2^u<<3^u<<4;E=E>>>8^E&255^99,s[h]=E,_[E]=h;var x=d[h],O=d[x],C=d[O],w=d[E]*257^E*16843008;p[h]=w<<24|w>>>8,e[h]=w<<16|w>>>16,o[h]=w<<8|w>>>24,n[h]=w;var w=C*16843009^O*65537^x*257^h*16843008;l[E]=w<<24|w>>>8,r[E]=w<<16|w>>>16,i[E]=w<<8|w>>>24,t[E]=w,h?(h=x^d[d[d[C^x]]],u^=d[d[u]]):h=u=1}})();var a=[0,1,2,4,8,16,32,64,128,27,54],c=g.AES=y.extend({_doReset:function(){var d;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var f=this._keyPriorReset=this._key,h=f.words,u=f.sigBytes/4,E=this._nRounds=u+6,x=(E+1)*4,O=this._keySchedule=[],C=0;C6&&C%u==4&&(d=s[d>>>24]<<24|s[d>>>16&255]<<16|s[d>>>8&255]<<8|s[d&255]):(d=d<<8|d>>>24,d=s[d>>>24]<<24|s[d>>>16&255]<<16|s[d>>>8&255]<<8|s[d&255],d^=a[C/u|0]<<24),O[C]=O[C-u]^d);for(var w=this._invKeySchedule=[],S=0;S>>24]]^r[s[d>>>16&255]]^i[s[d>>>8&255]]^t[s[d&255]]}},encryptBlock:function(d,f){this._doCryptBlock(d,f,this._keySchedule,p,e,o,n,s)},decryptBlock:function(d,f){var h=d[f+1];d[f+1]=d[f+3],d[f+3]=h,this._doCryptBlock(d,f,this._invKeySchedule,l,r,i,t,_);var h=d[f+1];d[f+1]=d[f+3],d[f+3]=h},_doCryptBlock:function(d,f,h,u,E,x,O,C){for(var w=this._nRounds,S=d[f]^h[0],A=d[f+1]^h[1],D=d[f+2]^h[2],M=d[f+3]^h[3],N=4,P=1;P>>24]^E[A>>>16&255]^x[D>>>8&255]^O[M&255]^h[N++],X=u[A>>>24]^E[D>>>16&255]^x[M>>>8&255]^O[S&255]^h[N++],k=u[D>>>24]^E[M>>>16&255]^x[S>>>8&255]^O[A&255]^h[N++],F=u[M>>>24]^E[S>>>16&255]^x[A>>>8&255]^O[D&255]^h[N++];S=z,A=X,D=k,M=F}var z=(C[S>>>24]<<24|C[A>>>16&255]<<16|C[D>>>8&255]<<8|C[M&255])^h[N++],X=(C[A>>>24]<<24|C[D>>>16&255]<<16|C[M>>>8&255]<<8|C[S&255])^h[N++],k=(C[D>>>24]<<24|C[M>>>16&255]<<16|C[S>>>8&255]<<8|C[A&255])^h[N++],F=(C[M>>>24]<<24|C[S>>>16&255]<<16|C[A>>>8&255]<<8|C[D&255])^h[N++];d[f]=z,d[f+1]=X,d[f+2]=k,d[f+3]=F},keySize:256/32});v.AES=y._createHelper(c)}(),I.AES})},wbyO:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Base64url={stringify:function(p,e=!0){var o=p.words,n=p.sigBytes,l=e?this._safe_map:this._map;p.clamp();for(var r=[],i=0;i>>2]>>>24-i%4*8&255,a=o[i+1>>>2]>>>24-(i+1)%4*8&255,c=o[i+2>>>2]>>>24-(i+2)%4*8&255,d=t<<16|a<<8|c,f=0;f<4&&i+f*.75>>6*(3-f)&63));var h=l.charAt(64);if(h)for(;r.length%4;)r.push(h);return r.join("")},parse:function(p,e=!0){var o=p.length,n=e?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var r=0;r>>6-r%4*2,a=i|t;n[l>>>2]|=a<<24-l%4*8,l++}return y.create(n,l)}}(),I.enc.Base64url})},whVF:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("lNSK"),v=T(b("1q3G"));function T(p){return p&&p.__esModule?p:{default:p}}function y(p,e){if(!(p instanceof e))throw new TypeError("Cannot call a class as a function")}function g(p,e){for(var o=0;o0){var r=[l],i=l.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,n=(0,I.deflate)(this.strm,I.Z_FULL_FLUSH),n<0)throw new Error("zlib deflate failed");var t=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=t.length,r.push(t)}while(this.strm.avail_in>0);for(var a=new Uint8Array(i),c=0,d=0;d>>16&65535|0,p=0;y!==0;){p=y>2e3?2e3:y,y-=p;do s=s+T[g++]|0,_=_+s|0;while(--p);s%=65521,_%=65521}return s|_<<16|0}},"y0+3":function(j,H,b){"use strict";b.d(H,"a",function(){return n}),b.d(H,"b",function(){return r});var I=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function y(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function g(i,t,a){if(t=t.toLowerCase(),a==="auto"){if(t==="height")return i.offsetHeight;if(t==="width")return i.offsetWidth}return t in v||(v[t]=I.test(t)),v[t]?parseFloat(a)||0:a}function s(i,t){var a=arguments.length,c=y(i);return t=T[t]?"cssFloat"in i.style?"cssFloat":"styleFloat":t,a===1?c:g(i,t,c[t]||i.style[t])}function _(i,t,a){var c=arguments.length;if(t=T[t]?"cssFloat"in i.style?"cssFloat":"styleFloat":t,c===3)return typeof a=="number"&&I.test(t)&&(a="".concat(a,"px")),i.style[t]=a,a;for(var d in t)t.hasOwnProperty(d)&&_(i,d,t[d]);return y(i)}function p(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function e(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function o(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:t}}function n(){var i=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:t}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(i){var t=i.getBoundingClientRect(),a=document.documentElement;return{left:t.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||document.body.clientTop||0)}}},y5JW:function(j,H,b){"use strict";b.d(H,"c",function(){return a}),b.d(H,"a",function(){return c});var I=b("DZo9"),v=b("8z0m"),T=b("+L6B"),y=b("2/Rp"),g=b("9og8"),s=b("miYZ"),_=b("tsqr"),p=b("k1fw"),e=b("oBTY"),o=b("WmNS"),n=b.n(o),l=b("q1tI"),r=b.n(l),i=b("m3rI"),t=b("wzkS"),a="\u3000\u3000";function c(d){var f=["Bytes","KB","MB","GB","TB"];if(d==0)return"0 Byte";var h=parseInt(""+Math.floor(Math.log(d)/Math.log(1024)),10);return(d/Math.pow(1024,h)).toFixed(1)+" "+f[h]}H.b=function(d){var f=d.value,h=f===void 0?[]:f,u=d.action,E=d.onChange,x=d.className,O=d.maxSize,C=O===void 0?150:O,w=d.title,S=w===void 0?"\u6587\u4EF6\u4E0A\u4F20":w,A=d.accept,D=A===void 0?null:A,M={multiple:!1,fileList:h,accept:D,withCredentials:!0,beforeUpload:function(z){var X=z.size/1024/1024;return!0},action:"".concat(i.a.API_SERVER,"/api/attachments.json"),onChange:function(z){var X,k,F=Object(e.a)(z.fileList);if(F=F.map(function(B){return B.name.indexOf(a)===-1&&(B.name="".concat(B.name).concat(a).concat(c(B.size))),Object(p.a)({},B)}),z.file.status==="done"&&((X=z.file)===null||X===void 0||((k=X.response)===null||k===void 0)?void 0:k.status)===-1){var U,L;_.b.error((U=z.file)===null||U===void 0||((L=U.response)===null||L===void 0)?void 0:L.message),E([]);return}E(F)},onRemove:function(){var P=Object(g.a)(n.a.mark(function X(k){var F,U,L;return n.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(F=k.size/1024/1024,!(k.status==="uploading")){Z.next=3;break}return Z.abrupt("return",!0);case 3:if(F0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:h.length>0,ghost:!0},S),r.a.createElement("span",{onClick:N,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",C,"M)"," ")))}},"yTi+":function(j,H,b){j.exports=b.p+"static/AssistantCode3.fdd8db3c.jpeg"},"yi/R":function(j,H,b){"use strict";b.r(H);var I=b("oBTY"),v=b("bbsP"),T=b("/wGt"),y=b("T2oS"),g=b("W9HT"),s=b("0Owb"),_=b("jrin"),p=b("2qtc"),e=b("kLXV"),o=b("miYZ"),n=b("tsqr"),l=b("9og8"),r=b("tJVT"),i=b("PpiC"),t=b("k1fw"),a=b("ozfa"),c=b("MJZm"),d=b("WmNS"),f=b.n(d),h=b("q1tI"),u=b.n(h),E=b("Ty5D"),x=b("H65k"),O=b("+Axu"),C=b("f+oW"),w=b.n(C),S=b("bntm"),A=function(we){var qe,rt=we.position,At=we.subject,Mt=we.score,vt=we.onViewAllTask,at=Object(h.useState)(!1),Dt=Object(r.a)(at,2),Ct=Dt[0],_t=Dt[1],St=Object(E.h)();function Jt(){_t(!Ct),Object(S.a)()?Object(S.b)():Object(S.d)(document.getElementById("task-left-panel"))}var Ft=function(){Object(S.a)()?_t(!0):_t(!1)};return Object(h.useEffect)(function(){return document.addEventListener(Object(S.c)(),Ft),function(){document.removeEventListener(Object(S.c)(),Ft)}},[]),u.a.createElement("div",{className:"task-header"},u.a.createElement("a",{title:"\u67E5\u770B\u5168\u90E8\u4EFB\u52A1",onClick:vt},u.a.createElement("img",{src:w.a,alt:"nav",width:45})),u.a.createElement("h3",{title:At},"\u7B2C",rt,"\u5173\uFF1A",At),u.a.createElement("span",null,Mt),!((St==null||((qe=St.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:Jt,title:Ct?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:Ct?"iconfont icon-shousuo c-grey-333 font16 ml10 current":"iconfont icon-zhankai c-grey-333 font16 ml10 current"})))},D=b("DjyN"),M=b("NUBc"),N=b("g9YV"),P=b("wCAj"),z=b("cWXX"),X=b("/ezw"),k=b("BdwD"),F=b("p4vh"),U=b.n(F),L=b("Q+I+"),B=b.n(L),Z=b("Yr8L"),re=b.n(Z),he=b("IZBM"),Se=b("1vsH"),ke=b("wd/R"),te=b.n(ke),Re={0:U.a,1:B.a,2:re.a},Ce={loading:!0,page:1,data:null},pe;(function(we){we[we.SET_LOADING=0]="SET_LOADING",we[we.SET_STATE=1]="SET_STATE",we[we.SET_PAGE=2]="SET_PAGE"})(pe||(pe={}));function me(we,qe){switch(qe.type){case pe.SET_LOADING:return Object(t.a)(Object(t.a)({},we),{},{loading:qe.payload});case pe.SET_STATE:return Object(t.a)(Object(t.a)({},we),qe.payload);case pe.SET_PAGE:return Object(t.a)(Object(t.a)({},we),{},{page:qe.payload});default:throw new Error}}var se=function(we){var qe=we.activeIndex,rt=we.taskId,At=Object(h.useReducer)(me,Ce),Mt=Object(r.a)(At,2),vt=Mt[0],at=Mt[1],Dt=vt.loading,Ct=vt.page,_t=vt.data,St=Object(h.useMemo)(function(){var Ft=[{title:"\u6392\u540D",dataIndex:"user_name",align:"center",render:function(zt,qt,un){var gn=(Ct-1)*10+un+1;return gn<=3?u.a.createElement("img",{src:Re[gn-1],alt:"rank",width:36}):gn}},{title:"\u59D3\u540D",dataIndex:"user_name"},{title:_t==null?void 0:_t.rank_data_name,dataIndex:"score",render:function(zt){return(_t==null?void 0:_t.open_rank)==="DEFAULT"?Object(Se.bb)(zt):zt}},{title:"\u901A\u5173\u65F6\u95F4",dataIndex:"end_time",render:function(zt){return te()(zt).format("YYYY-MM-DD HH:mm:ss")}}];return Ft},[_t==null?void 0:_t.rank_data_name,_t==null?void 0:_t.open_rank,Ct]);Object(h.useEffect)(function(){function Ft(){return It.apply(this,arguments)}function It(){return It=Object(l.a)(f.a.mark(function zt(){var qt;return f.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(he.t)(rt,{page:Ct,limit:10});case 2:qt=gn.sent,at({type:pe.SET_STATE,payload:{loading:!1,data:qt.data}});case 4:case"end":return gn.stop()}},zt)})),It.apply(this,arguments)}qe===4&&Ft()},[Ct,qe,rt]);function Jt(Ft){at({type:pe.SET_PAGE,payload:Ft})}return u.a.createElement("div",{className:"ranking-container"},Dt?u.a.createElement(X.a,{avatar:!0,paragraph:{rows:4}}):!_t||(_t==null?void 0:_t.rank_list_count)===0?u.a.createElement(k.a,null):u.a.createElement(u.a.Fragment,null,u.a.createElement(P.a,{pagination:!1,size:"middle",dataSource:_t.rank_list,columns:St}),_t.rank_list_count>10?u.a.createElement(M.a,{style:{marginTop:20},showQuickJumper:!0,showSizeChanger:!1,onChange:Jt,current:Ct,total:_t.rank_list_count}):null))},be=b("fXAG"),ae=b("9Bee"),fe=b("M8RZ"),Fe=b("6lC8"),ie=b("mCJh"),q=b("jb+D"),Q=b("dTJi"),Y=b("pC0b"),oe=b("GzdX"),le=b("OoWo"),Ee="YYYY-MM-DD HH:mm",Le=function(we){var qe=we.challenge,rt=we.position,At=we.status,Mt=we.get_gold,vt=we.get_experience,at=we.star,Dt=we.tag_count,Ct=we.finished_time,_t=we.index,St=we.view_answer_time,Jt=we.name,Ft=we.identifier,It=we.identity,zt=we.shixun,qt=we.taskList,un=we.onSaveTaskStar,gn=Object(E.h)();function Cn(yn){un(Ft,yn,_t)}var Xn=At===2||zt.status<2||qt[_t-1]&&qt[_t-1].status===2||zt.task_pass||It<=5;return u.a.createElement("div",{className:"task-item-container ".concat(qe.position===rt?"active":""," ").concat(At===2?"finish":"")},u.a.createElement("div",{className:"flex-container challenge-title space-between"},Xn?u.a.createElement("a",{href:"/tasks/".concat(Ft).concat(gn.search),onClick:function(vn){vn.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(Ft).concat(gn.search)},300)}},"".concat(rt,". ").concat(Jt)," "):u.a.createElement("span",null,"".concat(rt,". ").concat(Jt)),u.a.createElement("i",{className:"iconfont icon-wancheng1 ".concat(At===2?"green":"")})),u.a.createElement("div",{className:"flex-container"},u.a.createElement("p",{className:At===2?"green":""},u.a.createElement("span",null,"\u7ECF\u9A8C\u503C")," ",At===2&&vt>0?"+":"",vt),u.a.createElement("p",{className:At===2?"green":""},u.a.createElement("span",null,"\u91D1\u5E01")," ",At===2&&Mt>0?"+":""," ",Mt),u.a.createElement("p",null,u.a.createElement("span",null,"\u6280\u80FD\u6807\u7B7E")," ",Dt||"\u65E0")),u.a.createElement("div",{className:"flex-container"},u.a.createElement("p",null,u.a.createElement("span",null,"\u5B8C\u6210\u65F6\u95F4"),Ct?te()(Ct).format(Ee):"--"),u.a.createElement("p",null,u.a.createElement("span",null,"\u67E5\u770B\u7B54\u6848\u65F6\u95F4"),St?te()(St).format(Ee):"--")),zt.status>=2?u.a.createElement("div",{className:"rate-container"},At===2&&at===0?u.a.createElement(h.Fragment,null,u.a.createElement("span",null,"\u7ED9\u4E2A\u8BC4\u5206\u5427\uFF1A"),u.a.createElement(oe.a,{defaultValue:0,onChange:Cn})):null,At===2&&at>0?u.a.createElement(h.Fragment,null,u.a.createElement("span",null,"\u5DF2\u8BC4\u5206\uFF1A"),u.a.createElement(oe.a,{value:at,disabled:!0}),u.a.createElement("span",{className:"highlight"},at,"\u5206")):null):null)},ge=function(we){var qe=we.taskList,rt=we.challenge,At=we.shixun,Mt=we.identity,vt=we.onSaveTaskStar,at=Object(E.h)().query;return u.a.createElement("div",{className:"task-nav-container"},!!at.coursesId&&u.a.createElement("p",{className:"task-tip"},u.a.createElement("div",null,u.a.createElement("span",null,"\u6E29\u99A8\u63D0\u793A: "),"\u82E5\u67E5\u770B\u7B54\u6848\u65F6\u95F4\u65E9\u4E8E\u5173\u5361\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4\uFF0C\u5C06\u5F71\u54CD\u8BFE\u5802\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u6210\u7EE9\u3002")),qe.map(function(Dt,Ct){var _t=Object(t.a)(Object(t.a)({},Dt),{},{identity:Mt,index:Ct,challenge:rt,taskList:qe,shixun:At,onSaveTaskStar:vt});return u.a.createElement(Le,Object(s.a)({key:Ct},_t))}))},De=b("88g3"),_e=b.n(De),Xe=b("V0Rq"),tt=b("lzim"),Ge=b("HBuW"),Me=function(){var we=Object(l.a)(f.a.mark(function qe(rt,At,Mt,vt,at){var Dt,Ct;return f.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Dt=function(){at?Object(Se.S)(Mt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)):window.location.href=Mt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)},!Mt){St.next=7;break}return St.next=4,Object(Ge.D)({id:rt,challenge_id:At,subject_id:vt});case 4:St.t0=St.sent,St.next=10;break;case 7:return St.next=9,Object(Ge.E)({id:rt,challenge_id:At,subject_id:vt});case 9:St.t0=St.sent;case 10:if(Ct=St.t0,!(Ct!=null&&Ct.game_identifier||Ct!=null&&Ct.identifier)){St.next=22;break}if(!(Ct!=null&&Ct.access)){St.next=16;break}Dt(),St.next=21;break;case 16:if(!((Ct==null?void 0:Ct.access)==!1)){St.next=20;break}return n.b.warn("\u5F53\u524D\u5B9E\u8BAD\u4E0D\u652F\u6301\u8DF3\u5173\uFF0C\u5DF2\u4E3A\u60A8\u8DF3\u8F6C\u5230\u8BE5\u5B9E\u8BAD\u672A\u901A\u8FC7\u7684\u7B2C\u4E00\u4E2A\u5173\u5361"),setTimeout(function(){Me(rt,"",Mt,vt,at)},1e3),St.abrupt("return");case 20:Dt();case 21:return St.abrupt("return");case 22:(Ct==null?void 0:Ct.status)===-3?Object(Se.q)():(Ct==null?void 0:Ct.status)===2?bt(Ct==null?void 0:Ct.message):(Ct==null?void 0:Ct.status)===3&&Oe(Ct==null?void 0:Ct.message);case 23:case"end":return St.stop()}},qe)}));return function(rt,At,Mt,vt,at){return we.apply(this,arguments)}}(),bt=function we(qe){var rt;qe=(rt=qe)!==null&&rt!==void 0&&rt.includes(".json")?qe:"".concat(qe,".json"),e.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:u.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var At=Object(l.a)(f.a.mark(function vt(){var at,Dt;return f.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Xe.T)({url:qe});case 2:if(at=_t.sent,at){_t.next=5;break}return _t.abrupt("return");case 5:return n.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),_t.next=8,Object(Ge.E)({id:at.shixun_identifier});case 8:if(Dt=_t.sent,!(Dt!=null&&Dt.game_identifier)){_t.next=12;break}return Object(Se.S)("/tasks/".concat(Dt.game_identifier)),_t.abrupt("return");case 12:(Dt==null?void 0:Dt.status)===2?we(Dt==null?void 0:Dt.message):(Dt==null?void 0:Dt.status)===3&&Oe(Dt==null?void 0:Dt.message);case 13:case"end":return _t.stop()}},vt)}));function Mt(){return At.apply(this,arguments)}return Mt}()})},Oe=function(qe){e.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:u.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",qe,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Ve=c.a.DirectoryTree,Je=function(we){var qe=we.taskList,rt=we.challenge,At=we.shixun,Mt=we.identity,vt=we.onSaveTaskStar,at=we.subject_id,Dt=Object(E.i)(),Ct=Object(E.h)().query,_t=Object(h.useState)([]),St=Object(r.a)(_t,2),Jt=St[0],Ft=St[1],It=Object(h.useState)([]),zt=Object(r.a)(It,2),qt=zt[0],un=zt[1],gn=Object(h.useState)(),Cn=Object(r.a)(gn,2),Xn=Cn[0],yn=Cn[1];Object(h.useEffect)(function(){vn(qe),un(gt({children:qe},rt.id)),Ft(Object(I.a)(qe)),console.log("taskList:",qe)},[qe]);var vn=function an(mn){mn.map(function(En,Fn){var zn;En.index=Fn,En.title=En.name,En.id==rt.id&&yn(En.key),(zn=En.children)!==null&&zn!==void 0&&zn.length&&an(En.children)})},nn=function(mn,En){console.log("Trigger Select",mn,En),En.node.shixun_identifier&&Me(En.node.shixun_identifier,En.node.key,!1,at)},Un=function(){console.log("Trigger Expand")};function gt(an,mn){var En;return!an||typeof an!="object"?void 0:an.id==mn?[]:an.children.some(function(Fn){return En=gt(Fn,mn)})?[].concat(Object(I.a)(En),[an.key]):void 0}return u.a.createElement("div",{className:"task-nav-container"},!!Ct.coursesId&&u.a.createElement("p",{className:"task-tip"},u.a.createElement("div",null,u.a.createElement("span",null,"\u6E29\u99A8\u63D0\u793A: "),"\u82E5\u67E5\u770B\u7B54\u6848\u65F6\u95F4\u65E9\u4E8E\u5173\u5361\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4\uFF0C\u5C06\u5F71\u54CD\u8BFE\u5802\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u6210\u7EE9\u3002")),!!(Jt!=null&&Jt.length)&&u.a.createElement("div",{style:{padding:10}},u.a.createElement(Ve,{className:_e.a.tree,icon:u.a.createElement("i",{className:"iconfont icon-wancheng1 "}),switcherIcon:u.a.createElement("i",{className:"iconfont icon-you1 ",style:{position:"relative",top:-2}}),onSelect:nn,onExpand:Un,selectedKeys:[Xn],defaultExpandedKeys:Object(I.a)(qt),treeData:Jt,titleRender:function(mn,En,Fn){return u.a.createElement("span",{className:"".concat(rt.id==mn.id?_e.a.active:""," multi_ellipsis1"),style:{paddingRight:34}},mn.item_type==="Shixun"&&u.a.createElement("i",{class:"iconfont icon-shixunti2 c-light-primary font20"}),mn.item_type==="Challenge"&&u.a.createElement("i",{style:{fontFamily:"monospace",position:"relative",top:mn.item_type==="Shixun"?-2:0}},"\uFF08",Se.l[mn.index],"\uFF09"),u.a.createElement("span",{style:{position:"relative",top:mn.item_type==="Shixun"||mn.item_type==="Stage"?-2:0}},mn==null?void 0:mn.name),mn.item_type!=="Stage"&&u.a.createElement("i",{className:"iconfont icon-tasks-img c-grey-999 ".concat((mn==null?void 0:mn.status)==1&&"c-green-29b")},((mn==null?void 0:mn.status)==1||(mn==null?void 0:mn.status)==0)&&u.a.createElement("img",{src:tt.f,width:"16"}),(mn==null?void 0:mn.status)==2&&u.a.createElement("img",{src:tt.g,width:"16"}),(mn==null?void 0:mn.status)==3&&u.a.createElement("img",{src:tt.h,width:"16"})))}})))},Ye=b("Plam"),Ne=b("gp9y"),He=b("Ot1p"),ve=function(we){var qe=we.user_praise,rt=we.praise_count,At=we.praisePlus,Mt=we.onCreateDiscuss,vt=we.user,at=we.userInfo,Dt=Object(h.useState)(!1),Ct=Object(r.a)(Dt,2),_t=Ct[0],St=Ct[1],Jt=Object(h.useState)(""),Ft=Object(r.a)(Jt,2),It=Ft[0],zt=Ft[1];function qt(yn){zt(yn)}function un(){St(!0)}function gn(){St(!1)}function Cn(){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(l.a)(f.a.mark(function yn(){return f.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(at!=null&&at.authentication){nn.next=3;break}return e.a.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:function(){window.open("/account/certification")}}),nn.abrupt("return");case 3:if(!(It.trim()=="")){nn.next=6;break}return n.b.warn("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),nn.abrupt("return");case 6:Mt(It),zt(""),St(!1);case 9:case"end":return nn.stop()}},yn)})),Xn.apply(this,arguments)}return u.a.createElement("div",{className:"comment-input-editor-container ".concat(_t?"active":""," ")},u.a.createElement("div",{className:_t?"text-area hide":"text-area"},u.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:un}),u.a.createElement("a",{className:"c-light-black",onClick:At,title:qe?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},u.a.createElement("i",{className:"mr3 ".concat(qe?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," "),alt:"\u8D5E"}),rt?u.a.createElement("span",null,rt):"")),_t?u.a.createElement("div",{className:"input-mask",onClick:gn}):null,u.a.createElement("div",{className:_t?"md-container":"md-container hide"},u.a.createElement(He.a,{id:"discuss-input-editor",startInit:_t,miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:It,height:240,onChange:qt}),u.a.createElement("div",{className:"tip-container",onClick:gn},u.a.createElement("p",null,"\u8BF7\u52FF\u7C98\u8D34\u7B54\u6848\uFF0C\u5426\u5219\u5C06\u9020\u6210\u8D26\u53F7\u7981\u7528\u540E\u679C\uFF01"),u.a.createElement("a",{className:"btn-send",style:{color:"#fff"},onClick:Cn},"\u53D1\u9001"))))},xe=b("dhSg"),de=b("/omn"),je=b("IxHN"),Qe=b("ARon"),ne=function(we){var qe=we.data;return u.a.createElement(h.Fragment,null,qe&&qe.map(function(rt){return u.a.createElement("div",{className:"choose-answer-item",key:rt.position},u.a.createElement("p",null,"\u7B2C",rt.position,"\u9898"),u.a.createElement(ae.a,{value:rt.answer}))}))},Ze=b("DVFL"),lt=function(we){var qe=we.data,rt=we.onShowUnlockAnswerModal,At=we.challenge,Mt=At!=null&&At.disable_copy?{pointerEvents:"none",userSelect:"none"}:{};return u.a.createElement(h.Fragment,null,qe&&qe.map(function(vt,at){var Dt=vt.answer_id,Ct=vt.answer_name,_t=vt.answer_contents,St=vt.view_time;return u.a.createElement("div",{className:"answer-item-container",style:Mt,key:Dt},u.a.createElement("div",{className:"flex-container"},u.a.createElement("span",{className:"level"}," \u7EA7\u522B",at+1,"\uFF1A "),u.a.createElement("span",{className:"name"},Ct),_t?u.a.createElement(h.Fragment,null,u.a.createElement("span",{className:"view-time"},St?te()(St).format("YYYY-MM-DD HH:mm"):""),u.a.createElement("span",null,"\u5DF2\u89E3\u9501")):u.a.createElement("a",{onClick:rt},"\u89E3\u9501")),_t?u.a.createElement(ae.a,{value:_t}):null)}))},Be=function(we){var qe=we.loading,rt=we.data,At=we.onShowTip,Mt=we.st,vt=we.challenge,at=Object(h.useRef)(null),Dt=Object(h.useRef)(null),Ct=Object(h.useRef)(null),_t=Object(h.useRef)(null),St=Object(h.useRef)({x:0,y:0});return Object(h.useEffect)(function(){if(at.current&&vt!==null&&vt!==void 0&&vt.disable_copy){function Jt(zt){St.current={x:zt.clientX,y:zt.clientY},clearTimeout(Ct.current),clearTimeout(_t.current),Ct.current=setTimeout(function(){Dt.current.style.left="".concat(St.current.x,"px"),Dt.current.style.top="".concat(St.current.y,"px"),Dt.current.style.display="block"},1e3),_t.current=setTimeout(function(){Dt.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)},3e3)}function Ft(){Dt.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)}function It(zt){St.current={x:zt.clientX,y:zt.clientY}}return at.current.addEventListener("mouseenter",Jt),window.addEventListener("mousemove",It),at.current.addEventListener("mouseleave",Ft),function(){at.current.removeEventListener("mouseenter",Jt),window.removeEventListener("mousemove",It),at.current.removeEventListener("mouseleave",Ft)}}},[at==null?void 0:at.current,vt==null?void 0:vt.disable_copy]),u.a.createElement("div",{ref:at,className:"answer-container"},u.a.createElement("div",{ref:Dt,className:"answer-tips-css"},"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848"),qe?u.a.createElement(je.a,null):null,Mt===1?u.a.createElement(ne,{data:rt}):u.a.createElement(lt,{data:rt,challenge:vt,onShowUnlockAnswerModal:At}))},$e=b("sRBo"),it=b("kaz8"),wt=b("gflZ"),pt=function(we){var qe=we.data,rt=we.selected_unlocked_answer_id,At=we.selected_index,Mt=we.onSelect;if(!qe)return null;var vt=qe.filter(function(Dt,Ct){return Dt.answer_contents?!1:(Dt.index=Ct,!0)});function at(Dt){var Ct=Dt.target,_t=Ct.value,St=Ct.checked;Mt(St?_t:null)}return u.a.createElement("table",{className:"unlock-answer-list"},u.a.createElement("thead",null,u.a.createElement("tr",null,u.a.createElement("th",null),u.a.createElement("th",null,"\u7EA7\u522B"),u.a.createElement("th",null,"\u540D\u79F0"),u.a.createElement("th",null,"\u6263\u5206\u5360\u6BD4"),u.a.createElement("th",null,"\u6263\u51CF\u91D1\u5E01"))),u.a.createElement("tbody",null,vt.map(function(Dt,Ct){return u.a.createElement("tr",{key:Dt.answer_id},u.a.createElement("td",null,u.a.createElement(it.a,{value:Dt.answer_id,onChange:at,checked:Dt.answer_id===rt||rt&&At>=Ct})),u.a.createElement("td",null,Dt.index+1),u.a.createElement("td",null,Dt.answer_name),u.a.createElement("td",null,Dt.answer_ratio,"%"),u.a.createElement("td",{className:"gold-color"},Dt.answer_score))})))},st=b("ErOA"),Pe=b("Q7Vx"),ze=function(we){var qe=we.unity_3d_routes,rt=we.onGetUnity3dMessage,At=we.onEvaluateCallback,Mt=we.taskData,vt=we.userInfo,at=Object(h.useRef)(),Dt=Object(E.i)(),Ct=Object(h.useRef)(),_t=Object(h.useState)(!0),St=Object(r.a)(_t,2),Jt=St[0],Ft=St[1],It=Object(h.useState)({}),zt=Object(r.a)(It,2),qt=zt[0],un=zt[1];Object(h.useEffect)(function(){function vn(Un){try{var gt=JSON.parse(Un.data);rt(gt),gt.type==="getTaskData"&&Xn({taskData:Mt,userInfo:vt})}catch(an){console.log("error:",an,Un)}}window.addEventListener("message",vn);var nn=xe.a.subscribe("evaluate-unity3d-result",function(Un){Xn(Un),At&&At()});return function(){clearTimeout(at.current),window.removeEventListener("message",vn),nn()}},[]),Object(h.useEffect)(function(){Mt.challenge.thiry_party&&gn();var vn=xe.a.subscribe("reset-linux-windos-vnc",function(){gn()}),nn=xe.a.subscribe("vnc-reseting",function(){un({}),Ft(!0)});return function(){nn(),vn()}},[Mt]);var gn=function(){var vn=Object(l.a)(f.a.mark(function nn(){var Un,gt,an,mn,En,Fn,zn,Hn;return f.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return cn.next=2,Object(st.a)("/api/myshixuns/".concat(Mt==null||((Un=Mt.myshixun)===null||Un===void 0)?void 0:Un.identifier,"/start.json"),{method:"get",params:{game_id:Mt==null||((gt=Mt.game)===null||gt===void 0)?void 0:gt.id}});case 2:if(En=cn.sent,Ft(!1),!(En!=null&&(an=En.data)!==null&&an!==void 0&&(mn=an.data_list)!==null&&mn!==void 0&&mn.length)){cn.next=7;break}return xe.a.publish("pod-restrict-data",{identifier:En==null||((Fn=En.data)===null||Fn===void 0)?void 0:Fn.identifier,data_list:En==null||((zn=En.data)===null||zn===void 0)?void 0:zn.data_list}),cn.abrupt("return");case 7:En!=null&&En.data&&(En.data.thiry_party_time=En.data.remaining_time,En.data.thiry_party_url=(En==null||((Hn=En.data)===null||Hn===void 0)?void 0:Hn.link_url)+"?t="+new Date().getTime(),un(Object(t.a)({},En.data||{}))),clearTimeout(at.current),at.current=setTimeout(function(){Cn()},En.data.thiry_party_time-30*1e3);case 10:case"end":return cn.stop()}},nn)}));return function(){return vn.apply(this,arguments)}}(),Cn=function(){var vn=Object(l.a)(f.a.mark(function nn(){var Un;return f.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(st.a)("/api/tasks/".concat(Dt.taskId||taskId,"/extend_linux_vnc.json"),{method:"post",body:Object(t.a)({},Dt)});case 2:Un=an.sent,clearTimeout(at.current),at.current=setTimeout(function(){Cn()},Un.data.remaining_time-30*1e3);case 5:case"end":return an.stop()}},nn)}));return function(){return vn.apply(this,arguments)}}();function Xn(vn){Ct.current&&Ct.current.contentWindow.postMessage(JSON.stringify(vn),"*")}function yn(){Ft(!1),xe.a.publish("unity3d-load-end")}return u.a.createElement(h.Fragment,null,Jt?u.a.createElement(je.a,{className:"c-white",message:"\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D..."}):null,(qe||qt.thiry_party_url)&&u.a.createElement("iframe",{onLoad:yn,className:"unity3d-panel",ref:Ct,allow:"geolocation document-domain",sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation",src:qe||qt.thiry_party_url}))},Et=b("BjJ7"),ht=b("kaH+");function Bt(we){var qe=we.target;if(qe.tagName.toUpperCase()==="IMG"){var rt=qe.src||qe.getAttribute("src");rt&&rt.indexOf("/images/avatars/User")===-1&&(we.stopPropagation(),we.preventDefault(),xe.a.publish("preview-image",rt))}}var Ht={showTaskList:!1,activeIndex:0,taskList:[],enlarge_unity3D:!1,tab_fixed:!1,selected_unlocked_answer_id:null,isMultiLevel:!1,showTip:!1,answerScore:0,data:null,loading:!1};function mt(we,qe){switch(qe.type){case be.A:return Object(t.a)(Object(t.a)({},we),{},{activeIndex:qe.payload});case be.bb:return Object(t.a)(Object(t.a)({},we),{},{enlarge_unity3D:qe.payload});case be.db:return Object(t.a)(Object(t.a)({},we),{},{tab_fixed:qe.payload});case be.Y:return Object(t.a)(Object(t.a)({},we),{},{showTaskList:!0});case be.s:return Object(t.a)(Object(t.a)({},we),{},{showTaskList:!1});case be.m:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.N:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.P:return Object(t.a)(Object(t.a)({},we),{},{loading:!0});case be.Z:return Object(t.a)(Object(t.a)({},we),{},{showTip:!0});case be.t:return Object(t.a)(Object(t.a)({},we),{},{showTip:!1});case be.y:return Object(t.a)(Object(t.a)({},we),{},{selected_unlocked_answer_id:qe.payload});case be.g:return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}var Xt=function(we){var qe=we.taskId,rt=we.minuxUserGrade,At=we.discusses_count,Mt=we.is_teacher,vt=we.has_answer,at=we.user,Dt=we.st,Ct=we.game,_t=we.rank_name,St=we.challenge,Jt=we.myshixun,Ft=we.user_praise,It=we.praise_count,zt=we.unity_3d_routes,qt=we.thiry_party_url,un=we.with_code_file,gn=we.onPlusOrCancelPraise,Cn=we.onEvaluateCallback,Xn=we.onGetUnity3dMessage,yn=we.shixun,vn=we.taskData,nn=Object(h.useReducer)(mt,Ht),Un=Object(r.a)(nn,2),gt=Un[0],an=Un[1],mn=Object(h.useState)(!1),En=Object(r.a)(mn,2),Fn=En[0],zn=En[1],Hn=Object(h.useState)(!1),dn=Object(r.a)(Hn,2),cn=dn[0],bn=dn[1],Mn=Object(h.useState)({}),sr=Object(r.a)(Mn,2),Br=sr[0],Tn=sr[1],ri=Object(E.h)().query,Ra=gt.taskList,Vi=gt.showTaskList,qr=gt.activeIndex,li=gt.enlarge_unity3D,Vn=gt.tab_fixed,kr=gt.data,Li=gt.answerScore,Ri=gt.loading,uo=gt.showTip,Da=gt.isMultiLevel,mi=gt.selected_unlocked_answer_id,za=Object(h.useMemo)(function(){var cr=0;if(kr&&mi){for(var Rr=kr.filter(function(Ei){return!Ei.answer_contents}),Dr=0;Dr1,activeIndex:Ei?qr:2}});case 12:case"end":return Ti.stop()}},cr)})),Pa.apply(this,arguments)}function Ga(cr){var Rr=cr.choose_answers,Dr=cr.message,Ei=cr.status;if(Ei===0){n.b.info(Dr);return}an({type:be.g,payload:{showTip:Ei===1,data:Rr,answerScore:Dr,loading:!1,activeIndex:Ei===1?qr:2}})}function Kr(){an({type:be.t})}function br(){an({type:be.Z})}function Ui(){return Po.apply(this,arguments)}function Po(){return Po=Object(l.a)(f.a.mark(function cr(){var Rr,Dr,Ei,Er,Ti;return f.a.wrap(function(Qa){for(;;)switch(Qa.prev=Qa.next){case 0:if(zn(!0),!(Dt===1)){Qa.next=8;break}return Qa.next=4,Object(he.r)(Ct.identifier);case 4:Rr=Qa.sent,(Rr==null?void 0:Rr.status)!==-1&&(rt(Li),Ga(Rr)),Qa.next=14;break;case 8:if(!mi){Qa.next=14;break}return Qa.next=11,Object(he.u)(Ct.identifier,mi);case 11:Dr=Qa.sent,Ei=Dr.status,Er=Dr.message,Ei===-1||(Da?(Ti=0,kr.filter(function(ds){return!ds.answer_contents}).forEach(function(ds,ro){ro<=za&&ds&&(Ti+=ds.answer_score)}),rt(Ti)):rt(Li),_o(),Va(null),an({type:be.t}));case 14:zn(!1);case 15:case"end":return Qa.stop()}},cr)})),Po.apply(this,arguments)}function Va(cr){an({type:be.y,payload:cr})}function ui(){return Ci.apply(this,arguments)}function Ci(){return Ci=Object(l.a)(f.a.mark(function cr(){var Rr,Dr;return f.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:if(Er.prev=0,!ri.subject_id){Er.next=7;break}return Er.next=4,Object(he.k)(Jt.identifier,Object(t.a)({},ri));case 4:Dr=Er.sent,Er.next=10;break;case 7:return Er.next=9,Object(he.o)(Jt.identifier);case 9:Dr=Er.sent;case 10:an({type:be.m,payload:{taskList:((Rr=Dr)===null||Rr===void 0?void 0:Rr.stages)||Dr,showTaskList:!0}}),Er.next=16;break;case 13:Er.prev=13,Er.t0=Er.catch(0),console.log(Er.t0);case 16:case"end":return Er.stop()}},cr,null,[[0,13]])})),Ci.apply(this,arguments)}function fa(cr,Rr,Dr){return ua.apply(this,arguments)}function ua(){return ua=Object(l.a)(f.a.mark(function cr(Rr,Dr,Ei){return f.a.wrap(function(Ti){for(;;)switch(Ti.prev=Ti.next){case 0:return Ti.prev=0,Ti.next=3,Object(he.H)(Rr,yn.id,Dr);case 3:Ra[Ei].star=Dr,an({type:be.N,payload:{taskList:Object(I.a)(Ra)}}),Ti.next=10;break;case 7:Ti.prev=7,Ti.t0=Ti.catch(0),console.log(Ti.t0);case 10:case"end":return Ti.stop()}},cr,null,[[0,7]])})),ua.apply(this,arguments)}function Ya(){ui()}function to(){an({type:be.s})}Object(h.useEffect)(function(){if(!(yn!=null&&yn.identifier))return;var cr=Object(q.t)({objective_type:"shixun",objective_id:yn==null?void 0:yn.identifier,school:1});cr.then(function(Rr){var Dr;Tn(Object(t.a)({},Rr)),bn(Rr==null||((Dr=Rr.shixun)===null||Dr===void 0)?void 0:Dr.own)})},[yn==null?void 0:yn.identifier]),Object(h.useEffect)(function(){return function(){an({type:be.s}),an({type:be.A,payload:0})}},[qe]),Object(h.useEffect)(function(){an({type:be.A,payload:ri.extra?3:0})},[ri.extra]),Object(h.useEffect)(function(){if(la.current)return la.current.addEventListener("mousedown",Bt),function(){la.current.removeEventListener("mousedown",Bt)}},[la.current]),Object(h.useEffect)(function(){if((un&&zt||qt)&&la.current){var cr=Object(Et.b)(function(Dr){var Ei=Dr.target.scrollTop;Ei>=354?an({type:be.db,payload:!0}):an({type:be.db,payload:!1})},10);la.current.addEventListener("scroll",cr);var Rr=xe.a.subscribe("evaluate-unity3d-finish",function(){la.current.scrollTop=0});return function(){la.current.removeEventListener("scroll",cr),Rr()}}},[un,zt,qt,la.current]);var wa=St.position,Na=St.score,no=St.subject,ci={onViewAllTask:Ya,position:wa,score:Na,subject:no};function Pr(cr){return Sr.apply(this,arguments)}function Sr(){return Sr=Object(l.a)(f.a.mark(function cr(Rr){var Dr;return f.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,Object(ie.b)({content:Rr,container_type:"Shixun",container_id:yn.id,challenge_id:St.id,position:wa});case 2:if(Dr=Er.sent,!(Dr.status===-3)){Er.next=6;break}return e.a.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),Er.abrupt("return");case 6:console.log(Dr),an({type:be.A,payload:3}),xe.a.publish("create-discuss");case 9:case"end":return Er.stop()}},cr)})),Sr.apply(this,arguments)}function Bi(){an({type:be.bb,payload:!li})}var Ki={loading:Ri,data:kr,onShowTip:br,st:Dt,challenge:St};return u.a.createElement(h.Fragment,null,u.a.createElement(A,ci),u.a.createElement("div",{className:"content-wrapper",ref:la},zt&&un?u.a.createElement("div",{className:"unity-3d-container ".concat(li?"enlarge":"")},u.a.createElement("a",{onClick:Bi,className:"btn-enlarge ".concat(li?"enlarge":"")},u.a.createElement("i",{className:"iconfont ".concat(li?"icon-suoxiao1":"icon-kuoda"," ")})),(Br==null?void 0:Br.user_id)&&u.a.createElement(ze,{userInfo:Br,taskData:vn,unity_3d_routes:zt,onGetUnity3dMessage:Xn,onEvaluateCallback:Cn})):null,u.a.createElement("ul",{className:"tab-nav ".concat(Vn?"tab-fixed":"")},co.map(function(cr){return u.a.createElement("li",{onClick:ya,id:cr.index,key:cr.title,className:qr===cr.index?"active":""},u.a.createElement("a",null,cr.title,cr.index===3&&At?u.a.createElement("span",null,At):null))})),u.a.createElement("div",{className:qr===0?"tab-panel-body ".concat(zt&&un?"scroll-margin-top":""):"hide"},u.a.createElement(ae.a,{value:St.task_pass})),u.a.createElement("div",{className:qr===1?"tab-panel-body":"hide"},na?u.a.createElement(ae.a,{value:na}):null),u.a.createElement("div",{className:qr===2?"tab-panel-body":"hide",style:{padding:"0 0 20px 0"}},u.a.createElement(Be,Ki)),u.a.createElement("div",{className:qr===3?"tab-panel-body":"hide"},u.a.createElement(Ye.a,{activeIndex:qr,userInfo:Br,shixunIdentifier:yn.identifier,identity:at.identity,user:at,allowDisableDiscuss:cn,taskData:vn})),u.a.createElement("div",{className:qr===4?"tab-panel-body":"hide"},u.a.createElement(se,{activeIndex:qr,taskId:qe})),ri.type!=="exercises"&&!(yn!=null&&yn.is_disable_discuss)&&!Ct.homework_common_comment_open&&u.a.createElement(ve,{user:at,userInfo:Br,user_praise:Ft,praise_count:It,praisePlus:gn,onCreateDiscuss:Pr})),u.a.createElement(fe.a,null,u.a.createElement(T.a,{className:"task-drawer",width:420,title:null,placement:"left",closable:!1,visible:Vi,onClose:to,getContainer:function(){return document.getElementById("task-left-panel")}},ri.subject_id&&u.a.createElement(Je,Object(s.a)({taskList:Object(I.a)(Ra),challenge:St,shixun:yn},ri,{identity:at.identity,onSaveTaskStar:fa})),!ri.subject_id&&u.a.createElement(ge,{taskList:Object(I.a)(Ra),challenge:St,shixun:yn,identity:at.identity,onSaveTaskStar:fa})),u.a.createElement(e.a,{centered:!0,title:"\u63D0\u793A",visible:uo,onOk:Ui,onCancel:Kr,confirmLoading:Fn,className:"answer-tip"},Mt?u.a.createElement("p",null,"\u5DF2\u7ECF\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7684\u6559\u5E08\u53EF\u4EE5\u514D\u91D1\u5E01\u67E5\u770B\u7B54\u6848\u54DF~"):u.a.createElement("p",null,"\u5148\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF0C\u518D\u901A\u8FC7\u8BC4\u6D4B\u7684\u5B66\u751F\uFF0C\u5B9E\u8BAD\u4F5C\u4E1A\u6709\u53EF\u80FD\u662F\u96F6\u5206\u54E6~"),Da?u.a.createElement(pt,{selected_index:za,selected_unlocked_answer_id:mi,onSelect:Va,data:kr}):u.a.createElement("p",null,"\u5C06\u6263\u9664".concat(Li,"\u70B9\u91D1\u5E01\uFF0C\u662F\u5426\u786E\u8BA4\u67E5\u770B\u7B54\u6848")),Mt?u.a.createElement("a",{href:"/account/certification",class:"to-certification-link",target:"_blank"},"\u7ACB\u5373\u8BA4\u8BC1"):null),u.a.createElement(ht.a,null)))},jt=b("+L6B"),Ut=b("2/Rp"),kt=b("aHsQ"),Kt=b("sGsY"),rn=b("55Ip"),Gt=b("6/vW"),$t=b("8Enf"),Ln=b("P2fV"),pn=b("NJEC"),Dn=b("5Dmo"),sn=b("3S7+"),Sn=b("fxth"),Kn=b.n(Sn),Qn=b("RCxd"),Vt=b("S+dL"),wn=b.n(Vt),$n=b("dViP"),ir=b("Bwpq"),Tr=b("H4Hw"),qn=b("Scqh"),ce=b("P5Jw"),V=b("LvDl");function J(we){var qe=we.onShowNotice,rt=we.className,At=rt===void 0?"":rt;return u.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:qe,className:At},u.a.createElement("img",{src:wn.a,alt:"notice"}))}var ee=function(we){var qe,rt=we.loading,At=we.lastedUpdateTime,Mt=we.moveY,vt=we.code_hidden,at=we.hide_code,Dt=we.gameStatus,Ct=we.isEditPath,_t=we.isNotice,St=we.git_url,Jt=we.taskData,Ft=we.onUpdateCode,It=we.onResetCode,zt=we.onResetGitCode,qt=we.onShowCodeSetting,un=we.onResetPassedCode,gn=we.onShowDir,Cn=we.onResizeCodeArea,Xn=we.onShowNotice,yn=we.onRightFullHandler,vn=we.isResizeLarge,nn=Object(E.i)(),Un=Object(E.h)(),gt=Object(h.useState)(!1),an=Object(r.a)(gt,2),mn=an[0],En=an[1];Object(h.useEffect)(function(){var cn=xe.a.subscribe("runCodeFinish",function(){En(!1)});return function(){cn()}},[]);var Fn=function(){e.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:u.a.createElement(Qn.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:It})},zn=function(){e.a.confirm({title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",icon:u.a.createElement(Qn.a,null),content:"\u60A8\u7684\u6240\u6709\u4EE3\u7801\u5C06\u88AB\u8FD8\u539F\u81F3\u521D\u59CB\u72B6\u6001\uFF0C\u4E0D\u5F71\u54CD\u901A\u5173\u72B6\u6001\u4E0E\u4F5C\u4E1A\u6210\u7EE9\u3002\u786E\u8BA4\u91CD\u7F6E\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:zt})},Hn=function(){var cn=Object(l.a)(f.a.mark(function bn(){return f.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(!mn){sr.next=2;break}return sr.abrupt("return");case 2:Ft(),Object(he.v)(nn.taskId),En(!0),xe.a.publish("show-case-result",!0),setTimeout(function(){xe.a.publish("runCode",{type:"start"})},100);case 7:case"end":return sr.stop()}},bn)}));return function(){return cn.apply(this,arguments)}}(),dn=function(){var cn=Object(l.a)(f.a.mark(function bn(){return f.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(mn){sr.next=2;break}return sr.abrupt("return");case 2:Object(he.J)(nn.taskId),En(!1),xe.a.publish("runCode",{type:"stop"});case 5:case"end":return sr.stop()}},bn)}));return function(){return cn.apply(this,arguments)}}();return u.a.createElement(h.Fragment,null,u.a.createElement("span",{className:"".concat(Kn.a["edit-status"]," ml15")},rt?"\u4FDD\u5B58\u4E2D...":At===0?"\u5DF2\u4FDD\u5B58":"\u5DF2\u4FEE\u6539"),u.a.createElement("div",{className:Kn.a["action-bar"]},_t?u.a.createElement(sn.a,{visible:!0,title:u.a.createElement("span",{style:{color:"#000"}},"\u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u6709\u66F4\u65B0\u5566\uFF5E"),color:"#fff"},u.a.createElement(J,{onShowNotice:Xn})):null,at!==2&&u.a.createElement(u.a.Fragment,null,vt?null:u.a.createElement("a",{title:"\u663E\u793A\u76EE\u5F55",onClick:gn},u.a.createElement("i",{className:"iconfont icon-wenjian "})),St?u.a.createElement(ce.CopyToClipboard,{text:St,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("a",{title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"},u.a.createElement("i",{className:"iconfont icon-fuzhi2"}))):null,Dt===2&&Ct?u.a.createElement(pn.a,{placement:"bottomRight",title:"\u4F60\u5728\u672C\u5173\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u4E0A\u6B21\u901A\u8FC7\u7684\u4EE3\u7801?",onConfirm:un},u.a.createElement("a",{title:"\u52A0\u8F7D\u4E0A\u6B21\u901A\u8FC7\u7684\u4EE3\u7801"},u.a.createElement("i",{className:"iconfont icon-fanhuishangcidaima font-20 "}))):null,Ct?u.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Fn},u.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})):null,Ct&&u.a.createElement("a",{title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",onClick:zn},u.a.createElement("i",{className:"iconfont icon-zhongzhidaimacangku font12 "})),u.a.createElement("a",{onClick:qt,title:"\u8BBE\u7F6E"},u.a.createElement("i",{className:"iconfont icon-shezhi"}))),!((Un==null||((qe=Un.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:yn,title:vn?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:vn?"iconfont icon-shousuo":"iconfont icon-zhankai"}))))},Te=b("14J3"),ue=b("BMrR"),nt=b("jCWc"),Lt=b("kPKH"),Yt=b("UlFV"),on=b("hjEz"),Qt=b("9VGf"),In=b("Mm8t"),Gn=b.n(In),lr=b("9kvl"),Ar=function(we){var qe,rt=we.isNotice,At=we.moveY,Mt=we.isActive,vt=we.tabIndex,at=we.webssh,Dt=we.socketKeys,Ct=we.onCloseSocket,_t=we.onReCreateSocket,St=we.onShowNotice,Jt=we.sshConfigData,Ft=we.onResizeCodeArea,It=we.shixun,zt=we.onRightFullHandler,qt=we.isResizeLarge;console.log("sshConfigData:",Jt);var un=Object(E.h)();return u.a.createElement("div",{className:"action-bar"},rt?u.a.createElement(J,{onShowNotice:St}):null,at===3?u.a.createElement(ar,{sshConfigData:Jt,tabIndex:vt,isActive:Mt,socketKeys:Dt,onReCreateSocket:_t,onCloseSocket:Ct,shixun:It}):Jt!=null&&Jt.remaining_time?u.a.createElement(ar,{sshConfigData:Jt,tabIndex:vt,isActive:Mt,socketKeys:Dt,onReCreateSocket:_t,onCloseSocket:Ct,shixun:It}):null,!((un==null||((qe=un.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:zt,title:qt?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:qt?"iconfont icon-shousuo":"iconfont icon-zhankai"})))},vr=300;function ar(we){var qe=we.isActive,rt=we.socketKeys,At=we.webssh,Mt=we.onCloseSocket,vt=we.onReCreateSocket,at=we.sshConfigData,Dt=we.tabIndex,Ct=we.shixun,_t=(at==null?void 0:at.remaining_time)/1e3,St=Object(h.useState)(At===3?1800:_t),Jt=Object(r.a)(St,2),Ft=Jt[0],It=Jt[1],zt=Object(h.useState)(!1),qt=Object(r.a)(zt,2),un=qt[0],gn=qt[1],Cn=Ct.identifier;Object(Qt.a)(function(){It(Ft-1)},qe&&Ft>0?1e3:null),Object(h.useEffect)(function(){var Hn=xe.a.subscribe("on-operating-ssh",function(){(Ct==null?void 0:Ct.webssh)!=3&&It(_t)}),dn=xe.a.subscribe("update-windows-time",function(bn){It(parseInt(bn.remaining_time/1e3))}),cn=xe.a.subscribe("on-recreate-socket",function(){vt()});return function(){dn(),Hn(),cn()}},[]);function Xn(){lr.d.replace("/shixuns/".concat(Cn,"/challenges"))}function yn(){e.a.confirm({title:"\u547D\u4EE4\u884C\u91CD\u8FDE\u63D0\u9192",icon:u.a.createElement(Qn.a,null),content:"\u7531\u4E8E\u957F\u65F6\u95F4\u6CA1\u6709\u4F7F\u7528\uFF0C\u8D44\u6E90\u5DF2\u7ECF\u88AB\u56DE\u6536\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u91CD\u8FDE\u547D\u4EE4\u884C\u3002",centered:!0,okText:"\u91CD\u8FDE",cancelText:"\u9000\u51FA",onOk:an,onCancel:Xn})}var vn=function(){e.a.confirm({title:"\u91CD\u7F6E\u547D\u4EE4\u884C",icon:u.a.createElement(Qn.a,null),content:"\u5B9E\u9A8C\u73AF\u5883\u5C06\u6062\u590D\u5230\u521D\u59CB\u72B6\u6001\uFF0C\u662F\u5426\u786E\u8BA4\u91CD\u7F6E\u5B9E\u9A8C\u73AF\u5883?",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:mn})};Object(h.useEffect)(function(){Ft===0&&(Ct.webssh!=3&&yn(),rt.forEach(function(Hn){xe.a.publish("close-socket",Hn)})),Ft===vr&&Ct.webssh!=3&&gn(!0)},[Ft]);function nn(){gn(!1)}function Un(){Ct.webssh!=3&&gn(!0)}function gt(){It(_t),xe.a.publish("ssh-add-connect-time"),gn(!1)}function an(){It(_t),xe.a.publish("create-socket",Dt)}function mn(){return En.apply(this,arguments)}function En(){return En=Object(l.a)(f.a.mark(function Hn(){return f.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return rt.forEach(function(bn){xe.a.publish("close-socket",bn)}),cn.next=3,Mt();case 3:It(_t),vt();case 5:case"end":return cn.stop()}},Hn)})),En.apply(this,arguments)}var Fn=function(){e.a.confirm({title:"\u670D\u52A1\u9884\u89C8",content:"\u201C\u670D\u52A1\u9884\u89C8\u201D\u4F1A\u8BBF\u95EE\u547D\u540D\u884C\u5BB9\u5668\u76848081\u7AEF\u53E3\uFF0C\u5982\u679C\u7AEF\u53E3\u672A\u542F\u52A8\u4F1A\u5BFC\u81F4\u9884\u89C8\u5931\u8D25",okText:"\u7EE7\u7EED\u524D\u5F80",cancelText:"\u53D6\u6D88",onOk:function(){Object(Se.S)(at==null?void 0:at.mapping_service_url)}})},zn=function(){e.a.info({title:"SSH\u76F4\u8FDE",width:600,centered:!0,content:u.a.createElement(u.a.Fragment,null,u.a.createElement(ue.a,null,u.a.createElement(Lt.a,{flex:"50px"},"\u8D26\u53F7"),u.a.createElement(Lt.a,null,at==null?void 0:at.username)),u.a.createElement(ue.a,null,u.a.createElement(Lt.a,{flex:"50px"},"\u5730\u5740"),u.a.createElement(Lt.a,null,at==null?void 0:at.ssh_address)),u.a.createElement(ue.a,null,u.a.createElement(Lt.a,{flex:"50px"},"\u7AEF\u53E3"),u.a.createElement(Lt.a,null,at==null?void 0:at.port)),u.a.createElement(ue.a,null,u.a.createElement(Lt.a,{flex:"50px"},"\u5BC6\u7801"),u.a.createElement(Lt.a,null,at==null?void 0:at.password)))})};return u.a.createElement(h.Fragment,null,Ft>0&&Ft<=vr&&Ct.webssh!=3?u.a.createElement(xr,{title:"\u8D44\u6E90\u56DE\u6536\u5012\u8BA1\u65F6\uFF0C\u70B9\u51FB\u53EF\u5EF6\u957F\uFF08\u6216\u8005\u64CD\u4F5C\u547D\u4EE4\u884C\u81EA\u52A8\u5EF6\u957F\uFF09",className:"c-red",time:Ft,style:{display:"inline-block",margin:"0 10px 1px 0"},callback:Un}):null,(at==null?void 0:at.mapping_service_url)&&u.a.createElement("a",{target:"_blank",onClick:function(dn){dn.preventDefault(),Fn()},href:at==null?void 0:at.mapping_service_url},u.a.createElement(on.a,{className:"font14 c-blue"}),u.a.createElement("span",{className:"c-blue"}," \u670D\u52A1\u9884\u89C8")),u.a.createElement("a",{onClick:vn},u.a.createElement("i",{className:"iconfont icon-zhongzhi2 font-16 "}),u.a.createElement("span",null," \u91CD\u7F6E\u547D\u4EE4\u884C")),u.a.createElement("a",{onClick:zn},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-congshulianjie font-16 "}),"SSH\u76F4\u8FDE")),u.a.createElement(fe.a,null,u.a.createElement(e.a,{centered:!0,title:[u.a.createElement(Qn.a,{className:"modalIconYellow"}),"\u547D\u4EE4\u884C\u8FDE\u63A5\u65F6\u957F\u63D0\u9192"],wrapClassName:"customModalStyle",closable:!1,visible:un&&Ft>0,onOk:gt,onCancel:nn,okText:"\u7ACB\u5373\u5EF6\u957F",cancelText:"\u4E0D\u9700\u8981"},"\u547D\u4EE4\u884C\u5C06\u4E8E ",Math.round(Ft/60)," \u5206\u949F\u540E\u4E2D\u65AD\uFF0C\u9700\u8981\u5EF6\u957F\u4F7F\u7528\u65F6\u95F4\u5417\uFF1F")))}function xr(we){var qe=we.title,rt=we.time,At=we.className,Mt=At===void 0?"":At,vt=we.callback,at=we.desc,Dt=at===void 0?"":at,Ct=we.style,_t=Ct===void 0?{}:Ct;function St(){vt&&vt()}return u.a.createElement("a",{onClick:St,title:qe,className:Mt},u.a.createElement("img",{src:Gn.a,alt:"time",width:16,style:_t}),u.a.createElement("span",null,Dt?"".concat(Dt,"\uFF1A"):"",Object(Gt.b)(rt)))}var qi=b("5NDa"),Gr=b("5rEg"),ai=b("lOMy"),da=b("GIiI"),Fi=b("vS10"),ia=b("500L"),Ca=b("m3rI"),po=Object(h.forwardRef)(function(we,qe){var rt=we.time;console.log("ScreenRecord:",qe);var At=Object(h.useRef)(),Mt=Object(h.useState)(),vt=Object(r.a)(Mt,2),at=vt[0],Dt=vt[1],Ct=Object(h.useRef)(),_t=2e3,St=[];Object(h.useImperativeHandle)(qe,function(){return{startScreenRecord:zt,downloadFile:It}});function Jt(qt,un){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(l.a)(f.a.mark(function qt(un,gn){var Cn,Xn;return f.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return Cn=[],vn.next=3,new MediaRecorder(un);case 3:Xn=vn.sent,Xn.ondataavailable=function(nn){Cn.push(nn.data)},Xn.start(),Ct.current=Xn,window.recorderRefs=Xn,Xn.addEventListener("stop",function(nn){var Un=URL.createObjectURL(Cn[0],{type:"video/mp4"});Object(Se.x)("xxx.webm",Un)});case 9:case"end":return vn.stop()}},qt)})),Ft.apply(this,arguments)}function It(){if(!window.recorderRefs){n.b.warn("\u60A8\u8FD8\u6CA1\u6709\u5F00\u542F\u89C6\u9891\u5F55\u5236\uFF0C\u8BF7\u5148\u53BB\u5F55\u5236\u89C6\u9891\u5427\uFF01");return}var qt=At.current.srcObject.getTracks();qt.forEach(function(un){un.stop()}),window.recorderRefs.addEventListener("dataavailable",function(un){var gn=URL.createObjectURL(un.data,{type:"video/mp4"});Object(Se.x)("\u5C4F\u5E55\u5F55\u5236\u89C6\u9891.webm",gn)})}function zt(){navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}).then(function(qt){return At.current.srcObject=qt,St.push(qt),At.current.captureStream=At.current.captureStream||At.current.mozCaptureStream,new Promise(function(un){return At.current.onplaying=un})}).then(function(){return Jt(At.current.captureStream(),_t)}).then(function(qt){}).catch(function(qt){qt.name==="NotFoundError"?n.b.warn("\u627E\u4E0D\u5230\u6444\u50CF\u5934\u6216\u9EA6\u514B\u98CE\u3002\u65E0\u6CD5\u5F55\u5236."):n.b.warn(qt.name)})}return u.a.createElement("div",{style:{position:"absolute",top:"0",zIndex:-1}},u.a.createElement("video",{onPause:function(){},width:"60",height:"120",autoPlay:!0,muted:!0,ref:At}))}),so=po,xo={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},ka=function(we){var qe=we.className,rt=we.mirror_description,At=we.git_url,Mt=we.difficulty,vt=we.task_pass,at=we.test_set_permission,Dt=we.onVncAction,Ct=we.shixun,_t=we.window_vnc_url,St=we.linux_vnc,Jt=we.vnc_url,Ft=we.position,It=we.unity_3d_routes,zt=Object(E.i)(),qt=Object(h.useState)("8082"),un=Object(r.a)(qt,2),gn=un[0],Cn=un[1],Xn=Object(h.useState)(!1),yn=Object(r.a)(Xn,2),vn=yn[0],nn=yn[1],Un=Object(h.useRef)(),gt=_t?"C:/Windows/AppReadiness/userfiles":"/data/workspace/userfiles",an=_t?"C:/Windows/AppReadiness/downloadfiles":"/data/workspace/downloadfiles",mn=function(){e.a.confirm({title:"\u91CD\u542F\u4E91\u4E3B\u673A",icon:u.a.createElement(Qn.a,null),content:"\u60A8\u786E\u5B9A\u8981\u91CD\u542F\u4E91\u4E3B\u673A\u5417\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var cn=Object(l.a)(f.a.mark(function Mn(){var sr;return f.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Object(Fi.f)({identifier:zt.taskId});case 2:return sr=Tn.sent,(sr==null?void 0:sr.status)===0&&n.b.info("\u91CD\u542F\u6210\u529F"),Tn.abrupt("return","");case 5:case"end":return Tn.stop()}},Mn)}));function bn(){return cn.apply(this,arguments)}return bn}()})},En=function(){e.a.info({title:"\u6587\u4EF6\u4E0A\u4F20",icon:null,okText:"\u5173\u95ED",width:600,centered:!0,content:u.a.createElement("div",{className:"pt10"},u.a.createElement(ia.b,{isDragger:!0,maxSize:20,additionalText:'\u9ED8\u8BA4\u5B58\u653E\u76EE\u5F55\u8DEF\u5F84\u4E3A"'.concat(gt,'"'),action:"".concat(Ca.a.API_SERVER,"/api/tasks/").concat(zt.taskId,"/upload_file?debug=admin"),onChange:function(bn){bn.some(function(Mn){var sr;return((sr=Mn.response)===null||sr===void 0?void 0:sr.status)===0})&&(e.a.destroyAll(),n.b.info("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),console.log("fileList:",bn)}}))})},Fn=function(){e.a.confirm({title:"\u4E0B\u8F7D\u4EE3\u7801",centered:!0,width:600,content:"\u4EE3\u7801\u4E0B\u8F7D\u529F\u80FD\uFF1A\u5C06\u201C".concat(an,"\u201D\u76EE\u5F55\u8FDB\u884C\u6253\u5305\u5E76\u4E0B\u8F7D"),onOk:function(){var cn=Object(l.a)(f.a.mark(function Mn(){return f.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(st.a)("/api/tasks/".concat(zt.taskId,"/download_file?debug=admin"),{method:"post",body:{autoDownload:!0},headers:{responseType:"arraybuffer",Accept:"application/vnd.ms-excel;charset=utf-8"}});case 2:return Br.abrupt("return",!0);case 3:case"end":return Br.stop()}},Mn)}));function bn(){return cn.apply(this,arguments)}return bn}()})},zn=function(){var cn,bn;(cn=Un.current)===null||cn===void 0||((bn=cn.startScreenRecord)===null||bn===void 0)||bn.call(cn)},Hn=function(){var dn=Object(l.a)(f.a.mark(function cn(){var bn,Mn,sr;return f.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return nn(!0),Tn.next=3,Object(st.a)("/api/tasks/".concat(zt.taskId,"/port_proxy"),{method:"post",body:{port:gn,position:Ft}});case 3:Mn=Tn.sent,Mn!=null&&(bn=Mn.data)!==null&&bn!==void 0&&bn.url&&Object(Se.S)(Mn==null||((sr=Mn.data)===null||sr===void 0)?void 0:sr.url),nn(!1);case 6:case"end":return Tn.stop()}},cn)}));return function(){return dn.apply(this,arguments)}}();return u.a.createElement("div",{className:"tpi-code-setting ".concat(qe)},u.a.createElement("h3",null,"\u529F\u80FD"),u.a.createElement("section",null,u.a.createElement("a",{id:"full-screen",title:"\u5168\u5C4F",className:"file-item action",onClick:function(){Dt("full-screen")}}," ",u.a.createElement("i",{className:"iconfont icon-quanping"}),"\u5F00\u542F / \u9000\u51FA\u5168\u5C4F"," "),u.a.createElement("a",{id:"reset-task",onClick:function(){return Dt("reset-task")},className:"file-item action",title:"\u91CD\u7F6E\u5B9E\u8BAD"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u5B9E\u8BAD"," "),u.a.createElement("a",{id:"reset-code",onClick:function(){return Dt("reset-code")},className:"file-item action",title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"," "),!It&&u.a.createElement(u.a.Fragment,null," ",(_t||St||Jt||(Ct==null?void 0:Ct.hide_code)===2||(Ct==null?void 0:Ct.webssh)===3)&&u.a.createElement(u.a.Fragment,null,u.a.createElement("a",{onClick:function(){return En()},className:"file-item action",title:"\u4E0A\u4F20\u6587\u4EF6"}," ",u.a.createElement("i",{className:"iconfont icon-shangchuanshipin1"}),"\u4E0A\u4F20\u6587\u4EF6"),u.a.createElement("a",{onClick:function(){return Fn()},className:"file-item action",title:"\u4E0B\u8F7D\u6587\u4EF6"}," ",u.a.createElement("i",{className:"iconfont icon-xiazai3"}),"\u4E0B\u8F7D\u6587\u4EF6"),u.a.createElement("a",{onClick:function(){return zn()},className:"file-item action",title:"\u5C4F\u5E55\u5F55\u5236"}," ",u.a.createElement("i",{className:"iconfont icon-jiaruketang1"}),"\u5C4F\u5E55\u5F55\u5236"),u.a.createElement("a",{className:"file-item action w100",title:"\u670D\u52A1\u9884\u89C8"}," ",u.a.createElement("i",{className:"iconfont icon-suanfasheji"}),u.a.createElement(ue.a,{align:"middle",className:"w100"},u.a.createElement(Lt.a,{flex:"1",onClick:Hn},u.a.createElement(Ut.a,{type:"text",loading:vn},u.a.createElement("span",{style:{color:"#ddd",marginLeft:-11}},"\u670D\u52A1\u9884\u89C8"))),u.a.createElement(Lt.a,null,u.a.createElement("a",{href:"javascript:;",onClick:Hn,className:"c-blue"},"\u7AEF\u53E3\u53F7")," ",u.a.createElement(Gr.a,{onChange:function(cn){return Cn(cn.target.value)},style:{width:50},value:gn}))))),_t&&u.a.createElement("a",{id:"reset-task",onClick:mn,className:"file-item action",title:"\u91CD\u542F\u4E91\u4E3B\u673A"}," ",u.a.createElement(da.a,{style:{marginRight:21,color:"#FFF"},className:"c-white font16"}),"\u91CD\u542F\u4E91\u4E3B\u673A"," "),(Ct==null?void 0:Ct.hide_code)!==2&&u.a.createElement("a",{id:"reset-task",onClick:function(){return Dt("reset-code")},className:"file-item action",title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhi font20",style:{marginRight:19}}),"\u6062\u590D\u521D\u59CB\u4EE3\u7801"," "),At?u.a.createElement(ce.CopyToClipboard,{text:At,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("a",{id:"copy-git",title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740",className:"file-item action"}," ",u.a.createElement("i",{className:"iconfont icon-fuzhibanbenkudizhi1"}),"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"," ")):null,!_t&&!St&&u.a.createElement("a",{id:"copy-cliboard",className:"file-item action",onClick:function(){Dt("show-clipboard-box")}}," ",u.a.createElement("i",{className:"iconfont icon-fuzhiniantie"}),"\u590D\u5236\u7C98\u8D34"," "))),u.a.createElement("h3",null,"\u5173\u5361\u914D\u7F6E\u4FE1\u606F"),u.a.createElement("section",null,u.a.createElement("a",{className:"file-item",title:vt?"\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218":"\u4E0D\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218"},u.a.createElement("b",null,"\u8DF3\u5173"),u.a.createElement("span",null,vt?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),u.a.createElement("a",{className:"file-item",title:at?"\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9":"\u4E0D\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9"},u.a.createElement("b",null,"\u6D4B\u8BD5\u96C6\u89E3\u9501"),u.a.createElement("span",null,at?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8"))),u.a.createElement("h3",null,"\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F"),u.a.createElement("section",null,u.a.createElement("div",{className:"file-item"},u.a.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),u.a.createElement("span",null,xo[Mt])),u.a.createElement("div",{className:"file-item",style:{alignItems:"flex-start"}},u.a.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),u.a.createElement("span",{className:"vnc-desc",title:rt==null?void 0:rt.join(" ")},rt==null?void 0:rt.join(" ")))),u.a.createElement(so,{ref:Un}))},Yi=b("l9Ud"),Nr=b.n(Yi),Qr;(function(we){we.Classrooms="classrooms",we.Shixuns="shixuns",we.Paths="paths",we.Projects="projects",we.Videos="videos",we.Topics="topics",we.Teach="teach-group"})(Qr||(Qr={}));var yi=function(qe){var rt=qe.userDetail,At=qe.user,Mt=qe.globalSetting,vt=qe.loading,at=qe.dispatch,Dt=qe.onClose,Ct=qe.shixun,_t=Object(i.a)(qe,["userDetail","user","globalSetting","loading","dispatch","onClose","shixun"]),St=Object(E.i)(),Jt=Object(h.useState)([]),Ft=Object(r.a)(Jt,2),It=Ft[0],zt=Ft[1],qt=Object(h.useState)({}),un=Object(r.a)(qt,2),gn=un[0],Cn=un[1],Xn=Object(h.useState)(0),yn=Object(r.a)(Xn,2),vn=yn[0],nn=yn[1],Un=Object(h.useState)(Object(t.a)({page:1,limit:20,id:Ct.identifier},St)),gt=Object(r.a)(Un,2),an=gt[0],mn=gt[1],En=Object(h.useCallback)(function(){return _t.visible},[_t.visible]);Object(h.useEffect)(function(){an.page=1,Fn()},[_t.visible]);var Fn=function(){var zn=Object(l.a)(f.a.mark(function Hn(){var dn;return f.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:return bn.next=2,at({type:"shixunsDetail/getSetData",payload:an});case 2:dn=bn.sent,dn&&(zt(Object(I.a)(dn.data_sets)),nn(dn.data_sets_count),Cn(dn.folder_name));case 4:case"end":return bn.stop()}},Hn)}));return function(){return zn.apply(this,arguments)}}();return u.a.createElement(u.a.Fragment,null,!!It.length&&_t.children,u.a.createElement(T.a,{title:"\u6570\u636E\u96C6",placement:"right",className:Nr.a.wrap,width:300,closable:!1,onClose:Dt,visible:En()},u.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6570\u636E\u96C6\u8DEF\u5F84"),u.a.createElement("dl",{className:Nr.a.list},u.a.createElement(sn.a,{title:gn},u.a.createElement("dt",null,gn)),u.a.createElement("dd",null,u.a.createElement(ce.CopyToClipboard,{text:gn,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236")))),u.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6587\u4EF6\u8DEF\u5F84"),It==null?void 0:It.map(function(zn,Hn){return u.a.createElement("dl",{className:Nr.a.list},u.a.createElement(sn.a,{title:zn.title},u.a.createElement("dt",null,u.a.createElement("span",{className:"icon-wenjian4 mr5"}),zn.title)),u.a.createElement("dd",null,u.a.createElement(ce.CopyToClipboard,{text:zn.file_path,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236"))))}),u.a.createElement("div",{className:"tc"},u.a.createElement(M.a,{onChange:function(Hn){an.page=Hn,Fn()},className:Nr.a.page,size:"small",total:vn,pageSize:an.limit,hideOnSinglePage:!0}))))},Fr=Object(lr.a)(function(we){var qe=we.user,rt=we.userDetail,At=we.loading,Mt=we.shixunsDetail,vt=we.globalSetting;return{user:qe,userDetail:rt,shixunsDetail:Mt,globalSetting:vt,loading:At.models.index}})(yi),wr=b("tUsH"),ei=b.n(wr),_r=b("1Zrr"),oi=b.n(_r),or=b("Icgb"),Wi=b("bPs0"),Mi=Kt.a.Countdown;function $i(){return u.a.createElement("p",null,"\u684C\u9762\u7CFB\u7EDF\u5C06\u6062\u590D\u5230\u521D\u59CB\u72B6\u6001\uFF0C\u60A8\u5728\u7CFB\u7EDF\u4E2D\u521B\u5EFA\u7684\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931\u3002\u8BF7\u786E\u4FDD\u60A8\u7684\u6570\u636E\u5DF2\u4FDD\u5B58\uFF08\u5982\uFF1A\u7248\u672C\u5E93\u4EE3\u7801\u5DF2\u63A8\u9001\u5230\u670D\u52A1\u5668\uFF09\u3002\u662F\u5426\u786E\u8BA4\u91CD\u7F6E\uFF1F")}var mo=function(we){var qe,rt=we.mirror_description,At=we.difficulty,Mt=we.git_url,vt=we.vnc_url,at=we.window_vnc_url,Dt=we.linux_vnc,Ct=we.isNotice,_t=we.user,St=we.game,Jt=we.shixun,Ft=Jt===void 0?{}:Jt,It=we.taskData,zt=It===void 0?{}:It,qt=we.resetVncLoading,un=we.onUpdateCostTime,gn=we.lastedGetTaskInfoTime,Cn=we.onShowNotice,Xn=we.onResetGitCode,yn=we.onResetVnc,vn=we.onBack,nn=we.history,Un=we.onAddVncTime,gt=we.onUpdateCode,an=we.unity_3d_routes,mn=we.st,En=Ft.name,Fn=Ft.identifier,zn=Ft.task_pass,Hn=Ft.test_set_permission,dn=St.cost_time,cn=St.status,bn=_t.user_url,Mn=_t.image_url,sr=_t.grade,Br=sr===void 0?0:sr,Tn=Object(h.useState)(!1),ri=Object(r.a)(Tn,2),Ra=ri[0],Vi=ri[1],qr=Object(h.useState)({}),li=Object(r.a)(qr,2),Vn=li[0],kr=li[1],Li=Object(h.useState)("#FFF"),Ri=Object(r.a)(Li,2),uo=Ri[0],Da=Ri[1],mi=Object(h.useState)(null),za=Object(r.a)(mi,2),na=za[0],la=za[1],zo=Object(h.useState)(),co=Object(r.a)(zo,2),ya=co[0],eo=co[1],ho=Object(h.useState)(!1),_o=Object(r.a)(ho,2),Pa=_o[0],Ga=_o[1],Kr=Object(E.h)().query,br=Object(h.useRef)(),Ui=Object(h.useRef)(),Po=Object(h.useRef)((Ft==null?void 0:Ft.webssh)===3?1:void 0);Object(h.useEffect)(function(){var ci=xe.a.subscribe("taskTabIndex",function(Pr){(Ft==null?void 0:Ft.webssh)===3&&(Po.current=Pr)});return ci},[]),Object(h.useEffect)(function(){var ci;if(clearTimeout(br.current),clearTimeout(Ui.current),Vn!=null&&(ci=Vn.exercise)!==null&&ci!==void 0&&ci.left_time){var Pr,Sr;if((Vn==null||((Pr=Vn.exercise)===null||Pr===void 0)?void 0:Pr.left_time)>1800){var Bi;Ui.current=setTimeout(function(){e.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:u.a.createElement(or.a,null),okText:"\u77E5\u9053\u4E86"})},((Vn==null||((Bi=Vn.exercise)===null||Bi===void 0)?void 0:Bi.left_time)-1800)*1e3)}if((Vn==null||((Sr=Vn.exercise)===null||Sr===void 0)?void 0:Sr.left_time)>900){var Ki;br.current=setTimeout(function(){e.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:u.a.createElement(or.a,null),okText:"\u77E5\u9053\u4E86"})},((Vn==null||((Ki=Vn.exercise)===null||Ki===void 0)?void 0:Ki.left_time)-900)*1e3)}}},[Vn]),Object(h.useEffect)(function(){function ci(){return Pr.apply(this,arguments)}function Pr(){return Pr=Object(l.a)(f.a.mark(function Sr(){var Bi,Ki,cr,Rr,Dr,Ei,Er,Ti,$o,Qa;return f.a.wrap(function(ro){for(;;)switch(ro.prev=ro.next){case 0:if(!(Kr.type==="exercises")){ro.next=12;break}if(!(Kr.coursesId==="coursesId")){ro.next=7;break}return ro.next=4,Object(Xe.Z)({categoryId:Kr.exercisesId,login:Kr.login});case 4:Rr=ro.sent,ro.next=10;break;case 7:return ro.next=9,Object(Xe.z)({categoryId:Kr.exercisesId,login:Kr.login});case 9:Rr=ro.sent;case 10:kr(Object(t.a)({},Rr)),(Bi=Rr)!==null&&Bi!==void 0&&Bi.left_banner_id&&(Ki=Rr)!==null&&Ki!==void 0&&(cr=Ki.exercise)!==null&&cr!==void 0&&cr.left_time&&(la(Date.now()+((Dr=Rr)===null||Dr===void 0||((Ei=Dr.exercise)===null||Ei===void 0)?void 0:Ei.left_time)*1e3),setTimeout(function(){Da("red")},(((Er=Rr)===null||Er===void 0||((Ti=Er.exercise)===null||Ti===void 0)?void 0:Ti.left_time)-300>0?(($o=Rr)===null||$o===void 0||((Qa=$o.exercise)===null||Qa===void 0)?void 0:Qa.left_time)-300:0)*1e3));case 12:case"end":return ro.stop()}},Sr)})),Pr.apply(this,arguments)}ci(),xe.a.subscribe("update-windows-time",function(Sr){eo(parseInt(Sr.remaining_time/1e3))}),vt&&eo(1800)},[]),Object(h.useEffect)(function(){var ci;return Kr.type==="exercises"&&Vn!==null&&Vn!==void 0&&(ci=Vn.exercise)!==null&&ci!==void 0&&ci.screen_open&&(Wi.b.forEach(function(Pr,Sr){window.addEventListener(Pr,ui,!1),window.addEventListener("blur",ui,!1)}),window.focus()),function(){Wi.b.forEach(function(Pr,Sr){window.removeEventListener(Pr,ui,!1)}),window.removeEventListener("blur",ui,!1)}},[Vn]);var Va=function(){Ga(!Pa)},ui=function(Pr){window.parent.postMessage("backExercise","*"),Pr!=="back"&&Object(S.b)()};function Ci(){Vi(!Ra)}function fa(){Vi(!1)}function ua(){vn(),nn.replace("/shixuns/".concat(Fn,"/challenges"))}function Ya(){if(qt)return;yn()}function to(){e.a.confirm({title:"\u9000\u51FA\u5B9E\u8BAD",icon:u.a.createElement(Qn.a,null),content:"\u60A8\u786E\u5B9A\u8981\u9000\u51FA\u5B9E\u8BAD\u5417\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ua})}function wa(ci){if(fa(),ci==="reset-task"&&(qt||e.a.confirm({title:"\u91CD\u7F6E\u5B9E\u8BAD",icon:u.a.createElement(Qn.a,null),content:u.a.createElement($i,null),centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Ya})),ci==="reset-code"&&(qt||e.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:u.a.createElement(Qn.a,null),content:"\u60A8\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Xn})),ci==="full-screen")if(Object(S.a)())Object(S.b)();else{var Pr,Sr;Object(S.d)((Pr=document)===null||Pr===void 0||((Sr=Pr.getElementById)===null||Sr===void 0)?void 0:Sr.call(Pr,"task-right-panel"))}ci==="show-clipboard-box"&&xe.a.publish("show-clipboard-box")}var Na={task_pass:zn,test_set_permission:Hn,mirror_description:rt,difficulty:At,resetVncLoading:qt,git_url:Mt,onVncAction:wa,window_vnc_url:at,linux_vnc:Dt,vnc_url:vt,shixun:Ft,unity_3d_routes:an,position:Po.current},no=Object(h.useCallback)(function(){return ya?(console.log("VncTimer:",ya),u.a.createElement(Ka,{defaultTime:ya,onAddVncTime:Un,onReset:Ya,toShixun:ua,title:vt?"\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6":""})):null},[ya]);return u.a.createElement("div",{className:"task-header-container"},Kr.type!=="exercises"&&u.a.createElement(u.a.Fragment,null,u.a.createElement("a",{className:"task-user-info",href:bn,target:"_blank"},Mn?u.a.createElement("img",{width:"35",height:"35",src:"".concat(Ca.a.IMG_SERVER,"/images/").concat(Mn)}):null,u.a.createElement("span",null,_t.name)),u.a.createElement("div",{className:"grade-info"},u.a.createElement("img",{src:ei.a,alt:"gold",width:20}),Br)),u.a.createElement("h2",{className:"shixun-info"},En,(Kr==null?void 0:Kr.type)!=="exercises"&&Ft.hide_code!==2&&u.a.createElement(Gt.a,{lastedGetTaskInfoTime:gn,status:cn,defaultTime:dn,onUpdateCostTime:un,title:vt?"\u5B9E\u9A8C\u603B\u7528\u65F6":""})),u.a.createElement(u.a.Fragment,null,(vt||at||Dt||(zt==null?void 0:zt.virtual_machine)||(Ft==null?void 0:Ft.webssh)===3||Ft.hide_code===2||an)&&u.a.createElement("div",{className:"flex-container"},(Kr==null?void 0:Kr.type)!=="exercises"&&u.a.createElement(u.a.Fragment,null,at&&u.a.createElement(rn.a,{onClick:function(Pr){Pr.preventDefault(),xe.a.publish("send-ctrl-alt-delete")},className:"c-grey-c mr20"},"\u53D1\u9001CTRL+ALT+DELETE"),Ct?u.a.createElement(J,{className:"btn-notice",onShowNotice:Cn}):null,no()),u.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:Ci},u.a.createElement("img",{alt:"tool",src:oi.a,width:16}),"\u5DE5\u5177\u680F")),!at&&u.a.createElement(Fr,{visible:Pa,onClose:Va,shixun:Ft},u.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:Va},u.a.createElement("span",{className:"iconfont font14 mr5 icon-shujuji2 current"}),"\u6570\u636E\u96C6"))),Kr.type!=="exercises"&&u.a.createElement(u.a.Fragment,null,vt||at?u.a.createElement("a",{className:"btn-task-out",onClick:to,title:"\u9000\u51FA\u5B9E\u8BAD"},"\u9000\u51FA\u5B9E\u8BAD"):u.a.createElement("a",{className:"btn-out",onClick:to,title:"\u9000\u51FA\u5B9E\u8BAD"},u.a.createElement("i",{className:"iconfont icon-kaiguan"}))),(Vn==null||((qe=Vn.exercise)===null||qe===void 0)?void 0:qe.left_time)&&u.a.createElement(u.a.Fragment,null,u.a.createElement("span",{style:{color:uo},className:"iconfont icon-kaoshishichang mr5"}),u.a.createElement("span",{className:"c-white mr20"},u.a.createElement(Mi,{className:"flex-wrp ",valueStyle:{color:uo,fontSize:12,fontWeight:"normal"},title:u.a.createElement("span",{style:{color:uo,fontSize:12}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:na,onFinish:Object(l.a)(f.a.mark(function ci(){var Pr,Sr;return f.a.wrap(function(Ki){for(;;)switch(Ki.prev=Ki.next){case 0:return Ki.next=2,Object(Xe.ab)({categoryId:Kr.exercisesId,commit_method:2});case 2:Pr=Ki.sent,(Pr==null?void 0:Pr.status)===0&&(mn===0&>(1),e.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:u.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",u.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var cr=Object(l.a)(f.a.mark(function Dr(){return f.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:window.parent.location.href="/classrooms/".concat(Kr.coursesId,"/exercise/").concat(Kr.exercisesId,"/detail");case 1:case"end":return Er.stop()}},Dr)}));function Rr(){return cr.apply(this,arguments)}return Rr}()})),(Pr==null?void 0:Pr.status)===-3&&(Sr=parseInt(Pr==null?void 0:Pr.message),la(Date.now()+Sr*1e3));case 5:case"end":return Ki.stop()}},ci)}))}))),(Kr==null?void 0:Kr.type)==="exercises"&&u.a.createElement(Ut.a,{type:"primary",onClick:function(){mn===0&>(1),e.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){ui("back")}})}},u.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," \u8FD4\u56DE\u8BD5\u5377"),u.a.createElement(fe.a,null,u.a.createElement(T.a,{width:280,className:"setting-drawer",title:null,placement:"right",closable:!1,visible:Ra,onClose:fa},u.a.createElement(ka,Na))))},Qi=300;function Ka(we){var qe=we.onAddVncTime,rt=we.onReset,At=we.toShixun,Mt=we.title,vt=Mt===void 0?"":Mt,at=we.defaultTime,Dt=Object(h.useState)(at),Ct=Object(r.a)(Dt,2),_t=Ct[0],St=Ct[1],Jt=Object(h.useState)(!1),Ft=Object(r.a)(Jt,2),It=Ft[0],zt=Ft[1];Object(Qt.a)(function(){St(_t-1)},_t>0?1e3:null),Object(h.useEffect)(function(){_t===Qi&&zt(!0)},[_t]),Object(h.useEffect)(function(){at0)){nn.next=8;break}return nn.next=4,qe();case 4:yn=nn.sent,St((yn==null?void 0:yn.remaining_time)/1e3),nn.next=10;break;case 8:St(at),rt();case 10:case"end":return nn.stop()}},Xn)})),gn.apply(this,arguments)}function Cn(){_t=0?_t.splice(St,1):_t.push(Dt),at(_t.join(""))}}return u.a.createElement("a",{className:"flex-container",onClick:Ct},u.a.createElement("span",{style:{position:"relative",top:4},className:"".concat(qe===1?"radio":"checkbox"," ").concat(At&&At.indexOf(Dt)>=0?"active":"")}),u.a.createElement("div",{className:"flex-wrp"},u.a.createElement("span",{style:{lineHeight:1.7,fontSize:16,whiteSpace:"nowrap"}},Dt,"\u3001"),u.a.createElement(ae.a,{className:"subject-body",value:vt})))},Ko=function(we){var qe=we.callback,rt=we.multi_count,At=we.answer,Mt=Object(h.useState)([]),vt=Object(r.a)(Mt,2),at=vt[0],Dt=vt[1];return Object(h.useEffect)(function(){if(rt){if(At!=null&&At.length){Dt(At);return}var Ct=Array.from({length:rt}).fill("");Dt(Ct)}},[rt,At]),console.log(at,At,"multi_count"),u.a.createElement("div",{className:"option"},at==null?void 0:at.map(function(Ct,_t){return u.a.createElement(ue.a,{align:"middle",className:"mb10 text"},u.a.createElement("span",{className:"mb5"},"\u586B\u7A7A",_t+1,"\u7B54\u6848\uFF1A"),u.a.createElement(Gr.a.TextArea,{key:_t,value:Ct,onChange:function(Jt){at[_t]=Jt.target.value,qe(at)}}))}))},Jn=function(we){var qe=we.id,rt=we.answer,At=we.challenge_question,Mt=we.category,vt=we.subject,at=we.onSetAnswers,Dt=we.question_name,Ct=we.multi_count;function _t(St){at(qe,St)}return u.a.createElement("li",null,u.a.createElement(ue.a,{className:"subject c-grey-999",align:"stretch"},u.a.createElement(Lt.a,{flex:"40px"},u.a.createElement("p",{className:"mt3"},qe+1,"\u3001")),u.a.createElement(Lt.a,{flex:"1"},u.a.createElement(ae.a,{value:"".concat(vt),className:"subject-body"}))),Dt==="\u5355\u9009\u9898/\u591A\u9009\u9898"&&u.a.createElement("div",{className:"option"},At==null?void 0:At.map(function(St,Jt){var Ft=St.option_name;return u.a.createElement(Wa,{index:Jt,key:Ft,option_name:Ft,answer:rt,category:Mt,callback:_t})})),Dt==="\u5224\u65AD\u9898"&&u.a.createElement("div",{className:"option"},u.a.createElement(go.a.Group,{className:"mb10",value:rt||void 0,onChange:function(Jt){return _t(Jt.target.value)}},u.a.createElement(go.a,{value:"true",className:"mr40"},"\u6B63\u786E"),u.a.createElement(go.a,{value:"false"},"\u9519\u8BEF"))),Dt==="\u586B\u7A7A\u9898"&&u.a.createElement(Ko,{multi_count:Ct,callback:_t,answer:rt}))},gr=function(we){var qe=we.chooses,rt=we.answers,At=we.onSetAnswers;return u.a.createElement("ul",{className:"choose-container"},qe.map(function(Mt,vt){var at=Mt.subject,Dt=Mt.challenge_question,Ct=Mt.category,_t=Mt.question_name,St=Mt.multi_count;return u.a.createElement(Jn,{key:vt,id:vt,subject:at,challenge_question:Dt,category:Ct,answer:rt[vt],onSetAnswers:At,question_name:_t,multi_count:St})}))},Zn=b("yqJW"),Lr=b("cf+g"),Hr=b.n(Lr),gi=b("UbZX"),dr=b.n(gi),Xi=b("LYID"),ga=b.n(Xi),jr=function(qe){var rt=qe.id,At=qe.isActive,Mt=qe.title,vt=qe.onActive,at=qe.had_submmit,Dt=qe.result,Ct=qe.actual_output,_t=qe.standard_answer,St=qe.question_name;function Jt(){vt(rt)}var Ft="test-case-item";return At&&(Ft+=" active"),at&&(Ft+=" has-result"),u.a.createElement("li",{className:Ft},u.a.createElement("a",{className:"case-header",onClick:Jt},u.a.createElement("h2",null,u.a.createElement("div",{className:At?"arrow-down":"arrow-right"}),u.a.createElement("span",{className:"test-title"},Mt)),at>0?u.a.createElement("img",{width:16,src:Dt?dr.a:ga.a}):u.a.createElement("i",{className:"iconfont icon-suo1"})),u.a.createElement("div",{className:"item-desc ".concat(At?"show":"hide"," choose-game-item")},at?Dt?St==="\u586B\u7A7A\u9898"?u.a.createElement(h.Fragment,null,u.a.createElement("p",null,u.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),u.a.createElement("b",null,_t==null?void 0:_t.map(function(It,zt){var qt;return u.a.createElement("p",null,"\u586B\u7A7A",zt+1,"\uFF1A",It==null||((qt=It.text)===null||qt===void 0)?void 0:qt.join("\u3001"))}))),u.a.createElement("p",null,u.a.createElement("div",null,"\u4F60\u7684\u7B54\u6848\uFF1A"),u.a.createElement("b",{className:"c-red"},Ct==null?void 0:Ct.map(function(It,zt){return u.a.createElement("p",null,"\u586B\u7A7A",zt+1,"\uFF1A",It)})))):u.a.createElement(h.Fragment,null,u.a.createElement("p",null,"\u6B63\u786E\u9009\u9879\uFF1A",u.a.createElement("b",null,_t)),u.a.createElement("p",null,"\u4F60\u7684\u9009\u9879\uFF1A",u.a.createElement("b",{className:"c-red"},Ct))):u.a.createElement("p",null,"\u9519\u8BEF\uFF0C\u4E0D\u652F\u6301\u67E5\u770B"):u.a.createElement("p",null,"\u5C1A\u672A\u63D0\u4EA4\uFF0C\u6682\u4E0D\u652F\u6301\u67E5\u770B")))},qa=function(we){var qe=we.onResizeSetContainer,rt=we.moveY,At=we.had_submmit,Mt=we.test_sets,vt=Mt===void 0?[]:Mt,at=we.challenge_chooses_count,Dt=we.choose_correct_num,Ct=Object(h.useState)(-1),_t=Object(r.a)(Ct,2),St=_t[0],Jt=_t[1];function Ft(qt){Jt(qt===St?-1:qt)}var It=Dt===at;function zt(){qe(rt)}return u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:"test-header"},u.a.createElement("span",{className:"active"},"\u6D4B\u8BD5\u7ED3\u679C"),u.a.createElement("a",{onClick:zt},u.a.createElement("i",{className:"iconfont ".concat(rt===.01?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),At?u.a.createElement("p",{className:"test-result ".concat(It?"success":"failer")},u.a.createElement("span",{className:"count"},u.a.createElement("img",{width:16,src:It?dr.a:Hr.a}),Dt," / ",at," \u5171\u6709",at,"\u9898\uFF0C"),u.a.createElement("span",null,It?"\u5168\u90E8\u901A\u8FC7":"\u5176\u4E2D".concat(at-Dt,"\u9898\u76EE\u7ED3\u679C\u4E0D\u5339\u914D\u3002\u8BE6\u60C5\u5982\u4E0B\uFF1A"))):null,u.a.createElement("ul",{className:"test-case-list"},vt.map(function(qt,un){return u.a.createElement(jr,Object(s.a)({key:"item"+un,had_submmit:At,title:"\u9898\u76EE".concat(un+1)},qt,{isActive:St===un,id:un,onActive:Ft}))})))},di=b("9odi"),Ai=b.n(di),va=b("VjRW"),Ma=b.n(va),Ho=function(we){var qe,rt=we.st,At=we.prev_game,Mt=we.next_game,vt=we.time_limit,at=we.record_consume_time,Dt=we.loading,Ct=we.vnc_url,_t=we.linux_vnc,St=we.windows_vnc,Jt=we.shixun,Ft=we.game,It=we.onRun,zt=we.dispatch,qt=we.onShowTestCaseList,un=we.chooses,gn=we.unity_3d_routes,Cn=we.user,Xn=we.is_last_game,yn=we.onUpdateCode,vn=we.test_sets,nn=we.challenge,Un=we.isU3d,gt=we.game_report_id,an=Object(E.i)(),mn=!Xn&&!Dt&&(Jt.status>0||(Cn==null?void 0:Cn.identity)<5),En=rt===1&&Ft.status===2,Fn=["\u81EA\u6D4B\u8FD0\u884C","\u6B63\u5728\u542F\u52A8","\u505C\u6B62\u8FD0\u884C","\u6B63\u5728\u505C\u6B62"],zn=Object(h.useState)(0),Hn=Object(r.a)(zn,2),dn=Hn[0],cn=Hn[1],bn=Object(h.useState)(0),Mn=Object(r.a)(bn,2),sr=Mn[0],Br=Mn[1],Tn=Object(h.useState)(!1),ri=Object(r.a)(Tn,2),Ra=ri[0],Vi=ri[1],qr=Object(h.useState)(!1),li=Object(r.a)(qr,2),Vn=li[0],kr=li[1],Li=Object(h.useState)(vn==null||((qe=vn[0])===null||qe===void 0)?void 0:qe.input),Ri=Object(r.a)(Li,2),uo=Ri[0],Da=Ri[1],mi=Object(h.useState)(!1),za=Object(r.a)(mi,2),na=za[0],la=za[1],zo=Object(h.useState)(Fn[0]),co=Object(r.a)(zo,2),ya=co[0],eo=co[1],ho=Object(h.useRef)(!1),_o=Object(h.useState)(0),Pa=Object(r.a)(_o,2),Ga=Pa[0],Kr=Pa[1],br=Object(E.h)();Object(h.useEffect)(function(){dn>0&&setTimeout(function(){cn(dn-1)},1e3)},[dn]),Object(h.useEffect)(function(){Ga>0&&setTimeout(function(){Kr(Ga-1)},1e3)},[Ga]),Object(h.useEffect)(function(){sr>0&&setTimeout(function(){Br(sr-1)},1e3)},[sr]),Object(h.useEffect)(function(){var ui=xe.a.subscribe("showRunCode",function(Ya){kr(Ya)}),Ci=xe.a.subscribe("caseInputValue",function(Ya){Da(Ya)}),fa=xe.a.subscribe("runCodeFinish",function(){ho.current=!1,la(!1),eo(Fn[0]),Ga>0||Kr(5)}),ua=xe.a.subscribe("eval-code-finish",function(){gn&&Vi(!0),rt===1||cn(10)});return function(){ua(),ui(),Ci(),fa()}},[]);var Ui=function(){ho.current=!1,eo(Fn[3]),xe.a.publish("runCode",{type:"stop"}),Object(he.J)(an.taskId),setTimeout(function(){Ga>0||Kr(5),eo(Fn[0]),la(!1),Kr(5)},2500)},Po=function(){var ui=Object(l.a)(f.a.mark(function Ci(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:return ho.current=!0,ua.next=3,yn();case 3:eo(Fn[1]),xe.a.publish("show-case-result",!0),setTimeout(Object(l.a)(f.a.mark(function Ya(){var to,wa,Na,no,ci;return f.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return Sr.next=2,Object(he.v)(an.taskId,{test_case_content:uo});case 2:if(Na=Sr.sent,!(Na!=null&&(to=Na.data)!==null&&to!==void 0&&(wa=to.data_list)!==null&&wa!==void 0&&wa.length)){Sr.next=6;break}return xe.a.publish("pod-restrict-data",{identifier:Na==null||((no=Na.data)===null||no===void 0)?void 0:no.identifier,data_list:Na==null||((ci=Na.data)===null||ci===void 0)?void 0:ci.data_list}),Sr.abrupt("return");case 6:xe.a.publish("showRunCodeTab",!0),xe.a.publish("runCode",{type:"start"});case 8:case"end":return Sr.stop()}},Ya)})),100),setTimeout(function(){ho.current&&(eo(Fn[2]),la(!1))},1e3);case 7:case"end":return ua.stop()}},Ci)}));return function(){return ui.apply(this,arguments)}}(),Va=function(){var ui=Object(l.a)(f.a.mark(function Ci(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:la(!0),ya===Fn[2]?Ui():Po();case 2:case"end":return ua.stop()}},Ci)}));return function(){return ui.apply(this,arguments)}}();return u.a.createElement("div",{className:Ai.a["action-container"]},u.a.createElement("div",{className:"flex-container ".concat(Ai.a["eval-desc"])},vt&&nn!==null&&nn!==void 0&&nn.with_code_file?u.a.createElement("span",null,"\u672C\u5173\u6700\u5927\u6267\u884C\u65F6\u95F4\uFF1A".concat(vt,"\u79D2")):null,at&&nn!==null&&nn!==void 0&&nn.with_code_file?u.a.createElement("span",null,"\u672C\u6B21\u8BC4\u6D4B\u8017\u65F6(\u7F16\u8BD1\u3001\u8FD0\u884C\u603B\u65F6\u95F4)\uFF1A",at," \u79D2"):null,gt?u.a.createElement("a",{target:"_blank",className:Ai.a.link,href:"/report/".concat(an.taskId,"/").concat(gt)},"\u4EE3\u7801\u6027\u80FD\u68C0\u6D4B"):null,(Ct||St||_t||Un)&&(nn==null?void 0:nn.with_code_file)&&u.a.createElement("a",{title:"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C",onClick:function(){xe.a.publish("show-case-result")}},"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C")),u.a.createElement("div",{className:"flex-container ".concat(Ai.a["eval-btn-group"])},At&&!Dt?u.a.createElement("a",{href:"/tasks/".concat(At).concat(br.search),onClick:function(Ci){Ci.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(At).concat(br.search)},300)},className:Ai.a["ghost-link"]},"\u4E0A\u4E00\u5173"):null,mn?u.a.createElement("a",{href:"/tasks/".concat(Mt).concat(br.search),onClick:function(Ci){if(Ci.preventDefault(),Jt.task_pass||Ft.status===2||(Cn==null?void 0:Cn.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(Mt).concat(br.search)},300);return}e.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:u.a.createElement("p",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002")})},className:Ai.a["ghost-link"]},"\u4E0B\u4E00\u5173"):null,Ra&&(nn==null?void 0:nn.show_type)===1&&u.a.createElement("button",{onClick:function(){zt({type:"SHOW_PICTURE_VIEW"})},style:{minWidth:"72px",marginRight:10},className:"btn-run",title:"\u67E5\u770B\u6548\u679C"},"\u67E5\u770B\u6548\u679C"),!!Vn&&Jt.hide_code!==2&&!Un&&u.a.createElement(Ut.a,{onClick:Object(V.throttle)(Va,2e3),loading:na,danger:!0,disabled:Ga>0,className:"".concat(Ai.a["btn-run-self"]," mr10")},Ga>0?"".concat(Ga,"S"):ya),(nn==null?void 0:nn.with_code_file)&&u.a.createElement("button",{onClick:Object(l.a)(f.a.mark(function ui(){return f.a.wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:if(!(rt===1)){fa.next=4;break}if(!((un==null?void 0:un.length)<=0)){fa.next=4;break}return e.a.confirm({centered:!0,title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc"},u.a.createElement("p",null,"\u60A8\u8FD8\u672A\u6DFB\u52A0\u9898\u76EE\uFF0C\u8BF7\u6DFB\u52A0\u540E\u8BC4\u6D4B\uFF01")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88"}),fa.abrupt("return");case 4:return Vi(!1),fa.next=7,It();case 7:case"end":return fa.stop()}},ui)})),style:{minWidth:"72px"},disabled:Dt||dn>0,className:Ai.a["btn-run"],title:"\u8FD0\u884C\u8BC4\u6D4B"},dn>0?"".concat(dn,"S"):u.a.createElement(h.Fragment,null," ",u.a.createElement("img",{src:Ma.a,alt:"run",width:18})," ",u.a.createElement("b",null,"\u8BC4\u6D4B")," "))))};function hi(we,qe){switch(qe.type){case be.f:return Object(t.a)(Object(t.a)({},we),{},{loading:!0});case be.e:return Object(t.a)(Object(t.a)({},we),{},{loading:!1});case be.B:return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}var An=function(we){var qe=we.taskData,rt=we.moveY,At=we.onResizeYStart,Mt=we.onResizeSetContainer,vt=we.onEval,at=we.lastedGetTaskInfoTime,Dt=we.onUpdateCode,Ct=we._dispatch,_t=Object(E.h)(),St=qe.chooses,Jt=qe.choose_test_cases,Ft=qe.game,It=Jt.test_sets,zt=Jt.challenge_chooses_count,qt=Jt.choose_correct_num,un=Jt.had_submmit,gn=Object(h.useCallback)(function(){var Hn=[];return Hn.length=zt,un&&(Hn=It.map(function(dn){return dn.question_name==="\u5224\u65AD\u9898"?dn.actual_output==="\u6B63\u786E"?"true":dn.actual_output==="\u9519\u8BEF"?"false":void 0:dn.actual_output})),Hn},[at]),Cn=Object(h.useReducer)(hi,{loading:!1,answers:gn()}),Xn=Object(r.a)(Cn,2),yn=Xn[0],vn=Xn[1];Object(h.useEffect)(function(){vn({type:be.B,payload:{answers:gn()}})},[at]);var nn=yn.answers,Un=yn.loading;function gt(Hn,dn){nn[Hn]=dn,vn({type:be.B,payload:{answers:nn}})}function an(){for(var Hn=!0,dn=0;dn(?:[\n\r\s]*?)(?:<\/link>)*/im,Ue=/(?:[\n\r\s]*?)(?:<\/script>)*/im,et=["http","com","net","org","cdn"];function We(we){for(var qe=!1,rt=0;rt]*href=['"]([^'"]+)[^>]*>/gi,function(dn,cn){gn.push(cn.indexOf("http")>-1?cn:"https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier="+Jt.taskId+"&path="+cn);var bn=cn.indexOf("http")>-1?cn:'';return bn}),rt.replace(/