You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__User__Detail__Topics__Po...

1 line
677 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[799],{24433:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},t="5.0",n={},i=null,r=!1,o=!1,a=null,s=!1,l=null,c=null,u=0;u<arguments.length;u++){var d=arguments[u];if(null!==d)switch(_typeof(d)){case"number":t=d.toFixed(1);break;case"string":d.match(new RegExp("^[0-9]\\.[0-9]+$"))?t=d:a=d;break;case"object":void 0!==d.is3D?i=d:n=d;break;case"boolean":r=d,o=!0}}null===i&&(i={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===n.material_id||o||(r=!0)),null!==a&&void 0===n.id&&(n.id=a);var h="",p=!1,f=null,m=null,g=null,v=!1,y=null,x=null,b=null;void 0!==n.height&&(n.height=Math.round(n.height)),void 0!==n.width&&(n.width=Math.round(n.width));var w=function(e){return parseFloat(e)>4?parseFloat(e):5};function C(){try{return window.self!==window.top}catch(e){return!0}}function k(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){c=e,I(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(l=e,R(e,t))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){b=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",o=n.id,a=!1,l=0;l<arguments.length;l++){var c=arguments[l];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:o=arguments[l]:"boolean"==typeof c?a=c:c instanceof HTMLElement&&(i=c)}function u(){if(s){r=B(r);var l=i||document.getElementById(o);if(l)if(e.removeExistingApplet(l,!1),void 0===n.width&&l.clientWidth&&(n.width=l.clientWidth),void 0===n.height&&l.clientHeight&&(n.height=l.clientHeight),n.width&&n.height||"html5"!==r||(delete n.width,delete n.height),f=r,"screenshot"===r)T(l,n);else{var c=!1;n.hasOwnProperty("playButton")&&n.playButton||n.hasOwnProperty("clickToLoad")&&n.clickToLoad?c=!0:n.hasOwnProperty("playButtonAutoDecide")&&n.playButtonAutoDecide&&(c=(!C()||t())&&k()),c?(f="screenshot",D(l,n,a,r)):L(l,n,a)}else console.log("possibly bug on ajax loading? ")}else setTimeout(u,200)}u()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var S=function(t){var r=function(){n.onError&&n.onError(),F("Error: Fetching material (id "+n.material_id+") failed.",n)},o=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",a="/materials/"+n.material_id+"?scope=basic";E("https://"+o+"/api/proxy.php?path="+encodeURIComponent(a),(function(o){var a=JSON.parse(o),s=a.elements?a.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:a;if(s&&s.url){n.fileName=s.url,A(s.settings||{}),i.is3D=!0;var l="https://www.geogebra.org/images/";e.setPreviewImage(y||s.previewUrl,l+"GeoGebra_loading.png",l+"applet_play.png"),t()}else r()}),r)};function A(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(t){e[t]=!!e[t]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(t){void 0===n[t]&&void 0!==e[t]&&(n[t]=e[t])})),void 0===n.showToolBarHelp&&(n.showToolBarHelp=n.showToolBar)}function E(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){t(i.responseText)},i.onerror=n,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return f},e.setPreviewImage=function(e,t,n){y=e,x=t,n},e.removeExistingApplet=function(e,t){var i;"string"==typeof e&&(e=document.getElementById(e)),f=null;var r=null;for(i=0;i<e.childNodes.length;i++){var o=e.childNodes[i],a=o.className;"applet_screenshot"===a?t?(o.style.display="block",f="screenshot"):o.style.display="none":"applet_scaler prerender"!==a&&(e.removeChild(o),r=a&&-1!=a.indexOf("appletParameters")?o.id:null,i--)}var s=void 0!==n.id?n.id:r,l=window[s];l&&"function"==typeof l.getBase64&&(l.remove(),window[s]=null)},e.refreshHitPoints=function(){if(w(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var M=function(e){return e&&"false"!==e},L=function(t,n,i){w(m)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var a=n.width,s=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(w(m)<=4.4)M(n.showToolBar)&&(n.height-=7),M(n.showAlgebraInput)&&(n.height-=37),n.width<605&&M(n.showToolBar)&&(n.width=605,a=605);else{var u=100;(M(n.showToolBar)||M(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),u=M(n.showMenuBar)?245:155),a<u&&(n.width=u,a=u)}for(var d in o.style.border="none",o.style.display="inline-block",n)n.hasOwnProperty(d)&&"appletOnLoad"!==d&&o.setAttribute("data-param-"+d,n[d]);b&&o.setAttribute("data-param-fontscssurl",b),e.resize=function(){GGBAppletUtils.responsiveResize(t,n)},window.addEventListener("resize",(function(t){e.resize()}));var p="function"==typeof n.appletOnLoad?n.appletOnLoad:function(){};if(i||void 0===n.width){var f=document.createElement("div");f.className="applet_scaler",f.style.position="relative",f.style.display="block",f.appendChild(o),t.appendChild(f),n.appletOnLoad=function(t){e.resize(),p(t)}}else{n.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var y=t.querySelector(".applet_scaler.prerender"),x=null!==y;if(x)C=y.querySelector(".ggb_preview");else{var C=j(a,s,n.borderColor,!1);(y=document.createElement("div")).className="applet_scaler",y.style.position="relative",y.style.display="block",y.style.width=a+"px",y.style.height=s+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(y,"66%"),w(m)>=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),p(e)},x||y.appendChild(C)):o.appendChild(C),y.appendChild(o),x||t.appendChild(y),setTimeout((function(){e.resize()}),1)}function k(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),F("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function S(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){k(e.article,e.params)})),html5AppletsToProcess=null)},w(m)<5&&(e.className+=" geogebraweb")):k(e,t)}if(r){scriptLoadStarted=!0;for(var A=0;A<o.childNodes.length;A++){"TABLE"===o.childNodes[A].tagName&&(o.removeChild(o.childNodes[A]),A--)}if(null!==ggbHTML5LoadedScript){var E=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=E&&E.parentNode.removeChild(E)}var L=document.createElement("script"),T=function(){S(o,n)};L.src=h+g,ggbHTML5LoadedCodebaseIsWebSimple=v,ggbHTML5LoadedCodebaseVersion=m,ggbHTML5LoadedScript=L.src,F("GeoGebra HTML5 codebase loaded: '"+h+"'.",n),c||l&&"5.0"!=l?h.requirejs?__webpack_require__.e(5178).then(function(){var e=[__webpack_require__(95178)];T.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(L.onload=T,t.appendChild(L)):(v?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),T())}else S(o,n);n.height=s,n.width=a},T=function(t,n,i){var r=j(n.width,n.height,n.borderColor,i),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=n.width+"px",o.style.height=n.height+"px",o.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),o.appendChild(r);var a=GGBAppletUtils.getScale(n,t,i);i?(t.appendChild(_()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),t.appendChild(o),1===a||isNaN(a)||(GGBAppletUtils.scaleElement(o,a),o.style.width=n.width+"px",o.style.height=n.height+"px",o.parentNode.style.width=n.width*a+"px",o.parentNode.style.height=n.height*a+"px"),e.resize=function(){N(t,r,o,i)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function N(e,t,i,r){if(e.contains(t)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var o=GGBAppletUtils.getScale(n,e,r);null!==i.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=n.width+"px",i.parentNode.style.height=n.height+"px"):(GGBAppletUtils.scaleElement(i,o),i.parentNode.style.width=n.width*o+"px",i.parentNode.style.height=n.height*o+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,t){t.appendChild(e)};var D=function(e,t,n,i){T(e,t,!0);for(var r=function(){var n=[];for(a=0;a<e.childNodes.length;a++)n.push(e.childNodes[a]);if(window.GGBT_wsf_view){var r=window.GGBT_wsf_view.renderFullScreen(e,t.id),o=document.getElementById("fullscreencontainer"),s=jQuery(e).find(".fullscreencontent");s.length>0?(r.remove(),s.attr("id","fullscreencontent").show(),jQuery(o).append(s),window.dispatchEvent(new Event("resize"))):L(r,t,!1),window.GGBT_wsf_view.launchFullScreen(o)}else f=i,L(e,t,!1);if(!window.GGBT_wsf_view)for(a=0;a<n.length;a++)e.removeChild(n[a])},o=e.getElementsByClassName("ggb_preview_play"),a=0;a<o.length;a++)o[a].addEventListener("click",r,!1),o[a].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),k()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},_=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var t='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',n=document.createElement("style");n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(n)}return e},j=function(e,t,n,i){var r=document.createElement("div");r.className="ggb_preview",r.style.position="absolute",r.style.zIndex="90",r.style.width=e-2+"px",r.style.height=t-2+"px",r.style.top="0px",r.style.left="0px",r.style.overflow="hidden",r.style.backgroundColor="white";var o="lightgrey";void 0!==n&&(o="none"===n?"transparent":n),r.style.border="1px solid "+o;var a,s,l,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==y&&c.setAttribute("src",y),c.style.opacity=.7,null!==x)&&!i){(a=document.createElement("img")).style.position="absolute",a.style.zIndex="1001",a.style.opacity=1,c.style.opacity=.3,(s=360)>e/4*3&&(s=e/4*3),l=s/5.8,a.setAttribute("src",x),a.setAttribute("width",s),a.setAttribute("height",l);var u=(e-s)/2,d=(t-l)/2;a.style.left=u+"px",a.style.top=d+"px",r.appendChild(a)}return r.appendChild(c),r},B=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},P=["web","webSimple","web3d","tablet","tablet3d","phone"],R=function(e,t){if(m=e,t)I(m,!0);else{var o,a,s=!r;if(s){var l=w(m);!isNaN(l)&&l<4.4&&(s=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=m.indexOf("//");for(var u in a=c>0?m:0===c?o+m:"https://www.geogebra.org/apps/5.2.814.0/",P)if(m.slice(-1*P[u].length)===P[u]||m.slice(-1*(P[u].length+1))===P[u]+"/")return void I(a,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!s||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||M(n.showToolBar)||M(n.showMenuBar)||M(n.showAlgebraInput)||M(n.enableRightClick)||n.appName&&"classic"!=n.appName?a+="web3d/":a+="webSimple/",I(a,!1)}},I=function(e,t){if(e.requirejs)h=e;else{"/"!==e.slice(-1)&&(e+="/"),h=e,null===t&&(t=-1===e.indexOf("http")),p=t,g="web.nocache.js",v=!1;var n=h.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?P.indexOf(n[n.length-2])>=0&&(g=n[n.length-2]+".nocache.js"):(g="webSimple.nocache.js",v=!0)),n=e.split("/"),"test"===(m=n[n.length-3]).substr(0,4)?m=m.substr(4,1)+"."+m.substr(5,1):"war"!==m.substr(0,3)&&"beta"!==m.substr(0,4)||(m="5.0");var i=parseFloat(m);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),R("5.0",t))}},F=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function O(){var e=t;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),R(e,!1),null!==c&&I(c,p),s=!0}return void 0!==n.material_id?S(O):O(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,i,r){if(e.isScreenshoGenerator)return 1;var o,a=void 0!==i&&i,s=null!=e.noScaleMargin&&e.noScaleMargin,l=(o=e.autoHeight)&&"false"!==o,c=function(e,t,n,i,r,o){var a=null;if(null!=o&&""!=o)for(var s=e.parentNode;null!=s;){if((" "+s.className+" ").indexOf(" "+o+" ")>-1){a=s;break}s=s.parentNode}var l=0,c=0,u=0,d=0,h=0,p=0,f=0;if(a)l=a.offsetWidth,c=Math.max(i?a.offsetWidth:0,a.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=l):(l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(h=l-m.width-m.left,p=u<=480?10:30):(p=m.left,h=u<=480?10:30),d=p+h)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,f=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,f=40))}return e&&((void 0===n||!n)&&t>0&&t+d<l?l=t:l-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==n&&n||(c-=f)),{width:l,height:c}}(t,e.width,n,l,a&&window.GGBT_wsf_view||s,r),u=parseInt(c.width),d=e.width,h=e.height;if(void 0===d){var p=t.querySelector(".appletParameters");p&&(d=p.offsetWidth,h=p.offsetHeight)}var f=u/d,m=a?1:c.height/h;return void 0===n||n||(f=Math.min(1,f),m=Math.min(1,m)),Math.min(f,m)}function i(e,t,i){var r,o=1,a=!1;return e.hasOwnProperty("allowUpscale")&&(a=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(a=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(r=n(e,t,a,i,e.scaleContainerClass),!a||e.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(t-i.width)/2,o=(n-i.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=r+"px")}return{responsiveResize:function(n,o){var a=n.querySelector(".appletParameters");if(a){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==a.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(a.parentElement&&/fullscreen/.test(a.parentElement.className))return;var s=i(o,n);e()&&a.setAttribute("data-param-scale",s);for(var l=null,c=0;c<n.childNodes.length;c++)if(void 0!==n.childNodes[c].className&&n.childNodes[c].className.match(/^applet_scaler/)){l=n.childNodes[c];break}if(null!==l&&null!==l.querySelector(".noscale"))return;var u=void 0!==o.id?o.id:"ggbApplet",d=window[u];null!=d&&d.recalculateEnvironments||null===l||l.className.match(/fullscreen/)||(l.parentNode.style.transform="",isNaN(s)||1===s?(t(l,1),l.parentNode.style.width=o.width+"px",l.parentNode.style.height=o.height+"px"):(l.parentNode.style.width=o.width*s+"px",l.parentNode.style.height=o.height*s+"px",t(l,s))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&r(n),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(a).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:r,getScale:i,scaleElement:t}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,t){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function t(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var n=t();if(n)e();else{o.addEventListener&&o.addEventListener(Z,r,!1);var i=setInterval((function(){r()}),$)}function r(){if(!n){if(!t())return;n=!0,e(),o.removeEventListener&&o.removeEventListener(Z,r,!1),i&&clearInterval(i)}}}((function(){var t,n,i,r;t=e,n=u(),i=n.body,(r=n.createElement(_)).language=ab,r.crossOrigin=W,r.src=t,webModule.__errFn&&(r.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),i.appendChild(r),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var i=e.lastIndexOf(tb,Math.min(n,t));return i>=O?e.substring(O,i+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;n<t.length;++n)if(-1!=t[n].src.indexOf(xb))return e(t[n].src);return W}()),n==W&&(n=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function a(e){var t=o[e](),n=i[e];if(t in n)return t;var a=[];for(var s in n)a[n[s]]=s;throw r&&r(e,a,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in i[e]},webModule.__getPropMap=function(){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[t]=a(t));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var s=(e=Cb).indexOf(Db);-1!=s&&(t=parseInt(e.substring(s+P),$),e=e.substring(O,s))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},i=e[webModule.__softPermutationId],r=O;r<i.length;r++){var o=i[r];n[o[O]]=o[P]}return n}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),n=t.body,i=t.createElement(_);i.language=ab,i.text=e,n.appendChild(i),n.removeChild(i)},A(),webModule.__moduleBase="/react/build/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},20337:function(e,t,n){"use strict";function i(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function r(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=0;i<e.length;i++){var r=e[i],o=t?"".concat(t,"/").concat(r.name):"".concat(r.name);n.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:o})}return n}function o(e,t,n){for(var i=0;i<e.length;i++){var r=e[i];if(r.key===t){r.children=n;break}r.children&&o(r.children,t,n)}return e}function a(e,t,n){var i;return function(){var r=this,o=arguments,a=function(){i=null,n||e.apply(r,o)},s=n&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e.apply(r,o)}}n.d(t,{Ax:function(){return o},Ds:function(){return a},KI:function(){return s},SI:function(){return r},f1:function(){return i}});var s=n(6816).Z.API_SERVER},17086:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),s=n(79800),l=n.n(s),c=n(59301),u="imageDimensions___a7crR",d="img___Kroat",h="fullWidth___c492T",p=n(92310),f=n.n(p),m=n(29787),g=n(2859),v=n(67310),y=n(32985),x=n(37712),b=function(e){var t=e.data,n=e.className,i=e.fullWidth,o=e.style,s=void 0===o?{}:o,p=e.onClose,b=e.onOk,w=e.showFullTools,C=e.noAssociationId,k=(0,c.useRef)(null),S=(0,c.useRef)(null),A=(0,c.useRef)(null),E=(0,c.useRef)(null),M=(0,c.useState)(!1),L=l()(M,2),T=L[0],N=L[1],D=(0,c.useState)("正在加载中"),_=l()(D,2),j=_[0],B=_[1];(0,c.useEffect)((function(){return A.current||(A.current=document.createElement("style"),document.head.appendChild(A.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),A.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&P()):(document.body.removeAttribute("data-custom"),A.current&&(document.head.removeChild(A.current),A.current=null)),function(){document.body.removeAttribute("data-custom"),A.current&&(document.head.removeChild(A.current),A.current=null)}}),[null==t?void 0:t.visible]);var P=function(){var e=a()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),B("正在加载中"),e.next=4,(0,y.ZJ)(null==t?void 0:t.src);case 4:n=e.sent,k.current.src="",k.current.src=n,k.current.onload=function(){I()},N(!1),B("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=a()(r()().mark((function e(n){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),B("正在保存中"),e.next=4,(0,v.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:n.dataUrl}});case 4:if(null==(i=e.sent)||!i.id||C){e.next=12;break}return e.next=8,(0,v.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(n.state)}});case 8:0===e.sent.status&&b(),e.next=13;break;case 12:null!=i&&i.id&&b(i);case 13:N(!1),B("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){S.current=new g.hP(k.current),S.current.targetRoot=E.current,S.current.addEventListener("render",R),S.current.addEventListener("beforeclose",p),w&&(S.current.availableMarkerTypes=S.current.ALL_MARKER_TYPES,S.current.uiStyleSettings.redoButtonVisible=!0,S.current.uiStyleSettings.notesButtonVisible=!0,S.current.uiStyleSettings.zoomButtonVisible=!0,S.current.uiStyleSettings.zoomOutButtonVisible=!0,S.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=S.current.uiStyleSettings,S.current.show(),null!=t&&t.snapshotData&&S.current.restoreState(t.snapshotData),setTimeout((function(){var e;window.scrollTo(0,0),(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var t=document.querySelector(e.name);t&&t.setAttribute("title",e.title)}))}),300)};return(0,x.jsx)(c.Fragment,{children:(null==t?void 0:t.visible)&&(0,x.jsx)(m.Z,{spinning:T,tip:j,style:{position:"absolute",width:"100vw"},children:(0,x.jsx)("div",{ref:E,className:f()(u,n,i?h:""),style:s,children:(0,x.jsx)("img",{className:d,ref:k})})})})}},74135:function(e,t,n){"use strict";var i=n(59301),r=n(77019),o=n(5269),a=n(20554),s=n(99571),l=n(76603),c=n(32313),u=(n(48136),n(37712)),d=(0,i.forwardRef)((function(e,t){var n=e.callback,d=e.showSaveButton,h=e.value,p=void 0===h?"":h,f=(0,i.useRef)(),m=function(e){f.current.setValue(f.current.getValue()+" "+e.value+" ")},g=[{key:"1",label:"快捷模板",children:(0,u.jsx)(r.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"分数得分",value:"\\frac{x}{y}",children:[{name:"分数 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"导数 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"模算术 Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"根式角标",value:"\\sqrt{x}",children:[{name:"根式 Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"上下标 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"重音符及其他 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"极限对数",value:"\\lim_{x \\to 0}",children:[{name:"极限 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"对数指数 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"界限 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"三角函数",value:"\\sin a",children:[{name:"三角函数 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"反三角函数 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"双曲函数 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"反双曲函数 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"积分运算",value:"\\int_{a}^{b}",children:[{name:"积分 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"双重积分 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"三重积分 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"曲线积分 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"大型运算",value:"\\sum_{a}^{b}",children:[{name:"求和 Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"乘积余积 Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"并集交集 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"析取合取 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"括号取整",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"括号 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(l.Z,{value:"$$".concat(e.value,"$$")}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(r.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})},{key:"2",label:"公式模板",children:(0,u.jsx)(r.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"代数",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:"\\left\\{\\begin{matrix} \r\n x=a + r\\text{cos}\\theta \\ \r\n y=b + r\\text{sin}\\theta \r\n\\end{matrix}\\right. "},{value:"\\begin{array}{l} \r\n \\text{对于方程形如:}x^{3}-1=0 \\ \r\n \\text{设}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\left\\{\\begin{matrix} \r\n \\Delta \\gt 0\\text{方程有两个不相等的实根} \\ \r\n \\Delta = 0\\text{方程有两个相等的实根} \\ \r\n \\Delta \\lt 0\\text{方程无实根} \r\n\\end{matrix}\\right. \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r\n \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r\n\\end{array} "}]}]},{name:"几何",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:"\\left.\\begin{matrix} \r\n a \\perp \\alpha \\ \r\n b \\perp \\alpha \r\n\\end{matrix}\\right\\}\\Rightarrow a \\parallel b"},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:"\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r\n \\Rightarrow a \\perp \\beta "},{value:"\\left.\\begin{matrix} \r\n a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r\n a \\parallel \\partial ,b \\parallel \\partial \r\n\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha "},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:"\\left.\\begin{matrix} \r\n m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r\n a \\perp m,a \\perp n \r\n\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha "},{value:"\\begin{array}{c} \r\n \\text{直角三角形中,直角边长a,b,斜边边长c} \\ \r\n a^{2}+b^{2}=c^{2} \r\n\\end{array}"}]}]},{name:"不等式",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:"\\begin{array}{c} \r\n a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r\n a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r\n\\end{array}"},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:"\\begin{array}{c} \r\n a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r\n \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r\n\\end{array}"},{value:"\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r\n\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) "},{value:"\\begin{array}{c} \r\n a,b \\in R^{+} \\ \r\n \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n a,b \\in R \\ \r\n \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r\n\\end{array}"}]}]},{name:"积分",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"三角",value:"e^{i \\theta}",children:[{name:"求和 Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"统计",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:"\\begin{array}{c} \r\n \\text{若}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r\n \\text{则}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r\n\\end{array}"},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:"\\begin{array}{c} \r\n P \\left( \\emptyset \\right) =0 \\\\ \r\n P \\left( S \\right) =1 \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n \\forall A \\in S \\\\ \r\n P \\left( A \\right) \\ge 0 \r\n\\end{array}"},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:"\\begin{array}{c} \r\n S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r\n P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n P_{n}=n! \\\\ \r\n A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r\n\\end{array}"}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[e.name&&(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(r.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})}],v=function(){var e=document.createElement("div");e.innerHTML=f.current.getValue();var t=e.innerText;return n&&n(t),t};return(0,i.useImperativeHandle)(t,(function(){return{getData:v}})),(0,u.jsxs)("div",{className:c.Z.mathWrap,children:[(0,u.jsx)(a.Z,{defaultActiveKey:"1",items:g}),(0,u.jsx)("math-field",{locale:"zh_cn",className:c.Z.mathField,placeholder:"请打开键盘,输入公式",ref:f,style:{width:800,marginTop:30,fontSize:18},children:p||""}),d&&(0,u.jsx)("div",{className:c.Z.button,children:(0,u.jsx)(s.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})}));t.Z=d},90059:function(e,t,n){"use strict";var i=n(82242),r=n.n(i),o=(n(59301),n(93314)),a=n(99571),s=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,l=e.styles,c=void 0===l?{}:l,u=e.customText,d=e.ButtonText,h=e.ButtonClick,p=e.Buttonclass,f=e.ButtonTwo,m=e.imgStyles,g=e.loading,v=void 0!==g&&g,y=e.className,x=void 0===y?"":y;return(0,s.jsxs)("section",{className:"tc animated fadeIn ".concat(x),style:r()({color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"},c),children:[(0,s.jsx)("img",{src:t||o,style:r()(r()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,s.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,s.jsx)(a.ZP,r()(r()({className:p,onClick:h},i),{},{children:d})),f&&f]})}},99074:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),s=n(41498),l=n.n(s),c=n(79800),u=n.n(c),d=n(59301),h={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=n(99571),f=n(70557),m=n(49337),g=n(25399),v=n(32985),y=n(99534),x=n(90059),b=n(6816),w=n(78288),C=n(37712),k=function(e){var t,n,i,o,s,c,k=e.editOffice,S=void 0===k?"view":k,A=e.data,E=e.issaver,M=e.onSaver,L=(e.theme,e.type),T=e.filename,N=e.monacoEditor,D=e.className,_=e.style,j=e.close,B=e.onClose,P=e.hasMask,R=e.disabledDownload,I=e.onImgDimensions,F=e.showNodata,O=e.recordInfo,Z=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),H=u()(Z,2),W=(H[0],H[1],(0,d.useState)("")),z=u()(W,2),G=(z[0],z[1]),V=(0,d.useState)(),U=u()(V,2),q=U[0],K=U[1],Y="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,J=(0,d.useRef)();null!==(t=A)&&void 0!==t&&t.startsWith("/api")&&"txt"!==L&&(A=b.Z.API_SERVER+A);function Q(e){return $.apply(this,arguments)}function $(){return($=l()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"pdfdata"===t.data.type&&(M(t.data.data),window.removeEventListener("message",Q,!1)),console.log("mess---:",t.data);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}T&&N&&(N.filename=T),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&G(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===L&&(A.indexOf("bigfilescdn.")>-1||A.indexOf("bigfiles1")>-1?K({url:A,fileType:(e=A,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:A.indexOf("model=edit")?"edit":"view"}):ee())}),[L,A]);var ee=function(){var e=l()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",A),t=A,A.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,y.gJ)({attachment_id:n});case 6:(i=e.sent).url=X+i.url,K(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){A.startsWith("http")||A.startsWith("blob:")?ne():(0,v.Sv)(T||"educoder",A,T)},ne=function(){O&&(0,w.fc)({id:null==O?void 0:O.id,watch_type:1,course_id:null==O?void 0:O.course_id}),(0,v.Nd)(T||"educoder",decodeURIComponent(A))};return(0,C.jsxs)("div",{style:r()({},_||{}),className:"".concat(P&&h.bgBlack," ").concat(L?h.wrp:"hide"),children:[j&&(0,C.jsxs)("div",{className:h.close,ref:J,children:[!!I&&(0,C.jsx)(g.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:function(){B(),I()},children:(0,C.jsx)("i",{className:"icon-yulanpizhu"})})}),!R&&(0,C.jsx)(g.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:ne,children:(0,C.jsx)("i",{className:"icon-quxiaozhiding"})})}),E&&(0,C.jsx)(g.Z,{title:"保存pdf并退出",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){var e=document.getElementById("pdfiframe");window.addEventListener("message",Q,!1),setTimeout((function(){e.contentWindow.postMessage("getData","*")}),300)},children:(0,C.jsx)("i",{className:"icon-baocun"})})}),(0,C.jsx)(g.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){B()},children:(0,C.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,C.jsx)("div",{className:"".concat(h[D]," ").concat(D," ").concat(h.monaco," ").concat("txt"===L?"show":"hide"),children:"txt"===L&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(m.ZP,r()({},N))})}),"audio"===L&&(0,C.jsx)("audio",{src:"".concat((null===(n=A)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=A)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(A),autoPlay:!0}),"video"===L&&(0,C.jsx)(C.Fragment,{children:(null===(o=A)||void 0===o?void 0:o.indexOf("http"))>-1?(0,C.jsx)("video",{controls:!0,src:"".concat(A),autoPlay:!0}):(0,C.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})}),"office"===L&&q&&(0,C.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(q.key,"&url=").concat(btoa(q.url),"&callbackUrl=").concat(X+(q.callbackUrl||""),"&fileType=").concat(q.fileType,"&title=").concat(q.title||"","&model=").concat(S,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!R)}),"html"===L&&(0,C.jsx)("iframe",{src:A+"&disposition=inline"}),"pdf"===L&&(0,C.jsx)("iframe",{id:"pdfiframe",src:"".concat(Y,"/js/pdfview/index.html?filename=").concat(T||"educoder.pdf","&url=").concat(encodeURIComponent(A),"&disabledDownload=").concat(!!R,"&model=").concat(S)}),"image"===L&&(0,C.jsx)("img",{src:"".concat((null===(s=A)||void 0===s?void 0:s.indexOf("http://"))>-1||(null===(c=A)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)}),("other"===L||"download"===L)&&(0,C.jsx)(C.Fragment,{children:F?(0,C.jsx)(x.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,C.jsx)(p.ZP,{icon:(0,C.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:R,children:"下载"})}):(0,C.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:te,disabled:R,children:[(0,C.jsx)(f.Z,{}),"点击下载"]})}),"flowChart"===L&&(0,C.jsx)("div",{className:"embed",children:(0,C.jsx)("iframe",{src:"/drawio/src/main/webapp/viewer.html?id=".concat(A||"","&gapi=0&od=0&db=0&gh=0&gl=0"),width:"100%",height:"100%",frameBorder:"0"})})]})}},5282:function(e,t,n){"use strict";n.d(t,{h:function(){return h},x:function(){return p}});var i=n(82242),r=n.n(i),o=n(39647),a=n.n(o),s=n(15409),l=n(33108),c=n(76603),u=n(37712),d=["value","onChange","scrollId"],h=function(e){var t=e.value,n=e.onChange,i=e.scrollId,o=a()(e,d);return(0,u.jsx)("div",{id:i||"",children:(0,u.jsx)(s.Z,r()(r()({},o),{},{defaultValue:t,onChange:function(e,t){null!=t&&t.length?n(e,t):n(e)}}))})},p=function(e){var t=e.value,n=e.onChange,i=e.placeholder,r=e.height,o=void 0===r?140:r,a=e.isEdit,d=e.miniToolbar,h=e.watch,p=void 0===h||h;return a?(0,u.jsx)(s.Z,{watch:p,isFocus:!0,height:o||void 0,placeholder:i,defaultValue:t,onChange:n,miniToolbar:d}):(0,u.jsx)("div",{style:{cursor:"pointer"},children:t?(0,u.jsx)(c.Z,{className:l.Z.inputBorder,value:t}):(0,u.jsx)("div",{className:"".concat(l.Z.inputBorder," ").concat(l.Z.placeholder," inputBorderError"),children:i})})}},76603:function(e,t,n){"use strict";n.d(t,{z:function(){return L},Z:function(){return T}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),s=n(91232),l=n.n(s),c=n(79800),u=n.n(c),d=n(59301),h=(n(73958),n(90969)),p=(n(64018),n(44523)),f=n(6816),m=n(32985),g=n(15342),v=n(77736),y=n(99571),x=n(1012),b=n(99074),w=n(37712),C=function(e){var t=e.html,n=(0,d.useRef)(null),i=(0,d.useRef)(null);return(0,d.useEffect)((function(){var e=n.current.attachShadow({mode:"open"});i.current=document.createElement("div"),i.current.className="markdown-body",i.current.innerHTML=t,e.appendChild(i.current);var r=document.createElement("style");return r.textContent='.markdown-body p {\n margin: 0 0 16px 0 !important;\n line-height: 28px;\n white-space: pre-wrap;\n }\n\n ol,\n ul,\n li {\n list-style-type: none\n }\n\n ol,\n ul,\n dl {\n margin-bottom: 0px;\n }\n\n .markdown-body {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n color: #333;\n overflow: hidden;\n font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;\n word-break: break-word;\n font-size: 16px;\n line-height: 1.6;\n white-space: normal;\n word-wrap: break-word;\n position: relative;\n }\n\n .markdown-body ul>li {\n list-style-type: disc;\n }\n\n .markdown-body ol>li {\n list-style-type: decimal;\n }\n\n .markdown-body a {\n background: transparent;\n }\n\n .markdown-body a:active,\n .markdown-body a:hover {\n outline: 0;\n }\n\n .markdown-body strong {\n font-weight: bold;\n }\n\n .markdown-body h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n .markdown-body img {\n border: 0;\n }\n\n .markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n }\n\n .markdown-body pre {\n overflow: auto;\n }\n\n .markdown-body code,\n .markdown-body kbd,\n .markdown-body pre {\n font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;\n font-size: 1em;\n }\n\n .markdown-body input {\n color: inherit;\n font: inherit;\n margin: 0;\n }\n\n .markdown-body html input[disabled] {\n cursor: default;\n }\n\n .markdown-body input {\n line-height: normal;\n }\n\n .markdown-body input[type="checkbox"] {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n }\n\n .markdown-body table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .markdown-body td,\n .markdown-body th {\n padding: 0;\n }\n\n .markdown-body * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body input {\n font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";\n }\n\n .markdown-body a {\n color: #4183c4;\n text-decoration: none;\n }\n\n .markdown-body a:hover,\n .markdown-body a:active {\n text-decoration: underline;\n }\n\n .markdown-body hr {\n height: 0;\n margin: 15px 0;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid #ddd;\n }\n\n .markdown-body hr:before {\n display: table;\n content: "";\n }\n\n .markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n margin-top: 15px;\n margin-bottom: 15px;\n line-height: 1.1;\n }\n\n .markdown-body h1 {\n font-size: 30px;\n }\n\n .markdown-body h2 {\n font-size: 21px;\n }\n\n .markdown-body h3 {\n font-size: 16px;\n }\n\n .markdown-body h4 {\n font-size: 14px;\n }\n\n .markdown-body h5 {\n font-size: 12px;\n }\n\n .markdown-body h6 {\n font-size: 11px;\n }\n\n .markdown-body blockquote {\n margin: 0;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n ul.linenums,\n ol.linenums {\n padding: 16px 0 0 56px !important;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding-left: 2em;\n }\n\n\n .markdown-body ol ol,\n .markdown-body ul ol {\n list-style-type: lower-roman;\n }\n\n .markdown-body ul ul ol,\n .markdown-body ul ol ol,\n .markdown-body ol ul ol,\n .markdown-body ol ol ol {\n list-style-type: lower-alpha;\n }\n\n .markdown-body dd {\n margin-left: 0;\n }\n\n .markdown-body code {\n font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;\n font-size: 12px;\n }\n\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 0;\n font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n }\n\n .markdown-body .octicon {\n font: normal normal 16px octicons-anchor;\n line-height: 1;\n display: inline-block;\n text-decoration: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .markdown-body .octicon-link:before {\n content: \'\f05c\';\n }\n\n .markdown-body>*:first-child {\n margin-top: 0 !important;\n }\n\n .markdown-body>*:last-child {\n margin-bottom: 0 !important;\n }\n\n .markdown-body .anchor {\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n padding-right: 6px;\n padding-left: 30px;\n margin-left: -30px;\n }\n\n .markdown-body .anchor:focus {\n outline: none;\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n position: relative;\n margin-top: 1em;\n margin-bottom: 16px;\n font-weight: bold;\n line-height: 1.4;\n }\n\n .markdown-body h1 .octicon-link,\n .markdown-body h2 .octicon-link,\n .markdown-body h3 .octicon-link,\n .markdown-body h4 .octicon-link,\n .markdown-body h5 .octicon-link,\n .markdown-body h6 .octicon-link {\n display: none;\n color: #000;\n vertical-align: middle;\n }\n\n .markdown-body h1:hover .anchor,\n .markdown-body h2:hover .anchor,\n .markdown-body h3:hover .anchor,\n .markdown-body h4:hover .anchor,\n .markdown-body h5:hover .anchor,\n .markdown-body h6:hover .anchor {\n padding-left: 8px;\n margin-left: -30px;\n text-decoration: none;\n }\n\n .markdown-body h1:hover .anchor .octicon-link,\n .markdown-body h2:hover .anchor .octicon-link,\n .markdown-body h3:hover .anchor .octicon-link,\n .markdown-body h4:hover .anchor .octicon-link,\n .markdown-body h5:hover .anchor .octicon-link,\n .markdown-body h6:hover .anchor .octicon-link {\n display: inline-block;\n }\n\n .markdown-body h1 {\n padding-bottom: 0.3em;\n font-size: 2.25em;\n line-height: 1.2;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h1 .anchor {\n line-height: 1;\n }\n\n .markdown-body h2 {\n padding-bottom: 0.3em;\n font-size: 1.75em;\n line-height: 1.225;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h2 .anchor {\n line-height: 1;\n }\n\n .markdown-body h3 {\n font-size: 1.5em;\n line-height: 1.43;\n }\n\n .markdown-body h3 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h4 {\n font-size: 1.25em;\n }\n\n .markdown-body h4 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h5 {\n font-size: 1em;\n }\n\n .markdown-body h5 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body h6 {\n font-size: 1em;\n color: #777;\n }\n\n .markdown-body h6 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n .markdown-body ul ul,\n .markdown-body ul ol,\n .markdown-body ol ol,\n .markdown-body ol ul {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .markdown-body li>p {\n margin-top: 16px;\n }\n\n .markdown-body dl {\n padding: 0;\n }\n\n .markdown-body dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: bold;\n }\n\n .markdown-body dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n }\n\n .markdown-body blockquote {\n padding: 0 15px;\n color: #777;\n border-left: 4px solid #ddd;\n }\n\n .markdown-body blockquote> :first-child {\n margin-top: 0;\n }\n\n .markdown-body blockquote> :last-child {\n margin-bottom: 0;\n }\n\n .markdown-body table {\n display: block;\n width: 100%;\n overflow: auto;\n word-break: normal;\n word-break: keep-all;\n }\n\n .markdown-body table th {\n font-weight: bold;\n text-align: revert;\n }\n\n .markdown-body table th,\n .markdown-body table td {\n padding: 6px 13px;\n border: 1px solid #ddd;\n }\n\n .markdown-body table tr {\n background-color: #fff;\n border-top: 1px solid #ccc;\n }\n\n .markdown-body table tr:nth-child(2n) {\n background-color: #f8f8f8;\n }\n\n .markdown-body img {\n max-width: 100%;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body code {\n padding: 0;\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n margin: 0;\n font-size: 85%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px;\n }\n\n .markdown-body code:has(.katex) {\n background-color: transparent;\n }\n\n .markdown-body code:before,\n .markdown-body code:after {\n letter-spacing: -0.2em;\n content: "\\00a0";\n }\n\n .markdown-body pre>code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n }\n\n .markdown-body .highlight {\n margin-bottom: 16px;\n }\n\n .markdown-body .highlight pre,\n .markdown-body pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px;\n }\n\n .markdown-body .highlight pre {\n margin-bottom: 0;\n word-break: normal;\n }\n\n .markdown-body pre {\n word-wrap: normal;\n }\n\n .markdown-body pre code {\n display: inline;\n max-width: initial;\n padding: 0;\n margin: 0;\n overflow: initial;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n }\n\n .markdown-body pre code:before,\n .markdown-body pre code:after {\n content: normal;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font-size: 11px;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .pl-c {\n color: #969896;\n }\n\n .markdown-body .pl-c1,\n .markdown-body .pl-mdh,\n .markdown-body .pl-mm,\n .markdown-body .pl-mp,\n .markdown-body .pl-mr,\n .markdown-body .pl-s1 .pl-v,\n .markdown-body .pl-s3,\n .markdown-body .pl-sc,\n .markdown-body .pl-sv {\n color: #0086b3;\n }\n\n .markdown-body .pl-e,\n .markdown-body .pl-en {\n color: #795da3;\n }\n\n .markdown-body .pl-s1 .pl-s2,\n .markdown-body .pl-smi,\n .markdown-body .pl-smp,\n .markdown-body .pl-stj,\n .markdown-body .pl-vo,\n .markdown-body .pl-vpf {\n color: #333;\n }\n\n .markdown-body .pl-ent {\n color: #63a35c;\n }\n\n .markdown-body .pl-k,\n .markdown-body .pl-s,\n .markdown-body .pl-st {\n color: #a71d5d;\n }\n\n .markdown-body .pl-pds,\n .markdown-body .pl-s1,\n .markdown-body .pl-s1 .pl-pse .pl-s2,\n .markdown-body .pl-sr,\n .markdown-body .pl-sr .pl-cce,\n .markdown-body .pl-sr .pl-sra,\n .markdown-body .pl-sr .pl-sre,\n .markdown-body .pl-src {\n color: #df5000;\n }\n\n .markdown-body .pl-mo,\n .markdown-body .pl-v {\n color: #1d3e81;\n }\n\n .markdown-body .pl-id {\n color: #b52a1d;\n }\n\n .markdown-body .pl-ii {\n background-color: #b52a1d;\n color: #f8f8f8;\n }\n\n .markdown-body .pl-sr .pl-cce {\n color: #63a35c;\n font-weight: bold;\n }\n\n .markdown-body .pl-ml {\n color: #693a17;\n }\n\n .markdown-body .pl-mh,\n .markdown-body .pl-mh .pl-en,\n .markdown-body .pl-ms {\n color: #1d3e81;\n font-weight: bold;\n }\n\n .markdown-body .pl-mq {\n color: #008080;\n }\n\n .markdown-body .pl-mi {\n color: #333;\n font-style: italic;\n }\n\n .markdown-body .pl-mb {\n color: #333;\n font-weight: bold;\n }\n\n .markdown-body .pl-md,\n .markdown-body .pl-mdhf {\n background-color: #ffecec;\n color: #bd2c00;\n }\n\n .markdown-body .pl-mdht,\n .markdown-body .pl-mi1 {\n background-color: #eaffea;\n color: #55a532;\n }\n\n .markdown-body .pl-mdr {\n color: #795da3;\n font-weight: bold;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .task-list-item {\n list-style-type: none;\n }\n\n .markdown-body .task-list-item+.task-list-item {\n margin-top: 3px;\n }\n\n .markdown-body .task-list-item input {\n float: left;\n margin: 0.3em 0 0.25em -1.6em;\n vertical-align: middle;\n }\n\n .markdown-body :checked+.radio-label {\n z-index: 1;\n position: relative;\n border-color: #4183c4;\n }\n\n\n /*! Pretty printing styles. Used with prettify.js. */\n /* SPAN elements with the classes below are added by prettyprint. */\n .pln {\n color: #000\n }\n\n /* plain text */\n\n @media screen {\n .str {\n color: #080\n }\n\n /* string content */\n .kwd {\n color: #008\n }\n\n /* a keyword */\n .com {\n color: #800\n }\n\n /* a comment */\n .typ {\n color: #606\n }\n\n /* a type name */\n .lit {\n color: #066\n }\n\n /* a literal value */\n /* punctuation, lisp open bracket, lisp close bracket */\n .pun,\n .opn,\n .clo {\n color: #660\n }\n\n .tag {\n color: #008\n }\n\n /* a markup tag name */\n .atn {\n color: #606\n }\n\n /* a markup attribute name */\n .atv {\n color: #080\n }\n\n /* a markup attribute value */\n .dec,\n .var {\n color: #606\n }\n\n /* a declaration; a variable name */\n .fun {\n color: red\n }\n\n /* a function name */\n }\n\n /* Use higher contrast and text-weight for printable form. */\n @media print,\n projection {\n .str {\n color: #060\n }\n\n .kwd {\n color: #006;\n font-weight: bold\n }\n\n .com {\n color: #600;\n font-style: italic\n }\n\n .typ {\n color: #404;\n font-weight: bold\n }\n\n .lit {\n color: #044\n }\n\n .pun,\n .opn,\n .clo {\n color: #440\n }\n\n .tag {\n color: #006;\n font-weight: bold\n }\n\n .atn {\n color: #404\n }\n\n .atv {\n color: #060\n }\n }\n\n /* Put a border around prettyprinted code snippets. */\n pre.prettyprint {\n padding: 2px;\n /* border: 1px solid #888 */\n }\n\n /* Specify class=linenums on a pre to get line numbering */\n ol.linenums {\n margin-top: 0;\n margin-bottom: 0\n }\n\n /* IE indents via margin-left */\n li.L0,\n li.L1,\n li.L2,\n li.L3,\n li.L5,\n li.L6,\n li.L7,\n li.L8 {\n list-style-type: none\n }\n\n /* Alternate shading for lines */\n li.L1,\n li.L3,\n li.L5,\n li.L7,\n li.L9 {\n background: #eee\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }',e.appendChild(r),function(){e.innerHTML=""}}),[]),(0,d.useEffect)((function(){i.current&&(i.current.innerHTML=t)}),[t]),(0,w.jsx)("div",{ref:n})};var k="mdBody___raKXb",S="button___Ch5Pc",A="previewFlowChart___vY1dq",E="@▁@",M=/<pre[^>]*>/g;var L=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/attachments/download/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(n,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return"("+f.Z.API_SERVER+"/files/uploads/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').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,"\n")},T=function(e){var t=e.value,n=void 0===t?"":t,i=e.edit,o=void 0!==i&&i,s=e.className,c=e.showTextOnly,m=e.showLines,L=e.style,T=void 0===L?{}:L,N=e.stylesPrev,D=void 0===N?{}:N,_=e.highlightKeywords,j=e.showProgramFill,B=(e.isProgramFill,e.disabledFill),P=void 0!==B&&B,R=e.programFillValue,I=e.openEditor,F=void 0===I?function(){}:I,O=e.onFillChange,Z=void 0===O?function(e){}:O,H=e.onFillBlur,W=void 0===H?function(){}:H,z=e.onFillFocus,G=void 0===z?function(){}:z,V=function(e){var t=new RegExp("\\b(".concat(["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"].join("|"),")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]*)"),"gi");return e.replace(t,"").trim()}(String(n||"")),U=(0,d.useRef)(),q=(0,d.useRef)(),K=(0,d.useState)(""),Y=u()(K,2),X=Y[0],J=Y[1],Q=(0,d.useState)("office"),$=u()(Q,2),ee=$[0],te=$[1],ne=(0,d.useState)([]),ie=u()(ne,2),re=ie[0],oe=ie[1],ae=(0,d.useRef)("a"+(0,x.Z)()),se={},le=function(e){return/<style[\s\S]*?>/i.test(e||"")};var ce=function(e){return!c&&le(V)?e:e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),i=[];return n.map((function(e){""!=e&&i.push(".".concat(ae.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},ue=(0,d.useMemo)((function(){try{V=V.replace(/\(\/attachments\/download\//g,"("+f.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+f.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+f.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+f.Z.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,"\n"),U.current.style.display="none"}catch(e){}if(j){var e=-1;return V=V.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,i){var r;return function(e,t,n){var i=document.createElement(e===E?"input":"textarea");i.style.width="100%",i.style.height=e===E?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=t;var r=Object.keys(se).length;return se[r]=i,'<span class="edu-program-fill-wrap '.concat(e===E?"":"show",'" style="width:').concat(e===E?"600px":"100%",'" title=').concat(n||"","><span>").concat(i.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==R||null===(r=R[e])||void 0===r?void 0:r.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat(ce(V||""),"</pre>")}var t=ce(V);t=(0,h.ZP)(t);var n=(0,h.ez)();V.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,h.Qv)()),(0,h.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var i=n[t],r=i.type,o=i.expression;return(0,g.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,h.AL)();var i=document.createElement("div");return i.innerHTML=t,c?i.innerText:_?(fe(i,_.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return ve()}),500),i.innerHTML)}),[V,_]);(0,d.useEffect)((function(){me.current&&me.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=de,e.onblur=he,e.onfocus=pe}))}),[re]),(0,d.useEffect)((function(){if(null!=R&&R.length)try{var e,t=me.current.querySelectorAll(".edu-program-fill-score"),n=me.current.querySelectorAll('[name="edu-program-fill"]'),i=l()(n.entries());try{for(i.s();!(e=i.n()).done;){var r,o,a,s=u()(e.value,2),c=s[0],d=s[1];d.value=(null==R||null===(r=R[c])||void 0===r?void 0:r.value)||"","warning"===(null==R||null===(o=R[c])||void 0===o?void 0:o.type)?d.className="program-fill-warning":"success"===(null==R||null===(a=R[c])||void 0===a?void 0:a.type)?d.className="program-fill-success":d.className=""}}catch(e){i.e(e)}finally{i.f()}var h,p=l()(t.entries());try{for(p.s();!(h=p.n()).done;){var f,m,g=u()(h.value,2),v=g[0];g[1].innerHTML=null!=R&&null!==(f=R[v])&&void 0!==f&&f.score?"".concat(null==R||null===(m=R[v])||void 0===m?void 0:m.score,"分"):""}}catch(e){p.e(e)}finally{p.f()}oe(R)}catch(e){console.log(e,"error")}}),[R]);var de=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),Z(re,e.target.dataset.id)},he=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),W(re,e.target.dataset.id)},pe=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),G(re,e.target.dataset.id)};function fe(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)fe(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var me=(0,d.useRef)();function ge(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),J(n),te("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),J(n),te("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),J(n),te("html");else if(n.startsWith("#")){e.preventDefault();var i=document.getElementById(n.replace("#",""));i&&i.scrollIntoView(!0)}}}h.jb.WebkitLineClamp=m,m&&(T=r()(r()({},T),h.jb));var ve=function(){var e,t=null===(e=me.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(p.ZP.isSupported()){var t=new p.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};(0,d.useEffect)((function(){if(me.current&&ue&&ue.match(M)&&window.PR.prettyPrint(),me.current)return me.current.addEventListener("click",ge),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("click",ge),(0,h.AL)(),(0,h.Iy)()}}),[ue,me.current,ge]);return(0,d.useEffect)((function(){var e,t=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=me.current)||void 0===e||e.addEventListener("copy",t),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("copy",t)}}),[me.current]),(0,w.jsxs)("div",{style:{position:"relative"},onMouseLeave:function(){U.current.style.display="none"},children:[c&&(0,w.jsx)("div",{ref:me,className:"".concat(k," "),children:ue}),!c&&!le(ue)&&(0,w.jsx)("div",{ref:me,style:r()({},T),onMouseOver:function(e){"IMG"===e.target.nodeName&&e.target.className.indexOf("draw-flowchart")>-1?(U.current.style.zIndex=1,U.current.style.display="flex",U.current.style.width=e.target.clientWidth+"px",U.current.style.height=e.target.clientHeight+"px",U.current.style.top=e.target.offsetTop+"px",U.current.style.left=e.target.offsetLeft+"px",e.target.id&&(q.current=e.target.id)):U.current.style.display="none"},className:"".concat(s||""," ").concat(P?"disabled-fill":""," markdown-body ").concat(k," ").concat(ae.current),dangerouslySetInnerHTML:{__html:ue}}),!c&&le(ue)&&(0,w.jsx)(C,{html:ue}),(0,w.jsx)("div",{ref:U,className:"".concat(S," ").concat(o?"":A),children:(0,w.jsx)(v.Z,{children:(0,w.jsx)(y.ZP,{onClick:function(){o?F(q.current):(J(q.current),te("flowChart"))},children:o?"编辑":"预览"})})}),(0,w.jsx)(b.Z,{close:!0,data:X,type:null!=X&&X.length?ee:"",style:r()({},D),onClose:function(){return J("")}})]})}},2747:function(e,t,n){"use strict";n.d(t,{h:function(){return v}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),s=n(59301),l=n(82326),c=n(28284),u=n(99571),d=n(89780),h=n.n(d),p=(n(78318),n(44084),n(37712)),f=l.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},g={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"]};function v(e){var t=e.value,n=e.onChange,i=e.mode,o=e.options,l=void 0===o?{}:o,c=(0,s.useRef)(),u=(0,s.useState)(),d=a()(u,2),f=d[0],m=d[1];return(0,s.useEffect)((function(){if(f){var e=function(e){var t=e.getValue();n&&n(t)};return f.on("change",e),function(){f.off("change",e)}}}),[f,n]),(0,s.useEffect)((function(){f&&f.setOption("mode",i)}),[f,i]),(0,s.useEffect)((function(){f&&(t===f.getValue()&&""!==t||setTimeout((function(){f.setValue(t||"")}),300))}),[f,t]),(0,s.useEffect)((function(){if(c.current&&!f){var e=h().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(e)}}),[c.current,f]),(0,p.jsx)("div",{className:"my-codemirror-container",children:(0,p.jsx)("textarea",{ref:c})})}t.Z=function(e){var t=e.callback,n=e.onCancel,i=(0,s.useState)("python"),o=a()(i,2),d=o[0],h=o[1];return(0,p.jsxs)(c.Z,r()(r()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,p.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,p.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){h(g[e][1])},children:Object.keys(g).map((function(e){return(0,p.jsx)(f,{value:e,children:g[e][0]},e)}))})}),(0,p.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,p.jsx)(v,{mode:d})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(u.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},15409:function(e,t,n){"use strict";n.d(t,{Z:function(){return he}});var i=n(91232),r=n.n(i),o=n(79800),a=n.n(o),s=n(85573),l=n.n(s),c=n(59301),u=n(5030),d=n(89780),h=n.n(d),p=n(76374),f=(n(78318),n(6313),n(25717),n(99498),n(25419),n(67549),n(76603)),m=n(37712),g=function(e){var t=e.value,n=void 0===t?"":t,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[n]));return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=n(82242),y=n.n(v),x=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学公式",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function b(e){var t=e.onActionCallback,n=e.title,i=e.icon,r=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return(0,m.jsxs)("a",{title:n,className:a,onClick:function(){t(r)},children:[(0,m.jsx)("i",{className:"".concat(i)}),s]})}var w=function(e){var t=e.watch,n=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,o=e.fullScreen,a=e.insertTemp,s=e.hidetoolBar,l=e.extraUse,c=[].concat(x,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&c.map((function(e,t){return(0,m.jsx)("li",{children:e.actionName?(0,m.jsx)(b,y()(y()({},e),{},{onActionCallback:r})):(0,m.jsx)("span",{className:"v-line"})},t)})),n?(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"点击新增填空项"})})}):null,i?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,a&&(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,m.jsx)("li",{children:l}),(0,m.jsx)("li",{className:"btn-full-screen",children:(0,m.jsx)(b,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},C=n(56946),k=n(28284),S=n(37568),A=n(99571),E={labelCol:{span:4},wrapperCol:{span:20}},M=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,y()(y()({},E),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,m.jsx)(k.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsx)(k.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(A.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(A.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},L=n(2747),T=n(26805),N=n(62957),D=n(77019),_=n(17086),j=function(e){var t=e.callback,n=e.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var o=i.toDataURL("image/png");return(0,m.jsx)(N.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,m.jsx)(D.Z,{style:{height:"100vh"},children:(0,m.jsx)(_.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},B=n(30641),P=n(5269),R=n(6767),I="drawerWrap___MfDw8",F=(0,c.forwardRef)((function(e,t){e.onCancel;var n=e.editImgId,i=e.callback,r=((0,c.useRef)(),(0,c.useRef)()),o=((0,c.useRef)(),(0,c.useRef)(!1),(0,c.useRef)(!1));console.log("ref:",t);var s=(0,c.useState)(0),l=a()(s,2),u=l[0],d=l[1],h=(0,c.useState)("100vh"),p=a()(h,2),f=p[0],g=p[1];return(0,c.useEffect)((function(){d(1)}),[]),(0,c.useImperativeHandle)(t,(function(){return{setHeight:g}})),(0,m.jsx)("div",{ref:o,className:"body-overflow-initial",children:(0,m.jsx)(B.Z,{width:"100vw",height:f,footer:null,closable:!0,placement:"bottom",open:!!u,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:"zIndex-9999 ".concat(I),onClose:function(){window.saveDrawData((function(e){i({src:"/api/attachments/".concat(e),id:e})}))},title:(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(P.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(P.Z,{onClick:function(){g("60px"===f?"100vh":"60px")},children:(0,m.jsx)("span",{className:"current c-blue",style:{fontWeight:400},children:"展开/收起"})}),(0,m.jsx)(P.Z,{onClick:function(){window.saveDrawData((function(e){null!==e?(R.ZP.success({content:"保存成功",key:"saveFlowChart",style:{zIndex:999999999}}),i({src:"/api/attachments/".concat(e),id:e,disabledClose:!0})):R.ZP.warning({content:"内容为空,请先绘制流程图",key:"saveFlowChart"})}))},children:(0,m.jsx)(A.ZP,{type:"primary",className:"ml20",children:"保存"})})]}),children:(0,m.jsx)("iframe",{src:"/drawio/src/main/webapp/?id=".concat(n||"","&gapi=0&od=0&db=0&gh=0&gl=0&local=0"),width:"100%",height:"100%",frameBorder:"0",ref:r})})})})),O=n(6816),Z=n(47889),H=n(71051),W=Z.ZP.Group,z={margin:"0 8px"},G=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:z,children:"单元格数:"}),(0,m.jsx)("span",{style:z,children:"行数"}),(0,m.jsx)(k.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(H.Z,{})}),(0,m.jsx)("span",{style:z,children:"列数"}),(0,m.jsx)(k.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(H.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:z,children:"对齐方式:"}),(0,m.jsx)(k.Z.Item,{name:"align",children:(0,m.jsxs)(W,{children:[(0,m.jsx)(Z.ZP,{value:"default",children:(0,m.jsx)("i",{className:"fa fa-align-justify"})}),(0,m.jsx)(Z.ZP,{value:"left",children:(0,m.jsx)("i",{className:"fa fa-align-left"})}),(0,m.jsx)(Z.ZP,{value:"center",children:(0,m.jsx)("i",{className:"fa fa-align-center"})}),(0,m.jsx)(Z.ZP,{value:"right",children:(0,m.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(A.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(A.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},V=n(71411),U=n(24433),q=n.n(U),K=(0,c.forwardRef)((function(e,t){var n=e.use3d,i=e.width,r=e.height,o=e.callback,s=(e.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),u=(0,c.useState)(!1),d=a()(u,2),h=d[0],p=d[1],f=(0,c.useRef)({id:s,appName:"graphing",width:i||1e3,height:r||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){l.current=new(q())(f.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var g=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,c.useEffect)((function(){f.current.appName=h?"3D":"graphing",l.current.inject("applet_container")}),[h]),(0,c.useEffect)((function(){p(n)}),[n]),(0,c.useImperativeHandle)(t,(function(){return{getImgData:g}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:s}),(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(P.Z,{flex:1,children:(0,m.jsx)(V.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:h,onChange:function(e){return p(e)}})}),(0,m.jsx)(P.Z,{children:(0,m.jsx)(A.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),Y=n(74135),X="link",J="upload-image",Q="add-flowchart",$="draw-image",ee="code-block",te="add-table",ne="------------",ie={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},re=n(21323),oe=n(32985);var ae="@▁▁@",se=["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"];function le(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ue=l()(l()({},ce+"-B","bold"),ce+"-I","italic"),de=l()(l()(l()(l()(l()(l()(l()(l()({},X,"添加链接"),ee,"添加代码块"),J,"添加图片"),$,"添加画图"),Q,"插入流程图"),te,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),he=function(e){var t=e.defaultValue,n=void 0===t?"":t,i=e.onChange,o=e.width,s=void 0===o?"100%":o,d=e.height,v=void 0===d?400:d,y=e.miniToolbar,x=void 0!==y&&y,b=e.isFocus,k=void 0!==b&&b,S=e.watch,A=e.insertTemp,E=e.mode,D=void 0===E?"markdown":E,_=e.id,B=void 0===_?"markdown-editor-id":_,P=e.showResizeBar,I=void 0!==P&&P,Z=e.noStorage,H=void 0!==Z&&Z,W=e.showNullButton,z=void 0!==W&&W,V=e.showNullProgramButton,U=void 0!==V&&V,q=e.hidetoolBar,ne=void 0!==q&&q,ce=e.fullScreen,he=void 0!==ce&&ce,pe=e.onBlur,fe=e.onCMBeforeChange,me=e.onFullScreen,ge=e.className,ve=void 0===ge?"":ge,ye=e.disablePaste,xe=void 0!==ye&&ye,be=e.disabled,we=void 0!==be&&be,Ce=e.disabledFill,ke=void 0!==Ce&&Ce,Se=e.placeholder,Ae=void 0===Se?"":Se,Ee=e.values,Me=void 0===Ee?"":Ee,Le=e.extraUse,Te=e.onAddBlank,Ne=(0,c.useState)(null),De=a()(Ne,2),_e=De[0],je=De[1],Be=(0,c.useState)(n),Pe=a()(Be,2),Re=Pe[0],Ie=Pe[1],Fe=(0,c.useState)(S),Oe=a()(Fe,2),Ze=Oe[0],He=Oe[1],We=(0,c.useState)(he),ze=a()(We,2),Ge=ze[0],Ve=ze[1],Ue=(0,c.useState)(""),qe=a()(Ue,2),Ke=qe[0],Ye=qe[1],Xe=(0,c.useState)(0),Je=a()(Xe,2),Qe=Je[0],$e=Je[1],et=(0,c.useState)(v),tt=a()(et,2),nt=tt[0],it=tt[1],rt=(0,c.useState)(!1),ot=a()(rt,2),at=(ot[0],ot[1]),st=(0,c.useState)(0),lt=a()(st,2),ct=lt[0],ut=lt[1],dt=(0,c.useState)(0),ht=a()(dt,2),pt=ht[0],ft=ht[1],mt=(0,c.useRef)(),gt=(0,c.useRef)(),vt=(0,c.useRef)(),yt=(0,c.useRef)(),xt=(0,c.useRef)(),bt=(0,c.useRef)(),wt=(0,u.useDispatch)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Ie(Me),null==_e||_e.setValue(Me),window.scrollTo(0,e)}),[Me]),(0,c.useEffect)((function(){null==me||me(Ge)}),[Ge]),(0,c.useEffect)((function(){if(mt.current){var e=function(e,n){if(!xe){var i=n.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var a,s=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(s=o[0]);var l=s.getAsFile(),c=l.name.split(".").pop();(0,T.I)(l,(function(e){var n,i,r;e.id?(null==l||null===(n=l.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection('<img width="100%" src="/api/attachments/'.concat(e.id,"?type=").concat(e.content_type,')" alt="','" />')):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):se.includes(c)?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):t.replaceSelection("[".concat(l.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){R.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=h().fromTextArea(mt.current,{mode:D,lineNumbers:!x,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",Ae):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),i=n.getCursor(),r=n.getLine(i.line),o=r.charAt(i.ch-1),a=r.lastIndexOf("@▁@",i.ch),s=r.lastIndexOf("@▁▁@",i.ch),l=a>s?a:s,c=a>s?3:4;if(-1===ae.indexOf(o))return null;if(console.log("change1:",t,e,r,i,l,a,s,o),l>=0&&i.ch-l<5){var u=l+c;return n.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);n&&t.preventDefault()}})),k&&t.focus(),t.on("paste",e),we&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),je(t),function(){t.off("paste",e)}}}),[]);var Ct=(0,c.useCallback)((function(){gt.current}),[nt,gt,Ge]);(0,c.useEffect)((function(){if(_e){var e=function(){var e=new p.Z((function(e){var t,n=r()(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(Ct(),_e.setSize("100%","100%"),_e.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(mt.current.parentElement),e}();return function(){var t,n;null!==(t=mt.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=mt.current)||void 0===n?void 0:n.parentElement)}}}),[_e,Ct]),(0,c.useEffect)((function(){if(_e){for(var e=[],t=function(){var t=a()(i[n],2),r=t[0],o=t[1],s=l()({},r,(function(){kt(o)}));e.push(s),_e.addKeyMap(s)},n=0,i=Object.entries(ue);n<i.length;n++)t();return function(){for(var t=0,n=e;t<n.length;t++){var i=n[t];_e.removeKeyMap(i)}}}}),[_e]),(0,c.useEffect)((function(){he!==Ge&&Ve(he)}),[he]),(0,re.Z)((function(){if(!H&&Qe>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(B);e>=Qe+1e4&&(!t||t!==Re)&&(window.sessionStorage.setItem(B,Re),at(!0))}}),1e4),(0,c.useEffect)((function(){He(S)}),[_e,S]),(0,c.useEffect)((function(){_e&&k&&_e.focus()}),[_e,k]),(0,c.useEffect)((function(){if(Ze&&_e){var e=function(e){var t=e.target;if(yt.current){var n=t.scrollTop/t.scrollHeight;yt.current.scrollTop=yt.current.scrollHeight*n}},t=_e.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[_e,Ze]),(0,c.useEffect)((function(){if(_e&&fe){var e=function(e,t){fe(e,t)};return _e.on("beforeChange",e),function(){_e.off("beforeChange",e)}}}),[_e,fe]),(0,c.useEffect)((function(){if(_e&&pe){var e=function(){pe(_e.getValue())};return _e.on("blur",e),function(){_e.off("blur",e)}}}),[_e,pe]),(0,c.useEffect)((function(){if(_e){var e=function(e,t){var n=e.getValue();Ie(n),$e((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(U?i(n,Lt(n)):i(n))};return _e.on("change",e),function(){_e.off("change",e)}}}),[_e,i]),(0,c.useEffect)((function(){if(_e)if(null==n)_e.setValue(""),Ie("");else{var e=window.scrollY||window.pageYOffset;n!==_e.getValue()&&(_e.setValue(n),Ie(n),_e.setCursor(we?1:_e.lineCount(),0),window.scrollTo(0,e))}}),[_e,n]);var kt=(0,c.useCallback)((function(e){var t=_e.getCursor(),n=_e.getSelection(),i=n.split("\n");switch(e){case"bold":return _e.replaceSelection("**"+n+"**"),""===n&&_e.setCursor(t.line,t.ch+2),_e.focus();case"italic":return _e.replaceSelection("*"+n+"*"),""===n&&_e.setCursor(t.line,t.ch+1),_e.focus();case"code":return _e.replaceSelection("`"+n+"`"),""===n&&_e.setCursor(t.line,t.ch+1),_e.focus();case"inline-latex":if((0,oe.Ye)(wt))return;return Ye("inline-latex"),_e.focus();case"latex":return _e.replaceSelection("```latex\n"+n+"\n```"),_e.setCursor(t.line+1,n.length+1),_e.focus();case"line-break":return _e.replaceSelection("<br/>\n"),_e.focus();case"list-ul":return""===n?_e.replaceSelection("- "+n):_e.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),_e.focus();case"list-ol":return""===n?_e.replaceSelection("1. "+n):_e.replaceSelection(i.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),_e.focus();case"add-null-ch":return void(null==Te||Te());case"add-signal":return""===n&&_e.setCursor(t.line,t.ch),_e.replaceSelection("@▁@"),_e.focus();case"add-multiple":return""===n&&_e.setCursor(t.line,t.ch),_e.replaceSelection(ae),_e.focus();case"inster-template-1":return""===n&&_e.setCursor(t.line,t.ch),_e.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),_e.focus();case"eraser":return _e.setValue(""),_e.focus();case"trigger-watch":return He(!Ze),_e.focus();case"trigger-full-screen":return Ve(!Ge),_e.focus();case X:return void Ye(X);case ee:return void Ye(ee);case J:return void Ye(J);case $:return void Ye($);case"maths-latex":if((0,oe.Ye)(wt))return;return void Ye("maths-latex");case Q:return xt.current="",sessionStorage.removeItem("file_id"),void Ye(Q);case te:return void Ye(te);default:throw new Error}}),[_e,Ze,Ge]),St=(0,c.useCallback)((function(e,t){var n,i,r,o,a;null!=e&&e.disabledClose||Ye("");var s=e||{},l=s.src,c=s.alt,u=s.id;switch(Ke){case X:var d=e.title,h=e.link;return _e.replaceSelection("[".concat(d,"](").concat(h,")")),_e.focus();case ee:var p=e.language,f=e.content;return _e.replaceSelection(["```"+p,f,"```"].join("\n")),_e.focus();case"maths-latex":for(var m=atob(e),g=new Uint8Array(m.length),v=0;v<m.length;v++)g[v]=m.charCodeAt(v);var y=new Blob([g],{type:"image/png"});(0,T.I)(y,(function(e){e.id?_e.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":if((0,oe.Ye)(wt))return;_e.replaceSelection("`$$"+e+"$$`");break;case"add-flowchart":if(!u)return;-1===_e.getValue().indexOf(l)?_e.replaceSelection('<center><img id="'.concat(u,'" width="80%" src="').concat(l,'" class="draw-flowchart" alt="').concat(c||"",'" /></center>')):document.getElementById(u).src=O.Z.API_SERVER+l+"?t="+Date.now();break;case J:case $:var x=t,b=null==x||null===(n=x.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(i=n.pop)||void 0===i?void 0:i.call(n);return(null==x||null===(r=x.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==x||!x.type?null!=x&&x.align||null!=x&&x.width?_e.replaceSelection('<p style="text-align:'.concat(x.align||"initial",'"><img width="').concat(x.width?x.width+"%":"initial",'" src="').concat(l,'" alt="').concat(c||"",'" /></p>')):_e.replaceSelection('<img width="100%" src="'.concat(l,'" alt="').concat(c||"",'" />')):(null==x||null===(o=x.type)||void 0===o?void 0:o.indexOf("video"))>-1?_e.replaceSelection('<video width="100%" controls src="'.concat(l,'"></video>')):(null==x||null===(a=x.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?_e.replaceSelection('<a href="'.concat(l,"?type=").concat(x.type,'&disposition=inline" target="_blank">').concat(x.name,"</a>")):se.includes(b)?_e.replaceSelection('<a href="'.concat(l,'?type=office&disposition=inline" target="_blank">').concat(x.name,"</a>")):_e.replaceSelection("[".concat(x.name,"](").concat(l,")")),_e.focus();case te:for(var w=e.row,C=e.col,k=e.align,S="\n",A=0;A<w;A++){for(var E=[],M=[],L=0;L<C;L++)1===A&&M.push(ie[k]),E.push(" ");1===A&&(S+="| ".concat(M.join(" | ")," |\n")),S+="| ".concat(E.join(1===C?"":" | ")," |\n")}return _e.replaceSelection(S+"\n"),_e.focus();default:throw new Error}}),[_e,Ke]),At=(0,c.useMemo)((function(){switch(Ke){case X:return(0,m.jsx)(M,{callback:St,onCancel:Et});case ee:return(0,m.jsx)(L.Z,{callback:St,onCancel:Et});case J:return(0,m.jsx)(T.Z,{callback:St,onCancel:Et});case Q:return(0,m.jsx)(F,{editImgId:xt.current,callback:St,onCancel:Et});case te:return(0,m.jsx)(G,{callback:St,onCancel:Et});case"maths-latex":return(0,m.jsx)(K,{showSaveButton:!0,callback:St});case"inline-latex":return(0,m.jsx)(Y.Z,{showSaveButton:!0,callback:St});default:return null}}),[Ke]);function Et(){Ye("")}(0,c.useEffect)((function(){if(vt.current){var e=function(e){r=!0,o=e.pageY},t=function(){r=!1},n=function(e){if(r){var t=e.pageY-o;t<0&&(t=0),t>300&&(t=300),it(v+t+"px")}},i=vt.current,r=!1,o=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[_e,vt]),(0,c.useEffect)((function(){it(v)}),[v]);var Mt={width:le(s),height:le(nt)},Lt=((0,c.useMemo)((function(){if(Qe){var e=new Date(Qe),t=e.getHours(),n=e.getMinutes(),i=e.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(i)}return 0}),[Qe]),function(e){var t=[];if(U){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,i){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,c.useEffect)((function(){de[Ke]&&Ke!==$&&Ke!==Q&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;ut(t),ft(n)}),0)}),[Ke]);var Tt=function(e,t,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&n<e||t<20&&i>t||t>r-20&&i<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsx)("div",{className:"markdown-editor-wrapper",ref:gt,children:(0,m.jsxs)("div",{className:"markdown-editor-container ".concat(ve," ").concat(Ze?"on-preview":""," ").concat(x?"mini":""," ").concat(Ge?"full-screen":""),style:Mt,children:[(0,m.jsx)(w,{insertTemp:A,watch:Ze,fullScreen:Ge,showNullButton:z,showNullProgramButton:U,onActionCallback:kt,hidetoolBar:ne,extraUse:Le}),(0,m.jsxs)("div",{className:"markdown-editor-body",children:[(0,m.jsx)("div",{className:"codemirror-container",children:(0,m.jsx)("textarea",{ref:mt,placeholder:Ae})}),Ze?(0,m.jsxs)("div",{ref:yt,className:"preview-container",children:["stex"===D&&(0,m.jsx)(g,{value:Re}),"stex"!==D&&(0,m.jsx)(f.Z,{edit:!0,disabledFill:ke,showProgramFill:U,value:Re,openEditor:function(e){var t;xt.current=e,null===(t=bt.current)||void 0===t||t.setHeight("100vh"),setTimeout((function(){Ye("add-flowchart")}),150)}})]}):null]})]})}),I?(0,m.jsx)("a",{ref:vt,className:"editor-resize"}):null,Ke===$&&(0,m.jsx)(j,{callback:St,onCancel:Et}),Ke===Q&&(0,m.jsx)(F,{ref:bt,editImgId:xt.current,callback:St,onCancel:Et}),(0,m.jsx)(C.Z,{children:de[Ke]&&Ke!==$&&Ke!==Q?(0,m.jsx)(N.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ct,top:pt},title:(0,m.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-ct,n=e.clientY-pt;document.body.onmousemove=function(e){var i=e.clientX-t,r=e.clientY-n,o=document.getElementsByClassName("markdown-popup-form")[0],a=window.innerWidth-o.offsetWidth,s=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,a)),r=Math.max(0,Math.min(r,s)),Tt(e.clientX,e.clientY,t,n)&&(ut(i),ft(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:de[Ke]}),open:!0,onCancel:Et,footer:null,destroyOnClose:!0,width:Ke===Q?"1200px":null,height:Ke===Q?"80vh":null,className:"markdown-popup-form",children:At}):null})]})}},26805:function(e,t,n){"use strict";n.d(t,{Z:function(){return b},I:function(){return C}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),s=n(28284),l=n(6767),c=n(37568),u=n(77736),d=n(71051),h=n(47889),p=n(99571),f=n(20337),m=n(59301),g=n(37712),v=s.Z.useForm,y={width:280,marginRight:10},x={labelCol:{span:5},wrapperCol:{span:19}},b=function(e){var t=e.callback,n=e.onCancel,i=v(),o=a()(i,1)[0],f=(0,m.useRef)();function b(e,t){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):l.ZP.error(e.message)}return(0,g.jsxs)(s.Z,r()(r()({form:o},x),{},{className:"upload-image-panel",onFinish:function(e){f.current.width=o.getFieldValue("width"),f.current.align=o.getFieldValue("align"),t(e,f.current)},style:{width:470,overflow:"hidden"},children:[(0,g.jsx)(s.Z.Item,{label:"图片地址",required:!0,children:(0,g.jsxs)("div",{className:"flex-container",children:[(0,g.jsx)(s.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,g.jsx)(c.Z,{style:y})}),(0,g.jsx)(w,{onFileChange:function(e){var t=e.target.files[0];f.current=t,C(t,b)}})]})}),(0,g.jsx)(s.Z.Item,{label:"图片描述",name:"alt",children:(0,g.jsx)(c.Z,{style:{width:264}})}),(0,g.jsx)(s.Z.Item,{label:"图片宽度",name:"width",children:(0,g.jsxs)(u.Z,{children:[(0,g.jsx)(s.Z.Item,{name:"width",style:{margin:0},children:(0,g.jsx)(d.Z,{style:{width:264}})}),(0,g.jsx)("span",{className:"ml8",children:"%"})]})}),(0,g.jsx)(s.Z.Item,{label:"对齐方式",name:"align",children:(0,g.jsx)(h.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"左对齐"},{value:"center",label:"居中对齐"},{value:"right",label:"右对齐"}]})}),(0,g.jsx)("aside",{children:(0,g.jsxs)(s.Z.Item,{style:{textAlign:"right",position:"relative",right:-98},children:[(0,g.jsx)(p.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,g.jsx)(p.ZP,{type:"default",onClick:n,children:"取消"})]})})]}))};function w(e){var t=e.onFileChange;return(0,g.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,g.jsx)("input",{type:"file",onChange:t})]})}function C(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(f.KI,"/api/attachments.json")),i.send(n)}},56946:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(82100),r=n.n(i),o=n(29186),a=n.n(o),s=n(80619),l=n.n(s),c=n(47074),u=n.n(c),d=n(59301),h=n(4676),p=function(e){l()(n,e);var t=u()(n);function n(e){var i;r()(this,n),i=t.call(this,e);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return a()(n,[{key:"render",value:function(){var e=this.props.children;return(0,h.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(d.Component)},49337:function(e,t,n){"use strict";n.d(t,{SV:function(){return J},ZP:function(){return X}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),s=n(91232),l=n.n(s),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),p=n(7557),f=n.n(p),m=n(41498),g=n.n(m),v=n(59301),y=n(76374),x=["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"],b={quickKey:[{label:"main",content:["public static void main(String[] args) {","\t$0","}"].join("\n")},{label:"System.out.println",content:["System.out.println($0)"].join("\n")},{label:"System.out.print",content:["System.out.print($0)"].join("\n")}],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"]},w={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}) {","\t$0","} else {","\t","}"].join("\n")},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {","\t$0","}"].join("\n")},{label:"if",content:["if () {","\t$0","}"].join("\n")},{label:"for",content:["for(int j=0 ; j<10; j++){","\t$0","}"].join("\n")},{label:"trycatch",content:["try{","\t$0","}catch(ExceptionName e){","}"].join("\n")},{label:"using namespace std;",content:["using namespace std;"].join("\n")},{label:"include <iostream>",content:["#include <iostream>"].join("\n")},{label:"include <vector>",content:["#include <vector>"].join("\n")},{label:"include <cstdio>",content:["#include <cstdio>"].join("\n")},{label:"include <cstring>",content:["#include <cstring>"].join("\n")},{label:"include <sstream>",content:["#include <sstream>"].join("\n")},{label:"include <fstream>",content:["#include <fstream>"].join("\n")},{label:"include <map>",content:["#include <map>"].join("\n")},{label:"include <string>",content:["#include <string>"].join("\n")},{label:"include <cmath>",content:["#include <cmath>"].join("\n")}]},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("\n")}]},k={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join("\n")}]},S=n(53184),A=n.n(S),E={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"]}},M=function(e,t,n,i){e.languages.registerCompletionItemProvider(t,{provideCompletionItems:function(t,r){var o=t.getWordUntilPosition(r),s={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=t.getLineContent(r.lineNumber).substring(o.startColumn-2,o.endColumn),c=function(e,t,n,i){var r=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});return Array.from(new Set(r.match(/\b\w{2,}\b/g)||[])).map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Text,insertText:t,range:i}}))}(e,t,r,s);return{suggestions:[].concat(a()(c),a()(n.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,documentation:t,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))),a()(i.map((function(t){return{label:t.label,kind:e.languages.CompletionItemKind.Snippet,documentation:t.content,insertText:l.startsWith("#")?t.content.replace(/#/,""):t.content,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))))}}})},L=n(82100),T=n.n(L),N=n(29186),D=n.n(N),_=n(85573),j=n.n(_),B=function(){function e(t,n,i){var r=this;T()(this,e),this.placeholder=t,this.editor=n,this.monaco=i,n.onDidChangeModelContent((function(){return r.onDidChangeModelContent()})),this.onDidChangeModelContent()}return D()(e,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return e.ID}},{key:"getDomNode",value:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}},{key:"getPosition",value:function(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"dispose",value:function(){this.editor.removeContentWidget(this)}}]),e}();j()(B,"ID","editor.widget.placeholderHint");var P=B,R=n(96236),I=n(6767),F=n(25399),O=n(89392),Z=n(13326),H=n(56102),W=n(37712),z=["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"];function G(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function V(){}var U={"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",Scala:"scale",solidity:"sol"};function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var i=U[e[n]];if(i)return i}return t[0]}return U[t]||t}var K=null,Y=function(){var e=g()(f()().mark((function e(){return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.writeText(" ");case 3:console.log("内容已自动复制到剪贴板:"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("自动复制失败:",e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),X=function(e){var t=e.width,i=void 0===t?"100%":t,o=e.height,s=void 0===o?"100%":o,c=e.value,d=e.language,p=void 0===d?"javascript":d,m=e.style,S=void 0===m?{}:m,L=e.options,T=void 0===L?{}:L,N=e.overrideServices,D=void 0===N?{}:N,_=e.theme,j=void 0===_?"vs-dark":_,B=e.onEditBlur,U=e.isCopy,X=void 0!==U&&U,J=e.onSave,Q=e.autoHeight,$=void 0!==Q&&Q,ee=e.forbidCopy,te=void 0!==ee&&ee,ne=e.onChange,ie=void 0===ne?V:ne,re=e.editorDidMount,oe=void 0===re?V:re,ae=e.onFocus,se=void 0===ae?V:ae,le=e.onBreakPoint,ce=void 0===le?V:le,ue=e.breakPointValue,de=void 0===ue?[]:ue,he=e.filename,pe=void 0===he?"educoder.txt":he,fe=e.errorLine,me=e.errorContent,ge=void 0===me?"":me,ve=e.highlightLine,ye=e.openBreakPoint,xe=void 0!==ye&&ye,be=e.placeholder,we=void 0===be?"":be,Ce=e.showMiniMap,ke=void 0===Ce||Ce,Se=(h()(e,z),(0,v.useRef)()),Ae=(0,v.useRef)({}),Ee=(0,v.useRef)(),Me=(0,v.useRef)(),Le=(0,v.useRef)([]),Te=(0,v.useRef)(!1),Ne=(0,v.useRef)(),De=(0,v.useRef)(),_e=(0,v.useRef)(!1),je=(0,v.useState)(!1),Be=u()(je,2),Pe=Be[0],Re=Be[1];(0,v.useEffect)((function(){var e=Z.Z.subscribe("formatDocument",(function(e){var t,n=Ae.current.instance;null==n||null===(t=n.getAction)||void 0===t||t.call(n,"editor.action.formatDocument").run()}));return window.updateMonacoValue=function(e){ie(e)},e}),[]),(0,v.useEffect)((function(){var e,t=Ae.current.instance;(Me.current&&clearTimeout(Me.current),Me.current=setTimeout((function(){!function(){var e=Ae.current.instance;if(null!=c&&e&&Pe){var t=e.getModel();t&&c!==t.getValue()&&(!0,t.setValue(c),e.layout(),!1)}}()}),500),c&&null!=c&&c.length)&&(null==t||null===(e=t.updateOptions)||void 0===e||e.call(t,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(c.split(/\r\n|\r|\n/g).length))+3,5)}))}),[c,Pe,Ae.current]),(0,v.useEffect)((function(){if(fe&&Ae.current&&Ae.current.instance){var e=Ae.current.instance;e.changeViewZones((function(e){var t=document.createElement("div");t.style.padding="10px 20px",t.style.width="calc(100% - 20px)",t.className="my-error-line-wrp",t.innerHTML=ge,e.addZone({afterLineNumber:fe||11,heightInLines:3,domNode:t})}));var t={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}};e.addOverlayWidget(t),e.revealPositionInCenter({lineNumber:20,column:1})}}),[fe,Ae.current,Pe]);var Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e||""===e.trim())return!0;for(var n=Ae.current.instance.getModel(),i=n.getLineTokens(t),r=!1,o=0;o<2;o++)1===i.getStandardTokenType(o)&&(r=!0);return r};function Fe(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),J())}(0,v.useEffect)((function(){var e,t=null===(e=Ae.current)||void 0===e?void 0:e.instance;if(t&&Pe&&te){var n=t.onDidBlurEditorWidget((function(){_e.current=!1})),i=t.onDidFocusEditorText((function(){_e.current=!0}));return function(){n.dispose(),i.dispose()}}}),[Ae.current,Pe,te]),(0,v.useEffect)((function(){var e;if(null!==(e=Ae.current)&&void 0!==e&&e.instance&&Pe&&xe){var t=Ae.current.instance,n=t.getModel();if(!n)return;!function(){var e,i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(e=a.n()).done;){var s,c=e.value;if("highlighted-line"===c.options.className)i.push(null==c||null===(s=c.range)||void 0===s?void 0:s.startLineNumber),r.push(null==c?void 0:c.id)}}catch(e){a.e(e)}finally{a.f()}if(ve!==i[0]){n.deltaDecorations(r,[]);var u=n.getLineCount();ve&&ve<=u&&(t.deltaDecorations([],[{range:new K.Range(ve,1,ve,n.getLineMaxColumn(ve)),options:{isWholeLine:!0,className:"highlighted-line"}}]),t.revealLineInCenter(ve))}}();var i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(e=a.n()).done;){var s,c=e.value;if("breakpoints-select"===c.options.linesDecorationsClassName)i.push(null==c||null===(s=c.range)||void 0===s?void 0:s.startLineNumber),r.push(null==c?void 0:c.id)}}catch(e){a.e(e)}finally{a.f()}if(t)return{lines:i,ids:r};ce(i)},r=function(){var e=g()(f()().mark((function e(t){var r;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={range:new K.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},e.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=g()(f()().mark((function e(r){var o,a,s,c,u;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=[],a=t.getLineDecorations(r),s=l()(a);try{for(s.s();!(c=s.n()).done;)"breakpoints-select"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(e){s.e(e)}finally{s.f()}return e.next=6,n.deltaDecorations(o,[]);case 6:i();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(e){var n,i=t.getLineDecorations(e),r=l()(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(e){r.e(e)}finally{r.f()}return!1};if(!(0,O.isEqual)(de,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var s=de.map((function(e){return{range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],s)}var c=t.onDidChangeModelContent((function(e){var s=t.getPosition();if(s){var l=s.lineNumber;clearTimeout(De.current),De.current=setTimeout((function(){Ie(n.getLineContent(l),l)?o(l):a(l)?(o(l),r(l)):i()}),100)}})),u=t.onMouseDown((function(e){var t;if(e.target.detail&&null!==(t=e.target)&&void 0!==t&&null!==(t=t.element)&&void 0!==t&&null!==(t=t.className)&&void 0!==t&&t.includes("line-numbers")){var i=e.target.position.lineNumber;if(Ie(n.getLineContent(i),i))return;a(i)?o(i):r(i)}})),d=function(){Le.current=t.deltaDecorations(Le.current,[])},h=t.onMouseMove((function(e){var i;if(d(),e.target.detail&&null!==(i=e.target)&&void 0!==i&&null!==(i=i.element)&&void 0!==i&&null!==(i=i.className)&&void 0!==i&&i.includes("line-numbers")){var r=e.target.position.lineNumber;if(Ie(n.getLineContent(r),r))return;!function(e){var n={range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Le.current=t.deltaDecorations(Le.current,[n])}(r)}})),p=t.onMouseLeave((function(){d()}));return function(){c.dispose(),u.dispose(),h.dispose(),p.dispose()}}}),[Ae.current,Pe,de,ve,xe,p]),(0,v.useEffect)((function(){var e;null!==(e=Ae.current)&&void 0!==e&&e.instance&&xe&&Ae.current.instance.setPosition({lineNumber:0,column:0})}),[ve]);var Oe=function(){if($&&Ae.current.instance){var e=Ae.current.instance.getContentHeight();Ke(e<s?s:e)}else Ke(s)};var Ze=function(e){if(_e.current){var t=e.keyCode,n=e.ctrlKey,i=e.metaKey,r=e.target;return"paste"!==e.type&&(67!==t&&86!==t||!i&&!n)||"TEXTAREA"!==r.nodeName||(I.ZP.warning({content:decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"),key:"monaco-editor-tip"}),e.preventDefault()),!1}};function He(e,t){var n,i,r=window.URL||window.webkitURL||window,o=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=r.createObjectURL(o),a.download=e,n=a,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}(0,v.useEffect)((function(){Oe()}),[Oe]),(0,v.useEffect)((function(){Se.current&&!Pe&&Promise.all([n.e(8909),n.e(1196)]).then(n.bind(n,71448)).then((function(e){try{K=e,Ae.current.instance=K.editor.create(Se.current,{value:c,language:q(p),theme:j,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:ke||!1}},D);var t=Ae.current.instance,n=R.BH._menuItems,i=a()(n).find((function(e){return"EditorContext"==e[0]._debugName}))[1];if(oe(t,K),setTimeout((function(){Oe(),Ae.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){He(pe||"educoder.txt",t.getValue())}})}),500),Ae.current.subscription=t.onDidChangeModelContent((function(e){Te.current?clearTimeout(Ne.current):(Oe(),ie(t.getValue(),e)),Ne.current=setTimeout((function(){Te.current=!1}),500)})),window.Monaco||function(e){E.languages.forEach((function(t){e.languages.registerDocumentFormattingEditProvider(t,{provideDocumentFormattingEdits:function(e){return g()(f()().mark((function t(){var n;return f()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=A()(e.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}),t.abrupt("return",[{range:e.getFullModelRange(),text:n}]);case 2:case"end":return t.stop()}}),t)})))()}})})),M(e,"java",b.keywords,b.quickKey),M(e,"cpp",w.keywords,w.quickKey),M(e,"c",x,[]),M(e,"python",C.keywords,C.quickKey),M(e,"scala",k.keywords,k.quickKey)}(K,q(p)),te&&(!function(e,t){var n=e._first;do{var i;t.includes(null===(i=n.element)||void 0===i||null===(i=i.command)||void 0===i?void 0:i.id)&&e._remove(n)}while(n=n.next)}(i,["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"]),Se.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ze),window.removeEventListener("paste",Ze),window.addEventListener("keydown",Ze),window.addEventListener("paste",Ze)),window.Monaco=K,B&&t.onDidBlurEditorWidget((function(){B(t.getValue())})),se&&t.onDidFocusEditorText((function(){te&&Y(),se(t.getValue())})),te){Y();try{t.onDidPaste((function(e){var n=t.getSelection(),i=Ae.current.pastePos||{};new K.Range(i.startLineNumber||n.endLineNumber,i.startColumn||n.endColumn,i.endLineNumber||n.endLineNumber,i.endColumn||n.endColumn);t.executeEdits("",[{range:e.range,text:""}])}))}catch(e){}}var r=function(){var e;return Se.current&&(e=new y.Z((function(e){var t,n=l()(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&Ae.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(Se.current),e}();return we&&"string"==typeof we&&new P(we,t,K),Re(!0),function(){var e=Ae.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),Ae.current.subscription&&Ae.current.subscription.dispose(),r.unobserve(Se.current)}}catch(e){}}))}),[]),(0,v.useEffect)((function(){if(Ae.current.instance&&Pe)return document.addEventListener("keydown",Fe,!1),function(){document.removeEventListener("keydown",Fe)}}),[J,Pe]),(0,v.useEffect)((function(){var e=Ae.current.instance;if(e&&Pe){var t=q(p);K.editor.setModelLanguage(e.getModel(),t)}}),[p,Pe]),(0,v.useEffect)((function(){Ae.current.instance&&Pe&&K.editor.setTheme(j)}),[j,Pe]),(0,v.useEffect)((function(){var e=Ae.current.instance;Ee.current=T,e&&Pe&&(e.updateOptions(r()({},T)),setTimeout((function(){e.getModel().updateOptions(r()({},T))}),200))}),[JSON.stringify(T),Pe]),(0,v.useEffect)((function(){var e=Ae.current.instance;e&&Pe&&e.layout()}),[i,s,Pe]);var We=(0,v.useState)(G(i)),ze=u()(We,2),Ge=ze[0],Ve=(ze[1],(0,v.useState)(G(s))),Ue=u()(Ve,2),qe=Ue[0],Ke=Ue[1],Ye=r()(r()({},S),{},{width:Ge,height:qe,position:"relative"});return(0,W.jsx)("div",{className:"my-monaco-editor",ref:Se,style:Ye,children:X&&(0,W.jsx)(H.CopyToClipboard,{text:c,onCopy:function(){return I.ZP.success("复制成功")},children:(0,W.jsx)(F.Z,{title:"复制代码",children:(0,W.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,W.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};function J(e){var t=e.width,i=void 0===t?"100%":t,o=e.height,a=void 0===o?"100%":o,s=e.original,c=e.modified,d=e.language,h=e.options,p=void 0===h?{}:h,f=(0,v.useRef)(),m=(0,v.useState)(null),g=u()(m,2),x=g[0],b=g[1];(0,v.useEffect)((function(){return f.current&&Promise.all([n.e(8909),n.e(9404)]).then(n.bind(n,2550)).then((function(e){var t=(K=e).editor.createDiffEditor(f.current,r()(r()({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},p),{},{wordWrap:!0}));b(t);var n=function(e){var t;return f.current&&(t=new y.Z((function(t){var n,i=l()(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&e.layout()}}catch(e){i.e(e)}finally{i.f()}}))).observe(f.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(f.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),(0,v.useEffect)((function(){x&&x.setModel({original:K.editor.createModel(s,d),modified:K.editor.createModel(c,d)})}),[s,c,d,x]);var w={width:G(i),height:G(a)};return(0,W.jsx)("div",{className:"my-diff-editor",ref:f,style:w})}},12532:function(e,t,n){"use strict";n.d(t,{jL:function(){return l},w9:function(){return ke},QD:function(){return it},cQ:function(){return we},op:function(){return Xe},O5:function(){return ht},_b:function(){return lt},t7:function(){return P},Gi:function(){return Me},YG:function(){return Ee},qp:function(){return S},vr:function(){return ot},qE:function(){return $e},Je:function(){return F},wb:function(){return oe},cq:function(){return Fe},tp:function(){return M}});var i=n(59301),r="banner___PoUBO",o="content___XoDjy",a="btns___Pb35j",s=n(37712),l=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.img,l=e.imgWidth,c=void 0===l?346:l,u=e.title,d=e.sunTitle,h=e.bannerExtraContent;return(0,s.jsx)("div",{className:r,children:(0,s.jsxs)("div",{className:o,children:[(0,s.jsxs)("aside",{children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("b",{children:u}),(0,s.jsx)("span",{children:d})]}),n.length>0&&(0,s.jsx)("div",{className:a,children:n.map((function(e,t){return(0,s.jsxs)("div",{onClick:e.click,children:[e.name,e.sign?(0,s.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgz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4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",width:39}):null]},t)}))}),h]}),i&&(0,s.jsx)("img",{style:{marginTop:33,marginRight:38},src:i,width:c})]})})},c=n(79800),u=n.n(c),d="row___aXJjm",h="title___HUKL0",p="tagsWrap___XB2W3",f="action___VdHb1",m="bar___t1kKC",g="tag___V7Eft",v="name___Hk1Ip",y="num___xQpcH",x="active___XryTX",b="tagsBorderWrap___OMxjs",w=n(92310),C=n.n(w),k=n(89392),S=function(e){var t=e.dataSource,n=void 0===t?[]:t,r=e.value,o=e.onChange,a=e.onTitleChange,l=e.className,c=e.title,w=e.titleWidth,S=void 0===w?41:w,A=e.style,E=void 0===A?{}:A,M=e.fontColor,L=void 0===M?"#6A7283":M,T=e.showCount,N=(0,i.useState)(0),D=u()(N,2),_=D[0],j=D[1],B=(0,i.useState)(!1),P=u()(B,2),R=P[0],I=P[1],F=(0,i.useRef)(null),O=(0,i.useRef)(null);return(0,i.useEffect)((function(){var e;0!==n.length&&((null==F||null===(e=F.current)||void 0===e?void 0:e.clientHeight)>97?j(1):j(0));0===n.length&&j(0),I(!1)}),[n]),(0,s.jsxs)("div",{className:C()(d,l),style:E,children:[(0,s.jsx)("div",{onClick:(0,k.throttle)((function(){return null==a?void 0:a()}),2e3),style:{width:S,marginTop:R?12:4},className:"".concat(h," ").concat(a?"current":""),children:c}),(0,s.jsxs)("div",{className:R?"".concat(p," ").concat(b):p,children:[(0,s.jsx)("div",{className:m,ref:O,style:_>0?{height:1===_?97:"auto",overflow:1===_?"hidden":"auto",paddingRight:55}:{paddingRight:0},children:(0,s.jsx)("div",{className:g,ref:F,children:null==n?void 0:n.map((function(e){return(0,s.jsxs)("span",{onClick:function(){return o(e.id)},style:{color:L},className:r===e.id?x:"",children:[(0,s.jsx)("span",{title:e.name,className:v,children:e.name}),!!T&&(0,s.jsx)("span",{className:y,children:e.count})]},e.id)}))})}),!!_&&(0,s.jsx)(i.Fragment,{children:1===_?(0,s.jsxs)("div",{onClick:function(){var e;j(2),(null==F||null===(e=F.current)||void 0===e?void 0:e.clientHeight)>245?I(!0):I(!1)},className:f,children:["展开",(0,s.jsx)("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})]}):(0,s.jsxs)("div",{onClick:function(){O.current.scrollTop=0,j(1),I(!1)},className:f,children:["收起",(0,s.jsx)("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})]})})]})]})},A="tabs___GTqPV",E="active___F26E8",M=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.value,r=e.onChange,o=e.className,a=e.style,l=void 0===a?{}:a;return(0,s.jsx)("div",{style:l,className:C()(A,o),children:n.map((function(e){return(0,s.jsx)("span",{onClick:function(){return r(e.id)},className:i===e.id?E:"",children:e.name},e.id)}))})},L="input___PW2zI",T="dropdown___vSy8B",N="menu___NiyBu",D="text___Grueu",_="b1___ZKryM",j="b2___aKyGa",B=n(37568),P=function(e){var t,n=e.dataSource,r=void 0===n?[]:n,o=e.value,a=void 0===o?"":o,l=e.onChange,c=e.onInputChange,d=void 0===c?function(){}:c,h=e.className,p=e.style,f=void 0===p?{}:p,m=e.placeholder,g=e.allowClear,v=void 0!==g&&g,y=(0,i.useState)(""),x=u()(y,2),b=x[0],w=x[1],k=(0,i.useState)(""),S=u()(k,2),A=S[0],E=S[1];(0,i.useEffect)((function(){var e,t=a;null!==(e=JSON.stringify(a))&&void 0!==e&&e.includes("{")&&(w(a.id),t=a.value||"");try{E(decodeURIComponent(t||""))}catch(e){E(decodeURIComponent(t||""))}}),[a]);var M=function(){l(encodeURIComponent(A),b||null)};return(0,s.jsxs)("div",{className:C()(L,h),style:f,children:[!!r.length&&(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("div",{className:D,children:[null===(t=r.find((function(e){return e.id===b})))||void 0===t?void 0:t.name,(0,s.jsx)("i",{className:"iconfont icon-zhankai4"}),(0,s.jsx)("b",{className:_}),(0,s.jsx)("b",{className:j})]}),(0,s.jsx)("div",{className:N,children:r.map((function(e,t){return(0,s.jsx)("div",{onClick:function(){var t;(t=e.id)!==b&&(w(t),l(encodeURIComponent(A),t))},children:e.name},t)}))})]}),(0,s.jsx)(B.Z,{onPressEnter:M,value:A,onChange:function(e){E(e.target.value),d(encodeURIComponent(e.target.value),b||null)},placeholder:m,variant:"borderless",allowClear:v,onClear:function(){return l("",b||null)}}),(0,s.jsx)("i",{onClick:M,className:"iconfont icon-sousuo9 font14 current"})]})},R="quickPager___GM30J",I="disabled___Ozc8I",F=function(e){var t=e.value,n=e.onChange,i=e.className,r=e.total,o=e.pageSize,a=e.style,l=void 0===a?{}:a,c=t<2,u=t>=Math.ceil(r/o);return r<=o?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{className:C()(R,i),style:l,children:[(0,s.jsx)("div",{onClick:function(){c||n(t-1,"prev")},className:c?I:"",children:"上一页"}),(0,s.jsx)("div",{onClick:function(){u||n(t+1,"next")},className:u?I:"",children:"下一页"})]})},O="list___oOsiS",Z="wrap___G6T7F",H="lockWrap___Rl79E",W="li___oZZ7l",z="cover___b2bYW",G="img___IQX7w",V="sign___HkT6C",U="name___SsJx8",q="e___TMqq0",K="tags___bcjyo",Y="rate___YACg7",X=n(29787),J=n(25399),Q=n(58018),$=n(6816),ee=n(32985),te=n(96908),ne=n(57177),ie=n(81378),re=n(90059),oe=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,l=e.bottom,c=void 0===l?23:l,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,g=Math.floor((p-(o-1)*a)/o);return(0,s.jsx)(X.Z,{spinning:m,children:(0,s.jsxs)("div",{className:C()(O,t),children:[!!i.length&&i.map((function(e,t){var n=e.name,i=e.id,r=e.identifier,l=e.power,u=(e.cover_image_id,e.pic);return(0,s.jsxs)("div",{className:Z,style:{width:g,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:[(0,s.jsxs)("a",{target:"_blank",href:"/shixuns/".concat(r,"/challenges"),className:W,onClick:function(e){e.preventDefault(),f&&(0,ee.L9)([f]),l&&(0,ee.xg)("/shixuns/".concat(r,"/challenges"))},children:[(0,s.jsxs)("div",{className:G,children:[(0,s.jsx)("img",{className:z,src:"".concat(u)}),e.is_jupyter&&(0,s.jsx)("img",{className:V,src:te}),e.is_jupyter_lab&&(0,s.jsx)("img",{className:V,src:ne}),e.is_unity_3d&&(0,s.jsx)("img",{className:V,src:ie})]}),(0,s.jsx)("div",{className:U,children:(0,s.jsx)(J.Z,{title:n||"实践项目名称-未填写",children:(0,s.jsx)("span",{className:q,children:n||"实践项目名称-未填写"})})}),(0,s.jsxs)("div",{className:K,children:[(0,s.jsx)(J.Z,{placement:"bottom",title:"关卡数",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),(0,s.jsx)("span",{children:e.challenges_count})]})}),!!e.myshixuns_count&&(0,s.jsx)(J.Z,{placement:"bottom",title:"学习人数",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-chengyuan font14 mr2"}),(0,s.jsx)("span",{children:e.myshixuns_count})]})}),(0,s.jsx)(J.Z,{placement:"bottom",title:"难度等级",children:(0,s.jsx)("span",{children:(0,s.jsx)("span",{children:e.level})})}),(0,s.jsxs)("div",{className:Y,children:[(0,s.jsx)(Q.Z,{allowHalf:!0,disabled:!0,defaultValue:e.score_info}),(0,s.jsxs)("span",{children:[" ",e.score_info?"".concat(e.score_info,"分"):"5分"]})]})]})]}),!l&&(0,s.jsxs)("div",{className:H,children:[(0,s.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,s.jsx)("span",{className:"mt15 font16 c-white",children:"定向开放内容,需要授权"})]})]},i)})),!i.length&&(0,s.jsx)(re.Z,{})]})})},ae="list___jb2Ay",se="wrap___VsQDr",le="li___IxCLC",ce="cover___Mu8wr",ue="img___IpFLA",de="movebq___mF7wt",he="bq___Bil0T",pe="sign___DXJ4d",fe="name___l7FoJ",me="e___pXQUG",ge="unit___wCIFR",ve="tags___w_Mil",ye="wrapisCurrent___qIfQT",xe=n(60242),be=n(56800),we=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,l=e.bottom,c=void 0===l?23:l,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,g=e.onRemove,v=void 0===g?function(){}:g,y=e.isCurrent,x=void 0===y||y,b=e.showProgress,w=void 0!==b&&b,k=e.showAlias,S=void 0!==k&&k,A=Math.floor((p-(o-1)*a)/o),E=[{name:"推荐自学",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101计划",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"国家一流",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"省级一流",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"精品课程",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"军队一流",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"新型教材",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return(0,s.jsx)(X.Z,{spinning:m,children:(0,s.jsxs)("div",{className:C()(ae,t),children:[!(null==i||!i.length)&&(null==i?void 0:i.map((function(e,t){var n,i,r,l,u,h,p=e.name,m=e.id,g=e.identifier,y=(e.featured,e.school_name),b=e.image_url;e.excellent,e.is_plan;return(0,s.jsx)("div",{className:x&&w?ye:se,style:{width:A,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:(0,s.jsxs)("a",{className:le,onClick:function(e){e.preventDefault(),e.stopPropagation(),f&&(0,ee.L9)([f]),(0,ee.xg)("/paths/".concat(g))},children:[(0,s.jsxs)("div",{className:ue,children:[(0,s.jsx)("img",{className:ce,src:"".concat(b)}),x&&(0,be.bg)()&&(null==e?void 0:e.studying)&&(0,s.jsxs)("div",{className:"".concat(de," user-path-items"),onClick:function(t){t.stopPropagation(),v(e)},children:[(0,s.jsx)("i",{className:"iconfont icon-yichu1 mr5 c-red"}),(0,s.jsx)("span",{className:"c-red",children:"移除"})]}),null==e||null===(n=e.subject_tags)||void 0===n?void 0:n.map((function(e,t){var n;if(0===t){var i,r=null===(i=E.find((function(t){return t.name==e})))||void 0===i?void 0:i.swimg;return(0,s.jsx)("img",{className:pe,src:r,style:{left:"-4px"}})}var o=null===(n=E.find((function(t){return t.name==e})))||void 0===n?void 0:n.ptimg;return(0,s.jsx)("img",{className:pe,src:o,style:{left:"".concat(48+52*(t-1)+2*t,"px")}})})),(0,s.jsx)("div",{style:{position:"absolute",top:"150px",left:"4px"},children:(null==e?void 0:e.excellent)&&(0,s.jsx)("div",{className:he,children:"开放课程"})})]}),(0,s.jsx)("div",{className:fe,children:(0,s.jsx)(J.Z,{title:S&&null!=e&&e.excellent_alias_name?(0,s.jsxs)("span",{children:["课程原名:".concat(p),(0,s.jsx)("br",{}),(0,s.jsx)("span",{children:"课程别名:".concat(null==e?void 0:e.excellent_alias_name)})]}):p,children:(0,s.jsx)("span",{className:me,children:S&&(null==e?void 0:e.excellent_alias_name)||p})})}),x&&w&&0!=(null==e||null===(i=e.progress)||void 0===i?void 0:i.all_score)&&(0,s.jsxs)("div",{style:{padding:"0px 10px",color:"#333",marginTop:10},children:[(0,s.jsx)(xe.Z,{strokeColor:"#44d7b6",gap:"small",percent:((null==e||null===(r=e.progress)||void 0===r?void 0:r.my_score)/(null==e||null===(l=e.progress)||void 0===l?void 0:l.all_score)*100).toFixed(),showInfo:!1}),"已完成 ",null==e||null===(u=e.progress)||void 0===u?void 0:u.my_score,"/",null==e||null===(h=e.progress)||void 0===h?void 0:h.all_score]}),(!x||!w)&&(0,s.jsx)(J.Z,{title:"发布单位:".concat(y),children:(0,s.jsxs)("div",{className:ge,children:[(0,s.jsx)("i",{className:"iconfont icon-danwei1 font14 mr3"}),y]})}),(!x||!w)&&(0,s.jsx)("div",{className:ve,children:(0,s.jsxs)("div",{children:[(0,s.jsx)(J.Z,{placement:"bottom",title:"章节数",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),(0,s.jsx)("span",{children:e.stages_count})]})}),(0,s.jsx)(J.Z,{placement:"bottom",title:"学习人数",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-chengyuan font14 mr3"}),(0,s.jsx)("span",{children:e.members_count})]})})]})})]})},m)}))),!i.length&&(0,s.jsx)(re.Z,{})]})})},Ce={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},ke=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,l=e.bottom,c=void 0===l?23:l,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,g=e.handleVery,v=void 0===g?function(){return!0}:g,y=Math.floor((p-(o-1)*a)/o);return(0,s.jsx)(X.Z,{spinning:m,children:(0,s.jsxs)("div",{className:C()(Ce.list,t),children:[!!i.length&&i.map((function(e,t){var n=e.subject_identifier,i=e.id,r=(e.identifier,e.power,0!=e.is_public&&e.is_public);return(0,s.jsxs)("div",{className:Ce.wrap,style:{width:y,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:[(0,s.jsxs)("a",{className:Ce.li,onClick:function(t){t.preventDefault(),v(null==e?void 0:e.first_category_url)&&(f&&(0,ee.L9)([f]),(0,ee.xg)(e.first_category_url))},children:[(0,s.jsxs)("div",{className:Ce.top,children:[(0,s.jsx)(J.Z,{title:e.name,children:(0,s.jsx)("div",{className:Ce.name,children:e.name})}),(0,s.jsx)("img",{className:Ce.img,src:$.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,s.jsx)("div",{className:Ce.text,title:e.creator,children:e.creator}),n&&(0,s.jsxs)("div",{className:Ce.btns,children:[(0,s.jsx)("div",{children:"开放课程"}),(0,s.jsx)("aside",{children:"开放课堂"})]}),r&&(0,s.jsx)("div",{className:Ce.sign,children:"公开"})]}),(0,s.jsxs)("div",{className:Ce.bottom,children:[e.visits>0&&(0,s.jsx)(J.Z,{title:"访问量",placement:"bottom",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-liulanyan"}),(0,s.jsx)("span",{children:e.visits})]})}),e.course_members_count>0&&(0,s.jsx)(J.Z,{title:"成员",placement:"bottom",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-chengyuan"}),e.course_members_count]})}),e.tasks_count>0&&(0,s.jsx)(J.Z,{title:"作业",placement:"bottom",children:(0,s.jsxs)("span",{children:[(0,s.jsx)("i",{className:"iconfont icon-zuoye"}),e.tasks_count]})}),e.is_end?(0,s.jsx)("div",{style:{color:"#6B758B"},children:"已结束"}):(0,s.jsx)("div",{style:{color:"#00B187"},children:"进行中"})]})]}),!e.is_accessible&&(0,s.jsxs)("div",{className:Ce.lockWrap,children:[(0,s.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,s.jsx)("span",{className:"mt15 font16 c-white",children:"非课堂成员不可进入"})]})]},i)})),!i.length&&(0,s.jsx)(re.Z,{})]})})},Se={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Ae=n(5030),Ee=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.value,r=e.onChange,o=e.className,a=e.style,l=void 0===a?{}:a,c=e.tabBarExtraContent;return(0,s.jsxs)("div",{className:C()(Se.tabs,o),style:l,children:[(0,s.jsx)("div",{className:Se.tabsWrap,children:n.map((function(e,t){return!(null!=e&&e.hide)&&(0,s.jsxs)("aside",{className:Se.tab,onClick:function(){r(e.id),e.link&&Ae.history.push(e.link)},children:[(0,s.jsx)("div",{className:i===e.id?Se.active:"",children:e.name}),null==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,s.jsxs)("span",{children:["",null==e?void 0:e.total,""]}),void 0!==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,s.jsx)(J.Z,{title:null!=(null==e?void 0:e.tip)?null==e?void 0:e.tip:"",children:(0,s.jsxs)("span",{style:{color:"#9096A3"},children:["",(0,s.jsx)("span",{style:{color:"#000"},children:null==e?void 0:e.resetCount}),"/",(0,s.jsx)("span",{children:null==e?void 0:e.total}),""]})})]},t)}))}),(0,s.jsx)("div",{className:Se.tabBar,children:c})]})},Me=function(e){var t=e.className,n=e.style,i=void 0===n?{}:n,r=e.children;return(0,s.jsx)("div",{className:C()(t),style:i,children:r})},Le="orderWrap___ZfyGX",Te="orderIconWrap___XTB_O",Ne="orderAsc___KWHmA",De="orderDesc___rHdbB",_e="active___a7eSP",je="cursorPointer___gs9kL",Be="orderTextWrap___teAKn",Pe=n(75727),Re=n(93041),Ie=[{id:"updated_at",name:"最新动态"},{id:"created_at",name:"最新创建"},{id:"name",name:"名称排序"}],Fe=function(e){var t,n=e.sortValue,i=e.dropValue,r=e.className,o=e.onSort,a=e.onDrop,l=e.dataSource,c=void 0===l?Ie:l;return(0,s.jsxs)("div",{className:C()(Le,r),children:[(0,s.jsx)(Pe.Z,{dropdownRender:function(){return(0,s.jsx)(Re.Z,{children:c.map((function(e,t){return(0,s.jsx)(Re.Z.Item,{onClick:function(){return a(e.id)},children:e.name},t)}))})},children:(0,s.jsx)("span",{className:Be,children:null===(t=c.find((function(e){return i===e.id})))||void 0===t?void 0:t.name})}),(0,s.jsxs)("span",{className:Te,children:[(0,s.jsx)("span",{className:Ne,children:(0,s.jsx)("i",{className:"asc"===n?"iconfont icon-sanjiaoxing-up font12 ".concat(je," ").concat(_e):"iconfont icon-sanjiaoxing-up font12 ".concat(je),onClick:function(){return o("asc"===n?"desc":"asc")}})}),(0,s.jsx)("span",{className:De,children:(0,s.jsx)("i",{className:"desc"===n?"iconfont icon-sanjiaoxing-down font12 ".concat(je," ").concat(_e):"iconfont icon-sanjiaoxing-down font12 ".concat(je),onClick:function(){return o("asc"===n?"desc":"asc")}})})]})]})},Oe=n(82242),Ze=n.n(Oe),He=n(7557),We=n.n(He),ze=n(41498),Ge=n.n(ze),Ve=n(39647),Ue=n.n(Ve),qe={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Ke=n(99571),Ye=["className","style","children","loading","openLoading","onClick","size","shape"],Xe=function(e){var t=e.className,n=e.style,r=e.children,o=e.loading,a=void 0!==o&&o,l=e.openLoading,c=e.onClick,d=void 0===c?function(){}:c,h=e.size,p=void 0===h?"middle":h,f=e.shape,m=void 0===f?"round":f,g=Ue()(e,Ye),v=(0,i.useState)(!1),y=u()(v,2),x=y[0],b=y[1];return(0,s.jsx)(Ke.ZP,Ze()(Ze()({onClick:(0,k.throttle)(function(){var e=Ge()(We()().mark((function e(t){return We()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l&&b(!0),e.prev=1,e.next=4,d(t);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("error",e.t0);case 9:l&&b(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:C()(qe.btn,qe["".concat(p,"-").concat(m)],t),style:n,size:p,shape:m,loading:x||a},g),{},{children:r}))},Je="head___ghH72",Qe="node___mjPEy",$e=function(e){var t=e.className,n=e.style,i=e.children,r=void 0===i?null:i,o=e.onClick,a=e.title;return(0,s.jsxs)("div",{className:C()(Je,t),style:n,children:[(0,s.jsxs)("span",{className:"primary-hover",onClick:o,children:[(0,s.jsx)("i",{className:"iconfont icon-fanhui2 font12"}),"返回"]}),(0,s.jsx)("b",{title:a,children:a}),(0,s.jsx)("div",{className:Qe,children:r})]})},et="btns___sNgTb",tt="confirm___Ozirl",nt="cancel___aiq1I",it=function(e){var t=e.confirmShow,n=void 0===t||t,i=e.confirmTitle,r=e.confirmClick,o=e.cancelShow,a=void 0===o||o,l=e.cancelTitle,c=e.cancelClick,u=e.className,d=e.style,h=e.confirmLoading,p=void 0!==h&&h;return(0,s.jsxs)("div",{className:C()(et,u),style:d,children:[n&&(0,s.jsx)(Ke.ZP,{loading:p,onClick:r,type:"primary",className:tt,children:i}),a&&(0,s.jsx)(Ke.ZP,{onClick:c,className:nt,children:l})]})},rt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},ot=function(e){var t=e.className,n=e.style,i=void 0===n?{}:n,r=e.LeftContent,o=e.children,a=e.RightContent;return(0,s.jsx)("div",{className:C()(rt.fixedBottom,t),style:i,children:(0,s.jsxs)("div",{className:rt.wrap,children:[(0,s.jsx)("div",{className:rt.left,children:r}),(0,s.jsx)("div",{className:rt.center,children:o}),(0,s.jsx)("div",{className:rt.right,children:a})]})})},at="crumbs___V41Oe",st="hover___bEIVd",lt=function(e){var t=e.className,n=e.style,r=void 0===n?{}:n,o=e.dataSource,a=void 0===o?[]:o;return(0,s.jsx)("div",{className:C()(at,t),style:r,children:a.map((function(e,t){return t<a.length-1?(0,s.jsxs)(i.Fragment,{children:[e.path||e.onClick?(0,s.jsx)("span",{className:st,onClick:null!=e&&e.onClick?e.onClick:function(){return Ae.history.push(e.path)},children:e.name}):(0,s.jsx)("span",{children:e.name}),(0,s.jsxs)("span",{children:[" ",">"," "]})]},t):(0,s.jsx)("span",{style:{color:"#5F6368"},children:e.name},t)}))})},ct=n(11938),ut=["onChange"],dt=ct.Z.Countdown,ht=function(e){var t=e.onChange,n=Ue()(e,ut),r=(0,i.useState)(null),o=u()(r,2),a=o[0],l=o[1];(0,i.useEffect)((function(){"number"==typeof a&&a>=0&&t(a)}),[a]);return(0,s.jsx)(dt,Ze()(Ze()({},n),{},{onChange:function(e){var t=Math.floor(e/1e3);l(t)}}))}},21323:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(59301);function r(e,t){var n=(0,i.useRef)();(0,i.useEffect)((function(){n.current=e})),(0,i.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},49916:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return se}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),s=n(82242),l=n.n(s),c=n(37205),u=n.n(c),d=n(79800),h=n.n(d),p=n(39647),f=n.n(p),m=n(59301),g=n(5030),v=n(28284),y=n(6767),x=n(37285),b=n(91882),w=n(77019),C=n(5269),k=n(62957),S=n(20554),A=n(25399),E=n(37568),M=n(99571),L=n(2245),T=n(44209),N=n(62673),D=n(82326),_=n(76603),j="wrap___ucM4I",B="titleWrap___GoOJH",P="required___hcR9L",R="title___Fk25W",I="colorGray___s_7Rh",F="choiceWrap___Km9CZ",O="deleteIcon___FtIV6",Z="editorWrap___VTBdJ",H="questionType___BC_py",W="questionChoices____TjNP",z=n(37712),G=["problemset","globalSetting","loading","dispatch","showAnswerTip","onRef","editData","editKey","callback"],V=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],U=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,i=(e.showAnswerTip,e.onRef,e.editData),o=e.editKey,s=e.callback,c=(f()(e,G),(0,m.useState)([])),d=h()(c,2),p=d[0],v=d[1],x=(0,m.useState)(),b=h()(x,2),k=(b[0],b[1],(0,m.useState)([])),S=h()(k,2),T=(S[0],S[1],(0,m.useState)("")),P=h()(T,2),R=P[0],I=P[1],U=(0,m.useState)(0),q=h()(U,2),K=(q[0],q[1],(0,m.useState)(!0)),Y=h()(K,2),X=Y[0],J=Y[1],Q=(0,m.useState)(!1),$=h()(Q,2),ee=$[0],te=$[1],ne=(0,g.useParams)(),ie=(0,m.useState)(""),re=h()(ie,2),oe=re[0],ae=re[1],se=(0,m.useState)(""),le=h()(se,2),ce=le[0],ue=le[1];(0,m.useEffect)((function(){var e,t,n,r,o,a,s;if(null==i||null===(e=i.question)||void 0===e||!e.question_title)return v([{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""}]),J(!0),I(""),void te(!1);ae(null==i||null===(t=i.question)||void 0===t?void 0:t.max_choices),ue(null==i||null===(n=i.question)||void 0===n?void 0:n.min_choices),I(null==i||null===(r=i.question)||void 0===r?void 0:r.question_title),J(!(null==i||null===(o=i.question)||void 0===o||!o.is_necessary)),v(null==i||null===(a=i.question)||void 0===a?void 0:a.answers.map((function(e){return{value:e.answer_text,disabled:"其它"===e.answer_text}}))),te(!(null==i||null===(s=i.question)||void 0===s||null===(s=s.answers)||void 0===s||!s.find((function(e){return"其它"===e.answer_text}))))}),[i]),(0,m.useImperativeHandle)(t,(function(){return{onSave:me}}));var de,he,pe,fe,me=function(){var e=a()(r()().mark((function e(t){var o,a,c,u,d;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(oe&&!ce||!oe&&ce)){e.next=3;break}return y.ZP.info('可选:最小和最大限制须同时为数值或者“--"'),e.abrupt("return");case 3:if(!(ce>oe)){e.next=6;break}return y.ZP.info("可选的最大限制不能小于最小限制"),e.abrupt("return");case 6:if(R){e.next=9;break}return y.ZP.info("请您输入题目"),e.abrupt("return",!1);case 9:if(!((a=p.findIndex((function(e){return!e.value})))>-1)){e.next=13;break}return y.ZP.info("请先输入 ".concat(V[a]," 选项的内容")),e.abrupt("return",!1);case 13:if(u={question_title:R,question_type:2,insert_id:i.insert_id,is_necessary:Math.ceil(X),max_choices:oe,min_choices:ce,question_answers:p.map((function(e){return e.value}))},null===(o=i.question)||void 0===o||!o.id){e.next=20;break}return e.next=17,(0,L.wo)(l()({pollsId:i.question.id},u));case 17:c=e.sent,e.next=23;break;case 20:return e.next=22,(0,L.Fd)(l()({exercise_bank_id:ne.topicId},u));case 22:c=e.sent;case 23:if(0!==c.status){e.next=30;break}return y.ZP.success("保存成功"),s("edit",-1),e.next=28,n({type:"polls/getExerciseBanks",payload:l()({},ne)});case 28:d=e.sent,t&&(u.answers=u.question_answers.map((function(e){return{answer_text:e}})),s("addContinue",l()({type:2,insert_id:i.question.id,key:i.key,question_type:1},u),d.questions));case 30:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,z.jsxs)("section",{className:j,children:[o!==i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsxs)("span",{className:"font16",children:["第",i.key,"题"]}),(0,z.jsx)("span",{className:"font16 c-light-black ml10",children:"多选题"}),(0,z.jsx)("span",{className:"tag-grey-eae ml10 mr10",children:0===(null==i||null===(de=i.question)||void 0===de?void 0:de.is_necessary)?"选答":"必答"}),"可选",null==i||null===(he=i.question)||void 0===he?void 0:he.min_choices,"-",null==i||null===(pe=i.question)||void 0===pe?void 0:pe.max_choices,"项"]})}),(0,z.jsx)("div",{className:"mt5",children:(0,z.jsx)(_.Z,{value:i.question.question_title})}),(0,z.jsx)("div",{className:W,children:null==i||null===(fe=i.question.answers)||void 0===fe?void 0:fe.map((function(e,t){return(0,z.jsx)(w.Z,{children:(0,z.jsx)(C.Z,{children:(0,z.jsx)(N.Z,{disabled:!0,children:(0,z.jsx)("span",{className:"c-black font14",children:e.answer_text})},t)})})}))})]}),o===i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsx)("span",{className:"font16 c-blue",children:"多选题"})," ",(0,z.jsx)(N.Z,{checked:!!X,className:"ml10",onChange:function(e){return J(e.target.checked)},children:"必答"})]})}),(0,z.jsx)("p",{className:B,children:(0,z.jsx)(E.Z.TextArea,{autoSize:{maxRows:5},rows:1,value:R,placeholder:"请输入题目",onChange:function(e){return I(e.target.value)}})}),p.map((function(e,t){return(0,z.jsxs)(w.Z,{className:F,gutter:[12,12],children:[(0,z.jsx)(C.Z,{children:(0,z.jsx)("span",{className:"font16",children:"选项"})}),(0,z.jsx)(C.Z,{className:Z,flex:"1",children:(0,z.jsx)(E.Z.TextArea,{autoSize:{maxRows:5},value:p[t].value,rows:1,disabled:!!e.disabled,onChange:function(e){p[t].value=e.target.value,v(u()(p))}})}),(0,z.jsx)(C.Z,{children:t>1&&(0,z.jsx)(A.Z,{title:"删除",children:(0,z.jsx)("i",{className:"".concat(O," iconfont icon-htmal5icon19"),onClick:function(){v(p.filter((function(e,n){return n!==t}))),e.disabled&&te(!1)}})})})]},t)})),(0,z.jsxs)(w.Z,{gutter:[12,12],children:[(0,z.jsx)(C.Z,{children:"可选"}),(0,z.jsxs)(C.Z,{children:[(0,z.jsxs)(D.default,{value:ce||"",style:{width:120},onChange:function(e){return ue(e)},children:[(0,z.jsx)(D.default.Option,{value:"",children:"--"}),p.map((function(e,t){return(0,z.jsx)(D.default.Option,{value:String(t+2),children:t+2})}))]}),(0,z.jsx)("span",{className:"ml10 mr10",children:"~"}),(0,z.jsxs)(D.default,{style:{width:120},value:oe||"",onChange:function(e){return ae(e)},children:[(0,z.jsx)(D.default.Option,{value:"",children:"--"}),p.map((function(e,t){return(0,z.jsx)(D.default.Option,{value:String(t+2),children:t+2})}))]})]})]}),(0,z.jsxs)(w.Z,{gutter:[12,12],children:[(0,z.jsxs)(C.Z,{flex:"1",children:[(0,z.jsx)(M.ZP,{type:"default",onClick:function(){p.find((function(e){return"其它"===e.value}))?v([].concat(u()(p.filter((function(e){return"其它"!==e.value}))),[{value:""},{value:"其它",disabled:!0}])):v([].concat(u()(p),[{value:""}]))},children:"新增选项"}),!ee&&(0,z.jsx)(M.ZP,{type:"default",className:"ml20",onClick:function(){v([].concat(u()(p),[{disabled:!0,value:"其它"}])),te(!0)},children:"新增其它选项"})]}),(0,z.jsxs)(C.Z,{className:"tl",children:[(0,z.jsx)(M.ZP,{type:"default",onClick:function(){var e;null!==(e=i.question)&&void 0!==e&&e.id?s("edit",-1):s("del",i.key)},children:"取消"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return me()},children:"保存"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return me(!0)},children:"保存并继续"})]})]})]})]})},q=(0,g.connect)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,m.forwardRef)(U)),K=n(47889),Y=["problemset","globalSetting","loading","dispatch","onRef","editData","editKey","callback","showAnswerTip"],X=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],J=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,i=(e.onRef,e.editData),o=e.editKey,s=e.callback,c=(e.showAnswerTip,f()(e,Y),(0,m.useState)([])),d=h()(c,2),p=d[0],v=d[1],x=(0,m.useState)(),b=h()(x,2),k=(b[0],b[1],(0,m.useState)([])),S=h()(k,2),T=(S[0],S[1],(0,m.useState)("")),D=h()(T,2),P=D[0],R=D[1],I=(0,m.useState)(0),G=h()(I,2),V=(G[0],G[1],(0,m.useState)(!1)),U=h()(V,2),q=U[0],J=U[1],Q=(0,m.useState)(!1),$=h()(Q,2),ee=$[0],te=$[1],ne=(0,g.useParams)();(0,m.useEffect)((function(){var e,t,n,r,o;if(null==i||null===(e=i.question)||void 0===e||!e.question_title)return v([{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""}]),J(!1),R(""),void te(!1);R(null==i||null===(t=i.question)||void 0===t?void 0:t.question_title),J(!(null==i||null===(n=i.question)||void 0===n||!n.is_necessary)),v(null==i||null===(r=i.question)||void 0===r?void 0:r.answers.map((function(e){return{value:e.answer_text,disabled:"其它"===e.answer_text}}))),te(!(null==i||null===(o=i.question)||void 0===o||null===(o=o.answers)||void 0===o||!o.find((function(e){return"其它"===e.answer_text}))))}),[i]),(0,m.useImperativeHandle)(t,(function(){return{onSave:oe}}));var ie,re,oe=function(){var e=a()(r()().mark((function e(t){var o,a,c,u,d;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P){e.next=3;break}return y.ZP.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((a=p.findIndex((function(e){return!e.value})))>-1)){e.next=7;break}return y.ZP.info("请先输入 ".concat(X[a]," 选项的内容")),e.abrupt("return",!1);case 7:if(u={question_title:P,question_type:1,insert_id:i.insert_id,is_necessary:Math.ceil(q),question_answers:p.map((function(e){return e.value}))},null===(o=i.question)||void 0===o||!o.id){e.next=14;break}return e.next=11,(0,L.wo)(l()({pollsId:i.question.id},u));case 11:c=e.sent,e.next=17;break;case 14:return e.next=16,(0,L.Fd)(l()({exercise_bank_id:ne.topicId},u));case 16:c=e.sent;case 17:if(0!==c.status){e.next=24;break}return y.ZP.success("保存成功"),s("edit",-1),e.next=22,n({type:"polls/getExerciseBanks",payload:l()({},ne)});case 22:d=e.sent,t&&(u.answers=u.question_answers.map((function(e){return{answer_text:e}})),s("addContinue",l()({type:1,insert_id:i.question.id,key:i.key,question_type:1},u),d.questions));case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,z.jsxs)("section",{className:j,children:[o!==i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsxs)("span",{className:"font16",children:["第",i.key,"题"]}),(0,z.jsx)("span",{className:"font16 c-light-black ml10",children:"单选题"}),(0,z.jsx)("span",{className:"tag-grey-eae ml10",children:0===(null==i||null===(ie=i.question)||void 0===ie?void 0:ie.is_necessary)?"选答":"必答"})]})}),(0,z.jsx)("div",{className:"mt5",children:(0,z.jsx)(_.Z,{value:i.question.question_title})}),(0,z.jsx)("div",{className:W,children:null==i||null===(re=i.question.answers)||void 0===re?void 0:re.map((function(e,t){return(0,z.jsxs)(w.Z,{children:[(0,z.jsx)(C.Z,{children:(0,z.jsx)(K.ZP,{disabled:!0},t)}),(0,z.jsx)(C.Z,{flex:"1",children:(0,z.jsx)("span",{className:"c-black font14",children:e.answer_text})})]})}))})]}),o===i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsx)("span",{className:"font16 c-blue",children:"单选题"})," ",(0,z.jsx)(N.Z,{checked:!!q,className:"ml10",onChange:function(e){return J(e.target.checked)},children:"必答"})]})}),(0,z.jsx)("p",{className:B,children:(0,z.jsx)(E.Z.TextArea,{autoSize:{maxRows:5},rows:1,value:P,placeholder:"请输入题目",onChange:function(e){return R(e.target.value)}})}),p.map((function(e,t){return(0,z.jsxs)(w.Z,{className:F,gutter:[12,12],children:[(0,z.jsx)(C.Z,{children:(0,z.jsx)("span",{className:"font16",children:"选项"})}),(0,z.jsx)(C.Z,{className:Z,flex:"1",children:(0,z.jsx)(E.Z.TextArea,{autoSize:{maxRows:5},value:p[t].value,rows:1,disabled:"其它"===p[t].value,onChange:function(e){p[t].value=e.target.value,v(u()(p))}})}),(0,z.jsx)(C.Z,{children:t>1&&(0,z.jsx)(A.Z,{title:"删除",children:(0,z.jsx)("i",{className:"".concat(O," iconfont icon-htmal5icon19"),onClick:function(){v(p.filter((function(e,n){return n!==t}))),e.disabled&&te(!1)}})})})]},t)})),(0,z.jsxs)(w.Z,{gutter:[12,12],children:[(0,z.jsxs)(C.Z,{flex:"1",children:[(0,z.jsx)(M.ZP,{type:"default",onClick:function(){p.find((function(e){return"其它"===e.value}))?v([].concat(u()(p.filter((function(e){return"其它"!==e.value}))),[{value:""},{value:"其它",disabled:!0}])):v([].concat(u()(p),[{value:""}])),新增选项}}),!ee&&(0,z.jsx)(M.ZP,{type:"default",className:"ml20",onClick:function(){v([].concat(u()(p),[{disabled:!0,value:"其它"}])),te(!0)},children:"新增其它选项"})]}),(0,z.jsxs)(C.Z,{className:"tl",children:[(0,z.jsx)(M.ZP,{type:"default",onClick:function(){var e;null!==(e=i.question)&&void 0!==e&&e.id?s("edit",-1):s("del",i.key)},children:"取消"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return oe()},children:"保存"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return oe(!0)},children:"保存并继续"})]})]})]})]})},Q=(0,g.connect)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,m.forwardRef)(J)),$=["problemset","globalSetting","loading","dispatch","onRef","editData","showAnswerTip","editKey","callback"],ee=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,i=(e.onRef,e.editData),o=e.showAnswerTip,s=void 0===o||o,c=e.editKey,u=e.callback,d=(f()(e,$),(0,m.useState)("")),p=h()(d,2),v=p[0],x=p[1],b=(0,m.useState)(!0),k=h()(b,2),S=k[0],A=k[1],T=(0,g.useParams)();(0,m.useEffect)((function(){var e,t,n;if(null==i||null===(e=i.question)||void 0===e||!e.question_title)return A(!0),void x("");x(null==i||null===(t=i.question)||void 0===t?void 0:t.question_title),A(!(null==i||null===(n=i.question)||void 0===n||!n.is_necessary))}),[i]),(0,m.useImperativeHandle)(t,(function(){return{onSave:O}}));var D,F,O=function(){var e=a()(r()().mark((function e(t){var o,a,s,c;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=3;break}return y.ZP.info("请您输入题目"),e.abrupt("return",!1);case 3:if(s={question_title:v,question_type:3,insert_id:i.insert_id,is_necessary:Math.ceil(S)},null===(o=i.question)||void 0===o||!o.id){e.next=10;break}return e.next=7,(0,L.wo)(l()({pollsId:i.question.id},s));case 7:a=e.sent,e.next=13;break;case 10:return e.next=12,(0,L.Fd)(l()({exercise_bank_id:T.topicId},s));case 12:a=e.sent;case 13:if(0!==a.status){e.next=20;break}return y.ZP.success("保存成功"),u("edit",-1),e.next=18,n({type:"polls/getExerciseBanks",payload:l()({},T)});case 18:c=e.sent,t&&u("addContinue",l()({type:3,insert_id:i.question.id,key:i.key,question_type:1},s),c.questions);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,z.jsxs)("section",{className:j,children:[c!==i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsxs)("span",{className:"font16",children:["第",i.key,"题"]}),(0,z.jsx)("span",{className:"font16 c-light-black ml10",children:"主观题"}),(0,z.jsx)("span",{className:"tag-grey-eae ml10 mr10",children:0===(null==i||null===(D=i.question)||void 0===D?void 0:D.is_necessary)?"选答":"必答"})]})}),(0,z.jsxs)("div",{className:"mt5",children:[(0,z.jsx)(_.Z,{value:i.question.question_title}),(0,z.jsx)("div",{className:"mt15",children:(0,z.jsx)(E.Z.TextArea,{placeholder:"在此填入答案",rows:5,disabled:!0})})]}),(0,z.jsx)("div",{className:W,children:null==i||null===(F=i.question.answers)||void 0===F?void 0:F.map((function(e,t){return(0,z.jsx)(w.Z,{children:(0,z.jsx)(C.Z,{children:(0,z.jsx)(N.Z,{disabled:!0,children:(0,z.jsx)("span",{className:"c-black font14",children:e.answer_text})},t)})})}))})]}),c===i.key&&(0,z.jsxs)("aside",{children:[(0,z.jsx)("div",{className:H,children:(0,z.jsxs)("div",{children:[(0,z.jsx)("span",{className:"font16 c-blue",children:"主观题"})," ",(0,z.jsx)(N.Z,{checked:!!S,className:"ml10",onChange:function(e){return A(e.target.checked)},children:"必答"})]})}),(0,z.jsx)("p",{className:B,children:(0,z.jsx)(E.Z.TextArea,{autoSize:{maxRows:5},rows:1,value:v,placeholder:"请输入题目",onChange:function(e){return x(e.target.value)}})}),s?(0,z.jsxs)("p",{className:B,children:[(0,z.jsx)("span",{className:P,children:"*"}),(0,z.jsxs)("span",{className:R,children:["答案选项:",(0,z.jsx)("span",{className:I,children:"点击选项可设置正确答案"})]})]}):null,(0,z.jsxs)(w.Z,{gutter:[12,12],children:[(0,z.jsx)(C.Z,{flex:"1"}),(0,z.jsxs)(C.Z,{className:"tl",children:[(0,z.jsx)(M.ZP,{type:"default",onClick:function(){var e;null!==(e=i.question)&&void 0!==e&&e.id?u("edit",-1):u("del",i.key)},children:"取消"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return O()},children:"保存"}),(0,z.jsx)(M.ZP,{className:"ml20",type:"primary",onClick:function(){return O(!0)},children:"保存并继续"})]})]})]})]})},te=(0,g.connect)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})((0,m.forwardRef)(ee)),ne=n(90059),ie={flex_box_center:"flex_box_center___IqikW",flex_space_between:"flex_space_between___H4npu",flex_box_vertical_center:"flex_box_vertical_center___pxWg2",flex_box_center_end:"flex_box_center_end___fI1p7",flex_box_column:"flex_box_column___uFxAf",bg:"bg___Emql5",containerTitle:"containerTitle___fmYJh",containerDesc:"containerDesc___CC8H4",listItem:"listItem___zg_9F",info:"info___RsS8d",title:"title___w3IkP",titleLeft:"titleLeft___IS2Mw",titleRight:"titleRight____welO",acitons:"acitons___np4Mm",export:"export___atwjg"},re=n(28003),oe=n(5282),ae=["polls","globalSetting","loading","user","dispatch"],se=(0,g.connect)((function(e){var t=e.polls,n=e.loading,i=e.user;return{polls:t,globalSetting:e.globalSetting,user:i,loading:n.effects}}))((function(e){var t,n,i,o,s,c,d,p,N,D=e.polls,j=(e.globalSetting,e.loading,e.user),B=e.dispatch,P=(f()(e,ae),(0,g.useParams)()),R=j.userInfo,I=v.Z.useForm(),F=h()(I,1)[0],O=(0,m.useState)([]),Z=h()(O,2),H=Z[0],W=Z[1],G=(0,m.useState)(!1),V=h()(G,2),U=V[0],K=V[1],Y=(0,m.useState)(-1),X=h()(Y,2),J=X[0],$=X[1],ee=(0,m.useRef)();(0,m.useEffect)((function(){var e,t,n,i;null!==(e=D.exerciseBanks)&&void 0!==e&&e.questions&&(W(u()(null===(t=D.exerciseBanks)||void 0===t?void 0:t.questions)),F.setFieldsValue({exercise_name:null===(n=D.exerciseBanks)||void 0===n||null===(n=n.poll)||void 0===n?void 0:n.name,exercise_description:null===(i=D.exerciseBanks)||void 0===i||null===(i=i.poll)||void 0===i?void 0:i.description}))}),[D.exerciseBanks]),(0,m.useEffect)((function(){B({type:"polls/getExerciseBanks",payload:l()({},P)})}),[P.categoryId]);var se=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F.validateFields();case 2:return(t=F.getFieldValue()).is_md=!0,t.topicId=P.topicId,K(!1),e.next=8,(0,L.hO)(l()({},t));case 8:B({type:"polls/getExerciseBanks",payload:l()({},P)});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(e,t,n){switch(e){case"edit":$(t);break;case"add":if(-1!=J)return void y.ZP.error("不能同时编辑两题");H.splice((null==t?void 0:t.key)+1,0,{insert_id:null==t?void 0:t.insert_id,question:l()({},t)}).slice(),W(u()(H)),$((null==t?void 0:t.key)+1);break;case"addContinue":n.splice(null==t?void 0:t.key,0,{insert_id:null==t?void 0:t.insert_id,question:l()({},t)}).slice(),W(u()(n)),$((null==t?void 0:t.key)+1);break;case"del":H.splice(t-1,1),W(u()(H)),$(-1)}};return(0,z.jsxs)("section",{className:"edu-container",children:[(0,z.jsxs)("section",{className:"animated fadeIn",children:[(0,z.jsx)("aside",{className:"mt10",children:R&&(0,z.jsxs)(b.Z,{separator:">",children:[(0,z.jsx)(b.Z.Item,{children:(0,z.jsx)(g.Link,{to:"/users/".concat(R.login,"/topics/personal"),children:"我的课堂资源"})}),(0,z.jsx)(b.Z.Item,{children:"详情"})]})}),(0,z.jsx)("aside",{className:[ie.title,"mt20"].join(" "),children:(0,z.jsxs)(w.Z,{style:{width:"100%"},children:[(0,z.jsx)(C.Z,{flex:"1",children:(0,z.jsx)("strong",{className:"font20 ml5",children:null===(t=D.exerciseBanks)||void 0===t||null===(t=t.poll)||void 0===t?void 0:t.name})}),(0,z.jsx)(C.Z,{})]})})]}),(0,z.jsxs)("section",{className:[ie.bg,"pl30","pr30","pb30","mt20","relative"].join(" "),children:[(0,z.jsxs)("div",{className:ie.export,children:[(null===(n=D.exerciseBanks)||void 0===n?void 0:n.authorize)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("a",{onClick:function(e){var t;e.preventDefault(),k.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"是否确认删除?",onOk:(t=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,T.Tv)({object_type:"normal",object_id:[P.topicId]});case 2:0===e.sent.status&&g.history.push("/users/".concat(P.username,"/topics/personal"));case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},children:"删除"}),(0,z.jsx)(g.Link,{to:"/users/".concat(R.login,"/topics/").concat(P.topicId,"/").concat(P.topictype,"/poll/edit"),children:"编辑"})]}),(0,z.jsx)("a",{onClick:function(e){e.preventDefault(),B({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[P.topicId],object_type:"poll"}}})},children:"发送"})]}),(0,z.jsx)(S.Z,{className:ie.tabs,children:(0,z.jsx)(S.Z.TabPane,{tab:(0,z.jsx)("span",{className:"font16 pt10 pb12",children:"内容详情"}),children:(0,z.jsx)(_.Z,{className:"c-light-black",value:null===(i=D.exerciseBanks)||void 0===i||null===(i=i.poll)||void 0===i?void 0:i.description})},"1")}),!U&&(0,z.jsxs)("aside",{children:[(0,z.jsxs)("div",{className:ie.containerDesc,children:[(0,z.jsx)("div",{children:null===(o=D.exerciseBanks)||void 0===o||null===(o=o.poll)||void 0===o?void 0:o.name}),(0,z.jsx)("div",{children:(0,z.jsx)(A.Z,{title:"编辑",children:(0,z.jsx)("span",{onClick:function(){return K(!0)},className:"iconfont c-green ml30 icon-bianjidaibeijing"})})})]}),(0,z.jsx)(_.Z,{className:"c-light-black",value:null===(s=D.exerciseBanks)||void 0===s||null===(s=s.poll)||void 0===s?void 0:s.description})]}),U&&(0,z.jsxs)(v.Z,{layout:"vertical",form:F,children:[(0,z.jsx)(v.Z.Item,{name:"exercise_name",label:"问卷标题:",rules:[{required:!0,message:"请填写问卷标题"}],children:(0,z.jsx)(E.Z,{maxLength:60,placeholder:"问卷标题最大限制60个字符"})}),(0,z.jsx)(v.Z.Item,{label:"问卷须知:",name:"exercise_description",children:(0,z.jsx)(oe.h,{scrollId:"exercise_description",placeholder:"请在此输入本次问卷答题的相关说明最大限制100个字符"})}),(0,z.jsx)(v.Z.Item,{className:"tr",children:(0,z.jsx)(M.ZP,{type:"primary",onClick:function(){se()},children:"保存"})})]})]}),""!=H&&(0,z.jsx)("section",{className:"mt20",children:(0,z.jsxs)(w.Z,{children:[(0,z.jsxs)(C.Z,{flex:1,children:[(0,z.jsxs)("span",{className:"c-light-black mr20",children:["单选题 ",null===(c=D.exerciseBanks)||void 0===c||null===(c=c.question_types)||void 0===c?void 0:c.q_singles," 题"]}),(0,z.jsxs)("span",{className:"c-light-black mr20",children:["多选题 ",null===(d=D.exerciseBanks)||void 0===d||null===(d=d.question_types)||void 0===d?void 0:d.q_doubles," 题"]}),(0,z.jsxs)("span",{className:"c-light-black",children:["主观题 ",null===(p=D.exerciseBanks)||void 0===p||null===(p=p.question_types)||void 0===p?void 0:p.q_mains," 题"]})]}),(0,z.jsxs)(C.Z,{className:"c-light-black",children:["合计 ",(0,z.jsx)("span",{className:"c-orange",children:null===(N=D.exerciseBanks)||void 0===N||null===(N=N.question_types)||void 0===N?void 0:N.q_counts})," 题"]})]})}),(0,z.jsxs)("section",{className:[ie.bg,"pt30","pl20","pr20","pb20","mt20"].join(" "),children:[""!=H&&(null==H?void 0:H.map((function(e,t){var n;return e.key=t+1,e.len=H.length,1===e.question.question_type?(0,z.jsxs)("aside",{children:[(0,z.jsx)(Q,{ref:ee,editKey:J,callback:le,editData:e}),(0,z.jsx)(x.Z,{})]}):2===e.question.question_type?(0,z.jsxs)("aside",{children:[(0,z.jsx)(q,{ref:ee,editKey:J,callback:le,editData:e}),(0,z.jsx)(x.Z,{})]}):3===(null===(n=e.question)||void 0===n?void 0:n.question_type)?(0,z.jsxs)("aside",{children:[(0,z.jsx)(te,{ref:ee,editKey:J,callback:le,editData:e}),(0,z.jsx)(x.Z,{})]}):void 0}))),""==H&&(0,z.jsx)(ne.Z,{})]}),(0,z.jsx)(re.Z,{})]})}))},28003:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),s=n(41498),l=n.n(s),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),p=n(59301),f=n(5030),m=n(6767),g=n(62957),v=n(20554),y=n(458),x=n(47889),b={title:"title___XAxiE",radioWrap:"radioWrap___k0pOB",radio:"radio___x9kMt",colorFF0000:"colorFF0000___IMgd0",pagination:"pagination___ou2ht",checkboxWrapper:"checkboxWrapper___kF7xI"},w=n(32985),C=n(12532),k=n(37205),S=n.n(k),A=n(29787),E=n(62673),M=n(44209),L=n(26724),T=n.n(L),N=n(37712),D=function(e){var t=e.username,n=e.setStages,i=e.stages,r=e.hasError,o=e.setHasError,s=(0,p.useState)(""),c=u()(s,2),d=c[0],h=c[1],f=(0,p.useState)(1),m=u()(f,2),g=m[0],v=m[1],y=(0,p.useState)([]),w=u()(y,2),k=w[0],L=w[1],D=(0,p.useState)(!1),_=u()(D,2),j=_[0],B=_[1],P=(0,p.useState)(0),R=u()(P,2),I=R[0],F=R[1];(0,p.useEffect)((function(){O({page:1,search:""},!0)}),[]);var O=function(){var e=l()(a()().mark((function e(n,i){var r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.next=3,(0,M.w3)({username:t,category:"manage",page:n.page,search:n.search});case 3:r=e.sent,B(!1),L((function(e){return i?null==r?void 0:r.subjects:[].concat(S()(e),S()(null==r?void 0:r.subjects))})),F(null==r?void 0:r.count);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Z=(0,p.useRef)();return(0,N.jsxs)("div",{className:b.wrap,children:[(0,N.jsx)("div",{className:"mb10",children:(0,N.jsx)(C.t7,{placeholder:"请输入实践课程名称的关键字进行搜索",value:d,style:{width:500},onChange:function(e){h(e),v(1),Z.current.scrollTo({behavior:"smooth",top:0}),O({page:1,search:e},!0)}})}),(0,N.jsx)(A.Z,{spinning:j,children:(0,N.jsx)("div",{className:b.radioWrap,ref:Z,children:(0,N.jsx)(T(),{initialLoad:!1,pageStart:1,threshold:6,loadMore:function(){v(g+1),O({page:g+1,search:d},!1)},hasMore:k.length<I,useWindow:!1,children:(0,N.jsx)(x.ZP.Group,{value:i.subjectId,onChange:function(e){n({subjectId:e.target.value,stage_ids:[]}),o(!1)},children:k.map((function(e){var t=e.stages.map((function(e){return{label:e.name,value:e.id}}));return(0,N.jsxs)("div",{children:[(0,N.jsx)(x.ZP,{className:b.radio,value:e.id,children:e.name}),e.id===i.subjectId&&(0,N.jsxs)("div",{className:b.checkboxWrapper,children:[t.length>0&&(0,N.jsx)(E.Z,{indeterminate:i.stage_ids.length>0&&i.stage_ids.length<t.length,onChange:function(i){n({subjectId:e.id,stage_ids:i.target.checked?t.map((function(e){return e.value})):[]})},checked:i.stage_ids.length===t.length,children:"全选"}),(0,N.jsx)(E.Z.Group,{options:t,value:i.stage_ids,onChange:function(t){return n({subjectId:e.id,stage_ids:t})}})]})]},e.id)}))})})})}),r&&(0,N.jsx)("div",{className:b.colorFF0000,children:"请先选择实践课程及章节"})]})},_=n(16081),j=n(94097),B=["userDetail","globalSetting","loading","user","dispatch"],P=(0,f.connect)((function(e){var t=e.userDetail,n=e.loading,i=e.globalSetting,r=e.user;return{userDetail:t,globalSetting:i,loading:n.effects,user:r}}))((function(e){var t,n,i,o=e.userDetail,s=(e.globalSetting,e.loading),c=e.user,d=e.dispatch,f=(h()(e,B),(0,p.useState)("course")),k=u()(f,2),S=k[0],A=k[1],E=(0,p.useState)(""),M=u()(E,2),L=M[0],T=M[1],P=(0,p.useState)([]),R=u()(P,2),I=R[0],F=R[1],O=(0,p.useState)(),Z=u()(O,2),H=Z[0],W=Z[1],z=(0,p.useState)(!1),G=u()(z,2),V=G[0],U=G[1],q=(0,p.useState)(!1),K=u()(q,2),Y=K[0],X=K[1];(0,p.useEffect)((function(){"UserDetail-SendToClass"===o.actionTabs.key&&J(L)}),[o.actionTabs.key]);var J=function(){var e=l()(a()().mark((function e(t){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U(!0),e.next=3,d({type:"userDetail/topicGetCourseList",payload:{search:t}});case 3:(n=e.sent)&&F((null==n?void 0:n.courses)||[]),U(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=(0,p.useState)({subjectId:"",stage_ids:[]}),$=u()(Q,2),ee=$[0],te=$[1],ne=function(){var e=l()(a()().mark((function e(){var t,n,i,s,l,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("course"!==S){e.next=11;break}if(H){e.next=4;break}return X(!0),e.abrupt("return");case 4:return e.next=6,d({type:"userDetail/topicSendToClass",payload:r()({course_id:H},null===(t=o.actionTabs)||void 0===t?void 0:t.params)});case 6:n=e.sent,d({type:"userDetail/setActionTabs",payload:{}}),n&&0===n.status&&(s={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll",videos:"video"},(0,w.xg)("/classrooms/".concat(H,"/").concat(s[null===(i=o.actionTabs)||void 0===i||null===(i=i.params)||void 0===i?void 0:i.object_type]))),e.next=18;break;case 11:if(ee.subjectId&&ee.stage_ids.length){e.next=14;break}return X(!0),e.abrupt("return");case 14:return e.next=16,(0,j.nI)({id:null===(l=o.actionTabs)||void 0===l||null===(l=l.params)||void 0===l?void 0:l.object_id,login:null===(u=c.userInfo)||void 0===u?void 0:u.login},{stage_ids:ee.stage_ids});case 16:0===e.sent.status&&(m.ZP.success("发送成功"),d({type:"userDetail/setActionTabs",payload:{}}),(0,w.xg)("/paths/".concat(ee.subjectId)));case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,N.jsx)(g.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:"UserDetail-SendToClass"===o.actionTabs.key,title:"发送",okText:"确定",cancelText:"取消",confirmLoading:s["userDetail/sendToClass"],width:600,afterClose:function(){X(!1),F([]),te({subjectId:"",stage_ids:[]}),T("")},onOk:ne,wrapClassName:_.Z.CustomCss,onCancel:function(){d({type:"userDetail/setActionTabs",payload:{}})},children:(0,N.jsx)(v.Z,{activeKey:S,onChange:function(e){X(!1),A(e)},items:[{label:"课堂",key:"course",children:(0,N.jsxs)("div",{className:b.wrap,children:[(0,N.jsx)("div",{className:"mb10",children:(0,N.jsx)(C.t7,{placeholder:"请输入课堂名称的关键字进行搜索",value:L,style:{width:500},onChange:function(e){T(e),J(e)}})}),(0,N.jsx)(y.Z,{active:!0,loading:V,children:(0,N.jsx)("div",{className:b.radioWrap,children:(0,N.jsx)(x.ZP.Group,{value:H,onChange:function(e){W(e.target.value),X(!1)},children:I.map((function(e,t){return(0,N.jsx)(x.ZP,{className:b.radio,value:e.course_id,children:e.course_name},e.course_id)}))})})}),"videos"!==(null===(t=o.actionTabs)||void 0===t||null===(t=t.params)||void 0===t?void 0:t.object_type)&&(0,N.jsx)("div",{className:b.title,children:"温馨提示:选择的题将会发送到指定课堂"}),Y&&(0,N.jsx)("div",{className:b.colorFF0000,children:"请先选择课堂"})]}),show:!0},{label:"实践课程",key:"subject",children:(0,N.jsx)(D,{username:null===(n=c.userInfo)||void 0===n?void 0:n.login,stages:ee,setStages:te,hasError:Y,setHasError:X}),show:"videos"===(null===(i=o.actionTabs)||void 0===i||null===(i=i.params)||void 0===i?void 0:i.object_type)}].filter((function(e){return e.show}))})})}))},90969:function(e,t,n){"use strict";n.d(t,{AL:function(){return k},Iy:function(){return p},Qv:function(){return g},ez:function(){return C},jb:function(){return f}});var i=n(79800),r=n.n(i),o=n(32834),a=n.n(o),s=n(11690),l=1;var c=[],u=["<ul>"],d=new(a().Renderer),h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){c.length=0,u=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(e,t,n,i){if(t>=e.length||e[t].level<=n)return t;var r=e[t];i.push("<li><a href='#"+l+r.anchor+"'>"+r.text+"</a>");var o=[];return t=m(e,++t,r.level,o),o.length>0&&(i.push("<ul>"),o.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),t=m(e,t,n,i)}function g(){return m(c,0,0,u),u.push("</ul>"),u.join("")}var v={heading:function(e){var t=h.exec(e);if(l+=1,t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:r()(t,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||""),o=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(o)>=0){var a=b(),s=i;i=a,w[a]={type:"block",expression:s}}return{type:"code",raw:n,lang:o,text:i}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,b=function(){return"__special_katext_id_".concat(x++,"__")},w={};function C(){return w}function k(){x=0,w={}}function S(e){return e=e.replace(y,(function(e,t){var n=b();return w[n]={type:"inline",expression:t},n}))}var A=d.listitem;d.listitem=function(e){return A(S(e))};var E=d.paragraph;d.paragraph=function(e){return E(S(e))};var M=d.tablecell;d.tablecell=function(e,t){return M(S(e),t)},d.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,s.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,s.escape)(e,!0))+"</code></pre>"},d.heading=function(e,t,n){var i=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:i,level:t,text:e}),"<h"+t+' id="'+l+i+'">'+e+"</h"+t+">"},a().setOptions({silent:!0,gfm:!0,pedantic:!1}),a().use({tokenizer:v,renderer:d}),t.ZP=a()},78318:function(){},44084:function(){},32313:function(e,t){"use strict";t.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},33108:function(e,t){"use strict";t.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},16081:function(e,t){"use strict";t.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},99498:function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var i=e.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function i(e){setTimeout((function(){var i=!1,r=e.getInputField();"TEXTAREA"==r.nodeName?i=!r.value:1==e.lineCount()&&(i=!/[^\u200b]/.test(r.querySelector(".CodeMirror-line").textContent)),i?n(e):t(e)}),20)}function r(e){a(e)&&n(e)}function o(e){var i=e.getWrapperElement(),r=a(e);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,a,s){var l=s&&s!=e.Init;if(a&&!l)n.on("blur",r),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){i(n)}),o(n);else if(!a&&l){n.off("blur",r),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&r(n)}))}(n(89780))},25717:function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function i(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(r),t.state.closeBrackets=null),n&&(o(i(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(r))}));var r={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),i="'"+n+"'";r[i]||(r[i]=a(n))}}function a(e){return function(t){return d(t,e)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var r=s(t);if(!r||t.getOption("disableInput"))return e.Pass;for(var o=i(r,"pairs"),a=t.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var c=h(t,a[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var u=a[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=s(t),r=n&&i(n,"explode");if(!r||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var l=h(t,o[a].head);if(!l||r.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var n=0;n<o.length;n++){var i=o[n].head.line;t.indentLine(i,null,!0),t.indentLine(i+1,null,!0)}}))}function u(t){var i=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(i?-1:1)),head:new n(t.head.line,t.head.ch+(i?1:-1))}}function d(t,r){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=i(o,"pairs"),l=a.indexOf(r);if(-1==l)return e.Pass;for(var c,d=i(o,"closeBefore"),h=i(o,"triples"),f=a.charAt(l+1)==r,m=t.listSelections(),g=l%2==0,v=0;v<m.length;v++){var y,x=m[v],b=x.head,w=t.getRange(b,n(b.line,b.ch+1));if(g&&!x.empty())y="surround";else if(!f&&g||w!=r)if(f&&b.ch>1&&h.indexOf(r)>=0&&t.getRange(n(b.line,b.ch-2),b)==r+r){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;y="addFour"}else if(f){var C=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(w)||C==r||e.isWordChar(C))return e.Pass;y="both"}else{if(!g||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return e.Pass;y="both"}else y=f&&p(t,b)?"both":h.indexOf(r)>=0&&t.getRange(b,n(b.line,b.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var k=l%2?a.charAt(l-1):r,S=l%2?r:a.charAt(l+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==c){var n=t.getSelections();for(e=0;e<n.length;e++)n[e]=k+n[e]+S;for(t.replaceSelections(n,"around"),n=t.listSelections().slice(),e=0;e<n.length;e++)n[e]=u(n[e]);t.setSelections(n)}else"both"==c?(t.replaceSelection(k+S,null),t.triggerElectric(k+S),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(k+k+k+k,"before"),t.execCommand("goCharRight"))}))}function h(e,t){var i=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==i.length?i:null}function p(e,t){var i=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(i.type)&&i.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(89780))},6313:function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,r){if(r!=e.Init&&r&&t.removeKeyMap("autoCloseTags"),n){var a={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(a["'/'"]=function(e){return o(e)}),"object"==typeof n&&!1===n.whenOpening||(a["'>'"]=function(e){return i(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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 i(i){if(i.getOption("disableInput"))return e.Pass;for(var r=i.listSelections(),o=[],l=i.getOption("autoCloseTags"),c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=i.getTokenAt(u),h=e.innerMode(i.getMode(),d.state),p=h.state,f=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(p),m=f&&f.name;if(!m)return e.Pass;var g="html"==h.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,y="object"==typeof l&&l.indentTags||g&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var x=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&f.close||d.string.indexOf("/")==u.ch-d.start-1||v&&a(v,x)>-1||s(i,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(p)||[],m,u,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&a(b,m)>-1)o[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&a(y,x)>-1;o[c]={indent:w,text:">"+(w?"\n\n":"")+"</"+m+">",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=r.length-1;c>=0;c--){var k=o[c];i.replaceRange(k.text,r[c].head,r[c].anchor,"+insert");var S=i.listSelections().slice(0);S[c]={head:k.newPos,anchor:k.newPos},i.setSelections(S),!C&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}function r(t,n){for(var i=t.listSelections(),r=[],o=n?"/":"</",a=t.getOption("autoCloseTags"),l="object"==typeof a&&a.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var u=i[c].head,d=t.getTokenAt(u),h=e.innerMode(t.getMode(),d.state),p=h.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var f,m="xml"!=h.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==h.mode.name)f=o+"script";else if(m&&"css"==h.mode.name)f=o+"style";else{var g=h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(p);if(!g||g.length&&s(t,g,g[g.length-1],u))return e.Pass;f=o+g[g.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(f+=">"),r[c]=f}if(t.replaceSelections(r),i=t.listSelections(),!l)for(c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function s(t,n,i,r,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,r.line+500),s=e.scanForClosingTag(t,r,null,a);if(!s||s.tag!=i)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==i;c--)++l;for(r=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,r,null,a);if(!u||u.tag!=i)return!1;r=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(n(89780),n(32855))},32855:function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var i="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",r=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function a(e,n){var i=e.cm.getTokenTypeAt(t(e.line,n));return i&&/\btag\b/.test(i)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var i=[];;){var r,o=d(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(r=c(e)))return;if("selfClose"!=r)if(o[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else i.push(o[2])}}function f(e,n){for(var i=[];;){var r=h(e);if(!r)return;if("selfClose"!=r){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])i.push(s[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,i){for(var r=new o(e,i.line,0);;){var a=d(r);if(!a||r.line!=i.line)return;var s=c(r);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(r.line,r.ch),u=p(r,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,i,r){var a=new o(e,i.line,i.ch,r);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&t(a.line,a.ch),d=s&&u(a);if(s&&d&&!(n(a,i)>0)){var h={from:t(a.line,a.ch),to:l,tag:d[2]};return"selfClose"==s?{open:h,close:null,at:"open"}:d[1]?{open:f(a,d[2]),close:h,at:"close"}:{open:h,close:p(a=new o(e,l.line,l.ch,r),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,i){for(var r=new o(e,t.line,t.ch,n);;){var a=f(r,i);if(!a)break;var s=p(new o(e,t.line,t.ch,n),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,i){return p(new o(e,t.line,t.ch,i?{from:0,to:i}:null),n)}}(n(89780))},89780:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=i||r||o,s=a&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),x=/\bCrOS\b/.test(e),b=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var C=y&&(c||d&&(null==w||w<12.11)),k=n||a&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var A,E=function(e,t){var n=e.className,i=S(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function L(e,t){return M(e).appendChild(t)}function T(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)r.appendChild(t[o]);return r}function N(e,t,n,i){var r=T(e,t,n,i);return r.setAttribute("role","presentation"),r}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function _(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function j(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function B(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!S(n[i]).test(t)&&(t+=" "+n[i]);return t}A=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var P=function(e){e.select()};function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(e,t,n){for(var i in t||(t={}),e)!e.hasOwnProperty(i)||!1===n&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function F(e,t,n,i,r){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=i||0,a=r||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var O=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function Z(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}O.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},O.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H=50,W={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function U(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);-1==o&&(o=e.length);var a=o-i;if(o==e.length||r+a>=t)return i+Math.min(a,t-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=t)return i}}var q=[""];function K(e){for(;q.length<=e;)q.push(Y(q)+" ");return q[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function J(e,t,n){for(var i=0,r=n(t);i<e.length&&n(e[i])<=r;)i++;e.splice(i,0,t)}function Q(){}function $(e,t){var n;return Object.create?n=Object.create(e):(Q.prototype=e,n=new Q),t&&I(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 oe(e){return e.charCodeAt(0)>=768&&re.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=n;return t}function se(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var r=(t+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+i}}function le(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var r=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(t,n,"ltr")}var ce=null;function ue(e,t,n){var i;ce=null;for(var r=0;r<e.length;++r){var o=e[r];if(o.from<t&&o.to>t)return r;o.to==t&&(o.from!=o.to&&"before"==n?i=r:ce=r),o.from==t&&(o.from!=o.to&&"before"!=n?i=r:ce=r)}return null!=i?i:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!i.test(e))return!1;for(var u=e.length,d=[],h=0;h<u;++h)d.push(n(e.charCodeAt(h)));for(var p=0,f=c;p<u;++p){var m=d[p];"m"==m?d[p]=f:f=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":o.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var x=1,b=d[0];x<u-1;++x){var w=d[x];"+"==w&&"1"==b&&"1"==d[x+1]?d[x]="1":","!=w||b!=d[x+1]||"1"!=b&&"n"!=b||(d[x]=b),b=w}for(var C=0;C<u;++C){var k=d[C];if(","==k)d[C]="N";else if("%"==k){var S=void 0;for(S=C+1;S<u&&"%"==d[S];++S);for(var A=C&&"!"==d[C-1]||S<u&&"1"==d[S]?"1":"N",E=C;E<S;++E)d[E]=A;C=S-1}}for(var M=0,L=c;M<u;++M){var T=d[M];"L"==L&&"1"==T?d[M]="L":o.test(T)&&(L=T)}for(var N=0;N<u;++N)if(r.test(d[N])){var D=void 0;for(D=N+1;D<u&&r.test(d[D]);++D);for(var _="L"==(N?d[N-1]:c),j=_==("L"==(D<u?d[D]:c))?_?"L":"R":c,B=N;B<D;++B)d[B]=j;N=D-1}for(var P,R=[],I=0;I<u;)if(a.test(d[I])){var F=I;for(++I;I<u&&a.test(d[I]);++I);R.push(new l(0,F,I))}else{var O=I,Z=R.length,H="rtl"==t?1:0;for(++I;I<u&&"L"!=d[I];++I);for(var W=O;W<I;)if(s.test(d[W])){O<W&&(R.splice(Z,0,new l(1,O,W)),Z+=H);var z=W;for(++W;W<I&&s.test(d[W]);++W);R.splice(Z,0,new l(2,z,W)),Z+=H,O=W}else++W;O<I&&R.splice(Z,0,new l(1,O,I))}return"ltr"==t&&(1==R[0].level&&(P=e.match(/^\s+/))&&(R[0].from=P[0].length,R.unshift(new l(0,0,P[0].length))),1==Y(R).level&&(P=e.match(/\s+$/))&&(Y(R).to-=P[0].length,R.push(new l(0,u-P[0].length,u)))),"rtl"==t?R.reverse():R}}();function he(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var pe=[],fe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||pe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||pe}function ge(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,r=i&&i[t];if(r){var o=Z(r,n);o>-1&&(i[t]=r.slice(0,o).concat(r.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),Se(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==Z(n,t[i])&&n.push(t[i])}function be(e,t){return me(e,t).length>0}function we(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ae(e){Ce(e),ke(e)}function Ee(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Le,Te,Ne=function(){if(a&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Le){var t=T("span","");L(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Le?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _e(e){if(null!=Te)return Te;var t=L(e,document.createTextNode("AخA")),n=A(t,0,1).getBoundingClientRect(),i=A(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Te=i.right-n.right<3)}var je,Be=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Pe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(je=T("div"))||(je.setAttribute("oncopy","return;"),"function"==typeof je.oncopy),Ie=null;function Fe(e){if(null!=Ie)return Ie;var t=L(e,T("span","x")),n=t.getBoundingClientRect(),i=A(t,0,1).getBoundingClientRect();return Ie=Math.abs(n.left-i.left)>1}var Oe={},Ze={};function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Oe[e]=t}function We(e,t){Ze[e]=t}function ze(e){if("string"==typeof e&&Ze.hasOwnProperty(e))e=Ze[e];else if(e&&"string"==typeof e.name&&Ze.hasOwnProperty(e.name)){var t=Ze[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=ze(t);var n=Oe[t.name];if(!n)return Ge(e,"text/plain");var i=n(e,t);if(Ve.hasOwnProperty(t.name)){var r=Ve[t.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var Ve={};function Ue(e,t){I(t,Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Ke(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Xe=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};function Je(e,t){if((t-=e.first)<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 i=0;;++i){var r=n.children[i],o=r.chunkSize();if(t<o){n=r;break}t-=o}return n.lines[t]}function Qe(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r})),i}function $e(e,t,n){var i=[];return e.iter(t,n,(function(e){i.push(e.text)})),i}function et(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=Z(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var r=e.children[i],o=r.height;if(t<o){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function it(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ot(e,t,n){if(void 0===n&&(n=null),!(this instanceof ot))return new ot(e,t,n);this.line=e,this.ch=t,this.sticky=n}function at(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==at(e,t)}function lt(e){return ot(e.line,e.ch)}function ct(e,t){return at(e,t)<0?t:e}function ut(e,t){return at(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ht(e,t){if(t.line<e.first)return ot(e.first,0);var n=e.first+e.size-1;return t.line>n?ot(n,Je(e,n).text.length):pt(t,Je(e,t.line).text.length)}function pt(e,t){var n=e.ch;return null==n||n>t?ot(e.line,t):n<0?ot(e.line,0):e}function ft(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=ht(e,t[i]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Xe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,i){var r=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return r.push(e,t)}),o,i);for(var a=n.state,s=function(i){n.baseTokens=r;var s=e.state.overlays[i],l=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var i=r[l];i>e&&r.splice(l,1,e,r[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(s.opaque)r.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function yt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=xt(e,tt(t)),r=t.text.length>e.options.maxHighlightLength&&qe(e.doc.mode,i.state),o=vt(e,t,i);r&&(i.state=r),t.stateAfter=i.save(!r),t.styles=o.styles,o.classes?t.styleClasses=o.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 xt(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return new gt(i,!0,t);var o=Mt(e,t,n),a=o>i.first&&Je(i,o-1).stateAfter,s=a?gt.fromSaved(i,a,o):new gt(i,Ye(i.mode),o);return i.iter(o,t,(function(n){bt(e,n.text,s);var i=s.line;n.stateAfter=i==t-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?s.save():null,s.nextLine()})),n&&(i.modeFrontier=s.line),s}function bt(e,t,n,i){var r=e.doc.mode,o=new Xe(t,e.options.tabSize,n);for(o.start=o.pos=i||0,""==t&&wt(r,n.state);!o.eol();)Ct(r,o,n.state),o.start=o.pos}function wt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ke(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Ct(e,t,n,i){for(var r=0;r<10;r++){i&&(i[0]=Ke(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.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}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,n){return t instanceof mt?new gt(e,qe(e.mode,t.state),n,t.lookAhead):new gt(e,qe(e.mode,t),n)},gt.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function St(e,t,n,i){var r,o,a=e.doc,s=a.mode,l=Je(a,(t=ht(a,t)).line),c=xt(e,t.line,n),u=new Xe(l.text,e.options.tabSize,c);for(i&&(o=[]);(i||u.pos<t.ch)&&!u.eol();)u.start=u.pos,r=Ct(s,u,c.state),i&&o.push(new kt(u,r,qe(a.mode,c.state)));return i?o:new kt(u,r,c.state)}function At(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function Et(e,t,n,i,r,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Xe(t,e.options.tabSize,i),h=e.options.addModeClass&&[null];for(""==t&&At(wt(n,i.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&bt(e,t,i,d.pos),d.pos=t.length,l=null):l=At(Ct(n,d,i.state,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)r(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);r(f,u),c=f}}function Mt(e,t,n){for(var i,r,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Je(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof mt?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}function Lt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var r=Je(e,i).stateAfter;if(r&&(!(r instanceof mt)||i+r.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Tt=!1,Nt=!1;function Dt(){Tt=!0}function _t(){Nt=!0}function jt(e,t,n){this.marker=e,this.from=t,this.to=n}function Bt(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function Pt(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Rt(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function It(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new jt(a,o.from,s?null:o.to))}}return i}function Ft(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new jt(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return i}function Ot(e,t){if(t.full)return null;var n=it(e,t.from.line)&&Je(e,t.from.line).markedSpans,i=it(e,t.to.line)&&Je(e,t.to.line).markedSpans;if(!n&&!i)return null;var r=t.from.ch,o=t.to.ch,a=0==at(t.from,t.to),s=It(n,r,a),l=Ft(i,o,a),c=1==t.text.length,u=Y(t.text).length+(c?r:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var p=Bt(l,h.marker);p?c&&(h.to=null==p.to?null:p.to+u):h.to=r}}if(l)for(var f=0;f<l.length;++f){var m=l[f];null!=m.to&&(m.to+=u),null==m.from?Bt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Zt(s)),l&&l!=s&&(l=Zt(l));var g=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(v||(v=[])).push(new jt(s[x].marker,null,null));for(var b=0;b<y;++b)g.push(v);g.push(l)}return g}function Zt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ht(e,t,n){var i=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=Z(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:t,to:n}],o=0;o<i.length;++o)for(var a=i[o],s=a.find(0),l=0;l<r.length;++l){var c=r[l];if(!(at(c.to,s.from)<0||at(c.from,s.to)>0)){var u=[l,1],d=at(c.from,s.from),h=at(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Wt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function zt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Gt(e){return e.inclusiveLeft?-1:0}function Vt(e){return e.inclusiveRight?1:0}function Ut(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),r=t.find(),o=at(i.from,r.from)||Gt(e)-Gt(t);if(o)return-o;var a=at(i.to,r.to)||Vt(e)-Vt(t);return a||t.id-e.id}function qt(e,t){var n,i=Nt&&e.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(t?r.from:r.to)&&(!n||Ut(n,r.marker)<0)&&(n=r.marker);return n}function Kt(e){return qt(e,!0)}function Yt(e){return qt(e,!1)}function Xt(e,t){var n,i=Nt&&e.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ut(n,o.marker)<0)&&(n=o.marker)}return n}function Jt(e,t,n,i,r){var o=Je(e,t),a=Nt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=at(c.from,n)||Gt(l.marker)-Gt(r),d=at(c.to,i)||Vt(l.marker)-Vt(r);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?at(c.to,n)>=0:at(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?at(c.from,i)<=0:at(c.from,i)<0)))return!0}}}function Qt(e){for(var t;t=Kt(e);)e=t.find(-1,!0).line;return e}function $t(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=Yt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Je(e,t),i=Qt(n);return n==i?t:tt(i)}function nn(e,t){if(t>e.lastLine())return t;var n,i=Je(e,t);if(!rn(e,i))return t;for(;n=Yt(i);)i=n.find(1,!0).line;return tt(i)+1}function rn(e,t){var n=Nt&&t.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&on(e,t,i))return!0}}function on(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return on(e,i.line,Bt(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var r=void 0,o=0;o<t.markedSpans.length;++o)if((r=t.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&on(e,t,r))return!0}function an(e){for(var t=0,n=(e=Qt(e)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==e)break;t+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function sn(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=Kt(i);){var r=t.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=e;t=Yt(i);){var o=t.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function ln(e){var t=e.display,n=e.doc;t.maxLine=Je(n,n.first),t.maxLineLength=sn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=sn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var cn=function(e,t,n){this.text=e,zt(this,t),this.height=n?n(this):1};function un(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Wt(e),zt(e,n);var r=i?i(e):1;r!=e.height&&et(e,r)}function dn(e){e.parent=null,Wt(e)}cn.prototype.lineNo=function(){return tt(this)},we(cn);var hn={},pn={};function fn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?pn:hn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=N("span",null,null,l?"padding-right: .1px":null),i={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o=r?t.rest[r-1]:t.line,a=void 0;i.pos=0,i.addToken=vn,_e(e.display.measure)&&(a=he(o,e.doc.direction))&&(i.addToken=xn(i.addToken,a)),i.map=[],wn(o,i,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=B(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=B(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(De(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=B(i.pre.className,i.textClass||"")),i}function gn(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(e,t,n,i,r,o,l){if(t){var c,u=e.splitSpaces?yn(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var f=d.exec(t),m=f?f.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!f)break;p+=m+1;var v=void 0;if("\t"==f[0]){var y=e.cm.options.tabSize,x=y-e.col%y;(v=c.appendChild(T("span",K(x),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(T("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?c.appendChild(T("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||i||r||h||o||l){var b=n||"";i&&(b+=i),r&&(b+=r);var w=T("span",[c],b,o);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,l[C]);return e.content.appendChild(w)}e.content.appendChild(c)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",r=0;r<e.length;r++){var o=e.charAt(r);" "!=o||!n||r!=e.length-1&&32!=e.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}function xn(e,t){return function(n,i,r,o,a,s,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>c&&d.from<=c);h++);if(d.to>=u)return e(n,i,r,o,a,s,l);e(n,i.slice(0,d.to-c),r,o,null,s,l),o=null,i=i.slice(d.to-c),c=d.to}}}function bn(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function wn(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var a,s,l,c,u,d,h,p=r.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",h=null,d=null,v=1/0;for(var y=[],x=void 0,b=0;b<i.length;++b){var w=i[b],C=w.marker;if("bookmark"==C.type&&w.from==f&&C.widgetNode)y.push(C);else if(w.from<=f&&(null==w.to||w.to>f||C.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&v>w.to&&(v=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==f&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(x||(x=[])).push(C.endStyle,w.to),C.title&&((h||(h={})).title=C.title),C.attributes)for(var k in C.attributes)(h||(h={}))[k]=C.attributes[k];C.collapsed&&(!d||Ut(d.marker,C)<0)&&(d=w)}else w.from>f&&v>w.from&&(v=w.from)}if(x)for(var S=0;S<x.length;S+=2)x[S+1]==v&&(c+=" "+x[S]);if(!d||d.from==f)for(var A=0;A<y.length;++A)bn(t,0,y[A]);if(d&&(d.from||0)==f){if(bn(t,(null==d.to?p+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=p)break;for(var E=Math.min(p,v);;){if(g){var M=f+g.length;if(!d){var L=M>E?g.slice(0,E-f):g;t.addToken(t,L,a?a+l:l,u,f+L.length==v?c:"",s,h)}if(M>=E){g=g.slice(E-f),f=E;break}f=M,u=""}g=r.slice(o,o=n[m++]),a=fn(n[m++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,r.slice(o,o=n[T]),fn(n[T+1],t.cm.options))}function Cn(e,t,n){this.line=t,this.rest=en(t),this.size=this.rest?tt(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=rn(e,t)}function kn(e,t,n){for(var i,r=[],o=t;o<n;o=i){var a=new Cn(e.doc,Je(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Sn=null;function An(e){Sn?Sn.ops.push(e):e.ownsGroup=Sn={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var r=e.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<t.length)}function Mn(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{Sn=null,t(n)}}var Ln=null;function Tn(e,t){var n=me(e,t);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);Sn?i=Sn.delayedCallbacks:Ln?i=Ln:(i=Ln=[],setTimeout(Nn,0));for(var o=function(e){i.push((function(){return n[e].apply(null,r)}))},a=0;a<n.length;++a)o(a)}}function Nn(){var e=Ln;Ln=null;for(var t=0;t<e.length;++t)e[t]()}function Dn(e,t,n,i){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];"text"==o?Pn(e,t):"gutter"==o?In(e,t,n,i):"class"==o?Rn(e,t):"widget"==o&&Fn(e,t,i)}t.changes=null}function _n(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function jn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=_n(t);t.background=i.insertBefore(T("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}function Bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):mn(e,t)}function Pn(e,t){var n=t.text.className,i=Bn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,Rn(e,t)):n&&(t.text.className=n)}function Rn(e,t){jn(e,t),t.line.wrapClass?_n(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function In(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=_n(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=_n(t),s=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(T("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(T("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Fn(e,t,n){t.alignable&&(t.alignable=null);for(var i=S("CodeMirror-linewidget"),r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,i.test(r.className)&&t.node.removeChild(r);Zn(e,t,n)}function On(e,t,n,i){var r=Bn(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),Rn(e,t),In(e,t,n,i),Zn(e,t,i),t.node}function Zn(e,t,n){if(Hn(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)Hn(e,t.rest[i],t,n,!1)}function Hn(e,t,n,i,r){if(t.widgets)for(var o=_n(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Wn(l,c,n,i),e.display.input.setUneditable(c),r&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Tn(l,"redraw")}}function Wn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var r=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(r-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function zn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),L(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Gn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Vn(e){return e.lineSpace.offsetTop}function Un(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=L(e.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Kn(e){return H-e.display.nativeBarWidth}function Yn(e){return e.display.scroller.clientWidth-Kn(e)-e.display.barWidth}function Xn(e){return e.display.scroller.clientHeight-Kn(e)-e.display.barHeight}function Jn(e,t,n){var i=e.options.lineWrapping,r=i&&Yn(e);if(!t.measure.heights||i&&t.measure.width!=r){var o=t.measure.heights=[];if(i){t.measure.width=r;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Qn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var r=0;r<e.rest.length;r++)if(tt(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function $n(e,t){var n=tt(t=Qt(t)),i=e.display.externalMeasured=new Cn(e.doc,t,n);i.lineN=n;var r=i.built=mn(e,i);return i.text=r.pre,L(e.display.lineMeasure,r.pre),i}function ei(e,t,n,i){return ii(e,ni(e,t),n,i)}function ti(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ri(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function ni(e,t){var n=tt(t),i=ti(e,n);i&&!i.text?i=null:i&&i.changes&&(Dn(e,i,n,Di(e)),e.curOp.forceUpdate=!0),i||(i=$n(e,t));var r=Qn(i,t,n);return{line:t,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ii(e,t,n,i,r){t.before&&(n=-1);var o,a=n+(i||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Jn(e,t.view,t.rect),t.hasHeights=!0),(o=li(e,t,n,i)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var ri,oi={left:0,right:0,top:0,bottom:0};function ai(e,t,n){for(var i,r,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(r=0,o=1,a="left"):t<l?o=1+(r=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(r=(o=l-s)-1,t>=l&&(a="right")),null!=r){if(i=e[c+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],a="left";if("right"==n&&r==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)i=e[(c+=3)+2],a="right";break}return{node:i,start:r,end:o,collapse:a,coverStart:s,coverEnd:l}}function si(e,t){var n=oi;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function li(e,t,n,i){var r,o=ai(t.map,n,i),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((r=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():si(A(l,c,u).getClientRects(),i)).left||r.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(r=ci(e.display.measure,r))}else{var p;c>0&&(d=i="right"),r=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Ni(e.display),top:f.top,bottom:f.bottom}:oi}for(var m=r.top-t.rect.top,g=r.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,x=0;x<y.length-1&&!(v<y[x]);x++);var b=x?y[x-1]:0,w=y[x],C={left:("right"==d?r.right:r.left)-t.rect.left,right:("left"==d?r.left:r.right)-t.rect.left,top:b,bottom:w};return r.left||r.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=g),C}function ci(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}function ui(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function di(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ui(e.display.view[t])}function hi(e){di(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function pi(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function fi(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mi(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=zn(e.widgets[n]));return t}function gi(e,t,n,i,r){if(!r){var o=mi(t);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=an(t);if("local"==i?a+=Vn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:fi());var l=s.left+("window"==i?0:pi());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function vi(e,t,n){if("div"==n)return t;var i=t.left,r=t.top;if("page"==n)i-=pi(),r-=fi();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function yi(e,t,n,i,r){return i||(i=Je(e.doc,t.line)),gi(e,i,ei(e,i,t.ch,r),n)}function xi(e,t,n,i,r,o){function a(t,a){var s=ii(e,r,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,gi(e,i,s,n)}i=i||Je(e.doc,t.line),r||(r=ni(e,i));var s=he(i,e.doc.direction),l=t.ch,c=t.sticky;if(l>=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=ue(s,l,c),h=ce,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function bi(e,t){var n=0;t=ht(e.doc,t),e.options.lineWrapping||(n=Ni(e.display)*t.ch);var i=Je(e.doc,t.line),r=an(i)+Vn(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function wi(e,t,n,i,r){var o=ot(e,t,n);return o.xRel=r,i&&(o.outside=i),o}function Ci(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return wi(i.first,0,null,-1,-1);var r=nt(i,n),o=i.first+i.size-1;if(r>o)return wi(i.first+i.size-1,Je(i,o).text.length,null,1,1);t<0&&(t=0);for(var a=Je(i,r);;){var s=Ei(e,a,r,t,n),l=Xt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;a=Je(i,r=c.line)}}function ki(e,t,n,i){i-=mi(t);var r=t.text.length,o=se((function(t){return ii(e,n,t-1).bottom<=i}),r,0);return{begin:o,end:r=se((function(t){return ii(e,n,t).top>i}),o,r)}}function Si(e,t,n,i){return n||(n=ni(e,t)),ki(e,t,n,gi(e,t,ii(e,n,i),"line").top)}function Ai(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function Ei(e,t,n,i,r){r-=an(t);var o=ni(e,t),a=mi(t),s=0,l=t.text.length,c=!0,u=he(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Li:Mi)(e,t,n,o,u,i,r);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,m=null,g=se((function(t){var n=ii(e,o,t);return n.top+=a,n.bottom+=a,!!Ai(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=t,m=n),!0)}),s,l),v=!1;if(m){var y=i-m.left<m.right-i,x=y==c;g=f+(x?0:1),p=x?"after":"before",h=y?m.left:m.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":ii(e,o,g-(c?1:0)).bottom+a<=r==c?"after":"before";var b=xi(e,ot(n,g,p),"line",t,o);h=b.left,v=r<b.top?-1:r>=b.bottom?1:0}return wi(n,g=ae(t.text,g,1),p,v,i-h)}function Mi(e,t,n,i,r,o,a){var s=se((function(s){var l=r[s],c=1!=l.level;return Ai(xi(e,ot(n,c?l.to:l.from,c?"before":"after"),"line",t,i),o,a,!0)}),0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=xi(e,ot(n,c?l.from:l.to,c?"after":"before"),"line",t,i);Ai(u,o,a,!0)&&u.top>a&&(l=r[s-1])}return l}function Li(e,t,n,i,r,o,a){var s=ki(e,t,i,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<r.length;h++){var p=r[h];if(!(p.from>=c||p.to<=l)){var f=ii(e,i,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=f<o?o-f+1e9:f-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=r[r.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Ti(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ri){ri=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ri.appendChild(document.createTextNode("x")),ri.appendChild(T("br"));ri.appendChild(document.createTextNode("x"))}L(e.measure,ri);var n=ri.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function Ni(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");L(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function Di(e){for(var t=e.display,n={},i={},r=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+r,i[s]=o.clientWidth}return{fixedPos:_i(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function _i(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ji(e){var t=Ti(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/Ni(e.display)-3);return function(r){if(rn(e.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*t:o+t}}function Bi(e){var t=e.doc,n=ji(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function Pi(e,t,n,i){var r=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Ci(e,o,a);if(i&&c.xRel>0&&(l=Je(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=ot(c.line,Math.max(0,Math.round((o-qn(e.display).left)/Ni(e.display))-u))}return c}function Ri(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function Ii(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Nt&&tn(e.doc,t)<r.viewTo&&Oi(e);else if(n<=r.viewFrom)Nt&&nn(e.doc,n+i)>r.viewFrom?Oi(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)Oi(e);else if(t<=r.viewFrom){var o=Zi(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Oi(e)}else if(n>=r.viewTo){var a=Zi(e,t,t,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):Oi(e)}else{var s=Zi(e,t,t,-1),l=Zi(e,n,n+i,1);s&&l?(r.view=r.view.slice(0,s.index).concat(kn(e,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Oi(e)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=i:t<c.lineN+c.size&&(r.externalMeasured=null))}function Fi(e,t,n){e.curOp.viewChanged=!0;var i=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var o=i.view[Ri(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Z(a,n)&&a.push(n)}}}function Oi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zi(e,t,n,i){var r,o=Ri(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(i>0){if(o==a.length-1)return null;r=s+a[o].size-t,o++}else r=s-t;t+=r,n+=r}for(;tn(e.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function Hi(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=kn(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=kn(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(Ri(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(kn(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Ri(e,n)))),i.viewTo=n}function Wi(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var r=t[i];r.hidden||r.node&&!r.changes||++n}return n}function zi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Gi(e,t){void 0===t&&(t=!0);for(var n=e.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&Vi(e,s.head,r),l||qi(e,s,o)}}return i}function Vi(e,t,n){var i=xi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=n.appendChild(T("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var o=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Ui(e,t){return e.top-t.top||e.left-t.left}function qi(e,t,n){var i=e.display,r=e.doc,o=document.createDocumentFragment(),a=qn(e.display),s=a.left,l=Math.max(i.sizerWidth,Yn(e)-i.sizer.offsetLeft)-a.right,c="ltr"==r.direction;function u(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(i-t)+"px"))}function d(t,n,i){var o,a,d=Je(r,t),h=d.text.length;function p(n,i){return yi(e,ot(t,n),"div",d,i)}function f(t,n,i){var r=Si(e,d,null,t),o="ltr"==n==("after"==i)?"left":"right";return p("after"==i?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1),o)[o]}var m=he(d,r.direction);return le(m,n||0,null==i?h:i,(function(e,t,r,d){var g="ltr"==r,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),x=null==n&&0==e,b=null==i&&t==h,w=0==d,C=!m||d==m.length-1;if(y.top-v.top<=3){var k=(c?b:x)&&C,S=(c?x:b)&&w?s:(g?v:y).left,A=k?l:(g?y:v).right;u(S,v.top,A-S,v.bottom)}else{var E,M,L,T;g?(E=c&&x&&w?s:v.left,M=c?l:f(e,r,"before"),L=c?s:f(t,r,"after"),T=c&&b&&C?l:y.right):(E=c?f(e,r,"before"):s,M=!c&&x&&w?l:v.right,L=!c&&b&&C?s:y.left,T=c?f(t,r,"after"):l),u(E,v.top,M-E,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(L,y.top,T-L,y.bottom)}(!o||Ui(v,o)<0)&&(o=v),Ui(y,o)<0&&(o=y),(!a||Ui(v,a)<0)&&(a=v),Ui(y,a)<0&&(a=y)})),{start:o,end:a}}var h=t.from(),p=t.to();if(h.line==p.line)d(h.line,h.ch,p.ch);else{var f=Je(r,h.line),m=Je(r,p.line),g=Qt(f)==Qt(m),v=d(h.line,h.ch,g?f.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function Ki(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Qi(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yi(e){e.state.focused||(e.display.input.focus(),Ji(e))}function Xi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qi(e))}),100)}function Ji(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Ki(e))}function Qi(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function $i(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var r=t.view[i],o=e.options.lineWrapping,l=void 0,c=0;if(!r.hidden){if(a&&s<8){var u=r.node.offsetTop+r.node.offsetHeight;l=u-n,n=u}else{var d=r.node.getBoundingClientRect();l=d.bottom-d.top,!o&&r.text.firstChild&&(c=r.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=r.line.height-l;if((h>.005||h<-.005)&&(et(r.line,l),er(r.line),r.rest))for(var p=0;p<r.rest.length;p++)er(r.rest[p]);if(c>e.display.sizerWidth){var f=Math.ceil(c/Ni(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}}function er(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function tr(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Vn(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=nt(t,i),a=nt(t,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=nt(t,an(Je(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=nt(t,an(Je(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function nr(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;if(t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var o=T("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Vn(e.display))+"px;\n height: "+(t.bottom-t.top+Kn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}function ir(e,t,n,i){var r;null==i&&(i=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ot(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=xi(e,t),l=n&&n!=t?xi(e,n):s,c=or(e,r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(hr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(fr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return r}function rr(e,t){var n=or(e,t);null!=n.scrollTop&&hr(e,n.scrollTop),null!=n.scrollLeft&&fr(e,n.scrollLeft)}function or(e,t){var n=e.display,i=Ti(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Xn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Un(n),l=t.top<i,c=t.bottom>s-i;if(t.top<r)a.scrollTop=l?0:t.top;else if(t.bottom>r+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=r&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Yn(e)-n.gutters.offsetWidth,f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<h?a.scrollLeft=Math.max(0,t.left+d-(f?0:10)):t.right>p+h-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function ar(e,t){null!=t&&(ur(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function sr(e){ur(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function lr(e,t,n){null==t&&null==n||ur(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function cr(e,t){ur(e),e.curOp.scrollToPos=t}function ur(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,dr(e,bi(e,t.from),bi(e,t.to),t.margin))}function dr(e,t,n,i){var r=or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});lr(e,r.scrollLeft,r.scrollTop)}function hr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||zr(e,{top:t}),pr(e,t,!0),n&&zr(e),Pr(e,100))}function pr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function fr(e,t,n,i){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)&&!i||(e.doc.scrollLeft=t,qr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mr(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Un(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:i,scrollHeight:i+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var gr=function(e,t,n){this.cm=n;var i=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,e(i),e(r),fe(i,"scroll",(function(){i.clientHeight&&t(i.scrollTop,"vertical")})),fe(r,"scroll",(function(){r.clientWidth&&t(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},gr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},gr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},gr.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new O,this.disableVert=new O},gr.prototype.enableZeroWidthBar=function(e,t,n){function i(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,i)}e.style.pointerEvents="auto",t.set(1e3,i)},gr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var vr=function(){};function yr(e,t){t||(t=mr(e));var n=e.display.barWidth,i=e.display.barHeight;xr(e,t);for(var r=0;r<4&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&$i(e),xr(e,mr(e)),n=e.display.barWidth,i=e.display.barHeight}function xr(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}vr.prototype.update=function(){return{bottom:0,right:0}},vr.prototype.setScrollLeft=function(){},vr.prototype.setScrollTop=function(){},vr.prototype.clear=function(){};var br={native:gr,null:vr};function wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new br[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?fr(e,t):hr(e,t)}),e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var Cr=0;function kr(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:++Cr},An(e.curOp)}function Sr(e){var t=e.curOp;t&&Mn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ar(e)}))}function Ar(e){for(var t=e.ops,n=0;n<t.length;n++)Er(t[n]);for(var i=0;i<t.length;i++)Mr(t[i]);for(var r=0;r<t.length;r++)Lr(t[r]);for(var o=0;o<t.length;o++)Tr(t[o]);for(var a=0;a<t.length;a++)Nr(t[a])}function Er(e){var t=e.cm,n=t.display;Fr(t),e.updateMaxLine&&ln(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ir(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mr(e){e.updatedDisplay=e.mustUpdate&&Hr(e.cm,e.update)}function Lr(e){var t=e.cm,n=t.display;e.updatedDisplay&&$i(t),e.barMeasure=mr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ei(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+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Tr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==_();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yr(t,e.barMeasure),e.updatedDisplay&&Ur(t,e.barMeasure),e.selectionChanged&&Ki(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Yi(e.cm)}function Nr(e){var t=e.cm,n=t.display,i=t.doc;e.updatedDisplay&&Wr(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&pr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&fr(t,e.scrollLeft,!0,!0),e.scrollToPos&&nr(t,ir(t,ht(i,e.scrollToPos.from),ht(i,e.scrollToPos.to),e.scrollToPos.margin));var r=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(r)for(var a=0;a<r.length;++a)r[a].lines.length||ve(r[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ve(o[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Dr(e,t){if(e.curOp)return t();kr(e);try{return t()}finally{Sr(e)}}function _r(e,t){return function(){if(e.curOp)return t.apply(e,arguments);kr(e);try{return t.apply(e,arguments)}finally{Sr(e)}}}function jr(e){return function(){if(this.curOp)return e.apply(this,arguments);kr(this);try{return e.apply(this,arguments)}finally{Sr(this)}}}function Br(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);kr(t);try{return e.apply(this,arguments)}finally{Sr(t)}}}function Pr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(Rr,e))}function Rr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=xt(e,t.highlightFrontier),r=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(i.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?qe(t.mode,i.state):null,l=vt(e,o,i,!0);s&&(i.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return Pr(e,e.options.workDelay),!0})),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),r.length&&Dr(e,(function(){for(var t=0;t<r.length;t++)Fi(e,r[t],"text")}))}}var Ir=function(e,t,n){var i=e.display;this.viewport=t,this.visible=tr(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Yn(e),this.force=n,this.dims=Di(e),this.events=[]};function Fr(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kn(e)+"px",t.scrollbarsClipped=!0)}function Or(e){if(e.hasFocus())return null;var t=_();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&D(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function Zr(e){if(e&&e.activeElt&&e.activeElt!=_()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Hr(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return Oi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Wi(e))return!1;Kr(e)&&(Oi(e),t.dims=Di(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),Nt&&(o=tn(e.doc,o),a=nn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Hi(e,o,a),n.viewOffset=an(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Wi(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Or(e);return l>4&&(n.lineDiv.style.display="none"),Gr(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Zr(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Pr(e,400)),n.updateLineNumbers=null,!0}function Wr(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))i&&(t.visible=tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Un(e.display)-Xn(e),n.top)}),t.visible=tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Hr(e,t))break;$i(e);var r=mr(e);zi(e),yr(e,r),Ur(e,r),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 zr(e,t){var n=new Ir(e,t);if(Hr(e,n)){$i(e),Wr(e,n);var i=mr(e);zi(e),yr(e,i),Ur(e,i),n.finish()}}function Gr(e,t,n){var i=e.display,r=e.options.lineNumbers,o=i.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;a!=h.node;)a=s(a);var p=r&&null!=t&&t<=u&&h.lineNumber;h.changes&&(Z(h.changes,"gutter")>-1&&(p=!1),Dn(e,h,u,n)),p&&(M(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),a=h.node.nextSibling}else{var f=On(e,h,u,n);o.insertBefore(f,a)}u+=h.size}for(;a;)a=s(a)}function Vr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ur(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+Kn(e)+"px"}function qr(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=_i(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=i+r+"px")}}function Kr(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Vr(e.display),!0}return!1}function Yr(e,t){for(var n=[],i=!1,r=0;r<e.length;r++){var o=e[r],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;i=!0}n.push({className:o,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Xr(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,a=r.style,s=t.appendChild(T("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Vr(e)}function Jr(e){Xr(e.display),Ii(e),qr(e)}function Qr(e,t,i,r){var o=this;this.input=i,o.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=N("div",null,"CodeMirror-code"),o.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=T("div",null,"CodeMirror-cursors"),o.measure=T("div",null,"CodeMirror-measure"),o.lineMeasure=T("div",null,"CodeMirror-measure"),o.lineSpace=N("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=N("div",[o.lineSpace],"CodeMirror-lines");o.mover=T("div",[c],null,"position: relative"),o.sizer=T("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=T("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),o.gutters=T("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=T("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=T("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Yr(r.gutters,r.lineNumbers),Xr(o),i.init(o)}Ir.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},Ir.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var $r=0,eo=null;function to(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function no(e){var t=to(e);return t.x*=eo,t.y*=eo,t}function io(e,t){var i=to(t),r=i.x,o=i.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(r&&c||o&&u){if(o&&y&&l)e:for(var h=t.target,p=a.view;h!=s;h=h.parentNode)for(var f=0;f<p.length;f++)if(p[f].node==h){e.display.currentWheelTarget=h;break e}if(r&&!n&&!d&&null!=eo)return o&&u&&hr(e,Math.max(0,s.scrollTop+o*eo)),fr(e,Math.max(0,s.scrollLeft+r*eo)),(!o||o&&u)&&Ce(t),void(a.wheelStartX=null);if(o&&null!=eo){var m=o*eo,g=e.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),zr(e,{top:g,bottom:v})}$r<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=r,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(eo=(eo*$r+n)/($r+1),++$r)}}),200)):(a.wheelDX+=r,a.wheelDY+=o))}}a?eo=-.53:n?eo=15:u?eo=-.7:h&&(eo=-1/3);var ro=function(e,t){this.ranges=e,this.primIndex=t};ro.prototype.primary=function(){return this.ranges[this.primIndex]},ro.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!st(n.anchor,i.anchor)||!st(n.head,i.head))return!1}return!0},ro.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new oo(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new ro(e,this.primIndex)},ro.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ro.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(at(t,i.from())>=0&&at(e,i.to())<=0)return n}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function ao(e,t,n){var i=e&&e.options.selectionsMayTouch,r=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=Z(t,r);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=at(s.to(),a.from());if(i&&!a.empty()?l>0:l>=0){var c=ut(s.from(),a.from()),u=ct(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new oo(d?u:c,d?c:u))}}return new ro(t,n)}function so(e,t){return new ro([new oo(e,t||e)],0)}function lo(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function co(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=lo(t).ch-t.to.ch),ot(n,i)}function uo(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var r=e.sel.ranges[i];n.push(new oo(co(r.anchor,t),co(r.head,t)))}return ao(e.cm,n,e.sel.primIndex)}function ho(e,t,n){return e.line==t.line?ot(n.line,e.ch-t.ch+n.ch):ot(n.line+(e.line-t.line),e.ch)}function po(e,t,n){for(var i=[],r=ot(e.first,0),o=r,a=0;a<t.length;a++){var s=t[a],l=ho(s.from,r,o),c=ho(lo(s),r,o);if(r=s.to,o=c,"around"==n){var u=e.sel.ranges[a],d=at(u.head,u.anchor)<0;i[a]=new oo(d?c:l,d?l:c)}else i[a]=new oo(l,l)}return new ro(i,e.sel.primIndex)}function fo(e){e.doc.mode=Ge(e.options,e.doc.modeOption),mo(e)}function mo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Pr(e,100),e.state.modeGen++,e.curOp&&Ii(e)}function go(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function vo(e,t,n,i){function r(e){return n?n[e]:null}function o(e,n,r){un(e,n,r,i),Tn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new cn(c[o],r(o),i));return n}var s=t.from,l=t.to,c=t.text,u=Je(e,s.line),d=Je(e,l.line),h=Y(c),p=r(c.length-1),f=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(go(e,t)){var m=a(0,c.length-1);o(d,d.text,p),f&&e.remove(s.line,f),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+h+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new cn(h+u.text.slice(l.ch),p,i)),o(u,u.text.slice(0,s.ch)+c[0],r(0)),e.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),r(0)),e.remove(s.line+1,f);else{o(u,u.text.slice(0,s.ch)+c[0],r(0)),o(d,h+d.text.slice(l.ch),p);var v=a(1,c.length-1);f>1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}Tn(e,"change",e,t)}function yo(e,t,n){function i(e,r,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=r){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),i(s.doc,e,l))}}}i(e,null,!0)}function xo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bi(e),fo(e),bo(e),e.options.lineWrapping||ln(e),e.options.mode=t.modeOption,Ii(e)}function bo(e){("rtl"==e.doc.direction?j:E)(e.display.lineDiv,"CodeMirror-rtl")}function wo(e){Dr(e,(function(){bo(e),Ii(e)}))}function Co(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ko(e,t){var n={from:lt(t.from),to:lo(t),text:Qe(e,t.from,t.to)};return No(e,n,t.from.line,t.to.line+1),yo(e,(function(e){return No(e,n,t.from.line,t.to.line+1)}),!0),n}function So(e){for(;e.length&&Y(e).ranges;)e.pop()}function Ao(e,t){return t?(So(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function Eo(e,t,n,i){var r=e.history;r.undone.length=0;var o,a,s=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(r,r.lastOp==i)))a=Y(o.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=lo(t):o.changes.push(ko(e,t));else{var l=Y(r.done);for(l&&l.ranges||To(e.sel,r.done),o={changes:[ko(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Mo(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Lo(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||Mo(e,o,Y(r.done),t))?r.done[r.done.length-1]=t:To(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&So(r.undone)}function To(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function No(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),(function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function _o(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],r=0;r<t.text.length;++r)i.push(Do(n[r]));return i}function jo(e,t){var n=_o(e,t),i=Ot(e,t);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[r]=a)}return n}function Bo(e,t,n){for(var i=[],r=0;r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?ro.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&Z(t,Number(u[1]))>-1&&(Y(s)[d]=c[d],delete c[d])}}}return i}function Po(e,t,n,i){if(i){var r=e.anchor;if(n){var o=at(t,r)<0;o!=at(n,r)<0?(r=t,t=n):o!=at(t,n)<0&&(t=n)}return new oo(r,t)}return new oo(n||t,t)}function Ro(e,t,n,i,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),Wo(e,new ro([Po(e.sel.primary(),t,n,r)],0),i)}function Io(e,t,n){for(var i=[],r=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)i[o]=Po(e.sel.ranges[o],t[o],null,r);Wo(e,ao(e.cm,i,e.sel.primIndex),n)}function Fo(e,t,n,i){var r=e.sel.ranges.slice(0);r[t]=n,Wo(e,ao(e.cm,r,e.sel.primIndex),i)}function Oo(e,t,n,i){Wo(e,so(t,n),i)}function Zo(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new oo(ht(e,t[n].anchor),ht(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,i),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?ao(e.cm,i.ranges,i.ranges.length-1):t}function Ho(e,t,n){var i=e.history.done,r=Y(i);r&&r.ranges?(i[i.length-1]=t,zo(e,t,n)):Wo(e,t,n)}function Wo(e,t,n){zo(e,t,n),Lo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function zo(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=Zo(e,t,n));var i=n&&n.bias||(at(t.primary().head,e.sel.primary().head)<0?-1:1);Go(e,Uo(e,t,i,!0)),n&&!1===n.scroll||!e.cm||sr(e.cm)}function Go(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),Tn(e,"cursorActivity",e))}function Vo(e){Go(e,Uo(e,e.sel,null,!1))}function Uo(e,t,n,i){for(var r,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Ko(e,a.anchor,s&&s.anchor,n,i),c=Ko(e,a.head,s&&s.head,n,i);(r||l!=a.anchor||c!=a.head)&&(r||(r=t.ranges.slice(0,o)),r[o]=new oo(l,c))}return r?ao(e.cm,r,t.primIndex):t}function qo(e,t,n,i,r){var o=Je(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(r&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(i<0?1:-1),h=void 0;if((i<0?u:c)&&(d=Yo(e,d,-i,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=at(d,n))&&(i<0?h<0:h>0))return qo(e,d,t,i,r)}var p=l.find(i<0?-1:1);return(i<0?c:u)&&(p=Yo(e,p,i,p.line==t.line?o:null)),p?qo(e,p,t,i,r):null}}return t}function Ko(e,t,n,i,r){var o=i||1,a=qo(e,t,n,o,r)||!r&&qo(e,t,n,o,!0)||qo(e,t,n,-o,r)||!r&&qo(e,t,n,-o,!0);return a||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ht(e,ot(t.line-1)):null:n>0&&t.ch==(i||Je(e,t.line)).text.length?t.line<e.first+e.size-1?ot(t.line+1,0):null:new ot(t.line,t.ch+n)}function Xo(e){e.setSelection(ot(e.firstLine(),0),ot(e.lastLine()),z)}function Jo(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,r,o){t&&(i.from=ht(e,t)),n&&(i.to=ht(e,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),ve(e,"beforeChange",e,i),e.cm&&ve(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function Qo(e,t,n){if(e.cm){if(!e.cm.curOp)return _r(e.cm,Qo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=Jo(e,t,!0))){var i=Tt&&!n&&Ht(e,t.from,t.to);if(i)for(var r=i.length-1;r>=0;--r)$o(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text,origin:t.origin});else $o(e,t)}}function $o(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=uo(e,t);Eo(e,t,n,e.cm?e.cm.curOp.id:NaN),na(e,t,n,Ot(e,t));var i=[];yo(e,(function(e,n){n||-1!=Z(i,e.history)||(sa(e.history,t),i.push(e.history)),na(e,t,null,Ot(e,t))}))}}function ea(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var r,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(r=s[c],n?!r.ranges||r.equals(e.sel):r.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=s.pop()).ranges){if(i)return void s.push(r);break}if(To(r,l),n&&!r.equals(e.sel))return void Wo(e,r,{clearRedo:!1});a=r}var u=[];To(a,l),l.push({changes:u,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),h=function(n){var i=r.changes[n];if(i.origin=t,d&&!Jo(e,i,!1))return s.length=0,{};u.push(ko(e,i));var o=n?uo(e,i):Y(s);na(e,i,o,jo(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:lo(i)});var a=[];yo(e,(function(e,t){t||-1!=Z(a,e.history)||(sa(e.history,i),a.push(e.history)),na(e,i,null,jo(e,i))}))},p=r.changes.length-1;p>=0;--p){var f=h(p);if(f)return f.v}}}}function ta(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(X(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Ii(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)Fi(e.cm,i,"gutter")}}function na(e,t,n,i){if(e.cm&&!e.cm.curOp)return _r(e.cm,na)(e,t,n,i);if(t.to.line<e.first)ta(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);ta(e,r),t={from:ot(e.first,0),to:ot(t.to.line+r,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ot(o,Je(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qe(e,t.from,t.to),n||(n=uo(e,t)),e.cm?ia(e.cm,t,i):vo(e,t,i),zo(e,n,z),e.cantEdit&&Ko(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function ia(e,t,n){var i=e.doc,r=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=tt(Qt(Je(i,o.line))),i.iter(l,a.line+1,(function(e){if(e==r.maxLine)return s=!0,!0}))),i.sel.contains(t.from,t.to)>-1&&xe(e),vo(i,t,n,ji(e)),e.options.lineWrapping||(i.iter(l,o.line+t.text.length,(function(e){var t=sn(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Lt(i,o.line),Pr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Ii(e):o.line!=a.line||1!=t.text.length||go(e.doc,t)?Ii(e,o.line,a.line+1,c):Fi(e,o.line,"text");var u=be(e,"changes"),d=be(e,"change");if(d||u){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Tn(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ra(e,t,n,i,r){var o;i||(i=n),at(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Qo(e,{from:n,to:i,text:t,origin:r})}function oa(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function aa(e,t,n,i){for(var r=0;r<e.length;++r){var o=e[r],a=!0;if(o.ranges){o.copied||((o=e[r]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)oa(o.ranges[s].anchor,t,n,i),oa(o.ranges[s].head,t,n,i)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=ot(c.from.line+i,c.from.ch),c.to=ot(c.to.line+i,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,r+1),r=0)}}}function sa(e,t){var n=t.from.line,i=t.to.line,r=t.text.length-(i-n)-1;aa(e.done,n,i,r),aa(e.undone,n,i,r)}function la(e,t,n,i){var r=t,o=t;return"number"==typeof t?o=Je(e,dt(e,t)):r=tt(t),null==r?null:(i(o,r)&&e.cm&&Fi(e.cm,r,n),o)}function ca(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ua(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var r=e[i];t+=r.chunkSize(),n+=r.height,r.parent=this}this.size=t,this.height=n,this.parent=null}oo.prototype.from=function(){return ut(this.anchor,this.head)},oo.prototype.to=function(){return ct(this.anchor,this.head)},oo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var r=this.lines[n];this.height-=r.height,dn(r),Tn(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},ua.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(e<r){var o=Math.min(t,r-e),a=i.height;if(i.removeInner(e,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var s=[];this.collapse(s),this.children=[new ca(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<=o){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,s=a;s<r.lines.length;){var l=new ca(r.lines.slice(s,s+=25));r.height-=l.height,this.children.splice(++i,0,l),l.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ua(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=Z(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new ua(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<o){var a=Math.min(t,o-e);if(r.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var da=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function ha(e,t,n){an(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ar(e,n)}function pa(e,t,n,i){var r=new da(e,n,i),o=e.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),la(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=t,o&&!rn(e,t)){var i=an(t)<e.scrollTop;et(t,t.height+zn(r)),i&&ar(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&Tn(o,"lineWidgetAdded",o,r,"number"==typeof t?t:tt(t)),r}da.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=tt(n);if(null!=i&&t){for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(n.widgets=null);var o=zn(this);et(n,Math.max(0,n.height-o)),e&&(Dr(e,(function(){ha(e,n,-o),Fi(e,i,"widget")})),Tn(e,"lineWidgetCleared",e,this,i))}},da.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=zn(this)-t;r&&(rn(this.doc,i)||et(i,i.height+r),n&&Dr(n,(function(){n.curOp.forceUpdate=!0,ha(n,i,r),Tn(n,"lineWidgetChanged",n,e,tt(i))})))},we(da);var fa=0,ma=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++fa};function ga(e,t,n,i,r){if(i&&i.shared)return ya(e,t,n,i,r);if(e.cm&&!e.cm.curOp)return _r(e.cm,ga)(e,t,n,i,r);var o=new ma(e,r),a=at(t,n);if(i&&I(i,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Jt(e,t.line,t,n,o)||t.line!=n.line&&Jt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");_t()}o.addToHistory&&Eo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Qt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&et(e,0),Rt(e,new jt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++fa,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Ii(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Fi(c,u,"text");o.atomic&&Vo(c.doc),Tn(c,"markerAdded",c,o)}return o}ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&kr(e),be(this,"clear")){var n=this.find();n&&Tn(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Bt(a.markedSpans,this);e&&!this.collapsed?Fi(e,tt(a),"text"):e&&(null!=s.to&&(r=tt(a)),null!=s.from&&(i=tt(a))),a.markedSpans=Pt(a.markedSpans,s),null==s.from&&this.collapsed&&!rn(this.doc,a)&&e&&et(a,Ti(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Qt(this.lines[l]),u=sn(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Ii(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vo(e.doc)),e&&Tn(e,"markerCleared",e,this,i,r),t&&Sr(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,i;null==e&&"bookmark"==this.type&&(e=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],a=Bt(o.markedSpans,this);if(null!=a.from&&(n=ot(t?o:tt(o),a.from),-1==e))return n;if(null!=a.to&&(i=ot(t?o:tt(o),a.to),1==e))return i}return n&&{from:n,to:i}},ma.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;t&&i&&Dr(i,(function(){var r=t.line,o=tt(t.line),a=ti(i,o);if(a&&(ui(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!rn(n.doc,r)&&null!=n.height){var s=n.height;n.height=null;var l=zn(n)-s;l&&et(r,r.height+l)}Tn(i,"markerChanged",i,e)}))},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=Z(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(Z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(ma);var va=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ya(e,t,n,i,r){(i=I(i)).shared=!1;var o=[ga(e,t,n,i,r)],a=o[0],s=i.widgetNode;return yo(e,(function(e){s&&(i.widgetNode=s.cloneNode(!0)),o.push(ga(e,ht(e,t),ht(e,n),i,r));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Y(o)})),new va(o,a)}function xa(e){return e.findMarks(ot(e.first,0),e.clipPos(ot(e.lastLine())),(function(e){return e.parent}))}function ba(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=i.find(),o=e.clipPos(r.from),a=e.clipPos(r.to);if(at(o,a)){var s=ga(e,o,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}function wa(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];yo(n.primary.doc,(function(e){return i.push(e)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==Z(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<e.length;n++)t(n)}va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Tn(this,"clear")}},va.prototype.find=function(e,t){return this.primary.find(e,t)},we(va);var Ca=0,ka=function(e,t,n,i,r){if(!(this instanceof ka))return new ka(e,t,n,i,r);null==n&&(n=0),ua.call(this,[new ca([new cn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ot(n,0);this.sel=so(o),this.history=new Co(null),this.id=++Ca,this.modeOption=t,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),vo(this,{from:o,to:o,text:e}),Wo(this,so(o),z)};ka.prototype=$(ua.prototype,{constructor:ka,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=$e(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Br((function(e){var t=ot(this.first,0),n=this.first+this.size-1;Qo(this,{from:t,to:ot(n,Je(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&lr(this.cm,0,0),Wo(this,so(t),z)})),replaceRange:function(e,t,n,i){ra(this,e,t=ht(this,t),n=n?ht(this,n):t,i)},getRange:function(e,t,n){var i=Qe(this,ht(this,e),ht(this,t));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(it(this,e))return Je(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Je(this,e)),Qt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ht(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Br((function(e,t,n){Oo(this,ht(this,"number"==typeof e?ot(e,t||0):e),null,n)})),setSelection:Br((function(e,t,n){Oo(this,ht(this,e),ht(this,t||e),n)})),extendSelection:Br((function(e,t,n){Ro(this,ht(this,e),t&&ht(this,t),n)})),extendSelections:Br((function(e,t){Io(this,ft(this,e),t)})),extendSelectionsBy:Br((function(e,t){Io(this,ft(this,X(this.sel.ranges,e)),t)})),setSelections:Br((function(e,t,n){if(e.length){for(var i=[],r=0;r<e.length;r++)i[r]=new oo(ht(this,e[r].anchor),ht(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Wo(this,ao(this.cm,i,t),n)}})),addSelection:Br((function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new oo(ht(this,e),ht(this,t||e))),Wo(this,ao(this.cm,i,i.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var r=Qe(this,n[i].from(),n[i].to());t=t?t.concat(r):r}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=Qe(this,n[i].from(),n[i].to());!1!==e&&(r=r.join(e||this.lineSeparator())),t[i]=r}return t},replaceSelection:function(e,t,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:Br((function(e,t,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&po(this,i,t),l=i.length-1;l>=0;l--)Qo(this,i[l]);s?Ho(this,s):this.cm&&sr(this.cm)})),undo:Br((function(){ea(this,"undo")})),redo:Br((function(){ea(this,"redo")})),undoSelection:Br((function(){ea(this,"undo",!0)})),redoSelection:Br((function(){ea(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,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Co(this.history.maxGeneration),yo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Bo(this.history.done),undone:Bo(this.history.undone)}},setHistory:function(e){var t=this.history=new Co(this.history.maxGeneration);t.done=Bo(e.done.slice(0),null,!0),t.undone=Bo(e.undone.slice(0),null,!0)},setGutterMarker:Br((function(e,t,n){return la(this,e,"gutter",(function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&ie(i)&&(e.gutterMarkers=null),!0}))})),clearGutter:Br((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&la(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ie(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!it(this,e))return null;if(t=e,!(e=Je(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Br((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(S(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0}))})),removeLineClass:Br((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",r=e[i];if(!r)return!1;if(null==n)e[i]=null;else{var o=r.match(S(n));if(!o)return!1;var a=o.index+o[0].length;e[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0}))})),addLineWidget:Br((function(e,t,n){return pa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ga(this,ht(this,e),ht(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ga(this,e=ht(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Je(this,(e=ht(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ht(this,e),t=ht(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&r==e.line&&e.ch>=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)})),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;if(o>e)return t=e,!0;e-=o,++n})),ht(this,ot(n,t))},indexFromPos:function(e){var t=(e=ht(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new ka($e(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new ka($e(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ba(i,xa(this)),i},unlinkDoc:function(e){if(e instanceof Is&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),wa(xa(this));break}if(e.history==this.history){var n=[e.id];yo(e,(function(e){return n.push(e.id)}),!0),e.history=new Co(null),e.history.done=Bo(this.history.done,n),e.history.undone=Bo(this.history.undone,n)}},iterLinkedDocs:function(e){yo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Be(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Br((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&wo(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Sa=0;function Aa(e){var t=this;if(La(t),!ye(t,e)&&!Gn(t.display,e)){Ce(e),a&&(Sa=+new Date);var n=Pi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,l=function(){++s==r&&_r(t,(function(){var e={from:n=ht(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Qo(t.doc,e),Ho(t.doc,so(ht(t.doc,n),ht(t.doc,lo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==Z(t.options.allowDropFileTypes,e.type))l();else{var i=new FileReader;i.onerror=function(){return l()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},i.readAsText(e)}},u=0;u<i.length;u++)c(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),zo(t.doc,so(n,n)),h)for(var p=0;p<h.length;++p)ra(t.doc,"",h[p].anchor,h[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ea(e,t){if(a&&(!e.state.draggingText||+new Date-Sa<100))Ae(t);else if(!ye(e,t)&&!Gn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Ma(e,t){var n=Pi(e,t);if(n){var i=document.createDocumentFragment();Vi(e,n,i),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),L(e.display.dragCursor,i)}}function La(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ta(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var r=t[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Na=!1;function Da(){Na||(_a(),Na=!0)}function _a(){var e;fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ta(ja)}),100))})),fe(window,"blur",(function(){return Ta(Qi)}))}function ja(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ba={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Pa=0;Pa<10;Pa++)Ba[Pa+48]=Ba[Pa+96]=String(Pa);for(var Ra=65;Ra<=90;Ra++)Ba[Ra]=String.fromCharCode(Ra);for(var Ia=1;Ia<=12;Ia++)Ba[Ia+111]=Ba[Ia+63235]="F"+Ia;var Fa={};function Oa(e){var t,n,i,r,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Za(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=X(n.split(" "),Oa),o=0;o<r.length;o++){var a=void 0,s=void 0;o==r.length-1?(s=r.join(" "),a=i):(s=r.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ha(e,t,n,i){var r=(t=Va(t)).call?t.call(e,i):t[e];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ha(e,t.fallthrough,n,i);for(var o=0;o<t.fallthrough.length;o++){var a=Ha(e,t.fallthrough[o],n,i);if(a)return a}}}function Wa(e){var t="string"==typeof e?e:Ba[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function za(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function Ga(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Ba[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),za(n,e,t))}function Va(e){return"string"==typeof e?Fa[e]:e}function Ua(e,t){for(var n=e.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=t(n[r]);i.length&&at(o.from,Y(i).to)<=0;){var a=i.pop();if(at(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}Dr(e,(function(){for(var t=i.length-1;t>=0;t--)ra(e.doc,"",i[t].from,i[t].to,"+delete");sr(e)}))}function qa(e,t,n){var i=ae(e.text,t+n,n);return i<0||i>e.text.length?null:i}function Ka(e,t,n){var i=qa(e,t.ch,n);return null==i?null:new ot(t.line,i,n<0?"after":"before")}function Ya(e,t,n,i,r){if(e){"rtl"==t.doc.direction&&(r=-r);var o=he(n,t.doc.direction);if(o){var a,s=r<0?Y(o):o[0],l=r<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=ni(t,n);a=r<0?n.text.length-1:0;var u=ii(t,c,a).top;a=se((function(e){return ii(t,c,e).top==u}),r<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=qa(n,a,1))}else a=r<0?s.to:s.from;return new ot(i,a,l)}}return new ot(i,r<0?n.text.length:0,r<0?"before":"after")}function Xa(e,t,n,i){var r=he(t,e.doc.direction);if(!r)return Ka(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(r,n.ch,n.sticky),a=r[o];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return Ka(t,n,i);var s,l=function(e,n){return qa(t,e instanceof ot?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||ni(e,t),Si(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=a.to&&h<=u.end:h>=a.from&&h>=u.begin)){var p=d?"before":"after";return new ot(n.line,h,p)}}var f=function(e,t,i){for(var o=function(e,t){return t?new ot(n.line,l(e,1),"before"):new ot(n.line,e,"after")};e>=0&&e<r.length;e+=t){var a=r[e],s=t>0==(1!=a.level),c=s?i.begin:l(i.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),i.begin<=c&&c<i.end)return o(c,s)}},m=f(o+i,i,u);if(m)return m;var g=i>0?u.end:l(u.begin,-1);return null==g||i>0&&g==t.text.length||!(m=f(i>0?0:r.length-1,i,c(g)))?null:m}Fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fa.default=y?Fa.macDefault:Fa.pcDefault;var Ja={selectAll:Xo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Ua(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ot(t.head.line+1,0)}:{from:t.head,to:ot(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ua(e,(function(t){return{from:ot(t.from().line,0),to:ht(e.doc,ot(t.to().line+1,0))}}))},delLineLeft:function(e){return Ua(e,(function(e){return{from:ot(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ua(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ua(e,(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ot(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ot(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Qa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return es(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return $a(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?es(e,t.head):i}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=F(e.getLine(o.line),o.ch,i);t.push(K(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Dr(e,(function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var r=t[i].head,o=Je(e.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new ot(r.line,r.ch-1)),r.ch>0)r=new ot(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),ot(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var a=Je(e.doc,r.line-1).text;a&&(r=new ot(r.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ot(r.line-1,a.length-1),r,"+transpose"))}n.push(new oo(r,r))}e.setSelections(n)}))},newlineAndIndent:function(e){return Dr(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 i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);sr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qa(e,t){var n=Je(e.doc,t),i=Qt(n);return i!=n&&(t=tt(i)),Ya(!0,e,i,t,1)}function $a(e,t){var n=Je(e.doc,t),i=$t(n);return i!=n&&(t=tt(i)),Ya(!0,e,n,t,-1)}function es(e,t){var n=Qa(e,t.line),i=Je(e.doc,n.line),r=he(i,e.doc.direction);if(!r||0==r[0].level){var o=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return ot(n.line,a?0:o,n.sticky)}return n}function ts(e,t,n){if("string"==typeof t&&!(t=Ja[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=W}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function ns(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var r=Ha(t,e.state.keyMaps[i],n,e);if(r)return r}return e.options.extraKeys&&Ha(t,e.options.extraKeys,n,e)||Ha(t,e.options.keyMap,n,e)}var is=new O;function rs(e,t,n,i){var r=e.state.keySeq;if(r){if(Wa(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:is.set(50,(function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())})),os(e,r+" "+t,n,i))return!0}return os(e,t,n,i)}function os(e,t,n,i){var r=ns(e,t,i);return"multi"==r&&(e.state.keySeq=t),"handled"==r&&Tn(e,"keyHandled",e,t,n),"handled"!=r&&"multi"!=r||(Ce(n),Ki(e)),!!r}function as(e,t){var n=Ga(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?rs(e,"Shift-"+n,t,(function(t){return ts(e,t,!0)}))||rs(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ts(e,t)})):rs(e,n,t,(function(t){return ts(e,t)})))}function ss(e,t,n){return rs(e,"'"+n+"'",t,(function(t){return ts(e,t,!0)}))}var ls=null;function cs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=_(),ye(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var r=as(t,e);d&&(ls=r?i:null,r||88!=i||Re||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!r&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||us(t)}}function us(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n))}j(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}function ds(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Gn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(d&&n==ls)return ls=null,void Ce(e);if(!d||e.which&&!(e.which<10)||!as(t,e)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(ss(t,e,r)||t.display.input.onKeyPress(e))}}}var ps,fs,ms=400,gs=function(e,t,n){this.time=e,this.pos=t,this.button=n};function vs(e,t){var n=+new Date;return fs&&fs.compare(n,e,t)?(ps=fs=null,"triple"):ps&&ps.compare(n,e,t)?(fs=new gs(n,e,t),ps=null,"double"):(ps=new gs(n,e,t),fs=null,"single")}function ys(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Gn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ms(t,e)){var i=Pi(t,e),r=Me(e),o=i?vs(i,r):"single";window.focus(),1==r&&t.state.selectingText&&t.state.selectingText(e),i&&xs(t,r,i,o,e)||(1==r?i?ws(t,i,o,e):Ee(e)==n.scroller&&Ce(e):2==r?(i&&Ro(t.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(k?t.display.input.onContextMenu(e):Xi(t)))}}function xs(e,t,n,i,r){var o="Click";return"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o),rs(e,za(o=(1==t?"Left":2==t?"Middle":"Right")+o,r),r,(function(t){if("string"==typeof t&&(t=Ja[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=W}finally{e.state.suppressEdits=!1}return i}))}function bs(e,t,n){var i=e.getOption("configureMouse"),r=i?i(e,t,n):{};if(null==r.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=y?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(y?n.altKey:n.ctrlKey)),r}function ws(e,t,n,i){a?setTimeout(R(Yi,e),0):e.curOp.focus=_();var r,o=bs(e,n,i),s=e.doc.sel;e.options.dragDrop&&Ne&&!e.isReadOnly()&&"single"==n&&(r=s.contains(t))>-1&&(at((r=s.ranges[r]).from(),t)<0||t.xRel>0)&&(at(r.to(),t)>0||t.xRel<0)?Cs(e,i,t,o):Ss(e,i,t,o)}function Cs(e,t,n,i){var r=e.display,o=!1,c=_r(e,(function(t){l&&(r.scroller.draggable=!1),e.state.draggingText=!1,ge(r.wrapper.ownerDocument,"mouseup",c),ge(r.wrapper.ownerDocument,"mousemove",u),ge(r.scroller,"dragstart",d),ge(r.scroller,"drop",c),o||(Ce(t),i.addNew||Ro(e.doc,n,null,null,i.extend),l&&!h||a&&9==s?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(r.scroller.draggable=!0),e.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),fe(r.wrapper.ownerDocument,"mouseup",c),fe(r.wrapper.ownerDocument,"mousemove",u),fe(r.scroller,"dragstart",d),fe(r.scroller,"drop",c),Xi(e),setTimeout((function(){return r.input.focus()}),20)}function ks(e,t,n){if("char"==n)return new oo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new oo(ot(t.line,0),ht(e.doc,ot(t.line+1,0)));var i=n(e,t);return new oo(i.from,i.to)}function Ss(e,t,n,i){var r=e.display,o=e.doc;Ce(t);var a,s,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new oo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new oo(n,n)),n=Pi(e,t,!0,!0),s=-1;else{var u=ks(e,n,i.unit);a=i.extend?Po(a,u.anchor,u.head,i.extend):u}i.addNew?-1==s?(s=c.length,Wo(o,ao(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==i.unit&&!i.extend?(Wo(o,ao(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Fo(o,s,a,G):(s=0,Wo(o,new ro([a],0),G),l=o.sel);var d=n;function h(t){if(0!=at(d,t))if(d=t,"rectangle"==i.unit){for(var r=[],c=e.options.tabSize,u=F(Je(o,n.line).text,n.ch,c),h=F(Je(o,t.line).text,t.ch,c),p=Math.min(u,h),f=Math.max(u,h),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Je(o,m).text,y=U(v,p,c);p==f?r.push(new oo(ot(m,y),ot(m,y))):v.length>y&&r.push(new oo(ot(m,y),ot(m,U(v,f,c))))}r.length||r.push(new oo(n,n)),Wo(o,ao(e,l.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=a,w=ks(e,t,i.unit),C=b.anchor;at(w.anchor,C)>0?(x=w.head,C=ut(b.from(),w.anchor)):(x=w.anchor,C=ct(b.to(),w.head));var k=l.ranges.slice(0);k[s]=As(e,new oo(ht(o,C),x)),Wo(o,ao(e,k,s),G)}}var p=r.wrapper.getBoundingClientRect(),f=0;function m(t){var n=++f,a=Pi(e,t,!0,"rectangle"==i.unit);if(a)if(0!=at(a,d)){e.curOp.focus=_(),h(a);var s=tr(r,o);(a.line>=s.to||a.line<s.from)&&setTimeout(_r(e,(function(){f==n&&m(t)})),150)}else{var l=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;l&&setTimeout(_r(e,(function(){f==n&&(r.scroller.scrollTop+=l,m(t))})),50)}}function g(t){e.state.selectingText=!1,f=1/0,t&&(Ce(t),r.input.focus()),ge(r.wrapper.ownerDocument,"mousemove",v),ge(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=_r(e,(function(e){0!==e.buttons&&Me(e)?m(e):g(e)})),y=_r(e,g);e.state.selectingText=y,fe(r.wrapper.ownerDocument,"mousemove",v),fe(r.wrapper.ownerDocument,"mouseup",y)}function As(e,t){var n=t.anchor,i=t.head,r=Je(e.doc,n.line);if(0==at(n,i)&&n.sticky==i.sticky)return t;var o=he(r);if(!o)return t;var a=ue(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,i.ch,i.sticky),d=u-a||(i.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?t:new oo(new ot(n.line,f,m),i)}function Es(e,t,n,i){var r,o;if(t.touches)r=t.touches[0].clientX,o=t.touches[0].clientY;else try{r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ce(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!be(e,n))return Se(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r)return ve(e,n,e,nt(e.doc,o),e.display.gutterSpecs[l].className,t),Se(t)}}function Ms(e,t){return Es(e,t,"gutterClick",!0)}function Ls(e,t){Gn(e.display,t)||Ts(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ts(e,t){return!!be(e,"gutterContextMenu")&&Es(e,t,"gutterContextMenu",!1)}function Ns(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hi(e)}gs.prototype.compare=function(e,t,n){return this.time+ms>e&&0==at(t,this.pos)&&n==this.button};var Ds={toString:function(){return"CodeMirror.Init"}},_s={},js={};function Bs(e){var t=e.optionHandlers;function n(n,i,r,o){e.defaults[n]=i,r&&(t[n]=o?function(e,t,n){n!=Ds&&r(e,t,n)}:r)}e.defineOption=n,e.Init=Ds,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,fo(e)}),!0),n("indentUnit",2,fo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){mo(e),hi(e),Ii(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter((function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(ot(i,o))}i++}));for(var r=n.length-1;r>=0;r--)ra(e.doc,t,n[r],ot(n[r].line,n[r].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ds&&e.refresh()})),n("specialCharPlaceholder",gn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ns(e),Jr(e)}),!0),n("keyMap","default",(function(e,t,n){var i=Va(t),r=n!=Ds&&Va(n);r&&r.detach&&r.detach(e,i),i.attach&&i.attach(e,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Rs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yr(t,e.options.lineNumbers),Jr(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?_i(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yr(e)}),!0),n("scrollbarStyle","native",(function(e){wr(e),yr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yr(e.options.gutters,t),Jr(e)}),!0),n("firstLineNumber",1,Jr,!0),n("lineNumberFormatter",(function(e){return e}),Jr,!0),n("showCursorWhenSelecting",!1,zi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Qi(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ps),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zi,!0),n("singleCursorHeightPerLine",!0,zi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Ps(e,t,n){if(!t!=!(n&&n!=Ds)){var i=e.display.dragFunctions,r=t?fe:ge;r(e.display.scroller,"dragstart",i.start),r(e.display.scroller,"dragenter",i.enter),r(e.display.scroller,"dragover",i.over),r(e.display.scroller,"dragleave",i.leave),r(e.display.scroller,"drop",i.drop)}}function Rs(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),ln(e)),Bi(e),Ii(e),hi(e),setTimeout((function(){return yr(e)}),100)}function Is(e,t){var n=this;if(!(this instanceof Is))return new Is(e,t);this.options=t=t?I(t):{},I(_s,t,!1);var i=t.value;"string"==typeof i?i=new ka(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var r=new Is.inputStyles[t.inputStyle](this),o=this.display=new Qr(e,i,r,t);for(var c in o.wrapper.CodeMirror=this,Ns(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wr(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 O,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Fs(this),Da(),kr(this),this.curOp.forceUpdate=!0,xo(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ji(n)}),20):Qi(this),js)js.hasOwnProperty(c)&&js[c](this,t[c],Ds);Kr(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Os.length;++u)Os[u](this);Sr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Fs(e){var t=e.display;fe(t.scroller,"mousedown",_r(e,ys)),fe(t.scroller,"dblclick",a&&s<11?_r(e,(function(t){if(!ye(e,t)){var n=Pi(e,t);if(n&&!Ms(e,t)&&!Gn(e.display,t)){Ce(t);var i=e.findWordAt(n);Ro(e.doc,i.anchor,i.head)}}})):function(t){return ye(e,t)||Ce(t)}),fe(t.scroller,"contextmenu",(function(t){return Ls(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ls(e,n)}));var n,i={end:0};function r(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(i=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}fe(t.scroller,"touchstart",(function(r){if(!ye(e,r)&&!o(r)&&!Ms(e,r)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-i.end<=300?i:null},1==r.touches.length&&(t.activeTouch.left=r.touches[0].pageX,t.activeTouch.top=r.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var i=t.activeTouch;if(i&&!Gn(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!i.prev||l(i,i.prev)?new oo(a,a):!i.prev.prev||l(i,i.prev.prev)?e.findWordAt(a):new oo(ot(a.line,0),ht(e.doc,ot(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(n)}r()})),fe(t.scroller,"touchcancel",r),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(hr(e,t.scroller.scrollTop),fr(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return io(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return io(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Ae(t)},over:function(t){ye(e,t)||(Ma(e,t),Ae(t))},start:function(t){return Ea(e,t)},drop:_r(e,Aa),leave:function(t){ye(e,t)||La(e)}};var c=t.input.getField();fe(c,"keyup",(function(t){return ds.call(e,t)})),fe(c,"keydown",_r(e,cs)),fe(c,"keypress",_r(e,hs)),fe(c,"focus",(function(t){return Ji(e,t)})),fe(c,"blur",(function(t){return Qi(e,t)}))}Is.defaults=_s,Is.optionHandlers=js;var Os=[];function Zs(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=xt(e,t).state:n="prev");var a=e.options.tabSize,s=Je(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(r,s.text.slice(u.length),s.text))==W||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?F(Je(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)h+=a,d+="\t";if(h<c&&(d+=K(c-h)),d!=u)return ra(o,d,ot(t,0),ot(t,u.length),"+input"),s.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==t&&m.head.ch<u.length){var g=ot(t,u.length);Fo(o,f,new oo(g,g));break}}}Is.defineInitHook=function(e){return Os.push(e)};var Hs=null;function Ws(e){Hs=e}function zs(e,t,n,i,r){var o=e.doc;e.display.shift=!1,i||(i=o.sel);var a=+new Date-200,s="paste"==r||e.state.pasteIncoming>a,l=Be(t),c=null;if(s&&i.ranges.length>1)if(Hs&&Hs.text.join("\n")==t){if(i.ranges.length%Hs.text.length==0){c=[];for(var u=0;u<Hs.text.length;u++)c.push(o.splitLines(Hs.text[u]))}}else l.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=i.ranges.length-1;h>=0;h--){var p=i.ranges[h],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=ot(f.line,f.ch-n):e.state.overwrite&&!s?m=ot(m.line,Math.min(Je(o,m.line).text.length,m.ch+Y(l).length)):s&&Hs&&Hs.lineWise&&Hs.text.join("\n")==l.join("\n")&&(f=m=ot(f.line,0)));var g={from:f,to:m,text:c?c[h%c.length]:l,origin:r||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Qo(e.doc,g),Tn(e,"inputRead",e,g)}t&&!s&&Vs(e,t),sr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Gs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Dr(t,(function(){return zs(t,n,0,null,"paste")})),!0}function Vs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Zs(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Je(e.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Zs(e,r.head.line,"smart"));a&&Tn(e,"electricInput",e,r.head.line)}}}function Us(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var r=e.doc.sel.ranges[i].head.line,o={anchor:ot(r,0),head:ot(r+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function qs(e,t,n,i){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function Ks(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),qs(e),t}function Ys(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,r=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&_r(this,t[e])(this,n,r),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Va(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:jr((function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Ii(this)})),removeOverlay:jr((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void Ii(this)}})),indentLine:jr((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),it(this.doc,e)&&Zs(this,e,t,n)})),indentSelection:jr((function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var r=t[i];if(r.empty())r.head.line>n&&(Zs(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&sr(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Zs(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[i].from().ch>0&&Fo(this.doc,i,new oo(o,c[i].to()),z)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=ht(this.doc,e);var t,n=yt(this,Je(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}i=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var r=n[t],o=this.getModeAt(e);if("string"==typeof o[t])r[o[t]]&&i.push(r[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=r[o[t][a]];s&&i.push(s)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(o,this)&&-1==Z(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var n=this.doc;return xt(this,(e=dt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return xi(this,null==e?n.head:"object"==typeof e?ht(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return yi(this,ht(this.doc,e),t||"page")},coordsChar:function(e,t){return Ci(this,(e=vi(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=vi(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,r=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,r=!0),i=Je(this.doc,e)}else i=e;return gi(this,i,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-an(i):0)},defaultTextHeight:function(){return Ti(this.display)},defaultCharWidth:function(){return Ni(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display,a=(e=xi(this,ht(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==i)a=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==r?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&rr(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:jr(cs),triggerOnKeyPress:jr(hs),triggerOnKeyUp:ds,triggerOnMouseDown:jr(ys),execCommand:function(e){if(Ja.hasOwnProperty(e))return Ja[e].call(null,this)},triggerElectric:jr((function(e){Vs(this,e)})),findPosH:function(e,t,n,i){var r=1;t<0&&(r=-1,t=-t);for(var o=ht(this.doc,e),a=0;a<t&&!(o=Xs(this.doc,o,r,n,i)).hitSide;++a);return o},moveH:jr((function(e,t){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Xs(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()}),V)})),deleteH:jr((function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Ua(this,(function(n){var r=Xs(i,n.head,e,t,!1);return e<0?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(e,t,n,i){var r=1,o=i;t<0&&(r=-1,t=-t);for(var a=ht(this.doc,e),s=0;s<t;++s){var l=xi(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Js(this,l,r,n)).hitSide)break}return a},moveV:jr((function(e,t){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=xi(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=Js(n,s,e,t);return"page"==t&&a==i.sel.primary()&&ar(n,yi(n,l,"div").top-s.top),l}),V),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]})),findWordAt:function(e){var t=Je(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var r=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var o=t.charAt(n),a=ne(o,r)?function(e){return ne(e,r)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new oo(ot(e.line,n),ot(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==_()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:jr((function(e,t){lr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kn(this)-this.display.barHeight,width:e.scrollWidth-Kn(this)-this.display.barWidth,clientHeight:Xn(this),clientWidth:Yn(this)}},scrollIntoView:jr((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ot(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?cr(this,e):dr(this,e.from,e.to,e.margin)})),setSize:jr((function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&di(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Fi(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return Dr(this,e)},startOperation:function(){return kr(this)},endOperation:function(){return Sr(this)},refresh:jr((function(){var e=this.display.cachedTextHeight;Ii(this),this.curOp.forceUpdate=!0,hi(this),lr(this,this.doc.scrollLeft,this.doc.scrollTop),Vr(this.display),(null==e||Math.abs(e-Ti(this.display))>.5||this.options.lineWrapping)&&Bi(this),ve(this,"refresh",this)})),swapDoc:jr((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),xo(this,e),hi(this),this.display.input.reset(),lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Tn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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(t,i,r){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=r},e.registerGlobalHelper=function(t,i,r,o){e.registerHelper(t,i,o),n[t]._global.push({pred:r,val:o})}}function Xs(e,t,n,i,r){var o=t,a=n,s=Je(e,t.line),l=r&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new ot(n,t.ch,t.sticky),s=Je(e,n))}function u(o){var a;if("codepoint"==i){var u=s.text.charCodeAt(t.ch+(i>0?0:-1));a=isNaN(u)?null:new ot(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=r?Xa(e.cm,s,t,n):Ka(s,t,n);if(null==a){if(o||!c())return!1;t=Ya(r,e.cm,s,t.line,l)}else t=a;return!0}if("char"==i||"codepoint"==i)u();else if("column"==i)u(!0);else if("word"==i||"group"==i)for(var d=null,h="group"==i,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var m=s.text.charAt(t.ch)||"\n",g=ne(m,p)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||f||g||(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!f))break}var v=Ko(e,t,o,a,!0);return st(o,v)&&(v.hitSide=!0),v}function Js(e,t,n,i){var r,o,a=e.doc,s=t.left;if("page"==i){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Ti(e.display),3);r=(n>0?t.bottom:t.top)+n*c}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;(o=Ci(e,s,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}var Qs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new O,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $s(e,t){var n=ti(e,t.line);if(!n||n.hidden)return null;var i=Je(e.doc,t.line),r=Qn(n,i,t.line),o=he(i,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=ai(r.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function el(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function tl(e,t){return t&&(e.bad=!0),e}function nl(e,t,n,i,r){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(ot(i,0),ot(r+1,0),c(+p));return void(f.length&&(o=f[0].find(0))&&d(Qe(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)h(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;h(t),t!=n;)t=t.nextSibling,l=!1;return o}function il(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return tl(e.clipPos(ot(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var o=e.display.view[r];if(o.node==i)return rl(o,t,n)}}function rl(e,t,n){var i=e.text.firstChild,r=!1;if(!t||!D(i,t))return tl(ot(tt(e.line),0),!0);if(t==i&&(r=!0,t=i.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return tl(ot(tt(o),o.text.length),r)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,i){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?l.map:c[r],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=tt(r<0?e.line:e.rest[r]),d=o[a]+i;return(i<0||s!=t)&&(d=o[a+(i?1:0)]),ot(u,d)}}}var d=u(a,s,n);if(d)return tl(d,r);for(var h=s.nextSibling,p=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return tl(ot(d.line,d.ch-p),r);p+=h.textContent.length}for(var f=s.previousSibling,m=n;f;f=f.previousSibling){if(d=u(f,f.firstChild,-1))return tl(ot(d.line,d.ch+m),r);m+=f.textContent.length}}Qs.prototype.init=function(e){var t=this,n=this,i=n.cm,r=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!ye(i,e)){if(i.somethingSelected())Ws({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Us(i);Ws({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation((function(){i.setSelections(t.ranges,0,z),i.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Hs.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Ks(),l=s.firstChild;i.display.lineSpace.insertBefore(s,i.display.lineSpace.firstChild),l.value=Hs.text.join("\n");var c=document.activeElement;P(l),setTimeout((function(){i.display.lineSpace.removeChild(s),c.focus(),c==r&&n.showPrimarySelection()}),50)}}qs(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),fe(r,"paste",(function(e){!o(e)||ye(i,e)||Gs(e,i)||s<=11&&setTimeout(_r(i,(function(){return t.updateFromDOM()})),20)})),fe(r,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(r,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(r,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(r,"touchstart",(function(){return n.forceCompositionEnd()})),fe(r,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(r,"copy",a),fe(r,"cut",a)},Qs.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var e=Gi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Qs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qs.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=il(t,e.anchorNode,e.anchorOffset),s=il(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=at(ut(a,s),r)||0!=at(ct(a,s),o)){var l=t.display.view,c=r.line>=t.display.viewFrom&&$s(t,r)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&$s(t,o);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var p,f=e.rangeCount&&e.getRangeAt(0);try{p=A(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),f&&null==e.anchorNode?e.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Qs.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Qs.prototype.showMultipleSelections=function(e){L(this.cm.display.cursorDiv,e.cursors),L(this.cm.display.selectionDiv,e.selection)},Qs.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qs.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Qs.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qs.prototype.blur=function(){this.div.blur()},Qs.prototype.getField=function(){return this.div},Qs.prototype.supportsTouch=function(){return!0},Qs.prototype.receivedFocus=function(){var e=this;function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.selectionInEditor()?this.pollSelection():Dr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},Qs.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qs.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&el(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=il(t,e.anchorNode,e.anchorOffset),i=il(t,e.focusNode,e.focusOffset);n&&i&&Dr(t,(function(){Wo(t.doc,so(n,i),z),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)}))}}},Qs.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>i.firstLine()&&(a=ot(a.line-1,Je(i.doc,a.line-1).length)),s.ch==Je(i.doc,s.line).text.length&&s.line<i.lastLine()&&(s=ot(s.line+1,0)),a.line<r.viewFrom||s.line>r.viewTo-1)return!1;a.line==r.viewFrom||0==(e=Ri(i,a.line))?(t=tt(r.view[0].line),n=r.view[0].node):(t=tt(r.view[e].line),n=r.view[e-1].node.nextSibling);var l,c,u=Ri(i,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=tt(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(nl(i,n,c,t,l)),h=Qe(i.doc,ot(t,0),ot(l,Je(i.doc,l).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var p=0,f=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=Y(d),x=Y(h),b=Math.min(y.length-(1==d.length?p:0),x.length-(1==h.length?p:0));f<b&&y.charCodeAt(y.length-f-1)==x.charCodeAt(x.length-f-1);)++f;if(1==d.length&&1==h.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-f-1)==x.charCodeAt(x.length-f-1);)p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=ot(t,p),C=ot(l,h.length?Y(h).length-f:0);return d.length>1||d[0]||at(w,C)?(ra(i.doc,d,w,C,"+input"),!0):void 0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Qs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Dr(this.cm,(function(){return Ii(e.cm)}))},Qs.prototype.setUneditable=function(e){e.contentEditable="false"},Qs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||_r(this.cm,zs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Qs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;var ol=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new O,this.hasSelection=!1,this.composing=null};function al(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=_();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=s.getValue()}var r;if(e.form&&(fe(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=r))}},e.style.display="none";var s=Is((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function sl(e){e.off=ge,e.on=fe,e.wheelEventPixels=no,e.Doc=ka,e.splitLines=Be,e.countColumn=F,e.findColumn=U,e.isWordChar=te,e.Pass=W,e.signal=ve,e.Line=cn,e.changeEnd=lo,e.scrollbarModel=br,e.Pos=ot,e.cmpPos=at,e.modes=Oe,e.mimeModes=Ze,e.resolveMode=ze,e.getMode=Ge,e.modeExtensions=Ve,e.extendMode=Ue,e.copyState=qe,e.startState=Ye,e.innerMode=Ke,e.commands=Ja,e.keyMap=Fa,e.keyName=Ga,e.isModifierKey=Wa,e.lookupKey=Ha,e.normalizeKeyMap=Za,e.StringStream=Xe,e.SharedTextMarker=va,e.TextMarker=ma,e.LineWidget=da,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Ae,e.addClass=j,e.contains=D,e.rmClass=E,e.keyNames=Ba}ol.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var r=this.textarea;function o(e){if(!ye(i,e)){if(i.somethingSelected())Ws({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Us(i);Ws({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,z):(n.prevInput="",r.value=t.text.join("\n"),P(r))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(r.style.width="0px"),fe(r,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(r,"paste",(function(e){ye(i,e)||Gs(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),fe(r,"cut",o),fe(r,"copy",o),fe(e.scroller,"paste",(function(t){if(!Gn(e,t)&&!ye(i,t)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,r.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){Gn(e,t)||Ce(t)})),fe(r,"compositionstart",(function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ol.prototype.createField=function(e){this.wrapper=Ks(),this.textarea=this.wrapper.firstChild},ol.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ol.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=Gi(e);if(e.options.moveInputWithCursor){var r=xi(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},ol.prototype.showSelection=function(e){var t=this.cm.display;L(t.cursorDiv,e.cursors),L(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ol.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ol.prototype.getField=function(){return this.textarea},ol.prototype.supportsTouch=function(){return!1},ol.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(e){}},ol.prototype.blur=function(){this.textarea.blur()},ol.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ol.prototype.receivedFocus=function(){this.slowPoll()},ol.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ol.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ol.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||Pe(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=n.value;if(r==i&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l<c&&i.charCodeAt(l)==r.charCodeAt(l);)++l;return Dr(t,(function(){zs(t,r.slice(l),i.length-l,null,e.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ol.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ol.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ol.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Pi(n,e),c=i.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&_r(n,Wo)(n.doc,so(o),z);var u,h=r.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&s>=9&&g(),k){Ae(e);var m=function(){ge(window,"mouseup",m),setTimeout(v,20)};fe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=r.selectionStart){var e=n.somethingSelected(),o=""+(e?r.value:"");r.value="⇚",r.value=o,t.prevInput=e?"":"",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,r.style.cssText=h,a&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==t.prevInput?_r(n,Xo)(n):e++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},ol.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ol.prototype.setUneditable=function(){},ol.prototype.needsContentAttribute=!1,Bs(Is),Ys(Is);var ll="iter insert remove copy getEditor constructor".split(" ");for(var cl in ka.prototype)ka.prototype.hasOwnProperty(cl)&&Z(ll,cl)<0&&(Is.prototype[cl]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cl]));return we(ka),Is.inputStyles={textarea:ol,contenteditable:Qs},Is.defineMode=function(e){Is.defaults.mode||"null"==e||(Is.defaults.mode=e),He.apply(this,arguments)},Is.defineMIME=We,Is.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Is.defineMIME("text/plain","null"),Is.defineExtension=function(e,t){Is.prototype[e]=t},Is.defineDocExtension=function(e,t){ka.prototype[e]=t},Is.fromTextArea=al,sl(Is),Is.version="5.58.2",Is}()},25419:function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var i=e.getMode(t,"text/html"),r="null"==i.name;function o(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={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 s in a)a.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(a[s]=n.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,v=" ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function x(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function w(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==k){var n=r;if(!n){var o=e.innerMode(i,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=M,t.block=C,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function C(t,i){var r=t.column()===i.indentation,s=b(i.prevLine.stream),p=i.indentedCode,g=i.prevLine.hr,v=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var w=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,v)){for(i.list=null;w<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=w-i.listStack[i.listStack.length-1])}var C=!(s||g||i.prevLine.header||v&&p||i.prevLine.fencedCodeEnd),k=(!1===i.list||g||s)&&i.indentation<=x&&t.match(l),E=null;if(i.indentationDiff>=4&&(p||i.prevLine.fencedCodeEnd||i.prevLine.header||s))return t.skipToEnd(),i.indentedCode=!0,a.code;if(t.eatSpace())return null;if(r&&i.indentation<=x&&(E=t.match(d))&&E[1].length<=6)return i.quote=0,i.header=E[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,A(i);if(i.indentation<=x&&t.eat(">"))return i.quote=r?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),t.eatSpace(),A(i);if(!k&&!i.setext&&r&&i.indentation<=x&&(E=t.match(c))){var M=E[1]?"ol":"ul";return i.indentation=w+t.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+M]),A(i)}return r&&i.indentation<=x&&(E=t.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(E[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&o(E[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=S,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,A(i)):i.setext||!(C&&v||i.quote||!1!==i.list||i.code||k||m.test(t.string))&&(E=t.lookAhead(1))&&(E=E.match(h))?(i.setext?(i.header=i.setext,i.setext=0,t.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==E[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,A(i)):k?(t.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,i,_):y(t,i,i.inline)}function k(t,n){var o=i.token(t,n.htmlState);if(!r){var a=e.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=M,n.block=C,n.htmlState=null)}return o}function S(e,t){var i,r=t.listStack[t.listStack.length-1]||0,o=t.indentation<r,s=r+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(i=A(t)),t.localMode=t.localState=null,t.block=C,t.f=M,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?x(e,t,t.block):i):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function A(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i<e.formatting.length;i++)t.push(a.formatting+"-"+e.formatting[i]),"header"===e.formatting[i]&&t.push(a.formatting+"-"+e.formatting[i]+"-"+e.header),"quote"===e.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var r=(e.listStack.length-1)%3;r?1===r?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function E(e,t){if(e.match(p,!0))return A(t)}function M(t,r){var o=r.text(t,r);if(void 0!==o)return o;if(r.list)return r.list=null,A(r);if(r.taskList)return" "===t.match(u,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,A(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),A(r);var s=t.next();if(r.linkTitle){r.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return a.linkHref}if("`"===s){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=r.code||r.quote&&1!=h){if(h==r.code){var p=A(r);return r.code=0,p}return r.formatting=d,A(r)}return r.code=h,A(r)}if(r.code)return A(r);if("\\"===s&&(t.next(),n.highlightFormatting)){var f=A(r),m=a.formatting+"-escape";return f?f+" "+m:m}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),A(r);if("["===s&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),A(r);if("]"===s&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var f=A(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=T,f}if("["===s&&!r.image)return r.linkText&&t.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),A(r);if("]"===s&&r.linkText){n.highlightFormatting&&(r.formatting="link");var f=A(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?T:M,f}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link"),(f=A(r))?f+=" ":f="",f+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link"),(f=A(r))?f+=" ":f="",f+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(i),x(t,r,k)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===s||"_"===s){for(var b=1,w=1==t.pos?" ":t.string.charAt(t.pos-2);b<3&&t.eat(s);)b++;var C=t.peek()||" ",S=!/\s/.test(C)&&(!g.test(C)||/\s/.test(w)||g.test(w)),E=!/\s/.test(w)&&(!g.test(w)||/\s/.test(C)||g.test(C)),N=null,D=null;if(b%2&&(r.em||!S||"*"!==s&&E&&!g.test(w)?r.em!=s||!E||"*"!==s&&S&&!g.test(C)||(N=!1):N=!0),b>1&&(r.strong||!S||"*"!==s&&E&&!g.test(w)?r.strong!=s||!E||"*"!==s&&S&&!g.test(C)||(D=!1):D=!0),null!=D||null!=N)return n.highlightFormatting&&(r.formatting=null==N?"strong":null==D?"em":"strong em"),!0===N&&(r.em=s),!0===D&&(r.strong=s),p=A(r),!1===N&&(r.em=!1),!1===D&&(r.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return A(r);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),p=A(r),r.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),A(r)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return A(r);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var _=A(r);return r.emoji=!1,_}return" "===s&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),A(r)}function L(e,t){if(">"===e.next()){t.f=t.inline=M,n.highlightFormatting&&(t.formatting="link");var i=A(t);return i?i+=" ":i="",i+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function T(e,t){if(e.eatSpace())return null;var i=e.next();return"("===i||"["===i?(t.f=t.inline=D("("===i?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,A(t)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(e){return function(t,i){if(t.next()===e){i.f=i.inline=M,n.highlightFormatting&&(i.formatting="link-string");var r=A(i);return i.linkHref=!1,r}return t.match(N[e]),i.linkHref=!0,A(i)}}function _(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=j,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,A(t)):y(e,t,M)}function j(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=B,n.highlightFormatting&&(t.formatting="link");var i=A(t);return t.linkText=!1,i}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function B(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=M,a.linkHref+" url")}var P={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:M,text:E,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(i,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=k)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==k?{state:e.htmlState,mode:i}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:P}},indent:function(t,n,r){return t.block==k&&i.indent?i.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},blankLine:w,getType:A,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return P}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(89780),n(15525),n(98101))},98101:function(e,t,n){!function(e){"use strict";e.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 t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.mime==t)return i;if(i.mimes)for(var r=0;r<i.mimes.length;r++)if(i.mimes[r]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.ext)for(var r=0;r<i.ext.length;r++)if(i.ext[r]==t)return i}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.file&&i.file.test(t))return i}var r=t.lastIndexOf("."),o=r>-1&&t.substring(r+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var r=0;r<i.alias.length;r++)if(i.alias[r].toLowerCase()==t)return i}}}(n(89780))},67549:function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function i(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function r(e){var t=e.cmdState.pop();t&&t.closeBracket()}function o(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var i=t[n];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}function a(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function l(e,t){e.f=t}function c(e,t){var r;if(e.match(/^\\[a-zA-Z@]+/)){var a=e.current().slice(1);return n(t,r=new(r=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),l(t,d),r.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return l(t,(function(e,t){return u(e,t,"\\]")})),"keyword";if(e.match("\\("))return l(t,(function(e,t){return u(e,t,"\\)")})),"keyword";if(e.match("$$"))return l(t,(function(e,t){return u(e,t,"$$")})),"keyword";if(e.match("$"))return l(t,(function(e,t){return u(e,t,"$")})),"keyword";var c=e.next();return"%"==c?(e.skipToEnd(),"comment"):"}"==c||"]"==c?(r=i(t))?(r.closeBracket(c),l(t,d),"bracket"):"error":"{"==c||"["==c?(n(t,r=new(r=s.DEFAULT)),"bracket"):/\d/.test(c)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(r=o(t)).name&&(r.argument=e.current()),r.styleIdentifier())}function u(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return l(t,c),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=e.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(e.skipToEnd(),"comment"):"error"}function d(e,t){var n=e.peek();return"{"==n||"["==n?(i(t).openBracket(n),e.eat(n),l(t,c),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(l(t,c),r(t),c(e,t))}return s.importmodule=a("importmodule","tag",["string","builtin"]),s.documentclass=a("documentclass","tag",["","atom"]),s.usepackage=a("usepackage","tag",["atom"]),s.begin=a("begin","tag",["atom"]),s.end=a("end","tag",["atom"]),s.label=a("label","tag",["atom"]),s.ref=a("ref","tag",["atom"]),s.eqref=a("eqref","tag",["atom"]),s.cite=a("cite","tag",["atom"]),s.bibitem=a("bibitem","tag",["atom"]),s.Bibitem=a("Bibitem","tag",["atom"]),s.RBibitem=a("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return u(e,t)}:c}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=c,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(89780))},15525:function(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(i,r){var o,a,s=i.indentUnit,l={},c=r.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==i?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=x,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}function f(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function g(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;v(e)}}function x(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?w:x}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",S):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,n)):(a="error",b)}function w(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&v(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(a="tag",C):(a="tag error",k)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,n)):(a="error",k)}function C(e,t,n){return"endTag"!=e?(a="error",C):(v(n),x)}function k(e,t,n){return a="error",C(e,t,n)}function S(e,t,n){if("word"==e)return a="attribute",A;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(i)?y(n,i):(y(n,i),n.context=new g(n,i,r==n.indented)),x}return a="error",S}function A(e,t,n){return"equals"==e?E:(l.allowMissing||(a="error"),S(e,t,n))}function E(e,t,n){return"string"==e?M:"word"==e&&l.allowUnquoted?(a="string",S):(a="error",S(e,t,n))}function M(e,t,n){return"string"==e?M:S(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:x,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=l.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(89780))},2859:function(e,t,n){"use strict";n.d(t,{hP:function(){return Q}});var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function a(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function s(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}var l=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,i=t;n<i.length;n++){var r=i[n],o=r[0],a=r[1];e.setAttribute(o,a)}},e.createRect=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",t.toString()),r.setAttribute("height",n.toString()),i&&e.setAttributes(r,i),r},e.createLine=function(t,n,i,r,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",t.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",i.toString()),a.setAttribute("y2",r.toString()),o&&e.setAttributes(a,o),a},e.createPolygon=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","polygon");return i.setAttribute("points",t),n&&e.setAttributes(i,n),i},e.createCircle=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(t/2).toString()),i.setAttribute("r",t.toString()),n&&e.setAttributes(i,n),i},e.createEllipse=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(n/2).toString()),r.setAttribute("rx",(t/2).toString()),r.setAttribute("ry",(n/2).toString()),i&&e.setAttributes(r,i),r},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,i,r,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",i.toString()],["markerHeight",r.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");return i.textContent=t,n&&e.setAttributes(i,n),i},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),n&&e.setAttributes(i,n),i},e}(),c=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),u=function(){function e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return e.prototype.rasterize=function(e,t,n){var i=this;return new Promise((function(r){var o=void 0!==n?n:document.createElement("canvas");null===e&&(i.markersOnly=!0,i.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,!0===i.naturalSize?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):void 0!==i.width&&void 0!==i.height&&(a.width.baseVal.value=i.width,a.height.baseVal.value=i.height),o.width=a.width.baseVal.value,o.height=a.height.baseVal.value;var s=a.outerHTML,l=o.getContext("2d");!0!==i.markersOnly&&l.drawImage(e,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var d=new Blob([s],{type:"image/svg+xml"}),h=c.createObjectURL(d);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(h);var e=o.toDataURL(i.imageType,i.imageQuality);r(e)},u.src=h}))},e}(),d=function(){},h=function(){function e(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new p("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new f("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new f("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),p=function(e,t){this.selector=e,this.style=t},f=function(e,t){this.localName=e,this.style=t},m=function(){function e(e,t,n,i,r){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=n,this.uiStyleSettings=i,this.styles=r,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return e.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},e.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},e.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},e.prototype.addActionButton=function(e,t,n){var i=this,r=document.createElement("div");switch(r.className=""+this.toolbarButtonStyleClass.name,r.innerHTML=t,r.setAttribute("data-action",n),r.addEventListener("click",(function(){i.actionToolbarButtonClicked(r,n)})),n){case"select":case"undo":case"redo":r.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":r.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"render":r.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":r.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(r),this.buttons.push(r)},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new f("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new f("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new f("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new f("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new f("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new f("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new f("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},e.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),g=function(){function e(e,t,n,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new f("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new f("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new f("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,i=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=i.uiStyleSettings;var n=document.createElement("div");n.className=i.toolboxButtonStyleClass.name+" "+(null!==(t=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:i.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){i.panelButtonClick(e)})),i.panelButtons.push(n),i.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var i=e.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,i){var r,o;e.className=t.toolboxButtonStyleClass.name+" "+(i===n?""+(null!==(r=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==r?r:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),v=function(e,t){this.title=e,this.icon=t},y=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=i,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var i=e.getColorBox(n);t.appendChild(i),e.colorBoxes.push(i)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-n,r=document.createElement("div");r.style.display="inline-block",r.style.boxSizing="content-box",r.style.width=i-2+"px",r.style.height=i-2+"px",r.style.padding="1px",r.style.marginRight="2px",r.style.marginBottom="2px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderRadius=(i+2)/2+"px",r.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentColor(e,r)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=i-2+"px",o.style.height=i-2+"px",o.style.backgroundColor=e,o.style.borderRadius=i/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),r.appendChild(o),r},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(v),x=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),b=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.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},e}(),w=function(){function e(){this.GRIP_SIZE=10,this.visual=l.createGroup(),this.visual.appendChild(l.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(l.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),C=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),k=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.left=0,r.top=0,r.width=0,r.height=0,r.defaultSize={x:50,y:20},r.offsetX=0,r.offsetY=0,r.rotationAngle=0,r.CB_DISTANCE=10,r._suppressMarkerCreateEvent=!1,r.container.transform.baseVal.appendItem(l.createTransform()),r.setupControlBox(),r}return r(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=l.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var i=this.unrotatePoint(t);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var r=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=r.x-this.width/2,this.top=r.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,i=this.manipulationStartTop,r=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+e.y-this.manipulationStartY,r=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:r=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),r>=0?(this.top=i,this.height=r):(this.top=i+r,this.height=-r),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=l.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=l.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=l.createGroup();var e=l.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=l.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=l.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 b,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},t.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new w;return e.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,i=(this.width+this.CB_DISTANCE)/2-e/2,r=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,a=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,i,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,r),this.positionGrip(this.controlGrips.centerRight.visual,a,r),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,i,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var i=e.transform.baseVal.getItem(0);i.setTranslate(t,n),e.transform.baseVal.replaceItem(i,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var i=this.rotatePoint({x:this.left,y:this.top}),r=this.unrotatePoint({x:i.x*t,y:i.y*n});this.left=r.x,this.top=r.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(x),S=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&l.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&l.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&l.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&l.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(k),A=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=i,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentWidth(n,i)})),t.appendChild(i);var r=document.createElement("div");r.innerText=n.toString(),r.style.marginRight="5px",i.appendChild(r);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),i.appendChild(o),e.widthBoxes.push(i)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(v),E=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=i,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/e.styles.length-5+"%",i.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentStyle(n,i)})),t.appendChild(i);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";r.innerHTML=o,i.appendChild(r),e.styleBoxes.push(i)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(v),M=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new E("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',t}(S),L=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,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},T=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.x1=0,r.y1=0,r.x2=0,r.y2=0,r.defaultLength=50,r.manipulationStartX=0,r.manipulationStartY=0,r.manipulationStartX1=0,r.manipulationStartY1=0,r.manipulationStartX2=0,r.manipulationStartY2=0,r.setupControlBox(),r}return r(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=l.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new w;return e.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var i=e.transform.baseVal.getItem(0);i.setTranslate(t,n),e.transform.baseVal.replaceItem(i,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(x),N=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new E("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorLine=l.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),l.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',t}(T),D=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=i,o.setCurrentFont=o.setCurrentFont.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/e.fonts.length-5+"%",i.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentFont(n,i)})),t.appendChild(i);var r=document.createElement("div");r.style.display="flex",r.style.minHeight="20px",r.style.flexGrow="2",r.style.fontFamily=n,r.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",r.appendChild(o),i.appendChild(r),e.fontBoxes.push(i)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(v),_=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.color="transparent",r.padding=5,r.DEFAULT_TEXT="请输入文本",r.text=r.DEFAULT_TEXT,r.isMoved=!1,r.color=i.defaultColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setColor=r.setColor.bind(r),r.setFont=r.setFont.bind(r),r.renderText=r.renderText.bind(r),r.sizeText=r.sizeText.bind(r),r.textEditDivClicked=r.textEditDivClicked.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.setSize=r.setSize.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.fontFamilyPanel=new D("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r}return r(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.bgRectangle=l.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=l.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=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(t){e.textElement.appendChild(l.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,i=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,i)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,i=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,i=this.height/2-t.height*e/2),{x:n,y:i}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=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(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),i={x:n.width*e,y:n.height*e};t.x-=i.x/2,t.y-=i.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&l.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&l.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',t}(k),j=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.color="transparent",r.lineWidth=3,r.drawing=!1,r.pixelRatio=1,r.color=i.defaultColor,r.lineWidth=i.defaultStrokeWidth,r.pixelRatio=i.freehandPixelRatio,r.setColor=r.setColor.bind(r),r.addCanvas=r.addCanvas.bind(r),r.finishCreation=r.finishCreation.bind(r),r.setLineWidth=r.setLineWidth.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.lineWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.lineWidthPanel.onWidthChanged=r.setLineWidth,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.drawingImage=l.createImage(),this.visual.appendChild(this.drawingImage);var e=l.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],i=t[1],r=t[2],o=t[3],a=!1,s=0;s<this.canvasElement.height;s++)for(var l=0;l<this.canvasElement.width;l++)e.data[s*this.canvasElement.width*4+4*l+3]>0&&(a=!0,s<i&&(i=s),l<n&&(n=l),s>o&&(o=s),l>r&&(r=l));if(a){this.left=n/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(r-n)/this.pixelRatio,this.height=(o-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=r-n,c.height=o-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,i,r-n,o-i),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',t}(k),B=function(e){function t(t,n,i){var r=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return r.typeBoxes=[],r.currentType=n,r.setCurrentType=r.setCurrentType.bind(r),r}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var r="both";switch(n){case 0:r="both";break;case 1:r="start";break;case 2:r="end";break;case 3:r="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=r===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(r,o)})),t.appendChild(o),"both"===r||"start"===r){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===r||"end"===r){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}i.typeBoxes.push(o)},i=this,r=0;r<4;r++)n(r);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(v),P=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.arrowType="end",r.arrowBaseHeight=10,r.arrowBaseWidth=10,r.getArrowPoints=r.getArrowPoints.bind(r),r.setArrowType=r.setArrowType.bind(r),r.arrowTypePanel=new B("Arrow type","end"),r.arrowTypePanel.onArrowTypeChanged=r.setArrowType,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+i/2)+" "+e+","+(t-i/2)+" "+(e+n/2)+","+(t+i/2)},t.prototype.createTips=function(){this.arrow1=l.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=l.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",l.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),l.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',t}(N),R=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor=i.defaultFillColor,r.strokeWidth=0,r.fillPanel=new y("Color",i.defaultColorSet,i.defaultFillColor),r.fillPanel.onColorChanged=r.setFillColor,r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',t}(S),I=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=i,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentOpacity(n,i)})),t.appendChild(i);var r=document.createElement("div");r.innerText=100*n+"%",i.appendChild(r),e.opacityBoxes.push(i)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(v),F=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.setOpacity=r.setOpacity.bind(r),r.fillColor=i.defaultHighlightColor,r.strokeWidth=0,r.opacity=i.defaultHighlightOpacity,r.fillPanel=new y("Color",i.defaultColorSet,r.fillColor),r.fillPanel.onColorChanged=r.setFillColor,r.opacityPanel=new I("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return r(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&l.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',t}(R),O='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Z='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',H=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.bgColor="transparent",r.tipPosition={x:0,y:0},r.tipBase1Position={x:0,y:0},r.tipBase2Position={x:0,y:0},r.tipMoving=!1,r.color=i.defaultStrokeColor,r.bgColor=i.defaultFillColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setBgColor=r.setBgColor.bind(r),r.getTipPoints=r.getTipPoints.bind(r),r.positionTip=r.positionTip.bind(r),r.setTipPoints=r.setTipPoints.bind(r),r.colorPanel=new y("Text color",i.defaultColorSet,r.color,O),r.colorPanel.onColorChanged=r.setColor,r.bgColorPanel=new y("Fill color",i.defaultColorSet,r.bgColor,Z),r.bgColorPanel.onColorChanged=r.setBgColor,r.fontFamilyPanel=new D("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.tipGrip=new w,r.tipGrip.visual.transform.baseVal.appendItem(l.createTransform()),r.controlBox.appendChild(r.tipGrip.visual),r}return r(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){l.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=l.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(l.setAttributes(this.bgRectangle,[["fill",e]]),l.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:0},this.tipBase2Position={x:t+n,y:0}):(this.tipBase1Position={x:0,y:t},this.tipBase2Position={x:0,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:0},this.tipBase2Position={x:this.width-t,y:0}):(this.tipBase1Position={x:this.width,y:t},this.tipBase2Position={x:this.width,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:this.height},this.tipBase2Position={x:this.width-t,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-t-n},this.tipBase2Position={x:this.width,y:this.height-t}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:this.height},this.tipBase2Position={x:t+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-t},this.tipBase2Position={x:0,y:this.height-t-n})},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.positionTip()},t.prototype.positionTip=function(){l.setAttributes(this.tip,[["points",this.getTipPoints()]]);var e=this.tipGrip.visual.transform.baseVal.getItem(0);e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(e,0)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.positionTip(),e.prototype.select.call(this)},t.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,e.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*n},this.positionTip()},t.typeName="CalloutMarker",t.title="Callout marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',t}(_),W=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.setOpacity=r.setOpacity.bind(r),r.createVisual=r.createVisual.bind(r),r.strokePanel=new y("Line color",s(i.defaultColorSet,["transparent"]),i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new y("Fill color",s(i.defaultColorSet,["transparent"]),r.fillColor,Z),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new E("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.opacityPanel=new I("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=l.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&l.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&l.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&l.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&l.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&l.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(k),z=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=l.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.tip1),this.tip2=l.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(l.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',t}(N),G=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokePanel.colors=i.defaultColorSet,r.fillColor="transparent",r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(W),V=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&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))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),U=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.curveX=0,r.curveY=0,r.manipulationStartCurveX=0,r.manipulationStartCurveY=0,r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.positionGrips=r.positionGrips.bind(r),r.addControlGrips=r.addControlGrips.bind(r),r.adjustVisual=r.adjustVisual.bind(r),r.setupControlBox=r.setupControlBox.bind(r),r.resize=r.resize.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new E("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorCurve=l.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),l.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=l.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=l.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',t}(T),q=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.textColor=i.defaultStrokeColor,r.fontFamily=i.defaultFontFamily,r.fontSize=i.defaultCaptionFontSize,r.captionText=i.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new y("Line color",s(i.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new y("Fill color",s(i.defaultColorSet,["transparent"]),r.fillColor,Z),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new A("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new E("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new D("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new y("Text color",i.defaultColorSet,r.textColor,O),r.textColorPanel.onColorChanged=r.setTextColor,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=l.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=l.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=l.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},t.prototype.setCaptionText=function(e){this.captionText=e,this.captionElement.textContent=this.captionText,this.sizeCaption()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.sizeCaption=function(){var e=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=e.width+2*this.PADDING,this.captionBoxHeight=e.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),l.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),l.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},t.prototype.showTextEditor=function(){var e=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.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(t){"Enter"===t.key&&e.finishTextEditing(e.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){e.finishTextEditing(e.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){e.finishTextEditing(e.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},t.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},t.prototype.finishTextEditing=function(e){this.setCaptionText(e.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},t.prototype.setFont=function(e){this.captionElement&&l.setAttributes(this.captionElement,[["font-family",e]]),this.fontFamily=e,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},t.prototype.setTextColor=function(e){this.captionElement&&l.setAttributes(this.captionElement,[["fill",e]]),this.textColor=e,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.frame&&l.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.captionBg&&l.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.frame&&l.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.frame&&l.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},e.prototype.getState.call(this));return t.typeName=this.typeName,t},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.textColor=n.textColor,this.fontFamily=n.fontFamily,this.captionText=n.captionText,this.fontSize=n.fontSize,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="CaptionFrameMarker",t.title="Caption frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',t}(k),K=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Y=function(e){function t(t,n,i){var r=e.call(this,t,!1)||this;return r.dataUrl=n,r.state=i,r}return r(t,e),t}(K),X=function(e){function t(t,n,i){void 0===i&&(i=!1);var r=e.call(this,t,i)||this;return r.marker=n,r}return r(t,e),t}(K),J=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Q=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new L,this._isOpen=!1,this.undoRedoManager=new V,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 J,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[M,j,P,_,G,W,F,H,z,R,N,U,q]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[M,j,P,_,W,F,H]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[M,j,P,_,F]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),c.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==d.styleSheetRoot&&(this.styles.styleSheetRoot=d.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new K(e))}))},e.prototype.render=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new u).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 t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var i=new K(t,!0);e(i),i.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new K(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._availableMarkerTypes).push.apply(e,t)},e.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},e.prototype.removeRenderEventListener=function(e){},e.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},e.prototype.removeCloseEventListener=function(e){},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,n)},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.resize=function(e,t){this._isResizing=!0;var n=e/this.imageWidth,i=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,i),this._isResizing=!1},e.prototype.scaleMarkers=function(e,t){var n,i=this;this._currentMarker&&this._currentMarker instanceof _?this._currentMarker.scale(e,t):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==i._currentMarker&&n.scale(e,t)})),void 0!==n&&this.setCurrentMarker(n)},e.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},e.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},e.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},e.prototype.addDefs=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.defs=l.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},e.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},e.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},e.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},e.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>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=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new m(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new g(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},e.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(e,e._currentMarker,!0);n(i),i.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new X(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(e,void 0,!0);n(i),i.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=i.markers[t];i.setCurrentMarker(i.markers[t]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(t){return t(new X(e,n))}))},i=this,r=this.markers.length-1;r>=0;r--)n(r);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(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=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),i<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(t){return t(new K(e))}))}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach((function(t){return t(new K(e))}))}},e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},e.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new K(e))})))},e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},e.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new K(e))})))},e.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},e.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},e.prototype.startRenderAndClose=function(){return o(this,void 0,void 0,(function(){var e,t,n=this;return a(this,(function(i){switch(i.label){case 0:return[4,this.render()];case 1:return e=i.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new Y(n,e,t))})),this.close(!0),[2]}}))}))},e.prototype.getState=function(e){!0===e&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(e){return t.markers.push(e.getState())})),t},e.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(e){var n=t._availableMarkerTypes.find((function(t){return t.typeName===e.typeName}));if(void 0!==n){var i=t.addNewMarker(n);i.restoreState(e),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(e){return e(new K(t))}))},e.prototype.addNewMarker=function(e){var t=l.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},e.prototype.createNewMarker=function(e){var t,n=this;(t="string"==typeof e?this._availableMarkerTypes.find((function(t){return t.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(e){return e(new X(n,n._currentMarker))})))},e.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof j&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(j):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(e){return e(new X(t,t._currentMarker))}))},e.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},e.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},e.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(n){return n(new X(t,e))}))},e.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(e){return e(new X(t,t._currentMarker))}))),this._currentMarker=e,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(e){return e(new X(t,t._currentMarker))})))},e.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==e.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},e.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),"select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t&&t!==this._currentMarker&&this.setCurrentMarker(t),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},e.prototype.onPointerMove=function(e){1!==this.touchPoints&&"touch"===e.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||e.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.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()},e.prototype.addLicenseKey=function(e){c.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.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(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new K(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new K(e))})))},e.instanceCounter=0,e}()},66042:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var i=n(33885),r=n(42978),o=n(43403),a=n(34280),s=n(59301),l=s.createContext(null),c=s.createContext({}),u=l,d=n(20068),h=n(54476),p=n(92310),f=n.n(p),m=n(77900),g=n(10228),v=n(26112),y=n(75931),x=n(8654),b=["prefixCls","className","containerRef"];var w=function(e){var t=e.prefixCls,n=e.className,i=e.containerRef,r=(0,y.Z)(e,b),o=s.useContext(c).panel,a=(0,x.x1)(o,i);return s.createElement("div",(0,h.Z)({className:f()("".concat(t,"-content"),n),role:"dialog",ref:a},(0,v.Z)(e,{aria:!0}),{"aria-modal":"true"},r))},C=n(48736);function k(e){return"string"==typeof e&&String(Number(e))===e?((0,C.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var S={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function A(e,t){var n,o,a,l=e.prefixCls,c=e.open,p=e.placement,y=e.inline,x=e.push,b=e.forceRender,C=e.autoFocus,A=e.keyboard,E=e.classNames,M=e.rootClassName,L=e.rootStyle,T=e.zIndex,N=e.className,D=e.id,_=e.style,j=e.motion,B=e.width,P=e.height,R=e.children,I=e.mask,F=e.maskClosable,O=e.maskMotion,Z=e.maskClassName,H=e.maskStyle,W=e.afterOpenChange,z=e.onClose,G=e.onMouseEnter,V=e.onMouseOver,U=e.onMouseLeave,q=e.onClick,K=e.onKeyDown,Y=e.onKeyUp,X=e.styles,J=e.drawerRender,Q=s.useRef(),$=s.useRef(),ee=s.useRef();s.useImperativeHandle(t,(function(){return Q.current}));s.useEffect((function(){var e;c&&C&&(null===(e=Q.current)||void 0===e||e.focus({preventScroll:!0}))}),[c]);var te=s.useState(!1),ne=(0,r.Z)(te,2),ie=ne[0],re=ne[1],oe=s.useContext(u),ae=null!==(n=null!==(o=null===(a="boolean"==typeof x?x?{}:{distance:0}:x||{})||void 0===a?void 0:a.distance)&&void 0!==o?o:null==oe?void 0:oe.pushDistance)&&void 0!==n?n:180,se=s.useMemo((function(){return{pushDistance:ae,push:function(){re(!0)},pull:function(){re(!1)}}}),[ae]);s.useEffect((function(){var e,t;c?null==oe||null===(e=oe.push)||void 0===e||e.call(oe):null==oe||null===(t=oe.pull)||void 0===t||t.call(oe)}),[c]),s.useEffect((function(){return function(){var e;null==oe||null===(e=oe.pull)||void 0===e||e.call(oe)}}),[]);var le=I&&s.createElement(m.default,(0,h.Z)({key:"mask"},O,{visible:c}),(function(e,t){var n=e.className,r=e.style;return s.createElement("div",{className:f()("".concat(l,"-mask"),n,null==E?void 0:E.mask,Z),style:(0,i.Z)((0,i.Z)((0,i.Z)({},r),H),null==X?void 0:X.mask),onClick:F&&c?z:void 0,ref:t})})),ce="function"==typeof j?j(p):j,ue={};if(ie&&ae)switch(p){case"top":ue.transform="translateY(".concat(ae,"px)");break;case"bottom":ue.transform="translateY(".concat(-ae,"px)");break;case"left":ue.transform="translateX(".concat(ae,"px)");break;default:ue.transform="translateX(".concat(-ae,"px)")}"left"===p||"right"===p?ue.width=k(B):ue.height=k(P);var de={onMouseEnter:G,onMouseOver:V,onMouseLeave:U,onClick:q,onKeyDown:K,onKeyUp:Y},he=s.createElement(m.default,(0,h.Z)({key:"panel"},ce,{visible:c,forceRender:b,onVisibleChanged:function(e){null==W||W(e)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),(function(t,n){var r=t.className,o=t.style,a=s.createElement(w,(0,h.Z)({id:D,containerRef:n,prefixCls:l,className:f()(N,null==E?void 0:E.content),style:(0,i.Z)((0,i.Z)({},_),null==X?void 0:X.content)},(0,v.Z)(e,{aria:!0}),de),R);return s.createElement("div",(0,h.Z)({className:f()("".concat(l,"-content-wrapper"),null==E?void 0:E.wrapper,r),style:(0,i.Z)((0,i.Z)((0,i.Z)({},ue),o),null==X?void 0:X.wrapper)},(0,v.Z)(e,{data:!0})),J?J(a):a)})),pe=(0,i.Z)({},L);return T&&(pe.zIndex=T),s.createElement(u.Provider,{value:se},s.createElement("div",{className:f()(l,"".concat(l,"-").concat(p),M,(0,d.Z)((0,d.Z)({},"".concat(l,"-open"),c),"".concat(l,"-inline"),y)),style:pe,tabIndex:-1,ref:Q,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case g.Z.TAB:var i;if(t===g.Z.TAB)if(n||document.activeElement!==ee.current){if(n&&document.activeElement===$.current){var r;null===(r=ee.current)||void 0===r||r.focus({preventScroll:!0})}}else null===(i=$.current)||void 0===i||i.focus({preventScroll:!0});break;case g.Z.ESC:z&&A&&(e.stopPropagation(),z(e))}}},le,s.createElement("div",{tabIndex:0,ref:$,style:S,"aria-hidden":"true","data-sentinel":"start"}),he,s.createElement("div",{tabIndex:0,ref:ee,style:S,"aria-hidden":"true","data-sentinel":"end"})))}var E=s.forwardRef(A);var M=function(e){var t=e.open,n=void 0!==t&&t,l=e.prefixCls,u=void 0===l?"rc-drawer":l,d=e.placement,h=void 0===d?"right":d,p=e.autoFocus,f=void 0===p||p,m=e.keyboard,g=void 0===m||m,v=e.width,y=void 0===v?378:v,x=e.mask,b=void 0===x||x,w=e.maskClosable,C=void 0===w||w,k=e.getContainer,S=e.forceRender,A=e.afterOpenChange,M=e.destroyOnClose,L=e.onMouseEnter,T=e.onMouseOver,N=e.onMouseLeave,D=e.onClick,_=e.onKeyDown,j=e.onKeyUp,B=e.panelRef,P=s.useState(!1),R=(0,r.Z)(P,2),I=R[0],F=R[1];var O=s.useState(!1),Z=(0,r.Z)(O,2),H=Z[0],W=Z[1];(0,a.Z)((function(){W(!0)}),[]);var z=!!H&&n,G=s.useRef(),V=s.useRef();(0,a.Z)((function(){z&&(V.current=document.activeElement)}),[z]);var U=s.useMemo((function(){return{panel:B}}),[B]);if(!S&&!I&&!z&&M)return null;var q={onMouseEnter:L,onMouseOver:T,onMouseLeave:N,onClick:D,onKeyDown:_,onKeyUp:j},K=(0,i.Z)((0,i.Z)({},e),{},{open:z,prefixCls:u,placement:h,autoFocus:f,keyboard:g,width:y,mask:b,maskClosable:C,inline:!1===k,afterOpenChange:function(e){var t,n;(F(e),null==A||A(e),e||!V.current||null!==(t=G.current)&&void 0!==t&&t.contains(V.current))||(null===(n=V.current)||void 0===n||n.focus({preventScroll:!0}))},ref:G},q);return s.createElement(c.Provider,{value:U},s.createElement(o.Z,{open:z||S||I,autoDestroy:!1,getContainer:k,autoLock:b&&(z||I)},s.createElement(E,K)))}},25930:function(e,t,n){"use strict";n.d(t,{Cd:function(){return S}});var i=n(54476),r=n(33885),o=n(75931),a=n(59301),s=n(92310),l=n.n(s),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},u=function(){var e=(0,a.useRef)([]),t=(0,a.useRef)(null);return(0,a.useEffect)((function(){var n=Date.now(),i=!1;e.current.forEach((function(e){if(e){i=!0;var r=e.style;r.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(r.transitionDuration="0s, 0s")}})),i&&(t.current=Date.now())})),e.current};var d=n(76190),h=n(42978),p=n(47273),f=0,m=(0,p.Z)();var g=function(e){var t=a.useState(),n=(0,h.Z)(t,2),i=n[0],r=n[1];return a.useEffect((function(){var e;r("rc_progress_".concat((m?(e=f,f+=1):e="TEST_OR_SSR",e)))}),[]),e||i},v=function(e){var t=e.bg,n=e.children;return a.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function y(e,t){return Object.keys(e).map((function(n){var i=parseFloat(n),r="".concat(Math.floor(i*t),"%");return"".concat(e[n]," ").concat(r)}))}var x=a.forwardRef((function(e,t){var n=e.prefixCls,i=e.color,r=e.gradientId,o=e.radius,s=e.style,l=e.ptg,c=e.strokeLinecap,u=e.strokeWidth,h=e.size,p=e.gapDegree,f=i&&"object"===(0,d.Z)(i),m=f?"#FFF":void 0,g=h/2,x=a.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:g,cy:g,stroke:m,strokeLinecap:c,strokeWidth:u,opacity:0===l?0:1,style:s,ref:t});if(!f)return x;var b="".concat(r,"-conic"),w=p?"".concat(180+p/2,"deg"):"0deg",C=y(i,(360-p)/360),k=y(i,1),S="conic-gradient(from ".concat(w,", ").concat(C.join(", "),")"),A="linear-gradient(to ".concat(p?"bottom":"top",", ").concat(k.join(", "),")");return a.createElement(a.Fragment,null,a.createElement("mask",{id:b},x),a.createElement("foreignObject",{x:0,y:0,width:h,height:h,mask:"url(#".concat(b,")")},a.createElement(v,{bg:A},a.createElement(v,{bg:S}))))})),b=100,w=function(e,t,n,i,r,o,a,s,l,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=n/100*360*((360-o)/360),h=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],p=(100-i)/100*t;"round"===l&&100!==i&&(p+=c/2)>=t&&(p=t-.01);var f=50;return{stroke:"string"==typeof s?s:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:p+u,transform:"rotate(".concat(r+d+h,"deg)"),transformOrigin:"".concat(f,"px ").concat(f,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function k(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var S=function(e){var t,n,s,h=(0,r.Z)((0,r.Z)({},c),e),p=h.id,f=h.prefixCls,m=h.steps,v=h.strokeWidth,y=h.trailWidth,S=h.gapDegree,A=void 0===S?0:S,E=h.gapPosition,M=h.trailColor,L=h.strokeLinecap,T=h.style,N=h.className,D=h.strokeColor,_=h.percent,j=(0,o.Z)(h,C),B=g(p),P="".concat(B,"-gradient"),R=50-v/2,I=2*Math.PI*R,F=A>0?90+A/2:-90,O=I*((360-A)/360),Z="object"===(0,d.Z)(m)?m:{count:m,gap:2},H=Z.count,W=Z.gap,z=k(_),G=k(D),V=G.find((function(e){return e&&"object"===(0,d.Z)(e)})),U=V&&"object"===(0,d.Z)(V)?"butt":L,q=w(I,O,0,100,F,A,E,M,U,v),K=u();return a.createElement("svg",(0,i.Z)({className:l()("".concat(f,"-circle"),N),viewBox:"0 0 ".concat(b," ").concat(b),style:T,id:p,role:"presentation"},j),!H&&a.createElement("circle",{className:"".concat(f,"-circle-trail"),r:R,cx:50,cy:50,stroke:M,strokeLinecap:U,strokeWidth:y||v,style:q}),H?(t=Math.round(H*(z[0]/100)),n=100/H,s=0,new Array(H).fill(null).map((function(e,i){var r=i<=t-1?G[0]:M,o=r&&"object"===(0,d.Z)(r)?"url(#".concat(P,")"):void 0,l=w(I,O,s,n,F,A,E,r,"butt",v,W);return s+=100*(O-l.strokeDashoffset+W)/O,a.createElement("circle",{key:i,className:"".concat(f,"-circle-path"),r:R,cx:50,cy:50,stroke:o,strokeWidth:v,opacity:1,style:l,ref:function(e){K[i]=e}})}))):function(){var e=0;return z.map((function(t,n){var i=G[n]||G[G.length-1],r=w(I,O,e,t,F,A,E,i,U,v);return e+=t,a.createElement(x,{key:n,color:i,ptg:t,radius:R,prefixCls:f,gradientId:P,style:r,strokeLinecap:U,strokeWidth:v,gapDegree:A,ref:function(e){K[n]=e},size:b})})).reverse()}())}},738:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var i=n(54476),r=n(20068),o=n(42978),a=n(75931),s=n(92310),l=n.n(s),c=n(18929),u=n(10228),d=n(26112),h=n(59301);function p(e,t){var n=e.disabled,i=e.prefixCls,r=e.character,o=e.characterRender,a=e.index,s=e.count,c=e.value,d=e.allowHalf,p=e.focused,f=e.onHover,m=e.onClick,g=a+1,v=new Set([i]);0===c&&0===a&&p?v.add("".concat(i,"-focused")):d&&c+.5>=g&&c<g?(v.add("".concat(i,"-half")),v.add("".concat(i,"-active")),p&&v.add("".concat(i,"-focused"))):(g<=c?v.add("".concat(i,"-full")):v.add("".concat(i,"-zero")),g===c&&p&&v.add("".concat(i,"-focused")));var y="function"==typeof r?r(e):r,x=h.createElement("li",{className:l()(Array.from(v)),ref:t},h.createElement("div",{onClick:n?null:function(e){m(e,a)},onKeyDown:n?null:function(e){e.keyCode===u.Z.ENTER&&m(e,a)},onMouseMove:n?null:function(e){f(e,a)},role:"radio","aria-checked":c>a?"true":"false","aria-posinset":a+1,"aria-setsize":s,tabIndex:n?-1:0},h.createElement("div",{className:"".concat(i,"-first")},y),h.createElement("div",{className:"".concat(i,"-second")},y)));return o&&(x=o(x,e)),x}var f=h.forwardRef(p);var m=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function g(e,t){var n,s=e.prefixCls,p=void 0===s?"rc-rate":s,g=e.className,v=e.defaultValue,y=e.value,x=e.count,b=void 0===x?5:x,w=e.allowHalf,C=void 0!==w&&w,k=e.allowClear,S=void 0===k||k,A=e.keyboard,E=void 0===A||A,M=e.character,L=void 0===M?"★":M,T=e.characterRender,N=e.disabled,D=e.direction,_=void 0===D?"ltr":D,j=e.tabIndex,B=void 0===j?0:j,P=e.autoFocus,R=e.onHoverChange,I=e.onChange,F=e.onFocus,O=e.onBlur,Z=e.onKeyDown,H=e.onMouseLeave,W=(0,a.Z)(e,m),z=(n=h.useRef({}),[function(e){return n.current[e]},function(e){return function(t){n.current[e]=t}}]),G=(0,o.Z)(z,2),V=G[0],U=G[1],q=h.useRef(null),K=function(){var e;N||(null===(e=q.current)||void 0===e||e.focus())};h.useImperativeHandle(t,(function(){return{focus:K,blur:function(){var e;N||(null===(e=q.current)||void 0===e||e.blur())}}}));var Y=(0,c.Z)(v||0,{value:y}),X=(0,o.Z)(Y,2),J=X[0],Q=X[1],$=(0,c.Z)(null),ee=(0,o.Z)($,2),te=ee[0],ne=ee[1],ie=function(e,t){var n,i,r,o,a="rtl"===_,s=e+1;if(C){var l=V(e),c=(i=function(e){var t,n,i=e.ownerDocument,r=i.body,o=i&&i.documentElement,a=e.getBoundingClientRect();return t=a.left,n=a.top,{left:t-=o.clientLeft||r.clientLeft||0,top:n-=o.clientTop||r.clientTop||0}}(n=l),r=n.ownerDocument,o=r.defaultView||r.parentWindow,i.left+=function(e){var t=e.pageXOffset,n="scrollLeft";if("number"!=typeof t){var i=e.document;"number"!=typeof(t=i.documentElement[n])&&(t=i.body[n])}return t}(o),i.left),u=l.clientWidth;(a&&t-c>u/2||!a&&t-c<u/2)&&(s-=.5)}return s},re=function(e){Q(e),null==I||I(e)},oe=h.useState(!1),ae=(0,o.Z)(oe,2),se=ae[0],le=ae[1],ce=h.useState(null),ue=(0,o.Z)(ce,2),de=ue[0],he=ue[1],pe=function(e,t){var n=ie(t,e.pageX);n!==te&&(he(n),ne(null)),null==R||R(n)},fe=function(e){N||(he(null),ne(null),null==R||R(void 0)),e&&(null==H||H(e))},me=function(e,t){var n=ie(t,e.pageX),i=!1;S&&(i=n===J),fe(),re(i?0:n),ne(i?n:null)};h.useEffect((function(){P&&!N&&K()}),[]);var ge=new Array(b).fill(0).map((function(e,t){return h.createElement(f,{ref:U(t),index:t,count:b,disabled:N,prefixCls:"".concat(p,"-star"),allowHalf:C,value:null===de?J:de,onClick:me,onHover:pe,key:e||t,character:L,characterRender:T,focused:se})})),ve=l()(p,g,(0,r.Z)((0,r.Z)({},"".concat(p,"-disabled"),N),"".concat(p,"-rtl"),"rtl"===_));return h.createElement("ul",(0,i.Z)({className:ve,onMouseLeave:fe,tabIndex:N?-1:B,onFocus:N?null:function(){le(!0),null==F||F()},onBlur:N?null:function(){le(!1),null==O||O()},onKeyDown:N?null:function(e){var t=e.keyCode,n="rtl"===_,i=C?.5:1;E&&(t===u.Z.RIGHT&&J<b&&!n?(re(J+i),e.preventDefault()):t===u.Z.LEFT&&J>0&&!n||t===u.Z.RIGHT&&J>0&&n?(re(J-i),e.preventDefault()):t===u.Z.LEFT&&J<b&&n&&(re(J+i),e.preventDefault())),null==Z||Z(e)},ref:q},(0,d.Z)(W,{aria:!0,data:!0,attr:!0})),ge)}var v=h.forwardRef(g)},6551:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var i=n(42978),r=n(59301),o=n(47273),a=0,s=(0,o.Z)();function l(e){var t=r.useState(),n=(0,i.Z)(t,2),o=n[0],l=n[1];return r.useEffect((function(){var e;l("rc_select_".concat((s?(e=a,a+=1):e="TEST_OR_SSR",e)))}),[]),e||o}},37463:function(e,t,n){"use strict";n.d(t,{Ac:function(){return ee},Xo:function(){return ne},Wx:function(){return re},ZP:function(){return Ae},lk:function(){return b}});var i=n(54476),r=n(94480),o=n(20068),a=n(33885),s=n(42978),l=n(75931),c=n(76190),u=n(18929),d=n(48736),h=n(59301),p=n(92310),f=n.n(p),m=n(34280),g=n(49658),v=n(8654),y=function(e){var t=e.className,n=e.customizeIcon,i=e.customizeIconProps,r=e.children,o=e.onMouseDown,a=e.onClick,s="function"==typeof n?n(i):n;return h.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==o||o(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==s?s:h.createElement("span",{className:f()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},r))},x=h.createContext(null);function b(){return h.useContext(x)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=h.useRef(null),n=h.useRef(null);function i(i){(i||null===t.current)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return h.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},i]}var C=n(10228);var k=n(26112),S=n(11780);var A=function(e,t,n){var i=(0,a.Z)((0,a.Z)({},e),n?t:{});return Object.keys(t).forEach((function(n){var r=t[n];"function"==typeof r&&(i[n]=function(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r.apply(void 0,o),null===(t=e[n])||void 0===t?void 0:t.call.apply(t,[e].concat(o))})})),i},E=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],M=function(e,t){var n=e.prefixCls,i=e.id,r=e.inputElement,o=e.autoFocus,s=e.autoComplete,c=e.editable,u=e.activeDescendantId,p=e.value,m=e.open,g=e.attrs,y=(0,l.Z)(e,E),x=r||h.createElement("input",null),b=x,w=b.ref,C=b.props;return(0,d.Kp)(!("maxLength"in x.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),x=h.cloneElement(x,(0,a.Z)((0,a.Z)((0,a.Z)({type:"search"},A(y,C,!0)),{},{id:i,ref:(0,v.sQ)(t,w),autoComplete:s||"off",autoFocus:o,className:f()("".concat(n,"-selection-search-input"),null==C?void 0:C.className),role:"combobox","aria-expanded":m||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":m?u:void 0},g),{},{value:c?p:"",readOnly:!c,unselectable:c?null:"on",style:(0,a.Z)((0,a.Z)({},C.style),{},{opacity:c?null:0})}))};var L=h.forwardRef(M);function T(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var N="undefined"!=typeof window&&window.document&&window.document.documentElement;function D(e){return["string","number"].includes((0,c.Z)(e))}function _(e){var t=void 0;return e&&(D(e.title)?t=e.title.toString():D(e.label)&&(t=e.label.toString())),t}function j(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var B=function(e){e.preventDefault(),e.stopPropagation()},P=function(e){var t,n,i=e.id,r=e.prefixCls,a=e.values,l=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,p=e.placeholder,m=e.disabled,g=e.mode,v=e.showSearch,x=e.autoFocus,b=e.autoComplete,w=e.activeDescendantId,C=e.tabIndex,A=e.removeIcon,E=e.maxTagCount,M=e.maxTagTextLength,T=e.maxTagPlaceholder,D=void 0===T?function(e){return"+ ".concat(e.length," ...")}:T,P=e.tagRender,R=e.onToggleOpen,I=e.onRemove,F=e.onInputChange,O=e.onInputPaste,Z=e.onInputKeyDown,H=e.onInputMouseDown,W=e.onInputCompositionStart,z=e.onInputCompositionEnd,G=e.onInputBlur,V=h.useRef(null),U=(0,h.useState)(0),q=(0,s.Z)(U,2),K=q[0],Y=q[1],X=(0,h.useState)(!1),J=(0,s.Z)(X,2),Q=J[0],$=J[1],ee="".concat(r,"-selection"),te=l||"multiple"===g&&!1===u||"tags"===g?c:"",ne="tags"===g||"multiple"===g&&!1===u||v&&(l||Q);t=function(){Y(V.current.scrollWidth)},n=[te],N?h.useLayoutEffect(t,n):h.useEffect(t,n);var ie=function(e,t,n,i,r){return h.createElement("span",{title:_(e),className:f()("".concat(ee,"-item"),(0,o.Z)({},"".concat(ee,"-item-disabled"),n))},h.createElement("span",{className:"".concat(ee,"-item-content")},t),i&&h.createElement(y,{className:"".concat(ee,"-item-remove"),onMouseDown:B,onClick:r,customizeIcon:A},"×"))},re=function(e,t,n,i,r,o){return h.createElement("span",{onMouseDown:function(e){B(e),R(!l)}},P({label:t,value:e,disabled:n,closable:i,onClose:r,isMaxTag:!!o}))},oe=h.createElement("div",{className:"".concat(ee,"-search"),style:{width:K},onFocus:function(){$(!0)},onBlur:function(){$(!1)}},h.createElement(L,{ref:d,open:l,prefixCls:r,id:i,inputElement:null,disabled:m,autoFocus:x,autoComplete:b,editable:ne,activeDescendantId:w,value:te,onKeyDown:Z,onMouseDown:H,onChange:F,onPaste:O,onCompositionStart:W,onCompositionEnd:z,onBlur:G,tabIndex:C,attrs:(0,k.Z)(e,!0)}),h.createElement("span",{ref:V,className:"".concat(ee,"-search-mirror"),"aria-hidden":!0},te," ")),ae=h.createElement(S.Z,{prefixCls:"".concat(ee,"-overflow"),data:a,renderItem:function(e){var t=e.disabled,n=e.label,i=e.value,r=!m&&!t,o=n;if("number"==typeof M&&("string"==typeof n||"number"==typeof n)){var a=String(o);a.length>M&&(o="".concat(a.slice(0,M),"..."))}var s=function(t){t&&t.stopPropagation(),I(e)};return"function"==typeof P?re(i,o,t,r,s):ie(e,o,t,r,s)},renderRest:function(e){if(!a.length)return null;var t="function"==typeof D?D(e):D;return"function"==typeof P?re(void 0,t,!1,!1,void 0,!0):ie({title:t},t,!1)},suffix:oe,itemKey:j,maxCount:E});return h.createElement("span",{className:"".concat(ee,"-wrap")},ae,!a.length&&!te&&h.createElement("span",{className:"".concat(ee,"-placeholder")},p))},R=function(e){var t=e.inputElement,n=e.prefixCls,i=e.id,r=e.inputRef,o=e.disabled,a=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,p=e.values,f=e.placeholder,m=e.tabIndex,g=e.showSearch,v=e.searchValue,y=e.activeValue,x=e.maxLength,b=e.onInputKeyDown,w=e.onInputMouseDown,C=e.onInputChange,S=e.onInputPaste,A=e.onInputCompositionStart,E=e.onInputCompositionEnd,M=e.onInputBlur,T=e.title,N=h.useState(!1),D=(0,s.Z)(N,2),j=D[0],B=D[1],P="combobox"===u,R=P||g,I=p[0],F=v||"";P&&y&&!j&&(F=y),h.useEffect((function(){P&&B(!1)}),[P,y]);var O=!("combobox"!==u&&!d&&!g)&&!!F,Z=void 0===T?_(I):T,H=h.useMemo((function(){return I?null:h.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:O?{visibility:"hidden"}:void 0},f)}),[I,O,f,n]);return h.createElement("span",{className:"".concat(n,"-selection-wrap")},h.createElement("span",{className:"".concat(n,"-selection-search")},h.createElement(L,{ref:r,prefixCls:n,id:i,open:d,inputElement:t,disabled:o,autoFocus:a,autoComplete:l,editable:R,activeDescendantId:c,value:F,onKeyDown:b,onMouseDown:w,onChange:function(e){B(!0),C(e)},onPaste:S,onCompositionStart:A,onCompositionEnd:E,onBlur:M,tabIndex:m,attrs:(0,k.Z)(e,!0),maxLength:P?x:void 0})),!P&&I?h.createElement("span",{className:"".concat(n,"-selection-item"),title:Z,style:O?{visibility:"hidden"}:void 0},I.label):null,H)},I=function(e,t){var n=(0,h.useRef)(null),r=(0,h.useRef)(!1),o=e.prefixCls,a=e.open,l=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.disabled,p=e.prefix,f=e.autoClearSearchValue,m=e.onSearch,g=e.onSearchSubmit,v=e.onToggleOpen,y=e.onInputKeyDown,x=e.onInputBlur,b=e.domRef;h.useImperativeHandle(t,(function(){return{focus:function(e){n.current.focus(e)},blur:function(){n.current.blur()}}}));var k=w(0),S=(0,s.Z)(k,2),A=S[0],E=S[1],M=(0,h.useRef)(null),L=function(e){!1!==m(e,!0,r.current)&&v(!0)},T={inputRef:n,onInputKeyDown:function(e){var t,i=e.which,o=n.current instanceof HTMLTextAreaElement;(o||!a||i!==C.Z.UP&&i!==C.Z.DOWN||e.preventDefault(),y&&y(e),i!==C.Z.ENTER||"tags"!==l||r.current||a||null==g||g(e.target.value),o&&!a&&~[C.Z.UP,C.Z.DOWN,C.Z.LEFT,C.Z.RIGHT].indexOf(i))||(t=i)&&![C.Z.ESC,C.Z.SHIFT,C.Z.BACKSPACE,C.Z.TAB,C.Z.WIN_KEY,C.Z.ALT,C.Z.META,C.Z.WIN_KEY_RIGHT,C.Z.CTRL,C.Z.SEMICOLON,C.Z.EQUALS,C.Z.CAPS_LOCK,C.Z.CONTEXT_MENU,C.Z.F1,C.Z.F2,C.Z.F3,C.Z.F4,C.Z.F5,C.Z.F6,C.Z.F7,C.Z.F8,C.Z.F9,C.Z.F10,C.Z.F11,C.Z.F12].includes(t)&&v(!0)},onInputMouseDown:function(){E(!0)},onInputChange:function(e){var t=e.target.value;if(u&&M.current&&/[\r\n]/.test(M.current)){var n=M.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,M.current)}M.current=null,L(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");M.current=n||""},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==l&&L(e.target.value)},onInputBlur:x},N="multiple"===l||"tags"===l?h.createElement(P,(0,i.Z)({},e,T)):h.createElement(R,(0,i.Z)({},e,T));return h.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=A();e.target===n.current||t||"combobox"===l&&d||e.preventDefault(),("combobox"===l||c&&t)&&a||(a&&!1!==f&&m("",!0,!1),v())}},p&&h.createElement("div",{className:"".concat(o,"-prefix")},p),N)};var F=h.forwardRef(I),O=n(65030),Z=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],H=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),s=e.children,c=e.popupElement,u=e.animation,d=e.transitionName,p=e.dropdownStyle,m=e.dropdownClassName,g=e.direction,v=void 0===g?"ltr":g,y=e.placement,x=e.builtinPlacements,b=e.dropdownMatchSelectWidth,w=e.dropdownRender,C=e.dropdownAlign,k=e.getPopupContainer,S=e.empty,A=e.getTriggerDOMNode,E=e.onPopupVisibleChange,M=e.onPopupMouseEnter,L=(0,l.Z)(e,Z),T="".concat(n,"-dropdown"),N=c;w&&(N=w(c));var D=h.useMemo((function(){return x||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(b)}),[x,b]),_=u?"".concat(T,"-").concat(u):d,j="number"==typeof b,B=h.useMemo((function(){return j?null:!1===b?"minWidth":"width"}),[b,j]),P=p;j&&(P=(0,a.Z)((0,a.Z)({},P),{},{width:b}));var R=h.useRef(null);return h.useImperativeHandle(t,(function(){return{getPopupElement:function(){var e;return null===(e=R.current)||void 0===e?void 0:e.popupElement}}})),h.createElement(O.Z,(0,i.Z)({},L,{showAction:E?["click"]:[],hideAction:E?["click"]:[],popupPlacement:y||("rtl"===v?"bottomRight":"bottomLeft"),builtinPlacements:D,prefixCls:T,popupTransitionName:_,popup:h.createElement("div",{onMouseEnter:M},N),ref:R,stretch:B,popupAlign:C,popupVisible:r,getPopupContainer:k,popupClassName:f()(m,(0,o.Z)({},"".concat(T,"-empty"),S)),popupStyle:P,getTriggerDOMNode:A,onPopupVisibleChange:E}),s)};var W=h.forwardRef(H),z=n(66712);function G(e,t){var n,i=e.key;return"value"in e&&(n=e.value),null!=i?i:void 0!==n?n:"rc-index-key-".concat(t)}function V(e){return void 0!==e&&!Number.isNaN(e)}function U(e,t){var n=e||{},i=n.label||(t?"children":"label");return{label:i,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||i}}function q(e){var t=(0,a.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,d.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var K=h.createContext(null);function Y(e){var t=e.visible,n=e.values;if(!t)return null;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,50).map((function(e){var t=e.label,n=e.value;return["number","string"].includes((0,c.Z)(t))?t:n})).join(", ")),n.length>50?", ...":null)}var X=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],J=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Q=function(e){return"tags"===e||"multiple"===e},$=h.forwardRef((function(e,t){var n,d=e.id,p=e.prefixCls,b=e.className,C=e.showSearch,k=e.tagRender,S=e.direction,A=e.omitDomProps,E=e.displayValues,M=e.onDisplayValuesChange,L=e.emptyOptions,T=e.notFoundContent,N=void 0===T?"Not Found":T,D=e.onClear,_=e.mode,j=e.disabled,B=e.loading,P=e.getInputElement,R=e.getRawInputElement,I=e.open,O=e.defaultOpen,Z=e.onDropdownVisibleChange,H=e.activeValue,G=e.onActiveValueChange,U=e.activeDescendantId,q=e.searchValue,$=e.autoClearSearchValue,ee=e.onSearch,te=e.onSearchSplit,ne=e.tokenSeparators,ie=e.allowClear,re=e.prefix,oe=e.suffixIcon,ae=e.clearIcon,se=e.OptionList,le=e.animation,ce=e.transitionName,ue=e.dropdownStyle,de=e.dropdownClassName,he=e.dropdownMatchSelectWidth,pe=e.dropdownRender,fe=e.dropdownAlign,me=e.placement,ge=e.builtinPlacements,ve=e.getPopupContainer,ye=e.showAction,xe=void 0===ye?[]:ye,be=e.onFocus,we=e.onBlur,Ce=e.onKeyUp,ke=e.onKeyDown,Se=e.onMouseDown,Ae=(0,l.Z)(e,X),Ee=Q(_),Me=(void 0!==C?C:Ee)||"combobox"===_,Le=(0,a.Z)({},Ae);J.forEach((function(e){delete Le[e]})),null==A||A.forEach((function(e){delete Le[e]}));var Te=h.useState(!1),Ne=(0,s.Z)(Te,2),De=Ne[0],_e=Ne[1];h.useEffect((function(){_e((0,g.Z)())}),[]);var je=h.useRef(null),Be=h.useRef(null),Pe=h.useRef(null),Re=h.useRef(null),Ie=h.useRef(null),Fe=h.useRef(!1),Oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=h.useState(!1),n=(0,s.Z)(t,2),i=n[0],r=n[1],o=h.useRef(null),a=function(){window.clearTimeout(o.current)};return h.useEffect((function(){return a}),[]),[i,function(t,n){a(),o.current=window.setTimeout((function(){r(t),n&&n()}),e)},a]}(),Ze=(0,s.Z)(Oe,3),He=Ze[0],We=Ze[1],ze=Ze[2];h.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=Re.current)||void 0===e?void 0:e.focus,blur:null===(t=Re.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=Ie.current)||void 0===t?void 0:t.scrollTo(e)},nativeElement:je.current||Be.current}}));var Ge=h.useMemo((function(){var e;if("combobox"!==_)return q;var t=null===(e=E[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""}),[q,_,E]),Ve="combobox"===_&&"function"==typeof P&&P()||null,Ue="function"==typeof R&&R(),qe=(0,v.x1)(Be,null==Ue||null===(n=Ue.props)||void 0===n?void 0:n.ref),Ke=h.useState(!1),Ye=(0,s.Z)(Ke,2),Xe=Ye[0],Je=Ye[1];(0,m.Z)((function(){Je(!0)}),[]);var Qe=(0,u.Z)(!1,{defaultValue:O,value:I}),$e=(0,s.Z)(Qe,2),et=$e[0],tt=$e[1],nt=!!Xe&&et,it=!N&&L;(j||it&&nt&&"combobox"===_)&&(nt=!1);var rt=!it&&nt,ot=h.useCallback((function(e){var t=void 0!==e?e:!nt;j||(tt(t),nt!==t&&(null==Z||Z(t)))}),[j,nt,tt,Z]),at=h.useMemo((function(){return(ne||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ne]),st=h.useContext(K)||{},lt=st.maxCount,ct=st.rawValues,ut=function(e,t,n){if(!(Ee&&V(lt)&&(null==ct?void 0:ct.size)>=lt)){var i=!0,o=e;null==G||G(null);var a=function(e,t,n){if(!t||!t.length)return null;var i=!1,o=function e(t,n){var o=(0,z.Z)(n),a=o[0],s=o.slice(1);if(!a)return[t];var l=t.split(a);return i=i||l.length>1,l.reduce((function(t,n){return[].concat((0,r.Z)(t),(0,r.Z)(e(n,s)))}),[]).filter(Boolean)}(e,t);return i?void 0!==n?o.slice(0,n):o:null}(e,ne,V(lt)?lt-ct.size:void 0),s=n?null:a;return"combobox"!==_&&s&&(o="",null==te||te(s),ot(!1),i=!1),ee&&Ge!==o&&ee(o,{source:t?"typing":"effect"}),i}};h.useEffect((function(){nt||Ee||"combobox"===_||ut("",!1,!1)}),[nt]),h.useEffect((function(){et&&j&&tt(!1),j&&!Fe.current&&We(!1)}),[j]);var dt=w(),ht=(0,s.Z)(dt,2),pt=ht[0],ft=ht[1],mt=h.useRef(!1),gt=h.useRef(!1),vt=[];h.useEffect((function(){return function(){vt.forEach((function(e){return clearTimeout(e)})),vt.splice(0,vt.length)}}),[]);var yt,xt=h.useState({}),bt=(0,s.Z)(xt,2)[1];Ue&&(yt=function(e){ot(e)}),function(e,t,n,i){var r=h.useRef(null);r.current={open:t,triggerOpen:n,customizedTrigger:i},h.useEffect((function(){function t(t){var n;if(null===(n=r.current)||void 0===n||!n.customizedTrigger){var i=t.target;i.shadowRoot&&t.composed&&(i=t.composedPath()[0]||i),r.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(i)&&e!==i}))&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[je.current,null===(e=Pe.current)||void 0===e?void 0:e.getPopupElement()]}),rt,ot,!!Ue);var wt,Ct=h.useMemo((function(){return(0,a.Z)((0,a.Z)({},e),{},{notFoundContent:N,open:nt,triggerOpen:rt,id:d,showSearch:Me,multiple:Ee,toggleOpen:ot})}),[e,N,rt,nt,d,Me,Ee,ot]),kt=!!oe||B;kt&&(wt=h.createElement(y,{className:f()("".concat(p,"-arrow"),(0,o.Z)({},"".concat(p,"-arrow-loading"),B)),customizeIcon:oe,customizeIconProps:{loading:B,searchValue:Ge,open:nt,focused:He,showSearch:Me}}));var St,At=function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=h.useMemo((function(){return"object"===(0,c.Z)(i)?i.clearIcon:r||void 0}),[i,r]),u=h.useMemo((function(){return!(o||!i||!n.length&&!a||"combobox"===s&&""===a)}),[i,o,n.length,a,s]);return{allowClear:u,clearIcon:h.createElement(y,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:l},"×")}}(p,(function(){var e;null==D||D(),null===(e=Re.current)||void 0===e||e.focus(),M([],{type:"clear",values:E}),ut("",!1,!1)}),E,ie,ae,j,Ge,_),Et=At.allowClear,Mt=At.clearIcon,Lt=h.createElement(se,{ref:Ie}),Tt=f()(p,b,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(p,"-focused"),He),"".concat(p,"-multiple"),Ee),"".concat(p,"-single"),!Ee),"".concat(p,"-allow-clear"),ie),"".concat(p,"-show-arrow"),kt),"".concat(p,"-disabled"),j),"".concat(p,"-loading"),B),"".concat(p,"-open"),nt),"".concat(p,"-customize-input"),Ve),"".concat(p,"-show-search"),Me)),Nt=h.createElement(W,{ref:Pe,disabled:j,prefixCls:p,visible:rt,popupElement:Lt,animation:le,transitionName:ce,dropdownStyle:ue,dropdownClassName:de,direction:S,dropdownMatchSelectWidth:he,dropdownRender:pe,dropdownAlign:fe,placement:me,builtinPlacements:ge,getPopupContainer:ve,empty:L,getTriggerDOMNode:function(e){return Be.current||e},onPopupVisibleChange:yt,onPopupMouseEnter:function(){bt({})}},Ue?h.cloneElement(Ue,{ref:qe}):h.createElement(F,(0,i.Z)({},e,{domRef:Be,prefixCls:p,inputElement:Ve,ref:Re,id:d,prefix:re,showSearch:Me,autoClearSearchValue:$,mode:_,activeDescendantId:U,tagRender:k,values:E,open:nt,onToggleOpen:ot,activeValue:H,searchValue:Ge,onSearch:ut,onSearchSubmit:function(e){e&&e.trim()&&ee(e,{source:"submit"})},onRemove:function(e){var t=E.filter((function(t){return t!==e}));M(t,{type:"remove",values:[e]})},tokenWithEnter:at,onInputBlur:function(){mt.current=!1}})));return St=Ue?Nt:h.createElement("div",(0,i.Z)({className:Tt},Le,{ref:je,onMouseDown:function(e){var t,n=e.target,i=null===(t=Pe.current)||void 0===t?void 0:t.getPopupElement();if(i&&i.contains(n)){var r=setTimeout((function(){var e,t=vt.indexOf(r);-1!==t&&vt.splice(t,1),ze(),De||i.contains(document.activeElement)||null===(e=Re.current)||void 0===e||e.focus()}));vt.push(r)}for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];null==Se||Se.apply(void 0,[e].concat(a))},onKeyDown:function(e){var t,n=pt(),i=e.key,o="Enter"===i;if(o&&("combobox"!==_&&e.preventDefault(),nt||ot(!0)),ft(!!Ge),"Backspace"===i&&!n&&Ee&&!Ge&&E.length){for(var a=(0,r.Z)(E),s=null,l=a.length-1;l>=0;l-=1){var c=a[l];if(!c.disabled){a.splice(l,1),s=c;break}}s&&M(a,{type:"remove",values:[s]})}for(var u=arguments.length,d=new Array(u>1?u-1:0),h=1;h<u;h++)d[h-1]=arguments[h];!nt||o&&mt.current||(o&&(mt.current=!0),null===(t=Ie.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(d))),null==ke||ke.apply(void 0,[e].concat(d))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r;nt&&(null===(r=Ie.current)||void 0===r||r.onKeyUp.apply(r,[e].concat(n))),"Enter"===e.key&&(mt.current=!1),null==Ce||Ce.apply(void 0,[e].concat(n))},onFocus:function(){We(!0),j||(be&&!gt.current&&be.apply(void 0,arguments),xe.includes("focus")&&ot(!0)),gt.current=!0},onBlur:function(){Fe.current=!0,We(!1,(function(){gt.current=!1,Fe.current=!1,ot(!1)})),j||(Ge&&("tags"===_?ee(Ge,{source:"submit"}):"multiple"===_&&ee("",{source:"blur"})),we&&we.apply(void 0,arguments))}}),h.createElement(Y,{visible:He&&!nt,values:E}),Nt,wt,Et&&Mt),h.createElement(x.Provider,{value:Ct},St)}));var ee=$,te=function(){return null};te.isSelectOptGroup=!0;var ne=te,ie=function(){return null};ie.isSelectOption=!0;var re=ie,oe=n(80547),ae=n(2738),se=n(48911);var le=["disabled","title","children","style","className"];function ce(e){return"string"==typeof e||"number"==typeof e}var ue=function(e,t){var n=b(),a=n.prefixCls,c=n.id,u=n.open,d=n.multiple,p=n.mode,m=n.searchValue,g=n.toggleOpen,v=n.notFoundContent,x=n.onPopupScroll,w=h.useContext(K),S=w.maxCount,A=w.flattenOptions,E=w.onActiveValue,M=w.defaultActiveFirstOption,L=w.onSelect,T=w.menuItemSelectedIcon,N=w.rawValues,D=w.fieldNames,_=w.virtual,j=w.direction,B=w.listHeight,P=w.listItemHeight,R=w.optionRender,I="".concat(a,"-item"),F=(0,oe.Z)((function(){return A}),[u,A],(function(e,t){return t[0]&&e[1]!==t[1]})),O=h.useRef(null),Z=h.useMemo((function(){return d&&V(S)&&(null==N?void 0:N.size)>=S}),[d,S,null==N?void 0:N.size]),H=function(e){e.preventDefault()},W=function(e){var t;null===(t=O.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},z=h.useCallback((function(e){return"combobox"!==p&&N.has(e)}),[p,(0,r.Z)(N).toString(),N.size]),G=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=F.length,i=0;i<n;i+=1){var r=(e+i*t+n)%n,o=F[r]||{},a=o.group,s=o.data;if(!a&&(null==s||!s.disabled)&&(z(s.value)||!Z))return r}return-1},U=h.useState((function(){return G(0)})),q=(0,s.Z)(U,2),Y=q[0],X=q[1],J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];X(e);var n={source:t?"keyboard":"mouse"},i=F[e];i?E(i.value,e,n):E(null,-1,n)};(0,h.useEffect)((function(){J(!1!==M?G(0):-1)}),[F.length,m]);var Q=h.useCallback((function(e){return"combobox"===p?String(e).toLowerCase()===m.toLowerCase():N.has(e)}),[p,m,(0,r.Z)(N).toString(),N.size]);(0,h.useEffect)((function(){var e,t=setTimeout((function(){if(!d&&u&&1===N.size){var e=Array.from(N)[0],t=F.findIndex((function(t){var n=t.data;return m?String(n.value).startsWith(m):n.value===e}));-1!==t&&(J(t),W(t))}}));u&&(null===(e=O.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[u,m]);var $=function(e){void 0!==e&&L(e,{selected:!N.has(e)}),d||g(!1)};if(h.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case C.Z.N:case C.Z.P:case C.Z.UP:case C.Z.DOWN:var i=0;if(t===C.Z.UP?i=-1:t===C.Z.DOWN?i=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===C.Z.N?i=1:t===C.Z.P&&(i=-1)),0!==i){var r=G(Y+i,i);W(r),J(r,!0)}break;case C.Z.TAB:case C.Z.ENTER:var o,a=F[Y];!a||null!=a&&null!==(o=a.data)&&void 0!==o&&o.disabled||Z?$(void 0):$(a.value),u&&e.preventDefault();break;case C.Z.ESC:g(!1),u&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){W(e)}}})),0===F.length)return h.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(I,"-empty"),onMouseDown:H},v);var ee=Object.keys(D).map((function(e){return D[e]})),te=function(e){return e.label};function ne(e,t){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(t)}}var ie=function(e){var t=F[e];if(!t)return null;var n=t.data||{},r=n.value,o=t.group,a=(0,k.Z)(n,!0),s=te(t);return t?h.createElement("div",(0,i.Z)({"aria-label":"string"!=typeof s||o?null:s},a,{key:e},ne(t,e),{"aria-selected":Q(r)}),r):null},re={role:"listbox",id:"".concat(c,"_list")};return h.createElement(h.Fragment,null,_&&h.createElement("div",(0,i.Z)({},re,{style:{height:0,width:0,overflow:"hidden"}}),ie(Y-1),ie(Y),ie(Y+1)),h.createElement(se.Z,{itemKey:"key",ref:O,data:F,height:B,itemHeight:P,fullHeight:!1,onMouseDown:H,onScroll:x,virtual:_,direction:j,innerProps:_?null:re},(function(e,t){var n=e.group,r=e.groupOption,a=e.data,s=e.label,c=e.value,u=a.key;if(n){var d,p=null!==(d=a.title)&&void 0!==d?d:ce(s)?s.toString():void 0;return h.createElement("div",{className:f()(I,"".concat(I,"-group"),a.className),title:p},void 0!==s?s:u)}var m=a.disabled,g=a.title,v=(a.children,a.style),x=a.className,b=(0,l.Z)(a,le),w=(0,ae.Z)(b,ee),C=z(c),S=m||!C&&Z,A="".concat(I,"-option"),E=f()(I,A,x,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(A,"-grouped"),r),"".concat(A,"-active"),Y===t&&!S),"".concat(A,"-disabled"),S),"".concat(A,"-selected"),C)),M=te(e),L=!T||"function"==typeof T||C,N="number"==typeof M?M:M||c,D=ce(N)?N.toString():void 0;return void 0!==g&&(D=g),h.createElement("div",(0,i.Z)({},(0,k.Z)(w),_?{}:ne(e,t),{"aria-selected":Q(c),className:E,title:D,onMouseMove:function(){Y===t||S||J(t)},onClick:function(){S||$(c)},style:v}),h.createElement("div",{className:"".concat(A,"-content")},"function"==typeof R?R(e,{index:t}):N),h.isValidElement(T)||C,L&&h.createElement(y,{className:"".concat(I,"-option-state"),customizeIcon:T,customizeIconProps:{value:c,disabled:S,isSelected:C}},C?"✓":null))})))};var de=h.forwardRef(ue);function he(e,t){return T(e).join("").toUpperCase().includes(t)}var pe=n(6551),fe=n(11592),me=["children","value"],ge=["children"];function ve(e){var t=e,n=t.key,i=t.props,r=i.children,o=i.value,s=(0,l.Z)(i,me);return(0,a.Z)({key:n,value:void 0!==o?o:n,children:r},s)}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,fe.Z)(e).map((function(e,n){if(!h.isValidElement(e)||!e.type)return null;var i=e,r=i.type.isSelectOptGroup,o=i.key,s=i.props,c=s.children,u=(0,l.Z)(s,ge);return t||!r?ve(e):(0,a.Z)((0,a.Z)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:ye(c)})})).filter((function(e){return e}))}var xe=function(e,t,n,i,r){return h.useMemo((function(){var o=e;!e&&(o=ye(t));var a=new Map,s=new Map,l=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(t){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<t.length;c+=1){var u=t[c];!u[n.options]||o?(a.set(u[n.value],u),l(s,u,n.label),l(s,u,i),l(s,u,r)):e(u[n.options],!0)}}(o),{options:o,valueOptions:a,labelOptions:s}}),[e,t,n,i,r])};function be(e){var t=h.useRef();t.current=e;var n=h.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var we=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Ce=["inputValue"];var ke=h.forwardRef((function(e,t){var n=e.id,d=e.mode,p=e.prefixCls,f=void 0===p?"rc-select":p,m=e.backfill,g=e.fieldNames,v=e.inputValue,y=e.searchValue,x=e.onSearch,b=e.autoClearSearchValue,w=void 0===b||b,C=e.onSelect,k=e.onDeselect,S=e.dropdownMatchSelectWidth,A=void 0===S||S,E=e.filterOption,M=e.filterSort,L=e.optionFilterProp,N=e.optionLabelProp,D=e.options,_=e.optionRender,j=e.children,B=e.defaultActiveFirstOption,P=e.menuItemSelectedIcon,R=e.virtual,I=e.direction,F=e.listHeight,O=void 0===F?200:F,Z=e.listItemHeight,H=void 0===Z?20:Z,W=e.labelRender,z=e.value,V=e.defaultValue,Y=e.labelInValue,X=e.onChange,J=e.maxCount,$=(0,l.Z)(e,we),te=(0,pe.ZP)(n),ne=Q(d),ie=!(D||!j),re=h.useMemo((function(){return(void 0!==E||"combobox"!==d)&&E}),[E,d]),oe=h.useMemo((function(){return U(g,ie)}),[JSON.stringify(g),ie]),ae=(0,u.Z)("",{value:void 0!==y?y:v,postState:function(e){return e||""}}),se=(0,s.Z)(ae,2),le=se[0],ce=se[1],ue=xe(D,j,oe,L,N),fe=ue.valueOptions,me=ue.labelOptions,ge=ue.options,ve=h.useCallback((function(e){return T(e).map((function(e){var t,n,i,r,o,a;(function(e){return!e||"object"!==(0,c.Z)(e)})(e)?t=e:(i=e.key,n=e.label,t=null!==(a=e.value)&&void 0!==a?a:i);var s,l=fe.get(t);l&&(void 0===n&&(n=null==l?void 0:l[N||oe.label]),void 0===i&&(i=null!==(s=null==l?void 0:l.key)&&void 0!==s?s:t),r=null==l?void 0:l.disabled,o=null==l?void 0:l.title);return{label:n,value:t,key:i,disabled:r,title:o}}))}),[oe,N,fe]),ye=(0,u.Z)(V,{value:z}),ke=(0,s.Z)(ye,2),Se=ke[0],Ae=ke[1],Ee=h.useMemo((function(){var e,t=ve(ne&&null===Se?[]:Se);return"combobox"===d&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[Se,ve,d,ne]),Me=function(e,t){var n=h.useRef({values:new Map,options:new Map});return[h.useMemo((function(){var i=n.current,r=i.values,o=i.options,s=e.map((function(e){var t;return void 0===e.label?(0,a.Z)((0,a.Z)({},e),{},{label:null===(t=r.get(e.value))||void 0===t?void 0:t.label}):e})),l=new Map,c=new Map;return s.forEach((function(e){l.set(e.value,e),c.set(e.value,t.get(e.value)||o.get(e.value))})),n.current.values=l,n.current.options=c,s}),[e,t]),h.useCallback((function(e){return t.get(e)||n.current.options.get(e)}),[t])]}(Ee,fe),Le=(0,s.Z)(Me,2),Te=Le[0],Ne=Le[1],De=h.useMemo((function(){if(!d&&1===Te.length){var e=Te[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return Te.map((function(e){var t;return(0,a.Z)((0,a.Z)({},e),{},{label:null!==(t="function"==typeof W?W(e):e.label)&&void 0!==t?t:e.value})}))}),[d,Te,W]),_e=h.useMemo((function(){return new Set(Te.map((function(e){return e.value})))}),[Te]);h.useEffect((function(){if("combobox"===d){var e,t=null===(e=Te[0])||void 0===e?void 0:e.value;ce(function(e){return null!=e}(t)?String(t):"")}}),[Te]);var je=be((function(e,t){var n=null!=t?t:e;return(0,o.Z)((0,o.Z)({},oe.value,e),oe.label,n)})),Be=function(e,t,n,i,r){return h.useMemo((function(){if(!n||!1===i)return e;var s=t.options,l=t.label,c=t.value,u=[],d="function"==typeof i,h=n.toUpperCase(),p=d?i:function(e,t){return r?he(t[r],h):t[s]?he(t["children"!==l?l:"label"],h):he(t[c],h)},f=d?function(e){return q(e)}:function(e){return e};return e.forEach((function(e){if(e[s])if(p(n,f(e)))u.push(e);else{var t=e[s].filter((function(e){return p(n,f(e))}));t.length&&u.push((0,a.Z)((0,a.Z)({},e),{},(0,o.Z)({},s,t)))}else p(n,f(e))&&u.push(e)})),u}),[e,i,r,n,t])}(h.useMemo((function(){if("tags"!==d)return ge;var e=(0,r.Z)(ge);return(0,r.Z)(Te).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return fe.has(e)})(n)||e.push(je(n,t.label))})),e}),[je,ge,fe,Te,d]),oe,le,re,L),Pe=h.useMemo((function(){return"tags"!==d||!le||Be.some((function(e){return e[L||"value"]===le}))||Be.some((function(e){return e[oe.value]===le}))?Be:[je(le)].concat((0,r.Z)(Be))}),[je,L,d,Be,le,oe]),Re=function e(t){return(0,r.Z)(t).sort((function(e,t){return M(e,t,{searchValue:le})})).map((function(t){return Array.isArray(t.options)?(0,a.Z)((0,a.Z)({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},Ie=h.useMemo((function(){return M?Re(Pe):Pe}),[Pe,M,le]),Fe=h.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,i=t.childrenAsData,r=[],o=U(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(e,t){Array.isArray(e)&&e.forEach((function(e){if(t||!(l in e)){var n=e[s];r.push({key:G(e,r.length),groupOption:t,data:e,label:e[a],value:n})}else{var o=e[c];void 0===o&&i&&(o=e.label),r.push({key:G(e,r.length),group:!0,data:e,label:o}),u(e[l],!0)}}))}return u(e,!1),r}(Ie,{fieldNames:oe,childrenAsData:ie})}),[Ie,oe,ie]),Oe=function(e){var t=ve(e);if(Ae(t),X&&(t.length!==Te.length||t.some((function(e,t){var n;return(null===(n=Te[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)})))){var n=Y?t:t.map((function(e){return e.value})),i=t.map((function(e){return q(Ne(e.value))}));X(ne?n:n[0],ne?i:i[0])}},Ze=h.useState(null),He=(0,s.Z)(Ze,2),We=He[0],ze=He[1],Ge=h.useState(0),Ve=(0,s.Z)(Ge,2),Ue=Ve[0],qe=Ve[1],Ke=void 0!==B?B:"combobox"!==d,Ye=h.useCallback((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.source,r=void 0===i?"keyboard":i;qe(t),m&&"combobox"===d&&null!==e&&"keyboard"===r&&ze(String(e))}),[m,d]),Xe=function(e,t,n){var i=function(){var t,n=Ne(e);return[Y?{label:null==n?void 0:n[oe.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,q(n)]};if(t&&C){var r=i(),o=(0,s.Z)(r,2),a=o[0],l=o[1];C(a,l)}else if(!t&&k&&"clear"!==n){var c=i(),u=(0,s.Z)(c,2),d=u[0],h=u[1];k(d,h)}},Je=be((function(e,t){var n,i=!ne||t.selected;n=i?ne?[].concat((0,r.Z)(Te),[e]):[e]:Te.filter((function(t){return t.value!==e})),Oe(n),Xe(e,i),"combobox"===d?ze(""):Q&&!w||(ce(""),ze(""))})),Qe=h.useMemo((function(){var e=!1!==R&&!1!==A;return(0,a.Z)((0,a.Z)({},ue),{},{flattenOptions:Fe,onActiveValue:Ye,defaultActiveFirstOption:Ke,onSelect:Je,menuItemSelectedIcon:P,rawValues:_e,fieldNames:oe,virtual:e,direction:I,listHeight:O,listItemHeight:H,childrenAsData:ie,maxCount:J,optionRender:_})}),[J,ue,Fe,Ye,Ke,Je,P,_e,oe,R,A,I,O,H,ie,_]);return h.createElement(K.Provider,{value:Qe},h.createElement(ee,(0,i.Z)({},$,{id:te,prefixCls:f,ref:t,omitDomProps:Ce,mode:d,displayValues:De,onDisplayValuesChange:function(e,t){Oe(e);var n=t.type,i=t.values;"remove"!==n&&"clear"!==n||i.forEach((function(e){Xe(e.value,!1,n)}))},direction:I,searchValue:le,onSearch:function(e,t){if(ce(e),ze(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===d&&Oe(e),null==x||x(e));else{var n=(e||"").trim();if(n){var i=Array.from(new Set([].concat((0,r.Z)(_e),[n])));Oe(i),Xe(n,!0),ce("")}}},autoClearSearchValue:w,onSearchSplit:function(e){var t=e;"tags"!==d&&(t=e.map((function(e){var t=me.get(e);return null==t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,r.Z)(_e),(0,r.Z)(t))));Oe(n),n.forEach((function(e){Xe(e,!0)}))},dropdownMatchSelectWidth:A,OptionList:de,emptyOptions:!Fe.length,activeValue:We,activeDescendantId:"".concat(te,"_list_").concat(Ue)})))}));var Se=ke;Se.Option=re,Se.OptGroup=ne;var Ae=Se},63158:function(e,t,n){"use strict";var i=n(54476),r=n(20068),o=n(42978),a=n(75931),s=n(59301),l=n(92310),c=n.n(l),u=n(18929),d=n(10228),h=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=s.forwardRef((function(e,t){var n,l=e.prefixCls,p=void 0===l?"rc-switch":l,f=e.className,m=e.checked,g=e.defaultChecked,v=e.disabled,y=e.loadingIcon,x=e.checkedChildren,b=e.unCheckedChildren,w=e.onClick,C=e.onChange,k=e.onKeyDown,S=(0,a.Z)(e,h),A=(0,u.Z)(!1,{value:m,defaultValue:g}),E=(0,o.Z)(A,2),M=E[0],L=E[1];function T(e,t){var n=M;return v||(L(n=e),null==C||C(n,t)),n}var N=c()(p,f,(n={},(0,r.Z)(n,"".concat(p,"-checked"),M),(0,r.Z)(n,"".concat(p,"-disabled"),v),n));return s.createElement("button",(0,i.Z)({},S,{type:"button",role:"switch","aria-checked":M,disabled:v,className:N,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?T(!1,e):e.which===d.Z.RIGHT&&T(!0,e),null==k||k(e)},onClick:function(e){var t=T(!M,e);null==w||w(t,e)}}),y,s.createElement("span",{className:"".concat(p,"-inner")},s.createElement("span",{className:"".concat(p,"-inner-checked")},x),s.createElement("span",{className:"".concat(p,"-inner-unchecked")},b)))}));p.displayName="Switch",t.Z=p},22711:function(e,t,n){"use strict";n.r(t),n.d(t,{ResizableTextArea:function(){return M},default:function(){return T}});var i,r=n(54476),o=n(20068),a=n(33885),s=n(94480),l=n(42978),c=n(75931),u=n(92310),d=n.n(u),h=n(36901),p=n(66003),f=n(30292),m=n(18929),g=n(59301),v=n(76190),y=n(29301),x=n(34280),b=n(16089),w="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n",C=["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","white-space"],k={};function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&k[n])return k[n];var i=window.getComputedStyle(e),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),o=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),s=C.map((function(e){return"".concat(e,":").concat(i.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:r};return t&&n&&(k[n]=l),l}var A=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],E=g.forwardRef((function(e,t){var n=e,s=n.prefixCls,u=n.defaultValue,h=n.value,p=n.autoSize,f=n.onResize,C=n.className,k=n.style,E=n.disabled,M=n.onChange,L=(n.onInternalAutoSize,(0,c.Z)(n,A)),T=(0,m.Z)(u,{value:h,postState:function(e){return null!=e?e:""}}),N=(0,l.Z)(T,2),D=N[0],_=N[1],j=g.useRef();g.useImperativeHandle(t,(function(){return{textArea:j.current}}));var B=g.useMemo((function(){return p&&"object"===(0,v.Z)(p)?[p.minRows,p.maxRows]:[]}),[p]),P=(0,l.Z)(B,2),R=P[0],I=P[1],F=!!p,O=g.useState(2),Z=(0,l.Z)(O,2),H=Z[0],W=Z[1],z=g.useState(),G=(0,l.Z)(z,2),V=G[0],U=G[1],q=function(){W(0)};(0,x.Z)((function(){F&&q()}),[h,R,I,F]),(0,x.Z)((function(){if(0===H)W(1);else if(1===H){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i||((i=document.createElement("textarea")).setAttribute("tab-index","-1"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","hiddenTextarea"),document.body.appendChild(i)),e.getAttribute("wrap")?i.setAttribute("wrap",e.getAttribute("wrap")):i.removeAttribute("wrap");var o=S(e,t),a=o.paddingSize,s=o.borderSize,l=o.boxSizing,c=o.sizingStyle;i.setAttribute("style","".concat(c,";").concat(w)),i.value=e.value||e.placeholder||"";var u,d=void 0,h=void 0,p=i.scrollHeight;if("border-box"===l?p+=s:"content-box"===l&&(p-=a),null!==n||null!==r){i.value=" ";var f=i.scrollHeight-a;null!==n&&(d=f*n,"border-box"===l&&(d=d+a+s),p=Math.max(d,p)),null!==r&&(h=f*r,"border-box"===l&&(h=h+a+s),u=p>h?"":"hidden",p=Math.min(h,p))}var m={height:p,overflowY:u,resize:"none"};return d&&(m.minHeight=d),h&&(m.maxHeight=h),m}(j.current,!1,R,I);W(2),U(e)}else!function(){try{if(document.activeElement===j.current){var e=j.current,t=e.selectionStart,n=e.selectionEnd,i=e.scrollTop;j.current.setSelectionRange(t,n),j.current.scrollTop=i}}catch(e){}}()}),[H]);var K=g.useRef(),Y=function(){b.Z.cancel(K.current)};g.useEffect((function(){return Y}),[]);var X=F?V:null,J=(0,a.Z)((0,a.Z)({},k),X);return 0!==H&&1!==H||(J.overflowY="hidden",J.overflowX="hidden"),g.createElement(y.Z,{onResize:function(e){2===H&&(null==f||f(e),p&&(Y(),K.current=(0,b.Z)((function(){q()}))))},disabled:!(p||f)},g.createElement("textarea",(0,r.Z)({},L,{ref:j,style:J,className:d()(s,C,(0,o.Z)({},"".concat(s,"-disabled"),E)),disabled:E,value:D,onChange:function(e){_(e.target.value),null==M||M(e)}})))})),M=E,L=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],T=g.forwardRef((function(e,t){var n,i=e.defaultValue,u=e.value,v=e.onFocus,y=e.onBlur,x=e.onChange,b=e.allowClear,w=e.maxLength,C=e.onCompositionStart,k=e.onCompositionEnd,S=e.suffix,A=e.prefixCls,E=void 0===A?"rc-textarea":A,T=e.showCount,N=e.count,D=e.className,_=e.style,j=e.disabled,B=e.hidden,P=e.classNames,R=e.styles,I=e.onResize,F=e.onClear,O=e.onPressEnter,Z=e.readOnly,H=e.autoSize,W=e.onKeyDown,z=(0,c.Z)(e,L),G=(0,m.Z)(i,{value:u,defaultValue:i}),V=(0,l.Z)(G,2),U=V[0],q=V[1],K=null==U?"":String(U),Y=g.useState(!1),X=(0,l.Z)(Y,2),J=X[0],Q=X[1],$=g.useRef(!1),ee=g.useState(null),te=(0,l.Z)(ee,2),ne=te[0],ie=te[1],re=(0,g.useRef)(null),oe=(0,g.useRef)(null),ae=function(){var e;return null===(e=oe.current)||void 0===e?void 0:e.textArea},se=function(){ae().focus()};(0,g.useImperativeHandle)(t,(function(){var e;return{resizableTextArea:oe.current,focus:se,blur:function(){ae().blur()},nativeElement:(null===(e=re.current)||void 0===e?void 0:e.nativeElement)||ae()}})),(0,g.useEffect)((function(){Q((function(e){return!j&&e}))}),[j]);var le=g.useState(null),ce=(0,l.Z)(le,2),ue=ce[0],de=ce[1];g.useEffect((function(){var e;ue&&(e=ae()).setSelectionRange.apply(e,(0,s.Z)(ue))}),[ue]);var he,pe=(0,p.Z)(N,T),fe=null!==(n=pe.max)&&void 0!==n?n:w,me=Number(fe)>0,ge=pe.strategy(K),ve=!!fe&&ge>fe,ye=function(e,t){var n=t;!$.current&&pe.exceedFormatter&&pe.max&&pe.strategy(t)>pe.max&&t!==(n=pe.exceedFormatter(t,{max:pe.max}))&&de([ae().selectionStart||0,ae().selectionEnd||0]),q(n),(0,f.rJ)(e.currentTarget,e,x,n)},xe=S;pe.show&&(he=pe.showFormatter?pe.showFormatter({value:K,count:ge,maxLength:fe}):"".concat(ge).concat(me?" / ".concat(fe):""),xe=g.createElement(g.Fragment,null,xe,g.createElement("span",{className:d()("".concat(E,"-data-count"),null==P?void 0:P.count),style:null==R?void 0:R.count},he)));var be=!H&&!T&&!b;return g.createElement(h.BaseInput,{ref:re,value:K,allowClear:b,handleReset:function(e){q(""),se(),(0,f.rJ)(ae(),e,x)},suffix:xe,prefixCls:E,classNames:(0,a.Z)((0,a.Z)({},P),{},{affixWrapper:d()(null==P?void 0:P.affixWrapper,(0,o.Z)((0,o.Z)({},"".concat(E,"-show-count"),T),"".concat(E,"-textarea-allow-clear"),b))}),disabled:j,focused:J,className:d()(D,ve&&"".concat(E,"-out-of-range")),style:(0,a.Z)((0,a.Z)({},_),ne&&!be?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof he?he:void 0}},hidden:B,readOnly:Z,onClear:F},g.createElement(M,(0,r.Z)({},z,{autoSize:H,maxLength:w,onKeyDown:function(e){"Enter"===e.key&&O&&O(e),null==W||W(e)},onChange:function(e){ye(e,e.target.value)},onFocus:function(e){Q(!0),null==v||v(e)},onBlur:function(e){Q(!1),null==y||y(e)},onCompositionStart:function(e){$.current=!0,null==C||C(e)},onCompositionEnd:function(e){$.current=!1,ye(e,e.currentTarget.value),null==k||k(e)},className:d()(null==P?void 0:P.textarea),style:(0,a.Z)((0,a.Z)({},null==R?void 0:R.textarea),{},{resize:null==_?void 0:_.resize}),disabled:j,prefixCls:E,onResize:function(e){var t;null==I||I(e),null!==(t=ae())&&void 0!==t&&t.style.height&&ie(!0)},ref:oe,readOnly:Z})))}))},48911:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var i=n(54476),r=n(76190),o=n(33885),a=n(20068),s=n(42978),l=n(75931),c=n(92310),u=n.n(c),d=n(29301),h=n(70425),p=n(34280),f=n(59301),m=n(4676),g=f.forwardRef((function(e,t){var n=e.height,r=e.offsetY,s=e.offsetX,l=e.children,c=e.prefixCls,h=e.onInnerResize,p=e.innerProps,m=e.rtl,g=e.extra,v={},y={display:"flex",flexDirection:"column"};return void 0!==r&&(v={height:n,position:"relative",overflow:"hidden"},y=(0,o.Z)((0,o.Z)({},y),{},(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({transform:"translateY(".concat(r,"px)")},m?"marginRight":"marginLeft",-s),"position","absolute"),"left",0),"right",0),"top",0))),f.createElement("div",{style:v},f.createElement(d.Z,{onResize:function(e){e.offsetHeight&&h&&h()}},f.createElement("div",(0,i.Z)({style:y,className:u()((0,a.Z)({},"".concat(c,"-holder-inner"),c)),ref:t},p),l,g)))}));g.displayName="Filler";var v=g;function y(e){var t=e.children,n=e.setRef,i=f.useCallback((function(e){n(e)}),[]);return f.cloneElement(t,{ref:i})}function x(e,t,n){var i=f.useState(e),r=(0,s.Z)(i,2),o=r[0],a=r[1],l=f.useState(null),c=(0,s.Z)(l,2),u=c[0],d=c[1];return f.useEffect((function(){var i=function(e,t,n){var i,r,o=e.length,a=t.length;if(0===o&&0===a)return null;o<a?(i=e,r=t):(i=t,r=e);var s={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):s}for(var c=null,u=1!==Math.abs(o-a),d=0;d<r.length;d+=1){var h=l(i[d]);if(h!==l(r[d])){c=d,u=u||h!==l(r[d+1]);break}}return null===c?null:{index:c,multiple:u}}(o||[],e||[],t);void 0!==(null==i?void 0:i.index)&&(null==n||n(i.index),d(e[i.index])),a(e)}),[e]),[u]}var b=n(16089),w="object"===("undefined"==typeof navigator?"undefined":(0,r.Z)(navigator))&&/Firefox/i.test(navigator.userAgent),C=function(e,t,n,i){var r=(0,f.useRef)(!1),o=(0,f.useRef)(null);function a(){clearTimeout(o.current),r.current=!0,o.current=setTimeout((function(){r.current=!1}),50)}var s=(0,f.useRef)({top:e,bottom:t,left:n,right:i});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=i,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&i?(clearTimeout(o.current),r.current=!1):i&&!r.current||a(),!r.current&&i}};function k(e,t,n,i,r,o,a){var s=(0,f.useRef)(0),l=(0,f.useRef)(null),c=(0,f.useRef)(null),u=(0,f.useRef)(!1),d=C(t,n,i,r);var h=(0,f.useRef)(null),p=(0,f.useRef)(null);return[function(t){if(e){b.Z.cancel(p.current),p.current=(0,b.Z)((function(){h.current=null}),2);var n=t.deltaX,i=t.deltaY,r=t.shiftKey,f=n,m=i;("sx"===h.current||!h.current&&r&&i&&!n)&&(f=i,m=0,h.current="sx");var g=Math.abs(f),v=Math.abs(m);null===h.current&&(h.current=o&&g>v?"x":"y"),"y"===h.current?function(e,t){if(b.Z.cancel(l.current),!d(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,s.current+=t,c.current=t,w||n.preventDefault(),l.current=(0,b.Z)((function(){var e=u.current?10:1;a(s.current*e,!1),s.current=0})))}}(t,m):function(e,t){a(t,!0),w||e.preventDefault()}(t,f)}},function(t){e&&(u.current=t.detail===c.current)}]}var S=n(67732),A=n(83652),E=function(){function e(){(0,S.Z)(this,e),(0,a.Z)(this,"maps",void 0),(0,a.Z)(this,"id",0),(0,a.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,A.Z)(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function M(e){var t=parseFloat(e);return isNaN(t)?0:t}var L=14/15;function T(e){return Math.floor(Math.pow(e,.5))}function N(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var D=f.forwardRef((function(e,t){var n=e.prefixCls,i=e.rtl,r=e.scrollOffset,l=e.scrollRange,c=e.onStartMove,d=e.onStopMove,h=e.onScroll,p=e.horizontal,m=e.spinSize,g=e.containerSize,v=e.style,y=e.thumbStyle,x=e.showScrollBar,w=f.useState(!1),C=(0,s.Z)(w,2),k=C[0],S=C[1],A=f.useState(null),E=(0,s.Z)(A,2),M=E[0],L=E[1],T=f.useState(null),D=(0,s.Z)(T,2),_=D[0],j=D[1],B=!i,P=f.useRef(),R=f.useRef(),I=f.useState(x),F=(0,s.Z)(I,2),O=F[0],Z=F[1],H=f.useRef(),W=function(){!0!==x&&!1!==x&&(clearTimeout(H.current),Z(!0),H.current=setTimeout((function(){Z(!1)}),3e3))},z=l-g||0,G=g-m||0,V=f.useMemo((function(){return 0===r||0===z?0:r/z*G}),[r,z,G]),U=f.useRef({top:V,dragging:k,pageY:M,startTop:_});U.current={top:V,dragging:k,pageY:M,startTop:_};var q=function(e){S(!0),L(N(e,p)),j(U.current.top),c(),e.stopPropagation(),e.preventDefault()};f.useEffect((function(){var e=function(e){e.preventDefault()},t=P.current,n=R.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",q,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",q)}}),[]);var K=f.useRef();K.current=z;var Y=f.useRef();Y.current=G,f.useEffect((function(){if(k){var e,t=function(t){var n=U.current,i=n.dragging,r=n.pageY,o=n.startTop;b.Z.cancel(e);var a=P.current.getBoundingClientRect(),s=g/(p?a.width:a.height);if(i){var l=(N(t,p)-r)*s,c=o;!B&&p?c-=l:c+=l;var u=K.current,d=Y.current,f=d?c/d:0,m=Math.ceil(f*u);m=Math.max(m,0),m=Math.min(m,u),e=(0,b.Z)((function(){h(m,p)}))}},n=function(){S(!1),d()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),b.Z.cancel(e)}}}),[k]),f.useEffect((function(){return W(),function(){clearTimeout(H.current)}}),[r]),f.useImperativeHandle(t,(function(){return{delayHidden:W}}));var X="".concat(n,"-scrollbar"),J={position:"absolute",visibility:O?null:"hidden"},Q={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return p?(Object.assign(J,{height:8,left:0,right:0,bottom:0}),Object.assign(Q,(0,a.Z)({height:"100%",width:m},B?"left":"right",V))):(Object.assign(J,(0,a.Z)({width:8,top:0,bottom:0},B?"right":"left",0)),Object.assign(Q,{width:"100%",height:m,top:V})),f.createElement("div",{ref:P,className:u()(X,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(X,"-horizontal"),p),"".concat(X,"-vertical"),!p),"".concat(X,"-visible"),O)),style:(0,o.Z)((0,o.Z)({},J),v),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:W},f.createElement("div",{ref:R,className:u()("".concat(X,"-thumb"),(0,a.Z)({},"".concat(X,"-thumb-moving"),k)),style:(0,o.Z)((0,o.Z)({},Q),y),onMouseDown:q}))}));function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,20),Math.floor(n)}var j=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],B=[],P={overflowY:"auto",overflowAnchor:"none"};function R(e,t){var n=e.prefixCls,c=void 0===n?"rc-virtual-list":n,g=e.className,w=e.height,S=e.itemHeight,A=e.fullHeight,R=void 0===A||A,I=e.style,F=e.data,O=e.children,Z=e.itemKey,H=e.virtual,W=e.direction,z=e.scrollWidth,G=e.component,V=void 0===G?"div":G,U=e.onScroll,q=e.onVirtualScroll,K=e.onVisibleChange,Y=e.innerProps,X=e.extraRender,J=e.styles,Q=e.showScrollBar,$=void 0===Q?"optional":Q,ee=(0,l.Z)(e,j),te=f.useCallback((function(e){return"function"==typeof Z?Z(e):null==e?void 0:e[Z]}),[Z]),ne=function(e,t,n){var i=f.useState(0),r=(0,s.Z)(i,2),o=r[0],a=r[1],l=(0,f.useRef)(new Map),c=(0,f.useRef)(new E),u=(0,f.useRef)(0);function d(){u.current+=1}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){var e=!1;l.current.forEach((function(t,n){if(t&&t.offsetParent){var i=t.offsetHeight,r=getComputedStyle(t),o=r.marginTop,a=r.marginBottom,s=i+M(o)+M(a);c.current.get(n)!==s&&(c.current.set(n,s),e=!0)}})),e&&a((function(e){return e+1}))};if(e)t();else{u.current+=1;var n=u.current;Promise.resolve().then((function(){n===u.current&&t()}))}}return(0,f.useEffect)((function(){return d}),[]),[function(i,r){var o=e(i),a=l.current.get(o);r?(l.current.set(o,r),h()):l.current.delete(o),!a!=!r&&(r?null==t||t(i):null==n||n(i))},h,c.current,o]}(te,null,null),ie=(0,s.Z)(ne,4),re=ie[0],oe=ie[1],ae=ie[2],se=ie[3],le=!(!1===H||!w||!S),ce=f.useMemo((function(){return Object.values(ae.maps).reduce((function(e,t){return e+t}),0)}),[ae.id,ae.maps]),ue=le&&F&&(Math.max(S*F.length,ce)>w||!!z),de="rtl"===W,he=u()(c,(0,a.Z)({},"".concat(c,"-rtl"),de),g),pe=F||B,fe=(0,f.useRef)(),me=(0,f.useRef)(),ge=(0,f.useRef)(),ve=(0,f.useState)(0),ye=(0,s.Z)(ve,2),xe=ye[0],be=ye[1],we=(0,f.useState)(0),Ce=(0,s.Z)(we,2),ke=Ce[0],Se=Ce[1],Ae=(0,f.useState)(!1),Ee=(0,s.Z)(Ae,2),Me=Ee[0],Le=Ee[1],Te=function(){Le(!0)},Ne=function(){Le(!1)},De={getKey:te};function _e(e){be((function(t){var n=function(e){var t=e;Number.isNaN(Je.current)||(t=Math.min(t,Je.current));return t=Math.max(t,0),t}("function"==typeof e?e(t):e);return fe.current.scrollTop=n,n}))}var je=(0,f.useRef)({start:0,end:pe.length}),Be=(0,f.useRef)(),Pe=x(pe,te),Re=(0,s.Z)(Pe,1)[0];Be.current=Re;var Ie=f.useMemo((function(){if(!le)return{scrollHeight:void 0,start:0,end:pe.length-1,offset:void 0};var e;if(!ue)return{scrollHeight:(null===(e=me.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:pe.length-1,offset:void 0};for(var t,n,i,r=0,o=pe.length,a=0;a<o;a+=1){var s=pe[a],l=te(s),c=ae.get(l),u=r+(void 0===c?S:c);u>=xe&&void 0===t&&(t=a,n=r),u>xe+w&&void 0===i&&(i=a),r=u}return void 0===t&&(t=0,n=0,i=Math.ceil(w/S)),void 0===i&&(i=pe.length-1),{scrollHeight:r,start:t,end:i=Math.min(i+1,pe.length-1),offset:n}}),[ue,le,xe,pe,se,w]),Fe=Ie.scrollHeight,Oe=Ie.start,Ze=Ie.end,He=Ie.offset;je.current.start=Oe,je.current.end=Ze,f.useLayoutEffect((function(){var e=ae.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),i=pe[Oe];if(i&&void 0===n)if(te(i)===t){var r=ae.get(t)-S;_e((function(e){return e+r}))}}ae.resetRecord()}),[Fe]);var We=f.useState({width:0,height:w}),ze=(0,s.Z)(We,2),Ge=ze[0],Ve=ze[1],Ue=(0,f.useRef)(),qe=(0,f.useRef)(),Ke=f.useMemo((function(){return _(Ge.width,z)}),[Ge.width,z]),Ye=f.useMemo((function(){return _(Ge.height,Fe)}),[Ge.height,Fe]),Xe=Fe-w,Je=(0,f.useRef)(Xe);Je.current=Xe;var Qe=xe<=0,$e=xe>=Xe,et=ke<=0,tt=ke>=z,nt=C(Qe,$e,et,tt),it=function(){return{x:de?-ke:ke,y:xe}},rt=(0,f.useRef)(it()),ot=(0,h.zX)((function(e){if(q){var t=(0,o.Z)((0,o.Z)({},it()),e);rt.current.x===t.x&&rt.current.y===t.y||(q(t),rt.current=t)}}));function at(e,t){var n=e;t?((0,m.flushSync)((function(){Se(n)})),ot()):_e(n)}var st=function(e){var t=e,n=z?z-Ge.width:0;return t=Math.max(t,0),t=Math.min(t,n)},lt=(0,h.zX)((function(e,t){t?((0,m.flushSync)((function(){Se((function(t){return st(t+(de?-e:e))}))})),ot()):_e((function(t){return t+e}))})),ct=k(le,Qe,$e,et,tt,!!z,lt),ut=(0,s.Z)(ct,2),dt=ut[0],ht=ut[1];!function(e,t,n){var i,r=(0,f.useRef)(!1),o=(0,f.useRef)(0),a=(0,f.useRef)(0),s=(0,f.useRef)(null),l=(0,f.useRef)(null),c=function(e){if(r.current){var t=Math.ceil(e.touches[0].pageX),i=Math.ceil(e.touches[0].pageY),s=o.current-t,c=a.current-i,u=Math.abs(s)>Math.abs(c);u?o.current=t:a.current=i;var d=n(u,u?s:c,!1,e);d&&e.preventDefault(),clearInterval(l.current),d&&(l.current=setInterval((function(){u?s*=L:c*=L;var e=Math.floor(u?s:c);(!n(u,e,!0)||Math.abs(e)<=.1)&&clearInterval(l.current)}),16))}},u=function(){r.current=!1,i()},d=function(e){i(),1!==e.touches.length||r.current||(r.current=!0,o.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),s.current=e.target,s.current.addEventListener("touchmove",c,{passive:!1}),s.current.addEventListener("touchend",u,{passive:!0}))};i=function(){s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",u))},(0,p.Z)((function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),i(),clearInterval(l.current)}}),[e])}(le,fe,(function(e,t,n,i){var r=i;return!nt(e,t,n)&&((!r||!r._virtualHandled)&&(r&&(r._virtualHandled=!0),dt({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),!0))})),function(e,t,n){f.useEffect((function(){var i=t.current;if(e&&i){var r,o,a=!1,s=function(){b.Z.cancel(r)},l=function e(){s(),r=(0,b.Z)((function(){n(o),e()}))},c=function(){a=!1,s()},u=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,a=!0)}},d=function(e){if(a){var t=N(e,!1),n=i.getBoundingClientRect(),r=n.top,c=n.bottom;t<=r?(o=-T(r-t),l()):t>=c?(o=T(t-c),l()):s()}};return i.addEventListener("mousedown",u),i.ownerDocument.addEventListener("mouseup",c),i.ownerDocument.addEventListener("mousemove",d),i.ownerDocument.addEventListener("dragend",c),function(){i.removeEventListener("mousedown",u),i.ownerDocument.removeEventListener("mouseup",c),i.ownerDocument.removeEventListener("mousemove",d),i.ownerDocument.removeEventListener("dragend",c),s()}}}),[e])}(ue,fe,(function(e){_e((function(t){return t+e}))})),(0,p.Z)((function(){function e(e){var t=Qe&&e.detail<0,n=$e&&e.detail>0;!le||t||n||e.preventDefault()}var t=fe.current;return t.addEventListener("wheel",dt,{passive:!1}),t.addEventListener("DOMMouseScroll",ht,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",dt),t.removeEventListener("DOMMouseScroll",ht),t.removeEventListener("MozMousePixelScroll",e)}}),[le,Qe,$e]),(0,p.Z)((function(){if(z){var e=st(ke);Se(e),ot({x:e})}}),[Ge.width,z]);var pt=function(){var e,t;null===(e=Ue.current)||void 0===e||e.delayHidden(),null===(t=qe.current)||void 0===t||t.delayHidden()},ft=function(e,t,n,i,a,l,c,u){var d=f.useRef(),h=f.useState(null),m=(0,s.Z)(h,2),g=m[0],v=m[1];return(0,p.Z)((function(){if(g&&g.times<10){if(!e.current)return void v((function(e){return(0,o.Z)({},e)}));l();var r=g.targetAlign,s=g.originAlign,u=g.index,d=g.offset,h=e.current.clientHeight,p=!1,f=r,m=null;if(h){for(var y=r||s,x=0,b=0,w=0,C=Math.min(t.length-1,u),k=0;k<=C;k+=1){var S=a(t[k]);b=x;var A=n.get(S);x=w=b+(void 0===A?i:A)}for(var E="top"===y?d:h-d,M=C;M>=0;M-=1){var L=a(t[M]),T=n.get(L);if(void 0===T){p=!0;break}if((E-=T)<=0)break}switch(y){case"top":m=b-d;break;case"bottom":m=w-h+d;break;default:var N=e.current.scrollTop;b<N?f="top":w>N+h&&(f="bottom")}null!==m&&c(m),m!==g.lastTop&&(p=!0)}p&&v((0,o.Z)((0,o.Z)({},g),{},{times:g.times+1,targetAlign:f,lastTop:m}))}}),[g,e.current]),function(e){if(null!=e){if(b.Z.cancel(d.current),"number"==typeof e)c(e);else if(e&&"object"===(0,r.Z)(e)){var n,i=e.align;n="index"in e?e.index:t.findIndex((function(t){return a(t)===e.key}));var o=e.offset;v({times:0,index:n,offset:void 0===o?0:o,originAlign:i})}}else u()}}(fe,pe,ae,S,te,(function(){return oe(!0)}),_e,pt);f.useImperativeHandle(t,(function(){return{nativeElement:ge.current,getScrollInfo:it,scrollTo:function(e){var t;(t=e)&&"object"===(0,r.Z)(t)&&("left"in t||"top"in t)?(void 0!==e.left&&Se(st(e.left)),ft(e.top)):ft(e)}}})),(0,p.Z)((function(){if(K){var e=pe.slice(Oe,Ze+1);K(e,pe)}}),[Oe,Ze,pe]);var mt=function(e,t,n,i){var r=f.useMemo((function(){return[new Map,[]]}),[e,n.id,i]),o=(0,s.Z)(r,2),a=o[0],l=o[1];return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,s=a.get(r),c=a.get(o);if(void 0===s||void 0===c)for(var u=e.length,d=l.length;d<u;d+=1){var h,p=e[d],f=t(p);a.set(f,d);var m=null!==(h=n.get(f))&&void 0!==h?h:i;if(l[d]=(l[d-1]||0)+m,f===r&&(s=d),f===o&&(c=d),void 0!==s&&void 0!==c)break}return{top:l[s-1]||0,bottom:l[c]}}}(pe,te,ae,S),gt=null==X?void 0:X({start:Oe,end:Ze,virtual:ue,offsetX:ke,offsetY:He,rtl:de,getSize:mt}),vt=function(e,t,n,i,r,o,a,s){var l=s.getKey;return e.slice(t,n+1).map((function(e,n){var s=a(e,t+n,{style:{width:i},offsetX:r}),c=l(e);return f.createElement(y,{key:c,setRef:function(t){return o(e,t)}},s)}))}(pe,Oe,Ze,z,ke,re,O,De),yt=null;w&&(yt=(0,o.Z)((0,a.Z)({},R?"height":"maxHeight",w),P),le&&(yt.overflowY="hidden",z&&(yt.overflowX="hidden"),Me&&(yt.pointerEvents="none")));var xt={};return de&&(xt.dir="rtl"),f.createElement("div",(0,i.Z)({ref:ge,style:(0,o.Z)((0,o.Z)({},I),{},{position:"relative"}),className:he},xt,ee),f.createElement(d.Z,{onResize:function(e){Ve({width:e.offsetWidth,height:e.offsetHeight})}},f.createElement(V,{className:"".concat(c,"-holder"),style:yt,ref:fe,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==xe&&_e(t),null==U||U(e),ot()},onMouseEnter:pt},f.createElement(v,{prefixCls:c,height:Fe,offsetX:ke,offsetY:He,scrollWidth:z,onInnerResize:oe,ref:me,innerProps:Y,rtl:de,extra:gt},vt))),ue&&Fe>w&&f.createElement(D,{ref:Ue,prefixCls:c,scrollOffset:xe,scrollRange:Fe,rtl:de,onScroll:at,onStartMove:Te,onStopMove:Ne,spinSize:Ye,containerSize:Ge.height,style:null==J?void 0:J.verticalScrollBar,thumbStyle:null==J?void 0:J.verticalScrollBarThumb,showScrollBar:$}),ue&&z>Ge.width&&f.createElement(D,{ref:qe,prefixCls:c,scrollOffset:ke,scrollRange:z,rtl:de,onScroll:at,onStartMove:Te,onStopMove:Ne,spinSize:Ke,containerSize:Ge.width,horizontal:!0,style:null==J?void 0:J.horizontalScrollBar,thumbStyle:null==J?void 0:J.horizontalScrollBarThumb,showScrollBar:$}))}var I=f.forwardRef(R);I.displayName="List";var F=I},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(59301),o=s(r),a=s(n(12708));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),i=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;i=this.props.isReverse?o:this.calculateOffset(e,o)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,i=t.element,r=t.hasMore,a=(t.initialLoad,t.isReverse),s=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return r&&(s?a?u.unshift(s):u.push(s):this.defaultLoader&&(a?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(i,c,u)}}]),t}(r.Component);l.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)},93314:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8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hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});const i=e=>"object"==typeof e&&null!=e&&1===e.nodeType,r=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return r(n.overflowY,t)||r(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},a=(e,t,n,i,r,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-i:a>t&&s<n||o<e&&s>n?a-t+r:0,s=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},l=(e,t)=>{var n,r,l,c;if("undefined"==typeof document)return[];const{scrollMode:u,block:d,inline:h,boundary:p,skipOverflowHiddenElements:f}=t,m="function"==typeof p?p:e=>e!==p;if(!i(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,v=[];let y=e;for(;i(y)&&m(y);){if(y=s(y),y===g){v.push(y);break}null!=y&&y===document.body&&o(y)&&!o(document.documentElement)||null!=y&&o(y,f)&&v.push(y)}const x=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,b=null!=(c=null==(l=window.visualViewport)?void 0:l.height)?c:innerHeight,{scrollX:w,scrollY:C}=window,{height:k,width:S,top:A,right:E,bottom:M,left:L}=e.getBoundingClientRect(),{top:T,right:N,bottom:D,left:_}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let j="start"===d||"nearest"===d?A-T:"end"===d?M+D:A+k/2-T+D,B="center"===h?L+S/2-_+N:"end"===h?E+N:L-_;const P=[];for(let e=0;e<v.length;e++){const t=v[e],{height:n,width:i,top:r,right:s,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===u&&A>=0&&L>=0&&M<=b&&E<=x&&(t===g&&!o(t)||A>=r&&M<=l&&L>=c&&E<=s))return P;const p=getComputedStyle(t),f=parseInt(p.borderLeftWidth,10),m=parseInt(p.borderTopWidth,10),y=parseInt(p.borderRightWidth,10),T=parseInt(p.borderBottomWidth,10);let N=0,D=0;const _="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-y:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-T:0,I="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,F="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(g===t)N="start"===d?j:"end"===d?j-b:"nearest"===d?a(C,C+b,b,m,T,C+j,C+j+k,k):j-b/2,D="start"===h?B:"center"===h?B-x/2:"end"===h?B-x:a(w,w+x,x,f,y,w+B,w+B+S,S),N=Math.max(0,N+C),D=Math.max(0,D+w);else{N="start"===d?j-r-m:"end"===d?j-l+T+R:"nearest"===d?a(r,l,n,m,T+R,j,j+k,k):j-(r+n/2)+R/2,D="start"===h?B-c-f:"center"===h?B-(c+i/2)+_/2:"end"===h?B-s+y+_:a(c,s,i,f,y+_,B,B+S,S);const{scrollLeft:e,scrollTop:o}=t;N=0===F?0:Math.max(0,Math.min(o+N/F,t.scrollHeight-n/F+R)),D=0===I?0:Math.max(0,Math.min(e+D/I,t.scrollWidth-i/I+_)),j+=o-N,B+=e-D}P.push({el:t,top:N,left:D})}return P};function c(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(l(e,t));const i="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:r,top:o,left:a}of l(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=o-n.top+n.bottom,t=a-n.left+n.right;r.scroll({top:e,left:t,behavior:i})}}}}]);