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.
1105 lines
728 KiB
1105 lines
728 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[1578],{63524:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Xe}});var oe=ce(32855),Oe=ce(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},nt=Me,xe=ce(7657),ue=function(pe,rt){return Oe.createElement(xe.Z,(0,oe.Z)({},pe,{ref:rt,icon:nt}))},Le=Oe.forwardRef(ue),Xe=Le},66543:function(){"use strict"},59598:function(){"use strict"},21697:function(on,nn){"use strict";nn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var on={},nn="5.0",ce={},oe=null,Oe=!1,Me=!1,nt=null,xe=!1,ue=null,Le=null,Xe=0;Xe<arguments.length;Xe++){var be=arguments[Xe];if(be!==null)switch(typeof be){case"number":nn=be.toFixed(1);break;case"string":be.match(new RegExp("^[0-9]\\.[0-9]+$"))?nn=be:nt=be;break;case"object":typeof be.is3D!="undefined"?oe=be:ce=be;break;case"boolean":Oe=be,Me=!0;break}}oe===null&&(oe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ce.material_id!==void 0&&!Me&&(Oe=!0)),nt!==null&&ce.id===void 0&&(ce.id=nt);var pe="",rt="",me=!1,lt=null,je=null,Ze=null,Ee=!1,Ae=null,ot=null,st=null,ut=null,Pe=null;ce.height!==void 0&&(ce.height=Math.round(ce.height)),ce.width!==void 0&&(ce.width=Math.round(ce.width));var ge=function(Ke){return parseFloat(Ke)>4?parseFloat(Ke):5};on.setHTML5Codebase=function(Ke,ct){Le=Ke,mt(Ke,ct)},on.setJavaCodebase=on.setJavaCodebaseVersion=on.isCompiledInstalled=on.setPreCompiledScriptPath=on.setPreCompiledResourcePath=function(){},on.setHTML5CodebaseVersion=function(Ke,ct){var dt=parseFloat(Ke);if(dt!==NaN&&dt<5){console.log("The GeoGebra HTML5 codebase version "+dt+" is deprecated. Using version latest instead.");return}ue=Ke,he(Ke,ct)},on.getHTML5CodebaseVersion=function(){return je},on.getParameters=function(){return ce},on.setFontsCSSURL=function(Ke){ut=Ke},on.setGiacJSURL=function(Ke){},on.setJNLPFile=function(Ke){pe=Ke},on.setJNLPBaseDir=function(Ke){},on.inject=function(){function Ke(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ct="auto",dt=ce.id,yn,_e=!1,Dt=0;Dt<arguments.length;Dt++){var Je=arguments[Dt];typeof Je=="string"?(Je=Je.toLowerCase(),Je.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ct=Je:dt=arguments[Dt]):typeof Je=="boolean"?_e=Je:Je instanceof HTMLElement&&(yn=Je)}Ot();function Ot(){if(!xe){setTimeout(Ot,200);return}ct=Ht(ct);var Nt=yn||document.getElementById(dt);if(!Nt){console.log("possibly bug on ajax loading? ");return}if(on.removeExistingApplet(Nt,!1),ce.width===void 0&&Nt.clientWidth&&(ce.width=Nt.clientWidth),ce.height===void 0&&Nt.clientHeight&&(ce.height=Nt.clientHeight),!(ce.width&&ce.height)&&ct==="html5"&&(delete ce.width,delete ce.height),lt=ct,ct==="screenshot")Ne(Nt,ce);else{var ae=!1;ce.hasOwnProperty("playButton")&&ce.playButton||ce.hasOwnProperty("clickToLoad")&&ce.clickToLoad?ae=!0:ce.hasOwnProperty("playButtonAutoDecide")&&ce.playButtonAutoDecide&&(ae=(!Be()||Ke())&&ze()),ae?(lt="screenshot",Yt(Nt,ce,_e,ct)):Ue(Nt,ce,_e)}}};function Be(){try{return window.self!==window.top}catch(Ke){return!0}}function ze(){return ce.hasOwnProperty("screenshotGenerator")&&ce.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}on.getViews=function(){return oe},on.isJavaInstalled=function(){return!1};var yt=function(Ke){var ct=function(Dt){var Je=JSON.parse(Dt),Ot=function(te){return te.type=="G"||te.type=="E"},Nt=Je.elements?Je.elements.filter(Ot)[0]:Je;if(!Nt||!Nt.url){dt();return}ce.fileName=Nt.url,Ce(Nt.settings||{}),oe.is3D=!0;var ae="https://www.geogebra.org/images/";on.setPreviewImage(Ae||Nt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Ke()},dt=function(){ce.onError&&ce.onError(),qt("Error: Fetching material (id "+ce.material_id+") failed.",ce)},yn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",_e="/materials/"+ce.material_id+"?scope=basic";we("https://"+yn+"/api/proxy.php?path="+encodeURIComponent(_e),ct,dt)};function Ce(Ke){var ct=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(dt){Ke[dt]=!!Ke[dt]}),ct.forEach(function(dt){ce[dt]===void 0&&Ke[dt]!==void 0&&(ce[dt]=Ke[dt])}),ce.showToolBarHelp===void 0&&(ce.showToolBarHelp=ce.showToolBar)}function we(Ke,ct,dt){var yn=new XMLHttpRequest;yn.open("GET",Ke),yn.onload=function(){ct(yn.responseText)},yn.onerror=dt,yn.send()}on.isHTML5Installed=function(){return!0},on.getLoadedAppletType=function(){return lt},on.setPreviewImage=function(Ke,ct,dt){Ae=Ke,ot=ct,st=dt},on.removeExistingApplet=function(Ke,ct){var dt;typeof Ke=="string"&&(Ke=document.getElementById(Ke)),lt=null;var yn=null;for(dt=0;dt<Ke.childNodes.length;dt++){var _e=Ke.childNodes[dt],Dt=_e.className;Dt==="applet_screenshot"?ct?(_e.style.display="block",lt="screenshot"):_e.style.display="none":Dt!=="applet_scaler prerender"&&(Ke.removeChild(_e),yn=Dt&&Dt.indexOf("appletParameters")!=-1?_e.id:null,dt--)}var Je=ce.id!==void 0?ce.id:yn,Ot=window[Je];Ot&&typeof Ot.getBase64=="function"&&(Ot.remove(),window[Je]=null)},on.refreshHitPoints=function(){if(ge(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ke=on.getAppletObject();return Ke&&typeof Ke.recalculateEnvironments=="function"?(Ke.recalculateEnvironments(),!0):!1},on.startAnimation=function(){var Ke=on.getAppletObject();return Ke&&typeof Ke.startAnimation=="function"?(Ke.startAnimation(),!0):!1},on.stopAnimation=function(){var Ke=on.getAppletObject();return Ke&&typeof Ke.stopAnimation=="function"?(Ke.stopAnimation(),!0):!1},on.getAppletObject=function(){var Ke=ce.id!==void 0?ce.id:"ggbApplet";return window[Ke]},on.resize=function(){};var We=function(Ke,ct,dt){var yn=document.createElement("param");yn.setAttribute("name",ct),yn.setAttribute("value",dt),Ke.appendChild(yn)},Se=function(Ke){return Ke&&Ke!=="false"},Ue=function(Ke,ct,dt){ge(je)<=4.2&&(dt=!0);var yn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==je||ggbHTML5LoadedCodebaseIsWebSimple&&!Ee)&&(yn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var _e=document.createElement("div");_e.classList.add("appletParameters","notranslate");var Dt=ct.width,Je=ct.height;if(ct.disableAutoScale=ct.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ct.disableAutoScale,ct.width!==void 0)if(ge(je)<=4.4)Se(ct.showToolBar)&&(ct.height-=7),Se(ct.showAlgebraInput)&&(ct.height-=37),ct.width<605&&Se(ct.showToolBar)&&(ct.width=605,Dt=605);else{var Ot=100;(Se(ct.showToolBar)||Se(ct.showMenuBar))&&(ct.hasOwnProperty("customToolBar")&&(ct.customToolbar=ct.customToolBar),Ot=Se(ct.showMenuBar)?245:155),Dt<Ot&&(ct.width=Ot,Dt=Ot)}_e.style.border="none",_e.style.display="inline-block";for(var Nt in ct)ct.hasOwnProperty(Nt)&&Nt!=="appletOnLoad"&&_e.setAttribute("data-param-"+Nt,ct[Nt]);ut&&_e.setAttribute("data-param-fontscssurl",ut),on.resize=function(){GGBAppletUtils.responsiveResize(Ke,ct)},window.addEventListener("resize",function(Ge){on.resize()});var ae=typeof ct.appletOnLoad=="function"?ct.appletOnLoad:function(){};if(!dt&&ct.width!==void 0){ct.hasOwnProperty("showSplash")||_e.setAttribute("data-param-showSplash","false");var te=Ke.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var re=te.querySelector(".ggb_preview");else{var re=Jt(Dt,Je,ct.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Dt+"px",te.style.height=Je+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),ge(je)>=5?(ct.appletOnLoad=function(Ge){var pt=Ke.querySelector(".ggb_preview");pt&&pt.parentNode.removeChild(pt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(Ge)},z||te.appendChild(re)):_e.appendChild(re),te.appendChild(_e),z||Ke.appendChild(te),setTimeout(function(){on.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(_e),Ke.appendChild(le),ct.appletOnLoad=function(Ge){on.resize(),ae(Ge)}}function ne(Ge,pt){pt&&typeof pt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ge,pt.appletOnLoad):renderGGBElement(Ge),qt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",pt)}function de(Ge,pt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ge,params:pt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Rt){ne(Rt.article,Rt.params)}),html5AppletsToProcess=null)},ge(je)<5&&(Ge.className+=" geogebraweb")):ne(Ge,pt)}if(yn){scriptLoadStarted=!0;for(var Re=0;Re<_e.childNodes.length;Re++){var wt=_e.childNodes[Re].tagName;wt==="TABLE"&&(_e.removeChild(_e.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var Tt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Tt!=null&&Tt.parentNode.removeChild(Tt)}var Te=document.createElement("script"),Ye=function(){de(_e,ct)};Te.src=rt+Ze,ggbHTML5LoadedCodebaseIsWebSimple=Ee,ggbHTML5LoadedCodebaseVersion=je,ggbHTML5LoadedScript=Te.src,qt("GeoGebra HTML5 codebase loaded: '"+rt+"'.",ct),!Le&&(!ue||ue=="5.0")?(Ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ye()):rt.requirejs?__webpack_require__.e(981).then(function(){var Ge=[__webpack_require__(60981)];Ye.apply(null,Ge)}.bind(this)).catch(__webpack_require__.oe):(Te.onload=Ye,Ke.appendChild(Te))}else de(_e,ct);ct.height=Je,ct.width=Dt},Ne=function(Ke,ct,dt){var yn=Jt(ct.width,ct.height,ct.borderColor,dt),_e=document.createElement("div");_e.style.position="relative",_e.style.display="block",_e.style.width=ct.width+"px",_e.style.height=ct.height+"px",_e.className="applet_screenshot applet_scaler"+(dt?" applet_screenshot_play":""),_e.appendChild(yn);var Dt=GGBAppletUtils.getScale(ct,Ke,dt);dt?(Ke.appendChild(Et()),window.GGBT_wsf_view||(Ke.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(_e,"66%"),Ke.appendChild(_e),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(_e,Dt),_e.style.width=ct.width+"px",_e.style.height=ct.height+"px",_e.parentNode.style.width=ct.width*Dt+"px",_e.parentNode.style.height=ct.height*Dt+"px"),on.resize=function(){tt(Ke,yn,_e,dt)},window.addEventListener("resize",function(Je){on.resize()}),on.resize()};function tt(Ke,ct,dt,yn){if(Ke.contains(ct)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ke.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ke)}var _e=GGBAppletUtils.getScale(ce,Ke,yn);dt.parentNode!==null&&(!isNaN(_e)&&_e!==1?(GGBAppletUtils.scaleElement(dt,_e),dt.parentNode.style.width=ce.width*_e+"px",dt.parentNode.style.height=ce.height*_e+"px"):(GGBAppletUtils.scaleElement(dt,1),dt.parentNode.style.width=ce.width+"px",dt.parentNode.style.height=ce.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ke),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}on.onExitFullscreen=function(Ke,ct){ct.appendChild(Ke)};var Yt=function(Ke,ct,dt,yn){Ne(Ke,ct,!0);for(var _e=function(){var Ot=[];for(Je=0;Je<Ke.childNodes.length;Je++)Ot.push(Ke.childNodes[Je]);if(window.GGBT_wsf_view){var Nt=window.GGBT_wsf_view.renderFullScreen(Ke,ct.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(Ke).find(".fullscreencontent");te.length>0?(Nt.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Ue(Nt,ct,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else lt=yn,Ue(Ke,ct,!1);if(!window.GGBT_wsf_view)for(Je=0;Je<Ot.length;Je++)Ke.removeChild(Ot[Je])},Dt=Ke.getElementsByClassName("ggb_preview_play"),Je=0;Je<Dt.length;Je++)Dt[Je].addEventListener("click",_e,!1),Dt[Je].addEventListener("ontouchstart",_e,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ke),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Et=function(){var Ke=document.createElement("div");if(Ke.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ct='.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");}',dt=document.createElement("style");dt.styleSheet?dt.styleSheet.cssText=ct:dt.appendChild(document.createTextNode(ct)),document.getElementsByTagName("head")[0].appendChild(dt)}return Ke},Jt=function(Ke,ct,dt,yn){var _e=document.createElement("div");_e.className="ggb_preview",_e.style.position="absolute",_e.style.zIndex="90",_e.style.width=Ke-2+"px",_e.style.height=ct-2+"px",_e.style.top="0px",_e.style.left="0px",_e.style.overflow="hidden",_e.style.backgroundColor="white";var Dt="lightgrey";dt!==void 0&&(dt==="none"?Dt="transparent":Dt=dt),_e.style.border="1px solid "+Dt;var Je=document.createElement("img");if(Je.style.position="relative",Je.style.zIndex="1000",Je.style.top="-1px",Je.style.left="-1px",Ae!==null&&Je.setAttribute("src",Ae),Je.style.opacity=.7,ot!==null){var Ot,Nt,ae;if(!yn){Ot=document.createElement("img"),Ot.style.position="absolute",Ot.style.zIndex="1001",Ot.style.opacity=1,Je.style.opacity=.3,Nt=360,Nt>Ke/4*3&&(Nt=Ke/4*3),ae=Nt/5.8,Ot.setAttribute("src",ot),Ot.setAttribute("width",Nt),Ot.setAttribute("height",ae);var te=(Ke-Nt)/2,z=(ct-ae)/2;Ot.style.left=te+"px",Ot.style.top=z+"px",_e.appendChild(Ot)}}return _e.appendChild(Je),_e},Ht=function(Ke){return Ke=Ke.toLowerCase(),Ke==="html5"||Ke==="screenshot"?Ke:"html5"},ye=["web","webSimple","web3d","tablet","tablet3d","phone"],he=function(Ke,ct){if(je=Ke,ct){mt(je,!0);return}var dt=!Oe;if(dt){var yn=ge(je);!isNaN(yn)&&yn<4.4&&(dt=!1)}var _e,Dt;window.location.protocol.substr(0,4)==="http"?_e=window.location.protocol:_e="http:";var Je=je.indexOf("//");Je>0?Dt=je:Je===0?Dt=_e+je:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var Ot in ye)if(je.slice(ye[Ot].length*-1)===ye[Ot]||je.slice((ye[Ot].length+1)*-1)===ye[Ot]+"/"){mt(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dt&&!oe.is3D&&!oe.AV&&!oe.SV&&!oe.CV&&!oe.EV2&&!oe.CP&&!oe.PC&&!oe.DA&&!oe.FI&&!oe.PV&&!Se(ce.showToolBar)&&!Se(ce.showMenuBar)&&!Se(ce.showAlgebraInput)&&!Se(ce.enableRightClick)&&(!ce.appName||ce.appName=="classic")?Dt+="webSimple/":Dt+="web3d/",mt(Dt,!1)},mt=function(Ke,ct){if(Ke.requirejs){rt=Ke;return}Ke.slice(-1)!=="/"&&(Ke+="/"),rt=Ke,ct===null&&(ct=Ke.indexOf("http")===-1),me=ct,Ze="web.nocache.js",Ee=!1;var dt=rt.split("/");dt.length>1&&(!ct&&dt[dt.length-2]==="webSimple"?(Ze="webSimple.nocache.js",Ee=!0):ye.indexOf(dt[dt.length-2])>=0&&(Ze=dt[dt.length-2]+".nocache.js")),dt=Ke.split("/"),je=dt[dt.length-3],je.substr(0,4)==="test"?je=je.substr(4,1)+"."+je.substr(5,1):(je.substr(0,3)==="war"||je.substr(0,4)==="beta")&&(je="5.0");var yn=parseFloat(je);yn!==NaN&&yn<5&&Ke.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+yn+" is deprecated. Using version latest instead."),he("5.0",ct))},qt=function(Ke,ct){window.console&&window.console.log&&(!ct||typeof ct.showLogging=="undefined"||ct.showLogging&&ct.showLogging!=="false")&&console.log(Ke)};ce.material_id!==void 0?yt(Pt):Pt();function Pt(){var Ke=nn;ue!==null?Ke=ue:parseFloat(Ke)<5&&(Ke="5.0"),he(Ke,!1),Le!==null&&mt(Le,me),xe=!0}return on},GGBAppletUtils=function(){"use strict";function on(){return window.GGBT_wsf_edit!==void 0}function nn(xe,ue){ue!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+ue+","+ue+")",xe.style.webkitTransform="scale("+ue+","+ue+")",xe.style.maxWidth="initial",xe.querySelector(".ggb_preview")!==null&&(xe.querySelector(".ggb_preview").style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(xe.style.transform="none",xe.style.webkitTransform="none")}function ce(xe,ue,Le,Xe,be,pe){var rt=null;if(pe!=null&&pe!="")for(var me=xe.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+pe+" ")>-1){rt=me;break}else me=me.parentNode;var lt=0,je=0,Ze=0,Ee=0,Ae=0,ot=0,st=0;if(rt)lt=rt.offsetWidth,je=Math.max(Xe?rt.offsetWidth:0,rt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(lt=Math.min(window.innerWidth,document.documentElement.clientWidth),je=Math.min(window.innerHeight,document.documentElement.clientHeight),Ze=lt):(lt=window.innerWidth,je=window.innerHeight,Ze=window.innerWidth),xe){var ut=xe.getBoundingClientRect();ut.left>0&&ut.left<=lt&&(be===void 0||!be)&&(document.dir==="rtl"?(Ae=lt-ut.width-ut.left,ot=Ze<=480?10:30):(ot=ut.left,Ae=Ze<=480?10:30),Ee=ot+Ae)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Pe=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee=40,st=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ee=0,st=40)}}return xe&&((Le===void 0||!Le)&&ue>0&&ue+Ee<lt?lt=ue:lt-=Ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Le===void 0||!Le)&&(je-=st)),{width:lt,height:je}}function oe(xe,ue,Le,Xe,be){if(xe.isScreenshoGenerator)return 1;var pe=Xe!==void 0&&Xe,rt=xe.noScaleMargin!=null&&xe.noScaleMargin,me=function(Pe){return Pe&&Pe!=="false"},lt=me(xe.autoHeight),je=ce(ue,xe.width,Le,lt,pe&&window.GGBT_wsf_view||rt,be),Ze=parseInt(je.width),Ee=xe.width,Ae=xe.height;if(Ee===void 0){var ot=ue.querySelector(".appletParameters");ot&&(Ee=ot.offsetWidth,Ae=ot.offsetHeight)}var st=Ze/Ee,ut=pe?1:je.height/Ae;return Le!==void 0&&!Le&&(st=Math.min(1,st),ut=Math.min(1,ut)),Math.min(st,ut)}function Oe(xe,ue,Le){var Xe=1,be,pe=!1;if(xe.hasOwnProperty("allowUpscale")&&(pe=xe.allowUpscale),xe.hasOwnProperty("scale")&&(Xe=parseFloat(xe.scale),(isNaN(Xe)||Xe===null||Xe===0)&&(Xe=1),Xe>1&&(pe=!0)),ue&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))be=oe(xe,ue,pe,Le,xe.scaleContainerClass);else return Xe;return pe&&(!xe.hasOwnProperty("scale")||Xe===1)?be:Math.min(Xe,be)}function Me(xe){var ue=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Xe=xe.getBoundingClientRect(),be=(ue-Xe.width)/2,pe=(Le-Xe.height)/2;pe<0&&(pe=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(be<40?xe.style.left="40px":xe.style.left=be+"px",xe.style.top=pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pe<40?xe.style.top="40px":xe.style.top=pe+"px",xe.style.left=be+"px")}function nt(xe,ue){var Le=xe.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ue.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Xe=Oe(ue,xe);on()&&Le.setAttribute("data-param-scale",Xe);for(var be=null,pe=0;pe<xe.childNodes.length;pe++)if(xe.childNodes[pe].className!==void 0&&xe.childNodes[pe].className.match(/^applet_scaler/)){be=xe.childNodes[pe];break}if(be!==null&&be.querySelector(".noscale")!==null)return;var rt=ue.id!==void 0?ue.id:"ggbApplet",me=window[rt];(me==null||!me.recalculateEnvironments)&&be!==null&&!be.className.match(/fullscreen/)&&(be.parentNode.style.transform="",!isNaN(Xe)&&Xe!==1?(be.parentNode.style.width=ue.width*Xe+"px",be.parentNode.style.height=ue.height*Xe+"px",nn(be,Xe)):(nn(be,1),be.parentNode.style.width=ue.width+"px",be.parentNode.style.height=ue.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Me(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Le).parents(".content-added-content"))}}return{responsiveResize:nt,isFlexibleWorksheetEditor:on,positionCenter:Me,getScale:Oe,scaleElement:nn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(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 on=n.location.search;return on.indexOf(J)!=-1||on.indexOf(K)!=-1}function q(on,nn){}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||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(on){var nn=s[L].bindings;s[L].bindings=function(){for(var ce=nn?nn():{},oe=on[webModule.__softPermutationId],Oe=O;Oe<oe.length;Oe++){var Me=oe[Oe];ce[Me[O]]=Me[P]}return ce}};var t;function u(){return v(),t}function v(){if(!t){var on=o.createElement(Q);if(on.id=L,on.style.cssText=R+S,on.tabIndex=-1,o.body.appendChild(on),t=on.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var nn=document.compatMode==U?V:W;t.write(nn+X),t.close()}}}function w(on){function nn(oe){function Oe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Me=Oe();if(Me){oe();return}function nt(){if(!Me){if(!Oe())return;Me=!0,oe(),o.removeEventListener&&o.removeEventListener(Z,nt,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,nt,!1);var xe=setInterval(function(){nt()},$)}function ce(oe){var Oe=u(),Me=Oe.body,nt=Oe.createElement(_);nt.language=ab,nt.crossOrigin=W,nt.src=oe,webModule.__errFn&&(nt.onerror=function(){webModule.__errFn(L,new Error(bb+oe))}),Me.appendChild(nt)}nn(function(){ce(on)})}webModule.__startLoadingFragment=function(on){return C(on)},webModule.__installRunAsyncCode=function(on){var nn=u(),ce=nn.body,oe=nn.createElement(_);oe.language=ab,oe.text=on,ce.appendChild(oe),ce.removeChild(oe)};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(on){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(on){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(on){var nn=c[on];return nn==null?null:nn},r=d,webModule.__errFn=e}function B(){function on(xe){var ue=xe.lastIndexOf(rb);ue==-1&&(ue=xe.length);var Le=xe.indexOf(sb);Le==-1&&(Le=xe.length);var Xe=xe.lastIndexOf(tb,Math.min(Le,ue));return Xe>=O?xe.substring(O,Xe+P):W}function nn(xe){if(!xe.match(/^\w+:\/\//)){var ue=o.createElement(ub);ue.src=xe+vb,xe=on(ue.src)}return xe}function ce(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function oe(){for(var xe=o.getElementsByTagName(_),ue=O;ue<xe.length;++ue)if(xe[ue].src.indexOf(xb)!=-1)return on(xe[ue].src);return W}function Oe(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function Me(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var nt=ce();return nt==W&&(nt=oe()),nt==W&&(nt=Oe()),nt==W&&Me()&&(nt=on(o.location.href)),nt=nn(nt),nt}function C(on){return on.match(/^\//)||on.match(/^[a-zA-Z]+:\/\//)?on:webModule.__moduleBase+on}function D(){var on=[],nn=O,ce=[],oe=[];function Oe(xe){var ue=oe[xe](),Le=ce[xe];if(ue in Le)return ue;var Xe=[];for(var be in Le)Xe[Le[be]]=be;throw r&&r(xe,Xe,ue),null}if(__gwt_isKnownPropertyValue=function(xe,ue){return ue in ce[xe]},webModule.__getPropMap=function(){var xe={};for(var ue in ce)ce.hasOwnProperty(ue)&&(xe[ue]=Oe(ue));return xe},webModule.__computePropValue=Oe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Me;try{Me=Cb;var nt=Me.indexOf(Db);nt!=-1&&(nn=parseInt(Me.substring(nt+P),$),Me=Me.substring(O,nt))}catch(xe){}return webModule.__softPermutationId=nn,C(Me+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function(on,nn,ce){"use strict";ce.d(nn,{Ax:function(){return nt},Ds:function(){return xe},KI:function(){return Le},SI:function(){return Me},f1:function(){return Oe}});var oe=ce(90524);function Oe(Xe){let be=!0;if(Xe.length>0){for(let pe=0;pe<Xe.length;pe++)if(Xe[pe].compile_success==0||!Xe[pe].compile_success){be=!1;break}}else be=!1;return be}function Me(Xe,be=""){let pe=[];for(let rt=0;rt<Xe.length;rt++){let me=Xe[rt],lt=be?`${be}/${me.name}`:`${me.name}`;pe.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:lt})}return pe}function nt(Xe,be,pe){for(let rt=0;rt<Xe.length;rt++){let me=Xe[rt];if(me.key===be){me.children=pe;break}me.children&&nt(me.children,be,pe)}return Xe}function xe(Xe,be,pe){let rt;return function(){let me=this,lt=arguments,je=function(){rt=null,pe||Xe.apply(me,lt)},Ze=pe&&!rt;clearTimeout(rt),rt=setTimeout(je,be),Ze&&Xe.apply(me,lt)}}const ue=!0,Le=oe.Z.API_SERVER},6077:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return rt}});var oe=ce(59301),Oe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Me=ce(92310),nt=ce.n(Me),xe=ce(29787),ue=ce(2859),Le=ce(82093),Xe=ce(49661),be=(me,lt,je)=>new Promise((Ze,Ee)=>{var Ae=ut=>{try{st(je.next(ut))}catch(Pe){Ee(Pe)}},ot=ut=>{try{st(je.throw(ut))}catch(Pe){Ee(Pe)}},st=ut=>ut.done?Ze(ut.value):Promise.resolve(ut.value).then(Ae,ot);st((je=je.apply(me,lt)).next())}),rt=({data:me,className:lt,fullWidth:je,style:Ze={},onClose:Ee,onOk:Ae,showFullTools:ot,noAssociationId:st})=>{const ut=(0,oe.useRef)(null),Pe=(0,oe.useRef)(null),ge=(0,oe.useRef)(null),Be=(0,oe.useRef)(null),[ze,yt]=(0,oe.useState)(!1),[Ce,we]=(0,oe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,oe.useEffect)(()=>(ge.current||(ge.current=document.createElement("style"),document.head.appendChild(ge.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),ge.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&We()):(document.body.removeAttribute("data-custom"),ge.current&&(document.head.removeChild(ge.current),ge.current=null)),()=>{document.body.removeAttribute("data-custom"),ge.current&&(document.head.removeChild(ge.current),ge.current=null)}),[me==null?void 0:me.visible]);const We=()=>be(void 0,null,function*(){yt(!0),we("\u6B63\u5728\u52A0\u8F7D\u4E2D");const tt=yield(0,Xe.ZJ)(me==null?void 0:me.src);ut.current.src="",ut.current.src=tt,ut.current.onload=function(){Ne()},yt(!1),we("")}),Se=tt=>be(void 0,null,function*(){yt(!0),we("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Yt=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:tt.dataUrl}});Yt!=null&&Yt.id&&!st?(yield(0,Le.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:Yt==null?void 0:Yt.id,settings:JSON.stringify(tt.state)}})).status===0&&Ae():Yt!=null&&Yt.id&&Ae(Yt),yt(!1),we("")}),Ue=()=>{const tt=document.querySelector('a[href="https://markerjs.com/"]');tt&&tt.parentNode&&(tt.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Et=>{const Jt=document.querySelector(Et.name);Jt&&Jt.setAttribute("title",Et.title)})},Ne=()=>{Pe.current=new ue.hP(ut.current),Pe.current.targetRoot=Be.current,Pe.current.addEventListener("render",Se),Pe.current.addEventListener("beforeclose",Ee),ot&&(Pe.current.availableMarkerTypes=Pe.current.ALL_MARKER_TYPES,Pe.current.uiStyleSettings.redoButtonVisible=!0,Pe.current.uiStyleSettings.notesButtonVisible=!0,Pe.current.uiStyleSettings.zoomButtonVisible=!0,Pe.current.uiStyleSettings.zoomOutButtonVisible=!0,Pe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Pe.current.uiStyleSettings,Pe.current.show(),me!=null&&me.snapshotData&&Pe.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ue()},300)};return oe.createElement(oe.Fragment,null,(me==null?void 0:me.visible)&&oe.createElement(xe.Z,{spinning:ze,tip:Ce,style:{position:"absolute",width:"100vw"}},oe.createElement("div",{ref:Be,className:nt()(Oe.imageDimensions,lt,je?Oe.fullWidth:""),style:Ze},oe.createElement("img",{className:Oe.img,ref:ut}))))}},88615:function(on,nn,ce){"use strict";var oe=ce(59301),Oe=ce(77019),Me=ce(5269),nt=ce(20554),xe=ce(99571),ue=ce(38394),Le=ce(21697),Xe=ce(48136),be=ce(59301);const pe=(0,oe.forwardRef)(({callback:rt,showSaveButton:me,value:lt=""},je)=>{const Ze=(0,oe.useRef)(),Ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 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:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 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:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 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:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 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:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF 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:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 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 "}]}]}],Ae=[{name:"\u4EE3\u6570",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
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",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
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\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
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\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
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",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
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\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
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
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
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",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:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C 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:"\u7EDF\u8BA1",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
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\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
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\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
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],ot=Pe=>{Ze.current.setValue(Ze.current.getValue()+" "+Pe.value+" ")},st=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:be.createElement(Oe.Z,{className:Le.Z.lists,gutter:[10,10]},Ee.map((Pe,ge)=>be.createElement(Me.Z,{flex:"110px",className:Le.Z.item},be.createElement("div",null,be.createElement(ue.Z,{value:`$$${Pe.value}$$`}),Pe.name),be.createElement("div",{className:Le.Z.children},Pe.children.map((Be,ze)=>be.createElement("div",{key:ze},be.createElement("h1",null,Be.name),be.createElement(Oe.Z,{gutter:[10,10]},Be.data.map((yt,Ce)=>be.createElement(Me.Z,{key:Ce,onClick:()=>ot(yt),className:Le.Z.diamond},be.createElement(ue.Z,{value:"`$$"+yt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:be.createElement(Oe.Z,{className:Le.Z.lists,gutter:[10,10]},Ae.map((Pe,ge)=>be.createElement(Me.Z,{flex:"110px",className:Le.Z.item},be.createElement("div",null,be.createElement(ue.Z,{value:"`$$"+Pe.value+"$$`"}),Pe.name),be.createElement("div",{className:Le.Z.children},Pe.children.map((Be,ze)=>be.createElement("div",{key:ze},Be.name&&be.createElement("h1",null,Be.name),be.createElement(Oe.Z,{gutter:[10,10]},Be.data.map((yt,Ce)=>be.createElement(Me.Z,{key:Ce,onClick:()=>ot(yt),className:Le.Z.diamond},be.createElement(ue.Z,{value:"`$$"+yt.value+"$$`"}))))))))))}],ut=()=>{var Pe=document.createElement("div");Pe.innerHTML=Ze.current.getValue();var ge=Pe.innerText;return rt&&rt(ge),ge};return(0,oe.useImperativeHandle)(je,()=>({getData:ut})),be.createElement("div",{className:Le.Z.mathWrap},be.createElement(nt.default,{defaultActiveKey:"1",items:st}),be.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ze,style:{width:800,marginTop:30,fontSize:18}},lt||""),me&&be.createElement("div",{className:Le.Z.button},be.createElement(xe.ZP,{size:"large",onClick:ut,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});nn.Z=pe},57884:function(on,nn,ce){"use strict";var oe=ce(59301),Oe=ce(93314),Me=ce(99571),nt=Object.defineProperty,xe=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,pe=(je,Ze,Ee)=>Ze in je?nt(je,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):je[Ze]=Ee,rt=(je,Ze)=>{for(var Ee in Ze||(Ze={}))Xe.call(Ze,Ee)&&pe(je,Ee,Ze[Ee]);if(Le)for(var Ee of Le(Ze))be.call(Ze,Ee)&&pe(je,Ee,Ze[Ee]);return je},me=(je,Ze)=>xe(je,ue(Ze));const lt=({img:je,buttonProps:Ze={},styles:Ee={},customText:Ae,ButtonText:ot,ButtonClick:st,Buttonclass:ut,ButtonTwo:Pe,imgStyles:ge,loading:Be=!1,className:ze=""})=>oe.createElement("section",{className:`tc animated fadeIn ${ze}`,style:rt({color:"#999",margin:"100px auto",visibility:Be?"hidden":"visible"},Ee)},oe.createElement("img",{src:je||Oe,style:me(rt({},ge),{pointerEvents:"none",userSelect:"none"})}),oe.createElement("p",{className:"mt20 font14"},Ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ot&&oe.createElement(Me.ZP,rt({className:ut,onClick:st},Ze),ot),Pe&&Pe);nn.Z=lt},41550:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return ut}});var oe=ce(59301),Oe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Me=ce(99571),nt=ce(70557),xe=ce(51124),ue=ce(25399),Le=ce(49661),Xe=ce(72664),be=ce(57884),pe=ce(90524),rt=ce(14794),me=ce(59301),lt=Object.defineProperty,je=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Ae=(Pe,ge,Be)=>ge in Pe?lt(Pe,ge,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Pe[ge]=Be,ot=(Pe,ge)=>{for(var Be in ge||(ge={}))Ze.call(ge,Be)&&Ae(Pe,Be,ge[Be]);if(je)for(var Be of je(ge))Ee.call(ge,Be)&&Ae(Pe,Be,ge[Be]);return Pe},st=(Pe,ge,Be)=>new Promise((ze,yt)=>{var Ce=Se=>{try{We(Be.next(Se))}catch(Ue){yt(Ue)}},we=Se=>{try{We(Be.throw(Se))}catch(Ue){yt(Ue)}},We=Se=>Se.done?ze(Se.value):Promise.resolve(Se.value).then(Ce,we);We((Be=Be.apply(Pe,ge)).next())}),ut=({editOffice:Pe="view",data:ge,issaver:Be,onSaver:ze,theme:yt,type:Ce,filename:we,monacoEditor:We,className:Se,style:Ue,close:Ne,onClose:tt,hasMask:Yt,disabledDownload:Et,onImgDimensions:Jt,showNodata:Ht,recordInfo:ye})=>{const[he,mt]=(0,oe.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[qt,Pt]=(0,oe.useState)(""),[Ke,ct]=(0,oe.useState)(),dt=window.ENV==="build"?"/react/build":"",yn=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,Dt=10*(1024*1024),Je=(0,oe.useRef)();ge!=null&&ge.startsWith("/api")&&Ce!=="txt"&&(ge=pe.Z.API_SERVER+ge);const Ot=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();we&&We&&(We.filename=we),(0,oe.useEffect)(()=>{var re,le;const ne=(le=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:le.split(";");ne==null||ne.map(de=>{let Re=de.split("=");Re[0]==="_educoder_session"&&Pt(Re[1])})},[]),(0,oe.useEffect)(()=>{Ce==="office"&&(ge.indexOf("bigfilescdn.")>-1||ge.indexOf("bigfiles1")>-1?ct({url:ge,fileType:Ot(ge),model:ge.indexOf("model=edit")?"edit":"view"}):ae())},[Ce,ge]);function Nt(re){return st(this,null,function*(){re.data.type==="pdfdata"&&(ze(re.data.data),window.removeEventListener("message",Nt,!1)),console.log("mess---:",re.data)})}const ae=()=>st(void 0,null,function*(){console.log("data:",ge);let re=ge;ge.startsWith("http")||(re=location.origin+re);let le=new URL(re).pathname.split("/").pop();const ne=yield(0,Xe.gJ)({attachment_id:le});ne.url=yn+ne.url,ct(ne)}),te=()=>{if(ge.startsWith("http")||ge.startsWith("blob:")){z();return}(0,Le.Sv)(we||"educoder",ge,we)},z=()=>{ye&&(0,rt.fc)({id:ye==null?void 0:ye.id,watch_type:1,course_id:ye==null?void 0:ye.course_id}),(0,Le.Nd)(we||"educoder",decodeURIComponent(ge))};return me.createElement("div",{style:ot({},Ue||{}),className:`${Yt&&Oe.bgBlack} ${Ce?Oe.wrp:"hide"}`},Ne&&me.createElement("div",{className:Oe.close,ref:Je},!!Jt&&me.createElement(ue.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Je.current},me.createElement("span",{onClick:()=>{tt(),Jt()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Et&&me.createElement(ue.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Je.current},me.createElement("span",{onClick:z},me.createElement("i",{className:"icon-quxiaozhiding"}))),Be&&me.createElement(ue.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Je.current},me.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",Nt,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(ue.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Je.current},me.createElement("span",{className:"",onClick:()=>{tt()}},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Oe[Se]} ${Se} ${Oe.monaco} ${Ce==="txt"?"show":"hide"}`},Ce==="txt"&&me.createElement(me.Fragment,null,me.createElement(xe.ZP,ot({},We)))),Ce==="audio"&&me.createElement("audio",{src:`${(ge==null?void 0:ge.indexOf("http://"))>-1||(ge==null?void 0:ge.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ge}`,autoPlay:!0}),Ce==="video"&&me.createElement(me.Fragment,null,(ge==null?void 0:ge.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${ge}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ge}`,autoPlay:!0})),Ce==="office"&&Ke&&me.createElement("iframe",{src:`${dt}/office.html?key=${Ke.key}&url=${btoa(Ke.url)}&callbackUrl=${yn+(Ke.callbackUrl||"")}&fileType=${Ke.fileType}&title=${Ke.title||""}&model=${Pe}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!Et}`}),Ce==="html"&&me.createElement("iframe",{src:ge+"&disposition=inline"}),Ce==="pdf"&&me.createElement("iframe",{id:"pdfiframe",src:`${dt}/js/pdfview/index.html?filename=${we||"educoder.pdf"}&url=${encodeURIComponent(ge)}&disabledDownload=${!!Et}&model=${Pe}`}),Ce==="image"&&me.createElement("img",{src:`${(ge==null?void 0:ge.indexOf("http://"))>-1||(ge==null?void 0:ge.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ge}`}),(Ce==="other"||Ce==="download")&&me.createElement(me.Fragment,null,Ht?me.createElement(be.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(Me.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:Et},"\u4E0B\u8F7D")}):me.createElement(Me.ZP,{type:"primary",size:"middle",onClick:te,disabled:Et},me.createElement(nt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ce==="flowChart"&&me.createElement("div",{className:"embed"},me.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ge||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(on,nn,ce){"use strict";ce.d(nn,{z:function(){return We},Z:function(){return Se}});var oe=ce(59301),Oe=ce(88831),Me=ce(90290),nt=ce(64018),xe=ce(68535),ue=ce(90524),Le=ce(49661),Xe=ce(15342),be=ce(77736),pe=ce(99571),rt=ce(1012),me=ce(41550),lt=ce(59301),Ze=({html:Ue})=>{const Ne=(0,oe.useRef)(null),tt=(0,oe.useRef)(null),Yt=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,oe.useEffect)(()=>{const Et=Ne.current.attachShadow({mode:"open"});tt.current=document.createElement("div"),tt.current.className="markdown-body",tt.current.innerHTML=Ue,Et.appendChild(tt.current);const Jt=document.createElement("style");return Jt.textContent=Yt,Et.appendChild(Jt),()=>{Et.innerHTML=""}},[]),(0,oe.useEffect)(()=>{tt.current&&(tt.current.innerHTML=Ue)},[Ue]),lt.createElement("div",{ref:Ne})};function Ee(Ue){const Ne=["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"],tt=new RegExp(`\\b(${Ne.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ue.replace(tt,"").trim()}var Ae={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ot=Object.defineProperty,st=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,ge=(Ue,Ne,tt)=>Ne in Ue?ot(Ue,Ne,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Ue[Ne]=tt,Be=(Ue,Ne)=>{for(var tt in Ne||(Ne={}))ut.call(Ne,tt)&&ge(Ue,tt,Ne[tt]);if(st)for(var tt of st(Ne))Pe.call(Ne,tt)&&ge(Ue,tt,Ne[tt]);return Ue};const ze="@\u2581\u2581@",yt="@\u2581@",Ce=/<pre[^>]*>/g;function we(Ue){let Ne=document.createElement("div");return Ne.innerHTML=Ue,Ne.childNodes.length===0?"":Ne.childNodes[0].nodeValue}const We=(Ue,Ne)=>{Ue=Ue||"";const tt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Yt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Jt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ne?Ue.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(tt,(Ht,ye,he,mt,qt,Pt,Ke)=>{const ct=ye||mt||Pt,dt=he||qt||Ke||"?";return ue.Z.API_SERVER+"/api/attachments/"+ct+dt+"&t="+(0,Le.Jn)(ct,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ue=Ue.replace(Jt,(Ht,ye,he,mt,qt,Pt,Ke)=>{const ct=ye||mt||Pt,dt=he||qt||Ke||"?";return ue.Z.API_SERVER+"/attachments/download/"+ct+dt+"&t="+(0,Le.Jn)(ct,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(tt,(Ht,ye,he,mt,qt,Pt,Ke)=>{const ct=ye||mt||Pt,dt=he||qt||Ke||"?";return ue.Z.API_SERVER+"/api/attachments/"+ct+dt+"&t="+(0,Le.Jn)(ct,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(Yt,(Ht,ye,he,mt,qt)=>{const Pt=ye||mt,Ke=he||qt||"";return'"'+ue.Z.API_SERVER+"/api/attachments/"+Pt+Ke+Pt+Ke+"&t="+(0,Le.Jn)(Pt,Date.now())}).replace(Et,(Ht,ye,he,mt,qt)=>{const Pt=ye||mt,Ke=he||qt||"";return"("+ue.Z.API_SERVER+"/files/uploads/"+Pt+Ke+Pt+Ke+"&t="+(0,Le.Jn)(Pt,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,`
|
|
`),Ue)};var Se=({value:Ue="",edit:Ne=!1,className:tt,showTextOnly:Yt,showLines:Et,style:Jt={},stylesPrev:Ht={},highlightKeywords:ye,showProgramFill:he,isProgramFill:mt,disabledFill:qt=!1,programFillValue:Pt,openEditor:Ke=()=>{},onFillChange:ct=_e=>{},onFillBlur:dt=()=>{},onFillFocus:yn=()=>{}})=>{let _e=Ee(String(Ue||""));const Dt=(0,oe.useRef)(),Je=(0,oe.useRef)(),[Ot,Nt]=(0,oe.useState)(""),[ae,te]=(0,oe.useState)("office"),[z,re]=(0,oe.useState)([]),le=(0,oe.useRef)("a"+(0,rt.Z)()),ne={},de=$e=>/<style[\s\S]*?>/i.test($e||""),Re=($e,un,Mt)=>{const Ut=document.createElement($e===yt?"input":"textarea");Ut.style.width="100%",Ut.style.height=$e===yt?"40px":"151px",Ut.rows=5,Ut.spellcheck=!1,Ut.name="edu-program-fill",Ut.placeholder="\u8BF7\u8F93\u5165",Ut.dataset.id=un;const vn=Object.keys(ne).length;return ne[vn]=Ut,`<span class="edu-program-fill-wrap ${$e===yt?"":"show"}" style="width:${$e===yt?"600px":"100%"}" title=${Mt||""}><span>${Ut.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function wt($e){return $e=$e.replace(/!\[.*?\]\(.*?\)/g,""),$e=$e.replace(/\[.*?\]\(.*?\)/g,""),$e=$e.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),$e=$e.replace(/<embed.*?>/g,""),$e=$e.replace(/<img.*?>/g,""),$e=$e.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),$e=$e.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),$e=$e.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),$e=$e.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),$e}const Tt=$e=>!Yt&&de(_e)?$e:$e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(un,Mt){let Ut=Mt.replace(/(\n|\r)/g,"").split("}"),vn=[];return Ut.map(Pn=>{Pn!=""&&vn.push(`.${le.current} ${Pn}`)}),`<style>${vn.join("}")}</style>`}),Te=(0,oe.useMemo)(()=>{try{const Ut=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,vn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Kt=/\(\/attachments\/download\//g;_e=_e.replace(Kt,"("+ue.Z.API_SERVER+"/attachments/download/").replace(Ut,"("+ue.Z.API_SERVER+"/api/attachments/").replace(vn,'"'+ue.Z.API_SERVER+"/api/attachments/").replace(Pn,'"'+ue.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,`
|
|
`),Dt.current.style.display="none"}catch(Ut){}if(he){let Ut=-1;return _e=_e.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(vn,Pn,Kt){var kn;return++Ut,Re(vn,Ut,(kn=Pt==null?void 0:Pt[Ut])==null?void 0:kn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Tt(_e||"")}</pre>`}let $e=Tt(_e);$e=(0,Me.ZP)($e);const un=(0,Me.ez)();_e.match(/\[TOC\]/)&&($e=$e.replace("<p>[TOC]</p>",(0,Me.Qv)()),(0,Me.Iy)()),$e=$e.replace(/(__special_katext_id_\d+__)/g,(Ut,vn)=>{const{type:Pn,expression:Kt}=un[vn];return(0,Xe.renderToString)(we(Kt)||"",{displayMode:Pn==="block",throwOnError:!1,output:"html"})}),$e=$e.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Me.AL)();const Mt=document.createElement("div");if(Mt.innerHTML=$e,Yt)return Mt.innerText;if(ye){const Ut=ye.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Rt(Mt,Ut),Mt.innerHTML}return setTimeout(()=>ln(),500),Mt.innerHTML},[_e,ye]);(0,oe.useEffect)(()=>{Vt.current&&Vt.current.querySelectorAll(["input","textarea"]).forEach(un=>{un.oninput=Ye,un.onblur=Ge,un.onfocus=pt})},[z]),(0,oe.useEffect)(()=>{var $e,un,Mt,Ut,vn;if(Pt!=null&&Pt.length)try{const Pn=Vt.current.querySelectorAll(".edu-program-fill-score"),Kt=Vt.current.querySelectorAll('[name="edu-program-fill"]');for(const[kn,tr]of Kt.entries())tr.value=(($e=Pt==null?void 0:Pt[kn])==null?void 0:$e.value)||"",((un=Pt==null?void 0:Pt[kn])==null?void 0:un.type)==="warning"?tr.className="program-fill-warning":((Mt=Pt==null?void 0:Pt[kn])==null?void 0:Mt.type)==="success"?tr.className="program-fill-success":tr.className="";for(const[kn,tr]of Pn.entries())tr.innerHTML=(Ut=Pt==null?void 0:Pt[kn])!=null&&Ut.score?`${(vn=Pt==null?void 0:Pt[kn])==null?void 0:vn.score}\u5206`:"";re(Pt)}catch(Pn){console.log(Pn,"error")}},[Pt]);const Ye=$e=>{z[$e.target.dataset.id]=z[$e.target.dataset.id]||{},z[$e.target.dataset.id].value=$e.target.value,re([...z]),ct(z,$e.target.dataset.id)},Ge=$e=>{z[$e.target.dataset.id]=z[$e.target.dataset.id]||{},z[$e.target.dataset.id].value=$e.target.value,re([...z]),dt(z,$e.target.dataset.id)},pt=$e=>{z[$e.target.dataset.id]=z[$e.target.dataset.id]||{},z[$e.target.dataset.id].value=$e.target.value,re([...z]),yn(z,$e.target.dataset.id)};function Rt($e,un){return $e.childNodes.forEach(Mt=>{var Ut;if(Mt.childNodes.length>0)Rt(Mt,un);else if(Mt.nodeName!=="IMG")if(Mt.innerHTML)Mt.innerHTML=(Ut=Mt.innerHTML)==null?void 0:Ut.replace(new RegExp(un,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const vn=document.createElement("span");vn.innerHTML=Mt.textContent.replace(new RegExp(un,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Mt.replaceWith(vn)}})}const Vt=(0,oe.useRef)();Me.jb.WebkitLineClamp=Et,Et&&(Jt=Be(Be({},Jt),Me.jb));function kt($e){let un=$e.target;if(un.tagName.toUpperCase()==="A"){let Mt=un.getAttribute("href");if(Mt.indexOf("office")>-1)$e.preventDefault(),Nt(Mt),te("office");else if(Mt.indexOf("application/pdf")>-1)$e.preventDefault(),Nt(Mt),te("pdf");else if(Mt.indexOf("text/html")>-1)$e.preventDefault(),Nt(Mt),te("html");else if(Mt.startsWith("#")){$e.preventDefault();let Ut=document.getElementById(Mt.replace("#",""));Ut&&Ut.scrollIntoView(!0)}}}const ln=()=>{var $e;const un=($e=Vt.current)==null?void 0:$e.querySelectorAll("video");un==null||un.forEach(Mt=>{if(Mt.oncontextmenu=()=>!1,Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(xe.ZP.isSupported()){var Ut=new xe.ZP;Ut.loadSource(Mt.src),Ut.attachMedia(Mt)}}})};(0,oe.useEffect)(()=>{if(Vt.current&&Te&&Te.match(Ce)&&window.PR.prettyPrint(),Vt.current)return Vt.current.addEventListener("click",kt),()=>{var $e;($e=Vt.current)==null||$e.removeEventListener("click",kt),(0,Me.AL)(),(0,Me.Iy)()}},[Te,Vt.current,kt]);const $t=$e=>{$e.target.nodeName==="IMG"&&$e.target.className.indexOf("draw-flowchart")>-1?(Dt.current.style.zIndex=1,Dt.current.style.display="flex",Dt.current.style.width=$e.target.clientWidth+"px",Dt.current.style.height=$e.target.clientHeight+"px",Dt.current.style.top=$e.target.offsetTop+"px",Dt.current.style.left=$e.target.offsetLeft+"px",$e.target.id&&(Je.current=$e.target.id)):Dt.current.style.display="none"},_t=()=>{Dt.current.style.display="none"};return(0,oe.useEffect)(()=>{var $e;const un=Mt=>{Mt.preventDefault(),Mt.clipboardData.setData("text",window.getSelection().toString())};return($e=Vt.current)==null||$e.addEventListener("copy",un),()=>{var Mt;(Mt=Vt.current)==null||Mt.removeEventListener("copy",un)}},[Vt.current]),oe.createElement("div",{style:{position:"relative"},onMouseLeave:_t},Yt&&oe.createElement("div",{ref:Vt,className:`${Ae.mdBody} `},Te),!Yt&&!de(Te)&&oe.createElement("div",{ref:Vt,style:Be({},Jt),onMouseOver:$t,className:`${tt||""} ${qt?"disabled-fill":""} markdown-body ${Ae.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:Te}}),!Yt&&de(Te)&&oe.createElement(Ze,{html:Te}),oe.createElement("div",{ref:Dt,className:`${Ae.button} ${Ne?"":Ae.previewFlowChart}`},oe.createElement(be.Z,null,oe.createElement(pe.ZP,{onClick:()=>{Ne?Ke(Je.current):(Nt(Je.current),te("flowChart"))}},Ne?"\u7F16\u8F91":"\u9884\u89C8"))),oe.createElement(me.Z,{close:!0,data:Ot,type:Ot!=null&&Ot.length?ae:"",style:Be({},Ht),onClose:()=>Nt("")}))}},44905:function(on,nn,ce){"use strict";ce.d(nn,{h:function(){return Pe}});var oe=ce(59301),Oe=ce(82326),Me=ce(28284),nt=ce(99571),xe=ce(89780),ue=ce.n(xe),Le=ce(66543),Xe=ce(59598),be=Object.defineProperty,pe=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Ze=(ge,Be,ze)=>Be in ge?be(ge,Be,{enumerable:!0,configurable:!0,writable:!0,value:ze}):ge[Be]=ze,Ee=(ge,Be)=>{for(var ze in Be||(Be={}))lt.call(Be,ze)&&Ze(ge,ze,Be[ze]);if(me)for(var ze of me(Be))je.call(Be,ze)&&Ze(ge,ze,Be[ze]);return ge},Ae=(ge,Be)=>pe(ge,rt(Be));const ot=Oe.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},ut={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"]};nn.Z=({callback:ge,onCancel:Be})=>{const[ze,yt]=(0,oe.useState)("python");function Ce(We){yt(ut[We][1])}function we(We){ge(We)}return oe.createElement(Me.default,Ae(Ee({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:we,style:{width:500}}),oe.createElement(Me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},oe.createElement(Oe.default,{getPopupContainer:We=>We.parentNode,onChange:Ce},Object.keys(ut).map(We=>oe.createElement(ot,{key:We,value:We},ut[We][0])))),oe.createElement(Me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},oe.createElement(Pe,{mode:ze})),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(nt.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))};function Pe({value:ge,onChange:Be,mode:ze,options:yt={}}){const Ce=(0,oe.useRef)(),[we,We]=(0,oe.useState)();return(0,oe.useEffect)(()=>{if(we){let Se=function(Ue){const Ne=Ue.getValue();Be&&Be(Ne)};return we.on("change",Se),()=>{we.off("change",Se)}}},[we,Be]),(0,oe.useEffect)(()=>{we&&we.setOption("mode",ze)},[we,ze]),(0,oe.useEffect)(()=>{we&&(ge!==we.getValue()||ge==="")&&setTimeout(()=>{we.setValue(ge||"")},300)},[we,ge]),(0,oe.useEffect)(()=>{if(Ce.current&&!we){const Se=ue().fromTextArea(Ce.current,Ee({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},yt));We(Se)}},[Ce.current,we]),oe.createElement("div",{className:"my-codemirror-container"},oe.createElement("textarea",{ref:Ce}))}},2978:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return kr}});var oe=ce(59301),Oe=ce(76560),Me=ce(89780),nt=ce.n(Me),xe=ce(76374),ue=ce(66543),Le=ce(6313),Xe=ce(25717),be=ce(99498),pe=ce(25419),rt=ce(67549),me=ce(38394),lt=({value:gn="",className:Ln,showTextOnly:Mn,showLines:_n,style:Tr={}})=>{const xr=(0,oe.useMemo)(()=>"",[gn]);return oe.createElement(oe.Fragment,null,oe.createElement("div",{dangerouslySetInnerHTML:{__html:xr}}))},je=Object.defineProperty,Ze=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,ut=(gn,Ln,Mn)=>Ln in gn?je(gn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:Mn}):gn[Ln]=Mn,Pe=(gn,Ln)=>{for(var Mn in Ln||(Ln={}))ot.call(Ln,Mn)&&ut(gn,Mn,Ln[Mn]);if(Ae)for(var Mn of Ae(Ln))st.call(Ln,Mn)&&ut(gn,Mn,Ln[Mn]);return gn},ge=(gn,Ln)=>Ze(gn,Ee(Ln));let Be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function ze({onActionCallback:gn,title:Ln,icon:Mn,actionName:_n,className:Tr="",children:xr}){function Hr(){gn(_n)}return oe.createElement("a",{title:Ln,className:Tr,onClick:Hr},oe.createElement("i",{className:`${Mn}`}),xr)}var yt=({watch:gn,showNullButton:Ln,showNullProgramButton:Mn,onActionCallback:_n,fullScreen:Tr,insertTemp:xr,hidetoolBar:Hr,extraUse:br})=>{const or=[...Be,{title:`${gn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${gn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return oe.createElement("ul",{className:"markdown-toolbar-container"},!Hr&&or.map((Fr,dn)=>oe.createElement("li",{key:dn},Fr.actionName?oe.createElement(ze,ge(Pe({},Fr),{onActionCallback:_n})):oe.createElement("span",{className:"v-line"}))),Ln?oe.createElement("li",null,oe.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:_n},oe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Mn?oe.createElement(oe.Fragment,null,oe.createElement("li",null,oe.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:_n},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),oe.createElement("li",null,oe.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:_n},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,xr&&oe.createElement("li",null,oe.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${xr}`,onActionCallback:_n},oe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),br&&oe.createElement("li",null,br),oe.createElement("li",{className:"btn-full-screen"},oe.createElement(ze,{icon:`${Tr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Tr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:_n})))},Ce=ce(75790),we=ce(28284),We=ce(37568),Se=ce(99571),Ue=Object.defineProperty,Ne=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,Yt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,Ht=(gn,Ln,Mn)=>Ln in gn?Ue(gn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:Mn}):gn[Ln]=Mn,ye=(gn,Ln)=>{for(var Mn in Ln||(Ln={}))Et.call(Ln,Mn)&&Ht(gn,Mn,Ln[Mn]);if(Yt)for(var Mn of Yt(Ln))Jt.call(Ln,Mn)&&Ht(gn,Mn,Ln[Mn]);return gn},he=(gn,Ln)=>Ne(gn,tt(Ln));const mt={labelCol:{span:4},wrapperCol:{span:20}};var qt=({callback:gn,onCancel:Ln})=>{function Mn(_n){gn(_n)}return oe.createElement(we.default,he(ye({},mt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Mn,style:{width:500}}),oe.createElement(we.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},oe.createElement(We.default,null)),oe.createElement(we.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},oe.createElement(We.default,null)),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Se.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},Pt=ce(44905),Ke=ce(45596),ct=ce(62957),dt=ce(77019),yn=ce(6077),_e=ce(59301),Dt=({callback:gn,onCancel:Ln})=>{const Mn=document.createElement("canvas"),_n=Mn.getContext("2d");Mn.width=1e3,Mn.height=800,_n.fillStyle="#ffffff",_n.fillRect(0,0,Mn.width,Mn.height);const Tr=Mn.toDataURL("image/png");return _e.createElement(ct.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},_e.createElement(dt.Z,{style:{height:"100vh"}},_e.createElement(yn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Tr,visible:!0,title:String(Date.now())},onOk:xr=>{gn({src:xr.url})},onClose:Ln})))},Je=ce(30641),Ot=ce(5269),Nt=ce(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=ce(59301),re=(0,oe.forwardRef)(({onCancel:gn,editImgId:Ln,callback:Mn},_n)=>{let Tr=(0,oe.useRef)(),xr=(0,oe.useRef)(),Hr=(0,oe.useRef)(),br=(0,oe.useRef)(!1);const or=(0,oe.useRef)(!1);console.log("ref:",_n);const[Fr,dn]=(0,oe.useState)(0),[St,cn]=(0,oe.useState)("100vh");return(0,oe.useEffect)(()=>{dn(1)},[]),(0,oe.useImperativeHandle)(_n,()=>({setHeight:cn})),te.createElement("div",{ref:or,className:"body-overflow-initial"},te.createElement(Je.Z,{width:"100vw",height:St,footer:null,closable:!0,placement:"bottom",open:!!Fr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(nr=>{Mn({src:`/api/attachments/${nr}`,id:nr})})},title:te.createElement(dt.Z,{align:"middle"},te.createElement(Ot.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(Ot.Z,{onClick:()=>{cn(St==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(Ot.Z,{onClick:()=>{window.saveDrawData(nr=>{if(nr===null){Nt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Nt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Mn({src:`/api/attachments/${nr}`,id:nr,disabledClose:!0})})}},te.createElement(Se.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Ln||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:xr})))}),le=ce(90524),ne=ce(47889),de=ce(71051);const Re=ne.ZP.Group,wt={margin:"0 8px"};var Tt=({callback:gn,onCancel:Ln})=>{function Mn(_n){gn(_n)}return oe.createElement(we.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Mn},oe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},oe.createElement("span",{style:wt},"\u5355\u5143\u683C\u6570\uFF1A"),oe.createElement("span",{style:wt},"\u884C\u6570"),oe.createElement(we.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},oe.createElement(de.Z,null)),oe.createElement("span",{style:wt},"\u5217\u6570"),oe.createElement(we.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},oe.createElement(de.Z,null))),oe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},oe.createElement("span",{style:wt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),oe.createElement(we.default.Item,{name:"align"},oe.createElement(Re,null,oe.createElement(ne.ZP,{value:"default"},oe.createElement("i",{className:"fa fa-align-justify"})),oe.createElement(ne.ZP,{value:"left"},oe.createElement("i",{className:"fa fa-align-left"})),oe.createElement(ne.ZP,{value:"center"},oe.createElement("i",{className:"fa fa-align-center"})),oe.createElement(ne.ZP,{value:"right"},oe.createElement("i",{className:"fa fa-align-right"}))))),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Se.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},Te=ce(71411),Ye=ce(11081),Ge=ce.n(Ye),Rt=(0,oe.forwardRef)(({use3d:gn,width:Ln,height:Mn,callback:_n,showSaveButton:Tr},xr)=>{const Hr=(0,oe.useRef)(),br=(0,oe.useRef)(),[or,Fr]=(0,oe.useState)(!1),dn=(0,oe.useRef)({id:Hr,appName:"graphing",width:Ln||1e3,height:Mn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,oe.useEffect)(()=>{br.current=new(Ge())(dn.current,!0),window.onload=function(){br.current.inject("applet_container")}},[]);const St=()=>{var cn=window.ggbApplet.getPNGBase64(1,!0,72);return _n&&_n(cn),cn};return(0,oe.useEffect)(()=>{dn.current.appName=or?"3D":"graphing",br.current.inject("applet_container")},[or]),(0,oe.useEffect)(()=>{Fr(gn)},[gn]),(0,oe.useImperativeHandle)(xr,()=>({getImgData:St})),oe.createElement(oe.Fragment,null,oe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Hr}),oe.createElement(dt.Z,{align:"middle"},oe.createElement(Ot.Z,{flex:1},oe.createElement(Te.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:or,onChange:cn=>Fr(cn)})),oe.createElement(Ot.Z,null,oe.createElement(Se.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Vt=ce(88615);const kt="link",ln="upload-image",$t="add-flowchart",_t="draw-image",$e="add-flowchart",un="code-block",Mt="add-table",Ut="------------",vn={default:Ut,left:`:${Ut}`,center:`:${Ut}:`,right:`${Ut}:`};var Pn=ce(17904),Kt=ce(49661);function kn(){}let tr=0;const Jn=1e4,Ft="\u2581",Bt="@\u2581\u2581@",At="@\u2581@",xn=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,wn=["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 zn(gn){return/^\d+$/.test(gn)?`${gn}px`:gn}const mn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xt={[mn+"-B"]:"bold",[mn+"-I"]:"italic"},Nn={[kt]:"\u6DFB\u52A0\u94FE\u63A5",[un]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ln]:"\u6DFB\u52A0\u56FE\u7247",[_t]:"\u6DFB\u52A0\u753B\u56FE",[$t]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Mt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var kr=({defaultValue:gn="",onChange:Ln,width:Mn="100%",height:_n=400,miniToolbar:Tr=!1,isFocus:xr=!1,watch:Hr,insertTemp:br,mode:or="markdown",id:Fr="markdown-editor-id",showResizeBar:dn=!1,noStorage:St=!1,showNullButton:cn=!1,showNullProgramButton:nr=!1,hidetoolBar:Er=!1,fullScreen:Fe=!1,onBlur:He,onCMBeforeChange:rn,onFullScreen:zt,className:Qe="",disablePaste:jt=!1,disabled:sn=!1,disabledFill:hn=!1,placeholder:bn="",values:pn="",extraUse:Cn})=>{const[Ve,Vn]=(0,oe.useState)(null),[Sn,Fn]=(0,oe.useState)(gn),[Hn,Yn]=(0,oe.useState)(Hr),[ar,zr]=(0,oe.useState)(Fe),[Cr,dr]=(0,oe.useState)(""),[Zr,ur]=(0,oe.useState)(0),[jr,$r]=(0,oe.useState)(_n),[Ur,Gr]=(0,oe.useState)(!1),[Yr,Vr]=(0,oe.useState)(0),[Mr,qr]=(0,oe.useState)(0),Kr=(0,oe.useRef)(),On=(0,oe.useRef)(),Qn=(0,oe.useRef)(),mr=(0,oe.useRef)(),Nr=(0,oe.useRef)(),Ar=(0,oe.useRef)(),Or=(0,Oe.useDispatch)();(0,oe.useEffect)(()=>{const gt=window.scrollY||window.pageYOffset;Fn(pn),Ve==null||Ve.setValue(pn),window.scrollTo(0,gt)},[pn]),(0,oe.useEffect)(()=>{zt==null||zt(ar)},[ar]),(0,oe.useEffect)(()=>{if(Kr.current){let gt=function(Wt,Qt){var Tn;if(jt){Qt.preventDefault();return}const Dn=Qt.clipboardData;if(Dn){const Gn=Dn.types.toString(),An=Dn.items;if(Gn==="Files"||Dn.types.indexOf("Files")>-1){if(Qt.preventDefault(),or=="stex")return;try{let Xn=An[1];((Tn=An[0])==null?void 0:Tn.kind)==="file"&&(Xn=An[0]);const qn=Xn.getAsFile(),fr=qn.name.split(".").pop();(0,Ke.I)(qn,er=>{var gr,Dr,hr;er.id?((gr=qn==null?void 0:qn.type)==null?void 0:gr.indexOf("image"))>-1?Lt.replaceSelection(`<img width="100%" src="/api/attachments/${er.id}?type=${er.content_type})" alt="" />`):((Dr=qn==null?void 0:qn.type)==null?void 0:Dr.indexOf("video"))>-1?Lt.replaceSelection(`<video width="100%" controls src="/api/attachments/${er.id}"></video>`):((hr=qn==null?void 0:qn.type)==null?void 0:hr.indexOf("pdf"))>-1?Lt.replaceSelection(`<a href="/api/attachments/${er.id}?type=${qn.type}&disposition=inline" target="_blank">${qn.name}</a>`):wn.includes(fr)?Lt.replaceSelection(`<a href="/api/attachments/${er.id}?type=office&disposition=inline" target="_blank">${qn.name}</a>`):Lt.replaceSelection(`[${qn.name}](/api/attachments/${er.id}?type=${er.content_type})`):(er==null?void 0:er.status)===401&&(document.location.href="/user/login")})}catch(Xn){Nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Lt=nt().fromTextArea(Kr.current,{mode:or,lineNumbers:!Tr,lineWrapping:!0,value:gn,autoCloseTags:!0,autoCloseBrackets:!0});return Lt.on("keyup",function(Wt,Qt){Qt.keyCode===8&&(Wt.getValue()==""?Lt.setOption("placeholder",bn):Lt.setOption("placeholder",null))}),Lt.on("keydown",function(Wt,Qt){if(Qt.keyCode===8){var Tn=ke(Wt);Tn&&Qt.preventDefault()}}),xr&&Lt.focus(),Lt.on("paste",gt),sn&&Lt.on("beforeChange",function(Wt,Qt){(Qt.origin==="paste"||Qt.origin==="+input")&&Qt.cancel()}),Vn(Lt),()=>{Lt.off("paste",gt)}}},[]);const si=(0,oe.useCallback)(()=>{if(On.current)try{}catch(gt){console.log(gt,"---- to set md editor body height")}},[jr,On,ar]);(0,oe.useEffect)(()=>{function gt(){let Lt=new xe.Z(Wt=>{for(let Qt of Wt)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&(si(),Ve.setSize("100%","100%"),Ve.refresh())});return Lt.observe(Kr.current.parentElement),Lt}if(Ve){const Lt=gt();return()=>{var Wt,Qt;(Wt=Kr.current)!=null&&Wt.parentElement&&Lt.unobserve((Qt=Kr.current)==null?void 0:Qt.parentElement)}}},[Ve,si]),(0,oe.useEffect)(()=>{if(Ve){let gt=[];for(const[Lt,Wt]of Object.entries(Xt)){let Qt={[Lt]:()=>{at(Wt)}};gt.push(Qt),Ve.addKeyMap(Qt)}return()=>{for(let Lt of gt)Ve.removeKeyMap(Lt)}}},[Ve]),(0,oe.useEffect)(()=>{Fe!==ar&&zr(Fe)},[Fe]),(0,Pn.Z)(()=>{if(!St&&Zr>0){let gt=new Date().getTime(),Lt=window.sessionStorage.getItem(Fr);gt>=Zr+Jn&&(!Lt||Lt!==Sn)&&(window.sessionStorage.setItem(Fr,Sn),Gr(!0))}},Jn),(0,oe.useEffect)(()=>{Yn(Hr)},[Ve,Hr]),(0,oe.useEffect)(()=>{Ve&&xr&&Ve.focus()},[Ve,xr]),(0,oe.useEffect)(()=>{if(Hn&&Ve){let gt=function(Wt){let Qt=Wt.target;if(mr.current){let Tn=Qt.scrollTop/Qt.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*Tn}};const Lt=Ve.getScrollerElement();return Lt.addEventListener("scroll",gt),()=>{Lt.removeEventListener("scroll",gt)}}},[Ve,Hn]),(0,oe.useEffect)(()=>{if(Ve&&rn){let gt=function(Lt,Wt){rn(Lt,Wt)};return Ve.on("beforeChange",gt),()=>{Ve.off("beforeChange",gt)}}},[Ve,rn]),(0,oe.useEffect)(()=>{if(Ve&&He){let gt=function(){He(Ve.getValue())};return Ve.on("blur",gt),()=>{Ve.off("blur",gt)}}},[Ve,He]);function ke(gt,Lt){var Wt=gt.getDoc(),Qt=Wt.getCursor(),Tn=Wt.getLine(Qt.line),Dn=Tn.charAt(Qt.ch-1),Gn=Tn.lastIndexOf("@\u2581@",Qt.ch),An=Tn.lastIndexOf("@\u2581\u2581@",Qt.ch),Xn=Gn>An?Gn:An,qn=Gn>An?3:4;if(Bt.indexOf(Dn)===-1)return null;if(console.log("change1:",Lt,gt,Tn,Qt,Xn,Gn,An,Dn),Xn>=0&&Qt.ch-Xn<5){var fr=Xn+qn;return Wt.replaceRange("",{line:Qt.line,ch:Xn},{line:Qt.line,ch:fr}),{line:Qt.line,ch:fr}}return null}(0,oe.useEffect)(()=>{if(Ve){let gt=function(Lt,Wt){const Qt=Lt.getValue();Fn(Qt),ur(new Date().getTime()),Lt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ln&&(nr?Ln(Qt,et(Qt)):Ln(Qt))};return Ve.on("change",gt),()=>{Ve.off("change",gt)}}},[Ve,Ln]),(0,oe.useEffect)(()=>{if(Ve)if(gn==null)Ve.setValue(""),Fn("");else{const gt=window.scrollY||window.pageYOffset;gn!==Ve.getValue()&&(Ve.setValue(gn),Fn(gn),Ve.setCursor(sn?1:Ve.lineCount(),0),window.scrollTo(0,gt))}},[Ve,gn]);const at=(0,oe.useCallback)(gt=>{const Lt=Ve.getCursor(),Wt=Ve.getSelection();let Qt=Wt.split(`
|
|
`);switch(gt){case"bold":return Ve.replaceSelection("**"+Wt+"**"),Wt===""&&Ve.setCursor(Lt.line,Lt.ch+2),Ve.focus();case"italic":return Ve.replaceSelection("*"+Wt+"*"),Wt===""&&Ve.setCursor(Lt.line,Lt.ch+1),Ve.focus();case"code":return Ve.replaceSelection("`"+Wt+"`"),Wt===""&&Ve.setCursor(Lt.line,Lt.ch+1),Ve.focus();case"inline-latex":return(0,Kt.Ye)(Or)?void 0:(dr("inline-latex"),Ve.focus());case"latex":return Ve.replaceSelection("```latex\n"+Wt+"\n```"),Ve.setCursor(Lt.line+1,Wt.length+1),Ve.focus();case"line-break":return Ve.replaceSelection(`<br/>
|
|
`),Ve.focus();case"list-ul":return Wt===""?Ve.replaceSelection("- "+Wt):Ve.replaceSelection(Qt.map(Tn=>Tn===""?"":`- ${Tn}`).join(`
|
|
`)),Ve.focus();case"list-ol":return Wt===""?Ve.replaceSelection("1. "+Wt):Ve.replaceSelection(Qt.map((Tn,Dn)=>Tn===""?"":`${Dn+1}. ${Tn}`).join(`
|
|
`)),Ve.focus();case"add-null-ch":return Wt===""&&Ve.setCursor(Lt.line,Lt.ch),Ve.replaceSelection(Ft),Ve.focus();case"add-signal":return Wt===""&&Ve.setCursor(Lt.line,Lt.ch),Ve.replaceSelection(At),Ve.focus();case"add-multiple":return Wt===""&&Ve.setCursor(Lt.line,Lt.ch),Ve.replaceSelection(Bt),Ve.focus();case"inster-template-1":return Wt===""&&Ve.setCursor(Lt.line,Lt.ch),Ve.replaceSelection(xn),Ve.focus();case"eraser":return Ve.setValue(""),Ve.focus();case"trigger-watch":return Yn(!Hn),Ve.focus();case"trigger-full-screen":return zr(!ar),Ve.focus();case kt:dr(kt);return;case un:dr(un);return;case ln:dr(ln);return;case _t:dr(_t);return;case"maths-latex":if((0,Kt.Ye)(Or))return;dr("maths-latex");return;case $t:Nr.current="",sessionStorage.removeItem("file_id"),dr($t);return;case Mt:dr(Mt);return;default:throw new Error}},[Ve,Hn,ar]),qe=(0,oe.useCallback)((gt,Lt)=>{var Wt,Qt,Tn,Dn,Gn,An;gt!=null&>.disabledClose||dr("");const{src:Xn,alt:qn,id:fr}=gt||{};switch(Cr){case kt:const{title:wr,link:$n}=gt;return Ve.replaceSelection(`[${wr}](${$n})`),Ve.focus();case un:const{language:In,content:jn}=gt;return Ve.replaceSelection(["```"+In,jn,"```"].join(`
|
|
`)),Ve.focus();case"maths-latex":for(var er=atob(gt),gr=new Uint8Array(er.length),Dr=0;Dr<er.length;Dr++)gr[Dr]=er.charCodeAt(Dr);var hr=new Blob([gr],{type:"image/png"});(0,Ke.I)(hr,oi=>{oi.id?Ve.replaceSelection(``):(oi==null?void 0:oi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Kt.Ye)(Or))return;Ve.replaceSelection("`$$"+gt+"$$`");break;case $e:if(!fr)return;Ve.getValue().indexOf(Xn)===-1?Ve.replaceSelection(`<center><img id="${fr}" width="80%" src="${Xn}" class="draw-flowchart" alt="${qn||""}" /></center>`):document.getElementById(fr).src=le.Z.API_SERVER+Xn+"?t="+Date.now();break;case ln:case _t:const Zn=Lt,yr=(Tn=(Qt=(Wt=Zn==null?void 0:Zn.name)==null?void 0:Wt.split("."))==null?void 0:Qt.pop)==null?void 0:Tn.call(Qt);return((Dn=Zn==null?void 0:Zn.type)==null?void 0:Dn.indexOf("image"))>-1||!(Zn!=null&&Zn.type)?Zn!=null&&Zn.align||Zn!=null&&Zn.width?Ve.replaceSelection(`<p style="text-align:${Zn.align||"initial"}"><img width="${Zn.width?Zn.width+"%":"initial"}" src="${Xn}" alt="${qn||""}" /></p>`):Ve.replaceSelection(`<img width="100%" src="${Xn}" alt="${qn||""}" />`):((Gn=Zn==null?void 0:Zn.type)==null?void 0:Gn.indexOf("video"))>-1?Ve.replaceSelection(`<video width="100%" controls src="${Xn}"></video>`):((An=Zn==null?void 0:Zn.type)==null?void 0:An.indexOf("pdf"))>-1?Ve.replaceSelection(`<a href="${Xn}?type=${Zn.type}&disposition=inline" target="_blank">${Zn.name}</a>`):wn.includes(yr)?Ve.replaceSelection(`<a href="${Xn}?type=office&disposition=inline" target="_blank">${Zn.name}</a>`):Ve.replaceSelection(`[${Zn.name}](${Xn})`),Ve.focus();case Mt:const{row:pr,col:Sr,align:Xr}=gt;let wi=`
|
|
`;for(let oi=0;oi<pr;oi++){let ji=[],Li=[];for(let Jr=0;Jr<Sr;Jr++)oi===1&&Li.push(vn[Xr]),ji.push(" ");oi===1&&(wi+=`| ${Li.join(" | ")} |
|
|
`),wi+=`| ${ji.join(Sr===1?"":" | ")} |
|
|
`}return Ve.replaceSelection(wi+`
|
|
`),Ve.focus();default:throw new Error}},[Ve,Cr]),ft=(0,oe.useMemo)(()=>{switch(Cr){case kt:return oe.createElement(qt,{callback:qe,onCancel:vt});case un:return oe.createElement(Pt.Z,{callback:qe,onCancel:vt});case ln:return oe.createElement(Ke.Z,{callback:qe,onCancel:vt});case $t:return oe.createElement(re,{editImgId:Nr.current,callback:qe,onCancel:vt});case Mt:return oe.createElement(Tt,{callback:qe,onCancel:vt});case"maths-latex":return oe.createElement(Rt,{showSaveButton:!0,callback:qe});case"inline-latex":return oe.createElement(Vt.Z,{showSaveButton:!0,callback:qe});default:return null}},[Cr]);function vt(){dr("")}(0,oe.useEffect)(()=>{if(Qn.current){let gt=function(Gn){Tn=!0,Dn=Gn.pageY},Lt=function(){Tn=!1},Wt=function(Gn){if(Tn){let An=Gn.pageY-Dn;An<0&&(An=0),An>300&&(An=300);let Xn=_n+An+"px";$r(Xn)}},Qt=Qn.current,Tn=!1,Dn=0;return Qt.addEventListener("mousedown",gt),document.addEventListener("mousemove",Wt),document.addEventListener("mouseup",Lt),()=>{Qt.removeEventListener("mousedown",gt),document.removeEventListener("mousemove",Wt),document.removeEventListener("mouseup",Lt)}}},[Ve,Qn]),(0,oe.useEffect)(()=>{$r(_n)},[_n]);const It=zn(Mn),an=zn(jr),en={width:It,height:an},Gt=(0,oe.useMemo)(()=>{if(Zr){let gt=new Date(Zr),Lt=gt.getHours(),Wt=gt.getMinutes(),Qt=gt.getSeconds();return Lt=Lt<10?"0"+Lt:Lt,Wt=Wt<10?"0"+Wt:Wt,Qt=Qt<10?"0"+Qt:Qt,`${Lt}:${Wt}:${Qt}`}return 0},[Zr]),et=gt=>{const Lt=[];if(nr){let Wt=-1;gt=gt.replace(/(@▁▁@|@▁@)/g,function(Qt,Tn,Dn){Lt.push({multiLine:Qt!==At})})}return Lt};function xt(){window.sessionStorage.removeItem(Fr),Gr(!1),ur(0)}function Ct(){Gr(!1),ur(0),Ve.setValue(window.sessionStorage.getItem(Fr))}(0,oe.useEffect)(()=>{Nn[Cr]&&Cr!==_t&&Cr!==$t&&setTimeout(()=>{const gt=document.getElementsByClassName("markdown-popup-form")[0],Lt=window.innerWidth/2-gt.offsetWidth/2,Wt=window.innerHeight/2-gt.offsetHeight/2;Vr(Lt),qr(Wt)},0)},[Cr]);const bt=gt=>{gt.preventDefault();const Lt=gt.clientX-Yr,Wt=gt.clientY-Mr;document.body.onmousemove=Qt=>{let Tn=Qt.clientX-Lt,Dn=Qt.clientY-Wt;const Gn=document.getElementsByClassName("markdown-popup-form")[0],An=window.innerWidth-Gn.offsetWidth,Xn=window.innerHeight-Gn.offsetHeight;Tn=Math.max(0,Math.min(Tn,An)),Dn=Math.max(0,Math.min(Dn,Xn)),Zt(Qt.clientX,Qt.clientY,Lt,Wt)&&(Vr(Tn),qr(Dn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Zt=(gt,Lt,Wt,Qt)=>{const Tn=document.body.clientHeight,Dn=document.body.clientWidth;return gt<20&&Wt>gt||gt>Dn-20&&Wt<gt||Lt<20&&Qt>Lt||Lt>Tn-20&&Qt<Lt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return oe.createElement(oe.Fragment,null,oe.createElement("div",{className:"markdown-editor-wrapper",ref:On},oe.createElement("div",{className:`markdown-editor-container ${Qe} ${Hn?"on-preview":""} ${Tr?"mini":""} ${ar?"full-screen":""}`,style:en},oe.createElement(yt,{insertTemp:br,watch:Hn,fullScreen:ar,showNullButton:cn,showNullProgramButton:nr,onActionCallback:at,hidetoolBar:Er,extraUse:Cn}),oe.createElement("div",{className:"markdown-editor-body"},oe.createElement("div",{className:"codemirror-container"},oe.createElement("textarea",{ref:Kr,placeholder:bn})),Hn?oe.createElement("div",{ref:mr,className:"preview-container"},or==="stex"&&oe.createElement(lt,{value:Sn}),or!=="stex"&&oe.createElement(me.Z,{edit:!0,disabledFill:hn,showProgramFill:nr,value:Sn,openEditor:gt=>{var Lt;Nr.current=gt,(Lt=Ar.current)==null||Lt.setHeight("100vh"),setTimeout(()=>{dr("add-flowchart")},150)}})):null))),dn?oe.createElement("a",{ref:Qn,className:"editor-resize"}):null,Cr===_t&&oe.createElement(Dt,{callback:qe,onCancel:vt}),Cr===$t&&oe.createElement(re,{ref:Ar,editImgId:Nr.current,callback:qe,onCancel:vt}),oe.createElement(Ce.Z,null,Nn[Cr]&&Cr!==_t&&Cr!==$t?oe.createElement(ct.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Yr,top:Mr},title:oe.createElement("div",{style:{cursor:"move"},onMouseDown:bt},Nn[Cr]),open:!0,onCancel:vt,footer:null,destroyOnClose:!0,width:Cr===$t?"1200px":null,height:Cr===$t?"80vh":null,className:"markdown-popup-form"},ft):null))}},45596:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Be},I:function(){return yt}});var oe=ce(28284),Oe=ce(6767),Me=ce(37568),nt=ce(77736),xe=ce(71051),ue=ce(47889),Le=ce(99571),Xe=ce(67303),be=ce(59301),pe=ce(59301),rt=Object.defineProperty,me=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Ae=(Ce,we,We)=>we in Ce?rt(Ce,we,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ce[we]=We,ot=(Ce,we)=>{for(var We in we||(we={}))Ze.call(we,We)&&Ae(Ce,We,we[We]);if(je)for(var We of je(we))Ee.call(we,We)&&Ae(Ce,We,we[We]);return Ce},st=(Ce,we)=>me(Ce,lt(we));const{useForm:ut}=oe.default,Pe={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}};var Be=({callback:Ce,onCancel:we})=>{const[We]=ut();let Se=(0,be.useRef)();function Ue(Yt){Se.current.width=We.getFieldValue("width"),Se.current.align=We.getFieldValue("align"),Ce(Yt,Se.current)}function Ne(Yt,Et){if(Yt.status===-1){Oe.ZP.error(Yt.message);return}We.setFieldsValue({src:`/api/attachments/${Yt.id}`,type:Et.type})}function tt(Yt){let Et=Yt.target.files[0];Se.current=Et,yt(Et,Ne)}return pe.createElement(oe.default,st(ot({form:We},ge),{className:"upload-image-panel",onFinish:Ue,style:{width:470,overflow:"hidden"}}),pe.createElement(oe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pe.createElement("div",{className:"flex-container"},pe.createElement(oe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pe.createElement(Me.default,{style:Pe})),pe.createElement(ze,{onFileChange:tt}))),pe.createElement(oe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pe.createElement(Me.default,{style:{width:264}})),pe.createElement(oe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pe.createElement(nt.Z,null,pe.createElement(oe.default.Item,{name:"width",style:{margin:0}},pe.createElement(xe.Z,{style:{width:264}})),pe.createElement("span",{className:"ml8"},"%"))),pe.createElement(oe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pe.createElement(ue.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),pe.createElement("aside",null,pe.createElement(oe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pe.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(Le.ZP,{type:"default",onClick:we},"\u53D6\u6D88"))))};function ze({onFileChange:Ce}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Ce}))}function yt(Ce,we){if(!Ce)throw new String("\u6CA1\u6709\u6587\u4EF6");let We=new FormData;We.append("editormd-image-file",Ce),We.append("file_param_name","editormd-image-file"),We.append("byxhr","true");var Se=new window.XMLHttpRequest;Se.withCredentials=!0,Se.addEventListener("load",function(Ue){we(JSON.parse(Ue.target.responseText),Ce)},!1),Se.addEventListener("error",function(Ue){console.error(Ue)},!1),Se.open("POST",`${Xe.KI}/api/attachments.json`),Se.send(We)}},75790:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Me}});var oe=ce(59301),Oe=ce(4676);class Me extends oe.Component{constructor(xe){super(xe);const ue=window.document;this.node=ue.createElement("div"),ue.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,Oe.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(on,nn,ce){"use strict";ce.d(nn,{SV:function(){return Dt},ZP:function(){return _e}});var oe=ce(59301),Oe=ce(76374);const Me={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},nt={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},xe={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ue={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(`
|
|
`)}]},Le={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(`
|
|
`)}]};var Xe=ce(53184),be=ce.n(Xe),pe=(Je,Ot,Nt)=>new Promise((ae,te)=>{var z=ne=>{try{le(Nt.next(ne))}catch(de){te(de)}},re=ne=>{try{le(Nt.throw(ne))}catch(de){te(de)}},le=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,re);le((Nt=Nt.apply(Je,Ot)).next())});const rt={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"]}},me=(Je,Ot,Nt,ae)=>{const te=Ot.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Nt.lineNumber,endColumn:Nt.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:Je.languages.CompletionItemKind.Text,insertText:re,range:ae}))},lt=(Je,Ot,Nt,ae)=>{Je.languages.registerCompletionItemProvider(Ot,{provideCompletionItems(te,z){const re=te.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=te.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...me(Je,te,z,le),...Nt.map(Re=>({label:Re,kind:Je.languages.CompletionItemKind.Keyword,documentation:Re,insertText:Re,insertTextRules:Je.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...ae.map(Re=>({label:Re.label,kind:Je.languages.CompletionItemKind.Snippet,documentation:Re.content,insertText:ne.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:Je.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var je=Je=>{rt.languages.forEach(Ot=>{Je.languages.registerDocumentFormattingEditProvider(Ot,{provideDocumentFormattingEdits(Nt){return pe(this,null,function*(){const ae=be()(Nt.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});return[{range:Nt.getFullModelRange(),text:ae}]})}})}),lt(Je,"java",nt.keywords,nt.quickKey),lt(Je,"cpp",xe.keywords,xe.quickKey),lt(Je,"c",Me.keywords,[]),lt(Je,"python",ue.keywords,ue.quickKey),lt(Je,"scala",Le.keywords,Le.quickKey)};const Ze="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ee=Object.defineProperty,Ae=(Je,Ot,Nt)=>Ot in Je?Ee(Je,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):Je[Ot]=Nt,ot=(Je,Ot,Nt)=>Ae(Je,typeof Ot!="symbol"?Ot+"":Ot,Nt);const st=class js{constructor(Ot,Nt,ae){this.placeholder=Ot,this.editor=Nt,this.monaco=ae,Nt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return js.ID}getDomNode(){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}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};ot(st,"ID","editor.widget.placeholderHint");var Pe=st,ge=ce(96236),Be=ce(6767),ze=ce(25399),yt=ce(89392),Ce=ce(33796),we=ce(56102),We=Object.defineProperty,Se=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Et=(Je,Ot,Nt)=>Ot in Je?We(Je,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):Je[Ot]=Nt,Jt=(Je,Ot)=>{for(var Nt in Ot||(Ot={}))tt.call(Ot,Nt)&&Et(Je,Nt,Ot[Nt]);if(Ne)for(var Nt of Ne(Ot))Yt.call(Ot,Nt)&&Et(Je,Nt,Ot[Nt]);return Je},Ht=(Je,Ot)=>Se(Je,Ue(Ot)),ye=(Je,Ot)=>{var Nt={};for(var ae in Je)tt.call(Je,ae)&&Ot.indexOf(ae)<0&&(Nt[ae]=Je[ae]);if(Je!=null&&Ne)for(var ae of Ne(Je))Ot.indexOf(ae)<0&&Yt.call(Je,ae)&&(Nt[ae]=Je[ae]);return Nt},he=(Je,Ot,Nt)=>new Promise((ae,te)=>{var z=ne=>{try{le(Nt.next(ne))}catch(de){te(de)}},re=ne=>{try{le(Nt.throw(ne))}catch(de){te(de)}},le=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,re);le((Nt=Nt.apply(Je,Ot)).next())});function mt(Je){return/^\d+$/.test(Je)?`${Je}px`:Je}function qt(){}let Pt=!1;const Ke={"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 ct(Je=[]){let Ot=Je;if(Array.isArray(Je)){for(let Nt=0;Nt<Je.length;Nt++){let ae=Ke[Je[Nt]];if(ae)return ae}return Ot[0]}return Ke[Ot]||Ot}let dt=null;const yn=()=>he(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Je){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Je)}});var _e=Je=>{var Ot=Je,{width:Nt="100%",height:ae="100%",value:te,language:z="javascript",style:re={},options:le={},overrideServices:ne={},theme:de="vs-dark",onEditBlur:Re,isCopy:wt=!1,onSave:Tt,autoHeight:Te=!1,forbidCopy:Ye=!1,onChange:Ge=qt,editorDidMount:pt=qt,onFocus:Rt=qt,onBreakPoint:Vt=qt,breakPointValue:kt=[],filename:ln="educoder.txt",errorLine:$t,errorContent:_t="",highlightLine:$e,openBreakPoint:un=!1,placeholder:Mt="",showMiniMap:Ut=!0}=Ot,vn=ye(Ot,["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"]);const Pn=(0,oe.useRef)(),Kt=(0,oe.useRef)({}),kn=(0,oe.useRef)(),tr=(0,oe.useRef)(),Jn=(0,oe.useRef)([]),Ft=(0,oe.useRef)(!1),Bt=(0,oe.useRef)(),At=(0,oe.useRef)(),xn=(0,oe.useRef)(!1),[wn,zn]=(0,oe.useState)(!1);function rr(){let dn;return Pn.current&&(dn=new Oe.Z(St=>{for(let cn of St)(cn.target.offsetHeight>0||cn.target.offsetWidth>0)&&Kt.current.instance.layout()}),dn.observe(Pn.current)),dn}function mn(){Be.ZP.warning({content:decodeURIComponent(Ze),key:"monaco-editor-tip"})}const Xt=()=>{let dn=Kt.current.instance;if(te!=null&&dn&&wn){const St=dn.getModel();St&&te!==St.getValue()&&(Pt=!0,St.setValue(te),dn.layout(),Pt=!1)}};(0,oe.useEffect)(()=>{const dn=Ce.Z.subscribe("formatDocument",St=>{var cn;let nr=Kt.current.instance;(cn=nr==null?void 0:nr.getAction)==null||cn.call(nr,"editor.action.formatDocument").run()});return window.updateMonacoValue=St=>{Ge(St)},dn},[]),(0,oe.useEffect)(()=>{var dn;let St=Kt.current.instance;tr.current&&clearTimeout(tr.current),tr.current=setTimeout(()=>{Xt()},500),te&&(te!=null&&te.length)&&((dn=St==null?void 0:St.updateOptions)==null||dn.call(St,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,wn,Kt.current]),(0,oe.useEffect)(()=>{if($t&&Kt.current&&Kt.current.instance){let St=Kt.current.instance;St.changeViewZones(function(cn){var nr=document.createElement("div");nr.style.padding="10px 20px",nr.style.width="calc(100% - 20px)",nr.className="my-error-line-wrp",nr.innerHTML=_t,cn.addZone({afterLineNumber:$t||11,heightInLines:3,domNode:nr})});var dn={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}};St.addOverlayWidget(dn),St.revealPositionInCenter({lineNumber:20,column:1})}},[$t,Kt.current,wn]);const Nn=(dn="",St)=>{if(!dn||dn.trim()==="")return!0;const nr=Kt.current.instance.getModel().getLineTokens(St);let Er=!1;for(let Fe=0;Fe<2;Fe++)nr.getStandardTokenType(Fe)===1&&(Er=!0);return Er};(0,oe.useEffect)(()=>{var dn;const St=(dn=Kt.current)==null?void 0:dn.instance;if(St&&wn&&Ye){const cn=St.onDidBlurEditorWidget(()=>{xn.current=!1}),nr=St.onDidFocusEditorText(()=>{xn.current=!0});return()=>{cn.dispose(),nr.dispose()}}},[Kt.current,wn,Ye]),(0,oe.useEffect)(()=>{var dn;if((dn=Kt.current)!=null&&dn.instance&&wn&&un){let St=Kt.current.instance,cn=St.getModel();if(!cn)return;(()=>{var pn;let Cn=[],Ve=[];const Vn=cn.getAllDecorations();for(let Fn of Vn)Fn.options.className==="highlighted-line"&&(Cn.push((pn=Fn==null?void 0:Fn.range)==null?void 0:pn.startLineNumber),Ve.push(Fn==null?void 0:Fn.id));if($e===Cn[0])return;cn.deltaDecorations(Ve,[]);const Sn=cn.getLineCount();$e&&$e<=Sn&&(St.deltaDecorations([],[{range:new dt.Range($e,1,$e,cn.getLineMaxColumn($e)),options:{isWholeLine:!0,className:"highlighted-line"}}]),St.revealLineInCenter($e))})();const Er=(pn=!1)=>{var Cn;let Ve=[],Vn=[];const Sn=cn.getAllDecorations();for(let Fn of Sn)Fn.options.linesDecorationsClassName==="breakpoints-select"&&(Ve.push((Cn=Fn==null?void 0:Fn.range)==null?void 0:Cn.startLineNumber),Vn.push(Fn==null?void 0:Fn.id));if(pn)return{lines:Ve,ids:Vn};Vt(Ve)},Fe=pn=>he(void 0,null,function*(){let Cn={range:new dt.Range(pn,1,pn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield cn.deltaDecorations([],[Cn]),Er()}),He=pn=>he(void 0,null,function*(){let Cn=[];const Ve=St.getLineDecorations(pn);for(let Vn of Ve)Vn.options.linesDecorationsClassName==="breakpoints-select"&&Cn.push(Vn.id);yield cn.deltaDecorations(Cn,[]),Er()}),rn=pn=>{let Cn=St.getLineDecorations(pn);for(let Ve of Cn)if(Ve.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,yt.isEqual)(kt,Er(!0).lines)){cn.deltaDecorations(Er(!0).ids,[]);const pn=kt.map(Cn=>({range:new dt.Range(Cn,1,Cn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));cn.deltaDecorations([],pn)}const zt=St.onDidChangeModelContent(pn=>{let Cn=St.getPosition();if(Cn){let Ve=Cn.lineNumber;clearTimeout(At.current),At.current=setTimeout(()=>{Nn(cn.getLineContent(Ve),Ve)?He(Ve):rn(Ve)?(He(Ve),Fe(Ve)):Er()},100)}}),Qe=St.onMouseDown(pn=>{var Cn,Ve,Vn;if(pn.target.detail&&((Vn=(Ve=(Cn=pn.target)==null?void 0:Cn.element)==null?void 0:Ve.className)!=null&&Vn.includes("line-numbers"))){let Sn=pn.target.position.lineNumber;if(Nn(cn.getLineContent(Sn),Sn))return;rn(Sn)?He(Sn):Fe(Sn)}}),jt=pn=>{let Cn={range:new dt.Range(pn,1,pn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Jn.current=St.deltaDecorations(Jn.current,[Cn])},sn=()=>{Jn.current=St.deltaDecorations(Jn.current,[])},hn=St.onMouseMove(pn=>{var Cn,Ve,Vn;if(sn(),pn.target.detail&&((Vn=(Ve=(Cn=pn.target)==null?void 0:Cn.element)==null?void 0:Ve.className)!=null&&Vn.includes("line-numbers"))){let Sn=pn.target.position.lineNumber;if(Nn(cn.getLineContent(Sn),Sn))return;jt(Sn)}}),bn=St.onMouseLeave(()=>{sn()});return()=>{zt.dispose(),Qe.dispose(),hn.dispose(),bn.dispose()}}},[Kt.current,wn,kt,$e,un,z]),(0,oe.useEffect)(()=>{var dn;(dn=Kt.current)!=null&&dn.instance&&un&&Kt.current.instance.setPosition({lineNumber:0,column:0})},[$e]);function kr(){let dn=Kt.current.instance;if(dn){const St=dn.getSelection(),cn=Kt.current.pastePos||{},nr=new dt.Range(cn.startLineNumber||St.endLineNumber,cn.startColumn||St.endColumn,cn.endLineNumber||St.endLineNumber,cn.endColumn||St.endColumn);setTimeout(()=>{dn.executeEdits("",[{range:nr,text:""}])},300)}}function gn(dn){(window.navigator.platform.match("Mac")?dn.metaKey:dn.ctrlKey)&&dn.keyCode==83&&(dn.preventDefault(),Tt())}const Ln=()=>{if(Te&&Kt.current.instance){const dn=Kt.current.instance.getContentHeight();or(dn<ae?ae:dn)}else or(ae)};function Mn(dn){var St=document.createEvent("MouseEvents");St.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),dn.dispatchEvent(St)}const _n=dn=>{if(!xn.current)return;const{keyCode:St,ctrlKey:cn,metaKey:nr,target:Er,type:Fe}=dn;return(Fe==="paste"||(St===67||St===86)&&(nr||cn))&&Er.nodeName==="TEXTAREA"&&(mn(),dn.preventDefault()),!1};function Tr(dn,St){var cn=window.URL||window.webkitURL||window,nr=new Blob([St]),Er=document.createElementNS("http://www.w3.org/1999/xhtml","a");Er.href=cn.createObjectURL(nr),Er.download=dn,Mn(Er)}(0,oe.useEffect)(()=>{Ln()},[Ln]),(0,oe.useEffect)(()=>{Pn.current&&!wn&&Promise.all([ce.e(8909),ce.e(5028)]).then(ce.bind(ce,71448)).then(dn=>{try{dt=dn,Kt.current.instance=dt.editor.create(Pn.current,{value:te,language:ct(z),theme:de,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ut||!1}},ne);const St=Kt.current.instance;let Er=[...ge.BH._menuItems].find(zt=>zt[0]._debugName=="EditorContext")[1],Fe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],He=(zt,Qe)=>{var jt,sn;let hn=zt._first;do Qe.includes((sn=(jt=hn.element)==null?void 0:jt.command)==null?void 0:sn.id)&&zt._remove(hn);while(hn=hn.next)};if(pt(St,dt),setTimeout(()=>{Ln(),Kt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Tr(ln||"educoder.txt",St.getValue())}})},500),Kt.current.subscription=St.onDidChangeModelContent(zt=>{Ft.current?clearTimeout(Bt.current):(Ln(),Ge(St.getValue(),zt)),Bt.current=setTimeout(()=>{Ft.current=!1},500)}),window.Monaco||je(dt,ct(z)),Ye&&(He(Er,Fe),Pn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",_n),window.removeEventListener("paste",_n),window.addEventListener("keydown",_n),window.addEventListener("paste",_n)),window.Monaco=dt,Re&&St.onDidBlurEditorWidget(()=>{Re(St.getValue())}),Rt&&St.onDidFocusEditorText(()=>{Ye&&yn(),Rt(St.getValue())}),Ye){yn();try{St.onDidPaste(zt=>{const Qe=St.getSelection(),jt=Kt.current.pastePos||{},sn=new dt.Range(jt.startLineNumber||Qe.endLineNumber,jt.startColumn||Qe.endColumn,jt.endLineNumber||Qe.endLineNumber,jt.endColumn||Qe.endColumn);St.executeEdits("",[{range:zt.range,text:""}])})}catch(zt){}}let rn=rr();return Mt&&typeof Mt=="string"&&new Pe(Mt,St,dt),zn(!0),()=>{const zt=Kt.current.instance;zt.dispose();const Qe=zt.getModel();Qe&&Qe.dispose(),Kt.current.subscription&&Kt.current.subscription.dispose(),rn.unobserve(Pn.current)}}catch(St){}})},[]),(0,oe.useEffect)(()=>{if(Kt.current.instance&&wn)return document.addEventListener("keydown",gn,!1),()=>{document.removeEventListener("keydown",gn)}},[Tt,wn]),(0,oe.useEffect)(()=>{let dn=Kt.current.instance;if(dn&&wn){let St=ct(z);dt.editor.setModelLanguage(dn.getModel(),St)}},[z,wn]),(0,oe.useEffect)(()=>{Kt.current.instance&&wn&&dt.editor.setTheme(de)},[de,wn]),(0,oe.useEffect)(()=>{let dn=Kt.current.instance;kn.current=le,dn&&wn&&(dn.updateOptions(Jt({},le)),setTimeout(()=>{dn.getModel().updateOptions(Jt({},le))},200))},[JSON.stringify(le),wn]),(0,oe.useEffect)(()=>{let dn=Kt.current.instance;dn&&wn&&dn.layout()},[Nt,ae,wn]);const[xr,Hr]=(0,oe.useState)(mt(Nt)),[br,or]=(0,oe.useState)(mt(ae)),Fr=Ht(Jt({},re),{width:xr,height:br,position:"relative"});return oe.createElement("div",{className:"my-monaco-editor",ref:Pn,style:Fr},wt&&oe.createElement(we.CopyToClipboard,{text:te,onCopy:()=>Be.ZP.success("\u590D\u5236\u6210\u529F")},oe.createElement(ze.Z,{title:"\u590D\u5236\u4EE3\u7801"},oe.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},oe.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Dt({width:Je="100%",height:Ot="100%",original:Nt,modified:ae,language:te,options:z={}}){const re=(0,oe.useRef)(),[le,ne]=(0,oe.useState)(null);function de(Te){let Ye;return re.current&&(Ye=new Oe.Z(Ge=>{for(let pt of Ge)(pt.target.offsetHeight>0||pt.target.offsetWidth>0)&&Te.layout()}),Ye.observe(re.current)),Ye}(0,oe.useEffect)(()=>(re.current&&Promise.all([ce.e(8909),ce.e(9404)]).then(ce.bind(ce,2550)).then(Te=>{dt=Te;const Ye=dt.editor.createDiffEditor(re.current,Ht(Jt({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},z),{wordWrap:!0}));ne(Ye);let Ge=de(Ye);return()=>{Ye.dispose();const pt=Ye.getModel();pt&&pt.dispose(),Ge.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,oe.useEffect)(()=>{le&&le.setModel({original:dt.editor.createModel(Nt,te),modified:dt.editor.createModel(ae,te)})},[Nt,ae,te,le]);const Re=mt(Je),wt=mt(Ot),Tt={width:Re,height:wt};return oe.createElement("div",{className:"my-diff-editor",ref:re,style:Tt})}},17904:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Oe}});var oe=ce(59301);function Oe(Me,nt){const xe=(0,oe.useRef)();(0,oe.useEffect)(()=>{xe.current=Me}),(0,oe.useEffect)(()=>{function ue(){xe.current()}if(nt!==null){let Le=setInterval(ue,nt);return()=>clearInterval(Le)}},[nt])}},78348:function(on,nn,ce){"use strict";ce.r(nn),ce.d(nn,{default:function(){return Jn}});var oe=ce(59301),Oe=ce(76560),Me=ce(91882),nt=ce(20554),xe=ce(27812),ue=ce(49661),Le=ce(2978),Xe=ce(90524),be=ce(38394),pe=ce(62957),rt=ce(6767),me=Object.defineProperty,lt=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ee=(Ft,Bt,At)=>Bt in Ft?me(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,Ae=(Ft,Bt)=>{for(var At in Bt||(Bt={}))je.call(Bt,At)&&Ee(Ft,At,Bt[At]);if(lt)for(var At of lt(Bt))Ze.call(Bt,At)&&Ee(Ft,At,Bt[At]);return Ft},ot=(Ft,Bt,At)=>new Promise((xn,wn)=>{var zn=Xt=>{try{mn(At.next(Xt))}catch(Nn){wn(Nn)}},rr=Xt=>{try{mn(At.throw(Xt))}catch(Nn){wn(Nn)}},mn=Xt=>Xt.done?xn(Xt.value):Promise.resolve(Xt.value).then(zn,rr);mn((At=At.apply(Ft,Bt)).next())});const st=({shixunHomeworks:Ft,dispatch:Bt})=>{const At=(0,Oe.useParams)();return oe.createElement(pe.default,{centered:!0,title:"\u63D0\u793A",open:Ft.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ot(void 0,null,function*(){(yield Bt({type:"shixunHomeworks/deleteReply",payload:{object_id:Ft.actionTabs.selectArr.id,object_type:"journals_for_message"}})).status===0&&(rt.ZP.success("\u5220\u9664\u6210\u529F"),Bt({type:"shixunHomeworks/setActionTabs",payload:{}}),Bt({type:"shixunHomeworks/getReplyList",payload:Ae({},Ft.actionTabs.params)}))}),onCancel:()=>{Bt({type:"shixunHomeworks/setActionTabs",payload:{}})}},oe.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))};var ut=(0,Oe.connect)(({shixunHomeworks:Ft})=>({shixunHomeworks:Ft}))(st),Pe=ce(56656),ge=ce.n(Pe),Be=ce(77019),ze=ce(5269),yt=ce(37568),Ce=ce(99571),we=ce(25399),We=ce(13747),Se=ce(26227),Ue=ce(63524),Ne={flex_box_center:"flex_box_center___rwkot",flex_space_between:"flex_space_between___CV5Yi",flex_box_vertical_center:"flex_box_vertical_center___meeO5",flex_box_center_end:"flex_box_center_end___RXqc0",flex_box_column:"flex_box_column___HwZxi",listItem:"listItem___Cb1Ly",description:"description___UqYVS",liked:"liked___xlDpa",likedActive:"likedActive___GqNt1",reply:"reply___R3gEt",replyList:"replyList___AA3m5",comment:"comment___JuJKy"},tt=Object.defineProperty,Yt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,Ht=(Ft,Bt,At)=>Bt in Ft?tt(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,ye=(Ft,Bt)=>{for(var At in Bt||(Bt={}))Et.call(Bt,At)&&Ht(Ft,At,Bt[At]);if(Yt)for(var At of Yt(Bt))Jt.call(Bt,At)&&Ht(Ft,At,Bt[At]);return Ft},he=(Ft,Bt,At)=>new Promise((xn,wn)=>{var zn=Xt=>{try{mn(At.next(Xt))}catch(Nn){wn(Nn)}},rr=Xt=>{try{mn(At.throw(Xt))}catch(Nn){wn(Nn)}},mn=Xt=>Xt.done?xn(Xt.value):Promise.resolve(Xt.value).then(zn,rr);mn((At=At.apply(Ft,Bt)).next())});ge().locale("ZH-cn");const mt=({graduation:Ft,classroomList:Bt,globalSetting:At,loading:xn,dispatch:wn})=>{const[zn,rr]=(0,oe.useState)(ye({},(0,Oe.useParams)())),[mn,Xt]=(0,oe.useState)(!1),[Nn,kr]=(0,oe.useState)(-1),[gn,Ln]=(0,oe.useState)(""),{detail:Mn}=Ft,{detailLeftMenus:_n}=Bt,{graduationDetail:Tr,replyList:xr,workDetail:Hr}=Ft,br={1:"\u8BBE\u8BA1",2:"\u8BBA\u6587",3:"\u521B\u4F5C"},or={1:"\u751F\u4EA7/\u793E\u4F1A\u5B9E\u9645",2:"\u7ED3\u5408\u79D1\u7814",3:"\u5176\u5B83"},Fr={1:"\u771F\u9898",2:"\u6A21\u62DF\u9898"},dn={1:"\u7EB5\u5411\u8BFE\u9898",2:"\u6A2A\u5411\u8BFE\u9898",3:"\u81EA\u9009"},St={1:"\u65B0\u9898",2:"\u5F80\u5C4A\u9898\uFF0C\u6709\u65B0\u8981\u6C42",3:"\u5F80\u5C4A\u9898\uFF0C\u65E0\u65B0\u8981\u6C42"};return zn.page_size=10,(0,oe.useEffect)(()=>{wn({type:"graduation/getReplyList",payload:ye({},zn)}),wn({type:"graduation/getTopisDetail",payload:ye({},zn)})},[zn.categoryId]),oe.createElement("section",{className:Ne.bg},oe.createElement("section",{className:" edu-container"},oe.createElement("aside",{className:[Ne.desc,"c-black","font14","bg-white"].join(" ")},oe.createElement("h1",{className:Ne.description},Mn.description),oe.createElement("div",{className:"mt30"},oe.createElement("ul",{className:Ne.listItem},oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u7C7B\u578B\uFF1A"),oe.createElement("span",null,br[Mn==null?void 0:Mn.topic_type]||"--")),oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\uFF1A"),oe.createElement("span",null,or[Mn==null?void 0:Mn.topic_source]||"--")),oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D281\uFF1A"),oe.createElement("span",null,Fr[Mn==null?void 0:Mn.topic_property_first]||"--")),oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D282\uFF1A"),oe.createElement("span",null,dn[Mn==null?void 0:Mn.topic_property_second]||"--")),oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"),oe.createElement("span",null,St[Mn==null?void 0:Mn.topic_repeat]||"--")),oe.createElement("li",null,oe.createElement("span",{className:"c-light-black"},"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"),oe.createElement("span",null,Mn.city||"--")),oe.createElement("li",{className:"fl with50"},oe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"),oe.createElement("span",null,Mn.source_unit||"--"))))),oe.createElement("aside",{className:[Ne.reply,"bg-white","mt20"].join(" ")},mn&&oe.createElement(Le.Z,{onChange:cn=>{Ln(cn)},height:200,isFocus:!0,watch:!0}),oe.createElement(Be.Z,{onClick:()=>{Xt(!0)}},oe.createElement(ze.Z,{flex:"1"},!mn&&oe.createElement(yt.default,{size:"middle",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),oe.createElement(ze.Z,null,oe.createElement(Ce.ZP,{type:"primary",size:"middle",onClick:()=>he(void 0,null,function*(){gn===""?rt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield wn({type:"graduation/createReply",payload:{journals_for_message:{jour_id:zn.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:gn}}})).status===0&&(rt.ZP.success("\u53D1\u5E03\u6210\u529F"),wn({type:"graduation/getReplyList",payload:ye({},zn)}),Xt(!1))})},"\u53D1\u8868")))),(xr==null?void 0:xr.comments)&&xr.comments!=""&&oe.createElement("aside",{className:[Ne.replyList,"bg-white"].join(" ")},xr==null?void 0:xr.comments.map(function(cn,nr){var Er,Fe;return oe.createElement(Be.Z,{gutter:[12,12],key:nr},oe.createElement(ze.Z,{flex:"40px"},oe.createElement("img",{width:"40",src:`${Xe.Z.IMG_SERVER}/images/${(Er=cn==null?void 0:cn.author)==null?void 0:Er.image_url}`})),oe.createElement(ze.Z,{flex:"1"},oe.createElement(Be.Z,{align:"middle"},oe.createElement(ze.Z,{span:24},oe.createElement("span",{className:"c-light-black"},(Fe=cn==null?void 0:cn.author)==null?void 0:Fe.name),oe.createElement("span",{className:"c-light-black ml10"},ge()(cn==null?void 0:cn.created_on).fromNow()," \u53D1\u5E03")),oe.createElement(ze.Z,{span:24},oe.createElement(be.Z,{value:cn.content})),cn.children&&oe.createElement("aside",{className:Ne.comment},cn.children.map(function(He,rn){return oe.createElement(Be.Z,{key:rn},oe.createElement(ze.Z,{span:24},oe.createElement(Be.Z,null,oe.createElement(ze.Z,{flex:"1"},He.author.name,oe.createElement("span",{className:"c-light-black ml10"},ge()(He==null?void 0:He.created_on).fromNow())),oe.createElement(ze.Z,null,oe.createElement(we.Z,{title:"\u5220\u9664"},oe.createElement(Se.Z,{className:"current",onClick:()=>{wn({type:"graduation/setActionTabs",payload:{key:"\u5220\u9664",params:zn,selectArr:cn}})}}))))),oe.createElement(ze.Z,null,oe.createElement("strong",null,oe.createElement(be.Z,{value:He.content}))))})),oe.createElement(ze.Z,{span:24,className:"mt5 c-light-black"},Nn===nr&&oe.createElement("aside",null,oe.createElement(Le.Z,{onChange:He=>{Ln(He)},height:150,isFocus:!0}),oe.createElement(Be.Z,null,oe.createElement(ze.Z,{span:24,className:"tr"},oe.createElement(Ce.ZP,{type:"primary",size:"middle",onClick:()=>he(this,null,function*(){gn===""?rt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield wn({type:"graduation/createReply",payload:{journals_for_message:{jour_id:zn.categoryId,jour_type:"HomeworkCommon",m_parent_id:cn.id,reply_id:1,notes:gn}}}),wn({type:"graduation/getReplyList",payload:ye({},zn)}),rt.ZP.success("\u53D1\u5E03\u6210\u529F"),kr(-1))})},"\u53D1\u8868")))),Nn!==nr&&oe.createElement("div",{className:"tr"},oe.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:()=>kr(nr)}),cn.liked&&oe.createElement("span",{className:"c-orange"},oe.createElement(Ue.Z,{className:"mr5 ml30",onClick:()=>he(this,null,function*(){yield wn({type:"graduation/replyUnLike",payload:{object_id:cn.id,object_type:"message"}}),wn({type:"graduation/getReplyList",payload:ye({},zn)})})}),cn.praises_count),!cn.liked&&oe.createElement("span",null,oe.createElement(Ue.Z,{className:"mr5 ml30",onClick:()=>he(this,null,function*(){yield wn({type:"graduation/replyLike",payload:{object_id:cn.id,object_type:"message"}}),wn({type:"graduation/getReplyList",payload:ye({},zn)})})}),cn.praises_count))))))}))),oe.createElement("aside",{className:"tc mt30 pb30"},oe.createElement(We.Z,{defaultCurrent:1,total:xr==null?void 0:xr.total_count,hideOnSinglePage:!0,current:zn.page||1,onChange:cn=>{zn.page=cn,wn({type:"graduation/getReplyList",payload:ye({},zn)})}})),oe.createElement(ut,null))};var qt=(0,Oe.connect)(({graduation:Ft,classroomList:Bt,loading:At,globalSetting:xn})=>({graduation:Ft,globalSetting:xn,classroomList:Bt,loading:At.effects}))(mt),Pt=ce(28284),Ke=ce(54172),ct=Object.defineProperty,dt=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Dt=(Ft,Bt,At)=>Bt in Ft?ct(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,Je=(Ft,Bt)=>{for(var At in Bt||(Bt={}))yn.call(Bt,At)&&Dt(Ft,At,Bt[At]);if(dt)for(var At of dt(Bt))_e.call(Bt,At)&&Dt(Ft,At,Bt[At]);return Ft},Ot=(Ft,Bt)=>{var At={};for(var xn in Ft)yn.call(Ft,xn)&&Bt.indexOf(xn)<0&&(At[xn]=Ft[xn]);if(Ft!=null&&dt)for(var xn of dt(Ft))Bt.indexOf(xn)<0&&_e.call(Ft,xn)&&(At[xn]=Ft[xn]);return At},Nt=(Ft,Bt,At)=>new Promise((xn,wn)=>{var zn=Xt=>{try{mn(At.next(Xt))}catch(Nn){wn(Nn)}},rr=Xt=>{try{mn(At.throw(Xt))}catch(Nn){wn(Nn)}},mn=Xt=>Xt.done?xn(Xt.value):Promise.resolve(Xt.value).then(zn,rr);mn((At=At.apply(Ft,Bt)).next())});const ae=Ft=>{var Bt=Ft,{graduation:At,dispatch:xn}=Bt,wn=Ot(Bt,["graduation","dispatch"]);const zn=(0,Oe.useParams)();return oe.createElement(pe.default,{centered:!0,title:"\u63D0\u793A",open:At.actionTabs.key==="\u62D2\u7EDD",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Nt(void 0,null,function*(){(yield xn({type:"graduation/refuseTopic",payload:Je({student_graduation_topic:At.actionTabs.selectArrs.id},zn)})).status===0&&(rt.ZP.success("\u62D2\u7EDD\u6210\u529F"),xn({type:"graduation/setActionTabs",payload:{}}),xn({type:"graduation/getTopisDetailList",payload:Je({},At.actionTabs.params)}))}),onCancel:()=>{xn({type:"graduation/setActionTabs",payload:{}})}},oe.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u5B66\u751F\u9009\u9898?"))};var te=(0,Oe.connect)(({graduation:Ft})=>({graduation:Ft}))(ae),z=ce(82326),re=Object.defineProperty,le=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Re=(Ft,Bt,At)=>Bt in Ft?re(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,wt=(Ft,Bt)=>{for(var At in Bt||(Bt={}))ne.call(Bt,At)&&Re(Ft,At,Bt[At]);if(le)for(var At of le(Bt))de.call(Bt,At)&&Re(Ft,At,Bt[At]);return Ft},Tt=(Ft,Bt)=>{var At={};for(var xn in Ft)ne.call(Ft,xn)&&Bt.indexOf(xn)<0&&(At[xn]=Ft[xn]);if(Ft!=null&&le)for(var xn of le(Ft))Bt.indexOf(xn)<0&&de.call(Ft,xn)&&(At[xn]=Ft[xn]);return At},Te=(Ft,Bt,At)=>new Promise((xn,wn)=>{var zn=Xt=>{try{mn(At.next(Xt))}catch(Nn){wn(Nn)}},rr=Xt=>{try{mn(At.throw(Xt))}catch(Nn){wn(Nn)}},mn=Xt=>Xt.done?xn(Xt.value):Promise.resolve(Xt.value).then(zn,rr);mn((At=At.apply(Ft,Bt)).next())});const Ye=Ft=>{var Bt=Ft,{graduation:At,dispatch:xn}=Bt,wn=Tt(Bt,["graduation","dispatch"]),zn;const rr=(0,Oe.useParams)(),{detailList:mn}=At,[Xt]=Pt.default.useForm();return oe.createElement(pe.default,{centered:!0,title:"\u540C\u610F\u9009\u9898",open:At.actionTabs.key==="\u540C\u610F",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Te(void 0,null,function*(){var Nn;yield Xt.validateFields();const kr=Xt.getFieldsValue();(yield xn({type:"graduation/agreeTopic",payload:wt({group_id:kr.group_id,course_group_name:(Nn=mn==null?void 0:mn.group_list)==null?void 0:Nn.filter(Ln=>Ln.group_id==kr.group_id)[0].group_name,student_graduation_topic:At.actionTabs.selectArrs.id},rr)})).status===0&&(rt.ZP.success("\u540C\u610F\u6210\u529F"),xn({type:"graduation/setActionTabs",payload:{}}),xn({type:"graduation/getTopisDetailList",payload:wt({},At.actionTabs.params)}))}),onCancel:()=>{xn({type:"graduation/setActionTabs",payload:{}})}},oe.createElement("p",null,"\u786E\u8BA4\u540C\u610F\u5B66\u751F\u7684\u9009\u9898\uFF0C\u5C06\u5B66\u751F\u52A0\u5165\u6211\u7684\u5206\u73ED"),oe.createElement(Pt.default,{form:Xt},oe.createElement(Pt.default.Item,{name:"group_id",label:"\u9009\u62E9\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5206\u73ED"}]},oe.createElement(z.default,{placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED",size:"middle"},(zn=mn==null?void 0:mn.group_list)==null?void 0:zn.map(function(Nn,kr){return oe.createElement(z.default.Option,{value:Nn.group_id},Nn.group_name)})))))};var Ge=(0,Oe.connect)(({graduation:Ft})=>({graduation:Ft}))(Ye),pt=Object.defineProperty,Rt=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,ln=(Ft,Bt,At)=>Bt in Ft?pt(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,$t=(Ft,Bt)=>{for(var At in Bt||(Bt={}))Vt.call(Bt,At)&&ln(Ft,At,Bt[At]);if(Rt)for(var At of Rt(Bt))kt.call(Bt,At)&&ln(Ft,At,Bt[At]);return Ft};const _t=({graduation:Ft,loading:Bt,dispatch:At})=>{const[xn,wn]=(0,oe.useState)($t({},(0,Oe.useParams)())),zn=(0,Oe.useLocation)(),{detailList:rr}=Ft,[mn,Xt]=(0,oe.useState)({}),[Nn]=Pt.default.useForm(),kr=(Ln,Mn)=>{xn.page=Ln,xn.limit=20,At({type:"graduation/getTopisDetailList",payload:$t({},xn)})},gn=[{title:"\u5E8F\u53F7",dataIndex:"name",width:200,align:"center",render:(Ln,Mn,_n)=>_n+1},{title:"\u59D3\u540D",dataIndex:"student_name"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u5206\u73ED",dataIndex:"class_group_name"},{title:"\u9009\u9898\u65F6\u95F4",dataIndex:"selected_time"},{title:"\u786E\u8BA4\u7ED3\u679C",dataIndex:"result",render:Ln=>Ln==="\u5DF2\u62D2\u7EDD"?oe.createElement("span",{className:"c-orange"},"\u5DF2\u62D2\u7EDD"):Ln},{title:"\u64CD\u4F5C",dataInex:"action",render:(Ln,Mn)=>oe.createElement("div",null,(Mn.result==="\u5F85\u786E\u8BA4"||Mn.result==="\u5DF2\u540C\u610F")&&oe.createElement("span",{className:"current",onClick:()=>{At({type:"graduation/setActionTabs",payload:{key:"\u62D2\u7EDD",selectArrs:Mn,params:xn}})}},"\u62D2\u7EDD"),Mn.result==="\u5F85\u786E\u8BA4"&&oe.createElement("span",{className:"current ml20 c-blue",onClick:()=>{At({type:"graduation/setActionTabs",payload:{key:"\u540C\u610F",selectArrs:Mn,params:xn}})}},"\u540C\u610F"))}];return oe.createElement(oe.Fragment,null,oe.createElement("section",{className:"minH500 bg-white "},oe.createElement(Ke.default,{loading:Bt["graduation/getTopisDetailList"],pagination:!1,dataSource:rr.users_list,columns:gn}),oe.createElement(te,null),oe.createElement(Ge,null)),oe.createElement("aside",{className:"tc mb50 mt30"},oe.createElement(We.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:kr,defaultCurrent:xn.page||1,current:xn.page||1,defaultPageSize:15,total:Ft.users_count})))};var $e=(0,Oe.connect)(({graduation:Ft,loading:Bt})=>({graduation:Ft,loading:Bt.effects}))(_t),un={flex_box_center:"flex_box_center___D_8YV",flex_space_between:"flex_space_between___DI3Lx",flex_box_vertical_center:"flex_box_vertical_center___HQIdb",flex_box_center_end:"flex_box_center_end___jBPdg",flex_box_column:"flex_box_column___oBJ_R",title:"title___vQC28",menuTabs:"menuTabs___ZWqcp",rightMenu:"rightMenu___JdFEE",shixunDetail:"shixunDetail___rsPHS"},Mt=Object.defineProperty,Ut=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,Kt=(Ft,Bt,At)=>Bt in Ft?Mt(Ft,Bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[Bt]=At,kn=(Ft,Bt)=>{for(var At in Bt||(Bt={}))vn.call(Bt,At)&&Kt(Ft,At,Bt[At]);if(Ut)for(var At of Ut(Bt))Pn.call(Bt,At)&&Kt(Ft,At,Bt[At]);return Ft};const tr=({graduation:Ft,globalSetting:Bt,loading:At,dispatch:xn})=>{const wn=(0,Oe.useParams)(),zn=(0,Oe.useLocation)(),[rr]=(0,Oe.useSearchParams)(),[mn,Xt]=(0,oe.useState)([]),[Nn,kr]=(0,oe.useState)(rr.get("tabs")||0),{detailList:gn}=Ft;let Ln;wn.category=rr.get("category_id"),(0,oe.useEffect)(()=>{xn({type:"graduation/getTopisDetailList",payload:kn({},wn)})},[wn.coursesId]);const Mn=[{name:"\u9009\u9898\u5217\u8868",id:0,compontent:oe.createElement($e,null)},{name:"\u9009\u9898\u63CF\u8FF0",id:1,compontent:oe.createElement(qt,null)}];return oe.createElement("section",null,oe.createElement("div",{className:"edu-container"},gn.course_name&&oe.createElement("section",{className:"animated fadeIn"},oe.createElement("aside",{className:"mt10"},oe.createElement(Me.Z,{separator:">"},oe.createElement(Me.Z.Item,null,oe.createElement(Oe.Link,{to:`/classrooms/${gn.course_id}/shixun_homework`},gn.course_name)),oe.createElement(Me.Z.Item,null,oe.createElement(Oe.Link,{to:`/classrooms/${gn.course_id}/graduation_topics/${gn.graduation_id}`},"\u6BD5\u8BBE\u9009\u9898")),oe.createElement(Me.Z.Item,null,"\u9009\u9898\u8BE6\u60C5"))),oe.createElement("aside",{className:[un.title,"mt20"].join(" ")},oe.createElement(Oe.Link,{to:`/classrooms/${gn.course_id}/graduation_topics/${gn.graduation_id}`},oe.createElement(xe.Z,{className:"font16 c-black"})),oe.createElement("strong",{className:"font20 ml5"},gn.graduation_topic_name),oe.createElement(ue.VV,{status:[gn.status_name]}))),oe.createElement("aside",{className:"mt30 relative"},oe.createElement("aside",{className:un.rightMenu},oe.createElement(Oe.Link,{className:un.shixunDetail,to:`/classrooms/${wn.coursesId}/graduation_topics/${wn.categoryId}/edit`},oe.createElement("span",{className:"iconfont icon-shixunxiangqing"}),"\u7F16\u8F91\u9009\u9898")),oe.createElement(nt.default,{defaultActiveKey:Nn,className:un.menuTabs},Mn.map((_n,Tr)=>oe.createElement(nt.default.TabPane,{tab:_n.name,key:_n.id},_n.compontent))))))};var Jn=(0,Oe.connect)(({graduation:Ft,loading:Bt,globalSetting:At})=>({graduation:Ft,globalSetting:At,loading:Bt.effects}))(tr)},90290:function(on,nn,ce){"use strict";ce.d(nn,{AL:function(){return Pe},Iy:function(){return rt},Qv:function(){return je},ez:function(){return ut},jb:function(){return me}});var oe=ce(32834),Oe=ce.n(oe),Me=ce(11690),nt=ce.n(Me);let xe=1;function ue(Ce,we){const We=Ce.match(/^(\s+)(?:```)/);if(We===null)return we;const Se=We[1];return we.split(`
|
|
`).map(Ue=>{const Ne=Ue.match(/^\s+/);if(Ne===null)return Ue;const[tt]=Ne;return tt.length>=Se.length?Ue.slice(Se.length):Ue}).join(`
|
|
`)}let Le=[],Xe=["<ul>"];const be=new(Oe()).Renderer,pe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function rt(){Le.length=0,Xe=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function lt(Ce,we,We,Se){if(we>=Ce.length||Ce[we].level<=We)return we;var Ue=Ce[we];Se.push("<li><a href='#"+xe+Ue.anchor+"'>"+Ue.text+"</a>"),we++;var Ne=[];return we=lt(Ce,we,Ue.level,Ne),Ne.length>0&&(Se.push("<ul>"),Ne.forEach(function(tt){Se.push(tt)}),Se.push("</ul>")),Se.push("</li>"),we=lt(Ce,we,We,Se),we}function je(){return lt(Le,0,0,Xe),Xe.push("</ul>"),Xe.join("")}const Ze={heading(Ce){const we=pe.exec(Ce);if(xe+=1,we)return{type:"heading",raw:we[0],depth:we[1].length,text:we[2]}},fences(Ce){const we=this.rules.block.fences.exec(Ce);if(we){const We=we[0];let Se=ue(We,we[3]||"");const Ue=we[2]?we[2].trim():we[2];if(["latex","katex","math"].indexOf(Ue)>=0){const Ne=ot(),tt=Se;Se=Ne,st[Ne]={type:"block",expression:tt}}return{type:"code",raw:We,lang:Ue,text:Se}}}},Ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ae=0;const ot=()=>`__special_katext_id_${Ae++}__`;let st={};function ut(){return st}function Pe(){Ae=0,st={}}function ge(Ce){return Ce=Ce.replace(Ee,(we,We)=>{const Se=ot();return st[Se]={type:"inline",expression:We},Se}),Ce}const Be=be.listitem;be.listitem=function(Ce){return Be(ge(Ce))};const ze=be.paragraph;be.paragraph=function(Ce){return ze(ge(Ce))};const yt=be.tablecell;be.tablecell=function(Ce,we){return yt(ge(Ce),we)},be.code=function(Ce,we,We){const Se=(we||"").match(/\S*/)[0];return Se?["latex","katex","math"].indexOf(Se)>=0?`<p class='editormd-tex'>${Ce}</p>`:`<pre class="prettyprint linenums"><code class="language-${we}">${We?Ce:(0,Me.escape)(Ce,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(We?Ce:(0,Me.escape)(Ce,!0))+"</code></pre>"},be.heading=function(Ce,we,We){let Se=this.options.headerPrefix+We.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Le.push({anchor:Se,level:we,text:Ce}),"<h"+we+' id="'+xe+Se+'">'+Ce+"</h"+we+">"},Oe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Oe().use({tokenizer:Ze,renderer:be}),nn.ZP=Oe()},99498:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){oe.defineOption("placeholder","",function(Xe,be,pe){var rt=pe&&pe!=oe.Init;if(be&&!rt)Xe.on("blur",xe),Xe.on("change",ue),Xe.on("swapDoc",ue),oe.on(Xe.getInputField(),"compositionupdate",Xe.state.placeholderCompose=function(){nt(Xe)}),ue(Xe);else if(!be&&rt){Xe.off("blur",xe),Xe.off("change",ue),Xe.off("swapDoc",ue),oe.off(Xe.getInputField(),"compositionupdate",Xe.state.placeholderCompose),Oe(Xe);var me=Xe.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}be&&!Xe.hasFocus()&&xe(Xe)});function Oe(Xe){Xe.state.placeholder&&(Xe.state.placeholder.parentNode.removeChild(Xe.state.placeholder),Xe.state.placeholder=null)}function Me(Xe){Oe(Xe);var be=Xe.state.placeholder=document.createElement("pre");be.style.cssText="height: 0; overflow: visible",be.style.direction=Xe.getOption("direction"),be.className="CodeMirror-placeholder CodeMirror-line-like";var pe=Xe.getOption("placeholder");typeof pe=="string"&&(pe=document.createTextNode(pe)),be.appendChild(pe),Xe.display.lineSpace.insertBefore(be,Xe.display.lineSpace.firstChild)}function nt(Xe){setTimeout(function(){var be=!1,pe=Xe.getInputField();pe.nodeName=="TEXTAREA"?be=!pe.value:Xe.lineCount()==1&&(be=!/[^\u200b]/.test(pe.querySelector(".CodeMirror-line").textContent)),be?Me(Xe):Oe(Xe)},20)}function xe(Xe){Le(Xe)&&Me(Xe)}function ue(Xe){var be=Xe.getWrapperElement(),pe=Le(Xe);be.className=be.className.replace(" CodeMirror-empty","")+(pe?" CodeMirror-empty":""),pe?Me(Xe):Oe(Xe)}function Le(Xe){return Xe.lineCount()===1&&Xe.getLine(0)===""}})},25717:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Me=oe.Pos;oe.defineOption("autoCloseBrackets",!1,function(Ze,Ee,Ae){Ae&&Ae!=oe.Init&&(Ze.removeKeyMap(xe),Ze.state.closeBrackets=null),Ee&&(ue(nt(Ee,"pairs")),Ze.state.closeBrackets=Ee,Ze.addKeyMap(xe))});function nt(Ze,Ee){return Ee=="pairs"&&typeof Ze=="string"?Ze:typeof Ze=="object"&&Ze[Ee]!=null?Ze[Ee]:Oe[Ee]}var xe={Backspace:be,Enter:pe};function ue(Ze){for(var Ee=0;Ee<Ze.length;Ee++){var Ae=Ze.charAt(Ee),ot="'"+Ae+"'";xe[ot]||(xe[ot]=Le(Ae))}}ue(Oe.pairs+"`");function Le(Ze){return function(Ee){return me(Ee,Ze)}}function Xe(Ze){var Ee=Ze.state.closeBrackets;if(!Ee||Ee.override)return Ee;var Ae=Ze.getModeAt(Ze.getCursor());return Ae.closeBrackets||Ee}function be(Ze){var Ee=Xe(Ze);if(!Ee||Ze.getOption("disableInput"))return oe.Pass;for(var Ae=nt(Ee,"pairs"),ot=Ze.listSelections(),st=0;st<ot.length;st++){if(!ot[st].empty())return oe.Pass;var ut=lt(Ze,ot[st].head);if(!ut||Ae.indexOf(ut)%2!=0)return oe.Pass}for(var st=ot.length-1;st>=0;st--){var Pe=ot[st].head;Ze.replaceRange("",Me(Pe.line,Pe.ch-1),Me(Pe.line,Pe.ch+1),"+delete")}}function pe(Ze){var Ee=Xe(Ze),Ae=Ee&&nt(Ee,"explode");if(!Ae||Ze.getOption("disableInput"))return oe.Pass;for(var ot=Ze.listSelections(),st=0;st<ot.length;st++){if(!ot[st].empty())return oe.Pass;var ut=lt(Ze,ot[st].head);if(!ut||Ae.indexOf(ut)%2!=0)return oe.Pass}Ze.operation(function(){var Pe=Ze.lineSeparator()||`
|
|
`;Ze.replaceSelection(Pe+Pe,null),Ze.execCommand("goCharLeft"),ot=Ze.listSelections();for(var ge=0;ge<ot.length;ge++){var Be=ot[ge].head.line;Ze.indentLine(Be,null,!0),Ze.indentLine(Be+1,null,!0)}})}function rt(Ze){var Ee=oe.cmpPos(Ze.anchor,Ze.head)>0;return{anchor:new Me(Ze.anchor.line,Ze.anchor.ch+(Ee?-1:1)),head:new Me(Ze.head.line,Ze.head.ch+(Ee?1:-1))}}function me(Ze,Ee){var Ae=Xe(Ze);if(!Ae||Ze.getOption("disableInput"))return oe.Pass;var ot=nt(Ae,"pairs"),st=ot.indexOf(Ee);if(st==-1)return oe.Pass;for(var ut=nt(Ae,"closeBefore"),Pe=nt(Ae,"triples"),ge=ot.charAt(st+1)==Ee,Be=Ze.listSelections(),ze=st%2==0,yt,Ce=0;Ce<Be.length;Ce++){var we=Be[Ce],We=we.head,Se,Ue=Ze.getRange(We,Me(We.line,We.ch+1));if(ze&&!we.empty())Se="surround";else if((ge||!ze)&&Ue==Ee)ge&&je(Ze,We)?Se="both":Pe.indexOf(Ee)>=0&&Ze.getRange(We,Me(We.line,We.ch+3))==Ee+Ee+Ee?Se="skipThree":Se="skip";else if(ge&&We.ch>1&&Pe.indexOf(Ee)>=0&&Ze.getRange(Me(We.line,We.ch-2),We)==Ee+Ee){if(We.ch>2&&/\bstring/.test(Ze.getTokenTypeAt(Me(We.line,We.ch-2))))return oe.Pass;Se="addFour"}else if(ge){var Ne=We.ch==0?" ":Ze.getRange(Me(We.line,We.ch-1),We);if(!oe.isWordChar(Ue)&&Ne!=Ee&&!oe.isWordChar(Ne))Se="both";else return oe.Pass}else if(ze&&(Ue.length===0||/\s/.test(Ue)||ut.indexOf(Ue)>-1))Se="both";else return oe.Pass;if(!yt)yt=Se;else if(yt!=Se)return oe.Pass}var tt=st%2?ot.charAt(st-1):Ee,Yt=st%2?Ee:ot.charAt(st+1);Ze.operation(function(){if(yt=="skip")Ze.execCommand("goCharRight");else if(yt=="skipThree")for(var Et=0;Et<3;Et++)Ze.execCommand("goCharRight");else if(yt=="surround"){for(var Jt=Ze.getSelections(),Et=0;Et<Jt.length;Et++)Jt[Et]=tt+Jt[Et]+Yt;Ze.replaceSelections(Jt,"around"),Jt=Ze.listSelections().slice();for(var Et=0;Et<Jt.length;Et++)Jt[Et]=rt(Jt[Et]);Ze.setSelections(Jt)}else yt=="both"?(Ze.replaceSelection(tt+Yt,null),Ze.triggerElectric(tt+Yt),Ze.execCommand("goCharLeft")):yt=="addFour"&&(Ze.replaceSelection(tt+tt+tt+tt,"before"),Ze.execCommand("goCharRight"))})}function lt(Ze,Ee){var Ae=Ze.getRange(Me(Ee.line,Ee.ch-1),Me(Ee.line,Ee.ch+1));return Ae.length==2?Ae:null}function je(Ze,Ee){var Ae=Ze.getTokenAt(Me(Ee.line,Ee.ch+1));return/\bstring/.test(Ae.type)&&Ae.start==Ee.ch&&(Ee.ch==0||!/\bstring/.test(Ze.getTokenTypeAt(Ee)))}})},6313:function(on,nn,ce){(function(oe){oe(ce(89780),ce(52730))})(function(oe){oe.defineOption("autoCloseTags",!1,function(be,pe,rt){if(rt!=oe.Init&&rt&&be.removeKeyMap("autoCloseTags"),!!pe){var me={name:"autoCloseTags"};(typeof pe!="object"||pe.whenClosing!==!1)&&(me["'/'"]=function(lt){return ue(lt)}),(typeof pe!="object"||pe.whenOpening!==!1)&&(me["'>'"]=function(lt){return nt(lt)}),be.addKeyMap(me)}});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Me=["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 nt(be){if(be.getOption("disableInput"))return oe.Pass;for(var pe=be.listSelections(),rt=[],me=be.getOption("autoCloseTags"),lt=0;lt<pe.length;lt++){if(!pe[lt].empty())return oe.Pass;var je=pe[lt].head,Ze=be.getTokenAt(je),Ee=oe.innerMode(be.getMode(),Ze.state),Ae=Ee.state,ot=Ee.mode.xmlCurrentTag&&Ee.mode.xmlCurrentTag(Ae),st=ot&&ot.name;if(!st)return oe.Pass;var ut=Ee.mode.configuration=="html",Pe=typeof me=="object"&&me.dontCloseTags||ut&&Oe,ge=typeof me=="object"&&me.indentTags||ut&&Me;Ze.end>je.ch&&(st=st.slice(0,st.length-Ze.end+je.ch));var Be=st.toLowerCase();if(!st||Ze.type=="string"&&(Ze.end!=je.ch||!/[\"\']/.test(Ze.string.charAt(Ze.string.length-1))||Ze.string.length==1)||Ze.type=="tag"&&ot.close||Ze.string.indexOf("/")==je.ch-Ze.start-1||Pe&&Le(Pe,Be)>-1||Xe(be,Ee.mode.xmlCurrentContext&&Ee.mode.xmlCurrentContext(Ae)||[],st,je,!0))return oe.Pass;var ze=typeof me=="object"&&me.emptyTags;if(ze&&Le(ze,st)>-1){rt[lt]={text:"/>",newPos:oe.Pos(je.line,je.ch+2)};continue}var yt=ge&&Le(ge,Be)>-1;rt[lt]={indent:yt,text:">"+(yt?`
|
|
|
|
`:"")+"</"+st+">",newPos:yt?oe.Pos(je.line+1,0):oe.Pos(je.line,je.ch+1)}}for(var Ce=typeof me=="object"&&me.dontIndentOnAutoClose,lt=pe.length-1;lt>=0;lt--){var we=rt[lt];be.replaceRange(we.text,pe[lt].head,pe[lt].anchor,"+insert");var We=be.listSelections().slice(0);We[lt]={head:we.newPos,anchor:we.newPos},be.setSelections(We),!Ce&&we.indent&&(be.indentLine(we.newPos.line,null,!0),be.indentLine(we.newPos.line+1,null,!0))}}function xe(be,pe){for(var rt=be.listSelections(),me=[],lt=pe?"/":"</",je=be.getOption("autoCloseTags"),Ze=typeof je=="object"&&je.dontIndentOnSlash,Ee=0;Ee<rt.length;Ee++){if(!rt[Ee].empty())return oe.Pass;var Ae=rt[Ee].head,ot=be.getTokenAt(Ae),st=oe.innerMode(be.getMode(),ot.state),ut=st.state;if(pe&&(ot.type=="string"||ot.string.charAt(0)!="<"||ot.start!=Ae.ch-1))return oe.Pass;var Pe,ge=st.mode.name!="xml"&&be.getMode().name=="htmlmixed";if(ge&&st.mode.name=="javascript")Pe=lt+"script";else if(ge&&st.mode.name=="css")Pe=lt+"style";else{var Be=st.mode.xmlCurrentContext&&st.mode.xmlCurrentContext(ut);if(!Be||Be.length&&Xe(be,Be,Be[Be.length-1],Ae))return oe.Pass;Pe=lt+Be[Be.length-1]}be.getLine(Ae.line).charAt(ot.end)!=">"&&(Pe+=">"),me[Ee]=Pe}if(be.replaceSelections(me),rt=be.listSelections(),!Ze)for(var Ee=0;Ee<rt.length;Ee++)(Ee==rt.length-1||rt[Ee].head.line<rt[Ee+1].head.line)&&be.indentLine(rt[Ee].head.line)}function ue(be){return be.getOption("disableInput")?oe.Pass:xe(be,!0)}oe.commands.closeTag=function(be){return xe(be)};function Le(be,pe){if(be.indexOf)return be.indexOf(pe);for(var rt=0,me=be.length;rt<me;++rt)if(be[rt]==pe)return rt;return-1}function Xe(be,pe,rt,me,lt){if(!oe.scanForClosingTag)return!1;var je=Math.min(be.lastLine()+1,me.line+500),Ze=oe.scanForClosingTag(be,me,null,je);if(!Ze||Ze.tag!=rt)return!1;for(var Ee=lt?1:0,Ae=pe.length-1;Ae>=0&&pe[Ae]==rt;Ae--)++Ee;me=Ze.to;for(var Ae=1;Ae<Ee;Ae++){var ot=oe.scanForClosingTag(be,me,null,je);if(!ot||ot.tag!=rt)return!1;me=ot.to}return!0}})},52730:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){"use strict";var Oe=oe.Pos;function Me(Ae,ot){return Ae.line-ot.line||Ae.ch-ot.ch}var nt="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",xe=nt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ue=new RegExp("<(/?)(["+nt+"]["+xe+"]*)","g");function Le(Ae,ot,st,ut){this.line=ot,this.ch=st,this.cm=Ae,this.text=Ae.getLine(ot),this.min=ut?Math.max(ut.from,Ae.firstLine()):Ae.firstLine(),this.max=ut?Math.min(ut.to-1,Ae.lastLine()):Ae.lastLine()}function Xe(Ae,ot){var st=Ae.cm.getTokenTypeAt(Oe(Ae.line,ot));return st&&/\btag\b/.test(st)}function be(Ae){if(!(Ae.line>=Ae.max))return Ae.ch=0,Ae.text=Ae.cm.getLine(++Ae.line),!0}function pe(Ae){if(!(Ae.line<=Ae.min))return Ae.text=Ae.cm.getLine(--Ae.line),Ae.ch=Ae.text.length,!0}function rt(Ae){for(;;){var ot=Ae.text.indexOf(">",Ae.ch);if(ot==-1){if(be(Ae))continue;return}if(!Xe(Ae,ot+1)){Ae.ch=ot+1;continue}var st=Ae.text.lastIndexOf("/",ot),ut=st>-1&&!/\S/.test(Ae.text.slice(st+1,ot));return Ae.ch=ot+1,ut?"selfClose":"regular"}}function me(Ae){for(;;){var ot=Ae.ch?Ae.text.lastIndexOf("<",Ae.ch-1):-1;if(ot==-1){if(pe(Ae))continue;return}if(!Xe(Ae,ot+1)){Ae.ch=ot;continue}ue.lastIndex=ot,Ae.ch=ot;var st=ue.exec(Ae.text);if(st&&st.index==ot)return st}}function lt(Ae){for(;;){ue.lastIndex=Ae.ch;var ot=ue.exec(Ae.text);if(!ot){if(be(Ae))continue;return}if(!Xe(Ae,ot.index+1)){Ae.ch=ot.index+1;continue}return Ae.ch=ot.index+ot[0].length,ot}}function je(Ae){for(;;){var ot=Ae.ch?Ae.text.lastIndexOf(">",Ae.ch-1):-1;if(ot==-1){if(pe(Ae))continue;return}if(!Xe(Ae,ot+1)){Ae.ch=ot;continue}var st=Ae.text.lastIndexOf("/",ot),ut=st>-1&&!/\S/.test(Ae.text.slice(st+1,ot));return Ae.ch=ot+1,ut?"selfClose":"regular"}}function Ze(Ae,ot){for(var st=[];;){var ut=lt(Ae),Pe,ge=Ae.line,Be=Ae.ch-(ut?ut[0].length:0);if(!ut||!(Pe=rt(Ae)))return;if(Pe!="selfClose")if(ut[1]){for(var ze=st.length-1;ze>=0;--ze)if(st[ze]==ut[2]){st.length=ze;break}if(ze<0&&(!ot||ot==ut[2]))return{tag:ut[2],from:Oe(ge,Be),to:Oe(Ae.line,Ae.ch)}}else st.push(ut[2])}}function Ee(Ae,ot){for(var st=[];;){var ut=je(Ae);if(!ut)return;if(ut=="selfClose"){me(Ae);continue}var Pe=Ae.line,ge=Ae.ch,Be=me(Ae);if(!Be)return;if(Be[1])st.push(Be[2]);else{for(var ze=st.length-1;ze>=0;--ze)if(st[ze]==Be[2]){st.length=ze;break}if(ze<0&&(!ot||ot==Be[2]))return{tag:Be[2],from:Oe(Ae.line,Ae.ch),to:Oe(Pe,ge)}}}}oe.registerHelper("fold","xml",function(Ae,ot){for(var st=new Le(Ae,ot.line,0);;){var ut=lt(st);if(!ut||st.line!=ot.line)return;var Pe=rt(st);if(!Pe)return;if(!ut[1]&&Pe!="selfClose"){var ge=Oe(st.line,st.ch),Be=Ze(st,ut[2]);return Be&&Me(Be.from,ge)>0?{from:ge,to:Be.from}:null}}}),oe.findMatchingTag=function(Ae,ot,st){var ut=new Le(Ae,ot.line,ot.ch,st);if(!(ut.text.indexOf(">")==-1&&ut.text.indexOf("<")==-1)){var Pe=rt(ut),ge=Pe&&Oe(ut.line,ut.ch),Be=Pe&&me(ut);if(!(!Pe||!Be||Me(ut,ot)>0)){var ze={from:Oe(ut.line,ut.ch),to:ge,tag:Be[2]};return Pe=="selfClose"?{open:ze,close:null,at:"open"}:Be[1]?{open:Ee(ut,Be[2]),close:ze,at:"close"}:(ut=new Le(Ae,ge.line,ge.ch,st),{open:ze,close:Ze(ut,Be[2]),at:"open"})}}},oe.findEnclosingTag=function(Ae,ot,st,ut){for(var Pe=new Le(Ae,ot.line,ot.ch,st);;){var ge=Ee(Pe,ut);if(!ge)break;var Be=new Le(Ae,ot.line,ot.ch,st),ze=Ze(Be,ge.tag);if(ze)return{open:ge,close:ze}}},oe.scanForClosingTag=function(Ae,ot,st,ut){var Pe=new Le(Ae,ot.line,ot.ch,ut?{from:0,to:ut}:null);return Ze(Pe,st)}})},89780:function(on){(function(nn,ce){on.exports=ce()})(this,function(){"use strict";var nn=navigator.userAgent,ce=navigator.platform,oe=/gecko\/\d/i.test(nn),Oe=/MSIE \d/.test(nn),Me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nn),nt=/Edge\/(\d+)/.exec(nn),xe=Oe||Me||nt,ue=xe&&(Oe?document.documentMode||6:+(nt||Me)[1]),Le=!nt&&/WebKit\//.test(nn),Xe=Le&&/Qt\/\d+\.\d+/.test(nn),be=!nt&&/Chrome\//.test(nn),pe=/Opera\//.test(nn),rt=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(nn),lt=/PhantomJS/.test(nn),je=!nt&&/AppleWebKit/.test(nn)&&/Mobile\/\w+/.test(nn),Ze=/Android/.test(nn),Ee=je||Ze||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(nn),Ae=je||/Mac/.test(ce),ot=/\bCrOS\b/.test(nn),st=/win/i.test(ce),ut=pe&&nn.match(/Version\/(\d*\.\d*)/);ut&&(ut=Number(ut[1])),ut&&ut>=15&&(pe=!1,Le=!0);var Pe=Ae&&(Xe||pe&&(ut==null||ut<12.11)),ge=oe||xe&&ue>=9;function Be(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ze=function(a,y){var b=a.className,x=Be(y).exec(b);if(x){var E=b.slice(x.index+x[0].length);a.className=b.slice(0,x.index)+(E?x[1]+E:"")}};function yt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ce(a,y){return yt(a).appendChild(y)}function we(a,y,b,x){var E=document.createElement(a);if(b&&(E.className=b),x&&(E.style.cssText=x),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function We(a,y,b,x){var E=we(a,y,b,x);return E.setAttribute("role","presentation"),E}var Se;document.createRange?Se=function(a,y,b,x){var E=document.createRange();return E.setEnd(x||a,b),E.setStart(a,y),E}:Se=function(a,y,b){var x=document.body.createTextRange();try{x.moveToElementText(a.parentNode)}catch(E){return x}return x.collapse(!0),x.moveEnd("character",b),x.moveStart("character",y),x};function Ue(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Ne(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function tt(a,y){var b=a.className;Be(y).test(b)||(a.className+=(b?" ":"")+y)}function Yt(a,y){for(var b=a.split(" "),x=0;x<b.length;x++)b[x]&&!Be(b[x]).test(y)&&(y+=" "+b[x]);return y}var Et=function(a){a.select()};je?Et=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:xe&&(Et=function(a){try{a.select()}catch(y){}});function Jt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Ht(a,y,b){y||(y={});for(var x in a)a.hasOwnProperty(x)&&(b!==!1||!y.hasOwnProperty(x))&&(y[x]=a[x]);return y}function ye(a,y,b,x,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=x||0,ie=E||0;;){var se=a.indexOf(" ",ee);if(se<0||se>=y)return ie+(y-ee);ie+=se-ee,ie+=b-ie%b,ee=se+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=Jt(this.onTimeout,this)};he.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},he.prototype.set=function(a,y){this.f=y;var b=+new Date+a;(!this.id||b<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=b)};function mt(a,y){for(var b=0;b<a.length;++b)if(a[b]==y)return b;return-1}var qt=50,Pt={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},ct={origin:"*mouse"},dt={origin:"+move"};function yn(a,y,b){for(var x=0,E=0;;){var ee=a.indexOf(" ",x);ee==-1&&(ee=a.length);var ie=ee-x;if(ee==a.length||E+ie>=y)return x+Math.min(ie,y-E);if(E+=ee-x,E+=b-E%b,x=ee+1,E>=y)return x}}var _e=[""];function Dt(a){for(;_e.length<=a;)_e.push(Je(_e)+" ");return _e[a]}function Je(a){return a[a.length-1]}function Ot(a,y){for(var b=[],x=0;x<a.length;x++)b[x]=y(a[x],x);return b}function Nt(a,y,b){for(var x=0,E=b(y);x<a.length&&b(a[x])<=E;)x++;a.splice(x,0,y)}function ae(){}function te(a,y){var b;return Object.create?b=Object.create(a):(ae.prototype=a,b=new ae),y&&Ht(y,b),b}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var de=/[\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 Re(a){return a.charCodeAt(0)>=768&&de.test(a)}function wt(a,y,b){for(;(b<0?y>0:y<a.length)&&Re(a.charAt(y));)y+=b;return y}function Tt(a,y,b){for(var x=y>b?-1:1;;){if(y==b)return y;var E=(y+b)/2,ee=x<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:b;a(ee)?b=ee:y=ee+x}}function Te(a,y,b,x){if(!a)return x(y,b,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var ie=a[ee];(ie.from<b&&ie.to>y||y==b&&ie.to==y)&&(x(Math.max(ie.from,y),Math.min(ie.to,b),ie.level==1?"rtl":"ltr",ee),E=!0)}E||x(y,b,"ltr")}var Ye=null;function Ge(a,y,b){var x;Ye=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&b=="before"?x=E:Ye=E),ee.from==y&&(ee.from!=ee.to&&b!="before"?x=E:Ye=E)}return x!=null?x:Ye}var pt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function b(ve){return ve<=247?a.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?y.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,ie=/[Lb1n]/,se=/[1n]/;function fe(ve,De,Ie){this.level=ve,this.from=De,this.to=Ie}return function(ve,De){var Ie=De=="ltr"?"L":"R";if(ve.length==0||De=="ltr"&&!x.test(ve))return!1;for(var ht=ve.length,it=[],tn=0;tn<ht;++tn)it.push(b(ve.charCodeAt(tn)));for(var fn=0,En=Ie;fn<ht;++fn){var Rn=it[fn];Rn=="m"?it[fn]=En:En=Rn}for(var Wn=0,Bn=Ie;Wn<ht;++Wn){var Un=it[Wn];Un=="1"&&Bn=="r"?it[Wn]="n":ee.test(Un)&&(Bn=Un,Un=="r"&&(it[Wn]="R"))}for(var vr=1,ir=it[0];vr<ht-1;++vr){var Wr=it[vr];Wr=="+"&&ir=="1"&&it[vr+1]=="1"?it[vr]="1":Wr==","&&ir==it[vr+1]&&(ir=="1"||ir=="n")&&(it[vr]=ir),ir=Wr}for(var ci=0;ci<ht;++ci){var Fi=it[ci];if(Fi==",")it[ci]="N";else if(Fi=="%"){var Ci=void 0;for(Ci=ci+1;Ci<ht&&it[Ci]=="%";++Ci);for(var ao=ci&&it[ci-1]=="!"||Ci<ht&&it[Ci]=="1"?"1":"N",eo=ci;eo<Ci;++eo)it[eo]=ao;ci=Ci-1}}for(var Pi=0,to=Ie;Pi<ht;++Pi){var zi=it[Pi];to=="L"&&zi=="1"?it[Pi]="L":ee.test(zi)&&(to=zi)}for(var Ri=0;Ri<ht;++Ri)if(E.test(it[Ri])){var Mi=void 0;for(Mi=Ri+1;Mi<ht&&E.test(it[Mi]);++Mi);for(var ki=(Ri?it[Ri-1]:Ie)=="L",no=(Mi<ht?it[Mi]:Ie)=="L",Ca=ki==no?ki?"L":"R":Ie,Xo=Ri;Xo<Mi;++Xo)it[Xo]=Ca;Ri=Mi-1}for(var Gi=[],So,Zi=0;Zi<ht;)if(ie.test(it[Zi])){var Zl=Zi;for(++Zi;Zi<ht&&ie.test(it[Zi]);++Zi);Gi.push(new fe(0,Zl,Zi))}else{var Fo=Zi,ta=Gi.length,na=De=="rtl"?1:0;for(++Zi;Zi<ht&&it[Zi]!="L";++Zi);for(var Xi=Fo;Xi<Zi;)if(se.test(it[Xi])){Fo<Xi&&(Gi.splice(ta,0,new fe(1,Fo,Xi)),ta+=na);var wa=Xi;for(++Xi;Xi<Zi&&se.test(it[Xi]);++Xi);Gi.splice(ta,0,new fe(2,wa,Xi)),ta+=na,Fo=Xi}else++Xi;Fo<Zi&&Gi.splice(ta,0,new fe(1,Fo,Zi))}return De=="ltr"&&(Gi[0].level==1&&(So=ve.match(/^\s+/))&&(Gi[0].from=So[0].length,Gi.unshift(new fe(0,0,So[0].length))),Je(Gi).level==1&&(So=ve.match(/\s+$/))&&(Je(Gi).to-=So[0].length,Gi.push(new fe(0,ht-So[0].length,ht)))),De=="rtl"?Gi.reverse():Gi}}();function Rt(a,y){var b=a.order;return b==null&&(b=a.order=pt(a.text,y)),b}var Vt=[],kt=function(a,y,b){if(a.addEventListener)a.addEventListener(y,b,!1);else if(a.attachEvent)a.attachEvent("on"+y,b);else{var x=a._handlers||(a._handlers={});x[y]=(x[y]||Vt).concat(b)}};function ln(a,y){return a._handlers&&a._handlers[y]||Vt}function $t(a,y,b){if(a.removeEventListener)a.removeEventListener(y,b,!1);else if(a.detachEvent)a.detachEvent("on"+y,b);else{var x=a._handlers,E=x&&x[y];if(E){var ee=mt(E,b);ee>-1&&(x[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function _t(a,y){var b=ln(a,y);if(b.length)for(var x=Array.prototype.slice.call(arguments,2),E=0;E<b.length;++E)b[E].apply(null,x)}function $e(a,y,b){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),_t(a,b||y.type,a,y),Kt(y)||y.codemirrorIgnore}function un(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var b=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),x=0;x<y.length;++x)mt(b,y[x])==-1&&b.push(y[x])}function Mt(a,y){return ln(a,y).length>0}function Ut(a){a.prototype.on=function(y,b){kt(this,y,b)},a.prototype.off=function(y,b){$t(this,y,b)}}function vn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Pn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Kt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function kn(a){vn(a),Pn(a)}function tr(a){return a.target||a.srcElement}function Jn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ae&&a.ctrlKey&&y==1&&(y=3),y}var Ft=function(){if(xe&&ue<9)return!1;var a=we("div");return"draggable"in a||"dragDrop"in a}(),Bt;function At(a){if(Bt==null){var y=we("span","\u200B");Ce(a,we("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Bt=y.offsetWidth<=1&&y.offsetHeight>2&&!(xe&&ue<8))}var b=Bt?we("span","\u200B"):we("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return b.setAttribute("cm-text",""),b}var xn;function wn(a){if(xn!=null)return xn;var y=Ce(a,document.createTextNode("A\u062EA")),b=Se(y,0,1).getBoundingClientRect(),x=Se(y,1,2).getBoundingClientRect();return yt(a),!b||b.left==b.right?!1:xn=x.right-b.right<3}var zn=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,b=[],x=a.length;y<=x;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=ee.indexOf("\r");ie!=-1?(b.push(ee.slice(0,ie)),y+=ie+1):(b.push(ee),y=E+1)}return b}:function(a){return a.split(/\r\n?|\n/)},rr=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(b){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},mn=function(){var a=we("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Xt=null;function Nn(a){if(Xt!=null)return Xt;var y=Ce(a,we("span","x")),b=y.getBoundingClientRect(),x=Se(y,0,1).getBoundingClientRect();return Xt=Math.abs(b.left-x.left)>1}var kr={},gn={};function Ln(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),kr[a]=y}function Mn(a,y){gn[a]=y}function _n(a){if(typeof a=="string"&&gn.hasOwnProperty(a))a=gn[a];else if(a&&typeof a.name=="string"&&gn.hasOwnProperty(a.name)){var y=gn[a.name];typeof y=="string"&&(y={name:y}),a=te(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return _n("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return _n("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Tr(a,y){y=_n(y);var b=kr[y.name];if(!b)return Tr(a,"text/plain");var x=b(a,y);if(xr.hasOwnProperty(y.name)){var E=xr[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(x.hasOwnProperty(ee)&&(x["_"+ee]=x[ee]),x[ee]=E[ee])}if(x.name=y.name,y.helperType&&(x.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)x[ie]=y.modeProps[ie];return x}var xr={};function Hr(a,y){var b=xr.hasOwnProperty(a)?xr[a]:xr[a]={};Ht(y,b)}function br(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var b={};for(var x in y){var E=y[x];E instanceof Array&&(E=E.concat([])),b[x]=E}return b}function or(a,y){for(var b;a.innerMode&&(b=a.innerMode(y),!(!b||b.mode==a));)y=b.state,a=b.mode;return b||{mode:a,state:y}}function Fr(a,y,b){return a.startState?a.startState(y,b):!0}var dn=function(a,y,b){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=b};dn.prototype.eol=function(){return this.pos>=this.string.length},dn.prototype.sol=function(){return this.pos==this.lineStart},dn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dn.prototype.eat=function(a){var y=this.string.charAt(this.pos),b;if(typeof a=="string"?b=y==a:b=y&&(a.test?a.test(y):a(y)),b)return++this.pos,y},dn.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},dn.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},dn.prototype.skipToEnd=function(){this.pos=this.string.length},dn.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},dn.prototype.backUp=function(a){this.pos-=a},dn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ye(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},dn.prototype.indentation=function(){return ye(this.string,null,this.tabSize)-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},dn.prototype.match=function(a,y,b){if(typeof a=="string"){var x=function(ie){return b?ie.toLowerCase():ie},E=this.string.substr(this.pos,a.length);if(x(E)==x(a))return y!==!1&&(this.pos+=a.length),!0}else{var ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},dn.prototype.current=function(){return this.string.slice(this.start,this.pos)},dn.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},dn.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},dn.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function St(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var b=a;!b.lines;)for(var x=0;;++x){var E=b.children[x],ee=E.chunkSize();if(y<ee){b=E;break}y-=ee}return b.lines[y]}function cn(a,y,b){var x=[],E=y.line;return a.iter(y.line,b.line+1,function(ee){var ie=ee.text;E==b.line&&(ie=ie.slice(0,b.ch)),E==y.line&&(ie=ie.slice(y.ch)),x.push(ie),++E}),x}function nr(a,y,b){var x=[];return a.iter(y,b,function(E){x.push(E.text)}),x}function Er(a,y){var b=y-a.height;if(b)for(var x=a;x;x=x.parent)x.height+=b}function Fe(a){if(a.parent==null)return null;for(var y=a.parent,b=mt(y.lines,a),x=y.parent;x;y=x,x=x.parent)for(var E=0;x.children[E]!=y;++E)b+=x.children[E].chunkSize();return b+y.first}function He(a,y){var b=a.first;e:do{for(var x=0;x<a.children.length;++x){var E=a.children[x],ee=E.height;if(y<ee){a=E;continue e}y-=ee,b+=E.chunkSize()}return b}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var se=a.lines[ie],fe=se.height;if(y<fe)break;y-=fe}return b+ie}function rn(a,y){return y>=a.first&&y<a.first+a.size}function zt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Qe(a,y,b){if(b===void 0&&(b=null),!(this instanceof Qe))return new Qe(a,y,b);this.line=a,this.ch=y,this.sticky=b}function jt(a,y){return a.line-y.line||a.ch-y.ch}function sn(a,y){return a.sticky==y.sticky&&jt(a,y)==0}function hn(a){return Qe(a.line,a.ch)}function bn(a,y){return jt(a,y)<0?y:a}function pn(a,y){return jt(a,y)<0?a:y}function Cn(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Ve(a,y){if(y.line<a.first)return Qe(a.first,0);var b=a.first+a.size-1;return y.line>b?Qe(b,St(a,b).text.length):Vn(y,St(a,y.line).text.length)}function Vn(a,y){var b=a.ch;return b==null||b>y?Qe(a.line,y):b<0?Qe(a.line,0):a}function Sn(a,y){for(var b=[],x=0;x<y.length;x++)b[x]=Ve(a,y[x]);return b}var Fn=function(a,y){this.state=a,this.lookAhead=y},Hn=function(a,y,b,x){this.state=y,this.doc=a,this.line=b,this.maxLookAhead=x||0,this.baseTokens=null,this.baseTokenPos=1};Hn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Hn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},Hn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Hn.fromSaved=function(a,y,b){return y instanceof Fn?new Hn(a,br(a.mode,y.state),b,y.lookAhead):new Hn(a,br(a.mode,y),b)},Hn.prototype.save=function(a){var y=a!==!1?br(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Fn(y,this.maxLookAhead):y};function Yn(a,y,b,x){var E=[a.state.modeGen],ee={};Ur(a,y.text,a.doc.mode,b,function(ve,De){return E.push(ve,De)},ee,x);for(var ie=b.state,se=function(ve){b.baseTokens=E;var De=a.state.overlays[ve],Ie=1,ht=0;b.state=!0,Ur(a,y.text,De.mode,b,function(it,tn){for(var fn=Ie;ht<it;){var En=E[Ie];En>it&&E.splice(Ie,1,it,E[Ie+1],En),Ie+=2,ht=Math.min(it,En)}if(tn)if(De.opaque)E.splice(fn,Ie-fn,it,"overlay "+tn),Ie=fn+2;else for(;fn<Ie;fn+=2){var Rn=E[fn+1];E[fn+1]=(Rn?Rn+" ":"")+"overlay "+tn}},ee),b.state=ie,b.baseTokens=null,b.baseTokenPos=1},fe=0;fe<a.state.overlays.length;++fe)se(fe);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function ar(a,y,b){if(!y.styles||y.styles[0]!=a.state.modeGen){var x=zr(a,Fe(y)),E=y.text.length>a.options.maxHighlightLength&&br(a.doc.mode,x.state),ee=Yn(a,y,x);E&&(x.state=E),y.stateAfter=x.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),b===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function zr(a,y,b){var x=a.doc,E=a.display;if(!x.mode.startState)return new Hn(x,!0,y);var ee=Gr(a,y,b),ie=ee>x.first&&St(x,ee-1).stateAfter,se=ie?Hn.fromSaved(x,ie,ee):new Hn(x,Fr(x.mode),ee);return x.iter(ee,y,function(fe){Cr(a,fe.text,se);var ve=se.line;fe.stateAfter=ve==y-1||ve%5==0||ve>=E.viewFrom&&ve<E.viewTo?se.save():null,se.nextLine()}),b&&(x.modeFrontier=se.line),se}function Cr(a,y,b,x){var E=a.doc.mode,ee=new dn(y,a.options.tabSize,b);for(ee.start=ee.pos=x||0,y==""&&dr(E,b.state);!ee.eol();)Zr(E,ee,b.state),ee.start=ee.pos}function dr(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var b=or(a,y);if(b.mode.blankLine)return b.mode.blankLine(b.state)}}function Zr(a,y,b,x){for(var E=0;E<10;E++){x&&(x[0]=or(a,b).mode);var ee=a.token(y,b);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var ur=function(a,y,b){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=b};function jr(a,y,b,x){var E=a.doc,ee=E.mode,ie;y=Ve(E,y);var se=St(E,y.line),fe=zr(a,y.line,b),ve=new dn(se.text,a.options.tabSize,fe),De;for(x&&(De=[]);(x||ve.pos<y.ch)&&!ve.eol();)ve.start=ve.pos,ie=Zr(ee,ve,fe.state),x&&De.push(new ur(ve,ie,br(E.mode,fe.state)));return x?De:new ur(ve,ie,fe.state)}function $r(a,y){if(a)for(;;){var b=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!b)break;a=a.slice(0,b.index)+a.slice(b.index+b[0].length);var x=b[1]?"bgClass":"textClass";y[x]==null?y[x]=b[2]:new RegExp("(?:^|\\s)"+b[2]+"(?:$|\\s)").test(y[x])||(y[x]+=" "+b[2])}return a}function Ur(a,y,b,x,E,ee,ie){var se=b.flattenSpans;se==null&&(se=a.options.flattenSpans);var fe=0,ve=null,De=new dn(y,a.options.tabSize,x),Ie,ht=a.options.addModeClass&&[null];for(y==""&&$r(dr(b,x.state),ee);!De.eol();){if(De.pos>a.options.maxHighlightLength?(se=!1,ie&&Cr(a,y,x,De.pos),De.pos=y.length,Ie=null):Ie=$r(Zr(b,De,x.state,ht),ee),ht){var it=ht[0].name;it&&(Ie="m-"+(Ie?it+" "+Ie:it))}if(!se||ve!=Ie){for(;fe<De.start;)fe=Math.min(De.start,fe+5e3),E(fe,ve);ve=Ie}De.start=De.pos}for(;fe<De.pos;){var tn=Math.min(De.pos,fe+5e3);E(tn,ve),fe=tn}}function Gr(a,y,b){for(var x,E,ee=a.doc,ie=b?-1:y-(a.doc.mode.innerMode?1e3:100),se=y;se>ie;--se){if(se<=ee.first)return ee.first;var fe=St(ee,se-1),ve=fe.stateAfter;if(ve&&(!b||se+(ve instanceof Fn?ve.lookAhead:0)<=ee.modeFrontier))return se;var De=ye(fe.text,null,a.options.tabSize);(E==null||x>De)&&(E=se-1,x=De)}return E}function Yr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var b=a.first,x=y-1;x>b;x--){var E=St(a,x).stateAfter;if(E&&(!(E instanceof Fn)||x+E.lookAhead<y)){b=x+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,b)}}var Vr=!1,Mr=!1;function qr(){Vr=!0}function Kr(){Mr=!0}function On(a,y,b){this.marker=a,this.from=y,this.to=b}function Qn(a,y){if(a)for(var b=0;b<a.length;++b){var x=a[b];if(x.marker==y)return x}}function mr(a,y){for(var b,x=0;x<a.length;++x)a[x]!=y&&(b||(b=[])).push(a[x]);return b}function Nr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Ar(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var ee=a[E],ie=ee.marker,se=ee.from==null||(ie.inclusiveLeft?ee.from<=y:ee.from<y);if(se||ee.from==y&&ie.type=="bookmark"&&(!b||!ee.marker.insertLeft)){var fe=ee.to==null||(ie.inclusiveRight?ee.to>=y:ee.to>y);(x||(x=[])).push(new On(ie,ee.from,fe?null:ee.to))}}return x}function Or(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var ee=a[E],ie=ee.marker,se=ee.to==null||(ie.inclusiveRight?ee.to>=y:ee.to>y);if(se||ee.from==y&&ie.type=="bookmark"&&(!b||ee.marker.insertLeft)){var fe=ee.from==null||(ie.inclusiveLeft?ee.from<=y:ee.from<y);(x||(x=[])).push(new On(ie,fe?null:ee.from-y,ee.to==null?null:ee.to-y))}}return x}function si(a,y){if(y.full)return null;var b=rn(a,y.from.line)&&St(a,y.from.line).markedSpans,x=rn(a,y.to.line)&&St(a,y.to.line).markedSpans;if(!b&&!x)return null;var E=y.from.ch,ee=y.to.ch,ie=jt(y.from,y.to)==0,se=Ar(b,E,ie),fe=Or(x,ee,ie),ve=y.text.length==1,De=Je(y.text).length+(ve?E:0);if(se)for(var Ie=0;Ie<se.length;++Ie){var ht=se[Ie];if(ht.to==null){var it=Qn(fe,ht.marker);it?ve&&(ht.to=it.to==null?null:it.to+De):ht.to=E}}if(fe)for(var tn=0;tn<fe.length;++tn){var fn=fe[tn];if(fn.to!=null&&(fn.to+=De),fn.from==null){var En=Qn(se,fn.marker);En||(fn.from=De,ve&&(se||(se=[])).push(fn))}else fn.from+=De,ve&&(se||(se=[])).push(fn)}se&&(se=ke(se)),fe&&fe!=se&&(fe=ke(fe));var Rn=[se];if(!ve){var Wn=y.text.length-2,Bn;if(Wn>0&&se)for(var Un=0;Un<se.length;++Un)se[Un].to==null&&(Bn||(Bn=[])).push(new On(se[Un].marker,null,null));for(var vr=0;vr<Wn;++vr)Rn.push(Bn);Rn.push(fe)}return Rn}function ke(a){for(var y=0;y<a.length;++y){var b=a[y];b.from!=null&&b.from==b.to&&b.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function at(a,y,b){var x=null;if(a.iter(y.line,b.line+1,function(it){if(it.markedSpans)for(var tn=0;tn<it.markedSpans.length;++tn){var fn=it.markedSpans[tn].marker;fn.readOnly&&(!x||mt(x,fn)==-1)&&(x||(x=[])).push(fn)}}),!x)return null;for(var E=[{from:y,to:b}],ee=0;ee<x.length;++ee)for(var ie=x[ee],se=ie.find(0),fe=0;fe<E.length;++fe){var ve=E[fe];if(!(jt(ve.to,se.from)<0||jt(ve.from,se.to)>0)){var De=[fe,1],Ie=jt(ve.from,se.from),ht=jt(ve.to,se.to);(Ie<0||!ie.inclusiveLeft&&!Ie)&&De.push({from:ve.from,to:se.from}),(ht>0||!ie.inclusiveRight&&!ht)&&De.push({from:se.to,to:ve.to}),E.splice.apply(E,De),fe+=De.length-3}}return E}function qe(a){var y=a.markedSpans;if(y){for(var b=0;b<y.length;++b)y[b].marker.detachLine(a);a.markedSpans=null}}function ft(a,y){if(y){for(var b=0;b<y.length;++b)y[b].marker.attachLine(a);a.markedSpans=y}}function vt(a){return a.inclusiveLeft?-1:0}function It(a){return a.inclusiveRight?1:0}function an(a,y){var b=a.lines.length-y.lines.length;if(b!=0)return b;var x=a.find(),E=y.find(),ee=jt(x.from,E.from)||vt(a)-vt(y);if(ee)return-ee;var ie=jt(x.to,E.to)||It(a)-It(y);return ie||y.id-a.id}function en(a,y){var b=Mr&&a.markedSpans,x;if(b)for(var E=void 0,ee=0;ee<b.length;++ee)E=b[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!x||an(x,E.marker)<0)&&(x=E.marker);return x}function Gt(a){return en(a,!0)}function et(a){return en(a,!1)}function xt(a,y){var b=Mr&&a.markedSpans,x;if(b)for(var E=0;E<b.length;++E){var ee=b[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!x||an(x,ee.marker)<0)&&(x=ee.marker)}return x}function Ct(a,y,b,x,E){var ee=St(a,y),ie=Mr&&ee.markedSpans;if(ie)for(var se=0;se<ie.length;++se){var fe=ie[se];if(fe.marker.collapsed){var ve=fe.marker.find(0),De=jt(ve.from,b)||vt(fe.marker)-vt(E),Ie=jt(ve.to,x)||It(fe.marker)-It(E);if(!(De>=0&&Ie<=0||De<=0&&Ie>=0)&&(De<=0&&(fe.marker.inclusiveRight&&E.inclusiveLeft?jt(ve.to,b)>=0:jt(ve.to,b)>0)||De>=0&&(fe.marker.inclusiveRight&&E.inclusiveLeft?jt(ve.from,x)<=0:jt(ve.from,x)<0)))return!0}}}function bt(a){for(var y;y=Gt(a);)a=y.find(-1,!0).line;return a}function Zt(a){for(var y;y=et(a);)a=y.find(1,!0).line;return a}function gt(a){for(var y,b;y=et(a);)a=y.find(1,!0).line,(b||(b=[])).push(a);return b}function Lt(a,y){var b=St(a,y),x=bt(b);return b==x?y:Fe(x)}function Wt(a,y){if(y>a.lastLine())return y;var b=St(a,y),x;if(!Qt(a,b))return y;for(;x=et(b);)b=x.find(1,!0).line;return Fe(b)+1}function Qt(a,y){var b=Mr&&y.markedSpans;if(b){for(var x=void 0,E=0;E<b.length;++E)if(x=b[E],!!x.marker.collapsed){if(x.from==null)return!0;if(!x.marker.widgetNode&&x.from==0&&x.marker.inclusiveLeft&&Tn(a,y,x))return!0}}}function Tn(a,y,b){if(b.to==null){var x=b.marker.find(1,!0);return Tn(a,x.line,Qn(x.line.markedSpans,b.marker))}if(b.marker.inclusiveRight&&b.to==y.text.length)return!0;for(var E=void 0,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==b.to&&(E.to==null||E.to!=b.from)&&(E.marker.inclusiveLeft||b.marker.inclusiveRight)&&Tn(a,y,E))return!0}function Dn(a){a=bt(a);for(var y=0,b=a.parent,x=0;x<b.lines.length;++x){var E=b.lines[x];if(E==a)break;y+=E.height}for(var ee=b.parent;ee;b=ee,ee=b.parent)for(var ie=0;ie<ee.children.length;++ie){var se=ee.children[ie];if(se==b)break;y+=se.height}return y}function Gn(a){if(a.height==0)return 0;for(var y=a.text.length,b,x=a;b=Gt(x);){var E=b.find(0,!0);x=E.from.line,y+=E.from.ch-E.to.ch}for(x=a;b=et(x);){var ee=b.find(0,!0);y-=x.text.length-ee.from.ch,x=ee.to.line,y+=x.text.length-ee.to.ch}return y}function An(a){var y=a.display,b=a.doc;y.maxLine=St(b,b.first),y.maxLineLength=Gn(y.maxLine),y.maxLineChanged=!0,b.iter(function(x){var E=Gn(x);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=x)})}var Xn=function(a,y,b){this.text=a,ft(this,y),this.height=b?b(this):1};Xn.prototype.lineNo=function(){return Fe(this)},Ut(Xn);function qn(a,y,b,x){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),qe(a),ft(a,b);var E=x?x(a):1;E!=a.height&&Er(a,E)}function fr(a){a.parent=null,qe(a)}var er={},gr={};function Dr(a,y){if(!a||/^\s*$/.test(a))return null;var b=y.addModeClass?gr:er;return b[a]||(b[a]=a.replace(/\S+/g,"cm-$&"))}function hr(a,y){var b=We("span",null,null,Le?"padding-right: .1px":null),x={pre:We("pre",[b],"CodeMirror-line"),content:b,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,ie=void 0;x.pos=0,x.addToken=$n,wn(a.display.measure)&&(ie=Rt(ee,a.doc.direction))&&(x.addToken=jn(x.addToken,ie)),x.map=[];var se=y!=a.display.externalMeasured&&Fe(ee);yr(ee,x,ar(a,ee,se)),ee.styleClasses&&(ee.styleClasses.bgClass&&(x.bgClass=Yt(ee.styleClasses.bgClass,x.bgClass||"")),ee.styleClasses.textClass&&(x.textClass=Yt(ee.styleClasses.textClass,x.textClass||""))),x.map.length==0&&x.map.push(0,0,x.content.appendChild(At(a.display.measure))),E==0?(y.measure.map=x.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(x.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Le){var fe=x.content.lastChild;(/\bcm-tab\b/.test(fe.className)||fe.querySelector&&fe.querySelector(".cm-tab"))&&(x.content.className="cm-tab-wrap-hack")}return _t(a,"renderLine",a,y.line,x.pre),x.pre.className&&(x.textClass=Yt(x.pre.className,x.textClass||"")),x}function wr(a){var y=we("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function $n(a,y,b,x,E,ee,ie){if(y){var se=a.splitSpaces?In(y,a.trailingSpace):y,fe=a.cm.state.specialChars,ve=!1,De;if(!fe.test(y))a.col+=y.length,De=document.createTextNode(se),a.map.push(a.pos,a.pos+y.length,De),xe&&ue<9&&(ve=!0),a.pos+=y.length;else{De=document.createDocumentFragment();for(var Ie=0;;){fe.lastIndex=Ie;var ht=fe.exec(y),it=ht?ht.index-Ie:y.length-Ie;if(it){var tn=document.createTextNode(se.slice(Ie,Ie+it));xe&&ue<9?De.appendChild(we("span",[tn])):De.appendChild(tn),a.map.push(a.pos,a.pos+it,tn),a.col+=it,a.pos+=it}if(!ht)break;Ie+=it+1;var fn=void 0;if(ht[0]==" "){var En=a.cm.options.tabSize,Rn=En-a.col%En;fn=De.appendChild(we("span",Dt(Rn),"cm-tab")),fn.setAttribute("role","presentation"),fn.setAttribute("cm-text"," "),a.col+=Rn}else ht[0]=="\r"||ht[0]==`
|
|
`?(fn=De.appendChild(we("span",ht[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),fn.setAttribute("cm-text",ht[0]),a.col+=1):(fn=a.cm.options.specialCharPlaceholder(ht[0]),fn.setAttribute("cm-text",ht[0]),xe&&ue<9?De.appendChild(we("span",[fn])):De.appendChild(fn),a.col+=1);a.map.push(a.pos,a.pos+1,fn),a.pos++}}if(a.trailingSpace=se.charCodeAt(y.length-1)==32,b||x||E||ve||ee||ie){var Wn=b||"";x&&(Wn+=x),E&&(Wn+=E);var Bn=we("span",[De],Wn,ee);if(ie)for(var Un in ie)ie.hasOwnProperty(Un)&&Un!="style"&&Un!="class"&&Bn.setAttribute(Un,ie[Un]);return a.content.appendChild(Bn)}a.content.appendChild(De)}}function In(a,y){if(a.length>1&&!/ /.test(a))return a;for(var b=y,x="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&b&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),x+=ee,b=ee==" "}return x}function jn(a,y){return function(b,x,E,ee,ie,se,fe){E=E?E+" cm-force-border":"cm-force-border";for(var ve=b.pos,De=ve+x.length;;){for(var Ie=void 0,ht=0;ht<y.length&&(Ie=y[ht],!(Ie.to>ve&&Ie.from<=ve));ht++);if(Ie.to>=De)return a(b,x,E,ee,ie,se,fe);a(b,x.slice(0,Ie.to-ve),E,ee,null,se,fe),ee=null,x=x.slice(Ie.to-ve),ve=Ie.to}}}function Zn(a,y,b,x){var E=!x&&b.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!x&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",b.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function yr(a,y,b){var x=a.markedSpans,E=a.text,ee=0;if(!x){for(var ie=1;ie<b.length;ie+=2)y.addToken(y,E.slice(ee,ee=b[ie]),Dr(b[ie+1],y.cm.options));return}for(var se=E.length,fe=0,ve=1,De="",Ie,ht,it=0,tn,fn,En,Rn,Wn;;){if(it==fe){tn=fn=En=ht="",Wn=null,Rn=null,it=1/0;for(var Bn=[],Un=void 0,vr=0;vr<x.length;++vr){var ir=x[vr],Wr=ir.marker;if(Wr.type=="bookmark"&&ir.from==fe&&Wr.widgetNode)Bn.push(Wr);else if(ir.from<=fe&&(ir.to==null||ir.to>fe||Wr.collapsed&&ir.to==fe&&ir.from==fe)){if(ir.to!=null&&ir.to!=fe&&it>ir.to&&(it=ir.to,fn=""),Wr.className&&(tn+=" "+Wr.className),Wr.css&&(ht=(ht?ht+";":"")+Wr.css),Wr.startStyle&&ir.from==fe&&(En+=" "+Wr.startStyle),Wr.endStyle&&ir.to==it&&(Un||(Un=[])).push(Wr.endStyle,ir.to),Wr.title&&((Wn||(Wn={})).title=Wr.title),Wr.attributes)for(var ci in Wr.attributes)(Wn||(Wn={}))[ci]=Wr.attributes[ci];Wr.collapsed&&(!Rn||an(Rn.marker,Wr)<0)&&(Rn=ir)}else ir.from>fe&&it>ir.from&&(it=ir.from)}if(Un)for(var Fi=0;Fi<Un.length;Fi+=2)Un[Fi+1]==it&&(fn+=" "+Un[Fi]);if(!Rn||Rn.from==fe)for(var Ci=0;Ci<Bn.length;++Ci)Zn(y,0,Bn[Ci]);if(Rn&&(Rn.from||0)==fe){if(Zn(y,(Rn.to==null?se+1:Rn.to)-fe,Rn.marker,Rn.from==null),Rn.to==null)return;Rn.to==fe&&(Rn=!1)}}if(fe>=se)break;for(var ao=Math.min(se,it);;){if(De){var eo=fe+De.length;if(!Rn){var Pi=eo>ao?De.slice(0,ao-fe):De;y.addToken(y,Pi,Ie?Ie+tn:tn,En,fe+Pi.length==it?fn:"",ht,Wn)}if(eo>=ao){De=De.slice(ao-fe),fe=ao;break}fe=eo,En=""}De=E.slice(ee,ee=b[ve++]),Ie=Dr(b[ve++],y.cm.options)}}}function pr(a,y,b){this.line=y,this.rest=gt(y),this.size=this.rest?Fe(Je(this.rest))-b+1:1,this.node=this.text=null,this.hidden=Qt(a,y)}function Sr(a,y,b){for(var x=[],E,ee=y;ee<b;ee=E){var ie=new pr(a.doc,St(a.doc,ee),ee);E=ee+ie.size,x.push(ie)}return x}var Xr=null;function wi(a){Xr?Xr.ops.push(a):a.ownsGroup=Xr={ops:[a],delayedCallbacks:[]}}function oi(a){var y=a.delayedCallbacks,b=0;do{for(;b<y.length;b++)y[b].call(null);for(var x=0;x<a.ops.length;x++){var E=a.ops[x];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(b<y.length)}function ji(a,y){var b=a.ownsGroup;if(b)try{oi(b)}finally{Xr=null,y(b)}}var Li=null;function Jr(a,y){var b=ln(a,y);if(b.length){var x=Array.prototype.slice.call(arguments,2),E;Xr?E=Xr.delayedCallbacks:Li?E=Li:(E=Li=[],setTimeout(ei,0));for(var ee=function(se){E.push(function(){return b[se].apply(null,x)})},ie=0;ie<b.length;++ie)ee(ie)}}function ei(){var a=Li;Li=null;for(var y=0;y<a.length;++y)a[y]()}function ti(a,y,b,x){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?ai(a,y):ee=="gutter"?lr(a,y,b,x):ee=="class"?Kn(a,y):ee=="widget"&&sr(a,y,x)}y.changes=null}function Ei(a){return a.node==a.text&&(a.node=we("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),xe&&ue<8&&(a.node.style.zIndex=2)),a.node}function ii(a,y){var b=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),y.background)b?y.background.className=b:(y.background.parentNode.removeChild(y.background),y.background=null);else if(b){var x=Ei(y);y.background=x.insertBefore(we("div",null,b),x.firstChild),a.display.input.setUneditable(y.background)}}function ui(a,y){var b=a.display.externalMeasured;return b&&b.line==y.line?(a.display.externalMeasured=null,y.measure=b.measure,b.built):hr(a,y)}function ai(a,y){var b=y.text.className,x=ui(a,y);y.text==y.node&&(y.node=x.pre),y.text.parentNode.replaceChild(x.pre,y.text),y.text=x.pre,x.bgClass!=y.bgClass||x.textClass!=y.textClass?(y.bgClass=x.bgClass,y.textClass=x.textClass,Kn(a,y)):b&&(y.text.className=b)}function Kn(a,y){ii(a,y),y.line.wrapClass?Ei(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var b=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=b||""}function lr(a,y,b,x){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Ei(y);y.gutterBackground=we("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px; width: "+x.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var ie=Ei(y),se=y.gutter=we("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px");if(a.display.input.setUneditable(se),ie.insertBefore(se,y.text),y.line.gutterClass&&(se.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=se.appendChild(we("div",zt(a.options,b),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+x.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var fe=0;fe<a.display.gutterSpecs.length;++fe){var ve=a.display.gutterSpecs[fe].className,De=ee.hasOwnProperty(ve)&&ee[ve];De&&se.appendChild(we("div",[De],"CodeMirror-gutter-elt","left: "+x.gutterLeft[ve]+"px; width: "+x.gutterWidth[ve]+"px"))}}}function sr(a,y,b){y.alignable&&(y.alignable=null);for(var x=Be("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,x.test(E.className)&&y.node.removeChild(E);_r(a,y,b)}function cr(a,y,b,x){var E=ui(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Kn(a,y),lr(a,y,b,x),_r(a,y,x),y.node}function _r(a,y,b){if(Qr(a,y.line,y,b,!0),y.rest)for(var x=0;x<y.rest.length;x++)Qr(a,y.rest[x],y,b,!1)}function Qr(a,y,b,x,E){if(y.widgets)for(var ee=Ei(b),ie=0,se=y.widgets;ie<se.length;++ie){var fe=se[ie],ve=we("div",[fe.node],"CodeMirror-linewidget"+(fe.className?" "+fe.className:""));fe.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Wi(fe,ve,b,x),a.display.input.setUneditable(ve),E&&fe.above?ee.insertBefore(ve,b.gutter||b.text):ee.appendChild(ve),Jr(fe,"redraw")}}function Wi(a,y,b,x){if(a.noHScroll){(b.alignable||(b.alignable=[])).push(y);var E=x.wrapperWidth;y.style.left=x.fixedPos+"px",a.coverGutter||(E-=x.gutterTotalWidth,y.style.paddingLeft=x.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-x.gutterTotalWidth+"px"))}function fi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ue(document.body,a.node)){var b="position: relative;";a.coverGutter&&(b+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(b+="width: "+y.display.wrapper.clientWidth+"px;"),Ce(y.display.measure,we("div",[a.node],null,b))}return a.height=a.node.parentNode.offsetHeight}function di(a,y){for(var b=tr(y);b!=a.wrapper;b=b.parentNode)if(!b||b.nodeType==1&&b.getAttribute("cm-ignore-events")=="true"||b.parentNode==a.sizer&&b!=a.mover)return!0}function Lr(a){return a.lineSpace.offsetTop}function xi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ui(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ce(a.measure,we("pre","x","CodeMirror-line-like")),b=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,x={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};return!isNaN(x.left)&&!isNaN(x.right)&&(a.cachedPaddingH=x),x}function ni(a){return qt-a.display.nativeBarWidth}function lo(a){return a.display.scroller.clientWidth-ni(a)-a.display.barWidth}function Vi(a){return a.display.scroller.clientHeight-ni(a)-a.display.barHeight}function Ji(a,y,b){var x=a.options.lineWrapping,E=x&&lo(a);if(!y.measure.heights||x&&y.measure.width!=E){var ee=y.measure.heights=[];if(x){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),se=0;se<ie.length-1;se++){var fe=ie[se],ve=ie[se+1];Math.abs(fe.bottom-ve.bottom)>2&&ee.push((fe.bottom+ve.top)/2-b.top)}}ee.push(b.bottom-b.top)}}function mi(a,y,b){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var x=0;x<a.rest.length;x++)if(a.rest[x]==y)return{map:a.measure.maps[x],cache:a.measure.caches[x]};for(var E=0;E<a.rest.length;E++)if(Fe(a.rest[E])>b)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ra(a,y){y=bt(y);var b=Fe(y),x=a.display.externalMeasured=new pr(a.doc,y,b);x.lineN=b;var E=x.built=hr(a,x);return x.text=E.pre,Ce(a.display.lineMeasure,E.pre),x}function Jo(a,y,b,x){return ro(a,mo(a,y),b,x)}function vo(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[Lo(a,y)];var b=a.display.externalMeasured;if(b&&y>=b.lineN&&y<b.lineN+b.size)return b}function mo(a,y){var b=Fe(y),x=vo(a,b);x&&!x.text?x=null:x&&x.changes&&(ti(a,x,b,uo(a)),a.curOp.forceUpdate=!0),x||(x=ra(a,y));var E=mi(x,y,b);return{line:y,view:x,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function ro(a,y,b,x,E){y.before&&(b=-1);var ee=b+(x||""),ie;return y.cache.hasOwnProperty(ee)?ie=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Ji(a,y.view,y.rect),y.hasHeights=!0),ie=aa(a,y,b,x),ie.bogus||(y.cache[ee]=ie)),{left:ie.left,right:ie.right,top:E?ie.rtop:ie.top,bottom:E?ie.rbottom:ie.bottom}}var ko={left:0,right:0,top:0,bottom:0};function ia(a,y,b){for(var x,E,ee,ie,se,fe,ve=0;ve<a.length;ve+=3)if(se=a[ve],fe=a[ve+1],y<se?(E=0,ee=1,ie="left"):y<fe?(E=y-se,ee=E+1):(ve==a.length-3||y==fe&&a[ve+3]>y)&&(ee=fe-se,E=ee-1,y>=fe&&(ie="right")),E!=null){if(x=a[ve+2],se==fe&&b==(x.insertLeft?"left":"right")&&(ie=b),b=="left"&&E==0)for(;ve&&a[ve-2]==a[ve-3]&&a[ve-1].insertLeft;)x=a[(ve-=3)+2],ie="left";if(b=="right"&&E==fe-se)for(;ve<a.length-3&&a[ve+3]==a[ve+4]&&!a[ve+5].insertLeft;)x=a[(ve+=3)+2],ie="right";break}return{node:x,start:E,end:ee,collapse:ie,coverStart:se,coverEnd:fe}}function oa(a,y){var b=ko;if(y=="left")for(var x=0;x<a.length&&(b=a[x]).left==b.right;x++);else for(var E=a.length-1;E>=0&&(b=a[E]).left==b.right;E--);return b}function aa(a,y,b,x){var E=ia(y.map,b,x),ee=E.node,ie=E.start,se=E.end,fe=E.collapse,ve;if(ee.nodeType==3){for(var De=0;De<4;De++){for(;ie&&Re(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+se<E.coverEnd&&Re(y.line.text.charAt(E.coverStart+se));)++se;if(xe&&ue<9&&ie==0&&se==E.coverEnd-E.coverStart?ve=ee.parentNode.getBoundingClientRect():ve=oa(Se(ee,ie,se).getClientRects(),x),ve.left||ve.right||ie==0)break;se=ie,ie=ie-1,fe="right"}xe&&ue<11&&(ve=Zo(a.display.measure,ve))}else{ie>0&&(fe=x="right");var Ie;a.options.lineWrapping&&(Ie=ee.getClientRects()).length>1?ve=Ie[x=="right"?Ie.length-1:0]:ve=ee.getBoundingClientRect()}if(xe&&ue<9&&!ie&&(!ve||!ve.left&&!ve.right)){var ht=ee.parentNode.getClientRects()[0];ht?ve={left:ht.left,right:ht.left+Qi(a.display),top:ht.top,bottom:ht.bottom}:ve=ko}for(var it=ve.top-y.rect.top,tn=ve.bottom-y.rect.top,fn=(it+tn)/2,En=y.view.measure.heights,Rn=0;Rn<En.length-1&&!(fn<En[Rn]);Rn++);var Wn=Rn?En[Rn-1]:0,Bn=En[Rn],Un={left:(fe=="right"?ve.right:ve.left)-y.rect.left,right:(fe=="left"?ve.left:ve.right)-y.rect.left,top:Wn,bottom:Bn};return!ve.left&&!ve.right&&(Un.bogus=!0),a.options.singleCursorHeightPerLine||(Un.rtop=it,Un.rbottom=tn),Un}function Zo(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Nn(a))return y;var b=screen.logicalXDPI/screen.deviceXDPI,x=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*b,right:y.right*b,top:y.top*x,bottom:y.bottom*x}}function Qo(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function _o(a){a.display.externalMeasure=null,yt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Qo(a.display.view[y])}function Eo(a){_o(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function $o(){return be&&Ze?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function la(){return be&&Ze?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ho(a){var y=0;if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].above&&(y+=fi(a.widgets[b]));return y}function Do(a,y,b,x,E){if(!E){var ee=Ho(y);b.top+=ee,b.bottom+=ee}if(x=="line")return b;x||(x="local");var ie=Dn(y);if(x=="local"?ie+=Lr(a.display):ie-=a.display.viewOffset,x=="page"||x=="window"){var se=a.display.lineSpace.getBoundingClientRect();ie+=se.top+(x=="window"?0:la());var fe=se.left+(x=="window"?0:$o());b.left+=fe,b.right+=fe}return b.top+=ie,b.bottom+=ie,b}function To(a,y,b){if(b=="div")return y;var x=y.left,E=y.top;if(b=="page")x-=$o(),E-=la();else if(b=="local"||!b){var ee=a.display.sizer.getBoundingClientRect();x+=ee.left,E+=ee.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:x-ie.left,top:E-ie.top}}function _i(a,y,b,x,E){return x||(x=St(a.doc,y.line)),Do(a,x,Jo(a,x,y.ch,E),b)}function hi(a,y,b,x,E,ee){x=x||St(a.doc,y.line),E||(E=mo(a,x));function ie(tn,fn){var En=ro(a,E,tn,fn?"right":"left",ee);return fn?En.left=En.right:En.right=En.left,Do(a,x,En,b)}var se=Rt(x,a.doc.direction),fe=y.ch,ve=y.sticky;if(fe>=x.text.length?(fe=x.text.length,ve="before"):fe<=0&&(fe=0,ve="after"),!se)return ie(ve=="before"?fe-1:fe,ve=="before");function De(tn,fn,En){var Rn=se[fn],Wn=Rn.level==1;return ie(En?tn-1:tn,Wn!=En)}var Ie=Ge(se,fe,ve),ht=Ye,it=De(fe,Ie,ve=="before");return ht!=null&&(it.other=De(fe,ht,ve!="before")),it}function Ir(a,y){var b=0;y=Ve(a.doc,y),a.options.lineWrapping||(b=Qi(a.display)*y.ch);var x=St(a.doc,y.line),E=Dn(x)+Lr(a.display);return{left:b,right:b,top:E,bottom:E+x.height}}function Pr(a,y,b,x,E){var ee=Qe(a,y,b);return ee.xRel=E,x&&(ee.outside=x),ee}function gi(a,y,b){var x=a.doc;if(b+=a.display.viewOffset,b<0)return Pr(x.first,0,null,-1,-1);var E=He(x,b),ee=x.first+x.size-1;if(E>ee)return Pr(x.first+x.size-1,St(x,ee).text.length,null,1,1);y<0&&(y=0);for(var ie=St(x,E);;){var se=so(a,ie,E,y,b),fe=xt(ie,se.ch+(se.xRel>0||se.outside>0?1:0));if(!fe)return se;var ve=fe.find(1);if(ve.line==E)return ve;ie=St(x,E=ve.line)}}function pi(a,y,b,x){x-=Ho(y);var E=y.text.length,ee=Tt(function(ie){return ro(a,b,ie-1).bottom<=x},E,0);return E=Tt(function(ie){return ro(a,b,ie).top>x},ee,E),{begin:ee,end:E}}function bi(a,y,b,x){b||(b=mo(a,y));var E=Do(a,y,ro(a,b,x),"line").top;return pi(a,y,b,E)}function Di(a,y,b,x){return a.bottom<=b?!1:a.top>b?!0:(x?a.left:a.right)>y}function so(a,y,b,x,E){E-=Dn(y);var ee=mo(a,y),ie=Ho(y),se=0,fe=y.text.length,ve=!0,De=Rt(y,a.doc.direction);if(De){var Ie=(a.options.lineWrapping?go:io)(a,y,b,ee,De,x,E);ve=Ie.level!=1,se=ve?Ie.from:Ie.to-1,fe=ve?Ie.to:Ie.from-1}var ht=null,it=null,tn=Tt(function(vr){var ir=ro(a,ee,vr);return ir.top+=ie,ir.bottom+=ie,Di(ir,x,E,!1)?(ir.top<=E&&ir.left<=x&&(ht=vr,it=ir),!0):!1},se,fe),fn,En,Rn=!1;if(it){var Wn=x-it.left<it.right-x,Bn=Wn==ve;tn=ht+(Bn?0:1),En=Bn?"after":"before",fn=Wn?it.left:it.right}else{!ve&&(tn==fe||tn==se)&&tn++,En=tn==0?"after":tn==y.text.length?"before":ro(a,ee,tn-(ve?1:0)).bottom+ie<=E==ve?"after":"before";var Un=hi(a,Qe(b,tn,En),"line",y,ee);fn=Un.left,Rn=E<Un.top?-1:E>=Un.bottom?1:0}return tn=wt(y.text,tn,1),Pr(b,tn,En,Rn,x-fn)}function io(a,y,b,x,E,ee,ie){var se=Tt(function(Ie){var ht=E[Ie],it=ht.level!=1;return Di(hi(a,Qe(b,it?ht.to:ht.from,it?"before":"after"),"line",y,x),ee,ie,!0)},0,E.length-1),fe=E[se];if(se>0){var ve=fe.level!=1,De=hi(a,Qe(b,ve?fe.from:fe.to,ve?"after":"before"),"line",y,x);Di(De,ee,ie,!0)&&De.top>ie&&(fe=E[se-1])}return fe}function go(a,y,b,x,E,ee,ie){var se=pi(a,y,x,ie),fe=se.begin,ve=se.end;/\s/.test(y.text.charAt(ve-1))&&ve--;for(var De=null,Ie=null,ht=0;ht<E.length;ht++){var it=E[ht];if(!(it.from>=ve||it.to<=fe)){var tn=it.level!=1,fn=ro(a,x,tn?Math.min(ve,it.to)-1:Math.max(fe,it.from)).right,En=fn<ee?ee-fn+1e9:fn-ee;(!De||Ie>En)&&(De=it,Ie=En)}}return De||(De=E[E.length-1]),De.from<fe&&(De={from:fe,to:De.to,level:De.level}),De.to>ve&&(De={from:De.from,to:ve,level:De.level}),De}var vi;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(vi==null){vi=we("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)vi.appendChild(document.createTextNode("x")),vi.appendChild(we("br"));vi.appendChild(document.createTextNode("x"))}Ce(a.measure,vi);var b=vi.offsetHeight/50;return b>3&&(a.cachedTextHeight=b),yt(a.measure),b||1}function Qi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=we("span","xxxxxxxxxx"),b=we("pre",[y],"CodeMirror-line-like");Ce(a.measure,b);var x=y.getBoundingClientRect(),E=(x.right-x.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function uo(a){for(var y=a.display,b={},x={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,ie=0;ee;ee=ee.nextSibling,++ie){var se=a.display.gutterSpecs[ie].className;b[se]=ee.offsetLeft+ee.clientLeft+E,x[se]=ee.clientWidth}return{fixedPos:qo(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:b,gutterWidth:x,wrapperWidth:y.wrapper.clientWidth}}function qo(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Sa(a){var y=Ai(a.display),b=a.options.lineWrapping,x=b&&Math.max(5,a.display.scroller.clientWidth/Qi(a.display)-3);return function(E){if(Qt(a.doc,E))return 0;var ee=0;if(E.widgets)for(var ie=0;ie<E.widgets.length;ie++)E.widgets[ie].height&&(ee+=E.widgets[ie].height);return b?ee+(Math.ceil(E.text.length/x)||1)*y:ee+y}}function ka(a){var y=a.doc,b=Sa(a);y.iter(function(x){var E=b(x);E!=x.height&&Er(x,E)})}function Co(a,y,b,x){var E=a.display;if(!b&&tr(y).getAttribute("cm-not-content")=="true")return null;var ee,ie,se=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-se.left,ie=y.clientY-se.top}catch(Ie){return null}var fe=gi(a,ee,ie),ve;if(x&&fe.xRel>0&&(ve=St(a.doc,fe.line).text).length==fe.ch){var De=ye(ve,ve.length,a.options.tabSize)-ve.length;fe=Qe(fe.line,Math.max(0,Math.round((ee-Ui(a.display).left)/Qi(a.display))-De))}return fe}function Lo(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var b=a.display.view,x=0;x<b.length;x++)if(y-=b[x].size,y<0)return x}function Hi(a,y,b,x){y==null&&(y=a.doc.first),b==null&&(b=a.doc.first+a.doc.size),x||(x=0);var E=a.display;if(x&&b<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)Mr&&Lt(a.doc,y)<E.viewTo&&$i(a);else if(b<=E.viewFrom)Mr&&Wt(a.doc,b+x)>E.viewFrom?$i(a):(E.viewFrom+=x,E.viewTo+=x);else if(y<=E.viewFrom&&b>=E.viewTo)$i(a);else if(y<=E.viewFrom){var ee=sa(a,b,b+x,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=x):$i(a)}else if(b>=E.viewTo){var ie=sa(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):$i(a)}else{var se=sa(a,y,y,-1),fe=sa(a,b,b+x,1);se&&fe?(E.view=E.view.slice(0,se.index).concat(Sr(a,se.lineN,fe.lineN)).concat(E.view.slice(fe.index)),E.viewTo+=x):$i(a)}var ve=E.externalMeasured;ve&&(b<ve.lineN?ve.lineN+=x:y<ve.lineN+ve.size&&(E.externalMeasured=null))}function co(a,y,b){a.curOp.viewChanged=!0;var x=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(x.externalMeasured=null),!(y<x.viewFrom||y>=x.viewTo)){var ee=x.view[Lo(a,y)];if(ee.node!=null){var ie=ee.changes||(ee.changes=[]);mt(ie,b)==-1&&ie.push(b)}}}function $i(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function sa(a,y,b,x){var E=Lo(a,y),ee,ie=a.display.view;if(!Mr||b==a.doc.first+a.doc.size)return{index:E,lineN:b};for(var se=a.display.viewFrom,fe=0;fe<E;fe++)se+=ie[fe].size;if(se!=y){if(x>0){if(E==ie.length-1)return null;ee=se+ie[E].size-y,E++}else ee=se-y;y+=ee,b+=ee}for(;Lt(a.doc,b)!=b;){if(E==(x<0?0:ie.length-1))return null;b+=x*ie[E-(x<0?1:0)].size,E+=x}return{index:E,lineN:b}}function Qa(a,y,b){var x=a.display,E=x.view;E.length==0||y>=x.viewTo||b<=x.viewFrom?(x.view=Sr(a,y,b),x.viewFrom=y):(x.viewFrom>y?x.view=Sr(a,y,x.viewFrom).concat(x.view):x.viewFrom<y&&(x.view=x.view.slice(Lo(a,y))),x.viewFrom=y,x.viewTo<b?x.view=x.view.concat(Sr(a,x.viewTo,b)):x.viewTo>b&&(x.view=x.view.slice(0,Lo(a,b)))),x.viewTo=b}function $a(a){for(var y=a.display.view,b=0,x=0;x<y.length;x++){var E=y[x];!E.hidden&&(!E.node||E.changes)&&++b}return b}function zo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function qa(a,y){y===void 0&&(y=!0);for(var b=a.doc,x={},E=x.cursors=document.createDocumentFragment(),ee=x.selection=document.createDocumentFragment(),ie=0;ie<b.sel.ranges.length;ie++)if(!(!y&&ie==b.sel.primIndex)){var se=b.sel.ranges[ie];if(!(se.from().line>=a.display.viewTo||se.to().line<a.display.viewFrom)){var fe=se.empty();(fe||a.options.showCursorWhenSelecting)&&Ea(a,se.head,E),fe||el(a,se,ee)}}return x}function Ea(a,y,b){var x=hi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=b.appendChild(we("div","\xA0","CodeMirror-cursor"));if(E.style.left=x.left+"px",E.style.top=x.top+"px",E.style.height=Math.max(0,x.bottom-x.top)*a.options.cursorHeight+"px",x.other){var ee=b.appendChild(we("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=x.other.left+"px",ee.style.top=x.other.top+"px",ee.style.height=(x.other.bottom-x.other.top)*.85+"px"}}function Po(a,y){return a.top-y.top||a.left-y.left}function el(a,y,b){var x=a.display,E=a.doc,ee=document.createDocumentFragment(),ie=Ui(a.display),se=ie.left,fe=Math.max(x.sizerWidth,lo(a)-x.sizer.offsetLeft)-ie.right,ve=E.direction=="ltr";function De(Bn,Un,vr,ir){Un<0&&(Un=0),Un=Math.round(Un),ir=Math.round(ir),ee.appendChild(we("div",null,"CodeMirror-selected","position: absolute; left: "+Bn+`px;
|
|
top: `+Un+"px; width: "+(vr==null?fe-Bn:vr)+`px;
|
|
height: `+(ir-Un)+"px"))}function Ie(Bn,Un,vr){var ir=St(E,Bn),Wr=ir.text.length,ci,Fi;function Ci(Pi,to){return _i(a,Qe(Bn,Pi),"div",ir,to)}function ao(Pi,to,zi){var Ri=bi(a,ir,null,Pi),Mi=to=="ltr"==(zi=="after")?"left":"right",ki=zi=="after"?Ri.begin:Ri.end-(/\s/.test(ir.text.charAt(Ri.end-1))?2:1);return Ci(ki,Mi)[Mi]}var eo=Rt(ir,E.direction);return Te(eo,Un||0,vr==null?Wr:vr,function(Pi,to,zi,Ri){var Mi=zi=="ltr",ki=Ci(Pi,Mi?"left":"right"),no=Ci(to-1,Mi?"right":"left"),Ca=Un==null&&Pi==0,Xo=vr==null&&to==Wr,Gi=Ri==0,So=!eo||Ri==eo.length-1;if(no.top-ki.top<=3){var Zi=(ve?Ca:Xo)&&Gi,Zl=(ve?Xo:Ca)&&So,Fo=Zi?se:(Mi?ki:no).left,ta=Zl?fe:(Mi?no:ki).right;De(Fo,ki.top,ta-Fo,ki.bottom)}else{var na,Xi,wa,_l;Mi?(na=ve&&Ca&&Gi?se:ki.left,Xi=ve?fe:ao(Pi,zi,"before"),wa=ve?se:ao(to,zi,"after"),_l=ve&&Xo&&So?fe:no.right):(na=ve?ao(Pi,zi,"before"):se,Xi=!ve&&Ca&&Gi?fe:ki.right,wa=!ve&&Xo&&So?se:no.left,_l=ve?ao(to,zi,"after"):fe),De(na,ki.top,Xi-na,ki.bottom),ki.bottom<no.top&&De(se,ki.bottom,null,no.top),De(wa,no.top,_l-wa,no.bottom)}(!ci||Po(ki,ci)<0)&&(ci=ki),Po(no,ci)<0&&(ci=no),(!Fi||Po(ki,Fi)<0)&&(Fi=ki),Po(no,Fi)<0&&(Fi=no)}),{start:ci,end:Fi}}var ht=y.from(),it=y.to();if(ht.line==it.line)Ie(ht.line,ht.ch,it.ch);else{var tn=St(E,ht.line),fn=St(E,it.line),En=bt(tn)==bt(fn),Rn=Ie(ht.line,ht.ch,En?tn.text.length+1:null).end,Wn=Ie(it.line,En?0:null,it.ch).start;En&&(Rn.top<Wn.top-2?(De(Rn.right,Rn.top,null,Rn.bottom),De(se,Wn.top,Wn.left,Wn.bottom)):De(Rn.right,Rn.top,Wn.left-Rn.right,Rn.bottom)),Rn.bottom<Wn.top&&De(se,Rn.bottom,null,Wn.top)}b.appendChild(ee)}function Da(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var b=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Wo(a),y.cursorDiv.style.visibility=(b=!b)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Ta(a){a.state.focused||(a.display.input.focus(),Pa(a))}function La(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Wo(a))},100)}function Pa(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(_t(a,"focus",a,y),a.state.focused=!0,tt(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Le&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Da(a))}function Wo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(_t(a,"blur",a,y),a.state.focused=!1,ze(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function ua(a){for(var y=a.display,b=y.lineDiv.offsetTop,x=0;x<y.view.length;x++){var E=y.view[x],ee=a.options.lineWrapping,ie=void 0,se=0;if(!E.hidden){if(xe&&ue<8){var fe=E.node.offsetTop+E.node.offsetHeight;ie=fe-b,b=fe}else{var ve=E.node.getBoundingClientRect();ie=ve.bottom-ve.top,!ee&&E.text.firstChild&&(se=E.text.firstChild.getBoundingClientRect().right-ve.left-1)}var De=E.line.height-ie;if((De>.005||De<-.005)&&(Er(E.line,ie),Ma(E.line),E.rest))for(var Ie=0;Ie<E.rest.length;Ie++)Ma(E.rest[Ie]);if(se>a.display.sizerWidth){var ht=Math.ceil(se/Qi(a.display));ht>a.display.maxLineLength&&(a.display.maxLineLength=ht,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ma(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var b=a.widgets[y],x=b.node.parentNode;x&&(b.height=x.offsetHeight)}}function Mo(a,y,b){var x=b&&b.top!=null?Math.max(0,b.top):a.scroller.scrollTop;x=Math.floor(x-Lr(a));var E=b&&b.bottom!=null?b.bottom:x+a.wrapper.clientHeight,ee=He(y,x),ie=He(y,E);if(b&&b.ensure){var se=b.ensure.from.line,fe=b.ensure.to.line;se<ee?(ee=se,ie=He(y,Dn(St(y,se))+a.wrapper.clientHeight)):Math.min(fe,y.lastLine())>=ie&&(ee=He(y,Dn(St(y,fe))-a.wrapper.clientHeight),ie=fe)}return{from:ee,to:Math.max(ie,ee+1)}}function Aa(a,y){if(!$e(a,"scrollCursorIntoView")){var b=a.display,x=b.sizer.getBoundingClientRect(),E=null;if(y.top+x.top<0?E=!0:y.bottom+x.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!lt){var ee=we("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-b.viewOffset-Lr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+ni(a)+b.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Na(a,y,b,x){x==null&&(x=0);var E;!a.options.lineWrapping&&y==b&&(y=y.ch?Qe(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,b=y.sticky=="before"?Qe(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var ie=!1,se=hi(a,y),fe=!b||b==y?se:hi(a,b);E={left:Math.min(se.left,fe.left),top:Math.min(se.top,fe.top)-x,right:Math.max(se.left,fe.left),bottom:Math.max(se.bottom,fe.bottom)+x};var ve=ca(a,E),De=a.doc.scrollTop,Ie=a.doc.scrollLeft;if(ve.scrollTop!=null&&(No(a,ve.scrollTop),Math.abs(a.doc.scrollTop-De)>1&&(ie=!0)),ve.scrollLeft!=null&&(Ro(a,ve.scrollLeft),Math.abs(a.doc.scrollLeft-Ie)>1&&(ie=!0)),!ie)break}return E}function tl(a,y){var b=ca(a,y);b.scrollTop!=null&&No(a,b.scrollTop),b.scrollLeft!=null&&Ro(a,b.scrollLeft)}function ca(a,y){var b=a.display,x=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:b.scroller.scrollTop,ee=Vi(a),ie={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var se=a.doc.height+xi(b),fe=y.top<x,ve=y.bottom>se-x;if(y.top<E)ie.scrollTop=fe?0:y.top;else if(y.bottom>E+ee){var De=Math.min(y.top,(ve?se:y.bottom)-ee);De!=E&&(ie.scrollTop=De)}var Ie=a.options.fixedGutter?0:b.gutters.offsetWidth,ht=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:b.scroller.scrollLeft-Ie,it=lo(a)-b.gutters.offsetWidth,tn=y.right-y.left>it;return tn&&(y.right=y.left+it),y.left<10?ie.scrollLeft=0:y.left<ht?ie.scrollLeft=Math.max(0,y.left+Ie-(tn?0:10)):y.right>it+ht-3&&(ie.scrollLeft=y.right+(tn?0:10)-it),ie}function da(a,y){y!=null&&(Ko(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Ao(a){Ko(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function ea(a,y,b){(y!=null||b!=null)&&Ko(a),y!=null&&(a.curOp.scrollLeft=y),b!=null&&(a.curOp.scrollTop=b)}function nl(a,y){Ko(a),a.curOp.scrollToPos=y}function Ko(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var b=Ir(a,y.from),x=Ir(a,y.to);Ra(a,b,x,y.margin)}}function Ra(a,y,b,x){var E=ca(a,{left:Math.min(y.left,b.left),top:Math.min(y.top,b.top)-x,right:Math.max(y.right,b.right),bottom:Math.max(y.bottom,b.bottom)+x});ea(a,E.scrollLeft,E.scrollTop)}function No(a,y){Math.abs(a.doc.scrollTop-y)<2||(oe||xl(a,{top:y}),Ba(a,y,!0),oe&&xl(a),Oa(a,100))}function Ba(a,y,b){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!b)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Ro(a,y,b,x){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((b?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!x)&&(a.doc.scrollLeft=y,zl(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function Rr(a){var y=a.display,b=y.gutters.offsetWidth,x=Math.round(a.doc.height+xi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?b:0,docHeight:x,scrollHeight:x+ni(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:b}}var Br=function(a,y,b){this.cm=b;var x=this.vert=we("div",[we("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=we("div",[we("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");x.tabIndex=E.tabIndex=-1,a(x),a(E),kt(x,"scroll",function(){x.clientHeight&&y(x.scrollTop,"vertical")}),kt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&ue<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,b=a.scrollHeight>a.clientHeight+1,x=a.nativeBarWidth;if(b){this.vert.style.display="block",this.vert.style.bottom=y?x+"px":"0";var E=a.viewHeight-(y?x:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=b?x+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(b?x:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(x==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:b?x:0,bottom:y?x:0}},Br.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var a=Ae&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new he,this.disableVert=new he},Br.prototype.enableZeroWidthBar=function(a,y,b){a.style.pointerEvents="auto";function x(){var E=a.getBoundingClientRect(),ee=b=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,x)}y.set(1e3,x)},Br.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Si=function(){};Si.prototype.update=function(){return{bottom:0,right:0}},Si.prototype.setScrollLeft=function(){},Si.prototype.setScrollTop=function(){},Si.prototype.clear=function(){};function Bi(a,y){y||(y=Rr(a));var b=a.display.barWidth,x=a.display.barHeight;Ni(a,y);for(var E=0;E<4&&b!=a.display.barWidth||x!=a.display.barHeight;E++)b!=a.display.barWidth&&a.options.lineWrapping&&ua(a),Ni(a,Rr(a)),b=a.display.barWidth,x=a.display.barHeight}function Ni(a,y){var b=a.display,x=b.scrollbars.update(y);b.sizer.style.paddingRight=(b.barWidth=x.right)+"px",b.sizer.style.paddingBottom=(b.barHeight=x.bottom)+"px",b.heightForcer.style.borderBottom=x.bottom+"px solid transparent",x.right&&x.bottom?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=x.bottom+"px",b.scrollbarFiller.style.width=x.right+"px"):b.scrollbarFiller.style.display="",x.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=x.bottom+"px",b.gutterFiller.style.width=y.gutterWidth+"px"):b.gutterFiller.style.display=""}var Bo={native:Br,null:Si};function wo(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ze(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Bo[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),kt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,b){b=="horizontal"?Ro(a,y):No(a,y)},a),a.display.scrollbars.addClass&&tt(a.display.wrapper,a.display.scrollbars.addClass)}var Oo=0;function fo(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.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:++Oo},wi(a.curOp)}function yo(a){var y=a.curOp;y&&ji(y,function(b){for(var x=0;x<b.ops.length;x++)b.ops[x].cm.curOp=null;Us(b)})}function Us(a){for(var y=a.ops,b=0;b<y.length;b++)Vs(y[b]);for(var x=0;x<y.length;x++)Ys(y[x]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var ee=0;ee<y.length;ee++)Js(y[ee]);for(var ie=0;ie<y.length;ie++)Qs(y[ie])}function Vs(a){var y=a.cm,b=y.display;qs(y),a.updateMaxLine&&An(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<b.viewFrom||a.scrollToPos.to.line>=b.viewTo)||b.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new rl(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&yl(a.cm,a.update)}function Xs(a){var y=a.cm,b=y.display;a.updatedDisplay&&ua(y),a.barMeasure=Rr(y),b.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=Jo(y,b.maxLine,b.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(b.scroller.clientWidth,b.sizer.offsetLeft+a.adjustWidthTo+ni(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,b.sizer.offsetLeft+a.adjustWidthTo-lo(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=b.input.prepareSelection())}function Js(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Ro(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var b=a.focus&&a.focus==Ne();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,b),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Bi(y,a.barMeasure),a.updatedDisplay&&Cl(y,a.barMeasure),a.selectionChanged&&Da(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),b&&Ta(a.cm)}function Qs(a){var y=a.cm,b=y.display,x=y.doc;if(a.updatedDisplay&&Hl(y,a.update),b.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(b.wheelStartX=b.wheelStartY=null),a.scrollTop!=null&&Ba(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Ro(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Na(y,Ve(x,a.scrollToPos.from),Ve(x,a.scrollToPos.to),a.scrollToPos.margin);Aa(y,E)}var ee=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(ee)for(var se=0;se<ee.length;++se)ee[se].lines.length||_t(ee[se],"hide");if(ie)for(var fe=0;fe<ie.length;++fe)ie[fe].lines.length&&_t(ie[fe],"unhide");b.wrapper.offsetHeight&&(x.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&_t(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function oo(a,y){if(a.curOp)return y();fo(a);try{return y()}finally{yo(a)}}function Oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);fo(a);try{return y.apply(a,arguments)}finally{yo(a)}}}function Yi(a){return function(){if(this.curOp)return a.apply(this,arguments);fo(this);try{return a.apply(this,arguments)}finally{yo(this)}}}function Ii(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);fo(y);try{return a.apply(this,arguments)}finally{yo(y)}}}function Oa(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Jt($s,a))}function $s(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var b=+new Date+a.options.workTime,x=zr(a,y.highlightFrontier),E=[];y.iter(x.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(x.line>=a.display.viewFrom){var ie=ee.styles,se=ee.text.length>a.options.maxHighlightLength?br(y.mode,x.state):null,fe=Yn(a,ee,x,!0);se&&(x.state=se),ee.styles=fe.styles;var ve=ee.styleClasses,De=fe.classes;De?ee.styleClasses=De:ve&&(ee.styleClasses=null);for(var Ie=!ie||ie.length!=ee.styles.length||ve!=De&&(!ve||!De||ve.bgClass!=De.bgClass||ve.textClass!=De.textClass),ht=0;!Ie&&ht<ie.length;++ht)Ie=ie[ht]!=ee.styles[ht];Ie&&E.push(x.line),ee.stateAfter=x.save(),x.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&Cr(a,ee.text,x),ee.stateAfter=x.line%5==0?x.save():null,x.nextLine();if(+new Date>b)return Oa(a,a.options.workDelay),!0}),y.highlightFrontier=x.line,y.modeFrontier=Math.max(y.modeFrontier,x.line),E.length&&oo(a,function(){for(var ee=0;ee<E.length;ee++)co(a,E[ee],"text")})}}var rl=function(a,y,b){var x=a.display;this.viewport=y,this.visible=Mo(x,a.doc,y),this.editorIsHidden=!x.wrapper.offsetWidth,this.wrapperHeight=x.wrapper.clientHeight,this.wrapperWidth=x.wrapper.clientWidth,this.oldDisplayWidth=lo(a),this.force=b,this.dims=uo(a),this.events=[]};rl.prototype.signal=function(a,y){Mt(a,y)&&this.events.push(arguments)},rl.prototype.finish=function(){for(var a=0;a<this.events.length;a++)_t.apply(null,this.events[a])};function qs(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=ni(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=ni(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ne();if(!y||!Ue(a.display.lineDiv,y))return null;var b={activeElt:y};if(window.getSelection){var x=window.getSelection();x.anchorNode&&x.extend&&Ue(a.display.lineDiv,x.anchorNode)&&(b.anchorNode=x.anchorNode,b.anchorOffset=x.anchorOffset,b.focusNode=x.focusNode,b.focusOffset=x.focusOffset)}return b}function tu(a){if(!(!a||!a.activeElt||a.activeElt==Ne())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ue(document.body,a.anchorNode)&&Ue(document.body,a.focusNode))){var y=window.getSelection(),b=document.createRange();b.setEnd(a.anchorNode,a.anchorOffset),b.collapse(!1),y.removeAllRanges(),y.addRange(b),y.extend(a.focusNode,a.focusOffset)}}function yl(a,y){var b=a.display,x=a.doc;if(y.editorIsHidden)return $i(a),!1;if(!y.force&&y.visible.from>=b.viewFrom&&y.visible.to<=b.viewTo&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo)&&b.renderedView==b.view&&$a(a)==0)return!1;Wl(a)&&($i(a),y.dims=uo(a));var E=x.first+x.size,ee=Math.max(y.visible.from-a.options.viewportMargin,x.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);b.viewFrom<ee&&ee-b.viewFrom<20&&(ee=Math.max(x.first,b.viewFrom)),b.viewTo>ie&&b.viewTo-ie<20&&(ie=Math.min(E,b.viewTo)),Mr&&(ee=Lt(a.doc,ee),ie=Wt(a.doc,ie));var se=ee!=b.viewFrom||ie!=b.viewTo||b.lastWrapHeight!=y.wrapperHeight||b.lastWrapWidth!=y.wrapperWidth;Qa(a,ee,ie),b.viewOffset=Dn(St(a.doc,b.viewFrom)),a.display.mover.style.top=b.viewOffset+"px";var fe=$a(a);if(!se&&fe==0&&!y.force&&b.renderedView==b.view&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo))return!1;var ve=eu(a);return fe>4&&(b.lineDiv.style.display="none"),nu(a,b.updateLineNumbers,y.dims),fe>4&&(b.lineDiv.style.display=""),b.renderedView=b.view,tu(ve),yt(b.cursorDiv),yt(b.selectionDiv),b.gutters.style.height=b.sizer.style.minHeight=0,se&&(b.lastWrapHeight=y.wrapperHeight,b.lastWrapWidth=y.wrapperWidth,Oa(a,400)),b.updateLineNumbers=null,!0}function Hl(a,y){for(var b=y.viewport,x=!0;;x=!1){if(!x||!a.options.lineWrapping||y.oldDisplayWidth==lo(a)){if(b&&b.top!=null&&(b={top:Math.min(a.doc.height+xi(a.display)-Vi(a),b.top)}),y.visible=Mo(a.display,a.doc,b),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else x&&(y.visible=Mo(a.display,a.doc,b));if(!yl(a,y))break;ua(a);var E=Rr(a);zo(a),Bi(a,E),Cl(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function xl(a,y){var b=new rl(a,y);if(yl(a,b)){ua(a),Hl(a,b);var x=Rr(a);zo(a),Bi(a,x),Cl(a,x),b.finish()}}function nu(a,y,b){var x=a.display,E=a.options.lineNumbers,ee=x.lineDiv,ie=ee.firstChild;function se(tn){var fn=tn.nextSibling;return Le&&Ae&&a.display.currentWheelTarget==tn?tn.style.display="none":tn.parentNode.removeChild(tn),fn}for(var fe=x.view,ve=x.viewFrom,De=0;De<fe.length;De++){var Ie=fe[De];if(!Ie.hidden)if(!Ie.node||Ie.node.parentNode!=ee){var ht=cr(a,Ie,ve,b);ee.insertBefore(ht,ie)}else{for(;ie!=Ie.node;)ie=se(ie);var it=E&&y!=null&&y<=ve&&Ie.lineNumber;Ie.changes&&(mt(Ie.changes,"gutter")>-1&&(it=!1),ti(a,Ie,ve,b)),it&&(yt(Ie.lineNumber),Ie.lineNumber.appendChild(document.createTextNode(zt(a.options,ve)))),ie=Ie.node.nextSibling}ve+=Ie.size}for(;ie;)ie=se(ie)}function bl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function Cl(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+ni(a)+"px"}function zl(a){var y=a.display,b=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var x=qo(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=x+"px",ie=0;ie<b.length;ie++)if(!b[ie].hidden){a.options.fixedGutter&&(b[ie].gutter&&(b[ie].gutter.style.left=ee),b[ie].gutterBackground&&(b[ie].gutterBackground.style.left=ee));var se=b[ie].alignable;if(se)for(var fe=0;fe<se.length;fe++)se[fe].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=x+E+"px")}}function Wl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,b=zt(a.options,y.first+y.size-1),x=a.display;if(b.length!=x.lineNumChars){var E=x.measure.appendChild(we("div",[we("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,ie=E.offsetWidth-ee;return x.lineGutter.style.width="",x.lineNumInnerWidth=Math.max(ee,x.lineGutter.offsetWidth-ie)+1,x.lineNumWidth=x.lineNumInnerWidth+ie,x.lineNumChars=x.lineNumInnerWidth?b.length:-1,x.lineGutter.style.width=x.lineNumWidth+"px",bl(a.display),!0}return!1}function wl(a,y){for(var b=[],x=!1,E=0;E<a.length;E++){var ee=a[E],ie=null;if(typeof ee!="string"&&(ie=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)x=!0;else continue;b.push({className:ee,style:ie})}return y&&!x&&b.push({className:"CodeMirror-linenumbers",style:null}),b}function Kl(a){var y=a.gutters,b=a.gutterSpecs;yt(y),a.lineGutter=null;for(var x=0;x<b.length;++x){var E=b[x],ee=E.className,ie=E.style,se=y.appendChild(we("div",null,"CodeMirror-gutter "+ee));ie&&(se.style.cssText=ie),ee=="CodeMirror-linenumbers"&&(a.lineGutter=se,se.style.width=(a.lineNumWidth||1)+"px")}y.style.display=b.length?"":"none",bl(a)}function Ia(a){Kl(a.display),Hi(a),zl(a)}function ru(a,y,b,x){var E=this;this.input=b,E.scrollbarFiller=we("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=we("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=We("div",null,"CodeMirror-code"),E.selectionDiv=we("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=we("div",null,"CodeMirror-cursors"),E.measure=we("div",null,"CodeMirror-measure"),E.lineMeasure=we("div",null,"CodeMirror-measure"),E.lineSpace=We("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=We("div",[E.lineSpace],"CodeMirror-lines");E.mover=we("div",[ee],null,"position: relative"),E.sizer=we("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=we("div",null,null,"position: absolute; height: "+qt+"px; width: 1px;"),E.gutters=we("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=we("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=we("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),xe&&ue<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Le&&!(oe&&Ee)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=wl(x.gutters,x.lineNumbers),Kl(E),b.init(E)}var il=0,ho=null;xe?ho=-.53:oe?ho=15:be?ho=-.7:rt&&(ho=-1/3);function Gl(a){var y=a.wheelDeltaX,b=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),b==null&&a.detail&&a.axis==a.VERTICAL_AXIS?b=a.detail:b==null&&(b=a.wheelDelta),{x:y,y:b}}function iu(a){var y=Gl(a);return y.x*=ho,y.y*=ho,y}function jl(a,y){var b=Gl(y),x=b.x,E=b.y,ee=a.display,ie=ee.scroller,se=ie.scrollWidth>ie.clientWidth,fe=ie.scrollHeight>ie.clientHeight;if(x&&se||E&&fe){if(E&&Ae&&Le){e:for(var ve=y.target,De=ee.view;ve!=ie;ve=ve.parentNode)for(var Ie=0;Ie<De.length;Ie++)if(De[Ie].node==ve){a.display.currentWheelTarget=ve;break e}}if(x&&!oe&&!pe&&ho!=null){E&&fe&&No(a,Math.max(0,ie.scrollTop+E*ho)),Ro(a,Math.max(0,ie.scrollLeft+x*ho)),(!E||E&&fe)&&vn(y),ee.wheelStartX=null;return}if(E&&ho!=null){var ht=E*ho,it=a.doc.scrollTop,tn=it+ee.wrapper.clientHeight;ht<0?it=Math.max(0,it+ht-50):tn=Math.min(a.doc.height,tn+ht+50),xl(a,{top:it,bottom:tn})}il<20&&(ee.wheelStartX==null?(ee.wheelStartX=ie.scrollLeft,ee.wheelStartY=ie.scrollTop,ee.wheelDX=x,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var fn=ie.scrollLeft-ee.wheelStartX,En=ie.scrollTop-ee.wheelStartY,Rn=En&&ee.wheelDY&&En/ee.wheelDY||fn&&ee.wheelDX&&fn/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,Rn&&(ho=(ho*il+Rn)/(il+1),++il)}},200)):(ee.wheelDX+=x,ee.wheelDY+=E))}}var po=function(a,y){this.ranges=a,this.primIndex=y};po.prototype.primary=function(){return this.ranges[this.primIndex]},po.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var b=this.ranges[y],x=a.ranges[y];if(!sn(b.anchor,x.anchor)||!sn(b.head,x.head))return!1}return!0},po.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new ri(hn(this.ranges[y].anchor),hn(this.ranges[y].head));return new po(a,this.primIndex)},po.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},po.prototype.contains=function(a,y){y||(y=a);for(var b=0;b<this.ranges.length;b++){var x=this.ranges[b];if(jt(y,x.from())>=0&&jt(a,x.to())<=0)return b}return-1};var ri=function(a,y){this.anchor=a,this.head=y};ri.prototype.from=function(){return pn(this.anchor,this.head)},ri.prototype.to=function(){return bn(this.anchor,this.head)},ri.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xo(a,y,b){var x=a&&a.options.selectionsMayTouch,E=y[b];y.sort(function(ht,it){return jt(ht.from(),it.from())}),b=mt(y,E);for(var ee=1;ee<y.length;ee++){var ie=y[ee],se=y[ee-1],fe=jt(se.to(),ie.from());if(x&&!ie.empty()?fe>0:fe>=0){var ve=pn(se.from(),ie.from()),De=bn(se.to(),ie.to()),Ie=se.empty()?ie.from()==ie.head:se.from()==se.head;ee<=b&&--b,y.splice(--ee,2,new ri(Ie?De:ve,Ie?ve:De))}}return new po(y,b)}function Go(a,y){return new po([new ri(a,y||a)],0)}function jo(a){return a.text?Qe(a.from.line+a.text.length-1,Je(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ul(a,y){if(jt(a,y.from)<0)return a;if(jt(a,y.to)<=0)return jo(y);var b=a.line+y.text.length-(y.to.line-y.from.line)-1,x=a.ch;return a.line==y.to.line&&(x+=jo(y).ch-y.to.ch),Qe(b,x)}function Sl(a,y){for(var b=[],x=0;x<a.sel.ranges.length;x++){var E=a.sel.ranges[x];b.push(new ri(Ul(E.anchor,y),Ul(E.head,y)))}return xo(a.cm,b,a.sel.primIndex)}function Vl(a,y,b){return a.line==y.line?Qe(b.line,a.ch-y.ch+b.ch):Qe(b.line+(a.line-y.line),a.ch)}function ou(a,y,b){for(var x=[],E=Qe(a.first,0),ee=E,ie=0;ie<y.length;ie++){var se=y[ie],fe=Vl(se.from,E,ee),ve=Vl(jo(se),E,ee);if(E=se.to,ee=ve,b=="around"){var De=a.sel.ranges[ie],Ie=jt(De.head,De.anchor)<0;x[ie]=new ri(Ie?ve:fe,Ie?fe:ve)}else x[ie]=new ri(fe,fe)}return new po(x,a.sel.primIndex)}function kl(a){a.doc.mode=Tr(a.options,a.doc.modeOption),Fa(a)}function Fa(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,Oa(a,100),a.state.modeGen++,a.curOp&&Hi(a)}function Yl(a,y){return y.from.ch==0&&y.to.ch==0&&Je(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function El(a,y,b,x){function E(Wn){return b?b[Wn]:null}function ee(Wn,Bn,Un){qn(Wn,Bn,Un,x),Jr(Wn,"change",Wn,y)}function ie(Wn,Bn){for(var Un=[],vr=Wn;vr<Bn;++vr)Un.push(new Xn(ve[vr],E(vr),x));return Un}var se=y.from,fe=y.to,ve=y.text,De=St(a,se.line),Ie=St(a,fe.line),ht=Je(ve),it=E(ve.length-1),tn=fe.line-se.line;if(y.full)a.insert(0,ie(0,ve.length)),a.remove(ve.length,a.size-ve.length);else if(Yl(a,y)){var fn=ie(0,ve.length-1);ee(Ie,Ie.text,it),tn&&a.remove(se.line,tn),fn.length&&a.insert(se.line,fn)}else if(De==Ie)if(ve.length==1)ee(De,De.text.slice(0,se.ch)+ht+De.text.slice(fe.ch),it);else{var En=ie(1,ve.length-1);En.push(new Xn(ht+De.text.slice(fe.ch),it,x)),ee(De,De.text.slice(0,se.ch)+ve[0],E(0)),a.insert(se.line+1,En)}else if(ve.length==1)ee(De,De.text.slice(0,se.ch)+ve[0]+Ie.text.slice(fe.ch),E(0)),a.remove(se.line+1,tn);else{ee(De,De.text.slice(0,se.ch)+ve[0],E(0)),ee(Ie,ht+Ie.text.slice(fe.ch),it);var Rn=ie(1,ve.length-1);tn>1&&a.remove(se.line+1,tn-1),a.insert(se.line+1,Rn)}Jr(a,"change",a,y)}function Uo(a,y,b){function x(E,ee,ie){if(E.linked)for(var se=0;se<E.linked.length;++se){var fe=E.linked[se];if(fe.doc!=ee){var ve=ie&&fe.sharedHist;b&&!ve||(y(fe.doc,ve),x(fe.doc,E,ve))}}}x(a,null,!0)}function Xl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,ka(a),kl(a),Jl(a),a.options.lineWrapping||An(a),a.options.mode=y.modeOption,Hi(a)}function Jl(a){(a.doc.direction=="rtl"?tt:ze)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){oo(a,function(){Jl(a),Hi(a)})}function ol(a){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=a||1}function Dl(a,y){var b={from:hn(y.from),to:jo(y),text:cn(a,y.from,y.to)};return ql(a,b,y.from.line,y.to.line+1),Uo(a,function(x){return ql(x,b,y.from.line,y.to.line+1)},!0),b}function Ql(a){for(;a.length;){var y=Je(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Ql(a.done),Je(a.done);if(a.done.length&&!Je(a.done).ranges)return Je(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Je(a.done)}function $l(a,y,b,x){var E=a.history;E.undone.length=0;var ee=+new Date,ie,se;if((E.lastOp==x||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=lu(E,E.lastOp==x)))se=Je(ie.changes),jt(y.from,y.to)==0&&jt(y.from,se.to)==0?se.to=jo(y):ie.changes.push(Dl(a,y));else{var fe=Je(E.done);for((!fe||!fe.ranges)&&al(a.sel,E.done),ie={changes:[Dl(a,y)],generation:E.generation},E.done.push(ie);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(b),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=x,E.lastOrigin=E.lastSelOrigin=y.origin,se||_t(a,"historyAdded")}function su(a,y,b,x){var E=y.charAt(0);return E=="*"||E=="+"&&b.ranges.length==x.ranges.length&&b.somethingSelected()==x.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,b,x){var E=a.history,ee=x&&x.origin;b==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||su(a,ee,Je(E.done),y))?E.done[E.done.length-1]=y:al(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=b,x&&x.clearRedo!==!1&&Ql(E.undone)}function al(a,y){var b=Je(y);b&&b.ranges&&b.equals(a)||y.push(a)}function ql(a,y,b,x){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,b),Math.min(a.first+a.size,x),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=ie.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,b=0;b<a.length;++b)a[b].marker.explicitlyCleared?y||(y=a.slice(0,b)):y&&y.push(a[b]);return y?y.length?y:null:a}function du(a,y){var b=y["spans_"+a.id];if(!b)return null;for(var x=[],E=0;E<y.text.length;++E)x.push(cu(b[E]));return x}function es(a,y){var b=du(a,y),x=si(a,y);if(!b)return x;if(!x)return b;for(var E=0;E<b.length;++E){var ee=b[E],ie=x[E];if(ee&&ie)e:for(var se=0;se<ie.length;++se){for(var fe=ie[se],ve=0;ve<ee.length;++ve)if(ee[ve].marker==fe.marker)continue e;ee.push(fe)}else ie&&(b[E]=ie)}return b}function fa(a,y,b){for(var x=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){x.push(b?po.prototype.deepCopy.call(ee):ee);continue}var ie=ee.changes,se=[];x.push({changes:se});for(var fe=0;fe<ie.length;++fe){var ve=ie[fe],De=void 0;if(se.push({from:ve.from,to:ve.to,text:ve.text}),y)for(var Ie in ve)(De=Ie.match(/^spans_(\d+)$/))&&mt(y,Number(De[1]))>-1&&(Je(se)[Ie]=ve[Ie],delete ve[Ie])}}return x}function Tl(a,y,b,x){if(x){var E=a.anchor;if(b){var ee=jt(y,E)<0;ee!=jt(b,E)<0?(E=y,y=b):ee!=jt(y,b)<0&&(y=b)}return new ri(E,y)}else return new ri(b||y,y)}function ll(a,y,b,x,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),Ki(a,new po([Tl(a.sel.primary(),y,b,E)],0),x)}function ts(a,y,b){for(var x=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)x[ee]=Tl(a.sel.ranges[ee],y[ee],null,E);var ie=xo(a.cm,x,a.sel.primIndex);Ki(a,ie,b)}function Ll(a,y,b,x){var E=a.sel.ranges.slice(0);E[y]=b,Ki(a,xo(a.cm,E,a.sel.primIndex),x)}function ns(a,y,b,x){Ki(a,Go(y,b),x)}function fu(a,y,b){var x={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new ri(Ve(a,E[ee].anchor),Ve(a,E[ee].head))},origin:b&&b.origin};return _t(a,"beforeSelectionChange",a,x),a.cm&&_t(a.cm,"beforeSelectionChange",a.cm,x),x.ranges!=y.ranges?xo(a.cm,x.ranges,x.ranges.length-1):y}function rs(a,y,b){var x=a.history.done,E=Je(x);E&&E.ranges?(x[x.length-1]=y,sl(a,y,b)):Ki(a,y,b)}function Ki(a,y,b){sl(a,y,b),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,b)}function sl(a,y,b){(Mt(a,"beforeSelectionChange")||a.cm&&Mt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,b));var x=b&&b.bias||(jt(y.primary().head,a.sel.primary().head)<0?-1:1);is(a,as(a,y,x,!0)),!(b&&b.scroll===!1)&&a.cm&&Ao(a.cm)}function is(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,un(a.cm)),Jr(a,"cursorActivity",a))}function os(a){is(a,as(a,a.sel,null,!1))}function as(a,y,b,x){for(var E,ee=0;ee<y.ranges.length;ee++){var ie=y.ranges[ee],se=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],fe=ul(a,ie.anchor,se&&se.anchor,b,x),ve=ul(a,ie.head,se&&se.head,b,x);(E||fe!=ie.anchor||ve!=ie.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new ri(fe,ve))}return E?xo(a.cm,E,y.primIndex):y}function ha(a,y,b,x,E){var ee=St(a,y.line);if(ee.markedSpans)for(var ie=0;ie<ee.markedSpans.length;++ie){var se=ee.markedSpans[ie],fe=se.marker,ve="selectLeft"in fe?!fe.selectLeft:fe.inclusiveLeft,De="selectRight"in fe?!fe.selectRight:fe.inclusiveRight;if((se.from==null||(ve?se.from<=y.ch:se.from<y.ch))&&(se.to==null||(De?se.to>=y.ch:se.to>y.ch))){if(E&&(_t(fe,"beforeCursorEnter"),fe.explicitlyCleared))if(ee.markedSpans){--ie;continue}else break;if(!fe.atomic)continue;if(b){var Ie=fe.find(x<0?1:-1),ht=void 0;if((x<0?De:ve)&&(Ie=ls(a,Ie,-x,Ie&&Ie.line==y.line?ee:null)),Ie&&Ie.line==y.line&&(ht=jt(Ie,b))&&(x<0?ht<0:ht>0))return ha(a,Ie,y,x,E)}var it=fe.find(x<0?-1:1);return(x<0?ve:De)&&(it=ls(a,it,x,it.line==y.line?ee:null)),it?ha(a,it,y,x,E):null}}return y}function ul(a,y,b,x,E){var ee=x||1,ie=ha(a,y,b,ee,E)||!E&&ha(a,y,b,ee,!0)||ha(a,y,b,-ee,E)||!E&&ha(a,y,b,-ee,!0);return ie||(a.cantEdit=!0,Qe(a.first,0))}function ls(a,y,b,x){return b<0&&y.ch==0?y.line>a.first?Ve(a,Qe(y.line-1)):null:b>0&&y.ch==(x||St(a,y.line)).text.length?y.line<a.first+a.size-1?Qe(y.line+1,0):null:new Qe(y.line,y.ch+b)}function ss(a){a.setSelection(Qe(a.firstLine(),0),Qe(a.lastLine()),Ke)}function us(a,y,b){var x={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return x.canceled=!0}};return b&&(x.update=function(E,ee,ie,se){E&&(x.from=Ve(a,E)),ee&&(x.to=Ve(a,ee)),ie&&(x.text=ie),se!==void 0&&(x.origin=se)}),_t(a,"beforeChange",a,x),a.cm&&_t(a.cm,"beforeChange",a.cm,x),x.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:x.from,to:x.to,text:x.text,origin:x.origin}}function pa(a,y,b){if(a.cm){if(!a.cm.curOp)return Oi(a.cm,pa)(a,y,b);if(a.cm.state.suppressEdits)return}if(!((Mt(a,"beforeChange")||a.cm&&Mt(a.cm,"beforeChange"))&&(y=us(a,y,!0),!y))){var x=Vr&&!b&&at(a,y.from,y.to);if(x)for(var E=x.length-1;E>=0;--E)cs(a,{from:x[E].from,to:x[E].to,text:E?[""]:y.text,origin:y.origin});else cs(a,y)}}function cs(a,y){if(!(y.text.length==1&&y.text[0]==""&&jt(y.from,y.to)==0)){var b=Sl(a,y);$l(a,y,b,a.cm?a.cm.curOp.id:NaN),Za(a,y,b,si(a,y));var x=[];Uo(a,function(E,ee){!ee&&mt(x,E.history)==-1&&(ps(E.history,y),x.push(E.history)),Za(E,y,null,si(E,y))})}}function cl(a,y,b){var x=a.cm&&a.cm.state.suppressEdits;if(!(x&&!b)){for(var E=a.history,ee,ie=a.sel,se=y=="undo"?E.done:E.undone,fe=y=="undo"?E.undone:E.done,ve=0;ve<se.length&&(ee=se[ve],!(b?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ve++);if(ve!=se.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=se.pop(),ee.ranges){if(al(ee,fe),b&&!ee.equals(a.sel)){Ki(a,ee,{clearRedo:!1});return}ie=ee}else if(x){se.push(ee);return}else break;var De=[];al(ie,fe),fe.push({changes:De,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var Ie=Mt(a,"beforeChange")||a.cm&&Mt(a.cm,"beforeChange"),ht=function(fn){var En=ee.changes[fn];if(En.origin=y,Ie&&!us(a,En,!1))return se.length=0,{};De.push(Dl(a,En));var Rn=fn?Sl(a,En):Je(se);Za(a,En,Rn,es(a,En)),!fn&&a.cm&&a.cm.scrollIntoView({from:En.from,to:jo(En)});var Wn=[];Uo(a,function(Bn,Un){!Un&&mt(Wn,Bn.history)==-1&&(ps(Bn.history,En),Wn.push(Bn.history)),Za(Bn,En,null,es(Bn,En))})},it=ee.changes.length-1;it>=0;--it){var tn=ht(it);if(tn)return tn.v}}}}function ds(a,y){if(y!=0&&(a.first+=y,a.sel=new po(Ot(a.sel.ranges,function(E){return new ri(Qe(E.anchor.line+y,E.anchor.ch),Qe(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Hi(a.cm,a.first,a.first-y,y);for(var b=a.cm.display,x=b.viewFrom;x<b.viewTo;x++)co(a.cm,x,"gutter")}}function Za(a,y,b,x){if(a.cm&&!a.cm.curOp)return Oi(a.cm,Za)(a,y,b,x);if(y.to.line<a.first){ds(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);ds(a,E),y={from:Qe(a.first,0),to:Qe(y.to.line+E,y.to.ch),text:[Je(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Qe(ee,St(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=cn(a,y.from,y.to),b||(b=Sl(a,y)),a.cm?hu(a.cm,y,x):El(a,y,x),sl(a,b,Ke),a.cantEdit&&ul(a,Qe(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,b){var x=a.doc,E=a.display,ee=y.from,ie=y.to,se=!1,fe=ee.line;a.options.lineWrapping||(fe=Fe(bt(St(x,ee.line))),x.iter(fe,ie.line+1,function(it){if(it==E.maxLine)return se=!0,!0})),x.sel.contains(y.from,y.to)>-1&&un(a),El(x,y,b,Sa(a)),a.options.lineWrapping||(x.iter(fe,ee.line+y.text.length,function(it){var tn=Gn(it);tn>E.maxLineLength&&(E.maxLine=it,E.maxLineLength=tn,E.maxLineChanged=!0,se=!1)}),se&&(a.curOp.updateMaxLine=!0)),Yr(x,ee.line),Oa(a,400);var ve=y.text.length-(ie.line-ee.line)-1;y.full?Hi(a):ee.line==ie.line&&y.text.length==1&&!Yl(a.doc,y)?co(a,ee.line,"text"):Hi(a,ee.line,ie.line+1,ve);var De=Mt(a,"changes"),Ie=Mt(a,"change");if(Ie||De){var ht={from:ee,to:ie,text:y.text,removed:y.removed,origin:y.origin};Ie&&Jr(a,"change",a,ht),De&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(ht)}a.display.selForContextMenu=null}function va(a,y,b,x,E){var ee;x||(x=b),jt(x,b)<0&&(ee=[x,b],b=ee[0],x=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),pa(a,{from:b,to:x,text:y,origin:E})}function fs(a,y,b,x){b<a.line?a.line+=x:y<a.line&&(a.line=y,a.ch=0)}function hs(a,y,b,x){for(var E=0;E<a.length;++E){var ee=a[E],ie=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var se=0;se<ee.ranges.length;se++)fs(ee.ranges[se].anchor,y,b,x),fs(ee.ranges[se].head,y,b,x);continue}for(var fe=0;fe<ee.changes.length;++fe){var ve=ee.changes[fe];if(b<ve.from.line)ve.from=Qe(ve.from.line+x,ve.from.ch),ve.to=Qe(ve.to.line+x,ve.to.ch);else if(y<=ve.to.line){ie=!1;break}}ie||(a.splice(0,E+1),E=0)}}function ps(a,y){var b=y.from.line,x=y.to.line,E=y.text.length-(x-b)-1;hs(a.done,b,x,E),hs(a.undone,b,x,E)}function _a(a,y,b,x){var E=y,ee=y;return typeof y=="number"?ee=St(a,Cn(a,y)):E=Fe(y),E==null?null:(x(ee,E)&&a.cm&&co(a.cm,E,b),ee)}function Ha(a){this.lines=a,this.parent=null;for(var y=0,b=0;b<a.length;++b)a[b].parent=this,y+=a[b].height;this.height=y}Ha.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var b=a,x=a+y;b<x;++b){var E=this.lines[b];this.height-=E.height,fr(E),Jr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,b){this.height+=b,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var x=0;x<y.length;++x)y[x].parent=this},iterN:function(a,y,b){for(var x=a+y;a<x;++a)if(b(this.lines[a]))return!0}};function za(a){this.children=a;for(var y=0,b=0,x=0;x<a.length;++x){var E=a[x];y+=E.chunkSize(),b+=E.height,E.parent=this}this.size=y,this.height=b,this.parent=null}za.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var b=0;b<this.children.length;++b){var x=this.children[b],E=x.chunkSize();if(a<E){var ee=Math.min(y,E-a),ie=x.height;if(x.removeInner(a,ee),this.height-=ie-x.height,E==ee&&(this.children.splice(b--,1),x.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof Ha))){var se=[];this.collapse(se),this.children=[new Ha(se)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,b){this.size+=y.length,this.height+=b;for(var x=0;x<this.children.length;++x){var E=this.children[x],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,b),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,se=ie;se<E.lines.length;){var fe=new Ha(E.lines.slice(se,se+=25));E.height-=fe.height,this.children.splice(++x,0,fe),fe.parent=this}E.lines=E.lines.slice(0,ie),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),b=new za(y);if(a.parent){a.size-=b.size,a.height-=b.height;var E=mt(a.parent.children,a);a.parent.children.splice(E+1,0,b)}else{var x=new za(a.children);x.parent=a,a.children=[x,b],a=x}b.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,b){for(var x=0;x<this.children.length;++x){var E=this.children[x],ee=E.chunkSize();if(a<ee){var ie=Math.min(y,ee-a);if(E.iterN(a,ie,b))return!0;if((y-=ie)==0)break;a=0}else a-=ee}}};var Wa=function(a,y,b){if(b)for(var x in b)b.hasOwnProperty(x)&&(this[x]=b[x]);this.doc=a,this.node=y};Wa.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,b=this.line,x=Fe(b);if(!(x==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(b.widgets=null);var ee=fi(this);Er(b,Math.max(0,b.height-ee)),a&&(oo(a,function(){vs(a,b,-ee),co(a,x,"widget")}),Jr(a,"lineWidgetCleared",a,this,x))}},Wa.prototype.changed=function(){var a=this,y=this.height,b=this.doc.cm,x=this.line;this.height=null;var E=fi(this)-y;E&&(Qt(this.doc,x)||Er(x,x.height+E),b&&oo(b,function(){b.curOp.forceUpdate=!0,vs(b,x,E),Jr(b,"lineWidgetChanged",b,a,Fe(x))}))},Ut(Wa);function vs(a,y,b){Dn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&da(a,b)}function pu(a,y,b,x){var E=new Wa(a,b,x),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),_a(a,y,"widget",function(ie){var se=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?se.push(E):se.splice(Math.min(se.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,ee&&!Qt(a,ie)){var fe=Dn(ie)<a.scrollTop;Er(ie,ie.height+fi(E)),fe&&da(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Jr(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Fe(y)),E}var ms=0,Vo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ms};Vo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&fo(a),Mt(this,"clear")){var b=this.find();b&&Jr(this,"clear",b.from,b.to)}for(var x=null,E=null,ee=0;ee<this.lines.length;++ee){var ie=this.lines[ee],se=Qn(ie.markedSpans,this);a&&!this.collapsed?co(a,Fe(ie),"text"):a&&(se.to!=null&&(E=Fe(ie)),se.from!=null&&(x=Fe(ie))),ie.markedSpans=mr(ie.markedSpans,se),se.from==null&&this.collapsed&&!Qt(this.doc,ie)&&a&&Er(ie,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var fe=0;fe<this.lines.length;++fe){var ve=bt(this.lines[fe]),De=Gn(ve);De>a.display.maxLineLength&&(a.display.maxLine=ve,a.display.maxLineLength=De,a.display.maxLineChanged=!0)}x!=null&&a&&this.collapsed&&Hi(a,x,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&os(a.doc)),a&&Jr(a,"markerCleared",a,this,x,E),y&&yo(a),this.parent&&this.parent.clear()}},Vo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var b,x,E=0;E<this.lines.length;++E){var ee=this.lines[E],ie=Qn(ee.markedSpans,this);if(ie.from!=null&&(b=Qe(y?ee:Fe(ee),ie.from),a==-1))return b;if(ie.to!=null&&(x=Qe(y?ee:Fe(ee),ie.to),a==1))return x}return b&&{from:b,to:x}},Vo.prototype.changed=function(){var a=this,y=this.find(-1,!0),b=this,x=this.doc.cm;!y||!x||oo(x,function(){var E=y.line,ee=Fe(y.line),ie=vo(x,ee);if(ie&&(Qo(ie),x.curOp.selectionChanged=x.curOp.forceUpdate=!0),x.curOp.updateMaxLine=!0,!Qt(b.doc,E)&&b.height!=null){var se=b.height;b.height=null;var fe=fi(b)-se;fe&&Er(E,E.height+fe)}Jr(x,"markerChanged",x,a)})},Vo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||mt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},Vo.prototype.detachLine=function(a){if(this.lines.splice(mt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ut(Vo);function ma(a,y,b,x,E){if(x&&x.shared)return vu(a,y,b,x,E);if(a.cm&&!a.cm.curOp)return Oi(a.cm,ma)(a,y,b,x,E);var ee=new Vo(a,E),ie=jt(y,b);if(x&&Ht(x,ee,!1),ie>0||ie==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=We("span",[ee.replacedWith],"CodeMirror-widget"),x.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),x.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(Ct(a,y.line,y,b,ee)||y.line!=b.line&&Ct(a,b.line,y,b,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");Kr()}ee.addToHistory&&$l(a,{from:y,to:b,origin:"markText"},a.sel,NaN);var se=y.line,fe=a.cm,ve;if(a.iter(se,b.line+1,function(Ie){fe&&ee.collapsed&&!fe.options.lineWrapping&&bt(Ie)==fe.display.maxLine&&(ve=!0),ee.collapsed&&se!=y.line&&Er(Ie,0),Nr(Ie,new On(ee,se==y.line?y.ch:null,se==b.line?b.ch:null)),++se}),ee.collapsed&&a.iter(y.line,b.line+1,function(Ie){Qt(a,Ie)&&Er(Ie,0)}),ee.clearOnEnter&&kt(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(qr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ms,ee.atomic=!0),fe){if(ve&&(fe.curOp.updateMaxLine=!0),ee.collapsed)Hi(fe,y.line,b.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var De=y.line;De<=b.line;De++)co(fe,De,"text");ee.atomic&&os(fe.doc),Jr(fe,"markerAdded",fe,ee)}return ee}var Ka=function(a,y){this.markers=a,this.primary=y;for(var b=0;b<a.length;++b)a[b].parent=this};Ka.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Jr(this,"clear")}},Ka.prototype.find=function(a,y){return this.primary.find(a,y)},Ut(Ka);function vu(a,y,b,x,E){x=Ht(x),x.shared=!1;var ee=[ma(a,y,b,x,E)],ie=ee[0],se=x.widgetNode;return Uo(a,function(fe){se&&(x.widgetNode=se.cloneNode(!0)),ee.push(ma(fe,Ve(fe,y),Ve(fe,b),x,E));for(var ve=0;ve<fe.linked.length;++ve)if(fe.linked[ve].isParent)return;ie=Je(ee)}),new Ka(ee,ie)}function gs(a){return a.findMarks(Qe(a.first,0),a.clipPos(Qe(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var b=0;b<y.length;b++){var x=y[b],E=x.find(),ee=a.clipPos(E.from),ie=a.clipPos(E.to);if(jt(ee,ie)){var se=ma(a,ee,ie,x.primary,x.primary.type);x.markers.push(se),se.parent=x}}}function gu(a){for(var y=function(x){var E=a[x],ee=[E.primary.doc];Uo(E.primary.doc,function(fe){return ee.push(fe)});for(var ie=0;ie<E.markers.length;ie++){var se=E.markers[ie];mt(ee,se.doc)==-1&&(se.parent=null,E.markers.splice(ie--,1))}},b=0;b<a.length;b++)y(b)}var yu=0,qi=function(a,y,b,x,E){if(!(this instanceof qi))return new qi(a,y,b,x,E);b==null&&(b=0),za.call(this,[new Ha([new Xn("",null)])]),this.first=b,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=b;var ee=Qe(b,0);this.sel=Go(ee),this.history=new ol(null),this.id=++yu,this.modeOption=y,this.lineSep=x,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),El(this,{from:ee,to:ee,text:a}),Ki(this,Go(ee),Ke)};qi.prototype=te(za.prototype,{constructor:qi,iter:function(a,y,b){b?this.iterN(a-this.first,y-a,b):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var b=0,x=0;x<y.length;++x)b+=y[x].height;this.insertInner(a-this.first,y,b)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=nr(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:Ii(function(a){var y=Qe(this.first,0),b=this.first+this.size-1;pa(this,{from:y,to:Qe(b,St(this,b).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&ea(this.cm,0,0),Ki(this,Go(y),Ke)}),replaceRange:function(a,y,b,x){y=Ve(this,y),b=b?Ve(this,b):y,va(this,a,y,b,x)},getRange:function(a,y,b){var x=cn(this,Ve(this,a),Ve(this,y));return b===!1?x:x.join(b||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(rn(this,a))return St(this,a)},getLineNumber:function(a){return Fe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=St(this,a)),bt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Ve(this,a)},getCursor:function(a){var y=this.sel.primary(),b;return a==null||a=="head"?b=y.head:a=="anchor"?b=y.anchor:a=="end"||a=="to"||a===!1?b=y.to():b=y.from(),b},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ii(function(a,y,b){ns(this,Ve(this,typeof a=="number"?Qe(a,y||0):a),null,b)}),setSelection:Ii(function(a,y,b){ns(this,Ve(this,a),Ve(this,y||a),b)}),extendSelection:Ii(function(a,y,b){ll(this,Ve(this,a),y&&Ve(this,y),b)}),extendSelections:Ii(function(a,y){ts(this,Sn(this,a),y)}),extendSelectionsBy:Ii(function(a,y){var b=Ot(this.sel.ranges,a);ts(this,Sn(this,b),y)}),setSelections:Ii(function(a,y,b){if(a.length){for(var x=[],E=0;E<a.length;E++)x[E]=new ri(Ve(this,a[E].anchor),Ve(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),Ki(this,xo(this.cm,x,y),b)}}),addSelection:Ii(function(a,y,b){var x=this.sel.ranges.slice(0);x.push(new ri(Ve(this,a),Ve(this,y||a))),Ki(this,xo(this.cm,x,x.length-1),b)}),getSelection:function(a){for(var y=this.sel.ranges,b,x=0;x<y.length;x++){var E=cn(this,y[x].from(),y[x].to());b=b?b.concat(E):E}return a===!1?b:b.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],b=this.sel.ranges,x=0;x<b.length;x++){var E=cn(this,b[x].from(),b[x].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[x]=E}return y},replaceSelection:function(a,y,b){for(var x=[],E=0;E<this.sel.ranges.length;E++)x[E]=a;this.replaceSelections(x,y,b||"+input")},replaceSelections:Ii(function(a,y,b){for(var x=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var ie=E.ranges[ee];x[ee]={from:ie.from(),to:ie.to(),text:this.splitLines(a[ee]),origin:b}}for(var se=y&&y!="end"&&ou(this,x,y),fe=x.length-1;fe>=0;fe--)pa(this,x[fe]);se?rs(this,se):this.cm&&Ao(this.cm)}),undo:Ii(function(){cl(this,"undo")}),redo:Ii(function(){cl(this,"redo")}),undoSelection:Ii(function(){cl(this,"undo",!0)}),redoSelection:Ii(function(){cl(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,b=0,x=0;x<a.done.length;x++)a.done[x].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++b;return{undo:y,redo:b}},clearHistory:function(){var a=this;this.history=new ol(this.history.maxGeneration),Uo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:fa(this.history.done),undone:fa(this.history.undone)}},setHistory:function(a){var y=this.history=new ol(this.history.maxGeneration);y.done=fa(a.done.slice(0),null,!0),y.undone=fa(a.undone.slice(0),null,!0)},setGutterMarker:Ii(function(a,y,b){return _a(this,a,"gutter",function(x){var E=x.gutterMarkers||(x.gutterMarkers={});return E[y]=b,!b&&ne(E)&&(x.gutterMarkers=null),!0})}),clearGutter:Ii(function(a){var y=this;this.iter(function(b){b.gutterMarkers&&b.gutterMarkers[a]&&_a(y,b,"gutter",function(){return b.gutterMarkers[a]=null,ne(b.gutterMarkers)&&(b.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!rn(this,a)||(y=a,a=St(this,a),!a))return null}else if(y=Fe(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:Ii(function(a,y,b){return _a(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!x[E])x[E]=b;else{if(Be(b).test(x[E]))return!1;x[E]+=" "+b}return!0})}),removeLineClass:Ii(function(a,y,b){return _a(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",ee=x[E];if(ee)if(b==null)x[E]=null;else{var ie=ee.match(Be(b));if(!ie)return!1;var se=ie.index+ie[0].length;x[E]=ee.slice(0,ie.index)+(!ie.index||se==ee.length?"":" ")+ee.slice(se)||null}else return!1;return!0})}),addLineWidget:Ii(function(a,y,b){return pu(this,a,y,b)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,b){return ma(this,Ve(this,a),Ve(this,y),b,b&&b.type||"range")},setBookmark:function(a,y){var b={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Ve(this,a),ma(this,a,a,b,"bookmark")},findMarksAt:function(a){a=Ve(this,a);var y=[],b=St(this,a.line).markedSpans;if(b)for(var x=0;x<b.length;++x){var E=b[x];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,b){a=Ve(this,a),y=Ve(this,y);var x=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var ie=ee.markedSpans;if(ie)for(var se=0;se<ie.length;se++){var fe=ie[se];!(fe.to!=null&&E==a.line&&a.ch>=fe.to||fe.from==null&&E!=a.line||fe.from!=null&&E==y.line&&fe.from>=y.ch)&&(!b||b(fe.marker))&&x.push(fe.marker.parent||fe.marker)}++E}),x},getAllMarks:function(){var a=[];return this.iter(function(y){var b=y.markedSpans;if(b)for(var x=0;x<b.length;++x)b[x].from!=null&&a.push(b[x].marker)}),a},posFromIndex:function(a){var y,b=this.first,x=this.lineSeparator().length;return this.iter(function(E){var ee=E.text.length+x;if(ee>a)return y=a,!0;a-=ee,++b}),Ve(this,Qe(b,y))},indexFromPos:function(a){a=Ve(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var b=this.lineSeparator().length;return this.iter(this.first,a.line,function(x){y+=x.text.length+b}),y},copy:function(a){var y=new qi(nr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,b=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<b&&(b=a.to);var x=new qi(nr(this,y,b),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(x.history=this.history),(this.linked||(this.linked=[])).push({doc:x,sharedHist:a.sharedHist}),x.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(x,gs(this)),x},unlinkDoc:function(a){if(a instanceof yi&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var b=this.linked[y];if(b.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(gs(this));break}}if(a.history==this.history){var x=[a.id];Uo(a,function(E){return x.push(E.id)},!0),a.history=new ol(null),a.history.done=fa(this.history.done,x),a.history.undone=fa(this.history.undone,x)}},iterLinkedDocs:function(a){Uo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):zn(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Ii(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),qi.prototype.eachLine=qi.prototype.iter;var ys=0;function xu(a){var y=this;if(xs(y),!($e(y,a)||di(y.display,a))){vn(a),xe&&(ys=+new Date);var b=Co(y,a,!0),x=a.dataTransfer.files;if(!(!b||y.isReadOnly()))if(x&&x.length&&window.FileReader&&window.File)for(var E=x.length,ee=Array(E),ie=0,se=function(){++ie==E&&Oi(y,function(){b=Ve(y.doc,b);var it={from:b,to:b,text:y.doc.splitLines(ee.filter(function(tn){return tn!=null}).join(y.doc.lineSeparator())),origin:"paste"};pa(y.doc,it),rs(y.doc,Go(Ve(y.doc,b),Ve(y.doc,jo(it))))})()},fe=function(it,tn){if(y.options.allowDropFileTypes&&mt(y.options.allowDropFileTypes,it.type)==-1){se();return}var fn=new FileReader;fn.onerror=function(){return se()},fn.onload=function(){var En=fn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(En)){se();return}ee[tn]=En,se()},fn.readAsText(it)},ve=0;ve<x.length;ve++)fe(x[ve],ve);else{if(y.state.draggingText&&y.doc.sel.contains(b)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var De=a.dataTransfer.getData("Text");if(De){var Ie;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ie=y.listSelections()),sl(y.doc,Go(b,b)),Ie)for(var ht=0;ht<Ie.length;++ht)va(y.doc,"",Ie[ht].anchor,Ie[ht].head,"drag");y.replaceSelection(De,"around","paste"),y.display.input.focus()}}catch(it){}}}}function bu(a,y){if(xe&&(!a.state.draggingText||+new Date-ys<100)){kn(y);return}if(!($e(a,y)||di(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!rt)){var b=we("img",null,null,"position: fixed; left: 0; top: 0;");b.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pe&&(b.width=b.height=1,a.display.wrapper.appendChild(b),b._top=b.offsetTop),y.dataTransfer.setDragImage(b,0,0),pe&&b.parentNode.removeChild(b)}}function Cu(a,y){var b=Co(a,y);if(b){var x=document.createDocumentFragment();Ea(a,b,x),a.display.dragCursor||(a.display.dragCursor=we("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ce(a.display.dragCursor,x)}}function xs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function bs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),b=[],x=0;x<y.length;x++){var E=y[x].CodeMirror;E&&b.push(E)}b.length&&b[0].operation(function(){for(var ee=0;ee<b.length;ee++)a(b[ee])})}}var Cs=!1;function wu(){Cs||(Su(),Cs=!0)}function Su(){var a;kt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,bs(ku)},100))}),kt(window,"blur",function(){return bs(Wo)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var Yo={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"},Ga=0;Ga<10;Ga++)Yo[Ga+48]=Yo[Ga+96]=String(Ga);for(var dl=65;dl<=90;dl++)Yo[dl]=String.fromCharCode(dl);for(var ja=1;ja<=12;ja++)Yo[ja+111]=Yo[ja+63235]="F"+ja;var Io={};Io.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"},Io.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"},Io.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"},Io.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"]},Io.default=Ae?Io.macDefault:Io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var b,x,E,ee,ie=0;ie<y.length-1;ie++){var se=y[ie];if(/^(cmd|meta|m)$/i.test(se))ee=!0;else if(/^a(lt)?$/i.test(se))b=!0;else if(/^(c|ctrl|control)$/i.test(se))x=!0;else if(/^s(hift)?$/i.test(se))E=!0;else throw new Error("Unrecognized modifier name: "+se)}return b&&(a="Alt-"+a),x&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var b in a)if(a.hasOwnProperty(b)){var x=a[b];if(/^(name|fallthrough|(de|at)tach)$/.test(b))continue;if(x=="..."){delete a[b];continue}for(var E=Ot(b.split(" "),Eu),ee=0;ee<E.length;ee++){var ie=void 0,se=void 0;ee==E.length-1?(se=E.join(" "),ie=x):(se=E.slice(0,ee+1).join(" "),ie="...");var fe=y[se];if(!fe)y[se]=ie;else if(fe!=ie)throw new Error("Inconsistent bindings for "+se)}delete a[b]}for(var ve in y)a[ve]=y[ve];return a}function ga(a,y,b,x){y=fl(y);var E=y.call?y.call(a,x):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&b(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return ga(a,y.fallthrough,b,x);for(var ee=0;ee<y.fallthrough.length;ee++){var ie=ga(a,y.fallthrough[ee],b,x);if(ie)return ie}}}function ws(a){var y=typeof a=="string"?a:Yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function Ss(a,y,b){var x=a;return y.altKey&&x!="Alt"&&(a="Alt-"+a),(Pe?y.metaKey:y.ctrlKey)&&x!="Ctrl"&&(a="Ctrl-"+a),(Pe?y.ctrlKey:y.metaKey)&&x!="Mod"&&(a="Cmd-"+a),!b&&y.shiftKey&&x!="Shift"&&(a="Shift-"+a),a}function ks(a,y){if(pe&&a.keyCode==34&&a.char)return!1;var b=Yo[a.keyCode];return b==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(b=a.code),Ss(b,a,y))}function fl(a){return typeof a=="string"?Io[a]:a}function ya(a,y){for(var b=a.doc.sel.ranges,x=[],E=0;E<b.length;E++){for(var ee=y(b[E]);x.length&&jt(ee.from,Je(x).to)<=0;){var ie=x.pop();if(jt(ie.from,ee.from)<0){ee.from=ie.from;break}}x.push(ee)}oo(a,function(){for(var se=x.length-1;se>=0;se--)va(a.doc,"",x[se].from,x[se].to,"+delete");Ao(a)})}function Pl(a,y,b){var x=wt(a.text,y+b,b);return x<0||x>a.text.length?null:x}function Ml(a,y,b){var x=Pl(a,y.ch,b);return x==null?null:new Qe(y.line,x,b<0?"after":"before")}function Al(a,y,b,x,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=Rt(b,y.doc.direction);if(ee){var ie=E<0?Je(ee):ee[0],se=E<0==(ie.level==1),fe=se?"after":"before",ve;if(ie.level>0||y.doc.direction=="rtl"){var De=mo(y,b);ve=E<0?b.text.length-1:0;var Ie=ro(y,De,ve).top;ve=Tt(function(ht){return ro(y,De,ht).top==Ie},E<0==(ie.level==1)?ie.from:ie.to-1,ve),fe=="before"&&(ve=Pl(b,ve,1))}else ve=E<0?ie.to:ie.from;return new Qe(x,ve,fe)}}return new Qe(x,E<0?b.text.length:0,E<0?"before":"after")}function Tu(a,y,b,x){var E=Rt(y,a.doc.direction);if(!E)return Ml(y,b,x);b.ch>=y.text.length?(b.ch=y.text.length,b.sticky="before"):b.ch<=0&&(b.ch=0,b.sticky="after");var ee=Ge(E,b.ch,b.sticky),ie=E[ee];if(a.doc.direction=="ltr"&&ie.level%2==0&&(x>0?ie.to>b.ch:ie.from<b.ch))return Ml(y,b,x);var se=function(Rn,Wn){return Pl(y,Rn instanceof Qe?Rn.ch:Rn,Wn)},fe,ve=function(Rn){return a.options.lineWrapping?(fe=fe||mo(a,y),bi(a,y,fe,Rn)):{begin:0,end:y.text.length}},De=ve(b.sticky=="before"?se(b,-1):b.ch);if(a.doc.direction=="rtl"||ie.level==1){var Ie=ie.level==1==x<0,ht=se(b,Ie?1:-1);if(ht!=null&&(Ie?ht<=ie.to&&ht<=De.end:ht>=ie.from&&ht>=De.begin)){var it=Ie?"before":"after";return new Qe(b.line,ht,it)}}var tn=function(Rn,Wn,Bn){for(var Un=function(ci,Fi){return Fi?new Qe(b.line,se(ci,1),"before"):new Qe(b.line,ci,"after")};Rn>=0&&Rn<E.length;Rn+=Wn){var vr=E[Rn],ir=Wn>0==(vr.level!=1),Wr=ir?Bn.begin:se(Bn.end,-1);if(vr.from<=Wr&&Wr<vr.to||(Wr=ir?vr.from:se(vr.to,-1),Bn.begin<=Wr&&Wr<Bn.end))return Un(Wr,ir)}},fn=tn(ee+x,x,De);if(fn)return fn;var En=x>0?De.end:se(De.begin,-1);return En!=null&&!(x>0&&En==y.text.length)&&(fn=tn(x>0?0:E.length-1,x,ve(En)),fn)?fn:null}var Ua={selectAll:ss,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ke)},killLine:function(a){return ya(a,function(y){if(y.empty()){var b=St(a.doc,y.head.line).text.length;return y.head.ch==b&&y.head.line<a.lastLine()?{from:y.head,to:Qe(y.head.line+1,0)}:{from:y.head,to:Qe(y.head.line,b)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return ya(a,function(y){return{from:Qe(y.from().line,0),to:Ve(a.doc,Qe(y.to().line+1,0))}})},delLineLeft:function(a){return ya(a,function(y){return{from:Qe(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return ya(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return{from:x,to:y.from()}})},delWrappedLineRight:function(a){return ya(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div");return{from:y.from(),to:x}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Qe(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Qe(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return Es(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return Ds(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Lu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div")},dt)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},dt)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return x.ch<a.getLine(x.line).search(/\S/)?Ds(a,y.head):x},dt)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],b=a.listSelections(),x=a.options.tabSize,E=0;E<b.length;E++){var ee=b[E].from(),ie=ye(a.getLine(ee.line),ee.ch,x);y.push(Dt(x-ie%x))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return oo(a,function(){for(var y=a.listSelections(),b=[],x=0;x<y.length;x++)if(y[x].empty()){var E=y[x].head,ee=St(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Qe(E.line,E.ch-1)),E.ch>0)E=new Qe(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Qe(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=St(a.doc,E.line-1).text;ie&&(E=new Qe(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),Qe(E.line-1,ie.length-1),E,"+transpose"))}}b.push(new ri(E,E))}a.setSelections(b)})},newlineAndIndent:function(a){return oo(a,function(){for(var y=a.listSelections(),b=y.length-1;b>=0;b--)a.replaceRange(a.doc.lineSeparator(),y[b].anchor,y[b].head,"+input");y=a.listSelections();for(var x=0;x<y.length;x++)a.indentLine(y[x].from().line,null,!0);Ao(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function Es(a,y){var b=St(a.doc,y),x=bt(b);return x!=b&&(y=Fe(x)),Al(!0,a,x,y,1)}function Lu(a,y){var b=St(a.doc,y),x=Zt(b);return x!=b&&(y=Fe(x)),Al(!0,a,b,y,-1)}function Ds(a,y){var b=Es(a,y.line),x=St(a.doc,b.line),E=Rt(x,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(b.ch,x.text.search(/\S/)),ie=y.line==b.line&&y.ch<=ee&&y.ch;return Qe(b.line,ie?0:ee,b.sticky)}return b}function hl(a,y,b){if(typeof y=="string"&&(y=Ua[y],!y))return!1;a.display.input.ensurePolled();var x=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),b&&(a.display.shift=!1),E=y(a)!=Pt}finally{a.display.shift=x,a.state.suppressEdits=!1}return E}function Pu(a,y,b){for(var x=0;x<a.state.keyMaps.length;x++){var E=ga(y,a.state.keyMaps[x],b,a);if(E)return E}return a.options.extraKeys&&ga(y,a.options.extraKeys,b,a)||ga(y,a.options.keyMap,b,a)}var Mu=new he;function Va(a,y,b,x){var E=a.state.keySeq;if(E){if(ws(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),Ts(a,E+" "+y,b,x))return!0}return Ts(a,y,b,x)}function Ts(a,y,b,x){var E=Pu(a,y,x);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Jr(a,"keyHandled",a,y,b),(E=="handled"||E=="multi")&&(vn(b),Da(a)),!!E}function Ls(a,y){var b=ks(y,!0);return b?y.shiftKey&&!a.state.keySeq?Va(a,"Shift-"+b,y,function(x){return hl(a,x,!0)})||Va(a,b,y,function(x){if(typeof x=="string"?/^go[A-Z]/.test(x):x.motion)return hl(a,x)}):Va(a,b,y,function(x){return hl(a,x)}):!1}function Au(a,y,b){return Va(a,"'"+b+"'",y,function(x){return hl(a,x,!0)})}var Nl=null;function Ps(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ne(),!$e(y,a))){xe&&ue<11&&a.keyCode==27&&(a.returnValue=!1);var b=a.keyCode;y.display.shift=b==16||a.shiftKey;var x=Ls(y,a);pe&&(Nl=x?b:null,!x&&b==88&&!mn&&(Ae?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),oe&&!Ae&&!x&&b==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),b==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Nu(y)}}function Nu(a){var y=a.display.lineDiv;tt(y,"CodeMirror-crosshair");function b(x){(x.keyCode==18||!x.altKey)&&(ze(y,"CodeMirror-crosshair"),$t(document,"keyup",b),$t(document,"mouseover",b))}kt(document,"keyup",b),kt(document,"mouseover",b)}function Ms(a){a.keyCode==16&&(this.doc.sel.shift=!1),$e(this,a)}function As(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(di(y.display,a)||$e(y,a)||a.ctrlKey&&!a.altKey||Ae&&a.metaKey)){var b=a.keyCode,x=a.charCode;if(pe&&b==Nl){Nl=null,vn(a);return}if(!(pe&&(!a.which||a.which<10)&&Ls(y,a))){var E=String.fromCharCode(x==null?b:x);E!="\b"&&(Au(y,a,E)||y.display.input.onKeyPress(a))}}}var Ru=400,Rl=function(a,y,b){this.time=a,this.pos=y,this.button=b};Rl.prototype.compare=function(a,y,b){return this.time+Ru>a&&jt(y,this.pos)==0&&b==this.button};var Ya,Xa;function Bu(a,y){var b=+new Date;return Xa&&Xa.compare(b,a,y)?(Ya=Xa=null,"triple"):Ya&&Ya.compare(b,a,y)?(Xa=new Rl(b,a,y),Ya=null,"double"):(Ya=new Rl(b,a,y),Xa=null,"single")}function Ns(a){var y=this,b=y.display;if(!($e(y,a)||b.activeTouch&&b.input.supportsTouch())){if(b.input.ensurePolled(),b.shift=a.shiftKey,di(b,a)){Le||(b.scroller.draggable=!1,setTimeout(function(){return b.scroller.draggable=!0},100));return}if(!Bl(y,a)){var x=Co(y,a),E=Jn(a),ee=x?Bu(x,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(x&&Ou(y,E,x,ee,a))&&(E==1?x?Fu(y,x,ee,a):tr(a)==b.scroller&&vn(a):E==2?(x&&ll(y.doc,x),setTimeout(function(){return b.input.focus()},20)):E==3&&(ge?y.display.input.onContextMenu(a):La(y)))}}}function Ou(a,y,b,x,E){var ee="Click";return x=="double"?ee="Double"+ee:x=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,Va(a,Ss(ee,E),E,function(ie){if(typeof ie=="string"&&(ie=Ua[ie]),!ie)return!1;var se=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),se=ie(a,b)!=Pt}finally{a.state.suppressEdits=!1}return se})}function Iu(a,y,b){var x=a.getOption("configureMouse"),E=x?x(a,y,b):{};if(E.unit==null){var ee=ot?b.shiftKey&&b.metaKey:b.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||b.shiftKey),E.addNew==null&&(E.addNew=Ae?b.metaKey:b.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ae?b.altKey:b.ctrlKey)),E}function Fu(a,y,b,x){xe?setTimeout(Jt(Ta,a),0):a.curOp.focus=Ne();var E=Iu(a,b,x),ee=a.doc.sel,ie;a.options.dragDrop&&Ft&&!a.isReadOnly()&&b=="single"&&(ie=ee.contains(y))>-1&&(jt((ie=ee.ranges[ie]).from(),y)<0||y.xRel>0)&&(jt(ie.to(),y)>0||y.xRel<0)?Zu(a,x,y,E):_u(a,x,y,E)}function Zu(a,y,b,x){var E=a.display,ee=!1,ie=Oi(a,function(ve){Le&&(E.scroller.draggable=!1),a.state.draggingText=!1,$t(E.wrapper.ownerDocument,"mouseup",ie),$t(E.wrapper.ownerDocument,"mousemove",se),$t(E.scroller,"dragstart",fe),$t(E.scroller,"drop",ie),ee||(vn(ve),x.addNew||ll(a.doc,b,null,null,x.extend),Le&&!rt||xe&&ue==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),se=function(ve){ee=ee||Math.abs(y.clientX-ve.clientX)+Math.abs(y.clientY-ve.clientY)>=10},fe=function(){return ee=!0};Le&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!x.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),kt(E.wrapper.ownerDocument,"mouseup",ie),kt(E.wrapper.ownerDocument,"mousemove",se),kt(E.scroller,"dragstart",fe),kt(E.scroller,"drop",ie),La(a),setTimeout(function(){return E.input.focus()},20)}function Rs(a,y,b){if(b=="char")return new ri(y,y);if(b=="word")return a.findWordAt(y);if(b=="line")return new ri(Qe(y.line,0),Ve(a.doc,Qe(y.line+1,0)));var x=b(a,y);return new ri(x.from,x.to)}function _u(a,y,b,x){var E=a.display,ee=a.doc;vn(y);var ie,se,fe=ee.sel,ve=fe.ranges;if(x.addNew&&!x.extend?(se=ee.sel.contains(b),se>-1?ie=ve[se]:ie=new ri(b,b)):(ie=ee.sel.primary(),se=ee.sel.primIndex),x.unit=="rectangle")x.addNew||(ie=new ri(b,b)),b=Co(a,y,!0,!0),se=-1;else{var De=Rs(a,b,x.unit);x.extend?ie=Tl(ie,De.anchor,De.head,x.extend):ie=De}x.addNew?se==-1?(se=ve.length,Ki(ee,xo(a,ve.concat([ie]),se),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[se].empty()&&x.unit=="char"&&!x.extend?(Ki(ee,xo(a,ve.slice(0,se).concat(ve.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),fe=ee.sel):Ll(ee,se,ie,ct):(se=0,Ki(ee,new po([ie],0),ct),fe=ee.sel);var Ie=b;function ht(Bn){if(jt(Ie,Bn)!=0)if(Ie=Bn,x.unit=="rectangle"){for(var Un=[],vr=a.options.tabSize,ir=ye(St(ee,b.line).text,b.ch,vr),Wr=ye(St(ee,Bn.line).text,Bn.ch,vr),ci=Math.min(ir,Wr),Fi=Math.max(ir,Wr),Ci=Math.min(b.line,Bn.line),ao=Math.min(a.lastLine(),Math.max(b.line,Bn.line));Ci<=ao;Ci++){var eo=St(ee,Ci).text,Pi=yn(eo,ci,vr);ci==Fi?Un.push(new ri(Qe(Ci,Pi),Qe(Ci,Pi))):eo.length>Pi&&Un.push(new ri(Qe(Ci,Pi),Qe(Ci,yn(eo,Fi,vr))))}Un.length||Un.push(new ri(b,b)),Ki(ee,xo(a,fe.ranges.slice(0,se).concat(Un),se),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Bn)}else{var to=ie,zi=Rs(a,Bn,x.unit),Ri=to.anchor,Mi;jt(zi.anchor,Ri)>0?(Mi=zi.head,Ri=pn(to.from(),zi.anchor)):(Mi=zi.anchor,Ri=bn(to.to(),zi.head));var ki=fe.ranges.slice(0);ki[se]=Hu(a,new ri(Ve(ee,Ri),Mi)),Ki(ee,xo(a,ki,se),ct)}}var it=E.wrapper.getBoundingClientRect(),tn=0;function fn(Bn){var Un=++tn,vr=Co(a,Bn,!0,x.unit=="rectangle");if(vr)if(jt(vr,Ie)!=0){a.curOp.focus=Ne(),ht(vr);var ir=Mo(E,ee);(vr.line>=ir.to||vr.line<ir.from)&&setTimeout(Oi(a,function(){tn==Un&&fn(Bn)}),150)}else{var Wr=Bn.clientY<it.top?-20:Bn.clientY>it.bottom?20:0;Wr&&setTimeout(Oi(a,function(){tn==Un&&(E.scroller.scrollTop+=Wr,fn(Bn))}),50)}}function En(Bn){a.state.selectingText=!1,tn=1/0,Bn&&(vn(Bn),E.input.focus()),$t(E.wrapper.ownerDocument,"mousemove",Rn),$t(E.wrapper.ownerDocument,"mouseup",Wn),ee.history.lastSelOrigin=null}var Rn=Oi(a,function(Bn){Bn.buttons===0||!Jn(Bn)?En(Bn):fn(Bn)}),Wn=Oi(a,En);a.state.selectingText=Wn,kt(E.wrapper.ownerDocument,"mousemove",Rn),kt(E.wrapper.ownerDocument,"mouseup",Wn)}function Hu(a,y){var b=y.anchor,x=y.head,E=St(a.doc,b.line);if(jt(b,x)==0&&b.sticky==x.sticky)return y;var ee=Rt(E);if(!ee)return y;var ie=Ge(ee,b.ch,b.sticky),se=ee[ie];if(se.from!=b.ch&&se.to!=b.ch)return y;var fe=ie+(se.from==b.ch==(se.level!=1)?0:1);if(fe==0||fe==ee.length)return y;var ve;if(x.line!=b.line)ve=(x.line-b.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var De=Ge(ee,x.ch,x.sticky),Ie=De-ie||(x.ch-b.ch)*(se.level==1?-1:1);De==fe-1||De==fe?ve=Ie<0:ve=Ie>0}var ht=ee[fe+(ve?-1:0)],it=ve==(ht.level==1),tn=it?ht.from:ht.to,fn=it?"after":"before";return b.ch==tn&&b.sticky==fn?y:new ri(new Qe(b.line,tn,fn),x)}function Bs(a,y,b,x){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(ht){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;x&&vn(y);var ie=a.display,se=ie.lineDiv.getBoundingClientRect();if(ee>se.bottom||!Mt(a,b))return Kt(y);ee-=se.top-ie.viewOffset;for(var fe=0;fe<a.display.gutterSpecs.length;++fe){var ve=ie.gutters.childNodes[fe];if(ve&&ve.getBoundingClientRect().right>=E){var De=He(a.doc,ee),Ie=a.display.gutterSpecs[fe];return _t(a,b,a,De,Ie.className,y),Kt(y)}}}function Bl(a,y){return Bs(a,y,"gutterClick",!0)}function Os(a,y){di(a.display,y)||zu(a,y)||$e(a,y,"contextmenu")||ge||a.display.input.onContextMenu(y)}function zu(a,y){return Mt(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Is(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Eo(a)}var xa={toString:function(){return"CodeMirror.Init"}},Fs={},pl={};function Wu(a){var y=a.optionHandlers;function b(x,E,ee,ie){a.defaults[x]=E,ee&&(y[x]=ie?function(se,fe,ve){ve!=xa&&ee(se,fe,ve)}:ee)}a.defineOption=b,a.Init=xa,b("value","",function(x,E){return x.setValue(E)},!0),b("mode",null,function(x,E){x.doc.modeOption=E,kl(x)},!0),b("indentUnit",2,kl,!0),b("indentWithTabs",!1),b("smartIndent",!0),b("tabSize",4,function(x){Fa(x),Eo(x),Hi(x)},!0),b("lineSeparator",null,function(x,E){if(x.doc.lineSep=E,!!E){var ee=[],ie=x.doc.first;x.doc.iter(function(fe){for(var ve=0;;){var De=fe.text.indexOf(E,ve);if(De==-1)break;ve=De+E.length,ee.push(Qe(ie,De))}ie++});for(var se=ee.length-1;se>=0;se--)va(x.doc,E,ee[se],Qe(ee[se].line,ee[se].ch+E.length))}}),b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(x,E,ee){x.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=xa&&x.refresh()}),b("specialCharPlaceholder",wr,function(x){return x.refresh()},!0),b("electricChars",!0),b("inputStyle",Ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),b("spellcheck",!1,function(x,E){return x.getInputField().spellcheck=E},!0),b("autocorrect",!1,function(x,E){return x.getInputField().autocorrect=E},!0),b("autocapitalize",!1,function(x,E){return x.getInputField().autocapitalize=E},!0),b("rtlMoveVisually",!st),b("wholeLineUpdateBefore",!0),b("theme","default",function(x){Is(x),Ia(x)},!0),b("keyMap","default",function(x,E,ee){var ie=fl(E),se=ee!=xa&&fl(ee);se&&se.detach&&se.detach(x,ie),ie.attach&&ie.attach(x,se||null)}),b("extraKeys",null),b("configureMouse",null),b("lineWrapping",!1,Gu,!0),b("gutters",[],function(x,E){x.display.gutterSpecs=wl(E,x.options.lineNumbers),Ia(x)},!0),b("fixedGutter",!0,function(x,E){x.display.gutters.style.left=E?qo(x.display)+"px":"0",x.refresh()},!0),b("coverGutterNextToScrollbar",!1,function(x){return Bi(x)},!0),b("scrollbarStyle","native",function(x){wo(x),Bi(x),x.display.scrollbars.setScrollTop(x.doc.scrollTop),x.display.scrollbars.setScrollLeft(x.doc.scrollLeft)},!0),b("lineNumbers",!1,function(x,E){x.display.gutterSpecs=wl(x.options.gutters,E),Ia(x)},!0),b("firstLineNumber",1,Ia,!0),b("lineNumberFormatter",function(x){return x},Ia,!0),b("showCursorWhenSelecting",!1,zo,!0),b("resetSelectionOnContextMenu",!0),b("lineWiseCopyCut",!0),b("pasteLinesPerSelection",!0),b("selectionsMayTouch",!1),b("readOnly",!1,function(x,E){E=="nocursor"&&(Wo(x),x.display.input.blur()),x.display.input.readOnlyChanged(E)}),b("screenReaderLabel",null,function(x,E){E=E===""?null:E,x.display.input.screenReaderLabelChanged(E)}),b("disableInput",!1,function(x,E){E||x.display.input.reset()},!0),b("dragDrop",!0,Ku),b("allowDropFileTypes",null),b("cursorBlinkRate",530),b("cursorScrollMargin",0),b("cursorHeight",1,zo,!0),b("singleCursorHeightPerLine",!0,zo,!0),b("workTime",100),b("workDelay",100),b("flattenSpans",!0,Fa,!0),b("addModeClass",!1,Fa,!0),b("pollInterval",100),b("undoDepth",200,function(x,E){return x.doc.history.undoDepth=E}),b("historyEventDelay",1250),b("viewportMargin",10,function(x){return x.refresh()},!0),b("maxHighlightLength",1e4,Fa,!0),b("moveInputWithCursor",!0,function(x,E){E||x.display.input.resetPosition()}),b("tabindex",null,function(x,E){return x.display.input.getField().tabIndex=E||""}),b("autofocus",null),b("direction","ltr",function(x,E){return x.doc.setDirection(E)},!0),b("phrases",null)}function Ku(a,y,b){var x=b&&b!=xa;if(!y!=!x){var E=a.display.dragFunctions,ee=y?kt:$t;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(tt(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ze(a.display.wrapper,"CodeMirror-wrap"),An(a)),ka(a),Hi(a),Eo(a),setTimeout(function(){return Bi(a)},100)}function yi(a,y){var b=this;if(!(this instanceof yi))return new yi(a,y);this.options=y=y?Ht(y):{},Ht(Fs,y,!1);var x=y.value;typeof x=="string"?x=new qi(x,y.mode,null,y.lineSeparator,y.direction):y.mode&&(x.modeOption=y.mode),this.doc=x;var E=new yi.inputStyles[y.inputStyle](this),ee=this.display=new ru(a,x,E,y);ee.wrapper.CodeMirror=this,Is(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wo(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 he,keySeq:null,specialChars:null},y.autofocus&&!Ee&&ee.input.focus(),xe&&ue<11&&setTimeout(function(){return b.display.input.reset(!0)},20),ju(this),wu(),fo(this),this.curOp.forceUpdate=!0,Xl(this,x),y.autofocus&&!Ee||this.hasFocus()?setTimeout(function(){b.hasFocus()&&!b.state.focused&&Pa(b)},20):Wo(this);for(var ie in pl)pl.hasOwnProperty(ie)&&pl[ie](this,y[ie],xa);Wl(this),y.finishInit&&y.finishInit(this);for(var se=0;se<Ol.length;++se)Ol[se](this);yo(this),Le&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}yi.defaults=Fs,yi.optionHandlers=pl;function ju(a){var y=a.display;kt(y.scroller,"mousedown",Oi(a,Ns)),xe&&ue<11?kt(y.scroller,"dblclick",Oi(a,function(fe){if(!$e(a,fe)){var ve=Co(a,fe);if(!(!ve||Bl(a,fe)||di(a.display,fe))){vn(fe);var De=a.findWordAt(ve);ll(a.doc,De.anchor,De.head)}}})):kt(y.scroller,"dblclick",function(fe){return $e(a,fe)||vn(fe)}),kt(y.scroller,"contextmenu",function(fe){return Os(a,fe)}),kt(y.input.getField(),"contextmenu",function(fe){y.scroller.contains(fe.target)||Os(a,fe)});var b,x={end:0};function E(){y.activeTouch&&(b=setTimeout(function(){return y.activeTouch=null},1e3),x=y.activeTouch,x.end=+new Date)}function ee(fe){if(fe.touches.length!=1)return!1;var ve=fe.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ie(fe,ve){if(ve.left==null)return!0;var De=ve.left-fe.left,Ie=ve.top-fe.top;return De*De+Ie*Ie>20*20}kt(y.scroller,"touchstart",function(fe){if(!$e(a,fe)&&!ee(fe)&&!Bl(a,fe)){y.input.ensurePolled(),clearTimeout(b);var ve=+new Date;y.activeTouch={start:ve,moved:!1,prev:ve-x.end<=300?x:null},fe.touches.length==1&&(y.activeTouch.left=fe.touches[0].pageX,y.activeTouch.top=fe.touches[0].pageY)}}),kt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),kt(y.scroller,"touchend",function(fe){var ve=y.activeTouch;if(ve&&!di(y,fe)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var De=a.coordsChar(y.activeTouch,"page"),Ie;!ve.prev||ie(ve,ve.prev)?Ie=new ri(De,De):!ve.prev.prev||ie(ve,ve.prev.prev)?Ie=a.findWordAt(De):Ie=new ri(Qe(De.line,0),Ve(a.doc,Qe(De.line+1,0))),a.setSelection(Ie.anchor,Ie.head),a.focus(),vn(fe)}E()}),kt(y.scroller,"touchcancel",E),kt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(No(a,y.scroller.scrollTop),Ro(a,y.scroller.scrollLeft,!0),_t(a,"scroll",a))}),kt(y.scroller,"mousewheel",function(fe){return jl(a,fe)}),kt(y.scroller,"DOMMouseScroll",function(fe){return jl(a,fe)}),kt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(fe){$e(a,fe)||kn(fe)},over:function(fe){$e(a,fe)||(Cu(a,fe),kn(fe))},start:function(fe){return bu(a,fe)},drop:Oi(a,xu),leave:function(fe){$e(a,fe)||xs(a)}};var se=y.input.getField();kt(se,"keyup",function(fe){return Ms.call(a,fe)}),kt(se,"keydown",Oi(a,Ps)),kt(se,"keypress",Oi(a,As)),kt(se,"focus",function(fe){return Pa(a,fe)}),kt(se,"blur",function(fe){return Wo(a,fe)})}var Ol=[];yi.defineInitHook=function(a){return Ol.push(a)};function Ja(a,y,b,x){var E=a.doc,ee;b==null&&(b="add"),b=="smart"&&(E.mode.indent?ee=zr(a,y).state:b="prev");var ie=a.options.tabSize,se=St(E,y),fe=ye(se.text,null,ie);se.stateAfter&&(se.stateAfter=null);var ve=se.text.match(/^\s*/)[0],De;if(!x&&!/\S/.test(se.text))De=0,b="not";else if(b=="smart"&&(De=E.mode.indent(ee,se.text.slice(ve.length),se.text),De==Pt||De>150)){if(!x)return;b="prev"}b=="prev"?y>E.first?De=ye(St(E,y-1).text,null,ie):De=0:b=="add"?De=fe+a.options.indentUnit:b=="subtract"?De=fe-a.options.indentUnit:typeof b=="number"&&(De=fe+b),De=Math.max(0,De);var Ie="",ht=0;if(a.options.indentWithTabs)for(var it=Math.floor(De/ie);it;--it)ht+=ie,Ie+=" ";if(ht<De&&(Ie+=Dt(De-ht)),Ie!=ve)return va(E,Ie,Qe(y,0),Qe(y,ve.length),"+input"),se.stateAfter=null,!0;for(var tn=0;tn<E.sel.ranges.length;tn++){var fn=E.sel.ranges[tn];if(fn.head.line==y&&fn.head.ch<ve.length){var En=Qe(y,ve.length);Ll(E,tn,new ri(En,En));break}}}var bo=null;function vl(a){bo=a}function Il(a,y,b,x,E){var ee=a.doc;a.display.shift=!1,x||(x=ee.sel);var ie=+new Date-200,se=E=="paste"||a.state.pasteIncoming>ie,fe=zn(y),ve=null;if(se&&x.ranges.length>1)if(bo&&bo.text.join(`
|
|
`)==y){if(x.ranges.length%bo.text.length==0){ve=[];for(var De=0;De<bo.text.length;De++)ve.push(ee.splitLines(bo.text[De]))}}else fe.length==x.ranges.length&&a.options.pasteLinesPerSelection&&(ve=Ot(fe,function(Rn){return[Rn]}));for(var Ie=a.curOp.updateInput,ht=x.ranges.length-1;ht>=0;ht--){var it=x.ranges[ht],tn=it.from(),fn=it.to();it.empty()&&(b&&b>0?tn=Qe(tn.line,tn.ch-b):a.state.overwrite&&!se?fn=Qe(fn.line,Math.min(St(ee,fn.line).text.length,fn.ch+Je(fe).length)):se&&bo&&bo.lineWise&&bo.text.join(`
|
|
`)==fe.join(`
|
|
`)&&(tn=fn=Qe(tn.line,0)));var En={from:tn,to:fn,text:ve?ve[ht%ve.length]:fe,origin:E||(se?"paste":a.state.cutIncoming>ie?"cut":"+input")};pa(a.doc,En),Jr(a,"inputRead",a,En)}y&&!se&&_s(a,y),Ao(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ie),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Zs(a,y){var b=a.clipboardData&&a.clipboardData.getData("Text");if(b)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&oo(y,function(){return Il(y,b,0,null,"paste")}),!0}function _s(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var b=a.doc.sel,x=b.ranges.length-1;x>=0;x--){var E=b.ranges[x];if(!(E.head.ch>100||x&&b.ranges[x-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),ie=!1;if(ee.electricChars){for(var se=0;se<ee.electricChars.length;se++)if(y.indexOf(ee.electricChars.charAt(se))>-1){ie=Ja(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(St(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=Ja(a,E.head.line,"smart"));ie&&Jr(a,"electricInput",a,E.head.line)}}}function Hs(a){for(var y=[],b=[],x=0;x<a.doc.sel.ranges.length;x++){var E=a.doc.sel.ranges[x].head.line,ee={anchor:Qe(E,0),head:Qe(E+1,0)};b.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:b}}function zs(a,y,b,x){a.setAttribute("autocorrect",b?"":"off"),a.setAttribute("autocapitalize",x?"":"off"),a.setAttribute("spellcheck",!!y)}function Ws(){var a=we("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=we("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Le?a.style.width="1000px":a.setAttribute("wrap","off"),je&&(a.style.border="1px solid black"),zs(a),y}function Uu(a){var y=a.optionHandlers,b=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(x,E){var ee=this.options,ie=ee[x];ee[x]==E&&x!="mode"||(ee[x]=E,y.hasOwnProperty(x)&&Oi(this,y[x])(this,E,ie),_t(this,"optionChange",this,x))},getOption:function(x){return this.options[x]},getDoc:function(){return this.doc},addKeyMap:function(x,E){this.state.keyMaps[E?"push":"unshift"](fl(x))},removeKeyMap:function(x){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==x||E[ee].name==x)return E.splice(ee,1),!0},addOverlay:Yi(function(x,E){var ee=x.token?x:a.getMode(this.options,x);if(ee.startState)throw new Error("Overlays may not be stateful.");Nt(this.state.overlays,{mode:ee,modeSpec:x,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Hi(this)}),removeOverlay:Yi(function(x){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var ie=E[ee].modeSpec;if(ie==x||typeof x=="string"&&ie.name==x){E.splice(ee,1),this.state.modeGen++,Hi(this);return}}}),indentLine:Yi(function(x,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),rn(this.doc,x)&&Ja(this,x,E,ee)}),indentSelection:Yi(function(x){for(var E=this.doc.sel.ranges,ee=-1,ie=0;ie<E.length;ie++){var se=E[ie];if(se.empty())se.head.line>ee&&(Ja(this,se.head.line,x,!0),ee=se.head.line,ie==this.doc.sel.primIndex&&Ao(this));else{var fe=se.from(),ve=se.to(),De=Math.max(ee,fe.line);ee=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ie=De;Ie<ee;++Ie)Ja(this,Ie,x);var ht=this.doc.sel.ranges;fe.ch==0&&E.length==ht.length&&ht[ie].from().ch>0&&Ll(this.doc,ie,new ri(fe,ht[ie].to()),Ke)}}}),getTokenAt:function(x,E){return jr(this,x,E)},getLineTokens:function(x,E){return jr(this,Qe(x),E,!0)},getTokenTypeAt:function(x){x=Ve(this.doc,x);var E=ar(this,St(this.doc,x.line)),ee=0,ie=(E.length-1)/2,se=x.ch,fe;if(se==0)fe=E[2];else for(;;){var ve=ee+ie>>1;if((ve?E[ve*2-1]:0)>=se)ie=ve;else if(E[ve*2+1]<se)ee=ve+1;else{fe=E[ve*2+2];break}}var De=fe?fe.indexOf("overlay "):-1;return De<0?fe:De==0?null:fe.slice(0,De-1)},getModeAt:function(x){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(x).state).mode:E},getHelper:function(x,E){return this.getHelpers(x,E)[0]},getHelpers:function(x,E){var ee=[];if(!b.hasOwnProperty(E))return ee;var ie=b[E],se=this.getModeAt(x);if(typeof se[E]=="string")ie[se[E]]&&ee.push(ie[se[E]]);else if(se[E])for(var fe=0;fe<se[E].length;fe++){var ve=ie[se[E][fe]];ve&&ee.push(ve)}else se.helperType&&ie[se.helperType]?ee.push(ie[se.helperType]):ie[se.name]&&ee.push(ie[se.name]);for(var De=0;De<ie._global.length;De++){var Ie=ie._global[De];Ie.pred(se,this)&&mt(ee,Ie.val)==-1&&ee.push(Ie.val)}return ee},getStateAfter:function(x,E){var ee=this.doc;return x=Cn(ee,x==null?ee.first+ee.size-1:x),zr(this,x+1,E).state},cursorCoords:function(x,E){var ee,ie=this.doc.sel.primary();return x==null?ee=ie.head:typeof x=="object"?ee=Ve(this.doc,x):ee=x?ie.from():ie.to(),hi(this,ee,E||"page")},charCoords:function(x,E){return _i(this,Ve(this.doc,x),E||"page")},coordsChar:function(x,E){return x=To(this,x,E||"page"),gi(this,x.left,x.top)},lineAtHeight:function(x,E){return x=To(this,{top:x,left:0},E||"page").top,He(this.doc,x+this.display.viewOffset)},heightAtLine:function(x,E,ee){var ie=!1,se;if(typeof x=="number"){var fe=this.doc.first+this.doc.size-1;x<this.doc.first?x=this.doc.first:x>fe&&(x=fe,ie=!0),se=St(this.doc,x)}else se=x;return Do(this,se,{top:0,left:0},E||"page",ee||ie).top+(ie?this.doc.height-Dn(se):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(x,E,ee,ie,se){var fe=this.display;x=hi(this,Ve(this.doc,x));var ve=x.bottom,De=x.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),fe.sizer.appendChild(E),ie=="over")ve=x.top;else if(ie=="above"||ie=="near"){var Ie=Math.max(fe.wrapper.clientHeight,this.doc.height),ht=Math.max(fe.sizer.clientWidth,fe.lineSpace.clientWidth);(ie=="above"||x.bottom+E.offsetHeight>Ie)&&x.top>E.offsetHeight?ve=x.top-E.offsetHeight:x.bottom+E.offsetHeight<=Ie&&(ve=x.bottom),De+E.offsetWidth>ht&&(De=ht-E.offsetWidth)}E.style.top=ve+"px",E.style.left=E.style.right="",se=="right"?(De=fe.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(se=="left"?De=0:se=="middle"&&(De=(fe.sizer.clientWidth-E.offsetWidth)/2),E.style.left=De+"px"),ee&&tl(this,{left:De,top:ve,right:De+E.offsetWidth,bottom:ve+E.offsetHeight})},triggerOnKeyDown:Yi(Ps),triggerOnKeyPress:Yi(As),triggerOnKeyUp:Ms,triggerOnMouseDown:Yi(Ns),execCommand:function(x){if(Ua.hasOwnProperty(x))return Ua[x].call(null,this)},triggerElectric:Yi(function(x){_s(this,x)}),findPosH:function(x,E,ee,ie){var se=1;E<0&&(se=-1,E=-E);for(var fe=Ve(this.doc,x),ve=0;ve<E&&(fe=Fl(this.doc,fe,se,ee,ie),!fe.hitSide);++ve);return fe},moveH:Yi(function(x,E){var ee=this;this.extendSelectionsBy(function(ie){return ee.display.shift||ee.doc.extend||ie.empty()?Fl(ee.doc,ie.head,x,E,ee.options.rtlMoveVisually):x<0?ie.from():ie.to()},dt)}),deleteH:Yi(function(x,E){var ee=this.doc.sel,ie=this.doc;ee.somethingSelected()?ie.replaceSelection("",null,"+delete"):ya(this,function(se){var fe=Fl(ie,se.head,x,E,!1);return x<0?{from:fe,to:se.head}:{from:se.head,to:fe}})}),findPosV:function(x,E,ee,ie){var se=1,fe=ie;E<0&&(se=-1,E=-E);for(var ve=Ve(this.doc,x),De=0;De<E;++De){var Ie=hi(this,ve,"div");if(fe==null?fe=Ie.left:Ie.left=fe,ve=Ks(this,Ie,se,ee),ve.hitSide)break}return ve},moveV:Yi(function(x,E){var ee=this,ie=this.doc,se=[],fe=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(De){if(fe)return x<0?De.from():De.to();var Ie=hi(ee,De.head,"div");De.goalColumn!=null&&(Ie.left=De.goalColumn),se.push(Ie.left);var ht=Ks(ee,Ie,x,E);return E=="page"&&De==ie.sel.primary()&&da(ee,_i(ee,ht,"div").top-Ie.top),ht},dt),se.length)for(var ve=0;ve<ie.sel.ranges.length;ve++)ie.sel.ranges[ve].goalColumn=se[ve]}),findWordAt:function(x){var E=this.doc,ee=St(E,x.line).text,ie=x.ch,se=x.ch;if(ee){var fe=this.getHelper(x,"wordChars");(x.sticky=="before"||se==ee.length)&&ie?--ie:++se;for(var ve=ee.charAt(ie),De=le(ve,fe)?function(Ie){return le(Ie,fe)}:/\s/.test(ve)?function(Ie){return/\s/.test(Ie)}:function(Ie){return!/\s/.test(Ie)&&!le(Ie)};ie>0&&De(ee.charAt(ie-1));)--ie;for(;se<ee.length&&De(ee.charAt(se));)++se}return new ri(Qe(x.line,ie),Qe(x.line,se))},toggleOverwrite:function(x){x!=null&&x==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?tt(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),_t(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ne()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yi(function(x,E){ea(this,x,E)}),getScrollInfo:function(){var x=this.display.scroller;return{left:x.scrollLeft,top:x.scrollTop,height:x.scrollHeight-ni(this)-this.display.barHeight,width:x.scrollWidth-ni(this)-this.display.barWidth,clientHeight:Vi(this),clientWidth:lo(this)}},scrollIntoView:Yi(function(x,E){x==null?(x={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof x=="number"?x={from:Qe(x,0),to:null}:x.from==null&&(x={from:x,to:null}),x.to||(x.to=x.from),x.margin=E||0,x.from.line!=null?nl(this,x):Ra(this,x.from,x.to,x.margin)}),setSize:Yi(function(x,E){var ee=this,ie=function(fe){return typeof fe=="number"||/^\d+$/.test(String(fe))?fe+"px":fe};x!=null&&(this.display.wrapper.style.width=ie(x)),E!=null&&(this.display.wrapper.style.height=ie(E)),this.options.lineWrapping&&_o(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(fe){if(fe.widgets){for(var ve=0;ve<fe.widgets.length;ve++)if(fe.widgets[ve].noHScroll){co(ee,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,_t(this,"refresh",this)}),operation:function(x){return oo(this,x)},startOperation:function(){return fo(this)},endOperation:function(){return yo(this)},refresh:Yi(function(){var x=this.display.cachedTextHeight;Hi(this),this.curOp.forceUpdate=!0,Eo(this),ea(this,this.doc.scrollLeft,this.doc.scrollTop),bl(this.display),(x==null||Math.abs(x-Ai(this.display))>.5||this.options.lineWrapping)&&ka(this),_t(this,"refresh",this)}),swapDoc:Yi(function(x){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Xl(this,x),Eo(this),this.display.input.reset(),ea(this,x.scrollLeft,x.scrollTop),this.curOp.forceScroll=!0,Jr(this,"swapDoc",this,E),E}),phrase:function(x){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,x)?E[x]:x},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}},Ut(a),a.registerHelper=function(x,E,ee){b.hasOwnProperty(x)||(b[x]=a[x]={_global:[]}),b[x][E]=ee},a.registerGlobalHelper=function(x,E,ee,ie){a.registerHelper(x,E,ie),b[x]._global.push({pred:ee,val:ie})}}function Fl(a,y,b,x,E){var ee=y,ie=b,se=St(a,y.line),fe=E&&a.direction=="rtl"?-b:b;function ve(){var Wn=y.line+fe;return Wn<a.first||Wn>=a.first+a.size?!1:(y=new Qe(Wn,y.ch,y.sticky),se=St(a,Wn))}function De(Wn){var Bn;if(x=="codepoint"){var Un=se.text.charCodeAt(y.ch+(x>0?0:-1));isNaN(Un)?Bn=null:Bn=new Qe(y.line,Math.max(0,Math.min(se.text.length,y.ch+b*(Un>=55296&&Un<56320?2:1))),-b)}else E?Bn=Tu(a.cm,se,y,b):Bn=Ml(se,y,b);if(Bn==null)if(!Wn&&ve())y=Al(E,a.cm,se,y.line,fe);else return!1;else y=Bn;return!0}if(x=="char"||x=="codepoint")De();else if(x=="column")De(!0);else if(x=="word"||x=="group")for(var Ie=null,ht=x=="group",it=a.cm&&a.cm.getHelper(y,"wordChars"),tn=!0;!(b<0&&!De(!tn));tn=!1){var fn=se.text.charAt(y.ch)||`
|
|
`,En=le(fn,it)?"w":ht&&fn==`
|
|
`?"n":!ht||/\s/.test(fn)?null:"p";if(ht&&!tn&&!En&&(En="s"),Ie&&Ie!=En){b<0&&(b=1,De(),y.sticky="after");break}if(En&&(Ie=En),b>0&&!De(!tn))break}var Rn=ul(a,y,ee,ie,!0);return sn(ee,Rn)&&(Rn.hitSide=!0),Rn}function Ks(a,y,b,x){var E=a.doc,ee=y.left,ie;if(x=="page"){var se=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),fe=Math.max(se-.5*Ai(a.display),3);ie=(b>0?y.bottom:y.top)+b*fe}else x=="line"&&(ie=b>0?y.bottom+3:y.top-3);for(var ve;ve=gi(a,ee,ie),!!ve.outside;){if(b<0?ie<=0:ie>=E.height){ve.hitSide=!0;break}ie+=b*5}return ve}var li=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};li.prototype.init=function(a){var y=this,b=this,x=b.cm,E=b.div=a.lineDiv;zs(E,x.options.spellcheck,x.options.autocorrect,x.options.autocapitalize);function ee(se){for(var fe=se.target;fe;fe=fe.parentNode){if(fe==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(fe.className))break}return!1}kt(E,"paste",function(se){!ee(se)||$e(x,se)||Zs(se,x)||ue<=11&&setTimeout(Oi(x,function(){return y.updateFromDOM()}),20)}),kt(E,"compositionstart",function(se){y.composing={data:se.data,done:!1}}),kt(E,"compositionupdate",function(se){y.composing||(y.composing={data:se.data,done:!1})}),kt(E,"compositionend",function(se){y.composing&&(se.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),kt(E,"touchstart",function(){return b.forceCompositionEnd()}),kt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(se){if(!(!ee(se)||$e(x,se))){if(x.somethingSelected())vl({lineWise:!1,text:x.getSelections()}),se.type=="cut"&&x.replaceSelection("",null,"cut");else if(x.options.lineWiseCopyCut){var fe=Hs(x);vl({lineWise:!0,text:fe.text}),se.type=="cut"&&x.operation(function(){x.setSelections(fe.ranges,0,Ke),x.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var ve=bo.text.join(`
|
|
`);if(se.clipboardData.setData("Text",ve),se.clipboardData.getData("Text")==ve){se.preventDefault();return}}var De=Ws(),Ie=De.firstChild;x.display.lineSpace.insertBefore(De,x.display.lineSpace.firstChild),Ie.value=bo.text.join(`
|
|
`);var ht=document.activeElement;Et(Ie),setTimeout(function(){x.display.lineSpace.removeChild(De),ht.focus(),ht==E&&b.showPrimarySelection()},50)}}kt(E,"copy",ie),kt(E,"cut",ie)},li.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var a=qa(this.cm,!1);return a.focus=document.activeElement==this.div,a},li.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},li.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},li.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,b=y.doc.sel.primary(),x=b.from(),E=b.to();if(y.display.viewTo==y.display.viewFrom||x.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ee=ml(y,a.anchorNode,a.anchorOffset),ie=ml(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&ie&&!ie.bad&&jt(pn(ee,ie),x)==0&&jt(bn(ee,ie),E)==0)){var se=y.display.view,fe=x.line>=y.display.viewFrom&&Gs(y,x)||{node:se[0].measure.map[2],offset:0},ve=E.line<y.display.viewTo&&Gs(y,E);if(!ve){var De=se[se.length-1].measure,Ie=De.maps?De.maps[De.maps.length-1]:De.map;ve={node:Ie[Ie.length-1],offset:Ie[Ie.length-2]-Ie[Ie.length-3]}}if(!fe||!ve){a.removeAllRanges();return}var ht=a.rangeCount&&a.getRangeAt(0),it;try{it=Se(fe.node,fe.offset,ve.offset,ve.node)}catch(tn){}it&&(!oe&&y.state.focused?(a.collapse(fe.node,fe.offset),it.collapsed||(a.removeAllRanges(),a.addRange(it))):(a.removeAllRanges(),a.addRange(it)),ht&&a.anchorNode==null?a.addRange(ht):oe&&this.startGracePeriod()),this.rememberSelection()}},li.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},li.prototype.showMultipleSelections=function(a){Ce(this.cm.display.cursorDiv,a.cursors),Ce(this.cm.display.selectionDiv,a.selection)},li.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},li.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ue(this.div,y)},li.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},li.prototype.blur=function(){this.div.blur()},li.prototype.getField=function(){return this.div},li.prototype.supportsTouch=function(){return!0},li.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():oo(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},li.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},li.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ze&&be&&this.cm.display.gutterSpecs.length&&Vu(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var b=ml(y,a.anchorNode,a.anchorOffset),x=ml(y,a.focusNode,a.focusOffset);b&&x&&oo(y,function(){Ki(y.doc,Go(b,x),Ke),(b.bad||x.bad)&&(y.curOp.selectionChanged=!0)})}}},li.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,b=a.doc.sel.primary(),x=b.from(),E=b.to();if(x.ch==0&&x.line>a.firstLine()&&(x=Qe(x.line-1,St(a.doc,x.line-1).length)),E.ch==St(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Qe(E.line+1,0)),x.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,ie,se;x.line==y.viewFrom||(ee=Lo(a,x.line))==0?(ie=Fe(y.view[0].line),se=y.view[0].node):(ie=Fe(y.view[ee].line),se=y.view[ee-1].node.nextSibling);var fe=Lo(a,E.line),ve,De;if(fe==y.view.length-1?(ve=y.viewTo-1,De=y.lineDiv.lastChild):(ve=Fe(y.view[fe+1].line)-1,De=y.view[fe+1].node.previousSibling),!se)return!1;for(var Ie=a.doc.splitLines(Yu(a,se,De,ie,ve)),ht=cn(a.doc,Qe(ie,0),Qe(ve,St(a.doc,ve).text.length));Ie.length>1&&ht.length>1;)if(Je(Ie)==Je(ht))Ie.pop(),ht.pop(),ve--;else if(Ie[0]==ht[0])Ie.shift(),ht.shift(),ie++;else break;for(var it=0,tn=0,fn=Ie[0],En=ht[0],Rn=Math.min(fn.length,En.length);it<Rn&&fn.charCodeAt(it)==En.charCodeAt(it);)++it;for(var Wn=Je(Ie),Bn=Je(ht),Un=Math.min(Wn.length-(Ie.length==1?it:0),Bn.length-(ht.length==1?it:0));tn<Un&&Wn.charCodeAt(Wn.length-tn-1)==Bn.charCodeAt(Bn.length-tn-1);)++tn;if(Ie.length==1&&ht.length==1&&ie==x.line)for(;it&&it>x.ch&&Wn.charCodeAt(Wn.length-tn-1)==Bn.charCodeAt(Bn.length-tn-1);)it--,tn++;Ie[Ie.length-1]=Wn.slice(0,Wn.length-tn).replace(/^\u200b+/,""),Ie[0]=Ie[0].slice(it).replace(/\u200b+$/,"");var vr=Qe(ie,it),ir=Qe(ve,ht.length?Je(ht).length-tn:0);if(Ie.length>1||Ie[0]||jt(vr,ir))return va(a.doc,Ie,vr,ir,"+input"),!0},li.prototype.ensurePolled=function(){this.forceCompositionEnd()},li.prototype.reset=function(){this.forceCompositionEnd()},li.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},li.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},li.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&oo(this.cm,function(){return Hi(a.cm)})},li.prototype.setUneditable=function(a){a.contentEditable="false"},li.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||Oi(this.cm,Il)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},li.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},li.prototype.onContextMenu=function(){},li.prototype.resetPosition=function(){},li.prototype.needsContentAttribute=!0;function Gs(a,y){var b=vo(a,y.line);if(!b||b.hidden)return null;var x=St(a.doc,y.line),E=mi(b,x,y.line),ee=Rt(x,a.doc.direction),ie="left";if(ee){var se=Ge(ee,y.ch);ie=se%2?"right":"left"}var fe=ia(E.map,y.ch,ie);return fe.offset=fe.collapse=="right"?fe.end:fe.start,fe}function Vu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function ba(a,y){return y&&(a.bad=!0),a}function Yu(a,y,b,x,E){var ee="",ie=!1,se=a.doc.lineSeparator(),fe=!1;function ve(it){return function(tn){return tn.id==it}}function De(){ie&&(ee+=se,fe&&(ee+=se),ie=fe=!1)}function Ie(it){it&&(De(),ee+=it)}function ht(it){if(it.nodeType==1){var tn=it.getAttribute("cm-text");if(tn){Ie(tn);return}var fn=it.getAttribute("cm-marker"),En;if(fn){var Rn=a.findMarks(Qe(x,0),Qe(E+1,0),ve(+fn));Rn.length&&(En=Rn[0].find(0))&&Ie(cn(a.doc,En.from,En.to).join(se));return}if(it.getAttribute("contenteditable")=="false")return;var Wn=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;Wn&&De();for(var Bn=0;Bn<it.childNodes.length;Bn++)ht(it.childNodes[Bn]);/^(pre|p)$/i.test(it.nodeName)&&(fe=!0),Wn&&(ie=!0)}else it.nodeType==3&&Ie(it.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ht(y),y!=b;)y=y.nextSibling,fe=!1;return ee}function ml(a,y,b){var x;if(y==a.display.lineDiv){if(x=a.display.lineDiv.childNodes[b],!x)return ba(a.clipPos(Qe(a.display.viewTo-1)),!0);y=null,b=0}else for(x=y;;x=x.parentNode){if(!x||x==a.display.lineDiv)return null;if(x.parentNode&&x.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==x)return Xu(ee,y,b)}}function Xu(a,y,b){var x=a.text.firstChild,E=!1;if(!y||!Ue(x,y))return ba(Qe(Fe(a.line),0),!0);if(y==x&&(E=!0,y=x.childNodes[b],b=0,!y)){var ee=a.rest?Je(a.rest):a.line;return ba(Qe(Fe(ee),ee.text.length),E)}var ie=y.nodeType==3?y:null,se=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,b&&(b=ie.nodeValue.length));se.parentNode!=x;)se=se.parentNode;var fe=a.measure,ve=fe.maps;function De(En,Rn,Wn){for(var Bn=-1;Bn<(ve?ve.length:0);Bn++)for(var Un=Bn<0?fe.map:ve[Bn],vr=0;vr<Un.length;vr+=3){var ir=Un[vr+2];if(ir==En||ir==Rn){var Wr=Fe(Bn<0?a.line:a.rest[Bn]),ci=Un[vr]+Wn;return(Wn<0||ir!=En)&&(ci=Un[vr+(Wn?1:0)]),Qe(Wr,ci)}}}var Ie=De(ie,se,b);if(Ie)return ba(Ie,E);for(var ht=se.nextSibling,it=ie?ie.nodeValue.length-b:0;ht;ht=ht.nextSibling){if(Ie=De(ht,ht.firstChild,0),Ie)return ba(Qe(Ie.line,Ie.ch-it),E);it+=ht.textContent.length}for(var tn=se.previousSibling,fn=b;tn;tn=tn.previousSibling){if(Ie=De(tn,tn.firstChild,-1),Ie)return ba(Qe(Ie.line,Ie.ch+fn),E);fn+=tn.textContent.length}}var Ti=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null};Ti.prototype.init=function(a){var y=this,b=this,x=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),je&&(E.style.width="0px"),kt(E,"input",function(){xe&&ue>=9&&y.hasSelection&&(y.hasSelection=null),b.poll()}),kt(E,"paste",function(ie){$e(x,ie)||Zs(ie,x)||(x.state.pasteIncoming=+new Date,b.fastPoll())});function ee(ie){if(!$e(x,ie)){if(x.somethingSelected())vl({lineWise:!1,text:x.getSelections()});else if(x.options.lineWiseCopyCut){var se=Hs(x);vl({lineWise:!0,text:se.text}),ie.type=="cut"?x.setSelections(se.ranges,null,Ke):(b.prevInput="",E.value=se.text.join(`
|
|
`),Et(E))}else return;ie.type=="cut"&&(x.state.cutIncoming=+new Date)}}kt(E,"cut",ee),kt(E,"copy",ee),kt(a.scroller,"paste",function(ie){if(!(di(a,ie)||$e(x,ie))){if(!E.dispatchEvent){x.state.pasteIncoming=+new Date,b.focus();return}var se=new Event("paste");se.clipboardData=ie.clipboardData,E.dispatchEvent(se)}}),kt(a.lineSpace,"selectstart",function(ie){di(a,ie)||vn(ie)}),kt(E,"compositionstart",function(){var ie=x.getCursor("from");b.composing&&b.composing.range.clear(),b.composing={start:ie,range:x.markText(ie,x.getCursor("to"),{className:"CodeMirror-composing"})}}),kt(E,"compositionend",function(){b.composing&&(b.poll(),b.composing.range.clear(),b.composing=null)})},Ti.prototype.createField=function(a){this.wrapper=Ws(),this.textarea=this.wrapper.firstChild},Ti.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Ti.prototype.prepareSelection=function(){var a=this.cm,y=a.display,b=a.doc,x=qa(a);if(a.options.moveInputWithCursor){var E=hi(a,b.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();x.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-ee.top)),x.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-ee.left))}return x},Ti.prototype.showSelection=function(a){var y=this.cm,b=y.display;Ce(b.cursorDiv,a.cursors),Ce(b.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Ti.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var b=y.getSelection();this.textarea.value=b,y.state.focused&&Et(this.textarea),xe&&ue>=9&&(this.hasSelection=b)}else a||(this.prevInput=this.textarea.value="",xe&&ue>=9&&(this.hasSelection=null))}},Ti.prototype.getField=function(){return this.textarea},Ti.prototype.supportsTouch=function(){return!1},Ti.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ee||Ne()!=this.textarea))try{this.textarea.focus()}catch(a){}},Ti.prototype.blur=function(){this.textarea.blur()},Ti.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ti.prototype.receivedFocus=function(){this.slowPoll()},Ti.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Ti.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function b(){var x=y.poll();!x&&!a?(a=!0,y.polling.set(60,b)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,b)},Ti.prototype.poll=function(){var a=this,y=this.cm,b=this.textarea,x=this.prevInput;if(this.contextMenuPending||!y.state.focused||rr(b)&&!x&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=b.value;if(E==x&&!y.somethingSelected())return!1;if(xe&&ue>=9&&this.hasSelection===E||Ae&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!x&&(x="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,se=Math.min(x.length,E.length);ie<se&&x.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return oo(y,function(){Il(y,E.slice(ie),x.length-ie,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
`)>-1?b.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ti.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ti.prototype.onKeyPress=function(){xe&&ue>=9&&(this.hasSelection=null),this.fastPoll()},Ti.prototype.onContextMenu=function(a){var y=this,b=y.cm,x=b.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=Co(b,a),ie=x.scroller.scrollTop;if(!ee||pe)return;var se=b.options.resetSelectionOnContextMenu;se&&b.doc.sel.contains(ee)==-1&&Oi(b,Ki)(b.doc,Go(ee),Ke);var fe=E.style.cssText,ve=y.wrapper.style.cssText,De=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-De.top-5)+"px; left: "+(a.clientX-De.left-5)+`px;
|
|
z-index: 1000; background: `+(xe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ie;Le&&(Ie=window.scrollY),x.input.focus(),Le&&window.scrollTo(null,Ie),x.input.reset(),b.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=it,x.selForContextMenu=b.doc.sel,clearTimeout(x.detectingSelectAll);function ht(){if(E.selectionStart!=null){var fn=b.somethingSelected(),En="\u200B"+(fn?E.value:"");E.value="\u21DA",E.value=En,y.prevInput=fn?"":"\u200B",E.selectionStart=1,E.selectionEnd=En.length,x.selForContextMenu=b.doc.sel}}function it(){if(y.contextMenuPending==it&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ve,E.style.cssText=fe,xe&&ue<9&&x.scrollbars.setScrollTop(x.scroller.scrollTop=ie),E.selectionStart!=null)){(!xe||xe&&ue<9)&&ht();var fn=0,En=function(){x.selForContextMenu==b.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?Oi(b,ss)(b):fn++<10?x.detectingSelectAll=setTimeout(En,500):(x.selForContextMenu=null,x.input.reset())};x.detectingSelectAll=setTimeout(En,200)}}if(xe&&ue>=9&&ht(),ge){kn(a);var tn=function(){$t(window,"mouseup",tn),setTimeout(it,20)};kt(window,"mouseup",tn)}else setTimeout(it,50)},Ti.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Ti.prototype.setUneditable=function(){},Ti.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Ht(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var b=Ne();y.autofocus=b==a||a.getAttribute("autofocus")!=null&&b==document.body}function x(){a.value=se.getValue()}var E;if(a.form&&(kt(a.form,"submit",x),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var ie=ee.submit=function(){x(),ee.submit=E,ee.submit(),ee.submit=ie}}catch(fe){}}y.finishInit=function(fe){fe.save=x,fe.getTextArea=function(){return a},fe.toTextArea=function(){fe.toTextArea=isNaN,x(),a.parentNode.removeChild(fe.getWrapperElement()),a.style.display="",a.form&&($t(a.form,"submit",x),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var se=yi(function(fe){return a.parentNode.insertBefore(fe,a.nextSibling)},y);return se}function Qu(a){a.off=$t,a.on=kt,a.wheelEventPixels=iu,a.Doc=qi,a.splitLines=zn,a.countColumn=ye,a.findColumn=yn,a.isWordChar=re,a.Pass=Pt,a.signal=_t,a.Line=Xn,a.changeEnd=jo,a.scrollbarModel=Bo,a.Pos=Qe,a.cmpPos=jt,a.modes=kr,a.mimeModes=gn,a.resolveMode=_n,a.getMode=Tr,a.modeExtensions=xr,a.extendMode=Hr,a.copyState=br,a.startState=Fr,a.innerMode=or,a.commands=Ua,a.keyMap=Io,a.keyName=ks,a.isModifierKey=ws,a.lookupKey=ga,a.normalizeKeyMap=Du,a.StringStream=dn,a.SharedTextMarker=Ka,a.TextMarker=Vo,a.LineWidget=Wa,a.e_preventDefault=vn,a.e_stopPropagation=Pn,a.e_stop=kn,a.addClass=tt,a.contains=Ue,a.rmClass=ze,a.keyNames=Yo}Wu(yi),Uu(yi);var $u="iter insert remove copy getEditor constructor".split(" ");for(var gl in qi.prototype)qi.prototype.hasOwnProperty(gl)&&mt($u,gl)<0&&(yi.prototype[gl]=function(a){return function(){return a.apply(this.doc,arguments)}}(qi.prototype[gl]));return Ut(qi),yi.inputStyles={textarea:Ti,contenteditable:li},yi.defineMode=function(a){!yi.defaults.mode&&a!="null"&&(yi.defaults.mode=a),Ln.apply(this,arguments)},yi.defineMIME=Mn,yi.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),yi.defineMIME("text/plain","null"),yi.defineExtension=function(a,y){yi.prototype[a]=y},yi.defineDocExtension=function(a,y){qi.prototype[a]=y},yi.fromTextArea=Ju,Qu(yi),yi.version="5.58.2",yi})},25419:function(on,nn,ce){(function(oe){oe(ce(89780),ce(15525),ce(98101))})(function(oe){"use strict";oe.defineMode("markdown",function(Oe,Me){var nt=oe.getMode(Oe,"text/html"),xe=nt.name=="null";function ue(ye){if(oe.findModeByName){var he=oe.findModeByName(ye);he&&(ye=he.mime||he.mimes[0])}var mt=oe.getMode(Oe,ye);return mt.name=="null"?null:mt}Me.highlightFormatting===void 0&&(Me.highlightFormatting=!1),Me.maxBlockquoteDepth===void 0&&(Me.maxBlockquoteDepth=0),Me.taskLists===void 0&&(Me.taskLists=!1),Me.strikethrough===void 0&&(Me.strikethrough=!1),Me.emoji===void 0&&(Me.emoji=!1),Me.fencedCodeBlockHighlighting===void 0&&(Me.fencedCodeBlockHighlighting=!0),Me.fencedCodeBlockDefaultMode===void 0&&(Me.fencedCodeBlockDefaultMode="text/plain"),Me.xml===void 0&&(Me.xml=!0),Me.tokenTypeOverrides===void 0&&(Me.tokenTypeOverrides={});var Le={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 Xe in Le)Le.hasOwnProperty(Xe)&&Me.tokenTypeOverrides[Xe]&&(Le[Xe]=Me.tokenTypeOverrides[Xe]);var be=/^([*\-_])(?:\s*\1){2,}\s*$/,pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,rt=/^\[(x| )\](?=\s)/i,me=Me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,lt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,je=/^[^#!\[\]*_\\<>` "'(~:]+/,Ze=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ee=/^\s*\[[^\]]+?\]:.*$/,Ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ot=" ";function st(ye,he,mt){return he.f=he.inline=mt,mt(ye,he)}function ut(ye,he,mt){return he.f=he.block=mt,mt(ye,he)}function Pe(ye){return!ye||!/\S/.test(ye.string)}function ge(ye){if(ye.linkTitle=!1,ye.linkHref=!1,ye.linkText=!1,ye.em=!1,ye.strong=!1,ye.strikethrough=!1,ye.quote=0,ye.indentedCode=!1,ye.f==ze){var he=xe;if(!he){var mt=oe.innerMode(nt,ye.htmlState);he=mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText}he&&(ye.f=We,ye.block=Be,ye.htmlState=null)}return ye.trailingSpace=0,ye.trailingSpaceNewLine=!1,ye.prevLine=ye.thisLine,ye.thisLine={stream:null},null}function Be(ye,he){var mt=ye.column()===he.indentation,qt=Pe(he.prevLine.stream),Pt=he.indentedCode,Ke=he.prevLine.hr,ct=he.list!==!1,dt=(he.listStack[he.listStack.length-1]||0)+3;he.indentedCode=!1;var yn=he.indentation;if(he.indentationDiff===null&&(he.indentationDiff=he.indentation,ct)){for(he.list=null;yn<he.listStack[he.listStack.length-1];)he.listStack.pop(),he.listStack.length?he.indentation=he.listStack[he.listStack.length-1]:he.list=!1;he.list!==!1&&(he.indentationDiff=yn-he.listStack[he.listStack.length-1])}var _e=!qt&&!Ke&&!he.prevLine.header&&(!ct||!Pt)&&!he.prevLine.fencedCodeEnd,Dt=(he.list===!1||Ke||qt)&&he.indentation<=dt&&ye.match(be),Je=null;if(he.indentationDiff>=4&&(Pt||he.prevLine.fencedCodeEnd||he.prevLine.header||qt))return ye.skipToEnd(),he.indentedCode=!0,Le.code;if(ye.eatSpace())return null;if(mt&&he.indentation<=dt&&(Je=ye.match(me))&&Je[1].length<=6)return he.quote=0,he.header=Je[1].length,he.thisLine.header=!0,Me.highlightFormatting&&(he.formatting="header"),he.f=he.inline,Ce(he);if(he.indentation<=dt&&ye.eat(">"))return he.quote=mt?1:he.quote+1,Me.highlightFormatting&&(he.formatting="quote"),ye.eatSpace(),Ce(he);if(!Dt&&!he.setext&&mt&&he.indentation<=dt&&(Je=ye.match(pe))){var Ot=Je[1]?"ol":"ul";return he.indentation=yn+ye.current().length,he.list=!0,he.quote=0,he.listStack.push(he.indentation),he.em=!1,he.strong=!1,he.code=!1,he.strikethrough=!1,Me.taskLists&&ye.match(rt,!1)&&(he.taskList=!0),he.f=he.inline,Me.highlightFormatting&&(he.formatting=["list","list-"+Ot]),Ce(he)}else{if(mt&&he.indentation<=dt&&(Je=ye.match(Ze,!0)))return he.quote=0,he.fencedEndRE=new RegExp(Je[1]+"+ *$"),he.localMode=Me.fencedCodeBlockHighlighting&&ue(Je[2]||Me.fencedCodeBlockDefaultMode),he.localMode&&(he.localState=oe.startState(he.localMode)),he.f=he.block=yt,Me.highlightFormatting&&(he.formatting="code-block"),he.code=-1,Ce(he);if(he.setext||(!_e||!ct)&&!he.quote&&he.list===!1&&!he.code&&!Dt&&!Ee.test(ye.string)&&(Je=ye.lookAhead(1))&&(Je=Je.match(lt)))return he.setext?(he.header=he.setext,he.setext=0,ye.skipToEnd(),Me.highlightFormatting&&(he.formatting="header")):(he.header=Je[0].charAt(0)=="="?1:2,he.setext=he.header),he.thisLine.header=!0,he.f=he.inline,Ce(he);if(Dt)return ye.skipToEnd(),he.hr=!0,he.thisLine.hr=!0,Le.hr;if(ye.peek()==="[")return st(ye,he,Yt)}return st(ye,he,he.inline)}function ze(ye,he){var mt=nt.token(ye,he.htmlState);if(!xe){var qt=oe.innerMode(nt,he.htmlState);(qt.mode.name=="xml"&&qt.state.tagStart===null&&!qt.state.context&&qt.state.tokenize.isInText||he.md_inside&&ye.current().indexOf(">")>-1)&&(he.f=We,he.block=Be,he.htmlState=null)}return mt}function yt(ye,he){var mt=he.listStack[he.listStack.length-1]||0,qt=he.indentation<mt,Pt=mt+3;if(he.fencedEndRE&&he.indentation<=Pt&&(qt||ye.match(he.fencedEndRE))){Me.highlightFormatting&&(he.formatting="code-block");var Ke;return qt||(Ke=Ce(he)),he.localMode=he.localState=null,he.block=Be,he.f=We,he.fencedEndRE=null,he.code=0,he.thisLine.fencedCodeEnd=!0,qt?ut(ye,he,he.block):Ke}else return he.localMode?he.localMode.token(ye,he.localState):(ye.skipToEnd(),Le.code)}function Ce(ye){var he=[];if(ye.formatting){he.push(Le.formatting),typeof ye.formatting=="string"&&(ye.formatting=[ye.formatting]);for(var mt=0;mt<ye.formatting.length;mt++)he.push(Le.formatting+"-"+ye.formatting[mt]),ye.formatting[mt]==="header"&&he.push(Le.formatting+"-"+ye.formatting[mt]+"-"+ye.header),ye.formatting[mt]==="quote"&&(!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ye.quote?he.push(Le.formatting+"-"+ye.formatting[mt]+"-"+ye.quote):he.push("error"))}if(ye.taskOpen)return he.push("meta"),he.length?he.join(" "):null;if(ye.taskClosed)return he.push("property"),he.length?he.join(" "):null;if(ye.linkHref?he.push(Le.linkHref,"url"):(ye.strong&&he.push(Le.strong),ye.em&&he.push(Le.em),ye.strikethrough&&he.push(Le.strikethrough),ye.emoji&&he.push(Le.emoji),ye.linkText&&he.push(Le.linkText),ye.code&&he.push(Le.code),ye.image&&he.push(Le.image),ye.imageAltText&&he.push(Le.imageAltText,"link"),ye.imageMarker&&he.push(Le.imageMarker)),ye.header&&he.push(Le.header,Le.header+"-"+ye.header),ye.quote&&(he.push(Le.quote),!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ye.quote?he.push(Le.quote+"-"+ye.quote):he.push(Le.quote+"-"+Me.maxBlockquoteDepth)),ye.list!==!1){var qt=(ye.listStack.length-1)%3;qt?qt===1?he.push(Le.list2):he.push(Le.list3):he.push(Le.list1)}return ye.trailingSpaceNewLine?he.push("trailing-space-new-line"):ye.trailingSpace&&he.push("trailing-space-"+(ye.trailingSpace%2?"a":"b")),he.length?he.join(" "):null}function we(ye,he){if(ye.match(je,!0))return Ce(he)}function We(ye,he){var mt=he.text(ye,he);if(typeof mt!="undefined")return mt;if(he.list)return he.list=null,Ce(he);if(he.taskList){var qt=ye.match(rt,!0)[1]===" ";return qt?he.taskOpen=!0:he.taskClosed=!0,Me.highlightFormatting&&(he.formatting="task"),he.taskList=!1,Ce(he)}if(he.taskOpen=!1,he.taskClosed=!1,he.header&&ye.match(/^#+$/,!0))return Me.highlightFormatting&&(he.formatting="header"),Ce(he);var Pt=ye.next();if(he.linkTitle){he.linkTitle=!1;var Ke=Pt;Pt==="("&&(Ke=")"),Ke=(Ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ct="^\\s*(?:[^"+Ke+"\\\\]+|\\\\\\\\|\\\\.)"+Ke;if(ye.match(new RegExp(ct),!0))return Le.linkHref}if(Pt==="`"){var dt=he.formatting;Me.highlightFormatting&&(he.formatting="code"),ye.eatWhile("`");var yn=ye.current().length;if(he.code==0&&(!he.quote||yn==1))return he.code=yn,Ce(he);if(yn==he.code){var _e=Ce(he);return he.code=0,_e}else return he.formatting=dt,Ce(he)}else if(he.code)return Ce(he);if(Pt==="\\"&&(ye.next(),Me.highlightFormatting)){var Dt=Ce(he),Je=Le.formatting+"-escape";return Dt?Dt+" "+Je:Je}if(Pt==="!"&&ye.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return he.imageMarker=!0,he.image=!0,Me.highlightFormatting&&(he.formatting="image"),Ce(he);if(Pt==="["&&he.imageMarker&&ye.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return he.imageMarker=!1,he.imageAltText=!0,Me.highlightFormatting&&(he.formatting="image"),Ce(he);if(Pt==="]"&&he.imageAltText){Me.highlightFormatting&&(he.formatting="image");var Dt=Ce(he);return he.imageAltText=!1,he.image=!1,he.inline=he.f=Ue,Dt}if(Pt==="["&&!he.image)return he.linkText&&ye.match(/^.*?\]/)||(he.linkText=!0,Me.highlightFormatting&&(he.formatting="link")),Ce(he);if(Pt==="]"&&he.linkText){Me.highlightFormatting&&(he.formatting="link");var Dt=Ce(he);return he.linkText=!1,he.inline=he.f=ye.match(/\(.*?\)| ?\[.*?\]/,!1)?Ue:We,Dt}if(Pt==="<"&&ye.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Se,Me.highlightFormatting&&(he.formatting="link");var Dt=Ce(he);return Dt?Dt+=" ":Dt="",Dt+Le.linkInline}if(Pt==="<"&&ye.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Se,Me.highlightFormatting&&(he.formatting="link");var Dt=Ce(he);return Dt?Dt+=" ":Dt="",Dt+Le.linkEmail}if(Me.xml&&Pt==="<"&&ye.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ot=ye.string.indexOf(">",ye.pos);if(Ot!=-1){var Nt=ye.string.substring(ye.start,Ot);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Nt)&&(he.md_inside=!0)}return ye.backUp(1),he.htmlState=oe.startState(nt),ut(ye,he,ze)}if(Me.xml&&Pt==="<"&&ye.match(/^\/\w*?>/))return he.md_inside=!1,"tag";if(Pt==="*"||Pt==="_"){for(var ae=1,te=ye.pos==1?" ":ye.string.charAt(ye.pos-2);ae<3&&ye.eat(Pt);)ae++;var z=ye.peek()||" ",re=!/\s/.test(z)&&(!Ae.test(z)||/\s/.test(te)||Ae.test(te)),le=!/\s/.test(te)&&(!Ae.test(te)||/\s/.test(z)||Ae.test(z)),ne=null,de=null;if(ae%2&&(!he.em&&re&&(Pt==="*"||!le||Ae.test(te))?ne=!0:he.em==Pt&&le&&(Pt==="*"||!re||Ae.test(z))&&(ne=!1)),ae>1&&(!he.strong&&re&&(Pt==="*"||!le||Ae.test(te))?de=!0:he.strong==Pt&&le&&(Pt==="*"||!re||Ae.test(z))&&(de=!1)),de!=null||ne!=null){Me.highlightFormatting&&(he.formatting=ne==null?"strong":de==null?"em":"strong em"),ne===!0&&(he.em=Pt),de===!0&&(he.strong=Pt);var _e=Ce(he);return ne===!1&&(he.em=!1),de===!1&&(he.strong=!1),_e}}else if(Pt===" "&&(ye.eat("*")||ye.eat("_"))){if(ye.peek()===" ")return Ce(he);ye.backUp(1)}if(Me.strikethrough){if(Pt==="~"&&ye.eatWhile(Pt)){if(he.strikethrough){Me.highlightFormatting&&(he.formatting="strikethrough");var _e=Ce(he);return he.strikethrough=!1,_e}else if(ye.match(/^[^\s]/,!1))return he.strikethrough=!0,Me.highlightFormatting&&(he.formatting="strikethrough"),Ce(he)}else if(Pt===" "&&ye.match(/^~~/,!0)){if(ye.peek()===" ")return Ce(he);ye.backUp(2)}}if(Me.emoji&&Pt===":"&&ye.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){he.emoji=!0,Me.highlightFormatting&&(he.formatting="emoji");var Re=Ce(he);return he.emoji=!1,Re}return Pt===" "&&(ye.match(/^ +$/,!1)?he.trailingSpace++:he.trailingSpace&&(he.trailingSpaceNewLine=!0)),Ce(he)}function Se(ye,he){var mt=ye.next();if(mt===">"){he.f=he.inline=We,Me.highlightFormatting&&(he.formatting="link");var qt=Ce(he);return qt?qt+=" ":qt="",qt+Le.linkInline}return ye.match(/^[^>]+/,!0),Le.linkInline}function Ue(ye,he){if(ye.eatSpace())return null;var mt=ye.next();return mt==="("||mt==="["?(he.f=he.inline=tt(mt==="("?")":"]"),Me.highlightFormatting&&(he.formatting="link-string"),he.linkHref=!0,Ce(he)):"error"}var Ne={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function tt(ye){return function(he,mt){var qt=he.next();if(qt===ye){mt.f=mt.inline=We,Me.highlightFormatting&&(mt.formatting="link-string");var Pt=Ce(mt);return mt.linkHref=!1,Pt}return he.match(Ne[ye]),mt.linkHref=!0,Ce(mt)}}function Yt(ye,he){return ye.match(/^([^\]\\]|\\.)*\]:/,!1)?(he.f=Et,ye.next(),Me.highlightFormatting&&(he.formatting="link"),he.linkText=!0,Ce(he)):st(ye,he,We)}function Et(ye,he){if(ye.match(/^\]:/,!0)){he.f=he.inline=Jt,Me.highlightFormatting&&(he.formatting="link");var mt=Ce(he);return he.linkText=!1,mt}return ye.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function Jt(ye,he){return ye.eatSpace()?null:(ye.match(/^[^\s]+/,!0),ye.peek()===void 0?he.linkTitle=!0:ye.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),he.f=he.inline=We,Le.linkHref+" url")}var Ht={startState:function(){return{f:Be,prevLine:{stream:null},thisLine:{stream:null},block:Be,htmlState:null,indentation:0,inline:We,text:we,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(ye){return{f:ye.f,prevLine:ye.prevLine,thisLine:ye.thisLine,block:ye.block,htmlState:ye.htmlState&&oe.copyState(nt,ye.htmlState),indentation:ye.indentation,localMode:ye.localMode,localState:ye.localMode?oe.copyState(ye.localMode,ye.localState):null,inline:ye.inline,text:ye.text,formatting:!1,linkText:ye.linkText,linkTitle:ye.linkTitle,linkHref:ye.linkHref,code:ye.code,em:ye.em,strong:ye.strong,strikethrough:ye.strikethrough,emoji:ye.emoji,header:ye.header,setext:ye.setext,hr:ye.hr,taskList:ye.taskList,list:ye.list,listStack:ye.listStack.slice(0),quote:ye.quote,indentedCode:ye.indentedCode,trailingSpace:ye.trailingSpace,trailingSpaceNewLine:ye.trailingSpaceNewLine,md_inside:ye.md_inside,fencedEndRE:ye.fencedEndRE}},token:function(ye,he){if(he.formatting=!1,ye!=he.thisLine.stream){if(he.header=0,he.hr=!1,ye.match(/^\s*$/,!0))return ge(he),null;if(he.prevLine=he.thisLine,he.thisLine={stream:ye},he.taskList=!1,he.trailingSpace=0,he.trailingSpaceNewLine=!1,!he.localState&&(he.f=he.block,he.f!=ze)){var mt=ye.match(/^\s*/,!0)[0].replace(/\t/g,ot).length;if(he.indentation=mt,he.indentationDiff=null,mt>0)return null}}return he.f(ye,he)},innerMode:function(ye){return ye.block==ze?{state:ye.htmlState,mode:nt}:ye.localState?{state:ye.localState,mode:ye.localMode}:{state:ye,mode:Ht}},indent:function(ye,he,mt){return ye.block==ze&&nt.indent?nt.indent(ye.htmlState,he,mt):ye.localState&&ye.localMode.indent?ye.localMode.indent(ye.localState,he,mt):oe.Pass},blankLine:ge,getType:Ce,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ht},"xml"),oe.defineMIME("text/markdown","markdown"),oe.defineMIME("text/x-markdown","markdown")})},98101:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){"use strict";oe.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 Oe=0;Oe<oe.modeInfo.length;Oe++){var Me=oe.modeInfo[Oe];Me.mimes&&(Me.mime=Me.mimes[0])}oe.findModeByMIME=function(nt){nt=nt.toLowerCase();for(var xe=0;xe<oe.modeInfo.length;xe++){var ue=oe.modeInfo[xe];if(ue.mime==nt)return ue;if(ue.mimes){for(var Le=0;Le<ue.mimes.length;Le++)if(ue.mimes[Le]==nt)return ue}}if(/\+xml$/.test(nt))return oe.findModeByMIME("application/xml");if(/\+json$/.test(nt))return oe.findModeByMIME("application/json")},oe.findModeByExtension=function(nt){nt=nt.toLowerCase();for(var xe=0;xe<oe.modeInfo.length;xe++){var ue=oe.modeInfo[xe];if(ue.ext){for(var Le=0;Le<ue.ext.length;Le++)if(ue.ext[Le]==nt)return ue}}},oe.findModeByFileName=function(nt){for(var xe=0;xe<oe.modeInfo.length;xe++){var ue=oe.modeInfo[xe];if(ue.file&&ue.file.test(nt))return ue}var Le=nt.lastIndexOf("."),Xe=Le>-1&&nt.substring(Le+1,nt.length);if(Xe)return oe.findModeByExtension(Xe)},oe.findModeByName=function(nt){nt=nt.toLowerCase();for(var xe=0;xe<oe.modeInfo.length;xe++){var ue=oe.modeInfo[xe];if(ue.name.toLowerCase()==nt)return ue;if(ue.alias){for(var Le=0;Le<ue.alias.length;Le++)if(ue.alias[Le].toLowerCase()==nt)return ue}}}})},67549:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){"use strict";oe.defineMode("stex",function(Oe,Me){"use strict";function nt(je,Ze){je.cmdState.push(Ze)}function xe(je){return je.cmdState.length>0?je.cmdState[je.cmdState.length-1]:null}function ue(je){var Ze=je.cmdState.pop();Ze&&Ze.closeBracket()}function Le(je){for(var Ze=je.cmdState,Ee=Ze.length-1;Ee>=0;Ee--){var Ae=Ze[Ee];if(Ae.name!="DEFAULT")return Ae}return{styleIdentifier:function(){return null}}}function Xe(je,Ze,Ee){return function(){this.name=je,this.bracketNo=0,this.style=Ze,this.styles=Ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var be={};be.importmodule=Xe("importmodule","tag",["string","builtin"]),be.documentclass=Xe("documentclass","tag",["","atom"]),be.usepackage=Xe("usepackage","tag",["atom"]),be.begin=Xe("begin","tag",["atom"]),be.end=Xe("end","tag",["atom"]),be.label=Xe("label","tag",["atom"]),be.ref=Xe("ref","tag",["atom"]),be.eqref=Xe("eqref","tag",["atom"]),be.cite=Xe("cite","tag",["atom"]),be.bibitem=Xe("bibitem","tag",["atom"]),be.Bibitem=Xe("Bibitem","tag",["atom"]),be.RBibitem=Xe("RBibitem","tag",["atom"]),be.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pe(je,Ze){je.f=Ze}function rt(je,Ze){var Ee;if(je.match(/^\\[a-zA-Z@]+/)){var Ae=je.current().slice(1);return Ee=be.hasOwnProperty(Ae)?be[Ae]:be.DEFAULT,Ee=new Ee,nt(Ze,Ee),pe(Ze,lt),Ee.style}if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/\\]/))return"tag";if(je.match("\\["))return pe(Ze,function(st,ut){return me(st,ut,"\\]")}),"keyword";if(je.match("\\("))return pe(Ze,function(st,ut){return me(st,ut,"\\)")}),"keyword";if(je.match("$$"))return pe(Ze,function(st,ut){return me(st,ut,"$$")}),"keyword";if(je.match("$"))return pe(Ze,function(st,ut){return me(st,ut,"$")}),"keyword";var ot=je.next();if(ot=="%")return je.skipToEnd(),"comment";if(ot=="}"||ot=="]"){if(Ee=xe(Ze),Ee)Ee.closeBracket(ot),pe(Ze,lt);else return"error";return"bracket"}else return ot=="{"||ot=="["?(Ee=be.DEFAULT,Ee=new Ee,nt(Ze,Ee),"bracket"):/\d/.test(ot)?(je.eatWhile(/[\w.%]/),"atom"):(je.eatWhile(/[\w\-_]/),Ee=Le(Ze),Ee.name=="begin"&&(Ee.argument=je.current()),Ee.styleIdentifier())}function me(je,Ze,Ee){if(je.eatSpace())return null;if(Ee&&je.match(Ee))return pe(Ze,rt),"keyword";if(je.match(/^\\[a-zA-Z@]+/))return"tag";if(je.match(/^[a-zA-Z]+/))return"variable-2";if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/]/)||je.match(/^[\^_&]/))return"tag";if(je.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(je.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ae=je.next();return Ae=="{"||Ae=="}"||Ae=="["||Ae=="]"||Ae=="("||Ae==")"?"bracket":Ae=="%"?(je.skipToEnd(),"comment"):"error"}function lt(je,Ze){var Ee=je.peek(),Ae;return Ee=="{"||Ee=="["?(Ae=xe(Ze),Ae.openBracket(Ee),je.eat(Ee),pe(Ze,rt),"bracket"):/[ \t\r]/.test(Ee)?(je.eat(Ee),null):(pe(Ze,rt),ue(Ze),rt(je,Ze))}return{startState:function(){var je=Me.inMathMode?function(Ze,Ee){return me(Ze,Ee)}:rt;return{cmdState:[],f:je}},copyState:function(je){return{cmdState:je.cmdState.slice(),f:je.f}},token:function(je,Ze){return Ze.f(je,Ze)},blankLine:function(je){je.f=rt,je.cmdState.length=0},lineComment:"%"}}),oe.defineMIME("text/x-stex","stex"),oe.defineMIME("text/x-latex","stex")})},15525:function(on,nn,ce){(function(oe){oe(ce(89780))})(function(oe){"use strict";var Oe={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},Me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};oe.defineMode("xml",function(nt,xe){var ue=nt.indentUnit,Le={},Xe=xe.htmlMode?Oe:Me;for(var be in Xe)Le[be]=Xe[be];for(var be in xe)Le[be]=xe[be];var pe,rt;function me(Se,Ue){function Ne(Et){return Ue.tokenize=Et,Et(Se,Ue)}var tt=Se.next();if(tt=="<")return Se.eat("!")?Se.eat("[")?Se.match("CDATA[")?Ne(Ze("atom","]]>")):null:Se.match("--")?Ne(Ze("comment","-->")):Se.match("DOCTYPE",!0,!0)?(Se.eatWhile(/[\w\._\-]/),Ne(Ee(1))):null:Se.eat("?")?(Se.eatWhile(/[\w\._\-]/),Ue.tokenize=Ze("meta","?>"),"meta"):(pe=Se.eat("/")?"closeTag":"openTag",Ue.tokenize=lt,"tag bracket");if(tt=="&"){var Yt;return Se.eat("#")?Se.eat("x")?Yt=Se.eatWhile(/[a-fA-F\d]/)&&Se.eat(";"):Yt=Se.eatWhile(/[\d]/)&&Se.eat(";"):Yt=Se.eatWhile(/[\w\.\-:]/)&&Se.eat(";"),Yt?"atom":"error"}else return Se.eatWhile(/[^&<]/),null}me.isInText=!0;function lt(Se,Ue){var Ne=Se.next();if(Ne==">"||Ne=="/"&&Se.eat(">"))return Ue.tokenize=me,pe=Ne==">"?"endTag":"selfcloseTag","tag bracket";if(Ne=="=")return pe="equals",null;if(Ne=="<"){Ue.tokenize=me,Ue.state=ut,Ue.tagName=Ue.tagStart=null;var tt=Ue.tokenize(Se,Ue);return tt?tt+" tag error":"tag error"}else return/[\'\"]/.test(Ne)?(Ue.tokenize=je(Ne),Ue.stringStartCol=Se.column(),Ue.tokenize(Se,Ue)):(Se.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function je(Se){var Ue=function(Ne,tt){for(;!Ne.eol();)if(Ne.next()==Se){tt.tokenize=lt;break}return"string"};return Ue.isInAttribute=!0,Ue}function Ze(Se,Ue){return function(Ne,tt){for(;!Ne.eol();){if(Ne.match(Ue)){tt.tokenize=me;break}Ne.next()}return Se}}function Ee(Se){return function(Ue,Ne){for(var tt;(tt=Ue.next())!=null;){if(tt=="<")return Ne.tokenize=Ee(Se+1),Ne.tokenize(Ue,Ne);if(tt==">")if(Se==1){Ne.tokenize=me;break}else return Ne.tokenize=Ee(Se-1),Ne.tokenize(Ue,Ne)}return"meta"}}function Ae(Se,Ue,Ne){this.prev=Se.context,this.tagName=Ue,this.indent=Se.indented,this.startOfLine=Ne,(Le.doNotIndent.hasOwnProperty(Ue)||Se.context&&Se.context.noIndent)&&(this.noIndent=!0)}function ot(Se){Se.context&&(Se.context=Se.context.prev)}function st(Se,Ue){for(var Ne;;){if(!Se.context||(Ne=Se.context.tagName,!Le.contextGrabbers.hasOwnProperty(Ne)||!Le.contextGrabbers[Ne].hasOwnProperty(Ue)))return;ot(Se)}}function ut(Se,Ue,Ne){return Se=="openTag"?(Ne.tagStart=Ue.column(),Pe):Se=="closeTag"?ge:ut}function Pe(Se,Ue,Ne){return Se=="word"?(Ne.tagName=Ue.current(),rt="tag",yt):Le.allowMissingTagName&&Se=="endTag"?(rt="tag bracket",yt(Se,Ue,Ne)):(rt="error",Pe)}function ge(Se,Ue,Ne){if(Se=="word"){var tt=Ue.current();return Ne.context&&Ne.context.tagName!=tt&&Le.implicitlyClosed.hasOwnProperty(Ne.context.tagName)&&ot(Ne),Ne.context&&Ne.context.tagName==tt||Le.matchClosing===!1?(rt="tag",Be):(rt="tag error",ze)}else return Le.allowMissingTagName&&Se=="endTag"?(rt="tag bracket",Be(Se,Ue,Ne)):(rt="error",ze)}function Be(Se,Ue,Ne){return Se!="endTag"?(rt="error",Be):(ot(Ne),ut)}function ze(Se,Ue,Ne){return rt="error",Be(Se,Ue,Ne)}function yt(Se,Ue,Ne){if(Se=="word")return rt="attribute",Ce;if(Se=="endTag"||Se=="selfcloseTag"){var tt=Ne.tagName,Yt=Ne.tagStart;return Ne.tagName=Ne.tagStart=null,Se=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(tt)?st(Ne,tt):(st(Ne,tt),Ne.context=new Ae(Ne,tt,Yt==Ne.indented)),ut}return rt="error",yt}function Ce(Se,Ue,Ne){return Se=="equals"?we:(Le.allowMissing||(rt="error"),yt(Se,Ue,Ne))}function we(Se,Ue,Ne){return Se=="string"?We:Se=="word"&&Le.allowUnquoted?(rt="string",yt):(rt="error",yt(Se,Ue,Ne))}function We(Se,Ue,Ne){return Se=="string"?We:yt(Se,Ue,Ne)}return{startState:function(Se){var Ue={tokenize:me,state:ut,indented:Se||0,tagName:null,tagStart:null,context:null};return Se!=null&&(Ue.baseIndent=Se),Ue},token:function(Se,Ue){if(!Ue.tagName&&Se.sol()&&(Ue.indented=Se.indentation()),Se.eatSpace())return null;pe=null;var Ne=Ue.tokenize(Se,Ue);return(Ne||pe)&&Ne!="comment"&&(rt=null,Ue.state=Ue.state(pe||Ne,Se,Ue),rt&&(Ne=rt=="error"?Ne+" error":rt)),Ne},indent:function(Se,Ue,Ne){var tt=Se.context;if(Se.tokenize.isInAttribute)return Se.tagStart==Se.indented?Se.stringStartCol+1:Se.indented+ue;if(tt&&tt.noIndent)return oe.Pass;if(Se.tokenize!=lt&&Se.tokenize!=me)return Ne?Ne.match(/^(\s*)/)[0].length:0;if(Se.tagName)return Le.multilineTagIndentPastTag!==!1?Se.tagStart+Se.tagName.length+2:Se.tagStart+ue*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/<!\[CDATA\[/.test(Ue))return 0;var Yt=Ue&&/^<(\/)?([\w_:\.-]*)/.exec(Ue);if(Yt&&Yt[1])for(;tt;)if(tt.tagName==Yt[2]){tt=tt.prev;break}else if(Le.implicitlyClosed.hasOwnProperty(tt.tagName))tt=tt.prev;else break;else if(Yt)for(;tt;){var Et=Le.contextGrabbers[tt.tagName];if(Et&&Et.hasOwnProperty(Yt[2]))tt=tt.prev;else break}for(;tt&&tt.prev&&!tt.startOfLine;)tt=tt.prev;return tt?tt.indent+ue:Se.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(Se){Se.state==we&&(Se.state=yt)},xmlCurrentTag:function(Se){return Se.tagName?{name:Se.tagName,close:Se.type=="closeTag"}:null},xmlCurrentContext:function(Se){for(var Ue=[],Ne=Se.context;Ne;Ne=Ne.prev)Ne.tagName&&Ue.push(Ne.tagName);return Ue.reverse()}}}),oe.defineMIME("text/xml","xml"),oe.defineMIME("application/xml","xml"),oe.mimeModes.hasOwnProperty("text/html")||oe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(on,nn,ce){"use strict";ce.d(nn,{hP:function(){return Nt}});var oe=function(ae,te){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var le in re)Object.prototype.hasOwnProperty.call(re,le)&&(z[le]=re[le])})(ae,te)};function Oe(ae,te){function z(){this.constructor=ae}oe(ae,te),ae.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Me(ae,te,z,re){return new(z||(z=Promise))(function(le,ne){function de(Tt){try{wt(re.next(Tt))}catch(Te){ne(Te)}}function Re(Tt){try{wt(re.throw(Tt))}catch(Te){ne(Te)}}function wt(Tt){var Te;Tt.done?le(Tt.value):(Te=Tt.value,Te instanceof z?Te:new z(function(Ye){Ye(Te)})).then(de,Re)}wt((re=re.apply(ae,te||[])).next())})}function nt(ae,te){var z,re,le,ne,de={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Re(wt){return function(Tt){return function(Te){if(z)throw new TypeError("Generator is already executing.");for(;de;)try{if(z=1,re&&(le=2&Te[0]?re.return:Te[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,Te[1])).done)return le;switch(re=0,le&&(Te=[2&Te[0],le.value]),Te[0]){case 0:case 1:le=Te;break;case 4:return de.label++,{value:Te[1],done:!1};case 5:de.label++,re=Te[1],Te=[0];continue;case 7:Te=de.ops.pop(),de.trys.pop();continue;default:if(le=de.trys,!((le=le.length>0&&le[le.length-1])||Te[0]!==6&&Te[0]!==2)){de=0;continue}if(Te[0]===3&&(!le||Te[1]>le[0]&&Te[1]<le[3])){de.label=Te[1];break}if(Te[0]===6&&de.label<le[1]){de.label=le[1],le=Te;break}if(le&&de.label<le[2]){de.label=le[2],de.ops.push(Te);break}le[2]&&de.ops.pop(),de.trys.pop();continue}Te=te.call(ae,de)}catch(Ye){Te=[6,Ye],re=0}finally{z=le=0}if(5&Te[0])throw Te[1];return{value:Te[0]?Te[1]:void 0,done:!0}}([wt,Tt])}}}function xe(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var re=Array(ae),le=0;for(te=0;te<z;te++)for(var ne=arguments[te],de=0,Re=ne.length;de<Re;de++,le++)re[le]=ne[de];return re}var ue=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,z){for(var re=0,le=z;re<le.length;re++){var ne=le[re],de=ne[0],Re=ne[1];te.setAttribute(de,Re)}},ae.createRect=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",te.toString()),le.setAttribute("height",z.toString()),re&&ae.setAttributes(le,re),le},ae.createLine=function(te,z,re,le,ne){var de=document.createElementNS("http://www.w3.org/2000/svg","line");return de.setAttribute("x1",te.toString()),de.setAttribute("y1",z.toString()),de.setAttribute("x2",re.toString()),de.setAttribute("y2",le.toString()),ne&&ae.setAttributes(de,ne),de},ae.createPolygon=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",te),z&&ae.setAttributes(re,z),re},ae.createCircle=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(te/2).toString()),re.setAttribute("cy",(te/2).toString()),re.setAttribute("r",te.toString()),z&&ae.setAttributes(re,z),re},ae.createEllipse=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(te/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(te/2).toString()),le.setAttribute("ry",(z/2).toString()),re&&ae.setAttributes(le,re),le},ae.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ae.setAttributes(z,te),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(te,z,re,le,ne,de,Re){var wt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(wt,[["id",te],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",de.toString()]]),wt.appendChild(Re),wt},ae.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&ae.setAttributes(z,te),z},ae.createTSpan=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=te,z&&ae.setAttributes(re,z),re},ae.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ae.setAttributes(z,te),z},ae.createPoint=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=te,re.y=z,re},ae.createPath=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",te),z&&ae.setAttributes(re,z),re},ae}(),Le=function(){function ae(){}return ae.addKey=function(te){ae.key=te},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),Xe=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,re){var le=this;return new Promise(function(ne){var de=re!==void 0?re:document.createElement("canvas");te===null&&(le.markersOnly=!0,le.naturalSize=!1);var Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("width",z.width.baseVal.valueAsString),Re.setAttribute("height",z.height.baseVal.valueAsString),Re.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Re.innerHTML=z.innerHTML,le.naturalSize===!0?(Re.width.baseVal.value=te.naturalWidth,Re.height.baseVal.value=te.naturalHeight):le.width!==void 0&&le.height!==void 0&&(Re.width.baseVal.value=le.width,Re.height.baseVal.value=le.height),de.width=Re.width.baseVal.value,de.height=Re.height.baseVal.value;var wt=Re.outerHTML,Tt=de.getContext("2d");le.markersOnly!==!0&&Tt.drawImage(te,0,0,de.width,de.height);var Te=window.URL,Ye=new Image(de.width,de.height);Ye.setAttribute("crossOrigin","anonymous");var Ge=new Blob([wt],{type:"image/svg+xml"}),pt=Te.createObjectURL(Ge);Ye.onload=function(){Tt.drawImage(Ye,0,0),Te.revokeObjectURL(pt);var Rt=de.toDataURL(le.imageType,le.imageQuality);ne(Rt)},Ye.src=pt})},ae}(),be=function(){},pe=function(){function ae(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.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(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},ae.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new rt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new rt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new rt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ae.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),rt=function(ae,te){this.selector=ae,this.style=te},me=function(ae,te){this.localName=ae,this.style=te},lt=function(){function ae(te,z,re,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=le,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(te){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(ne){var de=document.createElement("div");de.className=""+z.toolbarButtonStyleClass.name,de.setAttribute("data-type-name",ne.typeName),de.innerHTML=ne.icon,de.addEventListener("click",function(){z.markerToolbarButtonClicked(de,ne)}),z.buttons.push(de),z.markerButtons.push(de)}),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 le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<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(le,'<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()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(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")},ae.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(te,z,re){var le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){le.actionToolbarButtonClicked(ne,re)}),re){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new me("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new me("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
padding: `+te+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new rt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},ae}(),je=function(){function ae(te,z,re,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=re,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new me("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new me("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new me("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new rt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new rt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ae.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(te){var z,re,le=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var de;ne.uiStyleSettings=le.uiStyleSettings;var Re=document.createElement("div");Re.className=le.toolboxButtonStyleClass.name+" "+((de=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&de!==void 0?de:le.toolboxButtonStyleColorsClass.name),Re.innerHTML=ne.icon,Re.title=ne.title,Re.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(Re),le.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var z=this,re=-1;if(te!==this.activePanel){re=this.panels.indexOf(te),this.panelRow.innerHTML="";var le=te.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),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=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,de){var Re,wt;ne.className=z.toolboxButtonStyleClass.name+" "+(de===re?""+((Re=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:z.toolboxActiveButtonStyleColorsClass.name):""+((wt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&wt!==void 0?wt:z.toolboxButtonStyleColorsClass.name))})},ae}(),Ze=function(ae,te){this.title=ae,this.icon=te},Ee=function(ae){function te(z,re,le,ne){var de=ae.call(this,z,ne||'<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 de.colors=[],de.addTransparent=!1,de.colorBoxes=[],de.colors=re,de.currentColor=le,de.setCurrentColor=de.setCurrentColor.bind(de),de.getColorBox=de.getColorBox.bind(de),de}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(le){var ne=z.getColorBox(le);re.appendChild(ne),z.colorBoxes.push(ne)}),re},te.prototype.getColorBox=function(z){var re=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,de=document.createElement("div");de.style.display="inline-block",de.style.boxSizing="content-box",de.style.width=ne-2+"px",de.style.height=ne-2+"px",de.style.padding="1px",de.style.marginRight="2px",de.style.marginBottom="2px",de.style.borderWidth="2px",de.style.borderStyle="solid",de.style.borderRadius=(ne+2)/2+"px",de.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",de.addEventListener("click",function(){re.setCurrentColor(z,de)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=ne-2+"px",Re.style.height=ne-2+"px",Re.style.backgroundColor=z,Re.style.borderRadius=ne/2+"px",z==="transparent"&&(Re.style.fill=this.uiStyleSettings.toolboxAccentColor,Re.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<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" />
|
|
</svg>`),de.appendChild(Re),de},te.prototype.setCurrentColor=function(z,re){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Ze),Ae=function(){function ae(te,z,re){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,z){},ae.prototype.dblClick=function(te,z){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,z){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),ot=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},ae}(),st=function(){function ae(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),ut=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},ae}(),Pe=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ue.createTransform()),ne.setupControlBox(),ne}return Oe(te,ae),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ue.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(z);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var de=this.container.transform.baseVal.getItem(0);de.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(de,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var re=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var re=this.manipulationStartLeft,le=this.manipulationStartWidth,ne=this.manipulationStartTop,de=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,de=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:de=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),de>=0?(this.top=ne,this.height=de):(this.top=ne+de,this.height=-de),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),le=ue.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var le=ue.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var z=ue.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ue.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ue.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 ot,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new st;return z.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,le=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,de=(this.height+this.CB_DISTANCE)/2-z/2,Re=this.height+this.CB_DISTANCE-z/2,wt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,wt,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,de),this.positionGrip(this.controlGrips.centerRight.visual,wt,de),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Re),this.positionGrip(this.controlGrips.bottomRight.visual,wt,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ut.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ut.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*z,y:le.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},te}(Ae),ge=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ue.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)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.title="Rectangle marker",te}(Pe),Be=function(ae){function te(z,re,le,ne){var de=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return de.widths=[],de.widthBoxes=[],de.widths=re,de.currentWidth=le,de.setCurrentWidth=de.setCurrentWidth.bind(de),de}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(le,ne)}),re.appendChild(ne);var de=document.createElement("div");de.innerText=le.toString(),de.style.marginRight="5px",ne.appendChild(de);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.display="flex",Re.style.alignItems="center";var wt=document.createElement("hr");wt.style.minWidth="20px",wt.style.border="0px",wt.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,wt.style.flexGrow="2",Re.appendChild(wt),ne.appendChild(Re),z.widthBoxes.push(ne)}),re},te.prototype.setCurrentWidth=function(z,re){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Ze),ze=function(ae){function te(z,re,le,ne){var de=ae.call(this,z,ne||'<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 de.styles=[],de.styleBoxes=[],de.styles=re,de.currentStyle=le,de.setCurrentStyle=de.setCurrentStyle.bind(de),de}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(le,ne)}),re.appendChild(ne);var de=document.createElement("div");de.style.minHeight="20px",de.style.flexGrow="2",de.style.overflow="hidden";var Re=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;de.innerHTML=Re,ne.appendChild(de),z.styleBoxes.push(ne)}),re},te.prototype.setCurrentStyle=function(z,re){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Ze),yt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Ee("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Oe(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(ge),Ce=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"},we=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var re=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new st;return z.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},te}(Ae),We=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Ee("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(we),Se=function(ae){function te(z,re,le,ne){var de=ae.call(this,z,ne||'<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 de.fonts=[],de.fontBoxes=[],de.fonts=re,de.currentFont=le,de.setCurrentFont=de.setCurrentFont.bind(de),de}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(le){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(le,ne)}),re.appendChild(ne);var de=document.createElement("div");de.style.display="flex",de.style.minHeight="20px",de.style.flexGrow="2",de.style.fontFamily=le,de.style.overflow="hidden";var Re=document.createElement("div");Re.style.whiteSpace="nowrap",Re.style.overflow="hidden",Re.style.textOverflow="ellipsis",Re.innerHTML="The quick brown fox jumps over the lazy dog",de.appendChild(Re),ne.appendChild(de),z.fontBoxes.push(ne)}),re},te.prototype.setCurrentFont=function(z,re){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Ze),Ue=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=le.defaultColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new Ee("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(re=!0)}),re},te.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=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(re){z.textElement.appendChild(ue.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(le,ne)}return re},te.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),le=0,ne=0;return re.width>0&&re.height>0&&(le=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:le,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),le=this.getTextPosition(re);le.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=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(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var le=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),ne={x:le.width*z,y:le.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(z,re){ae.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ue.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&ue.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.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>',te}(Pe),Ne=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=le.defaultColor,ne.lineWidth=le.defaultStrokeWidth,ne.pixelRatio=le.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new Ee("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var z=ue.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):ae.prototype.pointerDown.call(this,z,re)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,z)},te.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)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=re[0],ne=re[1],de=re[2],Re=re[3],wt=!1,Tt=0;Tt<this.canvasElement.height;Tt++)for(var Te=0;Te<this.canvasElement.width;Te++)z.data[Tt*this.canvasElement.width*4+4*Te+3]>0&&(wt=!0,Tt<ne&&(ne=Tt),Te<le&&(le=Te),Tt>Re&&(Re=Tt),Te>de&&(de=Te));if(wt){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(de-le)/this.pixelRatio,this.height=(Re-ne)/this.pixelRatio;var Ye=document.createElement("canvas");Ye.width=de-le,Ye.height=Re-ne,Ye.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,de-le,Re-ne),0,0),this.drawingImgUrl=Ye.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.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>',te}(Pe),tt=function(ae){function te(z,re,le){var ne=ae.call(this,z,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var le=function(Re){var wt="both";switch(Re){case 0:wt="both";break;case 1:wt="start";break;case 2:wt="end";break;case 3:wt="none"}var Tt=document.createElement("div");if(Tt.style.display="flex",Tt.style.flexGrow="2",Tt.style.alignItems="center",Tt.style.justifyContent="space-between",Tt.style.padding="5px",Tt.style.borderWidth="2px",Tt.style.borderStyle="solid",Tt.style.borderColor=wt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Tt.addEventListener("click",function(){z.setCurrentType(wt,Tt)}),re.appendChild(Tt),wt==="both"||wt==="start"){var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Te.style.marginLeft="5px",Tt.appendChild(Te)}var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.style.flexGrow="2";var Ge=document.createElement("hr");if(Ge.style.minWidth="20px",Ge.style.border="0px",Ge.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Ge.style.flexGrow="2",Ye.appendChild(Ge),Tt.appendChild(Ye),wt==="both"||wt==="end"){var pt=document.createElement("div");pt.style.display="flex",pt.style.alignItems="center",pt.style.minHeight="20px",pt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,pt.style.marginRight="5px",Tt.appendChild(pt)}ne.typeBoxes.push(Tt)},ne=this,de=0;de<4;de++)le(de);return re},te.prototype.setCurrentType=function(z,re){var le=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Ze),Yt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new tt("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,re){var le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+le/2)+","+(re+ne/2)},te.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(We),Et=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Ee("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Oe(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(ge),Jt=function(ae){function te(z,re,le,ne){var de=ae.call(this,z,ne||'<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 de.opacities=[],de.opacityBoxes=[],de.opacities=re,de.currentOpacity=le,de.setCurrentOpacity=de.setCurrentOpacity.bind(de),de}return Oe(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(le,ne)}),re.appendChild(ne);var de=document.createElement("div");de.innerText=100*le+"%",ne.appendChild(de),z.opacityBoxes.push(ne)}),re},te.prototype.setCurrentOpacity=function(z,re){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Ze),Ht=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new Ee("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Jt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Oe(te,ae),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.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>',te}(Et),ye='<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>',he='<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>',mt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=le.defaultStrokeColor,ne.bgColor=le.defaultFillColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new Ee("Text color",le.defaultColorSet,ne.color,ye),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Ee("Fill color",le.defaultColorSet,ne.bgColor,he),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new st,ne.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,re){this.state==="new"&&ae.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,re)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",z]]),ue.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:re+le/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+le,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-le},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-le})},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){ue.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*re},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.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>',te}(Ue),qt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new Ee("Line color",xe(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ee("Fill color",xe(le.defaultColorSet,["transparent"]),ne.fillColor,he),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Jt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ue.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)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.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>',te}(Pe),Pt=function(ae){function te(z,re,le){return ae.call(this,z,re,le)||this}return Oe(te,ae),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},te.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.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>',te}(We),Ke=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return Oe(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.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>',te}(qt),ct=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),dt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Ee("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/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()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),ae.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,ae.prototype.scale.call(this,z,re)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.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>',te}(we),yn=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.textColor=le.defaultStrokeColor,ne.fontFamily=le.defaultFontFamily,ne.fontSize=le.defaultCaptionFontSize,ne.captionText=le.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new Ee("Line color",xe(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ee("Fill color",xe(le.defaultColorSet,["transparent"]),ne.fillColor,he),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Be("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Ee("Text color",le.defaultColorSet,ne.textColor,ye),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Oe(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ue.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ue.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ue.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=ue.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()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ue.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')"]]),ue.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')"]])},te.prototype.showTextEditor=function(){var z=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(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?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"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&ue.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&ue.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ue.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,re){ae.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ue.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ue.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ue.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ue.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=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},ae.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.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>',te}(Pe),_e=function(){function ae(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),Dt=function(ae){function te(z,re,le){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return Oe(te,ae),te}(_e),Je=function(ae){function te(z,re,le){le===void 0&&(le=!1);var ne=ae.call(this,z,le)||this;return ne.marker=re,ne}return Oe(te,ae),te}(_e),Ot=function(){function ae(){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 ae.prototype.addEventListener=function(te,z){this[te].push(z)},ae.prototype.removeEventListener=function(te,z){var re=this[te].indexOf(z);re>-1&&this[te].splice(re,1)},ae}(),Nt=function(){function ae(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new ct,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.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(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[yt,Ne,Yt,Ue,Ke,qt,Ht,mt,Pt,Et,We,dt,yn]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[yt,Ne,Yt,Ue,qt,Ht,mt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[yt,Ne,Yt,Ue,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(re){if(typeof re=="string"){var le=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&be.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=be.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new _e(te))})},ae.prototype.render=function(){return Me(this,void 0,void 0,function(){var te;return nt(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Xe).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var re=!1;te||this.eventListeners.beforeclose.forEach(function(le){var ne=new _e(z,!0);le(ne),ne.defaultPrevented&&(re=!0)}),re||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(le){return le(new _e(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(te=this._availableMarkerTypes).push.apply(te,z)},ae.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(te){},ae.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ae.prototype.removeCloseEventListener=function(te){},ae.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,re)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(te,z){this._isResizing=!0;var re=te/this.imageWidth,le=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),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",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(re,le),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var re,le=this;this._currentMarker&&this._currentMarker instanceof Ue?this._currentMarker.scale(te,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._currentMarker&&ne.scale(te,z)}),re!==void 0&&this.setCurrentMarker(re)},ae.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"},ae.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},ae.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)},ae.prototype.addDefs=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=ue.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.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)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.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)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.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)},ae.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 te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.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>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.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"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var te=this.settings.uiOffsetTop!==void 0?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=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new lt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&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 je(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var ne=new Je(te,te._currentMarker,!0);le(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=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(le){return le(new Je(te,re))})}}},ae.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(de){var Re=new Je(te,void 0,!0);de(Re),Re.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(de){var Re=le.markers[de];le.setCurrentMarker(le.markers[de]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(wt){return wt(new Je(te,Re))})},le=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var te;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new _e(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new _e(te))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new _e(te))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new _e(te))}))},ae.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ae.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ae.prototype.startRenderAndClose=function(){return Me(this,void 0,void 0,function(){var te,z,re=this;return nt(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return te=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Dt(re,te,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return z.markers.push(re.getState())}),z},ae.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(re){var le=z._availableMarkerTypes.find(function(de){return de.typeName===re.typeName});if(le!==void 0){var ne=z.addNewMarker(le);ne.restoreState(re),z.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(re){return re(new _e(z))})},ae.prototype.addNewMarker=function(te){var z=ue.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(te){var z,re=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),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(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new Je(re,re._currentMarker))}))},ae.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Ne&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ne):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new Je(z,z._currentMarker))})},ae.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ae.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ae.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new Je(z,te))})},ae.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new Je(z,z._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(re){return re(new Je(z,z._currentMarker))}))},ae.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},ae.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},ae.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,z){var re=this.markerImage.getBoundingClientRect();return{x:(te-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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()},ae.prototype.addLicenseKey=function(te){Le.addKey(te)},ae.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},ae.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},ae.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new _e(te))}))},ae.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new _e(te))}))},ae.instanceCounter=0,ae}()},66042:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Ue}});var oe=ce(27247),Oe=ce(11913),Me=ce(43403),nt=ce(34280),xe=ce(59301),ue=xe.createContext(null),Le=xe.createContext({}),Xe=ue,be=ce(74430),pe=ce(32855),rt=ce(92310),me=ce.n(rt),lt=ce(77900),je=ce(10228),Ze=ce(26112),Ee=ce(43079),Ae=ce(8654),ot=["prefixCls","className","containerRef"],st=function(tt){var Yt=tt.prefixCls,Et=tt.className,Jt=tt.containerRef,Ht=(0,Ee.Z)(tt,ot),ye=xe.useContext(Le),he=ye.panel,mt=(0,Ae.x1)(he,Jt);return xe.createElement("div",(0,pe.Z)({className:me()("".concat(Yt,"-content"),Et),role:"dialog",ref:mt},(0,Ze.Z)(tt,{aria:!0}),{"aria-modal":"true"},Ht))},ut=st,Pe=ce(48736);function ge(Ne){return typeof Ne=="string"&&String(Number(Ne))===Ne?((0,Pe.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ne)):Ne}function Be(Ne){warning(!("wrapperClassName"in Ne),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ne.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ze={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function yt(Ne,tt){var Yt,Et,Jt,Ht=Ne.prefixCls,ye=Ne.open,he=Ne.placement,mt=Ne.inline,qt=Ne.push,Pt=Ne.forceRender,Ke=Ne.autoFocus,ct=Ne.keyboard,dt=Ne.classNames,yn=Ne.rootClassName,_e=Ne.rootStyle,Dt=Ne.zIndex,Je=Ne.className,Ot=Ne.id,Nt=Ne.style,ae=Ne.motion,te=Ne.width,z=Ne.height,re=Ne.children,le=Ne.mask,ne=Ne.maskClosable,de=Ne.maskMotion,Re=Ne.maskClassName,wt=Ne.maskStyle,Tt=Ne.afterOpenChange,Te=Ne.onClose,Ye=Ne.onMouseEnter,Ge=Ne.onMouseOver,pt=Ne.onMouseLeave,Rt=Ne.onClick,Vt=Ne.onKeyDown,kt=Ne.onKeyUp,ln=Ne.styles,$t=Ne.drawerRender,_t=xe.useRef(),$e=xe.useRef(),un=xe.useRef();xe.useImperativeHandle(tt,function(){return _t.current});var Mt=function(Xt){var Nn=Xt.keyCode,kr=Xt.shiftKey;switch(Nn){case je.Z.TAB:{if(Nn===je.Z.TAB){if(!kr&&document.activeElement===un.current){var gn;(gn=$e.current)===null||gn===void 0||gn.focus({preventScroll:!0})}else if(kr&&document.activeElement===$e.current){var Ln;(Ln=un.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}}break}case je.Z.ESC:{Te&&ct&&(Xt.stopPropagation(),Te(Xt));break}}};xe.useEffect(function(){if(ye&&Ke){var mn;(mn=_t.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},[ye]);var Ut=xe.useState(!1),vn=(0,Oe.Z)(Ut,2),Pn=vn[0],Kt=vn[1],kn=xe.useContext(Xe),tr;typeof qt=="boolean"?tr=qt?{}:{distance:0}:tr=qt||{};var Jn=(Yt=(Et=(Jt=tr)===null||Jt===void 0?void 0:Jt.distance)!==null&&Et!==void 0?Et:kn==null?void 0:kn.pushDistance)!==null&&Yt!==void 0?Yt:180,Ft=xe.useMemo(function(){return{pushDistance:Jn,push:function(){Kt(!0)},pull:function(){Kt(!1)}}},[Jn]);xe.useEffect(function(){if(ye){var mn;kn==null||(mn=kn.push)===null||mn===void 0||mn.call(kn)}else{var Xt;kn==null||(Xt=kn.pull)===null||Xt===void 0||Xt.call(kn)}},[ye]),xe.useEffect(function(){return function(){var mn;kn==null||(mn=kn.pull)===null||mn===void 0||mn.call(kn)}},[]);var Bt=le&&xe.createElement(lt.default,(0,pe.Z)({key:"mask"},de,{visible:ye}),function(mn,Xt){var Nn=mn.className,kr=mn.style;return xe.createElement("div",{className:me()("".concat(Ht,"-mask"),Nn,dt==null?void 0:dt.mask,Re),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},kr),wt),ln==null?void 0:ln.mask),onClick:ne&&ye?Te:void 0,ref:Xt})}),At=typeof ae=="function"?ae(he):ae,xn={};if(Pn&&Jn)switch(he){case"top":xn.transform="translateY(".concat(Jn,"px)");break;case"bottom":xn.transform="translateY(".concat(-Jn,"px)");break;case"left":xn.transform="translateX(".concat(Jn,"px)");break;default:xn.transform="translateX(".concat(-Jn,"px)");break}he==="left"||he==="right"?xn.width=ge(te):xn.height=ge(z);var wn={onMouseEnter:Ye,onMouseOver:Ge,onMouseLeave:pt,onClick:Rt,onKeyDown:Vt,onKeyUp:kt},zn=xe.createElement(lt.default,(0,pe.Z)({key:"panel"},At,{visible:ye,forceRender:Pt,onVisibleChanged:function(Xt){Tt==null||Tt(Xt)},removeOnLeave:!1,leavedClassName:"".concat(Ht,"-content-wrapper-hidden")}),function(mn,Xt){var Nn=mn.className,kr=mn.style,gn=xe.createElement(ut,(0,pe.Z)({id:Ot,containerRef:Xt,prefixCls:Ht,className:me()(Je,dt==null?void 0:dt.content),style:(0,oe.Z)((0,oe.Z)({},Nt),ln==null?void 0:ln.content)},(0,Ze.Z)(Ne,{aria:!0}),wn),re);return xe.createElement("div",(0,pe.Z)({className:me()("".concat(Ht,"-content-wrapper"),dt==null?void 0:dt.wrapper,Nn),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},xn),kr),ln==null?void 0:ln.wrapper)},(0,Ze.Z)(Ne,{data:!0})),$t?$t(gn):gn)}),rr=(0,oe.Z)({},_e);return Dt&&(rr.zIndex=Dt),xe.createElement(Xe.Provider,{value:Ft},xe.createElement("div",{className:me()(Ht,"".concat(Ht,"-").concat(he),yn,(0,be.Z)((0,be.Z)({},"".concat(Ht,"-open"),ye),"".concat(Ht,"-inline"),mt)),style:rr,tabIndex:-1,ref:_t,onKeyDown:Mt},Bt,xe.createElement("div",{tabIndex:0,ref:$e,style:ze,"aria-hidden":"true","data-sentinel":"start"}),zn,xe.createElement("div",{tabIndex:0,ref:un,style:ze,"aria-hidden":"true","data-sentinel":"end"})))}var Ce=xe.forwardRef(yt),we=Ce,We=function(tt){var Yt=tt.open,Et=Yt===void 0?!1:Yt,Jt=tt.prefixCls,Ht=Jt===void 0?"rc-drawer":Jt,ye=tt.placement,he=ye===void 0?"right":ye,mt=tt.autoFocus,qt=mt===void 0?!0:mt,Pt=tt.keyboard,Ke=Pt===void 0?!0:Pt,ct=tt.width,dt=ct===void 0?378:ct,yn=tt.mask,_e=yn===void 0?!0:yn,Dt=tt.maskClosable,Je=Dt===void 0?!0:Dt,Ot=tt.getContainer,Nt=tt.forceRender,ae=tt.afterOpenChange,te=tt.destroyOnClose,z=tt.onMouseEnter,re=tt.onMouseOver,le=tt.onMouseLeave,ne=tt.onClick,de=tt.onKeyDown,Re=tt.onKeyUp,wt=tt.panelRef,Tt=xe.useState(!1),Te=(0,Oe.Z)(Tt,2),Ye=Te[0],Ge=Te[1],pt=xe.useState(!1),Rt=(0,Oe.Z)(pt,2),Vt=Rt[0],kt=Rt[1];(0,nt.Z)(function(){kt(!0)},[]);var ln=Vt?Et:!1,$t=xe.useRef(),_t=xe.useRef();(0,nt.Z)(function(){ln&&(_t.current=document.activeElement)},[ln]);var $e=function(Pn){var Kt;if(Ge(Pn),ae==null||ae(Pn),!Pn&&_t.current&&!((Kt=$t.current)!==null&&Kt!==void 0&&Kt.contains(_t.current))){var kn;(kn=_t.current)===null||kn===void 0||kn.focus({preventScroll:!0})}},un=xe.useMemo(function(){return{panel:wt}},[wt]);if(!Nt&&!Ye&&!ln&&te)return null;var Mt={onMouseEnter:z,onMouseOver:re,onMouseLeave:le,onClick:ne,onKeyDown:de,onKeyUp:Re},Ut=(0,oe.Z)((0,oe.Z)({},tt),{},{open:ln,prefixCls:Ht,placement:he,autoFocus:qt,keyboard:Ke,width:dt,mask:_e,maskClosable:Je,inline:Ot===!1,afterOpenChange:$e,ref:$t},Mt);return xe.createElement(Le.Provider,{value:un},xe.createElement(Me.Z,{open:ln||Nt||Ye,autoDestroy:!1,getContainer:Ot,autoLock:_e&&(ln||Ye)},xe.createElement(we,Ut)))},Se=We,Ue=Se},23425:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return ze}});var oe=ce(74430),Oe=ce(32855),Me=ce(34666),nt=ce(27247),xe=ce(11913),ue=ce(92310),Le=ce.n(ue),Xe=ce(18929),be=ce(10228),pe=ce(26112),rt=ce(48736),me=ce(59301),lt=ce(17119),je=[10,20,50,100],Ze=function(Ce){var we=Ce.pageSizeOptions,We=we===void 0?je:we,Se=Ce.locale,Ue=Ce.changeSize,Ne=Ce.pageSize,tt=Ce.goButton,Yt=Ce.quickGo,Et=Ce.rootPrefixCls,Jt=Ce.disabled,Ht=Ce.buildOptionText,ye=Ce.showSizeChanger,he=Ce.sizeChangerRender,mt=me.useState(""),qt=(0,xe.Z)(mt,2),Pt=qt[0],Ke=qt[1],ct=function(){return!Pt||Number.isNaN(Pt)?void 0:Number(Pt)},dt=typeof Ht=="function"?Ht:function(z){return"".concat(z," ").concat(Se.items_per_page)},yn=function(re){Ke(re.target.value)},_e=function(re){tt||Pt===""||(Ke(""),!(re.relatedTarget&&(re.relatedTarget.className.indexOf("".concat(Et,"-item-link"))>=0||re.relatedTarget.className.indexOf("".concat(Et,"-item"))>=0))&&(Yt==null||Yt(ct())))},Dt=function(re){Pt!==""&&(re.keyCode===be.Z.ENTER||re.type==="click")&&(Ke(""),Yt==null||Yt(ct()))},Je=function(){return We.some(function(re){return re.toString()===Ne.toString()})?We:We.concat([Ne]).sort(function(re,le){var ne=Number.isNaN(Number(re))?0:Number(re),de=Number.isNaN(Number(le))?0:Number(le);return ne-de})},Ot="".concat(Et,"-options");if(!ye&&!Yt)return null;var Nt=null,ae=null,te=null;return ye&&he&&(Nt=he({disabled:Jt,size:Ne,onSizeChange:function(re){Ue==null||Ue(Number(re))},"aria-label":Se.page_size,className:"".concat(Ot,"-size-changer"),options:Je().map(function(z){return{label:dt(z),value:z}})})),Yt&&(tt&&(te=typeof tt=="boolean"?me.createElement("button",{type:"button",onClick:Dt,onKeyUp:Dt,disabled:Jt,className:"".concat(Ot,"-quick-jumper-button")},Se.jump_to_confirm):me.createElement("span",{onClick:Dt,onKeyUp:Dt},tt)),ae=me.createElement("div",{className:"".concat(Ot,"-quick-jumper")},Se.jump_to,me.createElement("input",{disabled:Jt,type:"text",value:Pt,onChange:yn,onKeyUp:Dt,onBlur:_e,"aria-label":Se.page}),Se.page,te)),me.createElement("li",{className:Ot},Nt,ae)},Ee=Ze,Ae=function(Ce){var we=Ce.rootPrefixCls,We=Ce.page,Se=Ce.active,Ue=Ce.className,Ne=Ce.showTitle,tt=Ce.onClick,Yt=Ce.onKeyPress,Et=Ce.itemRender,Jt="".concat(we,"-item"),Ht=Le()(Jt,"".concat(Jt,"-").concat(We),(0,oe.Z)((0,oe.Z)({},"".concat(Jt,"-active"),Se),"".concat(Jt,"-disabled"),!We),Ue),ye=function(){tt(We)},he=function(Pt){Yt(Pt,tt,We)},mt=Et(We,"page",me.createElement("a",{rel:"nofollow"},We));return mt?me.createElement("li",{title:Ne?String(We):null,className:Ht,onClick:ye,onKeyDown:he,tabIndex:0},mt):null},ot=Ae,st=function(Ce,we,We){return We};function ut(){}function Pe(yt){var Ce=Number(yt);return typeof Ce=="number"&&!Number.isNaN(Ce)&&isFinite(Ce)&&Math.floor(Ce)===Ce}function ge(yt,Ce,we){var We=typeof yt=="undefined"?Ce:yt;return Math.floor((we-1)/We)+1}var Be=function(Ce){var we=Ce.prefixCls,We=we===void 0?"rc-pagination":we,Se=Ce.selectPrefixCls,Ue=Se===void 0?"rc-select":Se,Ne=Ce.className,tt=Ce.current,Yt=Ce.defaultCurrent,Et=Yt===void 0?1:Yt,Jt=Ce.total,Ht=Jt===void 0?0:Jt,ye=Ce.pageSize,he=Ce.defaultPageSize,mt=he===void 0?10:he,qt=Ce.onChange,Pt=qt===void 0?ut:qt,Ke=Ce.hideOnSinglePage,ct=Ce.align,dt=Ce.showPrevNextJumpers,yn=dt===void 0?!0:dt,_e=Ce.showQuickJumper,Dt=Ce.showLessItems,Je=Ce.showTitle,Ot=Je===void 0?!0:Je,Nt=Ce.onShowSizeChange,ae=Nt===void 0?ut:Nt,te=Ce.locale,z=te===void 0?lt.Z:te,re=Ce.style,le=Ce.totalBoundaryShowSizeChanger,ne=le===void 0?50:le,de=Ce.disabled,Re=Ce.simple,wt=Ce.showTotal,Tt=Ce.showSizeChanger,Te=Tt===void 0?Ht>ne:Tt,Ye=Ce.sizeChangerRender,Ge=Ce.pageSizeOptions,pt=Ce.itemRender,Rt=pt===void 0?st:pt,Vt=Ce.jumpPrevIcon,kt=Ce.jumpNextIcon,ln=Ce.prevIcon,$t=Ce.nextIcon,_t=me.useRef(null),$e=(0,Xe.Z)(10,{value:ye,defaultValue:mt}),un=(0,xe.Z)($e,2),Mt=un[0],Ut=un[1],vn=(0,Xe.Z)(1,{value:tt,defaultValue:Et,postState:function(Qn){return Math.max(1,Math.min(Qn,ge(void 0,Mt,Ht)))}}),Pn=(0,xe.Z)(vn,2),Kt=Pn[0],kn=Pn[1],tr=me.useState(Kt),Jn=(0,xe.Z)(tr,2),Ft=Jn[0],Bt=Jn[1];(0,me.useEffect)(function(){Bt(Kt)},[Kt]);var At=Pt!==ut,xn="current"in Ce,wn=Math.max(1,Kt-(Dt?3:5)),zn=Math.min(ge(void 0,Mt,Ht),Kt+(Dt?3:5));function rr(On,Qn){var mr=On||me.createElement("button",{type:"button","aria-label":Qn,className:"".concat(We,"-item-link")});return typeof On=="function"&&(mr=me.createElement(On,(0,nt.Z)({},Ce))),mr}function mn(On){var Qn=On.target.value,mr=ge(void 0,Mt,Ht),Nr;return Qn===""?Nr=Qn:Number.isNaN(Number(Qn))?Nr=Ft:Qn>=mr?Nr=mr:Nr=Number(Qn),Nr}function Xt(On){return Pe(On)&&On!==Kt&&Pe(Ht)&&Ht>0}var Nn=Ht>Mt?_e:!1;function kr(On){(On.keyCode===be.Z.UP||On.keyCode===be.Z.DOWN)&&On.preventDefault()}function gn(On){var Qn=mn(On);switch(Qn!==Ft&&Bt(Qn),On.keyCode){case be.Z.ENTER:_n(Qn);break;case be.Z.UP:_n(Qn-1);break;case be.Z.DOWN:_n(Qn+1);break;default:break}}function Ln(On){_n(mn(On))}function Mn(On){var Qn=ge(On,Mt,Ht),mr=Kt>Qn&&Qn!==0?Qn:Kt;Ut(On),Bt(mr),ae==null||ae(Kt,On),kn(mr),Pt==null||Pt(mr,On)}function _n(On){if(Xt(On)&&!de){var Qn=ge(void 0,Mt,Ht),mr=On;return On>Qn?mr=Qn:On<1&&(mr=1),mr!==Ft&&Bt(mr),kn(mr),Pt==null||Pt(mr,Mt),mr}return Kt}var Tr=Kt>1,xr=Kt<ge(void 0,Mt,Ht);function Hr(){Tr&&_n(Kt-1)}function br(){xr&&_n(Kt+1)}function or(){_n(wn)}function Fr(){_n(zn)}function dn(On,Qn){if(On.key==="Enter"||On.charCode===be.Z.ENTER||On.keyCode===be.Z.ENTER){for(var mr=arguments.length,Nr=new Array(mr>2?mr-2:0),Ar=2;Ar<mr;Ar++)Nr[Ar-2]=arguments[Ar];Qn.apply(void 0,Nr)}}function St(On){dn(On,Hr)}function cn(On){dn(On,br)}function nr(On){dn(On,or)}function Er(On){dn(On,Fr)}function Fe(On){var Qn=Rt(On,"prev",rr(ln,"prev page"));return me.isValidElement(Qn)?me.cloneElement(Qn,{disabled:!Tr}):Qn}function He(On){var Qn=Rt(On,"next",rr($t,"next page"));return me.isValidElement(Qn)?me.cloneElement(Qn,{disabled:!xr}):Qn}function rn(On){(On.type==="click"||On.keyCode===be.Z.ENTER)&&_n(Ft)}var zt=null,Qe=(0,pe.Z)(Ce,{aria:!0,data:!0}),jt=wt&&me.createElement("li",{className:"".concat(We,"-total-text")},wt(Ht,[Ht===0?0:(Kt-1)*Mt+1,Kt*Mt>Ht?Ht:Kt*Mt])),sn=null,hn=ge(void 0,Mt,Ht);if(Ke&&Ht<=Mt)return null;var bn=[],pn={rootPrefixCls:We,onClick:_n,onKeyPress:dn,showTitle:Ot,itemRender:Rt,page:-1},Cn=Kt-1>0?Kt-1:0,Ve=Kt+1<hn?Kt+1:hn,Vn=_e&&_e.goButton,Sn=(0,Me.Z)(Re)==="object"?Re.readOnly:!Re,Fn=Vn,Hn=null;Re&&(Vn&&(typeof Vn=="boolean"?Fn=me.createElement("button",{type:"button",onClick:rn,onKeyUp:rn},z.jump_to_confirm):Fn=me.createElement("span",{onClick:rn,onKeyUp:rn},Vn),Fn=me.createElement("li",{title:Ot?"".concat(z.jump_to).concat(Kt,"/").concat(hn):null,className:"".concat(We,"-simple-pager")},Fn)),Hn=me.createElement("li",{title:Ot?"".concat(Kt,"/").concat(hn):null,className:"".concat(We,"-simple-pager")},Sn?Ft:me.createElement("input",{type:"text","aria-label":z.jump_to,value:Ft,disabled:de,onKeyDown:kr,onKeyUp:gn,onChange:gn,onBlur:Ln,size:3}),me.createElement("span",{className:"".concat(We,"-slash")},"/"),hn));var Yn=Dt?1:2;if(hn<=3+Yn*2){hn||bn.push(me.createElement(ot,(0,Oe.Z)({},pn,{key:"noPager",page:1,className:"".concat(We,"-item-disabled")})));for(var ar=1;ar<=hn;ar+=1)bn.push(me.createElement(ot,(0,Oe.Z)({},pn,{key:ar,page:ar,active:Kt===ar})))}else{var zr=Dt?z.prev_3:z.prev_5,Cr=Dt?z.next_3:z.next_5,dr=Rt(wn,"jump-prev",rr(Vt,"prev page")),Zr=Rt(zn,"jump-next",rr(kt,"next page"));yn&&(zt=dr?me.createElement("li",{title:Ot?zr:null,key:"prev",onClick:or,tabIndex:0,onKeyDown:nr,className:Le()("".concat(We,"-jump-prev"),(0,oe.Z)({},"".concat(We,"-jump-prev-custom-icon"),!!Vt))},dr):null,sn=Zr?me.createElement("li",{title:Ot?Cr:null,key:"next",onClick:Fr,tabIndex:0,onKeyDown:Er,className:Le()("".concat(We,"-jump-next"),(0,oe.Z)({},"".concat(We,"-jump-next-custom-icon"),!!kt))},Zr):null);var ur=Math.max(1,Kt-Yn),jr=Math.min(Kt+Yn,hn);Kt-1<=Yn&&(jr=1+Yn*2),hn-Kt<=Yn&&(ur=hn-Yn*2);for(var $r=ur;$r<=jr;$r+=1)bn.push(me.createElement(ot,(0,Oe.Z)({},pn,{key:$r,page:$r,active:Kt===$r})));if(Kt-1>=Yn*2&&Kt!==3&&(bn[0]=me.cloneElement(bn[0],{className:Le()("".concat(We,"-item-after-jump-prev"),bn[0].props.className)}),bn.unshift(zt)),hn-Kt>=Yn*2&&Kt!==hn-2){var Ur=bn[bn.length-1];bn[bn.length-1]=me.cloneElement(Ur,{className:Le()("".concat(We,"-item-before-jump-next"),Ur.props.className)}),bn.push(sn)}ur!==1&&bn.unshift(me.createElement(ot,(0,Oe.Z)({},pn,{key:1,page:1}))),jr!==hn&&bn.push(me.createElement(ot,(0,Oe.Z)({},pn,{key:hn,page:hn})))}var Gr=Fe(Cn);if(Gr){var Yr=!Tr||!hn;Gr=me.createElement("li",{title:Ot?z.prev_page:null,onClick:Hr,tabIndex:Yr?null:0,onKeyDown:St,className:Le()("".concat(We,"-prev"),(0,oe.Z)({},"".concat(We,"-disabled"),Yr)),"aria-disabled":Yr},Gr)}var Vr=He(Ve);if(Vr){var Mr,qr;Re?(Mr=!xr,qr=Tr?0:null):(Mr=!xr||!hn,qr=Mr?null:0),Vr=me.createElement("li",{title:Ot?z.next_page:null,onClick:br,tabIndex:qr,onKeyDown:cn,className:Le()("".concat(We,"-next"),(0,oe.Z)({},"".concat(We,"-disabled"),Mr)),"aria-disabled":Mr},Vr)}var Kr=Le()(We,Ne,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(We,"-start"),ct==="start"),"".concat(We,"-center"),ct==="center"),"".concat(We,"-end"),ct==="end"),"".concat(We,"-simple"),Re),"".concat(We,"-disabled"),de));return me.createElement("ul",(0,Oe.Z)({className:Kr,style:re,ref:_t},Qe),jt,Gr,Re?Hn:bn,Vr,me.createElement(Ee,{locale:z,rootPrefixCls:We,disabled:de,selectPrefixCls:Ue,changeSize:Mn,pageSize:Mt,pageSizeOptions:Ge,quickGo:Nn?_n:null,goButton:Fn,showSizeChanger:Te,sizeChangerRender:Ye}))},ze=Be},6551:function(on,nn,ce){"use strict";ce.d(nn,{ZP:function(){return Le}});var oe=ce(11913),Oe=ce(59301),Me=ce(47273),nt=0,xe=(0,Me.Z)();function ue(){var Xe;return xe?(Xe=nt,nt+=1):Xe="TEST_OR_SSR",Xe}function Le(Xe){var be=Oe.useState(),pe=(0,oe.Z)(be,2),rt=pe[0],me=pe[1];return Oe.useEffect(function(){me("rc_select_".concat(ue()))},[]),Xe||rt}},37463:function(on,nn,ce){"use strict";ce.d(nn,{Ac:function(){return $e},Xo:function(){return Mt},Wx:function(){return vn},ZP:function(){return Er},lk:function(){return ut}});var oe=ce(32855),Oe=ce(3300),Me=ce(74430),nt=ce(27247),xe=ce(11913),ue=ce(43079),Le=ce(34666),Xe=ce(18929),be=ce(48736),pe=ce(59301),rt=ce(92310),me=ce.n(rt),lt=ce(34280),je=ce(49658),Ze=ce(8654),Ee=function(He){var rn=He.className,zt=He.customizeIcon,Qe=He.customizeIconProps,jt=He.children,sn=He.onMouseDown,hn=He.onClick,bn=typeof zt=="function"?zt(Qe):zt;return pe.createElement("span",{className:rn,onMouseDown:function(Cn){Cn.preventDefault(),sn==null||sn(Cn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:hn,"aria-hidden":!0},bn!==void 0?bn:pe.createElement("span",{className:me()(rn.split(/\s+/).map(function(pn){return"".concat(pn,"-icon")}))},jt))},Ae=Ee,ot=function(He,rn,zt,Qe,jt){var sn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,hn=arguments.length>6?arguments[6]:void 0,bn=arguments.length>7?arguments[7]:void 0,pn=pe.useMemo(function(){if((0,Le.Z)(Qe)==="object")return Qe.clearIcon;if(jt)return jt},[Qe,jt]),Cn=pe.useMemo(function(){return!!(!sn&&Qe&&(zt.length||hn)&&!(bn==="combobox"&&hn===""))},[Qe,sn,zt.length,hn,bn]);return{allowClear:Cn,clearIcon:pe.createElement(Ae,{className:"".concat(He,"-clear"),onMouseDown:rn,customizeIcon:pn},"\xD7")}},st=pe.createContext(null);function ut(){return pe.useContext(st)}function Pe(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,He=pe.useState(!1),rn=(0,xe.Z)(He,2),zt=rn[0],Qe=rn[1],jt=pe.useRef(null),sn=function(){window.clearTimeout(jt.current)};pe.useEffect(function(){return sn},[]);var hn=function(pn,Cn){sn(),jt.current=window.setTimeout(function(){Qe(pn),Cn&&Cn()},Fe)};return[zt,hn,sn]}function ge(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,He=pe.useRef(null),rn=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(rn.current)}},[]);function zt(Qe){(Qe||He.current===null)&&(He.current=Qe),window.clearTimeout(rn.current),rn.current=window.setTimeout(function(){He.current=null},Fe)}return[function(){return He.current},zt]}function Be(Fe,He,rn,zt){var Qe=pe.useRef(null);Qe.current={open:He,triggerOpen:rn,customizedTrigger:zt},pe.useEffect(function(){function jt(sn){var hn;if(!((hn=Qe.current)!==null&&hn!==void 0&&hn.customizedTrigger)){var bn=sn.target;bn.shadowRoot&&sn.composed&&(bn=sn.composedPath()[0]||bn),Qe.current.open&&Fe().filter(function(pn){return pn}).every(function(pn){return!pn.contains(bn)&&pn!==bn})&&Qe.current.triggerOpen(!1)}}return window.addEventListener("mousedown",jt),function(){return window.removeEventListener("mousedown",jt)}},[])}var ze=ce(10228);function yt(Fe){return Fe&&![ze.Z.ESC,ze.Z.SHIFT,ze.Z.BACKSPACE,ze.Z.TAB,ze.Z.WIN_KEY,ze.Z.ALT,ze.Z.META,ze.Z.WIN_KEY_RIGHT,ze.Z.CTRL,ze.Z.SEMICOLON,ze.Z.EQUALS,ze.Z.CAPS_LOCK,ze.Z.CONTEXT_MENU,ze.Z.F1,ze.Z.F2,ze.Z.F3,ze.Z.F4,ze.Z.F5,ze.Z.F6,ze.Z.F7,ze.Z.F8,ze.Z.F9,ze.Z.F10,ze.Z.F11,ze.Z.F12].includes(Fe)}var Ce=ce(26112),we=ce(11780);function We(Fe,He,rn){var zt=(0,nt.Z)((0,nt.Z)({},Fe),rn?He:{});return Object.keys(He).forEach(function(Qe){var jt=He[Qe];typeof jt=="function"&&(zt[Qe]=function(){for(var sn,hn=arguments.length,bn=new Array(hn),pn=0;pn<hn;pn++)bn[pn]=arguments[pn];return jt.apply(void 0,bn),(sn=Fe[Qe])===null||sn===void 0?void 0:sn.call.apply(sn,[Fe].concat(bn))})}),zt}var Se=We,Ue=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ne=function(He,rn){var zt=He.prefixCls,Qe=He.id,jt=He.inputElement,sn=He.autoFocus,hn=He.autoComplete,bn=He.editable,pn=He.activeDescendantId,Cn=He.value,Ve=He.open,Vn=He.attrs,Sn=(0,ue.Z)(He,Ue),Fn=jt||pe.createElement("input",null),Hn=Fn,Yn=Hn.ref,ar=Hn.props;return(0,be.Kp)(!("maxLength"in Fn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Fn=pe.cloneElement(Fn,(0,nt.Z)((0,nt.Z)((0,nt.Z)({type:"search"},Se(Sn,ar,!0)),{},{id:Qe,ref:(0,Ze.sQ)(rn,Yn),autoComplete:hn||"off",autoFocus:sn,className:me()("".concat(zt,"-selection-search-input"),ar==null?void 0:ar.className),role:"combobox","aria-expanded":Ve||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Qe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Qe,"_list"),"aria-activedescendant":Ve?pn:void 0},Vn),{},{value:bn?Cn:"",readOnly:!bn,unselectable:bn?null:"on",style:(0,nt.Z)((0,nt.Z)({},ar.style),{},{opacity:bn?null:0})})),Fn},tt=pe.forwardRef(Ne),Yt=tt;function Et(Fe){return Array.isArray(Fe)?Fe:Fe!==void 0?[Fe]:[]}var Jt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ht=Jt;function ye(Fe){return Fe!=null}function he(Fe){return!Fe&&Fe!==0}function mt(Fe){return["string","number"].includes((0,Le.Z)(Fe))}function qt(Fe){var He=void 0;return Fe&&(mt(Fe.title)?He=Fe.title.toString():mt(Fe.label)&&(He=Fe.label.toString())),He}function Pt(Fe,He){Ht?pe.useLayoutEffect(Fe,He):pe.useEffect(Fe,He)}function Ke(Fe){var He;return(He=Fe.key)!==null&&He!==void 0?He:Fe.value}var ct=function(He){He.preventDefault(),He.stopPropagation()},dt=function(He){var rn=He.id,zt=He.prefixCls,Qe=He.values,jt=He.open,sn=He.searchValue,hn=He.autoClearSearchValue,bn=He.inputRef,pn=He.placeholder,Cn=He.disabled,Ve=He.mode,Vn=He.showSearch,Sn=He.autoFocus,Fn=He.autoComplete,Hn=He.activeDescendantId,Yn=He.tabIndex,ar=He.removeIcon,zr=He.maxTagCount,Cr=He.maxTagTextLength,dr=He.maxTagPlaceholder,Zr=dr===void 0?function(Ct){return"+ ".concat(Ct.length," ...")}:dr,ur=He.tagRender,jr=He.onToggleOpen,$r=He.onRemove,Ur=He.onInputChange,Gr=He.onInputPaste,Yr=He.onInputKeyDown,Vr=He.onInputMouseDown,Mr=He.onInputCompositionStart,qr=He.onInputCompositionEnd,Kr=He.onInputBlur,On=pe.useRef(null),Qn=(0,pe.useState)(0),mr=(0,xe.Z)(Qn,2),Nr=mr[0],Ar=mr[1],Or=(0,pe.useState)(!1),si=(0,xe.Z)(Or,2),ke=si[0],at=si[1],qe="".concat(zt,"-selection"),ft=jt||Ve==="multiple"&&hn===!1||Ve==="tags"?sn:"",vt=Ve==="tags"||Ve==="multiple"&&hn===!1||Vn&&(jt||ke);Pt(function(){Ar(On.current.scrollWidth)},[ft]);var It=function(bt,Zt,gt,Lt,Wt){return pe.createElement("span",{title:qt(bt),className:me()("".concat(qe,"-item"),(0,Me.Z)({},"".concat(qe,"-item-disabled"),gt))},pe.createElement("span",{className:"".concat(qe,"-item-content")},Zt),Lt&&pe.createElement(Ae,{className:"".concat(qe,"-item-remove"),onMouseDown:ct,onClick:Wt,customizeIcon:ar},"\xD7"))},an=function(bt,Zt,gt,Lt,Wt,Qt){var Tn=function(Gn){ct(Gn),jr(!jt)};return pe.createElement("span",{onMouseDown:Tn},ur({label:Zt,value:bt,disabled:gt,closable:Lt,onClose:Wt,isMaxTag:!!Qt}))},en=function(bt){var Zt=bt.disabled,gt=bt.label,Lt=bt.value,Wt=!Cn&&!Zt,Qt=gt;if(typeof Cr=="number"&&(typeof gt=="string"||typeof gt=="number")){var Tn=String(Qt);Tn.length>Cr&&(Qt="".concat(Tn.slice(0,Cr),"..."))}var Dn=function(An){An&&An.stopPropagation(),$r(bt)};return typeof ur=="function"?an(Lt,Qt,Zt,Wt,Dn):It(bt,Qt,Zt,Wt,Dn)},Gt=function(bt){if(!Qe.length)return null;var Zt=typeof Zr=="function"?Zr(bt):Zr;return typeof ur=="function"?an(void 0,Zt,!1,!1,void 0,!0):It({title:Zt},Zt,!1)},et=pe.createElement("div",{className:"".concat(qe,"-search"),style:{width:Nr},onFocus:function(){at(!0)},onBlur:function(){at(!1)}},pe.createElement(Yt,{ref:bn,open:jt,prefixCls:zt,id:rn,inputElement:null,disabled:Cn,autoFocus:Sn,autoComplete:Fn,editable:vt,activeDescendantId:Hn,value:ft,onKeyDown:Yr,onMouseDown:Vr,onChange:Ur,onPaste:Gr,onCompositionStart:Mr,onCompositionEnd:qr,onBlur:Kr,tabIndex:Yn,attrs:(0,Ce.Z)(He,!0)}),pe.createElement("span",{ref:On,className:"".concat(qe,"-search-mirror"),"aria-hidden":!0},ft,"\xA0")),xt=pe.createElement(we.Z,{prefixCls:"".concat(qe,"-overflow"),data:Qe,renderItem:en,renderRest:Gt,suffix:et,itemKey:Ke,maxCount:zr});return pe.createElement("span",{className:"".concat(qe,"-wrap")},xt,!Qe.length&&!ft&&pe.createElement("span",{className:"".concat(qe,"-placeholder")},pn))},yn=dt,_e=function(He){var rn=He.inputElement,zt=He.prefixCls,Qe=He.id,jt=He.inputRef,sn=He.disabled,hn=He.autoFocus,bn=He.autoComplete,pn=He.activeDescendantId,Cn=He.mode,Ve=He.open,Vn=He.values,Sn=He.placeholder,Fn=He.tabIndex,Hn=He.showSearch,Yn=He.searchValue,ar=He.activeValue,zr=He.maxLength,Cr=He.onInputKeyDown,dr=He.onInputMouseDown,Zr=He.onInputChange,ur=He.onInputPaste,jr=He.onInputCompositionStart,$r=He.onInputCompositionEnd,Ur=He.onInputBlur,Gr=He.title,Yr=pe.useState(!1),Vr=(0,xe.Z)(Yr,2),Mr=Vr[0],qr=Vr[1],Kr=Cn==="combobox",On=Kr||Hn,Qn=Vn[0],mr=Yn||"";Kr&&ar&&!Mr&&(mr=ar),pe.useEffect(function(){Kr&&qr(!1)},[Kr,ar]);var Nr=Cn!=="combobox"&&!Ve&&!Hn?!1:!!mr,Ar=Gr===void 0?qt(Qn):Gr,Or=pe.useMemo(function(){return Qn?null:pe.createElement("span",{className:"".concat(zt,"-selection-placeholder"),style:Nr?{visibility:"hidden"}:void 0},Sn)},[Qn,Nr,Sn,zt]);return pe.createElement("span",{className:"".concat(zt,"-selection-wrap")},pe.createElement("span",{className:"".concat(zt,"-selection-search")},pe.createElement(Yt,{ref:jt,prefixCls:zt,id:Qe,open:Ve,inputElement:rn,disabled:sn,autoFocus:hn,autoComplete:bn,editable:On,activeDescendantId:pn,value:mr,onKeyDown:Cr,onMouseDown:dr,onChange:function(ke){qr(!0),Zr(ke)},onPaste:ur,onCompositionStart:jr,onCompositionEnd:$r,onBlur:Ur,tabIndex:Fn,attrs:(0,Ce.Z)(He,!0),maxLength:Kr?zr:void 0})),!Kr&&Qn?pe.createElement("span",{className:"".concat(zt,"-selection-item"),title:Ar,style:Nr?{visibility:"hidden"}:void 0},Qn.label):null,Or)},Dt=_e,Je=function(He,rn){var zt=(0,pe.useRef)(null),Qe=(0,pe.useRef)(!1),jt=He.prefixCls,sn=He.open,hn=He.mode,bn=He.showSearch,pn=He.tokenWithEnter,Cn=He.disabled,Ve=He.prefix,Vn=He.autoClearSearchValue,Sn=He.onSearch,Fn=He.onSearchSubmit,Hn=He.onToggleOpen,Yn=He.onInputKeyDown,ar=He.onInputBlur,zr=He.domRef;pe.useImperativeHandle(rn,function(){return{focus:function(Ar){zt.current.focus(Ar)},blur:function(){zt.current.blur()}}});var Cr=ge(0),dr=(0,xe.Z)(Cr,2),Zr=dr[0],ur=dr[1],jr=function(Ar){var Or=Ar.which,si=zt.current instanceof HTMLTextAreaElement;!si&&sn&&(Or===ze.Z.UP||Or===ze.Z.DOWN)&&Ar.preventDefault(),Yn&&Yn(Ar),Or===ze.Z.ENTER&&hn==="tags"&&!Qe.current&&!sn&&(Fn==null||Fn(Ar.target.value)),!(si&&!sn&&~[ze.Z.UP,ze.Z.DOWN,ze.Z.LEFT,ze.Z.RIGHT].indexOf(Or))&&yt(Or)&&Hn(!0)},$r=function(){ur(!0)},Ur=(0,pe.useRef)(null),Gr=function(Ar){Sn(Ar,!0,Qe.current)!==!1&&Hn(!0)},Yr=function(){Qe.current=!0},Vr=function(Ar){Qe.current=!1,hn!=="combobox"&&Gr(Ar.target.value)},Mr=function(Ar){var Or=Ar.target.value;if(pn&&Ur.current&&/[\r\n]/.test(Ur.current)){var si=Ur.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Or=Or.replace(si,Ur.current)}Ur.current=null,Gr(Or)},qr=function(Ar){var Or=Ar.clipboardData,si=Or==null?void 0:Or.getData("text");Ur.current=si||""},Kr=function(Ar){var Or=Ar.target;if(Or!==zt.current){var si=document.body.style.msTouchAction!==void 0;si?setTimeout(function(){zt.current.focus()}):zt.current.focus()}},On=function(Ar){var Or=Zr();Ar.target!==zt.current&&!Or&&!(hn==="combobox"&&Cn)&&Ar.preventDefault(),(hn!=="combobox"&&(!bn||!Or)||!sn)&&(sn&&Vn!==!1&&Sn("",!0,!1),Hn())},Qn={inputRef:zt,onInputKeyDown:jr,onInputMouseDown:$r,onInputChange:Mr,onInputPaste:qr,onInputCompositionStart:Yr,onInputCompositionEnd:Vr,onInputBlur:ar},mr=hn==="multiple"||hn==="tags"?pe.createElement(yn,(0,oe.Z)({},He,Qn)):pe.createElement(Dt,(0,oe.Z)({},He,Qn));return pe.createElement("div",{ref:zr,className:"".concat(jt,"-selector"),onClick:Kr,onMouseDown:On},Ve&&pe.createElement("div",{className:"".concat(jt,"-prefix")},Ve),mr)},Ot=pe.forwardRef(Je),Nt=Ot,ae=ce(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(He){var rn=He===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:rn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:rn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:rn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:rn,adjustY:1},htmlRegion:"scroll"}}},re=function(He,rn){var zt=He.prefixCls,Qe=He.disabled,jt=He.visible,sn=He.children,hn=He.popupElement,bn=He.animation,pn=He.transitionName,Cn=He.dropdownStyle,Ve=He.dropdownClassName,Vn=He.direction,Sn=Vn===void 0?"ltr":Vn,Fn=He.placement,Hn=He.builtinPlacements,Yn=He.dropdownMatchSelectWidth,ar=He.dropdownRender,zr=He.dropdownAlign,Cr=He.getPopupContainer,dr=He.empty,Zr=He.getTriggerDOMNode,ur=He.onPopupVisibleChange,jr=He.onPopupMouseEnter,$r=(0,ue.Z)(He,te),Ur="".concat(zt,"-dropdown"),Gr=hn;ar&&(Gr=ar(hn));var Yr=pe.useMemo(function(){return Hn||z(Yn)},[Hn,Yn]),Vr=bn?"".concat(Ur,"-").concat(bn):pn,Mr=typeof Yn=="number",qr=pe.useMemo(function(){return Mr?null:Yn===!1?"minWidth":"width"},[Yn,Mr]),Kr=Cn;Mr&&(Kr=(0,nt.Z)((0,nt.Z)({},Kr),{},{width:Yn}));var On=pe.useRef(null);return pe.useImperativeHandle(rn,function(){return{getPopupElement:function(){var mr;return(mr=On.current)===null||mr===void 0?void 0:mr.popupElement}}}),pe.createElement(ae.Z,(0,oe.Z)({},$r,{showAction:ur?["click"]:[],hideAction:ur?["click"]:[],popupPlacement:Fn||(Sn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Yr,prefixCls:Ur,popupTransitionName:Vr,popup:pe.createElement("div",{onMouseEnter:jr},Gr),ref:On,stretch:qr,popupAlign:zr,popupVisible:jt,getPopupContainer:Cr,popupClassName:me()(Ve,(0,Me.Z)({},"".concat(Ur,"-empty"),dr)),popupStyle:Kr,getTriggerDOMNode:Zr,onPopupVisibleChange:ur}),sn)},le=pe.forwardRef(re),ne=le,de=ce(40954);function Re(Fe,He){var rn=Fe.key,zt;return"value"in Fe&&(zt=Fe.value),rn!=null?rn:zt!==void 0?zt:"rc-index-key-".concat(He)}function wt(Fe){return typeof Fe!="undefined"&&!Number.isNaN(Fe)}function Tt(Fe,He){var rn=Fe||{},zt=rn.label,Qe=rn.value,jt=rn.options,sn=rn.groupLabel,hn=zt||(He?"children":"label");return{label:hn,value:Qe||"value",options:jt||"options",groupLabel:sn||hn}}function Te(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rn=He.fieldNames,zt=He.childrenAsData,Qe=[],jt=Tt(rn,!1),sn=jt.label,hn=jt.value,bn=jt.options,pn=jt.groupLabel;function Cn(Ve,Vn){Array.isArray(Ve)&&Ve.forEach(function(Sn){if(Vn||!(bn in Sn)){var Fn=Sn[hn];Qe.push({key:Re(Sn,Qe.length),groupOption:Vn,data:Sn,label:Sn[sn],value:Fn})}else{var Hn=Sn[pn];Hn===void 0&&zt&&(Hn=Sn.label),Qe.push({key:Re(Sn,Qe.length),group:!0,data:Sn,label:Hn}),Cn(Sn[bn],!0)}})}return Cn(Fe,!1),Qe}function Ye(Fe){var He=(0,nt.Z)({},Fe);return"props"in He||Object.defineProperty(He,"props",{get:function(){return(0,be.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),He}}),He}var Ge=function(He,rn,zt){if(!rn||!rn.length)return null;var Qe=!1,jt=function hn(bn,pn){var Cn=(0,de.Z)(pn),Ve=Cn[0],Vn=Cn.slice(1);if(!Ve)return[bn];var Sn=bn.split(Ve);return Qe=Qe||Sn.length>1,Sn.reduce(function(Fn,Hn){return[].concat((0,Oe.Z)(Fn),(0,Oe.Z)(hn(Hn,Vn)))},[]).filter(Boolean)},sn=jt(He,rn);return Qe?typeof zt!="undefined"?sn.slice(0,zt):sn:null},pt=pe.createContext(null),Rt=pt;function Vt(Fe){var He=Fe.visible,rn=Fe.values;if(!He)return null;var zt=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(rn.slice(0,zt).map(function(Qe){var jt=Qe.label,sn=Qe.value;return["number","string"].includes((0,Le.Z)(jt))?jt:sn}).join(", ")),rn.length>zt?", ...":null)}var kt=["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"],ln=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],$t=function(He){return He==="tags"||He==="multiple"},_t=pe.forwardRef(function(Fe,He){var rn,zt=Fe.id,Qe=Fe.prefixCls,jt=Fe.className,sn=Fe.showSearch,hn=Fe.tagRender,bn=Fe.direction,pn=Fe.omitDomProps,Cn=Fe.displayValues,Ve=Fe.onDisplayValuesChange,Vn=Fe.emptyOptions,Sn=Fe.notFoundContent,Fn=Sn===void 0?"Not Found":Sn,Hn=Fe.onClear,Yn=Fe.mode,ar=Fe.disabled,zr=Fe.loading,Cr=Fe.getInputElement,dr=Fe.getRawInputElement,Zr=Fe.open,ur=Fe.defaultOpen,jr=Fe.onDropdownVisibleChange,$r=Fe.activeValue,Ur=Fe.onActiveValueChange,Gr=Fe.activeDescendantId,Yr=Fe.searchValue,Vr=Fe.autoClearSearchValue,Mr=Fe.onSearch,qr=Fe.onSearchSplit,Kr=Fe.tokenSeparators,On=Fe.allowClear,Qn=Fe.prefix,mr=Fe.suffixIcon,Nr=Fe.clearIcon,Ar=Fe.OptionList,Or=Fe.animation,si=Fe.transitionName,ke=Fe.dropdownStyle,at=Fe.dropdownClassName,qe=Fe.dropdownMatchSelectWidth,ft=Fe.dropdownRender,vt=Fe.dropdownAlign,It=Fe.placement,an=Fe.builtinPlacements,en=Fe.getPopupContainer,Gt=Fe.showAction,et=Gt===void 0?[]:Gt,xt=Fe.onFocus,Ct=Fe.onBlur,bt=Fe.onKeyUp,Zt=Fe.onKeyDown,gt=Fe.onMouseDown,Lt=(0,ue.Z)(Fe,kt),Wt=$t(Yn),Qt=(sn!==void 0?sn:Wt)||Yn==="combobox",Tn=(0,nt.Z)({},Lt);ln.forEach(function(Ir){delete Tn[Ir]}),pn==null||pn.forEach(function(Ir){delete Tn[Ir]});var Dn=pe.useState(!1),Gn=(0,xe.Z)(Dn,2),An=Gn[0],Xn=Gn[1];pe.useEffect(function(){Xn((0,je.Z)())},[]);var qn=pe.useRef(null),fr=pe.useRef(null),er=pe.useRef(null),gr=pe.useRef(null),Dr=pe.useRef(null),hr=pe.useRef(!1),wr=Pe(),$n=(0,xe.Z)(wr,3),In=$n[0],jn=$n[1],Zn=$n[2];pe.useImperativeHandle(He,function(){var Ir,Pr;return{focus:(Ir=gr.current)===null||Ir===void 0?void 0:Ir.focus,blur:(Pr=gr.current)===null||Pr===void 0?void 0:Pr.blur,scrollTo:function(pi){var bi;return(bi=Dr.current)===null||bi===void 0?void 0:bi.scrollTo(pi)},nativeElement:qn.current||fr.current}});var yr=pe.useMemo(function(){var Ir;if(Yn!=="combobox")return Yr;var Pr=(Ir=Cn[0])===null||Ir===void 0?void 0:Ir.value;return typeof Pr=="string"||typeof Pr=="number"?String(Pr):""},[Yr,Yn,Cn]),pr=Yn==="combobox"&&typeof Cr=="function"&&Cr()||null,Sr=typeof dr=="function"&&dr(),Xr=(0,Ze.x1)(fr,Sr==null||(rn=Sr.props)===null||rn===void 0?void 0:rn.ref),wi=pe.useState(!1),oi=(0,xe.Z)(wi,2),ji=oi[0],Li=oi[1];(0,lt.Z)(function(){Li(!0)},[]);var Jr=(0,Xe.Z)(!1,{defaultValue:ur,value:Zr}),ei=(0,xe.Z)(Jr,2),ti=ei[0],Ei=ei[1],ii=ji?ti:!1,ui=!Fn&&Vn;(ar||ui&&ii&&Yn==="combobox")&&(ii=!1);var ai=ui?!1:ii,Kn=pe.useCallback(function(Ir){var Pr=Ir!==void 0?Ir:!ii;ar||(Ei(Pr),ii!==Pr&&(jr==null||jr(Pr)))},[ar,ii,Ei,jr]),lr=pe.useMemo(function(){return(Kr||[]).some(function(Ir){return[`
|
|
`,`\r
|
|
`].includes(Ir)})},[Kr]),sr=pe.useContext(Rt)||{},cr=sr.maxCount,_r=sr.rawValues,Qr=function(Pr,gi,pi){if(!(Wt&&wt(cr)&&(_r==null?void 0:_r.size)>=cr)){var bi=!0,Di=Pr;Ur==null||Ur(null);var so=Ge(Pr,Kr,wt(cr)?cr-_r.size:void 0),io=pi?null:so;return Yn!=="combobox"&&io&&(Di="",qr==null||qr(io),Kn(!1),bi=!1),Mr&&yr!==Di&&Mr(Di,{source:gi?"typing":"effect"}),bi}},Wi=function(Pr){!Pr||!Pr.trim()||Mr(Pr,{source:"submit"})};pe.useEffect(function(){!ii&&!Wt&&Yn!=="combobox"&&Qr("",!1,!1)},[ii]),pe.useEffect(function(){ti&&ar&&Ei(!1),ar&&!hr.current&&jn(!1)},[ar]);var fi=ge(),di=(0,xe.Z)(fi,2),Lr=di[0],xi=di[1],Ui=pe.useRef(!1),ni=function(Pr){var gi=Lr(),pi=Pr.key,bi=pi==="Enter";if(bi&&(Yn!=="combobox"&&Pr.preventDefault(),ii||Kn(!0)),xi(!!yr),pi==="Backspace"&&!gi&&Wt&&!yr&&Cn.length){for(var Di=(0,Oe.Z)(Cn),so=null,io=Di.length-1;io>=0;io-=1){var go=Di[io];if(!go.disabled){Di.splice(io,1),so=go;break}}so&&Ve(Di,{type:"remove",values:[so]})}for(var vi=arguments.length,Ai=new Array(vi>1?vi-1:0),Qi=1;Qi<vi;Qi++)Ai[Qi-1]=arguments[Qi];if(ii&&(!bi||!Ui.current)){var uo;bi&&(Ui.current=!0),(uo=Dr.current)===null||uo===void 0||uo.onKeyDown.apply(uo,[Pr].concat(Ai))}Zt==null||Zt.apply(void 0,[Pr].concat(Ai))},lo=function(Pr){for(var gi=arguments.length,pi=new Array(gi>1?gi-1:0),bi=1;bi<gi;bi++)pi[bi-1]=arguments[bi];if(ii){var Di;(Di=Dr.current)===null||Di===void 0||Di.onKeyUp.apply(Di,[Pr].concat(pi))}Pr.key==="Enter"&&(Ui.current=!1),bt==null||bt.apply(void 0,[Pr].concat(pi))},Vi=function(Pr){var gi=Cn.filter(function(pi){return pi!==Pr});Ve(gi,{type:"remove",values:[Pr]})},Ji=function(){Ui.current=!1},mi=pe.useRef(!1),ra=function(){jn(!0),ar||(xt&&!mi.current&&xt.apply(void 0,arguments),et.includes("focus")&&Kn(!0)),mi.current=!0},Jo=function(){hr.current=!0,jn(!1,function(){mi.current=!1,hr.current=!1,Kn(!1)}),!ar&&(yr&&(Yn==="tags"?Mr(yr,{source:"submit"}):Yn==="multiple"&&Mr("",{source:"blur"})),Ct&&Ct.apply(void 0,arguments))},vo=[];pe.useEffect(function(){return function(){vo.forEach(function(Ir){return clearTimeout(Ir)}),vo.splice(0,vo.length)}},[]);var mo=function(Pr){var gi,pi=Pr.target,bi=(gi=er.current)===null||gi===void 0?void 0:gi.getPopupElement();if(bi&&bi.contains(pi)){var Di=setTimeout(function(){var vi=vo.indexOf(Di);if(vi!==-1&&vo.splice(vi,1),Zn(),!An&&!bi.contains(document.activeElement)){var Ai;(Ai=gr.current)===null||Ai===void 0||Ai.focus()}});vo.push(Di)}for(var so=arguments.length,io=new Array(so>1?so-1:0),go=1;go<so;go++)io[go-1]=arguments[go];gt==null||gt.apply(void 0,[Pr].concat(io))},ro=pe.useState({}),ko=(0,xe.Z)(ro,2),ia=ko[1];function oa(){ia({})}var aa;Sr&&(aa=function(Pr){Kn(Pr)}),Be(function(){var Ir;return[qn.current,(Ir=er.current)===null||Ir===void 0?void 0:Ir.getPopupElement()]},ai,Kn,!!Sr);var Zo=pe.useMemo(function(){return(0,nt.Z)((0,nt.Z)({},Fe),{},{notFoundContent:Fn,open:ii,triggerOpen:ai,id:zt,showSearch:Qt,multiple:Wt,toggleOpen:Kn})},[Fe,Fn,ai,ii,zt,Qt,Wt,Kn]),Qo=!!mr||zr,_o;Qo&&(_o=pe.createElement(Ae,{className:me()("".concat(Qe,"-arrow"),(0,Me.Z)({},"".concat(Qe,"-arrow-loading"),zr)),customizeIcon:mr,customizeIconProps:{loading:zr,searchValue:yr,open:ii,focused:In,showSearch:Qt}}));var Eo=function(){var Pr;Hn==null||Hn(),(Pr=gr.current)===null||Pr===void 0||Pr.focus(),Ve([],{type:"clear",values:Cn}),Qr("",!1,!1)},$o=ot(Qe,Eo,Cn,On,Nr,ar,yr,Yn),la=$o.allowClear,Ho=$o.clearIcon,Do=pe.createElement(Ar,{ref:Dr}),To=me()(Qe,jt,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(Qe,"-focused"),In),"".concat(Qe,"-multiple"),Wt),"".concat(Qe,"-single"),!Wt),"".concat(Qe,"-allow-clear"),On),"".concat(Qe,"-show-arrow"),Qo),"".concat(Qe,"-disabled"),ar),"".concat(Qe,"-loading"),zr),"".concat(Qe,"-open"),ii),"".concat(Qe,"-customize-input"),pr),"".concat(Qe,"-show-search"),Qt)),_i=pe.createElement(ne,{ref:er,disabled:ar,prefixCls:Qe,visible:ai,popupElement:Do,animation:Or,transitionName:si,dropdownStyle:ke,dropdownClassName:at,direction:bn,dropdownMatchSelectWidth:qe,dropdownRender:ft,dropdownAlign:vt,placement:It,builtinPlacements:an,getPopupContainer:en,empty:Vn,getTriggerDOMNode:function(Pr){return fr.current||Pr},onPopupVisibleChange:aa,onPopupMouseEnter:oa},Sr?pe.cloneElement(Sr,{ref:Xr}):pe.createElement(Nt,(0,oe.Z)({},Fe,{domRef:fr,prefixCls:Qe,inputElement:pr,ref:gr,id:zt,prefix:Qn,showSearch:Qt,autoClearSearchValue:Vr,mode:Yn,activeDescendantId:Gr,tagRender:hn,values:Cn,open:ii,onToggleOpen:Kn,activeValue:$r,searchValue:yr,onSearch:Qr,onSearchSubmit:Wi,onRemove:Vi,tokenWithEnter:lr,onInputBlur:Ji}))),hi;return Sr?hi=_i:hi=pe.createElement("div",(0,oe.Z)({className:To},Tn,{ref:qn,onMouseDown:mo,onKeyDown:ni,onKeyUp:lo,onFocus:ra,onBlur:Jo}),pe.createElement(Vt,{visible:In&&!ii,values:Cn}),_i,_o,la&&Ho),pe.createElement(st.Provider,{value:Zo},hi)}),$e=_t,un=function(){return null};un.isSelectOptGroup=!0;var Mt=un,Ut=function(){return null};Ut.isSelectOption=!0;var vn=Ut,Pn=ce(80547),Kt=ce(2738),kn=ce(6790);function tr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Jn=["disabled","title","children","style","className"];function Ft(Fe){return typeof Fe=="string"||typeof Fe=="number"}var Bt=function(He,rn){var zt=ut(),Qe=zt.prefixCls,jt=zt.id,sn=zt.open,hn=zt.multiple,bn=zt.mode,pn=zt.searchValue,Cn=zt.toggleOpen,Ve=zt.notFoundContent,Vn=zt.onPopupScroll,Sn=pe.useContext(Rt),Fn=Sn.maxCount,Hn=Sn.flattenOptions,Yn=Sn.onActiveValue,ar=Sn.defaultActiveFirstOption,zr=Sn.onSelect,Cr=Sn.menuItemSelectedIcon,dr=Sn.rawValues,Zr=Sn.fieldNames,ur=Sn.virtual,jr=Sn.direction,$r=Sn.listHeight,Ur=Sn.listItemHeight,Gr=Sn.optionRender,Yr="".concat(Qe,"-item"),Vr=(0,Pn.Z)(function(){return Hn},[sn,Hn],function(Gt,et){return et[0]&&Gt[1]!==et[1]}),Mr=pe.useRef(null),qr=pe.useMemo(function(){return hn&&wt(Fn)&&(dr==null?void 0:dr.size)>=Fn},[hn,Fn,dr==null?void 0:dr.size]),Kr=function(et){et.preventDefault()},On=function(et){var xt;(xt=Mr.current)===null||xt===void 0||xt.scrollTo(typeof et=="number"?{index:et}:et)},Qn=pe.useCallback(function(Gt){return bn==="combobox"?!1:dr.has(Gt)},[bn,(0,Oe.Z)(dr).toString(),dr.size]),mr=function(et){for(var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ct=Vr.length,bt=0;bt<Ct;bt+=1){var Zt=(et+bt*xt+Ct)%Ct,gt=Vr[Zt]||{},Lt=gt.group,Wt=gt.data;if(!Lt&&!(Wt!=null&&Wt.disabled)&&(Qn(Wt.value)||!qr))return Zt}return-1},Nr=pe.useState(function(){return mr(0)}),Ar=(0,xe.Z)(Nr,2),Or=Ar[0],si=Ar[1],ke=function(et){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;si(et);var Ct={source:xt?"keyboard":"mouse"},bt=Vr[et];if(!bt){Yn(null,-1,Ct);return}Yn(bt.value,et,Ct)};(0,pe.useEffect)(function(){ke(ar!==!1?mr(0):-1)},[Vr.length,pn]);var at=pe.useCallback(function(Gt){return bn==="combobox"?String(Gt).toLowerCase()===pn.toLowerCase():dr.has(Gt)},[bn,pn,(0,Oe.Z)(dr).toString(),dr.size]);(0,pe.useEffect)(function(){var Gt=setTimeout(function(){if(!hn&&sn&&dr.size===1){var xt=Array.from(dr)[0],Ct=Vr.findIndex(function(bt){var Zt=bt.data;return pn?String(Zt.value).startsWith(pn):Zt.value===xt});Ct!==-1&&(ke(Ct),On(Ct))}});if(sn){var et;(et=Mr.current)===null||et===void 0||et.scrollTo(void 0)}return function(){return clearTimeout(Gt)}},[sn,pn]);var qe=function(et){et!==void 0&&zr(et,{selected:!dr.has(et)}),hn||Cn(!1)};if(pe.useImperativeHandle(rn,function(){return{onKeyDown:function(et){var xt=et.which,Ct=et.ctrlKey;switch(xt){case ze.Z.N:case ze.Z.P:case ze.Z.UP:case ze.Z.DOWN:{var bt=0;if(xt===ze.Z.UP?bt=-1:xt===ze.Z.DOWN?bt=1:tr()&&Ct&&(xt===ze.Z.N?bt=1:xt===ze.Z.P&&(bt=-1)),bt!==0){var Zt=mr(Or+bt,bt);On(Zt),ke(Zt,!0)}break}case ze.Z.TAB:case ze.Z.ENTER:{var gt,Lt=Vr[Or];Lt&&!(Lt!=null&&(gt=Lt.data)!==null&>!==void 0&>.disabled)&&!qr?qe(Lt.value):qe(void 0),sn&&et.preventDefault();break}case ze.Z.ESC:Cn(!1),sn&&et.stopPropagation()}},onKeyUp:function(){},scrollTo:function(et){On(et)}}}),Vr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(jt,"_list"),className:"".concat(Yr,"-empty"),onMouseDown:Kr},Ve);var ft=Object.keys(Zr).map(function(Gt){return Zr[Gt]}),vt=function(et){return et.label};function It(Gt,et){var xt=Gt.group;return{role:xt?"presentation":"option",id:"".concat(jt,"_list_").concat(et)}}var an=function(et){var xt=Vr[et];if(!xt)return null;var Ct=xt.data||{},bt=Ct.value,Zt=xt.group,gt=(0,Ce.Z)(Ct,!0),Lt=vt(xt);return xt?pe.createElement("div",(0,oe.Z)({"aria-label":typeof Lt=="string"&&!Zt?Lt:null},gt,{key:et},It(xt,et),{"aria-selected":at(bt)}),bt):null},en={role:"listbox",id:"".concat(jt,"_list")};return pe.createElement(pe.Fragment,null,ur&&pe.createElement("div",(0,oe.Z)({},en,{style:{height:0,width:0,overflow:"hidden"}}),an(Or-1),an(Or),an(Or+1)),pe.createElement(kn.Z,{itemKey:"key",ref:Mr,data:Vr,height:$r,itemHeight:Ur,fullHeight:!1,onMouseDown:Kr,onScroll:Vn,virtual:ur,direction:jr,innerProps:ur?null:en},function(Gt,et){var xt=Gt.group,Ct=Gt.groupOption,bt=Gt.data,Zt=Gt.label,gt=Gt.value,Lt=bt.key;if(xt){var Wt,Qt=(Wt=bt.title)!==null&&Wt!==void 0?Wt:Ft(Zt)?Zt.toString():void 0;return pe.createElement("div",{className:me()(Yr,"".concat(Yr,"-group"),bt.className),title:Qt},Zt!==void 0?Zt:Lt)}var Tn=bt.disabled,Dn=bt.title,Gn=bt.children,An=bt.style,Xn=bt.className,qn=(0,ue.Z)(bt,Jn),fr=(0,Kt.Z)(qn,ft),er=Qn(gt),gr=Tn||!er&&qr,Dr="".concat(Yr,"-option"),hr=me()(Yr,Dr,Xn,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(Dr,"-grouped"),Ct),"".concat(Dr,"-active"),Or===et&&!gr),"".concat(Dr,"-disabled"),gr),"".concat(Dr,"-selected"),er)),wr=vt(Gt),$n=!Cr||typeof Cr=="function"||er,In=typeof wr=="number"?wr:wr||gt,jn=Ft(In)?In.toString():void 0;return Dn!==void 0&&(jn=Dn),pe.createElement("div",(0,oe.Z)({},(0,Ce.Z)(fr),ur?{}:It(Gt,et),{"aria-selected":at(gt),className:hr,title:jn,onMouseMove:function(){Or===et||gr||ke(et)},onClick:function(){gr||qe(gt)},style:An}),pe.createElement("div",{className:"".concat(Dr,"-content")},typeof Gr=="function"?Gr(Gt,{index:et}):In),pe.isValidElement(Cr)||er,$n&&pe.createElement(Ae,{className:"".concat(Yr,"-option-state"),customizeIcon:Cr,customizeIconProps:{value:gt,disabled:gr,isSelected:er}},er?"\u2713":null))}))},At=pe.forwardRef(Bt),xn=At,wn=function(Fe,He){var rn=pe.useRef({values:new Map,options:new Map}),zt=pe.useMemo(function(){var jt=rn.current,sn=jt.values,hn=jt.options,bn=Fe.map(function(Ve){if(Ve.label===void 0){var Vn;return(0,nt.Z)((0,nt.Z)({},Ve),{},{label:(Vn=sn.get(Ve.value))===null||Vn===void 0?void 0:Vn.label})}return Ve}),pn=new Map,Cn=new Map;return bn.forEach(function(Ve){pn.set(Ve.value,Ve),Cn.set(Ve.value,He.get(Ve.value)||hn.get(Ve.value))}),rn.current.values=pn,rn.current.options=Cn,bn},[Fe,He]),Qe=pe.useCallback(function(jt){return He.get(jt)||rn.current.options.get(jt)},[He]);return[zt,Qe]};function zn(Fe,He){return Et(Fe).join("").toUpperCase().includes(He)}var rr=function(Fe,He,rn,zt,Qe){return pe.useMemo(function(){if(!rn||zt===!1)return Fe;var jt=He.options,sn=He.label,hn=He.value,bn=[],pn=typeof zt=="function",Cn=rn.toUpperCase(),Ve=pn?zt:function(Sn,Fn){return Qe?zn(Fn[Qe],Cn):Fn[jt]?zn(Fn[sn!=="children"?sn:"label"],Cn):zn(Fn[hn],Cn)},Vn=pn?function(Sn){return Ye(Sn)}:function(Sn){return Sn};return Fe.forEach(function(Sn){if(Sn[jt]){var Fn=Ve(rn,Vn(Sn));if(Fn)bn.push(Sn);else{var Hn=Sn[jt].filter(function(Yn){return Ve(rn,Vn(Yn))});Hn.length&&bn.push((0,nt.Z)((0,nt.Z)({},Sn),{},(0,Me.Z)({},jt,Hn)))}return}Ve(rn,Vn(Sn))&&bn.push(Sn)}),bn},[Fe,zt,Qe,rn,He])},mn=ce(6551),Xt=ce(11592),Nn=["children","value"],kr=["children"];function gn(Fe){var He=Fe,rn=He.key,zt=He.props,Qe=zt.children,jt=zt.value,sn=(0,ue.Z)(zt,Nn);return(0,nt.Z)({key:rn,value:jt!==void 0?jt:rn,children:Qe},sn)}function Ln(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xt.Z)(Fe).map(function(rn,zt){if(!pe.isValidElement(rn)||!rn.type)return null;var Qe=rn,jt=Qe.type.isSelectOptGroup,sn=Qe.key,hn=Qe.props,bn=hn.children,pn=(0,ue.Z)(hn,kr);return He||!jt?gn(rn):(0,nt.Z)((0,nt.Z)({key:"__RC_SELECT_GRP__".concat(sn===null?zt:sn,"__"),label:sn},pn),{},{options:Ln(bn)})}).filter(function(rn){return rn})}var Mn=function(He,rn,zt,Qe,jt){return pe.useMemo(function(){var sn=He,hn=!He;hn&&(sn=Ln(rn));var bn=new Map,pn=new Map,Cn=function(Sn,Fn,Hn){Hn&&typeof Hn=="string"&&Sn.set(Fn[Hn],Fn)},Ve=function Vn(Sn){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Hn=0;Hn<Sn.length;Hn+=1){var Yn=Sn[Hn];!Yn[zt.options]||Fn?(bn.set(Yn[zt.value],Yn),Cn(pn,Yn,zt.label),Cn(pn,Yn,Qe),Cn(pn,Yn,jt)):Vn(Yn[zt.options],!0)}};return Ve(sn),{options:sn,valueOptions:bn,labelOptions:pn}},[He,rn,zt,Qe,jt])},_n=Mn;function Tr(Fe){var He=pe.useRef();He.current=Fe;var rn=pe.useCallback(function(){return He.current.apply(He,arguments)},[]);return rn}function xr(Fe){var He=Fe.mode,rn=Fe.options,zt=Fe.children,Qe=Fe.backfill,jt=Fe.allowClear,sn=Fe.placeholder,hn=Fe.getInputElement,bn=Fe.showSearch,pn=Fe.onSearch,Cn=Fe.defaultOpen,Ve=Fe.autoFocus,Vn=Fe.labelInValue,Sn=Fe.value,Fn=Fe.inputValue,Hn=Fe.optionLabelProp,Yn=isMultiple(He),ar=bn!==void 0?bn:Yn||He==="combobox",zr=rn||convertChildrenToData(zt);if(warning(He!=="tags"||zr.every(function(ur){return!ur.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),He==="tags"||He==="combobox"){var Cr=zr.some(function(ur){return ur.options?ur.options.some(function(jr){return typeof("value"in jr?jr.value:jr.key)=="number"}):typeof("value"in ur?ur.value:ur.key)=="number"});warning(!Cr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(He!=="combobox"||!Hn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(He==="combobox"||!Qe,"`backfill` only works with `combobox` mode."),warning(He==="combobox"||!hn,"`getInputElement` only work with `combobox` mode."),noteOnce(He!=="combobox"||!hn||!jt||!sn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pn&&!ar&&He!=="combobox"&&He!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Cn||Ve,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Sn!=null){var dr=toArray(Sn);warning(!Vn||dr.every(function(ur){return _typeof(ur)==="object"&&("key"in ur||"value"in ur)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Yn||Array.isArray(Sn),"`value` should be array when `mode` is `multiple` or `tags`")}if(zt){var Zr=null;toNodeArray(zt).some(function(ur){if(!React.isValidElement(ur)||!ur.type)return!1;var jr=ur,$r=jr.type;if($r.isSelectOption)return!1;if($r.isSelectOptGroup){var Ur=toNodeArray(ur.props.children).every(function(Gr){return!React.isValidElement(Gr)||!ur.type||Gr.type.isSelectOption?!0:(Zr=Gr.type,!1)});return!Ur}return Zr=$r,!0}),Zr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Zr.displayName||Zr.name||Zr,"`.")),warning(Fn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hr(Fe,He){if(Fe){var rn=function zt(Qe){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,sn=0;sn<Qe.length;sn++){var hn=Qe[sn];if(hn[He==null?void 0:He.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!jt&&Array.isArray(hn[He==null?void 0:He.options])&&zt(hn[He==null?void 0:He.options],!0))break}};rn(Fe)}}var br=null,or=["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"],Fr=["inputValue"];function dn(Fe){return!Fe||(0,Le.Z)(Fe)!=="object"}var St=pe.forwardRef(function(Fe,He){var rn=Fe.id,zt=Fe.mode,Qe=Fe.prefixCls,jt=Qe===void 0?"rc-select":Qe,sn=Fe.backfill,hn=Fe.fieldNames,bn=Fe.inputValue,pn=Fe.searchValue,Cn=Fe.onSearch,Ve=Fe.autoClearSearchValue,Vn=Ve===void 0?!0:Ve,Sn=Fe.onSelect,Fn=Fe.onDeselect,Hn=Fe.dropdownMatchSelectWidth,Yn=Hn===void 0?!0:Hn,ar=Fe.filterOption,zr=Fe.filterSort,Cr=Fe.optionFilterProp,dr=Fe.optionLabelProp,Zr=Fe.options,ur=Fe.optionRender,jr=Fe.children,$r=Fe.defaultActiveFirstOption,Ur=Fe.menuItemSelectedIcon,Gr=Fe.virtual,Yr=Fe.direction,Vr=Fe.listHeight,Mr=Vr===void 0?200:Vr,qr=Fe.listItemHeight,Kr=qr===void 0?20:qr,On=Fe.labelRender,Qn=Fe.value,mr=Fe.defaultValue,Nr=Fe.labelInValue,Ar=Fe.onChange,Or=Fe.maxCount,si=(0,ue.Z)(Fe,or),ke=(0,mn.ZP)(rn),at=$t(zt),qe=!!(!Zr&&jr),ft=pe.useMemo(function(){return ar===void 0&&zt==="combobox"?!1:ar},[ar,zt]),vt=pe.useMemo(function(){return Tt(hn,qe)},[JSON.stringify(hn),qe]),It=(0,Xe.Z)("",{value:pn!==void 0?pn:bn,postState:function(lr){return lr||""}}),an=(0,xe.Z)(It,2),en=an[0],Gt=an[1],et=_n(Zr,jr,vt,Cr,dr),xt=et.valueOptions,Ct=et.labelOptions,bt=et.options,Zt=pe.useCallback(function(Kn){var lr=Et(Kn);return lr.map(function(sr){var cr,_r,Qr,Wi,fi;if(dn(sr))cr=sr;else{var di;Qr=sr.key,_r=sr.label,cr=(di=sr.value)!==null&&di!==void 0?di:Qr}var Lr=xt.get(cr);if(Lr){var xi;if(_r===void 0&&(_r=Lr==null?void 0:Lr[dr||vt.label]),Qr===void 0&&(Qr=(xi=Lr==null?void 0:Lr.key)!==null&&xi!==void 0?xi:cr),Wi=Lr==null?void 0:Lr.disabled,fi=Lr==null?void 0:Lr.title,0)var Ui}return{label:_r,value:cr,key:Qr,disabled:Wi,title:fi}})},[vt,dr,xt]),gt=(0,Xe.Z)(mr,{value:Qn}),Lt=(0,xe.Z)(gt,2),Wt=Lt[0],Qt=Lt[1],Tn=pe.useMemo(function(){var Kn,lr=at&&Wt===null?[]:Wt,sr=Zt(lr);return zt==="combobox"&&he((Kn=sr[0])===null||Kn===void 0?void 0:Kn.value)?[]:sr},[Wt,Zt,zt,at]),Dn=wn(Tn,xt),Gn=(0,xe.Z)(Dn,2),An=Gn[0],Xn=Gn[1],qn=pe.useMemo(function(){if(!zt&&An.length===1){var Kn=An[0];if(Kn.value===null&&(Kn.label===null||Kn.label===void 0))return[]}return An.map(function(lr){var sr;return(0,nt.Z)((0,nt.Z)({},lr),{},{label:(sr=typeof On=="function"?On(lr):lr.label)!==null&&sr!==void 0?sr:lr.value})})},[zt,An,On]),fr=pe.useMemo(function(){return new Set(An.map(function(Kn){return Kn.value}))},[An]);pe.useEffect(function(){if(zt==="combobox"){var Kn,lr=(Kn=An[0])===null||Kn===void 0?void 0:Kn.value;Gt(ye(lr)?String(lr):"")}},[An]);var er=Tr(function(Kn,lr){var sr=lr!=null?lr:Kn;return(0,Me.Z)((0,Me.Z)({},vt.value,Kn),vt.label,sr)}),gr=pe.useMemo(function(){if(zt!=="tags")return bt;var Kn=(0,Oe.Z)(bt),lr=function(cr){return xt.has(cr)};return(0,Oe.Z)(An).sort(function(sr,cr){return sr.value<cr.value?-1:1}).forEach(function(sr){var cr=sr.value;lr(cr)||Kn.push(er(cr,sr.label))}),Kn},[er,bt,xt,An,zt]),Dr=rr(gr,vt,en,ft,Cr),hr=pe.useMemo(function(){return zt!=="tags"||!en||Dr.some(function(Kn){return Kn[Cr||"value"]===en})||Dr.some(function(Kn){return Kn[vt.value]===en})?Dr:[er(en)].concat((0,Oe.Z)(Dr))},[er,Cr,zt,Dr,en,vt]),wr=function Kn(lr){var sr=(0,Oe.Z)(lr).sort(function(cr,_r){return zr(cr,_r,{searchValue:en})});return sr.map(function(cr){return Array.isArray(cr.options)?(0,nt.Z)((0,nt.Z)({},cr),{},{options:cr.options.length>0?Kn(cr.options):cr.options}):cr})},$n=pe.useMemo(function(){return zr?wr(hr):hr},[hr,zr,en]),In=pe.useMemo(function(){return Te($n,{fieldNames:vt,childrenAsData:qe})},[$n,vt,qe]),jn=function(lr){var sr=Zt(lr);if(Qt(sr),Ar&&(sr.length!==An.length||sr.some(function(Qr,Wi){var fi;return((fi=An[Wi])===null||fi===void 0?void 0:fi.value)!==(Qr==null?void 0:Qr.value)}))){var cr=Nr?sr:sr.map(function(Qr){return Qr.value}),_r=sr.map(function(Qr){return Ye(Xn(Qr.value))});Ar(at?cr:cr[0],at?_r:_r[0])}},Zn=pe.useState(null),yr=(0,xe.Z)(Zn,2),pr=yr[0],Sr=yr[1],Xr=pe.useState(0),wi=(0,xe.Z)(Xr,2),oi=wi[0],ji=wi[1],Li=$r!==void 0?$r:zt!=="combobox",Jr=pe.useCallback(function(Kn,lr){var sr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},cr=sr.source,_r=cr===void 0?"keyboard":cr;ji(lr),sn&&zt==="combobox"&&Kn!==null&&_r==="keyboard"&&Sr(String(Kn))},[sn,zt]),ei=function(lr,sr,cr){var _r=function(){var Vi,Ji=Xn(lr);return[Nr?{label:Ji==null?void 0:Ji[vt.label],value:lr,key:(Vi=Ji==null?void 0:Ji.key)!==null&&Vi!==void 0?Vi:lr}:lr,Ye(Ji)]};if(sr&&Sn){var Qr=_r(),Wi=(0,xe.Z)(Qr,2),fi=Wi[0],di=Wi[1];Sn(fi,di)}else if(!sr&&Fn&&cr!=="clear"){var Lr=_r(),xi=(0,xe.Z)(Lr,2),Ui=xi[0],ni=xi[1];Fn(Ui,ni)}},ti=Tr(function(Kn,lr){var sr,cr=at?lr.selected:!0;cr?sr=at?[].concat((0,Oe.Z)(An),[Kn]):[Kn]:sr=An.filter(function(_r){return _r.value!==Kn}),jn(sr),ei(Kn,cr),zt==="combobox"?Sr(""):(!$t||Vn)&&(Gt(""),Sr(""))}),Ei=function(lr,sr){jn(lr);var cr=sr.type,_r=sr.values;(cr==="remove"||cr==="clear")&&_r.forEach(function(Qr){ei(Qr.value,!1,cr)})},ii=function(lr,sr){if(Gt(lr),Sr(null),sr.source==="submit"){var cr=(lr||"").trim();if(cr){var _r=Array.from(new Set([].concat((0,Oe.Z)(fr),[cr])));jn(_r),ei(cr,!0),Gt("")}return}sr.source!=="blur"&&(zt==="combobox"&&jn(lr),Cn==null||Cn(lr))},ui=function(lr){var sr=lr;zt!=="tags"&&(sr=lr.map(function(_r){var Qr=Ct.get(_r);return Qr==null?void 0:Qr.value}).filter(function(_r){return _r!==void 0}));var cr=Array.from(new Set([].concat((0,Oe.Z)(fr),(0,Oe.Z)(sr))));jn(cr),cr.forEach(function(_r){ei(_r,!0)})},ai=pe.useMemo(function(){var Kn=Gr!==!1&&Yn!==!1;return(0,nt.Z)((0,nt.Z)({},et),{},{flattenOptions:In,onActiveValue:Jr,defaultActiveFirstOption:Li,onSelect:ti,menuItemSelectedIcon:Ur,rawValues:fr,fieldNames:vt,virtual:Kn,direction:Yr,listHeight:Mr,listItemHeight:Kr,childrenAsData:qe,maxCount:Or,optionRender:ur})},[Or,et,In,Jr,Li,ti,Ur,fr,vt,Gr,Yn,Yr,Mr,Kr,qe,ur]);return pe.createElement(Rt.Provider,{value:ai},pe.createElement($e,(0,oe.Z)({},si,{id:ke,prefixCls:jt,ref:He,omitDomProps:Fr,mode:zt,displayValues:qn,onDisplayValuesChange:Ei,direction:Yr,searchValue:en,onSearch:ii,autoClearSearchValue:Vn,onSearchSplit:ui,dropdownMatchSelectWidth:Yn,OptionList:xn,emptyOptions:!In.length,activeValue:pr,activeDescendantId:"".concat(ke,"_list_").concat(oi)})))}),cn=St;cn.Option=vn,cn.OptGroup=Mt;var nr=cn,Er=nr},63158:function(on,nn,ce){"use strict";var oe=ce(32855),Oe=ce(74430),Me=ce(11913),nt=ce(43079),xe=ce(59301),ue=ce(92310),Le=ce.n(ue),Xe=ce(18929),be=ce(10228),pe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],rt=xe.forwardRef(function(me,lt){var je,Ze=me.prefixCls,Ee=Ze===void 0?"rc-switch":Ze,Ae=me.className,ot=me.checked,st=me.defaultChecked,ut=me.disabled,Pe=me.loadingIcon,ge=me.checkedChildren,Be=me.unCheckedChildren,ze=me.onClick,yt=me.onChange,Ce=me.onKeyDown,we=(0,nt.Z)(me,pe),We=(0,Xe.Z)(!1,{value:ot,defaultValue:st}),Se=(0,Me.Z)(We,2),Ue=Se[0],Ne=Se[1];function tt(Ht,ye){var he=Ue;return ut||(he=Ht,Ne(he),yt==null||yt(he,ye)),he}function Yt(Ht){Ht.which===be.Z.LEFT?tt(!1,Ht):Ht.which===be.Z.RIGHT&&tt(!0,Ht),Ce==null||Ce(Ht)}function Et(Ht){var ye=tt(!Ue,Ht);ze==null||ze(ye,Ht)}var Jt=Le()(Ee,Ae,(je={},(0,Oe.Z)(je,"".concat(Ee,"-checked"),Ue),(0,Oe.Z)(je,"".concat(Ee,"-disabled"),ut),je));return xe.createElement("button",(0,oe.Z)({},we,{type:"button",role:"switch","aria-checked":Ue,disabled:ut,className:Jt,ref:lt,onKeyDown:Yt,onClick:Et}),Pe,xe.createElement("span",{className:"".concat(Ee,"-inner")},xe.createElement("span",{className:"".concat(Ee,"-inner-checked")},ge),xe.createElement("span",{className:"".concat(Ee,"-inner-unchecked")},Be)))});rt.displayName="Switch",nn.Z=rt},86351:function(on,nn,ce){"use strict";ce.d(nn,{R:function(){return Oe},w:function(){return oe}});var oe={},Oe="rc-table-internal-hook"},97347:function(on,nn,ce){"use strict";ce.d(nn,{L:function(){return Ee},Z:function(){return Pe}});var oe=ce(11913),Oe=ce(74430),Me=ce(3300),nt=ce(34666),xe=ce(27247),ue=ce(43079),Le=ce(11592),Xe=ce(48736),be=ce(59301),pe=ce(86351),rt=ce(54451);function me(ge){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Be=="number"?Be:Be.endsWith("%")?ge*parseFloat(Be)/100:null}function lt(ge,Be,ze){return be.useMemo(function(){if(Be&&Be>0){var yt=0,Ce=0;ge.forEach(function(Et){var Jt=me(Be,Et.width);Jt?yt+=Jt:Ce+=1});var we=Math.max(Be,ze),We=Math.max(we-yt,Ce),Se=Ce,Ue=We/Ce,Ne=0,tt=ge.map(function(Et){var Jt=(0,xe.Z)({},Et),Ht=me(Be,Jt.width);if(Ht)Jt.width=Ht;else{var ye=Math.floor(Ue);Jt.width=Se===1?We:ye,We-=ye,Se-=1}return Ne+=Jt.width,Jt});if(Ne<we){var Yt=we/Ne;We=we,tt.forEach(function(Et,Jt){var Ht=Math.floor(Et.width*Yt);Et.width=Jt===tt.length-1?We:Ht,We-=Ht})}return[tt,Math.max(Ne,we)]}return[ge,Be]},[ge,Be,ze])}var je=["children"],Ze=["fixed"];function Ee(ge){return(0,Le.Z)(ge).filter(function(Be){return be.isValidElement(Be)}).map(function(Be){var ze=Be.key,yt=Be.props,Ce=yt.children,we=(0,ue.Z)(yt,je),We=(0,xe.Z)({key:ze},we);return Ce&&(We.children=Ee(Ce)),We})}function Ae(ge){return ge.filter(function(Be){return Be&&(0,nt.Z)(Be)==="object"&&!Be.hidden}).map(function(Be){var ze=Be.children;return ze&&ze.length>0?(0,xe.Z)((0,xe.Z)({},Be),{},{children:Ae(ze)}):Be})}function ot(ge){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ge.filter(function(ze){return ze&&(0,nt.Z)(ze)==="object"}).reduce(function(ze,yt,Ce){var we=yt.fixed,We=we===!0?"left":we,Se="".concat(Be,"-").concat(Ce),Ue=yt.children;return Ue&&Ue.length>0?[].concat((0,Me.Z)(ze),(0,Me.Z)(ot(Ue,Se).map(function(Ne){return(0,xe.Z)({fixed:We},Ne)}))):[].concat((0,Me.Z)(ze),[(0,xe.Z)((0,xe.Z)({key:Se},yt),{},{fixed:We})])},[])}function st(ge){return ge.map(function(Be){var ze=Be.fixed,yt=(0,ue.Z)(Be,Ze),Ce=ze;return ze==="left"?Ce="right":ze==="right"&&(Ce="left"),(0,xe.Z)({fixed:Ce},yt)})}function ut(ge,Be){var ze=ge.prefixCls,yt=ge.columns,Ce=ge.children,we=ge.expandable,We=ge.expandedKeys,Se=ge.columnTitle,Ue=ge.getRowKey,Ne=ge.onTriggerExpand,tt=ge.expandIcon,Yt=ge.rowExpandable,Et=ge.expandIconColumnIndex,Jt=ge.direction,Ht=ge.expandRowByClick,ye=ge.columnWidth,he=ge.fixed,mt=ge.scrollWidth,qt=ge.clientWidth,Pt=be.useMemo(function(){var Nt=yt||Ee(Ce)||[];return Ae(Nt.slice())},[yt,Ce]),Ke=be.useMemo(function(){if(we){var Nt=Pt.slice();if(!Nt.includes(pe.w)){var ae=Et||0;ae>=0&&(ae||he==="left"||!he)&&Nt.splice(ae,0,pe.w),he==="right"&&Nt.splice(Pt.length,0,pe.w)}var te=Nt.indexOf(pe.w);Nt=Nt.filter(function(ne,de){return ne!==pe.w||de===te});var z=Pt[te],re;he?re=he:re=z?z.fixed:null;var le=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},rt.v,{className:"".concat(ze,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Se),"fixed",re),"className","".concat(ze,"-row-expand-icon-cell")),"width",ye),"render",function(de,Re,wt){var Tt=Ue(Re,wt),Te=We.has(Tt),Ye=Yt?Yt(Re):!0,Ge=tt({prefixCls:ze,expanded:Te,expandable:Ye,record:Re,onExpand:Ne});return Ht?be.createElement("span",{onClick:function(Rt){return Rt.stopPropagation()}},Ge):Ge});return Nt.map(function(ne){return ne===pe.w?le:ne})}return Pt.filter(function(ne){return ne!==pe.w})},[we,Pt,Ue,We,tt,Jt]),ct=be.useMemo(function(){var Nt=Ke;return Be&&(Nt=Be(Nt)),Nt.length||(Nt=[{render:function(){return null}}]),Nt},[Be,Ke,Jt]),dt=be.useMemo(function(){return Jt==="rtl"?st(ot(ct)):ot(ct)},[ct,Jt,mt]),yn=be.useMemo(function(){for(var Nt=-1,ae=dt.length-1;ae>=0;ae-=1){var te=dt[ae].fixed;if(te==="left"||te===!0){Nt=ae;break}}if(Nt>=0)for(var z=0;z<=Nt;z+=1){var re=dt[z].fixed;if(re!=="left"&&re!==!0)return!0}var le=dt.findIndex(function(Re){var wt=Re.fixed;return wt==="right"});if(le>=0)for(var ne=le;ne<dt.length;ne+=1){var de=dt[ne].fixed;if(de!=="right")return!0}return!1},[dt]),_e=lt(dt,mt,qt),Dt=(0,oe.Z)(_e,2),Je=Dt[0],Ot=Dt[1];return[ct,Je,Ot,yn]}var Pe=ut},4030:function(on,nn,ce){"use strict";ce.d(nn,{w2:function(){return oe.w},vP:function(){return Ft.v},RQ:function(){return oe.R},ER:function(){return Tt},Q$:function(){return ar},TN:function(){return Ar}});var oe=ce(86351),Oe=ce(11913),Me=ce(6089),nt=ce(34280),xe=ce(13697),ue=ce(59301),Le=ce(4676);function Xe(ke){var at=ue.createContext(void 0),qe=function(vt){var It=vt.value,an=vt.children,en=ue.useRef(It);en.current=It;var Gt=ue.useState(function(){return{getValue:function(){return en.current},listeners:new Set}}),et=(0,Oe.Z)(Gt,1),xt=et[0];return(0,nt.Z)(function(){(0,Le.unstable_batchedUpdates)(function(){xt.listeners.forEach(function(Ct){Ct(It)})})},[It]),ue.createElement(at.Provider,{value:xt},an)};return{Context:at,Provider:qe,defaultValue:ke}}function be(ke,at){var qe=(0,Me.Z)(typeof at=="function"?at:function(Ct){if(at===void 0)return Ct;if(!Array.isArray(at))return Ct[at];var bt={};return at.forEach(function(Zt){bt[Zt]=Ct[Zt]}),bt}),ft=ue.useContext(ke==null?void 0:ke.Context),vt=ft||{},It=vt.listeners,an=vt.getValue,en=ue.useRef();en.current=qe(ft?an():ke==null?void 0:ke.defaultValue);var Gt=ue.useState({}),et=(0,Oe.Z)(Gt,2),xt=et[1];return(0,nt.Z)(function(){if(!ft)return;function Ct(bt){var Zt=qe(bt);(0,xe.Z)(en.current,Zt,!0)||xt({})}return It.add(Ct),function(){It.delete(Ct)}},[ft]),en.current}var pe=ce(32855),rt=ce(8654);function me(){var ke=ue.createContext(null);function at(){return ue.useContext(ke)}function qe(vt,It){var an=(0,rt.Yr)(vt),en=function(et,xt){var Ct=an?{ref:xt}:{},bt=ue.useRef(0),Zt=ue.useRef(et),gt=at();return gt!==null?ue.createElement(vt,(0,pe.Z)({},et,Ct)):((!It||It(Zt.current,et))&&(bt.current+=1),Zt.current=et,ue.createElement(ke.Provider,{value:bt.current},ue.createElement(vt,(0,pe.Z)({},et,Ct))))};return an?ue.forwardRef(en):en}function ft(vt,It){var an=(0,rt.Yr)(vt),en=function(et,xt){var Ct=an?{ref:xt}:{};return at(),ue.createElement(vt,(0,pe.Z)({},et,Ct))};return an?ue.memo(ue.forwardRef(en),It):ue.memo(en,It)}return{makeImmutable:qe,responseImmutable:ft,useImmutableMark:at}}var lt=me(),je=lt.makeImmutable,Ze=lt.responseImmutable,Ee=lt.useImmutableMark,Ae=me(),ot=Ae.makeImmutable,st=Ae.responseImmutable,ut=Ae.useImmutableMark,Pe=Xe(),ge=Pe;function Be(ke,at){var qe=React.useRef(0);qe.current+=1;var ft=React.useRef(ke),vt=[];Object.keys(ke||{}).map(function(an){var en;(ke==null?void 0:ke[an])!==((en=ft.current)===null||en===void 0?void 0:en[an])&&vt.push(an)}),ft.current=ke;var It=React.useRef([]);return vt.length&&(It.current=vt),React.useDebugValue(qe.current),React.useDebugValue(It.current.join(", ")),at&&console.log("".concat(at,":"),qe.current,It.current),qe.current}var ze=null,yt=null,Ce=ce(34666),we=ce(27247),We=ce(74430),Se=ce(92310),Ue=ce.n(Se),Ne=ce(80547),tt=ce(97938),Yt=ce(48736),Et=ue.createContext({renderWithProps:!1}),Jt=Et,Ht="RC_TABLE_KEY";function ye(ke){return ke==null?[]:Array.isArray(ke)?ke:[ke]}function he(ke){var at=[],qe={};return ke.forEach(function(ft){for(var vt=ft||{},It=vt.key,an=vt.dataIndex,en=It||ye(an).join("-")||Ht;qe[en];)en="".concat(en,"_next");qe[en]=!0,at.push(en)}),at}function mt(ke){return ke!=null}function qt(ke){return typeof ke=="number"&&!Number.isNaN(ke)}function Pt(ke){return ke&&(0,Ce.Z)(ke)==="object"&&!Array.isArray(ke)&&!ue.isValidElement(ke)}function Ke(ke,at,qe,ft,vt,It){var an=ue.useContext(Jt),en=ut(),Gt=(0,Ne.Z)(function(){if(mt(ft))return[ft];var et=at==null||at===""?[]:Array.isArray(at)?at:[at],xt=(0,tt.Z)(ke,et),Ct=xt,bt=void 0;if(vt){var Zt=vt(xt,ke,qe);Pt(Zt)?(Ct=Zt.children,bt=Zt.props,an.renderWithProps=!0):Ct=Zt}return[Ct,bt]},[en,ke,ft,at,vt,qe],function(et,xt){if(It){var Ct=(0,Oe.Z)(et,2),bt=Ct[1],Zt=(0,Oe.Z)(xt,2),gt=Zt[1];return It(gt,bt)}return an.renderWithProps?!0:!(0,xe.Z)(et,xt,!0)});return Gt}function ct(ke,at,qe,ft){var vt=ke+at-1;return ke<=ft&&vt>=qe}function dt(ke,at){return be(ge,function(qe){var ft=ct(ke,at||1,qe.hoverStartRow,qe.hoverEndRow);return[ft,qe.onHover]})}var yn=ce(70425),_e=function(at){var qe=at.ellipsis,ft=at.rowType,vt=at.children,It,an=qe===!0?{showTitle:!0}:qe;return an&&(an.showTitle||ft==="header")&&(typeof vt=="string"||typeof vt=="number"?It=vt.toString():ue.isValidElement(vt)&&typeof vt.props.children=="string"&&(It=vt.props.children)),It};function Dt(ke){var at,qe,ft,vt,It,an,en,Gt,et=ke.component,xt=ke.children,Ct=ke.ellipsis,bt=ke.scope,Zt=ke.prefixCls,gt=ke.className,Lt=ke.align,Wt=ke.record,Qt=ke.render,Tn=ke.dataIndex,Dn=ke.renderIndex,Gn=ke.shouldCellUpdate,An=ke.index,Xn=ke.rowType,qn=ke.colSpan,fr=ke.rowSpan,er=ke.fixLeft,gr=ke.fixRight,Dr=ke.firstFixLeft,hr=ke.lastFixLeft,wr=ke.firstFixRight,$n=ke.lastFixRight,In=ke.appendNode,jn=ke.additionalProps,Zn=jn===void 0?{}:jn,yr=ke.isSticky,pr="".concat(Zt,"-cell"),Sr=be(ge,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Xr=Sr.supportSticky,wi=Sr.allColumnsFixedLeft,oi=Sr.rowHoverable,ji=Ke(Wt,Tn,Dn,xt,Qt,Gn),Li=(0,Oe.Z)(ji,2),Jr=Li[0],ei=Li[1],ti={},Ei=typeof er=="number"&&Xr,ii=typeof gr=="number"&&Xr;Ei&&(ti.position="sticky",ti.left=er),ii&&(ti.position="sticky",ti.right=gr);var ui=(at=(qe=(ft=ei==null?void 0:ei.colSpan)!==null&&ft!==void 0?ft:Zn.colSpan)!==null&&qe!==void 0?qe:qn)!==null&&at!==void 0?at:1,ai=(vt=(It=(an=ei==null?void 0:ei.rowSpan)!==null&&an!==void 0?an:Zn.rowSpan)!==null&&It!==void 0?It:fr)!==null&&vt!==void 0?vt:1,Kn=dt(An,ai),lr=(0,Oe.Z)(Kn,2),sr=lr[0],cr=lr[1],_r=(0,yn.zX)(function(Ui){var ni;Wt&&cr(An,An+ai-1),Zn==null||(ni=Zn.onMouseEnter)===null||ni===void 0||ni.call(Zn,Ui)}),Qr=(0,yn.zX)(function(Ui){var ni;Wt&&cr(-1,-1),Zn==null||(ni=Zn.onMouseLeave)===null||ni===void 0||ni.call(Zn,Ui)});if(ui===0||ai===0)return null;var Wi=(en=Zn.title)!==null&&en!==void 0?en:_e({rowType:Xn,ellipsis:Ct,children:Jr}),fi=Ue()(pr,gt,(Gt={},(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)(Gt,"".concat(pr,"-fix-left"),Ei&&Xr),"".concat(pr,"-fix-left-first"),Dr&&Xr),"".concat(pr,"-fix-left-last"),hr&&Xr),"".concat(pr,"-fix-left-all"),hr&&wi&&Xr),"".concat(pr,"-fix-right"),ii&&Xr),"".concat(pr,"-fix-right-first"),wr&&Xr),"".concat(pr,"-fix-right-last"),$n&&Xr),"".concat(pr,"-ellipsis"),Ct),"".concat(pr,"-with-append"),In),"".concat(pr,"-fix-sticky"),(Ei||ii)&&yr&&Xr),(0,We.Z)(Gt,"".concat(pr,"-row-hover"),!ei&&sr)),Zn.className,ei==null?void 0:ei.className),di={};Lt&&(di.textAlign=Lt);var Lr=(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({},ei==null?void 0:ei.style),ti),di),Zn.style),xi=Jr;return(0,Ce.Z)(xi)==="object"&&!Array.isArray(xi)&&!ue.isValidElement(xi)&&(xi=null),Ct&&(hr||wr)&&(xi=ue.createElement("span",{className:"".concat(pr,"-content")},xi)),ue.createElement(et,(0,pe.Z)({},ei,Zn,{className:fi,style:Lr,title:Wi,scope:bt,onMouseEnter:oi?_r:void 0,onMouseLeave:oi?Qr:void 0,colSpan:ui!==1?ui:null,rowSpan:ai!==1?ai:null}),In,xi)}var Je=ue.memo(Dt);function Ot(ke,at,qe,ft,vt){var It=qe[ke]||{},an=qe[at]||{},en,Gt;It.fixed==="left"?en=ft.left[vt==="rtl"?at:ke]:an.fixed==="right"&&(Gt=ft.right[vt==="rtl"?ke:at]);var et=!1,xt=!1,Ct=!1,bt=!1,Zt=qe[at+1],gt=qe[ke-1],Lt=Zt&&!Zt.fixed||gt&&!gt.fixed||qe.every(function(Gn){return Gn.fixed==="left"});if(vt==="rtl"){if(en!==void 0){var Wt=gt&>.fixed==="left";bt=!Wt&&Lt}else if(Gt!==void 0){var Qt=Zt&&Zt.fixed==="right";Ct=!Qt&&Lt}}else if(en!==void 0){var Tn=Zt&&Zt.fixed==="left";et=!Tn&&Lt}else if(Gt!==void 0){var Dn=gt&>.fixed==="right";xt=!Dn&&Lt}return{fixLeft:en,fixRight:Gt,lastFixLeft:et,firstFixRight:xt,lastFixRight:Ct,firstFixLeft:bt,isSticky:ft.isSticky}}var Nt=ue.createContext({}),ae=Nt;function te(ke){var at=ke.className,qe=ke.index,ft=ke.children,vt=ke.colSpan,It=vt===void 0?1:vt,an=ke.rowSpan,en=ke.align,Gt=be(ge,["prefixCls","direction"]),et=Gt.prefixCls,xt=Gt.direction,Ct=ue.useContext(ae),bt=Ct.scrollColumnIndex,Zt=Ct.stickyOffsets,gt=Ct.flattenColumns,Lt=qe+It-1,Wt=Lt+1===bt?It+1:It,Qt=Ot(qe,qe+Wt-1,gt,Zt,xt);return ue.createElement(Je,(0,pe.Z)({className:at,index:qe,component:"td",prefixCls:et,record:null,dataIndex:null,align:en,colSpan:Wt,rowSpan:an,render:function(){return ft}},Qt))}var z=ce(43079),re=["children"];function le(ke){var at=ke.children,qe=(0,z.Z)(ke,re);return ue.createElement("tr",qe,at)}function ne(ke){var at=ke.children;return at}ne.Row=le,ne.Cell=te;var de=ne;function Re(ke){var at=ke.children,qe=ke.stickyOffsets,ft=ke.flattenColumns,vt=be(ge,"prefixCls"),It=ft.length-1,an=ft[It],en=ue.useMemo(function(){return{stickyOffsets:qe,flattenColumns:ft,scrollColumnIndex:an!=null&&an.scrollbar?It:null}},[an,ft,It,qe]);return ue.createElement(ae.Provider,{value:en},ue.createElement("tfoot",{className:"".concat(vt,"-summary")},at))}var wt=st(Re),Tt=de,Te=ce(29301),Ye=ce(24514),Ge=ce(75152),pt=ce(26112);function Rt(ke,at,qe,ft,vt,It,an){ke.push({record:at,indent:qe,index:an});var en=It(at),Gt=vt==null?void 0:vt.has(en);if(at&&Array.isArray(at[ft])&&Gt)for(var et=0;et<at[ft].length;et+=1)Rt(ke,at[ft][et],qe+1,ft,vt,It,et)}function Vt(ke,at,qe,ft){var vt=ue.useMemo(function(){if(qe!=null&&qe.size){for(var It=[],an=0;an<(ke==null?void 0:ke.length);an+=1){var en=ke[an];Rt(It,en,0,at,qe,ft,an)}return It}return ke==null?void 0:ke.map(function(Gt,et){return{record:Gt,indent:0,index:et}})},[ke,at,qe,ft]);return vt}function kt(ke,at,qe,ft){var vt=be(ge,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),It=vt.flattenColumns,an=vt.expandableType,en=vt.expandedKeys,Gt=vt.childrenColumnName,et=vt.onTriggerExpand,xt=vt.rowExpandable,Ct=vt.onRow,bt=vt.expandRowByClick,Zt=vt.rowClassName,gt=an==="nest",Lt=an==="row"&&(!xt||xt(ke)),Wt=Lt||gt,Qt=en&&en.has(at),Tn=Gt&&ke&&ke[Gt],Dn=(0,yn.zX)(et),Gn=Ct==null?void 0:Ct(ke,qe),An=Gn==null?void 0:Gn.onClick,Xn=function(gr){bt&&Wt&&et(ke,gr);for(var Dr=arguments.length,hr=new Array(Dr>1?Dr-1:0),wr=1;wr<Dr;wr++)hr[wr-1]=arguments[wr];An==null||An.apply(void 0,[gr].concat(hr))},qn;typeof Zt=="string"?qn=Zt:typeof Zt=="function"&&(qn=Zt(ke,qe,ft));var fr=he(It);return(0,we.Z)((0,we.Z)({},vt),{},{columnsKey:fr,nestExpandable:gt,expanded:Qt,hasNestChildren:Tn,record:ke,onTriggerExpand:Dn,rowSupportExpand:Lt,expandable:Wt,rowProps:(0,we.Z)((0,we.Z)({},Gn),{},{className:Ue()(qn,Gn==null?void 0:Gn.className),onClick:Xn})})}function ln(ke){var at=ke.prefixCls,qe=ke.children,ft=ke.component,vt=ke.cellComponent,It=ke.className,an=ke.expanded,en=ke.colSpan,Gt=ke.isEmpty,et=be(ge,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),xt=et.scrollbarSize,Ct=et.fixHeader,bt=et.fixColumn,Zt=et.componentWidth,gt=et.horizonScroll,Lt=qe;return(Gt?gt&&Zt:bt)&&(Lt=ue.createElement("div",{style:{width:Zt-(Ct&&!Gt?xt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(at,"-expanded-row-fixed")},Lt)),ue.createElement(ft,{className:It,style:{display:an?null:"none"}},ue.createElement(Je,{component:vt,prefixCls:at,colSpan:en},Lt))}var $t=ln;function _t(ke){var at=ke.prefixCls,qe=ke.record,ft=ke.onExpand,vt=ke.expanded,It=ke.expandable,an="".concat(at,"-row-expand-icon");if(!It)return ue.createElement("span",{className:Ue()(an,"".concat(at,"-row-spaced"))});var en=function(et){ft(qe,et),et.stopPropagation()};return ue.createElement("span",{className:Ue()(an,(0,We.Z)((0,We.Z)({},"".concat(at,"-row-expanded"),vt),"".concat(at,"-row-collapsed"),!vt)),onClick:en})}function $e(ke,at,qe){var ft=[];function vt(It){(It||[]).forEach(function(an,en){ft.push(at(an,en)),vt(an[qe])})}return vt(ke),ft}function un(ke,at,qe,ft){return typeof ke=="string"?ke:typeof ke=="function"?ke(at,qe,ft):""}function Mt(ke,at,qe,ft,vt){var It=ke.record,an=ke.prefixCls,en=ke.columnsKey,Gt=ke.fixedInfoList,et=ke.expandIconColumnIndex,xt=ke.nestExpandable,Ct=ke.indentSize,bt=ke.expandIcon,Zt=ke.expanded,gt=ke.hasNestChildren,Lt=ke.onTriggerExpand,Wt=en[qe],Qt=Gt[qe],Tn;qe===(et||0)&&xt&&(Tn=ue.createElement(ue.Fragment,null,ue.createElement("span",{style:{paddingLeft:"".concat(Ct*ft,"px")},className:"".concat(an,"-row-indent indent-level-").concat(ft)}),bt({prefixCls:an,expanded:Zt,expandable:gt,record:It,onExpand:Lt})));var Dn;return at.onCell&&(Dn=at.onCell(It,vt)),{key:Wt,fixedInfo:Qt,appendCellNode:Tn,additionalCellProps:Dn||{}}}function Ut(ke){var at=ke.className,qe=ke.style,ft=ke.record,vt=ke.index,It=ke.renderIndex,an=ke.rowKey,en=ke.indent,Gt=en===void 0?0:en,et=ke.rowComponent,xt=ke.cellComponent,Ct=ke.scopeCellComponent,bt=kt(ft,an,vt,Gt),Zt=bt.prefixCls,gt=bt.flattenColumns,Lt=bt.expandedRowClassName,Wt=bt.expandedRowRender,Qt=bt.rowProps,Tn=bt.expanded,Dn=bt.rowSupportExpand,Gn=ue.useRef(!1);Gn.current||(Gn.current=Tn);var An=un(Lt,ft,vt,Gt),Xn=ue.createElement(et,(0,pe.Z)({},Qt,{"data-row-key":an,className:Ue()(at,"".concat(Zt,"-row"),"".concat(Zt,"-row-level-").concat(Gt),Qt==null?void 0:Qt.className,(0,We.Z)({},An,Gt>=1)),style:(0,we.Z)((0,we.Z)({},qe),Qt==null?void 0:Qt.style)}),gt.map(function(er,gr){var Dr=er.render,hr=er.dataIndex,wr=er.className,$n=Mt(bt,er,gr,Gt,vt),In=$n.key,jn=$n.fixedInfo,Zn=$n.appendCellNode,yr=$n.additionalCellProps;return ue.createElement(Je,(0,pe.Z)({className:wr,ellipsis:er.ellipsis,align:er.align,scope:er.rowScope,component:er.rowScope?Ct:xt,prefixCls:Zt,key:In,record:ft,index:vt,renderIndex:It,dataIndex:hr,render:Dr,shouldCellUpdate:er.shouldCellUpdate},jn,{appendNode:Zn,additionalProps:yr}))})),qn;if(Dn&&(Gn.current||Tn)){var fr=Wt(ft,vt,Gt+1,Tn);qn=ue.createElement($t,{expanded:Tn,className:Ue()("".concat(Zt,"-expanded-row"),"".concat(Zt,"-expanded-row-level-").concat(Gt+1),An),prefixCls:Zt,component:et,cellComponent:xt,colSpan:gt.length,isEmpty:!1},fr)}return ue.createElement(ue.Fragment,null,Xn,qn)}var vn=st(Ut);function Pn(ke){var at=ke.columnKey,qe=ke.onColumnResize,ft=ue.useRef();return(0,nt.Z)(function(){ft.current&&qe(at,ft.current.offsetWidth)},[]),ue.createElement(Te.Z,{data:at},ue.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},ue.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Kt=ce(29194);function kn(ke){var at=ke.prefixCls,qe=ke.columnsKey,ft=ke.onColumnResize,vt=ue.useRef(null);return ue.createElement("tr",{"aria-hidden":"true",className:"".concat(at,"-measure-row"),style:{height:0,fontSize:0},ref:vt},ue.createElement(Te.Z.Collection,{onBatchResize:function(an){(0,Kt.Z)(vt.current)&&an.forEach(function(en){var Gt=en.data,et=en.size;ft(Gt,et.offsetWidth)})}},qe.map(function(It){return ue.createElement(Pn,{key:It,columnKey:It,onColumnResize:ft})})))}function tr(ke){var at=ke.data,qe=ke.measureColumnWidth,ft=be(ge,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),vt=ft.prefixCls,It=ft.getComponent,an=ft.onColumnResize,en=ft.flattenColumns,Gt=ft.getRowKey,et=ft.expandedKeys,xt=ft.childrenColumnName,Ct=ft.emptyNode,bt=Vt(at,xt,et,Gt),Zt=ue.useRef({renderWithProps:!1}),gt=It(["body","wrapper"],"tbody"),Lt=It(["body","row"],"tr"),Wt=It(["body","cell"],"td"),Qt=It(["body","cell"],"th"),Tn;at.length?Tn=bt.map(function(Gn,An){var Xn=Gn.record,qn=Gn.indent,fr=Gn.index,er=Gt(Xn,An);return ue.createElement(vn,{key:er,rowKey:er,record:Xn,index:An,renderIndex:fr,rowComponent:Lt,cellComponent:Wt,scopeCellComponent:Qt,indent:qn})}):Tn=ue.createElement($t,{expanded:!0,className:"".concat(vt,"-placeholder"),prefixCls:vt,component:Lt,cellComponent:Wt,colSpan:en.length,isEmpty:!0},Ct);var Dn=he(en);return ue.createElement(Jt.Provider,{value:Zt.current},ue.createElement(gt,{className:"".concat(vt,"-tbody")},qe&&ue.createElement(kn,{prefixCls:vt,columnsKey:Dn,onColumnResize:an}),Tn))}var Jn=st(tr),Ft=ce(54451),Bt=["columnType"];function At(ke){for(var at=ke.colWidths,qe=ke.columns,ft=ke.columCount,vt=be(ge,["tableLayout"]),It=vt.tableLayout,an=[],en=ft||qe.length,Gt=!1,et=en-1;et>=0;et-=1){var xt=at[et],Ct=qe&&qe[et],bt=void 0,Zt=void 0;if(Ct&&(bt=Ct[Ft.v],It==="auto"&&(Zt=Ct.minWidth)),xt||Zt||bt||Gt){var gt=bt||{},Lt=gt.columnType,Wt=(0,z.Z)(gt,Bt);an.unshift(ue.createElement("col",(0,pe.Z)({key:et,style:{width:xt,minWidth:Zt}},Wt))),Gt=!0}}return ue.createElement("colgroup",null,an)}var xn=At,wn=ce(3300),zn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function rr(ke,at){return(0,ue.useMemo)(function(){for(var qe=[],ft=0;ft<at;ft+=1){var vt=ke[ft];if(vt!==void 0)qe[ft]=vt;else return null}return qe},[ke.join("_"),at])}var mn=ue.forwardRef(function(ke,at){var qe=ke.className,ft=ke.noData,vt=ke.columns,It=ke.flattenColumns,an=ke.colWidths,en=ke.columCount,Gt=ke.stickyOffsets,et=ke.direction,xt=ke.fixHeader,Ct=ke.stickyTopOffset,bt=ke.stickyBottomOffset,Zt=ke.stickyClassName,gt=ke.onScroll,Lt=ke.maxContentScroll,Wt=ke.children,Qt=(0,z.Z)(ke,zn),Tn=be(ge,["prefixCls","scrollbarSize","isSticky","getComponent"]),Dn=Tn.prefixCls,Gn=Tn.scrollbarSize,An=Tn.isSticky,Xn=Tn.getComponent,qn=Xn(["header","table"],"table"),fr=An&&!xt?0:Gn,er=ue.useRef(null),gr=ue.useCallback(function(yr){(0,rt.mH)(at,yr),(0,rt.mH)(er,yr)},[]);ue.useEffect(function(){var yr;function pr(Sr){var Xr=Sr,wi=Xr.currentTarget,oi=Xr.deltaX;oi&&(gt({currentTarget:wi,scrollLeft:wi.scrollLeft+oi}),Sr.preventDefault())}return(yr=er.current)===null||yr===void 0||yr.addEventListener("wheel",pr,{passive:!1}),function(){var Sr;(Sr=er.current)===null||Sr===void 0||Sr.removeEventListener("wheel",pr)}},[]);var Dr=ue.useMemo(function(){return It.every(function(yr){return yr.width})},[It]),hr=It[It.length-1],wr={fixed:hr?hr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Dn,"-cell-scrollbar")}}},$n=(0,ue.useMemo)(function(){return fr?[].concat((0,wn.Z)(vt),[wr]):vt},[fr,vt]),In=(0,ue.useMemo)(function(){return fr?[].concat((0,wn.Z)(It),[wr]):It},[fr,It]),jn=(0,ue.useMemo)(function(){var yr=Gt.right,pr=Gt.left;return(0,we.Z)((0,we.Z)({},Gt),{},{left:et==="rtl"?[].concat((0,wn.Z)(pr.map(function(Sr){return Sr+fr})),[0]):pr,right:et==="rtl"?yr:[].concat((0,wn.Z)(yr.map(function(Sr){return Sr+fr})),[0]),isSticky:An})},[fr,Gt,An]),Zn=rr(an,en);return ue.createElement("div",{style:(0,we.Z)({overflow:"hidden"},An?{top:Ct,bottom:bt}:{}),ref:gr,className:Ue()(qe,(0,We.Z)({},Zt,!!Zt))},ue.createElement(qn,{style:{tableLayout:"fixed",visibility:ft||Zn?null:"hidden"}},(!ft||!Lt||Dr)&&ue.createElement(xn,{colWidths:Zn?[].concat((0,wn.Z)(Zn),[fr]):[],columCount:en+1,columns:In}),Wt((0,we.Z)((0,we.Z)({},Qt),{},{stickyOffsets:jn,columns:$n,flattenColumns:In}))))}),Xt=ue.memo(mn),Nn=function(at){var qe=at.cells,ft=at.stickyOffsets,vt=at.flattenColumns,It=at.rowComponent,an=at.cellComponent,en=at.onHeaderRow,Gt=at.index,et=be(ge,["prefixCls","direction"]),xt=et.prefixCls,Ct=et.direction,bt;en&&(bt=en(qe.map(function(gt){return gt.column}),Gt));var Zt=he(qe.map(function(gt){return gt.column}));return ue.createElement(It,bt,qe.map(function(gt,Lt){var Wt=gt.column,Qt=Ot(gt.colStart,gt.colEnd,vt,ft,Ct),Tn;return Wt&&Wt.onHeaderCell&&(Tn=gt.column.onHeaderCell(Wt)),ue.createElement(Je,(0,pe.Z)({},gt,{scope:Wt.title?gt.colSpan>1?"colgroup":"col":null,ellipsis:Wt.ellipsis,align:Wt.align,component:an,prefixCls:xt,key:Zt[Lt]},Qt,{additionalProps:Tn,rowType:"header"}))}))},kr=Nn;function gn(ke){var at=[];function qe(an,en){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;at[Gt]=at[Gt]||[];var et=en,xt=an.filter(Boolean).map(function(Ct){var bt={key:Ct.key,className:Ct.className||"",children:Ct.title,column:Ct,colStart:et},Zt=1,gt=Ct.children;return gt&>.length>0&&(Zt=qe(gt,et,Gt+1).reduce(function(Lt,Wt){return Lt+Wt},0),bt.hasSubColumns=!0),"colSpan"in Ct&&(Zt=Ct.colSpan),"rowSpan"in Ct&&(bt.rowSpan=Ct.rowSpan),bt.colSpan=Zt,bt.colEnd=bt.colStart+Zt-1,at[Gt].push(bt),et+=Zt,Zt});return xt}qe(ke,0);for(var ft=at.length,vt=function(en){at[en].forEach(function(Gt){!("rowSpan"in Gt)&&!Gt.hasSubColumns&&(Gt.rowSpan=ft-en)})},It=0;It<ft;It+=1)vt(It);return at}var Ln=function(at){var qe=at.stickyOffsets,ft=at.columns,vt=at.flattenColumns,It=at.onHeaderRow,an=be(ge,["prefixCls","getComponent"]),en=an.prefixCls,Gt=an.getComponent,et=ue.useMemo(function(){return gn(ft)},[ft]),xt=Gt(["header","wrapper"],"thead"),Ct=Gt(["header","row"],"tr"),bt=Gt(["header","cell"],"th");return ue.createElement(xt,{className:"".concat(en,"-thead")},et.map(function(Zt,gt){var Lt=ue.createElement(kr,{key:gt,flattenColumns:vt,cells:Zt,stickyOffsets:qe,rowComponent:Ct,cellComponent:bt,onHeaderRow:It,index:gt});return Lt}))},Mn=st(Ln),_n=ce(97347);function Tr(ke,at,qe){var ft=(0,Ft.g)(ke),vt=ft.expandIcon,It=ft.expandedRowKeys,an=ft.defaultExpandedRowKeys,en=ft.defaultExpandAllRows,Gt=ft.expandedRowRender,et=ft.onExpand,xt=ft.onExpandedRowsChange,Ct=ft.childrenColumnName,bt=vt||_t,Zt=Ct||"children",gt=ue.useMemo(function(){return Gt?"row":ke.expandable&&ke.internalHooks===oe.R&&ke.expandable.__PARENT_RENDER_ICON__||at.some(function(An){return An&&(0,Ce.Z)(An)==="object"&&An[Zt]})?"nest":!1},[!!Gt,at]),Lt=ue.useState(function(){return an||(en?$e(at,qe,Zt):[])}),Wt=(0,Oe.Z)(Lt,2),Qt=Wt[0],Tn=Wt[1],Dn=ue.useMemo(function(){return new Set(It||Qt||[])},[It,Qt]),Gn=ue.useCallback(function(An){var Xn=qe(An,at.indexOf(An)),qn,fr=Dn.has(Xn);fr?(Dn.delete(Xn),qn=(0,wn.Z)(Dn)):qn=[].concat((0,wn.Z)(Dn),[Xn]),Tn(qn),et&&et(!fr,An),xt&&xt(qn)},[qe,Dn,at,et,xt]);return[ft,gt,Dn,bt,Zt,Gn]}function xr(ke,at,qe){var ft=ke.map(function(vt,It){return Ot(It,It,ke,at,qe)});return(0,Ne.Z)(function(){return ft},[ft],function(vt,It){return!(0,xe.Z)(vt,It)})}function Hr(ke){var at=(0,ue.useRef)(ke),qe=(0,ue.useState)({}),ft=(0,Oe.Z)(qe,2),vt=ft[1],It=(0,ue.useRef)(null),an=(0,ue.useRef)([]);function en(Gt){an.current.push(Gt);var et=Promise.resolve();It.current=et,et.then(function(){if(It.current===et){var xt=an.current,Ct=at.current;an.current=[],xt.forEach(function(bt){at.current=bt(at.current)}),It.current=null,Ct!==at.current&&vt({})}})}return(0,ue.useEffect)(function(){return function(){It.current=null}},[]),[at.current,en]}function br(ke){var at=(0,ue.useRef)(ke||null),qe=(0,ue.useRef)();function ft(){window.clearTimeout(qe.current)}function vt(an){at.current=an,ft(),qe.current=window.setTimeout(function(){at.current=null,qe.current=void 0},100)}function It(){return at.current}return(0,ue.useEffect)(function(){return ft},[]),[vt,It]}function or(){var ke=ue.useState(-1),at=(0,Oe.Z)(ke,2),qe=at[0],ft=at[1],vt=ue.useState(-1),It=(0,Oe.Z)(vt,2),an=It[0],en=It[1],Gt=ue.useCallback(function(et,xt){ft(et),en(xt)},[]);return[qe,an,Gt]}var Fr=ce(47273),dn=(0,Fr.Z)()?window:null;function St(ke,at){var qe=(0,Ce.Z)(ke)==="object"?ke:{},ft=qe.offsetHeader,vt=ft===void 0?0:ft,It=qe.offsetSummary,an=It===void 0?0:It,en=qe.offsetScroll,Gt=en===void 0?0:en,et=qe.getContainer,xt=et===void 0?function(){return dn}:et,Ct=xt()||dn,bt=!!ke;return ue.useMemo(function(){return{isSticky:bt,stickyClassName:bt?"".concat(at,"-sticky-holder"):"",offsetHeader:vt,offsetSummary:an,offsetScroll:Gt,container:Ct}},[bt,Gt,vt,an,at,Ct])}function cn(ke,at,qe){var ft=(0,ue.useMemo)(function(){var vt=at.length,It=function(et,xt,Ct){for(var bt=[],Zt=0,gt=et;gt!==xt;gt+=Ct)bt.push(Zt),at[gt].fixed&&(Zt+=ke[gt]||0);return bt},an=It(0,vt,1),en=It(vt-1,-1,-1).reverse();return qe==="rtl"?{left:en,right:an}:{left:an,right:en}},[ke,at,qe]);return ft}var nr=cn;function Er(ke){var at=ke.className,qe=ke.children;return ue.createElement("div",{className:at},qe)}var Fe=Er,He=ce(8224),rn=ce(16089),zt=ce(76846);function Qe(ke){var at=(0,zt.bn)(ke),qe=at.getBoundingClientRect(),ft=document.documentElement;return{left:qe.left+(window.pageXOffset||ft.scrollLeft)-(ft.clientLeft||document.body.clientLeft||0),top:qe.top+(window.pageYOffset||ft.scrollTop)-(ft.clientTop||document.body.clientTop||0)}}var jt=function(at,qe){var ft,vt,It=at.scrollBodyRef,an=at.onScroll,en=at.offsetScroll,Gt=at.container,et=at.direction,xt=be(ge,"prefixCls"),Ct=((ft=It.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,bt=((vt=It.current)===null||vt===void 0?void 0:vt.clientWidth)||0,Zt=Ct&&bt*(bt/Ct),gt=ue.useRef(),Lt=Hr({scrollLeft:0,isHiddenScrollBar:!0}),Wt=(0,Oe.Z)(Lt,2),Qt=Wt[0],Tn=Wt[1],Dn=ue.useRef({delta:0,x:0}),Gn=ue.useState(!1),An=(0,Oe.Z)(Gn,2),Xn=An[0],qn=An[1],fr=ue.useRef(null);ue.useEffect(function(){return function(){rn.Z.cancel(fr.current)}},[]);var er=function(){qn(!1)},gr=function(In){In.persist(),Dn.current.delta=In.pageX-Qt.scrollLeft,Dn.current.x=0,qn(!0),In.preventDefault()},Dr=function(In){var jn,Zn=In||((jn=window)===null||jn===void 0?void 0:jn.event),yr=Zn.buttons;if(!Xn||yr===0){Xn&&qn(!1);return}var pr=Dn.current.x+In.pageX-Dn.current.x-Dn.current.delta,Sr=et==="rtl";pr=Math.max(Sr?Zt-bt:0,Math.min(Sr?0:bt-Zt,pr));var Xr=!Sr||Math.abs(pr)+Math.abs(Zt)<bt;Xr&&(an({scrollLeft:pr/bt*(Ct+2)}),Dn.current.x=In.pageX)},hr=function(){rn.Z.cancel(fr.current),fr.current=(0,rn.Z)(function(){if(It.current){var In=Qe(It.current).top,jn=In+It.current.offsetHeight,Zn=Gt===window?document.documentElement.scrollTop+window.innerHeight:Qe(Gt).top+Gt.clientHeight;jn-(0,Ge.Z)()<=Zn||In>=Zn-en?Tn(function(yr){return(0,we.Z)((0,we.Z)({},yr),{},{isHiddenScrollBar:!0})}):Tn(function(yr){return(0,we.Z)((0,we.Z)({},yr),{},{isHiddenScrollBar:!1})})}})},wr=function(In){Tn(function(jn){return(0,we.Z)((0,we.Z)({},jn),{},{scrollLeft:In/Ct*bt||0})})};return ue.useImperativeHandle(qe,function(){return{setScrollLeft:wr,checkScrollBarVisible:hr}}),ue.useEffect(function(){var $n=(0,He.Z)(document.body,"mouseup",er,!1),In=(0,He.Z)(document.body,"mousemove",Dr,!1);return hr(),function(){$n.remove(),In.remove()}},[Zt,Xn]),ue.useEffect(function(){if(It.current){for(var $n=[],In=(0,zt.bn)(It.current);In;)$n.push(In),In=In.parentElement;return $n.forEach(function(jn){return jn.addEventListener("scroll",hr,!1)}),window.addEventListener("resize",hr,!1),window.addEventListener("scroll",hr,!1),Gt.addEventListener("scroll",hr,!1),function(){$n.forEach(function(jn){return jn.removeEventListener("scroll",hr)}),window.removeEventListener("resize",hr),window.removeEventListener("scroll",hr),Gt.removeEventListener("scroll",hr)}}},[Gt]),ue.useEffect(function(){Qt.isHiddenScrollBar||Tn(function($n){var In=It.current;return In?(0,we.Z)((0,we.Z)({},$n),{},{scrollLeft:In.scrollLeft/In.scrollWidth*In.clientWidth}):$n})},[Qt.isHiddenScrollBar]),Ct<=bt||!Zt||Qt.isHiddenScrollBar?null:ue.createElement("div",{style:{height:(0,Ge.Z)(),width:bt,bottom:en},className:"".concat(xt,"-sticky-scroll")},ue.createElement("div",{onMouseDown:gr,ref:gt,className:Ue()("".concat(xt,"-sticky-scroll-bar"),(0,We.Z)({},"".concat(xt,"-sticky-scroll-bar-active"),Xn)),style:{width:"".concat(Zt,"px"),transform:"translate3d(".concat(Qt.scrollLeft,"px, 0, 0)")}}))},sn=ue.forwardRef(jt);function hn(ke){return null}var bn=hn;function pn(ke){return null}var Cn=pn,Ve="rc-table",Vn=[],Sn={};function Fn(){return"No Data"}function Hn(ke,at){var qe=(0,we.Z)({rowKey:"key",prefixCls:Ve,emptyText:Fn},ke),ft=qe.prefixCls,vt=qe.className,It=qe.rowClassName,an=qe.style,en=qe.data,Gt=qe.rowKey,et=qe.scroll,xt=qe.tableLayout,Ct=qe.direction,bt=qe.title,Zt=qe.footer,gt=qe.summary,Lt=qe.caption,Wt=qe.id,Qt=qe.showHeader,Tn=qe.components,Dn=qe.emptyText,Gn=qe.onRow,An=qe.onHeaderRow,Xn=qe.onScroll,qn=qe.internalHooks,fr=qe.transformColumns,er=qe.internalRefs,gr=qe.tailor,Dr=qe.getContainerWidth,hr=qe.sticky,wr=qe.rowHoverable,$n=wr===void 0?!0:wr,In=en||Vn,jn=!!In.length,Zn=qn===oe.R,yr=ue.useCallback(function(Rr,Br){return(0,tt.Z)(Tn,Rr)||Br},[Tn]),pr=ue.useMemo(function(){return typeof Gt=="function"?Gt:function(Rr){var Br=Rr&&Rr[Gt];return Br}},[Gt]),Sr=yr(["body"]),Xr=or(),wi=(0,Oe.Z)(Xr,3),oi=wi[0],ji=wi[1],Li=wi[2],Jr=Tr(qe,In,pr),ei=(0,Oe.Z)(Jr,6),ti=ei[0],Ei=ei[1],ii=ei[2],ui=ei[3],ai=ei[4],Kn=ei[5],lr=et==null?void 0:et.x,sr=ue.useState(0),cr=(0,Oe.Z)(sr,2),_r=cr[0],Qr=cr[1],Wi=(0,_n.Z)((0,we.Z)((0,we.Z)((0,we.Z)({},qe),ti),{},{expandable:!!ti.expandedRowRender,columnTitle:ti.columnTitle,expandedKeys:ii,getRowKey:pr,onTriggerExpand:Kn,expandIcon:ui,expandIconColumnIndex:ti.expandIconColumnIndex,direction:Ct,scrollWidth:Zn&&gr&&typeof lr=="number"?lr:null,clientWidth:_r}),Zn?fr:null),fi=(0,Oe.Z)(Wi,4),di=fi[0],Lr=fi[1],xi=fi[2],Ui=fi[3],ni=xi!=null?xi:lr,lo=ue.useMemo(function(){return{columns:di,flattenColumns:Lr}},[di,Lr]),Vi=ue.useRef(),Ji=ue.useRef(),mi=ue.useRef(),ra=ue.useRef();ue.useImperativeHandle(at,function(){return{nativeElement:Vi.current,scrollTo:function(Br){var Si;if(mi.current instanceof HTMLElement){var Bi=Br.index,Ni=Br.top,Bo=Br.key;if(qt(Ni)){var wo;(wo=mi.current)===null||wo===void 0||wo.scrollTo({top:Ni})}else{var Oo,fo=Bo!=null?Bo:pr(In[Bi]);(Oo=mi.current.querySelector('[data-row-key="'.concat(fo,'"]')))===null||Oo===void 0||Oo.scrollIntoView()}}else(Si=mi.current)!==null&&Si!==void 0&&Si.scrollTo&&mi.current.scrollTo(Br)}}});var Jo=ue.useRef(),vo=ue.useState(!1),mo=(0,Oe.Z)(vo,2),ro=mo[0],ko=mo[1],ia=ue.useState(!1),oa=(0,Oe.Z)(ia,2),aa=oa[0],Zo=oa[1],Qo=ue.useState(new Map),_o=(0,Oe.Z)(Qo,2),Eo=_o[0],$o=_o[1],la=he(Lr),Ho=la.map(function(Rr){return Eo.get(Rr)}),Do=ue.useMemo(function(){return Ho},[Ho.join("_")]),To=nr(Do,Lr,Ct),_i=et&&mt(et.y),hi=et&&mt(ni)||!!ti.fixed,Ir=hi&&Lr.some(function(Rr){var Br=Rr.fixed;return Br}),Pr=ue.useRef(),gi=St(hr,ft),pi=gi.isSticky,bi=gi.offsetHeader,Di=gi.offsetSummary,so=gi.offsetScroll,io=gi.stickyClassName,go=gi.container,vi=ue.useMemo(function(){return gt==null?void 0:gt(In)},[gt,In]),Ai=(_i||pi)&&ue.isValidElement(vi)&&vi.type===de&&vi.props.fixed,Qi,uo,qo;_i&&(uo={overflowY:jn?"scroll":"auto",maxHeight:et.y}),hi&&(Qi={overflowX:"auto"},_i||(uo={overflowY:"hidden"}),qo={width:ni===!0?"auto":ni,minWidth:"100%"});var Sa=ue.useCallback(function(Rr,Br){$o(function(Si){if(Si.get(Rr)!==Br){var Bi=new Map(Si);return Bi.set(Rr,Br),Bi}return Si})},[]),ka=br(null),Co=(0,Oe.Z)(ka,2),Lo=Co[0],Hi=Co[1];function co(Rr,Br){Br&&(typeof Br=="function"?Br(Rr):Br.scrollLeft!==Rr&&(Br.scrollLeft=Rr,Br.scrollLeft!==Rr&&setTimeout(function(){Br.scrollLeft=Rr},0)))}var $i=(0,Me.Z)(function(Rr){var Br=Rr.currentTarget,Si=Rr.scrollLeft,Bi=Ct==="rtl",Ni=typeof Si=="number"?Si:Br.scrollLeft,Bo=Br||Sn;if(!Hi()||Hi()===Bo){var wo;Lo(Bo),co(Ni,Ji.current),co(Ni,mi.current),co(Ni,Jo.current),co(Ni,(wo=Pr.current)===null||wo===void 0?void 0:wo.setScrollLeft)}var Oo=Br||Ji.current;if(Oo){var fo=Zn&&gr&&typeof ni=="number"?ni:Oo.scrollWidth,yo=Oo.clientWidth;if(fo===yo){ko(!1),Zo(!1);return}Bi?(ko(-Ni<fo-yo),Zo(-Ni>0)):(ko(Ni>0),Zo(Ni<fo-yo))}}),sa=(0,Me.Z)(function(Rr){$i(Rr),Xn==null||Xn(Rr)}),Qa=function(){if(hi&&mi.current){var Br;$i({currentTarget:(0,zt.bn)(mi.current),scrollLeft:(Br=mi.current)===null||Br===void 0?void 0:Br.scrollLeft})}else ko(!1),Zo(!1)},$a=function(Br){var Si,Bi=Br.width;(Si=Pr.current)===null||Si===void 0||Si.checkScrollBarVisible();var Ni=Vi.current?Vi.current.offsetWidth:Bi;Zn&&Dr&&Vi.current&&(Ni=Dr(Vi.current,Ni)||Ni),Ni!==_r&&(Qa(),Qr(Ni))},zo=ue.useRef(!1);ue.useEffect(function(){zo.current&&Qa()},[hi,en,di.length]),ue.useEffect(function(){zo.current=!0},[]);var qa=ue.useState(0),Ea=(0,Oe.Z)(qa,2),Po=Ea[0],el=Ea[1],Da=ue.useState(!0),Ta=(0,Oe.Z)(Da,2),La=Ta[0],Pa=Ta[1];(0,nt.Z)(function(){(!gr||!Zn)&&(mi.current instanceof Element?el((0,Ge.o)(mi.current).width):el((0,Ge.o)(ra.current).width)),Pa((0,Ye.G)("position","sticky"))},[]),ue.useEffect(function(){Zn&&er&&(er.body.current=mi.current)});var Wo=ue.useCallback(function(Rr){return ue.createElement(ue.Fragment,null,ue.createElement(Mn,Rr),Ai==="top"&&ue.createElement(wt,Rr,vi))},[Ai,vi]),ua=ue.useCallback(function(Rr){return ue.createElement(wt,Rr,vi)},[vi]),Ma=yr(["table"],"table"),Mo=ue.useMemo(function(){return xt||(Ir?ni==="max-content"?"auto":"fixed":_i||pi||Lr.some(function(Rr){var Br=Rr.ellipsis;return Br})?"fixed":"auto")},[_i,Ir,Lr,xt,pi]),Aa,Na={colWidths:Do,columCount:Lr.length,stickyOffsets:To,onHeaderRow:An,fixHeader:_i,scroll:et},tl=ue.useMemo(function(){return jn?null:typeof Dn=="function"?Dn():Dn},[jn,Dn]),ca=ue.createElement(Jn,{data:In,measureColumnWidth:_i||hi||pi}),da=ue.createElement(xn,{colWidths:Lr.map(function(Rr){var Br=Rr.width;return Br}),columns:Lr}),Ao=Lt!=null?ue.createElement("caption",{className:"".concat(ft,"-caption")},Lt):void 0,ea=(0,pt.Z)(qe,{data:!0}),nl=(0,pt.Z)(qe,{aria:!0});if(_i||pi){var Ko;typeof Sr=="function"?(Ko=Sr(In,{scrollbarSize:Po,ref:mi,onScroll:$i}),Na.colWidths=Lr.map(function(Rr,Br){var Si=Rr.width,Bi=Br===Lr.length-1?Si-Po:Si;return typeof Bi=="number"&&!Number.isNaN(Bi)?Bi:0})):Ko=ue.createElement("div",{style:(0,we.Z)((0,we.Z)({},Qi),uo),onScroll:sa,ref:mi,className:Ue()("".concat(ft,"-body"))},ue.createElement(Ma,(0,pe.Z)({style:(0,we.Z)((0,we.Z)({},qo),{},{tableLayout:Mo})},nl),Ao,da,ca,!Ai&&vi&&ue.createElement(wt,{stickyOffsets:To,flattenColumns:Lr},vi)));var Ra=(0,we.Z)((0,we.Z)((0,we.Z)({noData:!In.length,maxContentScroll:hi&&ni==="max-content"},Na),lo),{},{direction:Ct,stickyClassName:io,onScroll:$i});Aa=ue.createElement(ue.Fragment,null,Qt!==!1&&ue.createElement(Xt,(0,pe.Z)({},Ra,{stickyTopOffset:bi,className:"".concat(ft,"-header"),ref:Ji}),Wo),Ko,Ai&&Ai!=="top"&&ue.createElement(Xt,(0,pe.Z)({},Ra,{stickyBottomOffset:Di,className:"".concat(ft,"-summary"),ref:Jo}),ua),pi&&mi.current&&mi.current instanceof Element&&ue.createElement(sn,{ref:Pr,offsetScroll:so,scrollBodyRef:mi,onScroll:$i,container:go,direction:Ct}))}else Aa=ue.createElement("div",{style:(0,we.Z)((0,we.Z)({},Qi),uo),className:Ue()("".concat(ft,"-content")),onScroll:$i,ref:mi},ue.createElement(Ma,(0,pe.Z)({style:(0,we.Z)((0,we.Z)({},qo),{},{tableLayout:Mo})},nl),Ao,da,Qt!==!1&&ue.createElement(Mn,(0,pe.Z)({},Na,lo)),ca,vi&&ue.createElement(wt,{stickyOffsets:To,flattenColumns:Lr},vi)));var No=ue.createElement("div",(0,pe.Z)({className:Ue()(ft,vt,(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(ft,"-rtl"),Ct==="rtl"),"".concat(ft,"-ping-left"),ro),"".concat(ft,"-ping-right"),aa),"".concat(ft,"-layout-fixed"),xt==="fixed"),"".concat(ft,"-fixed-header"),_i),"".concat(ft,"-fixed-column"),Ir),"".concat(ft,"-fixed-column-gapped"),Ir&&Ui),"".concat(ft,"-scroll-horizontal"),hi),"".concat(ft,"-has-fix-left"),Lr[0]&&Lr[0].fixed),"".concat(ft,"-has-fix-right"),Lr[Lr.length-1]&&Lr[Lr.length-1].fixed==="right")),style:an,id:Wt,ref:Vi},ea),bt&&ue.createElement(Fe,{className:"".concat(ft,"-title")},bt(In)),ue.createElement("div",{ref:ra,className:"".concat(ft,"-container")},Aa),Zt&&ue.createElement(Fe,{className:"".concat(ft,"-footer")},Zt(In)));hi&&(No=ue.createElement(Te.Z,{onResize:$a},No));var Ba=xr(Lr,To,Ct),Ro=ue.useMemo(function(){return{scrollX:ni,prefixCls:ft,getComponent:yr,scrollbarSize:Po,direction:Ct,fixedInfoList:Ba,isSticky:pi,supportSticky:La,componentWidth:_r,fixHeader:_i,fixColumn:Ir,horizonScroll:hi,tableLayout:Mo,rowClassName:It,expandedRowClassName:ti.expandedRowClassName,expandIcon:ui,expandableType:Ei,expandRowByClick:ti.expandRowByClick,expandedRowRender:ti.expandedRowRender,onTriggerExpand:Kn,expandIconColumnIndex:ti.expandIconColumnIndex,indentSize:ti.indentSize,allColumnsFixedLeft:Lr.every(function(Rr){return Rr.fixed==="left"}),emptyNode:tl,columns:di,flattenColumns:Lr,onColumnResize:Sa,hoverStartRow:oi,hoverEndRow:ji,onHover:Li,rowExpandable:ti.rowExpandable,onRow:Gn,getRowKey:pr,expandedKeys:ii,childrenColumnName:ai,rowHoverable:$n}},[ni,ft,yr,Po,Ct,Ba,pi,La,_r,_i,Ir,hi,Mo,It,ti.expandedRowClassName,ui,Ei,ti.expandRowByClick,ti.expandedRowRender,Kn,ti.expandIconColumnIndex,ti.indentSize,tl,di,Lr,Sa,oi,ji,Li,ti.rowExpandable,Gn,pr,ii,ai,$n]);return ue.createElement(ge.Provider,{value:Ro},No)}var Yn=ue.forwardRef(Hn);function ar(ke){return ot(Yn,ke)}var zr=ar();zr.EXPAND_COLUMN=oe.w,zr.INTERNAL_HOOKS=oe.R,zr.Column=bn,zr.ColumnGroup=Cn,zr.Summary=Tt;var Cr=zr,dr=ce(6790),Zr=Xe(null),ur=Xe(null);function jr(ke,at,qe){var ft=at||1;return qe[ke+ft]-(qe[ke]||0)}function $r(ke){var at=ke.rowInfo,qe=ke.column,ft=ke.colIndex,vt=ke.indent,It=ke.index,an=ke.component,en=ke.renderIndex,Gt=ke.record,et=ke.style,xt=ke.className,Ct=ke.inverse,bt=ke.getHeight,Zt=qe.render,gt=qe.dataIndex,Lt=qe.className,Wt=qe.width,Qt=be(ur,["columnsOffset"]),Tn=Qt.columnsOffset,Dn=Mt(at,qe,ft,vt,It),Gn=Dn.key,An=Dn.fixedInfo,Xn=Dn.appendCellNode,qn=Dn.additionalCellProps,fr=qn.style,er=qn.colSpan,gr=er===void 0?1:er,Dr=qn.rowSpan,hr=Dr===void 0?1:Dr,wr=ft-1,$n=jr(wr,gr,Tn),In=gr>1?Wt-$n:0,jn=(0,we.Z)((0,we.Z)((0,we.Z)({},fr),et),{},{flex:"0 0 ".concat($n,"px"),width:"".concat($n,"px"),marginRight:In,pointerEvents:"auto"}),Zn=ue.useMemo(function(){return Ct?hr<=1:gr===0||hr===0||hr>1},[hr,gr,Ct]);Zn?jn.visibility="hidden":Ct&&(jn.height=bt==null?void 0:bt(hr));var yr=Zn?function(){return null}:Zt,pr={};return(hr===0||gr===0)&&(pr.rowSpan=1,pr.colSpan=1),ue.createElement(Je,(0,pe.Z)({className:Ue()(Lt,xt),ellipsis:qe.ellipsis,align:qe.align,scope:qe.rowScope,component:an,prefixCls:at.prefixCls,key:Gn,record:Gt,index:It,renderIndex:en,dataIndex:gt,render:yr,shouldCellUpdate:qe.shouldCellUpdate},An,{appendNode:Xn,additionalProps:(0,we.Z)((0,we.Z)({},qn),{},{style:jn},pr)}))}var Ur=$r,Gr=["data","index","className","rowKey","style","extra","getHeight"],Yr=ue.forwardRef(function(ke,at){var qe=ke.data,ft=ke.index,vt=ke.className,It=ke.rowKey,an=ke.style,en=ke.extra,Gt=ke.getHeight,et=(0,z.Z)(ke,Gr),xt=qe.record,Ct=qe.indent,bt=qe.index,Zt=be(ge,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gt=Zt.scrollX,Lt=Zt.flattenColumns,Wt=Zt.prefixCls,Qt=Zt.fixColumn,Tn=Zt.componentWidth,Dn=be(Zr,["getComponent"]),Gn=Dn.getComponent,An=kt(xt,It,ft,Ct),Xn=Gn(["body","row"],"div"),qn=Gn(["body","cell"],"div"),fr=An.rowSupportExpand,er=An.expanded,gr=An.rowProps,Dr=An.expandedRowRender,hr=An.expandedRowClassName,wr;if(fr&&er){var $n=Dr(xt,ft,Ct+1,er),In=un(hr,xt,ft,Ct),jn={};Qt&&(jn={style:(0,We.Z)({},"--virtual-width","".concat(Tn,"px"))});var Zn="".concat(Wt,"-expanded-row-cell");wr=ue.createElement(Xn,{className:Ue()("".concat(Wt,"-expanded-row"),"".concat(Wt,"-expanded-row-level-").concat(Ct+1),In)},ue.createElement(Je,{component:qn,prefixCls:Wt,className:Ue()(Zn,(0,We.Z)({},"".concat(Zn,"-fixed"),Qt)),additionalProps:jn},$n))}var yr=(0,we.Z)((0,we.Z)({},an),{},{width:gt});en&&(yr.position="absolute",yr.pointerEvents="none");var pr=ue.createElement(Xn,(0,pe.Z)({},gr,et,{"data-row-key":It,ref:fr?null:at,className:Ue()(vt,"".concat(Wt,"-row"),gr==null?void 0:gr.className,(0,We.Z)({},"".concat(Wt,"-row-extra"),en)),style:(0,we.Z)((0,we.Z)({},yr),gr==null?void 0:gr.style)}),Lt.map(function(Sr,Xr){return ue.createElement(Ur,{key:Xr,component:qn,rowInfo:An,column:Sr,colIndex:Xr,indent:Ct,index:ft,renderIndex:bt,record:xt,inverse:en,getHeight:Gt})}));return fr?ue.createElement("div",{ref:at},pr,wr):pr}),Vr=st(Yr),Mr=Vr,qr=ue.forwardRef(function(ke,at){var qe=ke.data,ft=ke.onScroll,vt=be(ge,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),It=vt.flattenColumns,an=vt.onColumnResize,en=vt.getRowKey,Gt=vt.expandedKeys,et=vt.prefixCls,xt=vt.childrenColumnName,Ct=vt.scrollX,bt=vt.direction,Zt=be(Zr),gt=Zt.sticky,Lt=Zt.scrollY,Wt=Zt.listItemHeight,Qt=Zt.getComponent,Tn=Zt.onScroll,Dn=ue.useRef(),Gn=Vt(qe,xt,Gt,en),An=ue.useMemo(function(){var wr=0;return It.map(function($n){var In=$n.width,jn=$n.key;return wr+=In,[jn,In,wr]})},[It]),Xn=ue.useMemo(function(){return An.map(function(wr){return wr[2]})},[An]);ue.useEffect(function(){An.forEach(function(wr){var $n=(0,Oe.Z)(wr,2),In=$n[0],jn=$n[1];an(In,jn)})},[An]),ue.useImperativeHandle(at,function(){var wr,$n={scrollTo:function(jn){var Zn;(Zn=Dn.current)===null||Zn===void 0||Zn.scrollTo(jn)},nativeElement:(wr=Dn.current)===null||wr===void 0?void 0:wr.nativeElement};return Object.defineProperty($n,"scrollLeft",{get:function(){var jn;return((jn=Dn.current)===null||jn===void 0?void 0:jn.getScrollInfo().x)||0},set:function(jn){var Zn;(Zn=Dn.current)===null||Zn===void 0||Zn.scrollTo({left:jn})}}),$n});var qn=function($n,In){var jn,Zn=(jn=Gn[In])===null||jn===void 0?void 0:jn.record,yr=$n.onCell;if(yr){var pr,Sr=yr(Zn,In);return(pr=Sr==null?void 0:Sr.rowSpan)!==null&&pr!==void 0?pr:1}return 1},fr=function($n){var In=$n.start,jn=$n.end,Zn=$n.getSize,yr=$n.offsetY;if(jn<0)return null;for(var pr=It.filter(function(ui){return qn(ui,In)===0}),Sr=In,Xr=function(ai){if(pr=pr.filter(function(Kn){return qn(Kn,ai)===0}),!pr.length)return Sr=ai,1},wi=In;wi>=0&&!Xr(wi);wi-=1);for(var oi=It.filter(function(ui){return qn(ui,jn)!==1}),ji=jn,Li=function(ai){if(oi=oi.filter(function(Kn){return qn(Kn,ai)!==1}),!oi.length)return ji=Math.max(ai-1,jn),1},Jr=jn;Jr<Gn.length&&!Li(Jr);Jr+=1);for(var ei=[],ti=function(ai){var Kn=Gn[ai];if(!Kn)return 1;It.some(function(lr){return qn(lr,ai)>1})&&ei.push(ai)},Ei=Sr;Ei<=ji;Ei+=1)ti(Ei);var ii=ei.map(function(ui){var ai=Gn[ui],Kn=en(ai.record,ui),lr=function(_r){var Qr=ui+_r-1,Wi=en(Gn[Qr].record,Qr),fi=Zn(Kn,Wi);return fi.bottom-fi.top},sr=Zn(Kn);return ue.createElement(Mr,{key:ui,data:ai,rowKey:Kn,index:ui,style:{top:-yr+sr.top},extra:!0,getHeight:lr})});return ii},er=ue.useMemo(function(){return{columnsOffset:Xn}},[Xn]),gr="".concat(et,"-tbody"),Dr=Qt(["body","wrapper"]),hr={};return gt&&(hr.position="sticky",hr.bottom=0,(0,Ce.Z)(gt)==="object"&>.offsetScroll&&(hr.bottom=gt.offsetScroll)),ue.createElement(ur.Provider,{value:er},ue.createElement(dr.Z,{fullHeight:!1,ref:Dn,prefixCls:"".concat(gr,"-virtual"),styles:{horizontalScrollBar:hr},className:gr,height:Lt,itemHeight:Wt||24,data:Gn,itemKey:function($n){return en($n.record)},component:Dr,scrollWidth:Ct,direction:bt,onVirtualScroll:function($n){var In,jn=$n.x;ft({currentTarget:(In=Dn.current)===null||In===void 0?void 0:In.nativeElement,scrollLeft:jn})},onScroll:Tn,extraRender:fr},function(wr,$n,In){var jn=en(wr.record,$n);return ue.createElement(Mr,{data:wr,rowKey:jn,index:$n,style:In.style})}))}),Kr=st(qr),On=Kr,Qn=function(at,qe){var ft=qe.ref,vt=qe.onScroll;return ue.createElement(On,{ref:ft,data:at,onScroll:vt})};function mr(ke,at){var qe=ke.data,ft=ke.columns,vt=ke.scroll,It=ke.sticky,an=ke.prefixCls,en=an===void 0?Ve:an,Gt=ke.className,et=ke.listItemHeight,xt=ke.components,Ct=ke.onScroll,bt=vt||{},Zt=bt.x,gt=bt.y;typeof Zt!="number"&&(Zt=1),typeof gt!="number"&&(gt=500);var Lt=(0,yn.zX)(function(Tn,Dn){return(0,tt.Z)(xt,Tn)||Dn}),Wt=(0,yn.zX)(Ct),Qt=ue.useMemo(function(){return{sticky:It,scrollY:gt,listItemHeight:et,getComponent:Lt,onScroll:Wt}},[It,gt,et,Lt,Wt]);return ue.createElement(Zr.Provider,{value:Qt},ue.createElement(Cr,(0,pe.Z)({},ke,{className:Ue()(Gt,"".concat(en,"-virtual")),scroll:(0,we.Z)((0,we.Z)({},vt),{},{x:Zt}),components:(0,we.Z)((0,we.Z)({},xt),{},{body:qe!=null&&qe.length?Qn:void 0}),columns:ft,internalHooks:oe.R,tailor:!0,ref:at})))}var Nr=ue.forwardRef(mr);function Ar(ke){return ot(Nr,ke)}var Or=Ar(),si=null},54451:function(on,nn,ce){"use strict";ce.d(nn,{g:function(){return ue},v:function(){return xe}});var oe=ce(27247),Oe=ce(43079),Me=ce(48736),nt=["expandable"],xe="RC_TABLE_INTERNAL_COL_DEFINE";function ue(Le){var Xe=Le.expandable,be=(0,Oe.Z)(Le,nt),pe;return"expandable"in Le?pe=(0,oe.Z)((0,oe.Z)({},be),Xe):pe=be,pe.showExpandColumn===!1&&(pe.expandIconColumnIndex=-1),pe}},22711:function(on,nn,ce){"use strict";ce.r(nn),ce.d(nn,{ResizableTextArea:function(){return Se},default:function(){return Yt}});var oe=ce(32855),Oe=ce(74430),Me=ce(27247),nt=ce(3300),xe=ce(11913),ue=ce(43079),Le=ce(92310),Xe=ce.n(Le),be=ce(36901),pe=ce(66003),rt=ce(30292),me=ce(18929),lt=ce(59301),je=ce(34666),Ze=ce(29301),Ee=ce(34280),Ae=ce(16089),ot=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,st=["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"],ut={},Pe;function ge(Et){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=Et.getAttribute("id")||Et.getAttribute("data-reactid")||Et.getAttribute("name");if(Jt&&ut[Ht])return ut[Ht];var ye=window.getComputedStyle(Et),he=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),qt=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),Pt=st.map(function(ct){return"".concat(ct,":").concat(ye.getPropertyValue(ct))}).join(";"),Ke={sizingStyle:Pt,paddingSize:mt,borderSize:qt,boxSizing:he};return Jt&&Ht&&(ut[Ht]=Ke),Ke}function Be(Et){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Pe||(Pe=document.createElement("textarea"),Pe.setAttribute("tab-index","-1"),Pe.setAttribute("aria-hidden","true"),Pe.setAttribute("name","hiddenTextarea"),document.body.appendChild(Pe)),Et.getAttribute("wrap")?Pe.setAttribute("wrap",Et.getAttribute("wrap")):Pe.removeAttribute("wrap");var he=ge(Et,Jt),mt=he.paddingSize,qt=he.borderSize,Pt=he.boxSizing,Ke=he.sizingStyle;Pe.setAttribute("style","".concat(Ke,";").concat(ot)),Pe.value=Et.value||Et.placeholder||"";var ct=void 0,dt=void 0,yn,_e=Pe.scrollHeight;if(Pt==="border-box"?_e+=qt:Pt==="content-box"&&(_e-=mt),Ht!==null||ye!==null){Pe.value=" ";var Dt=Pe.scrollHeight-mt;Ht!==null&&(ct=Dt*Ht,Pt==="border-box"&&(ct=ct+mt+qt),_e=Math.max(ct,_e)),ye!==null&&(dt=Dt*ye,Pt==="border-box"&&(dt=dt+mt+qt),yn=_e>dt?"":"hidden",_e=Math.min(dt,_e))}var Je={height:_e,overflowY:yn,resize:"none"};return ct&&(Je.minHeight=ct),dt&&(Je.maxHeight=dt),Je}var ze=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],yt=0,Ce=1,we=2,We=lt.forwardRef(function(Et,Jt){var Ht=Et,ye=Ht.prefixCls,he=Ht.defaultValue,mt=Ht.value,qt=Ht.autoSize,Pt=Ht.onResize,Ke=Ht.className,ct=Ht.style,dt=Ht.disabled,yn=Ht.onChange,_e=Ht.onInternalAutoSize,Dt=(0,ue.Z)(Ht,ze),Je=(0,me.Z)(he,{value:mt,postState:function(vn){return vn!=null?vn:""}}),Ot=(0,xe.Z)(Je,2),Nt=Ot[0],ae=Ot[1],te=function(vn){ae(vn.target.value),yn==null||yn(vn)},z=lt.useRef();lt.useImperativeHandle(Jt,function(){return{textArea:z.current}});var re=lt.useMemo(function(){return qt&&(0,je.Z)(qt)==="object"?[qt.minRows,qt.maxRows]:[]},[qt]),le=(0,xe.Z)(re,2),ne=le[0],de=le[1],Re=!!qt,wt=function(){try{if(document.activeElement===z.current){var vn=z.current,Pn=vn.selectionStart,Kt=vn.selectionEnd,kn=vn.scrollTop;z.current.setSelectionRange(Pn,Kt),z.current.scrollTop=kn}}catch(tr){}},Tt=lt.useState(we),Te=(0,xe.Z)(Tt,2),Ye=Te[0],Ge=Te[1],pt=lt.useState(),Rt=(0,xe.Z)(pt,2),Vt=Rt[0],kt=Rt[1],ln=function(){Ge(yt)};(0,Ee.Z)(function(){Re&&ln()},[mt,ne,de,Re]),(0,Ee.Z)(function(){if(Ye===yt)Ge(Ce);else if(Ye===Ce){var Ut=Be(z.current,!1,ne,de);Ge(we),kt(Ut)}else wt()},[Ye]);var $t=lt.useRef(),_t=function(){Ae.Z.cancel($t.current)},$e=function(vn){Ye===we&&(Pt==null||Pt(vn),qt&&(_t(),$t.current=(0,Ae.Z)(function(){ln()})))};lt.useEffect(function(){return _t},[]);var un=Re?Vt:null,Mt=(0,Me.Z)((0,Me.Z)({},ct),un);return(Ye===yt||Ye===Ce)&&(Mt.overflowY="hidden",Mt.overflowX="hidden"),lt.createElement(Ze.Z,{onResize:$e,disabled:!(qt||Pt)},lt.createElement("textarea",(0,oe.Z)({},Dt,{ref:z,style:Mt,className:Xe()(ye,Ke,(0,Oe.Z)({},"".concat(ye,"-disabled"),dt)),disabled:dt,value:Nt,onChange:te})))}),Se=We,Ue=["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"],Ne=lt.forwardRef(function(Et,Jt){var Ht,ye=Et.defaultValue,he=Et.value,mt=Et.onFocus,qt=Et.onBlur,Pt=Et.onChange,Ke=Et.allowClear,ct=Et.maxLength,dt=Et.onCompositionStart,yn=Et.onCompositionEnd,_e=Et.suffix,Dt=Et.prefixCls,Je=Dt===void 0?"rc-textarea":Dt,Ot=Et.showCount,Nt=Et.count,ae=Et.className,te=Et.style,z=Et.disabled,re=Et.hidden,le=Et.classNames,ne=Et.styles,de=Et.onResize,Re=Et.onClear,wt=Et.onPressEnter,Tt=Et.readOnly,Te=Et.autoSize,Ye=Et.onKeyDown,Ge=(0,ue.Z)(Et,Ue),pt=(0,me.Z)(ye,{value:he,defaultValue:ye}),Rt=(0,xe.Z)(pt,2),Vt=Rt[0],kt=Rt[1],ln=Vt==null?"":String(Vt),$t=lt.useState(!1),_t=(0,xe.Z)($t,2),$e=_t[0],un=_t[1],Mt=lt.useRef(!1),Ut=lt.useState(null),vn=(0,xe.Z)(Ut,2),Pn=vn[0],Kt=vn[1],kn=(0,lt.useRef)(null),tr=(0,lt.useRef)(null),Jn=function(){var cn;return(cn=tr.current)===null||cn===void 0?void 0:cn.textArea},Ft=function(){Jn().focus()};(0,lt.useImperativeHandle)(Jt,function(){var St;return{resizableTextArea:tr.current,focus:Ft,blur:function(){Jn().blur()},nativeElement:((St=kn.current)===null||St===void 0?void 0:St.nativeElement)||Jn()}}),(0,lt.useEffect)(function(){un(function(St){return!z&&St})},[z]);var Bt=lt.useState(null),At=(0,xe.Z)(Bt,2),xn=At[0],wn=At[1];lt.useEffect(function(){if(xn){var St;(St=Jn()).setSelectionRange.apply(St,(0,nt.Z)(xn))}},[xn]);var zn=(0,pe.Z)(Nt,Ot),rr=(Ht=zn.max)!==null&&Ht!==void 0?Ht:ct,mn=Number(rr)>0,Xt=zn.strategy(ln),Nn=!!rr&&Xt>rr,kr=function(cn,nr){var Er=nr;!Mt.current&&zn.exceedFormatter&&zn.max&&zn.strategy(nr)>zn.max&&(Er=zn.exceedFormatter(nr,{max:zn.max}),nr!==Er&&wn([Jn().selectionStart||0,Jn().selectionEnd||0])),kt(Er),(0,rt.rJ)(cn.currentTarget,cn,Pt,Er)},gn=function(cn){Mt.current=!0,dt==null||dt(cn)},Ln=function(cn){Mt.current=!1,kr(cn,cn.currentTarget.value),yn==null||yn(cn)},Mn=function(cn){kr(cn,cn.target.value)},_n=function(cn){cn.key==="Enter"&&wt&&wt(cn),Ye==null||Ye(cn)},Tr=function(cn){un(!0),mt==null||mt(cn)},xr=function(cn){un(!1),qt==null||qt(cn)},Hr=function(cn){kt(""),Ft(),(0,rt.rJ)(Jn(),cn,Pt)},br=_e,or;zn.show&&(zn.showFormatter?or=zn.showFormatter({value:ln,count:Xt,maxLength:rr}):or="".concat(Xt).concat(mn?" / ".concat(rr):""),br=lt.createElement(lt.Fragment,null,br,lt.createElement("span",{className:Xe()("".concat(Je,"-data-count"),le==null?void 0:le.count),style:ne==null?void 0:ne.count},or)));var Fr=function(cn){var nr;de==null||de(cn),(nr=Jn())!==null&&nr!==void 0&&nr.style.height&&Kt(!0)},dn=!Te&&!Ot&&!Ke;return lt.createElement(be.BaseInput,{ref:kn,value:ln,allowClear:Ke,handleReset:Hr,suffix:br,prefixCls:Je,classNames:(0,Me.Z)((0,Me.Z)({},le),{},{affixWrapper:Xe()(le==null?void 0:le.affixWrapper,(0,Oe.Z)((0,Oe.Z)({},"".concat(Je,"-show-count"),Ot),"".concat(Je,"-textarea-allow-clear"),Ke))}),disabled:z,focused:$e,className:Xe()(ae,Nn&&"".concat(Je,"-out-of-range")),style:(0,Me.Z)((0,Me.Z)({},te),Pn&&!dn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof or=="string"?or:void 0}},hidden:re,readOnly:Tt,onClear:Re},lt.createElement(Se,(0,oe.Z)({},Ge,{autoSize:Te,maxLength:ct,onKeyDown:_n,onChange:Mn,onFocus:Tr,onBlur:xr,onCompositionStart:gn,onCompositionEnd:Ln,className:Xe()(le==null?void 0:le.textarea),style:(0,Me.Z)((0,Me.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:Je,onResize:Fr,ref:tr,readOnly:Tt})))}),tt=Ne,Yt=tt},639:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return ut}});var oe=ce(32855),Oe=ce(74430),Me=ce(27247),nt=ce(11913),xe=ce(43079),ue=ce(59301),Le=ce(92310),Xe=ce.n(Le),be=ce(26112),pe=ce(30699),rt=function(ge){for(var Be=ge.prefixCls,ze=ge.level,yt=ge.isStart,Ce=ge.isEnd,we="".concat(Be,"-indent-unit"),We=[],Se=0;Se<ze;Se+=1)We.push(ue.createElement("span",{key:Se,className:Xe()(we,(0,Oe.Z)((0,Oe.Z)({},"".concat(we,"-start"),yt[Se]),"".concat(we,"-end"),Ce[Se]))}));return ue.createElement("span",{"aria-hidden":"true",className:"".concat(Be,"-indent")},We)},me=ue.memo(rt),lt=ce(65065),je=ce(34061),Ze=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Ee="open",Ae="close",ot="---",st=function(ge){var Be,ze,yt,Ce=ge.eventKey,we=ge.className,We=ge.style,Se=ge.dragOver,Ue=ge.dragOverGapTop,Ne=ge.dragOverGapBottom,tt=ge.isLeaf,Yt=ge.isStart,Et=ge.isEnd,Jt=ge.expanded,Ht=ge.selected,ye=ge.checked,he=ge.halfChecked,mt=ge.loading,qt=ge.domRef,Pt=ge.active,Ke=ge.data,ct=ge.onMouseMove,dt=ge.selectable,yn=(0,xe.Z)(ge,Ze),_e=ue.useContext(pe.k),Dt=ue.useContext(pe.y),Je=ue.useRef(null),Ot=ue.useState(!1),Nt=(0,nt.Z)(Ot,2),ae=Nt[0],te=Nt[1],z=!!(_e.disabled||ge.disabled||(Be=Dt.nodeDisabled)!==null&&Be!==void 0&&Be.call(Dt,Ke)),re=ue.useMemo(function(){return!_e.checkable||ge.checkable===!1?!1:_e.checkable},[_e.checkable,ge.checkable]),le=function(Xt){z||_e.onNodeSelect(Xt,(0,je.F)(ge))},ne=function(Xt){z||!re||ge.disableCheckbox||_e.onNodeCheck(Xt,(0,je.F)(ge),!ye)},de=ue.useMemo(function(){return typeof dt=="boolean"?dt:_e.selectable},[dt,_e.selectable]),Re=function(Xt){_e.onNodeClick(Xt,(0,je.F)(ge)),de?le(Xt):ne(Xt)},wt=function(Xt){_e.onNodeDoubleClick(Xt,(0,je.F)(ge))},Tt=function(Xt){_e.onNodeMouseEnter(Xt,(0,je.F)(ge))},Te=function(Xt){_e.onNodeMouseLeave(Xt,(0,je.F)(ge))},Ye=function(Xt){_e.onNodeContextMenu(Xt,(0,je.F)(ge))},Ge=ue.useMemo(function(){return!!(_e.draggable&&(!_e.draggable.nodeDraggable||_e.draggable.nodeDraggable(Ke)))},[_e.draggable,Ke]),pt=function(Xt){Xt.stopPropagation(),te(!0),_e.onNodeDragStart(Xt,ge);try{Xt.dataTransfer.setData("text/plain","")}catch(Nn){}},Rt=function(Xt){Xt.preventDefault(),Xt.stopPropagation(),_e.onNodeDragEnter(Xt,ge)},Vt=function(Xt){Xt.preventDefault(),Xt.stopPropagation(),_e.onNodeDragOver(Xt,ge)},kt=function(Xt){Xt.stopPropagation(),_e.onNodeDragLeave(Xt,ge)},ln=function(Xt){Xt.stopPropagation(),te(!1),_e.onNodeDragEnd(Xt,ge)},$t=function(Xt){Xt.preventDefault(),Xt.stopPropagation(),te(!1),_e.onNodeDrop(Xt,ge)},_t=function(Xt){mt||_e.onNodeExpand(Xt,(0,je.F)(ge))},$e=ue.useMemo(function(){var mn=(0,lt.Z)(_e.keyEntities,Ce)||{},Xt=mn.children;return!!(Xt||[]).length},[_e.keyEntities,Ce]),un=ue.useMemo(function(){return tt===!1?!1:tt||!_e.loadData&&!$e||_e.loadData&&ge.loaded&&!$e},[tt,_e.loadData,$e,ge.loaded]);ue.useEffect(function(){mt||typeof _e.loadData=="function"&&Jt&&!un&&!ge.loaded&&_e.onNodeLoad((0,je.F)(ge))},[mt,_e.loadData,_e.onNodeLoad,Jt,un,ge]);var Mt=ue.useMemo(function(){var mn;return(mn=_e.draggable)!==null&&mn!==void 0&&mn.icon?ue.createElement("span",{className:"".concat(_e.prefixCls,"-draggable-icon")},_e.draggable.icon):null},[_e.draggable]),Ut=function(Xt){var Nn=ge.switcherIcon||_e.switcherIcon;return typeof Nn=="function"?Nn((0,Me.Z)((0,Me.Z)({},ge),{},{isLeaf:Xt})):Nn},vn=function(){if(un){var Xt=Ut(!0);return Xt!==!1?ue.createElement("span",{className:Xe()("".concat(_e.prefixCls,"-switcher"),"".concat(_e.prefixCls,"-switcher-noop"))},Xt):null}var Nn=Ut(!1);return Nn!==!1?ue.createElement("span",{onClick:_t,className:Xe()("".concat(_e.prefixCls,"-switcher"),"".concat(_e.prefixCls,"-switcher_").concat(Jt?Ee:Ae))},Nn):null},Pn=ue.useMemo(function(){if(!re)return null;var mn=typeof re!="boolean"?re:null;return ue.createElement("span",{className:Xe()("".concat(_e.prefixCls,"-checkbox"),(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},"".concat(_e.prefixCls,"-checkbox-checked"),ye),"".concat(_e.prefixCls,"-checkbox-indeterminate"),!ye&&he),"".concat(_e.prefixCls,"-checkbox-disabled"),z||ge.disableCheckbox)),onClick:ne,role:"checkbox","aria-checked":he?"mixed":ye,"aria-disabled":z||ge.disableCheckbox,"aria-label":"Select ".concat(typeof ge.title=="string"?ge.title:"tree node")},mn)},[re,ye,he,z,ge.disableCheckbox,ge.title]),Kt=ue.useMemo(function(){return un?null:Jt?Ee:Ae},[un,Jt]),kn=ue.useMemo(function(){return ue.createElement("span",{className:Xe()("".concat(_e.prefixCls,"-iconEle"),"".concat(_e.prefixCls,"-icon__").concat(Kt||"docu"),(0,Oe.Z)({},"".concat(_e.prefixCls,"-icon_loading"),mt))})},[_e.prefixCls,Kt,mt]),tr=ue.useMemo(function(){var mn=!!_e.draggable,Xt=!ge.disabled&&mn&&_e.dragOverNodeKey===Ce;return Xt?_e.dropIndicatorRender({dropPosition:_e.dropPosition,dropLevelOffset:_e.dropLevelOffset,indent:_e.indent,prefixCls:_e.prefixCls,direction:_e.direction}):null},[_e.dropPosition,_e.dropLevelOffset,_e.indent,_e.prefixCls,_e.direction,_e.draggable,_e.dragOverNodeKey,_e.dropIndicatorRender]),Jn=ue.useMemo(function(){var mn=ge.title,Xt=mn===void 0?ot:mn,Nn="".concat(_e.prefixCls,"-node-content-wrapper"),kr;if(_e.showIcon){var gn=ge.icon||_e.icon;kr=gn?ue.createElement("span",{className:Xe()("".concat(_e.prefixCls,"-iconEle"),"".concat(_e.prefixCls,"-icon__customize"))},typeof gn=="function"?gn(ge):gn):kn}else _e.loadData&&mt&&(kr=kn);var Ln;return typeof Xt=="function"?Ln=Xt(Ke):_e.titleRender?Ln=_e.titleRender(Ke):Ln=Xt,ue.createElement("span",{ref:Je,title:typeof Xt=="string"?Xt:"",className:Xe()(Nn,"".concat(Nn,"-").concat(Kt||"normal"),(0,Oe.Z)({},"".concat(_e.prefixCls,"-node-selected"),!z&&(Ht||ae))),onMouseEnter:Tt,onMouseLeave:Te,onContextMenu:Ye,onClick:Re,onDoubleClick:wt},kr,ue.createElement("span",{className:"".concat(_e.prefixCls,"-title")},Ln),tr)},[_e.prefixCls,_e.showIcon,ge,_e.icon,kn,_e.titleRender,Ke,Kt,Tt,Te,Ye,Re,wt]),Ft=(0,be.Z)(yn,{aria:!0,data:!0}),Bt=(0,lt.Z)(_e.keyEntities,Ce)||{},At=Bt.level,xn=Et[Et.length-1],wn=!z&&Ge,zn=_e.draggingNodeKey===Ce,rr=dt!==void 0?{"aria-selected":!!dt}:void 0;return ue.createElement("div",(0,oe.Z)({ref:qt,role:"treeitem","aria-expanded":tt?void 0:Jt,className:Xe()(we,"".concat(_e.prefixCls,"-treenode"),(yt={},(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)(yt,"".concat(_e.prefixCls,"-treenode-disabled"),z),"".concat(_e.prefixCls,"-treenode-switcher-").concat(Jt?"open":"close"),!tt),"".concat(_e.prefixCls,"-treenode-checkbox-checked"),ye),"".concat(_e.prefixCls,"-treenode-checkbox-indeterminate"),he),"".concat(_e.prefixCls,"-treenode-selected"),Ht),"".concat(_e.prefixCls,"-treenode-loading"),mt),"".concat(_e.prefixCls,"-treenode-active"),Pt),"".concat(_e.prefixCls,"-treenode-leaf-last"),xn),"".concat(_e.prefixCls,"-treenode-draggable"),Ge),"dragging",zn),(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)(yt,"drop-target",_e.dropTargetKey===Ce),"drop-container",_e.dropContainerKey===Ce),"drag-over",!z&&Se),"drag-over-gap-top",!z&&Ue),"drag-over-gap-bottom",!z&&Ne),"filter-node",(ze=_e.filterTreeNode)===null||ze===void 0?void 0:ze.call(_e,(0,je.F)(ge))),"".concat(_e.prefixCls,"-treenode-leaf"),un))),style:We,draggable:wn,onDragStart:wn?pt:void 0,onDragEnter:Ge?Rt:void 0,onDragOver:Ge?Vt:void 0,onDragLeave:Ge?kt:void 0,onDrop:Ge?$t:void 0,onDragEnd:Ge?ln:void 0,onMouseMove:ct},rr,Ft),ue.createElement(me,{prefixCls:_e.prefixCls,level:At,isStart:Yt,isEnd:Et}),Mt,vn(),Pn,Jn)};st.isTreeNode=1;var ut=st},30699:function(on,nn,ce){"use strict";ce.d(nn,{k:function(){return Oe},y:function(){return Me}});var oe=ce(59301),Oe=oe.createContext(null),Me=oe.createContext({})},89149:function(on,nn,ce){"use strict";ce.d(nn,{OF:function(){return Ce.Z},y6:function(){return Ae.y},ZP:function(){return z}});var oe=ce(32855),Oe=ce(34666),Me=ce(27247),nt=ce(3300),xe=ce(33377),ue=ce(93912),Le=ce(83383),Xe=ce(18881),be=ce(85461),pe=ce(74430),rt=ce(92310),me=ce.n(rt),lt=ce(10228),je=ce(26112),Ze=ce(48736),Ee=ce(59301),Ae=ce(30699),ot=function(le){var ne=le.dropPosition,de=le.dropLevelOffset,Re=le.indent,wt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(ne){case-1:wt.top=0,wt.left=-de*Re;break;case 1:wt.bottom=0,wt.left=-de*Re;break;case 0:wt.bottom=0,wt.left=Re;break}return Ee.createElement("div",{style:wt})},st=ot;function ut(re){if(re==null)throw new TypeError("Cannot destructure "+re)}var Pe=ce(11913),ge=ce(43079),Be=ce(34280),ze=ce(6790),yt=ce(77900),Ce=ce(639);function we(re,le){var ne=Ee.useState(!1),de=(0,Pe.Z)(ne,2),Re=de[0],wt=de[1];(0,Be.Z)(function(){if(Re)return re(),function(){le()}},[Re]),(0,Be.Z)(function(){return wt(!0),function(){wt(!1)}},[])}var We=we,Se=ce(34061),Ue=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ne=Ee.forwardRef(function(re,le){var ne=re.className,de=re.style,Re=re.motion,wt=re.motionNodes,Tt=re.motionType,Te=re.onMotionStart,Ye=re.onMotionEnd,Ge=re.active,pt=re.treeNodeRequiredProps,Rt=(0,ge.Z)(re,Ue),Vt=Ee.useState(!0),kt=(0,Pe.Z)(Vt,2),ln=kt[0],$t=kt[1],_t=Ee.useContext(Ae.k),$e=_t.prefixCls,un=wt&&Tt!=="hide";(0,Be.Z)(function(){wt&&un!==ln&&$t(un)},[wt]);var Mt=function(){wt&&Te()},Ut=Ee.useRef(!1),vn=function(){wt&&!Ut.current&&(Ut.current=!0,Ye())};We(Mt,vn);var Pn=function(kn){un===kn&&vn()};return wt?Ee.createElement(yt.default,(0,oe.Z)({ref:le,visible:ln},Re,{motionAppear:Tt==="show",onVisibleChanged:Pn}),function(Kt,kn){var tr=Kt.className,Jn=Kt.style;return Ee.createElement("div",{ref:kn,className:me()("".concat($e,"-treenode-motion"),tr),style:Jn},wt.map(function(Ft){var Bt=Object.assign({},(ut(Ft.data),Ft.data)),At=Ft.title,xn=Ft.key,wn=Ft.isStart,zn=Ft.isEnd;delete Bt.children;var rr=(0,Se.H8)(xn,pt);return Ee.createElement(Ce.Z,(0,oe.Z)({},Bt,rr,{title:At,active:Ge,data:Ft.data,key:xn,isStart:wn,isEnd:zn}))}))}):Ee.createElement(Ce.Z,(0,oe.Z)({domRef:le,className:ne,style:de},Rt,{active:Ge}))}),tt=Ne;function Yt(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ne=re.length,de=le.length;if(Math.abs(ne-de)!==1)return{add:!1,key:null};function Re(wt,Tt){var Te=new Map;wt.forEach(function(Ge){Te.set(Ge,!0)});var Ye=Tt.filter(function(Ge){return!Te.has(Ge)});return Ye.length===1?Ye[0]:null}return ne<de?{add:!0,key:Re(re,le)}:{add:!1,key:Re(le,re)}}function Et(re,le,ne){var de=re.findIndex(function(Te){return Te.key===ne}),Re=re[de+1],wt=le.findIndex(function(Te){return Te.key===ne});if(Re){var Tt=le.findIndex(function(Te){return Te.key===Re.key});return le.slice(wt+1,Tt)}return le.slice(wt+1)}var Jt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Ht={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ye=function(){},he="RC_TREE_MOTION_".concat(Math.random()),mt={key:he},qt={key:he,level:0,index:0,pos:"0",node:mt,nodes:[mt]},Pt={parent:null,children:[],pos:qt.pos,data:mt,title:null,key:he,isStart:[],isEnd:[]};function Ke(re,le,ne,de){return le===!1||!ne?re:re.slice(0,Math.ceil(ne/de)+1)}function ct(re){var le=re.key,ne=re.pos;return(0,Se.km)(le,ne)}function dt(re){for(var le=String(re.data.key),ne=re;ne.parent;)ne=ne.parent,le="".concat(ne.data.key," > ").concat(le);return le}var yn=Ee.forwardRef(function(re,le){var ne=re.prefixCls,de=re.data,Re=re.selectable,wt=re.checkable,Tt=re.expandedKeys,Te=re.selectedKeys,Ye=re.checkedKeys,Ge=re.loadedKeys,pt=re.loadingKeys,Rt=re.halfCheckedKeys,Vt=re.keyEntities,kt=re.disabled,ln=re.dragging,$t=re.dragOverNodeKey,_t=re.dropPosition,$e=re.motion,un=re.height,Mt=re.itemHeight,Ut=re.virtual,vn=re.scrollWidth,Pn=re.focusable,Kt=re.activeItem,kn=re.focused,tr=re.tabIndex,Jn=re.onKeyDown,Ft=re.onFocus,Bt=re.onBlur,At=re.onActiveChange,xn=re.onListChangeStart,wn=re.onListChangeEnd,zn=(0,ge.Z)(re,Jt),rr=Ee.useRef(null),mn=Ee.useRef(null);Ee.useImperativeHandle(le,function(){return{scrollTo:function(hn){rr.current.scrollTo(hn)},getIndentWidth:function(){return mn.current.offsetWidth}}});var Xt=Ee.useState(Tt),Nn=(0,Pe.Z)(Xt,2),kr=Nn[0],gn=Nn[1],Ln=Ee.useState(de),Mn=(0,Pe.Z)(Ln,2),_n=Mn[0],Tr=Mn[1],xr=Ee.useState(de),Hr=(0,Pe.Z)(xr,2),br=Hr[0],or=Hr[1],Fr=Ee.useState([]),dn=(0,Pe.Z)(Fr,2),St=dn[0],cn=dn[1],nr=Ee.useState(null),Er=(0,Pe.Z)(nr,2),Fe=Er[0],He=Er[1],rn=Ee.useRef(de);rn.current=de;function zt(){var sn=rn.current;Tr(sn),or(sn),cn([]),He(null),wn()}(0,Be.Z)(function(){gn(Tt);var sn=Yt(kr,Tt);if(sn.key!==null)if(sn.add){var hn=_n.findIndex(function(Sn){var Fn=Sn.key;return Fn===sn.key}),bn=Ke(Et(_n,de,sn.key),Ut,un,Mt),pn=_n.slice();pn.splice(hn+1,0,Pt),or(pn),cn(bn),He("show")}else{var Cn=de.findIndex(function(Sn){var Fn=Sn.key;return Fn===sn.key}),Ve=Ke(Et(de,_n,sn.key),Ut,un,Mt),Vn=de.slice();Vn.splice(Cn+1,0,Pt),or(Vn),cn(Ve),He("hide")}else _n!==de&&(Tr(de),or(de))},[Tt,de]),Ee.useEffect(function(){ln||zt()},[ln]);var Qe=$e?br:de,jt={expandedKeys:Tt,selectedKeys:Te,loadedKeys:Ge,loadingKeys:pt,checkedKeys:Ye,halfCheckedKeys:Rt,dragOverNodeKey:$t,dropPosition:_t,keyEntities:Vt};return Ee.createElement(Ee.Fragment,null,kn&&Kt&&Ee.createElement("span",{style:Ht,"aria-live":"assertive"},dt(Kt)),Ee.createElement("div",null,Ee.createElement("input",{style:Ht,disabled:Pn===!1||kt,tabIndex:Pn!==!1?tr:null,onKeyDown:Jn,onFocus:Ft,onBlur:Bt,value:"",onChange:ye,"aria-label":"for screen reader"})),Ee.createElement("div",{className:"".concat(ne,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},Ee.createElement("div",{className:"".concat(ne,"-indent")},Ee.createElement("div",{ref:mn,className:"".concat(ne,"-indent-unit")}))),Ee.createElement(ze.Z,(0,oe.Z)({},zn,{data:Qe,itemKey:ct,height:un,fullHeight:!1,virtual:Ut,itemHeight:Mt,scrollWidth:vn,prefixCls:"".concat(ne,"-list"),ref:rr,role:"tree",onVisibleChange:function(hn){hn.every(function(bn){return ct(bn)!==he})&&zt()}}),function(sn){var hn=sn.pos,bn=Object.assign({},(ut(sn.data),sn.data)),pn=sn.title,Cn=sn.key,Ve=sn.isStart,Vn=sn.isEnd,Sn=(0,Se.km)(Cn,hn);delete bn.key,delete bn.children;var Fn=(0,Se.H8)(Sn,jt);return Ee.createElement(tt,(0,oe.Z)({},bn,Fn,{title:pn,active:!!Kt&&Cn===Kt.key,pos:hn,data:sn.data,isStart:Ve,isEnd:Vn,motion:$e,motionNodes:Cn===he?St:null,motionType:Fe,onMotionStart:xn,onMotionEnd:zt,treeNodeRequiredProps:jt,onMouseMove:function(){At(null)}}))}))}),_e=yn,Dt=ce(82661),Je=ce(34643),Ot=ce(65065),Nt=10,ae=function(re){(0,Xe.Z)(ne,re);var le=(0,be.Z)(ne);function ne(){var de;(0,xe.Z)(this,ne);for(var Re=arguments.length,wt=new Array(Re),Tt=0;Tt<Re;Tt++)wt[Tt]=arguments[Tt];return de=le.call.apply(le,[this].concat(wt)),(0,pe.Z)((0,Le.Z)(de),"destroyed",!1),(0,pe.Z)((0,Le.Z)(de),"delayedDragEnterLogic",void 0),(0,pe.Z)((0,Le.Z)(de),"loadingRetryTimes",{}),(0,pe.Z)((0,Le.Z)(de),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Se.w$)()}),(0,pe.Z)((0,Le.Z)(de),"dragStartMousePosition",null),(0,pe.Z)((0,Le.Z)(de),"dragNodeProps",null),(0,pe.Z)((0,Le.Z)(de),"currentMouseOverDroppableNodeKey",null),(0,pe.Z)((0,Le.Z)(de),"listRef",Ee.createRef()),(0,pe.Z)((0,Le.Z)(de),"onNodeDragStart",function(Te,Ye){var Ge=de.state,pt=Ge.expandedKeys,Rt=Ge.keyEntities,Vt=de.props.onDragStart,kt=Ye.eventKey;de.dragNodeProps=Ye,de.dragStartMousePosition={x:Te.clientX,y:Te.clientY};var ln=(0,Dt._5)(pt,kt);de.setState({draggingNodeKey:kt,dragChildrenKeys:(0,Dt.wA)(kt,Rt),indent:de.listRef.current.getIndentWidth()}),de.setExpandedKeys(ln),window.addEventListener("dragend",de.onWindowDragEnd),Vt==null||Vt({event:Te,node:(0,Se.F)(Ye)})}),(0,pe.Z)((0,Le.Z)(de),"onNodeDragEnter",function(Te,Ye){var Ge=de.state,pt=Ge.expandedKeys,Rt=Ge.keyEntities,Vt=Ge.dragChildrenKeys,kt=Ge.flattenNodes,ln=Ge.indent,$t=de.props,_t=$t.onDragEnter,$e=$t.onExpand,un=$t.allowDrop,Mt=$t.direction,Ut=Ye.pos,vn=Ye.eventKey;if(de.currentMouseOverDroppableNodeKey!==vn&&(de.currentMouseOverDroppableNodeKey=vn),!de.dragNodeProps){de.resetDragState();return}var Pn=(0,Dt.OM)(Te,de.dragNodeProps,Ye,ln,de.dragStartMousePosition,un,kt,Rt,pt,Mt),Kt=Pn.dropPosition,kn=Pn.dropLevelOffset,tr=Pn.dropTargetKey,Jn=Pn.dropContainerKey,Ft=Pn.dropTargetPos,Bt=Pn.dropAllowed,At=Pn.dragOverNodeKey;if(Vt.includes(tr)||!Bt){de.resetDragState();return}if(de.delayedDragEnterLogic||(de.delayedDragEnterLogic={}),Object.keys(de.delayedDragEnterLogic).forEach(function(xn){clearTimeout(de.delayedDragEnterLogic[xn])}),de.dragNodeProps.eventKey!==Ye.eventKey&&(Te.persist(),de.delayedDragEnterLogic[Ut]=window.setTimeout(function(){if(de.state.draggingNodeKey!==null){var xn=(0,nt.Z)(pt),wn=(0,Ot.Z)(Rt,Ye.eventKey);wn&&(wn.children||[]).length&&(xn=(0,Dt.L0)(pt,Ye.eventKey)),de.props.hasOwnProperty("expandedKeys")||de.setExpandedKeys(xn),$e==null||$e(xn,{node:(0,Se.F)(Ye),expanded:!0,nativeEvent:Te.nativeEvent})}},800)),de.dragNodeProps.eventKey===tr&&kn===0){de.resetDragState();return}de.setState({dragOverNodeKey:At,dropPosition:Kt,dropLevelOffset:kn,dropTargetKey:tr,dropContainerKey:Jn,dropTargetPos:Ft,dropAllowed:Bt}),_t==null||_t({event:Te,node:(0,Se.F)(Ye),expandedKeys:pt})}),(0,pe.Z)((0,Le.Z)(de),"onNodeDragOver",function(Te,Ye){var Ge=de.state,pt=Ge.dragChildrenKeys,Rt=Ge.flattenNodes,Vt=Ge.keyEntities,kt=Ge.expandedKeys,ln=Ge.indent,$t=de.props,_t=$t.onDragOver,$e=$t.allowDrop,un=$t.direction;if(de.dragNodeProps){var Mt=(0,Dt.OM)(Te,de.dragNodeProps,Ye,ln,de.dragStartMousePosition,$e,Rt,Vt,kt,un),Ut=Mt.dropPosition,vn=Mt.dropLevelOffset,Pn=Mt.dropTargetKey,Kt=Mt.dropContainerKey,kn=Mt.dropTargetPos,tr=Mt.dropAllowed,Jn=Mt.dragOverNodeKey;pt.includes(Pn)||!tr||(de.dragNodeProps.eventKey===Pn&&vn===0?de.state.dropPosition===null&&de.state.dropLevelOffset===null&&de.state.dropTargetKey===null&&de.state.dropContainerKey===null&&de.state.dropTargetPos===null&&de.state.dropAllowed===!1&&de.state.dragOverNodeKey===null||de.resetDragState():Ut===de.state.dropPosition&&vn===de.state.dropLevelOffset&&Pn===de.state.dropTargetKey&&Kt===de.state.dropContainerKey&&kn===de.state.dropTargetPos&&tr===de.state.dropAllowed&&Jn===de.state.dragOverNodeKey||de.setState({dropPosition:Ut,dropLevelOffset:vn,dropTargetKey:Pn,dropContainerKey:Kt,dropTargetPos:kn,dropAllowed:tr,dragOverNodeKey:Jn}),_t==null||_t({event:Te,node:(0,Se.F)(Ye)}))}}),(0,pe.Z)((0,Le.Z)(de),"onNodeDragLeave",function(Te,Ye){de.currentMouseOverDroppableNodeKey===Ye.eventKey&&!Te.currentTarget.contains(Te.relatedTarget)&&(de.resetDragState(),de.currentMouseOverDroppableNodeKey=null);var Ge=de.props.onDragLeave;Ge==null||Ge({event:Te,node:(0,Se.F)(Ye)})}),(0,pe.Z)((0,Le.Z)(de),"onWindowDragEnd",function(Te){de.onNodeDragEnd(Te,null,!0),window.removeEventListener("dragend",de.onWindowDragEnd)}),(0,pe.Z)((0,Le.Z)(de),"onNodeDragEnd",function(Te,Ye){var Ge=de.props.onDragEnd;de.setState({dragOverNodeKey:null}),de.cleanDragState(),Ge==null||Ge({event:Te,node:(0,Se.F)(Ye)}),de.dragNodeProps=null,window.removeEventListener("dragend",de.onWindowDragEnd)}),(0,pe.Z)((0,Le.Z)(de),"onNodeDrop",function(Te,Ye){var Ge,pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Rt=de.state,Vt=Rt.dragChildrenKeys,kt=Rt.dropPosition,ln=Rt.dropTargetKey,$t=Rt.dropTargetPos,_t=Rt.dropAllowed;if(_t){var $e=de.props.onDrop;if(de.setState({dragOverNodeKey:null}),de.cleanDragState(),ln!==null){var un=(0,Me.Z)((0,Me.Z)({},(0,Se.H8)(ln,de.getTreeNodeRequiredProps())),{},{active:((Ge=de.getActiveItem())===null||Ge===void 0?void 0:Ge.key)===ln,data:(0,Ot.Z)(de.state.keyEntities,ln).node}),Mt=Vt.includes(ln);(0,Ze.ZP)(!Mt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ut=(0,Dt.yx)($t),vn={event:Te,node:(0,Se.F)(un),dragNode:de.dragNodeProps?(0,Se.F)(de.dragNodeProps):null,dragNodesKeys:[de.dragNodeProps.eventKey].concat(Vt),dropToGap:kt!==0,dropPosition:kt+Number(Ut[Ut.length-1])};pt||$e==null||$e(vn),de.dragNodeProps=null}}}),(0,pe.Z)((0,Le.Z)(de),"cleanDragState",function(){var Te=de.state.draggingNodeKey;Te!==null&&de.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),de.dragStartMousePosition=null,de.currentMouseOverDroppableNodeKey=null}),(0,pe.Z)((0,Le.Z)(de),"triggerExpandActionExpand",function(Te,Ye){var Ge=de.state,pt=Ge.expandedKeys,Rt=Ge.flattenNodes,Vt=Ye.expanded,kt=Ye.key,ln=Ye.isLeaf;if(!(ln||Te.shiftKey||Te.metaKey||Te.ctrlKey)){var $t=Rt.filter(function($e){return $e.key===kt})[0],_t=(0,Se.F)((0,Me.Z)((0,Me.Z)({},(0,Se.H8)(kt,de.getTreeNodeRequiredProps())),{},{data:$t.data}));de.setExpandedKeys(Vt?(0,Dt._5)(pt,kt):(0,Dt.L0)(pt,kt)),de.onNodeExpand(Te,_t)}}),(0,pe.Z)((0,Le.Z)(de),"onNodeClick",function(Te,Ye){var Ge=de.props,pt=Ge.onClick,Rt=Ge.expandAction;Rt==="click"&&de.triggerExpandActionExpand(Te,Ye),pt==null||pt(Te,Ye)}),(0,pe.Z)((0,Le.Z)(de),"onNodeDoubleClick",function(Te,Ye){var Ge=de.props,pt=Ge.onDoubleClick,Rt=Ge.expandAction;Rt==="doubleClick"&&de.triggerExpandActionExpand(Te,Ye),pt==null||pt(Te,Ye)}),(0,pe.Z)((0,Le.Z)(de),"onNodeSelect",function(Te,Ye){var Ge=de.state.selectedKeys,pt=de.state,Rt=pt.keyEntities,Vt=pt.fieldNames,kt=de.props,ln=kt.onSelect,$t=kt.multiple,_t=Ye.selected,$e=Ye[Vt.key],un=!_t;un?$t?Ge=(0,Dt.L0)(Ge,$e):Ge=[$e]:Ge=(0,Dt._5)(Ge,$e);var Mt=Ge.map(function(Ut){var vn=(0,Ot.Z)(Rt,Ut);return vn?vn.node:null}).filter(Boolean);de.setUncontrolledState({selectedKeys:Ge}),ln==null||ln(Ge,{event:"select",selected:un,node:Ye,selectedNodes:Mt,nativeEvent:Te.nativeEvent})}),(0,pe.Z)((0,Le.Z)(de),"onNodeCheck",function(Te,Ye,Ge){var pt=de.state,Rt=pt.keyEntities,Vt=pt.checkedKeys,kt=pt.halfCheckedKeys,ln=de.props,$t=ln.checkStrictly,_t=ln.onCheck,$e=Ye.key,un,Mt={event:"check",node:Ye,checked:Ge,nativeEvent:Te.nativeEvent};if($t){var Ut=Ge?(0,Dt.L0)(Vt,$e):(0,Dt._5)(Vt,$e),vn=(0,Dt._5)(kt,$e);un={checked:Ut,halfChecked:vn},Mt.checkedNodes=Ut.map(function(Ft){return(0,Ot.Z)(Rt,Ft)}).filter(Boolean).map(function(Ft){return Ft.node}),de.setUncontrolledState({checkedKeys:Ut})}else{var Pn=(0,Je.S)([].concat((0,nt.Z)(Vt),[$e]),!0,Rt),Kt=Pn.checkedKeys,kn=Pn.halfCheckedKeys;if(!Ge){var tr=new Set(Kt);tr.delete($e);var Jn=(0,Je.S)(Array.from(tr),{checked:!1,halfCheckedKeys:kn},Rt);Kt=Jn.checkedKeys,kn=Jn.halfCheckedKeys}un=Kt,Mt.checkedNodes=[],Mt.checkedNodesPositions=[],Mt.halfCheckedKeys=kn,Kt.forEach(function(Ft){var Bt=(0,Ot.Z)(Rt,Ft);if(Bt){var At=Bt.node,xn=Bt.pos;Mt.checkedNodes.push(At),Mt.checkedNodesPositions.push({node:At,pos:xn})}}),de.setUncontrolledState({checkedKeys:Kt},!1,{halfCheckedKeys:kn})}_t==null||_t(un,Mt)}),(0,pe.Z)((0,Le.Z)(de),"onNodeLoad",function(Te){var Ye,Ge=Te.key,pt=de.state.keyEntities,Rt=(0,Ot.Z)(pt,Ge);if(!(Rt!=null&&(Ye=Rt.children)!==null&&Ye!==void 0&&Ye.length)){var Vt=new Promise(function(kt,ln){de.setState(function($t){var _t=$t.loadedKeys,$e=_t===void 0?[]:_t,un=$t.loadingKeys,Mt=un===void 0?[]:un,Ut=de.props,vn=Ut.loadData,Pn=Ut.onLoad;if(!vn||$e.includes(Ge)||Mt.includes(Ge))return null;var Kt=vn(Te);return Kt.then(function(){var kn=de.state.loadedKeys,tr=(0,Dt.L0)(kn,Ge);Pn==null||Pn(tr,{event:"load",node:Te}),de.setUncontrolledState({loadedKeys:tr}),de.setState(function(Jn){return{loadingKeys:(0,Dt._5)(Jn.loadingKeys,Ge)}}),kt()}).catch(function(kn){if(de.setState(function(Jn){return{loadingKeys:(0,Dt._5)(Jn.loadingKeys,Ge)}}),de.loadingRetryTimes[Ge]=(de.loadingRetryTimes[Ge]||0)+1,de.loadingRetryTimes[Ge]>=Nt){var tr=de.state.loadedKeys;(0,Ze.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),de.setUncontrolledState({loadedKeys:(0,Dt.L0)(tr,Ge)}),kt()}ln(kn)}),{loadingKeys:(0,Dt.L0)(Mt,Ge)}})});return Vt.catch(function(){}),Vt}}),(0,pe.Z)((0,Le.Z)(de),"onNodeMouseEnter",function(Te,Ye){var Ge=de.props.onMouseEnter;Ge==null||Ge({event:Te,node:Ye})}),(0,pe.Z)((0,Le.Z)(de),"onNodeMouseLeave",function(Te,Ye){var Ge=de.props.onMouseLeave;Ge==null||Ge({event:Te,node:Ye})}),(0,pe.Z)((0,Le.Z)(de),"onNodeContextMenu",function(Te,Ye){var Ge=de.props.onRightClick;Ge&&(Te.preventDefault(),Ge({event:Te,node:Ye}))}),(0,pe.Z)((0,Le.Z)(de),"onFocus",function(){var Te=de.props.onFocus;de.setState({focused:!0});for(var Ye=arguments.length,Ge=new Array(Ye),pt=0;pt<Ye;pt++)Ge[pt]=arguments[pt];Te==null||Te.apply(void 0,Ge)}),(0,pe.Z)((0,Le.Z)(de),"onBlur",function(){var Te=de.props.onBlur;de.setState({focused:!1}),de.onActiveChange(null);for(var Ye=arguments.length,Ge=new Array(Ye),pt=0;pt<Ye;pt++)Ge[pt]=arguments[pt];Te==null||Te.apply(void 0,Ge)}),(0,pe.Z)((0,Le.Z)(de),"getTreeNodeRequiredProps",function(){var Te=de.state,Ye=Te.expandedKeys,Ge=Te.selectedKeys,pt=Te.loadedKeys,Rt=Te.loadingKeys,Vt=Te.checkedKeys,kt=Te.halfCheckedKeys,ln=Te.dragOverNodeKey,$t=Te.dropPosition,_t=Te.keyEntities;return{expandedKeys:Ye||[],selectedKeys:Ge||[],loadedKeys:pt||[],loadingKeys:Rt||[],checkedKeys:Vt||[],halfCheckedKeys:kt||[],dragOverNodeKey:ln,dropPosition:$t,keyEntities:_t}}),(0,pe.Z)((0,Le.Z)(de),"setExpandedKeys",function(Te){var Ye=de.state,Ge=Ye.treeData,pt=Ye.fieldNames,Rt=(0,Se.oH)(Ge,Te,pt);de.setUncontrolledState({expandedKeys:Te,flattenNodes:Rt},!0)}),(0,pe.Z)((0,Le.Z)(de),"onNodeExpand",function(Te,Ye){var Ge=de.state.expandedKeys,pt=de.state,Rt=pt.listChanging,Vt=pt.fieldNames,kt=de.props,ln=kt.onExpand,$t=kt.loadData,_t=Ye.expanded,$e=Ye[Vt.key];if(!Rt){var un=Ge.includes($e),Mt=!_t;if((0,Ze.ZP)(_t&&un||!_t&&!un,"Expand state not sync with index check"),Ge=Mt?(0,Dt.L0)(Ge,$e):(0,Dt._5)(Ge,$e),de.setExpandedKeys(Ge),ln==null||ln(Ge,{node:Ye,expanded:Mt,nativeEvent:Te.nativeEvent}),Mt&&$t){var Ut=de.onNodeLoad(Ye);Ut&&Ut.then(function(){var vn=(0,Se.oH)(de.state.treeData,Ge,Vt);de.setUncontrolledState({flattenNodes:vn})}).catch(function(){var vn=de.state.expandedKeys,Pn=(0,Dt._5)(vn,$e);de.setExpandedKeys(Pn)})}}}),(0,pe.Z)((0,Le.Z)(de),"onListChangeStart",function(){de.setUncontrolledState({listChanging:!0})}),(0,pe.Z)((0,Le.Z)(de),"onListChangeEnd",function(){setTimeout(function(){de.setUncontrolledState({listChanging:!1})})}),(0,pe.Z)((0,Le.Z)(de),"onActiveChange",function(Te){var Ye=de.state.activeKey,Ge=de.props,pt=Ge.onActiveChange,Rt=Ge.itemScrollOffset,Vt=Rt===void 0?0:Rt;Ye!==Te&&(de.setState({activeKey:Te}),Te!==null&&de.scrollTo({key:Te,offset:Vt}),pt==null||pt(Te))}),(0,pe.Z)((0,Le.Z)(de),"getActiveItem",function(){var Te=de.state,Ye=Te.activeKey,Ge=Te.flattenNodes;return Ye===null?null:Ge.find(function(pt){var Rt=pt.key;return Rt===Ye})||null}),(0,pe.Z)((0,Le.Z)(de),"offsetActiveKey",function(Te){var Ye=de.state,Ge=Ye.flattenNodes,pt=Ye.activeKey,Rt=Ge.findIndex(function(ln){var $t=ln.key;return $t===pt});Rt===-1&&Te<0&&(Rt=Ge.length),Rt=(Rt+Te+Ge.length)%Ge.length;var Vt=Ge[Rt];if(Vt){var kt=Vt.key;de.onActiveChange(kt)}else de.onActiveChange(null)}),(0,pe.Z)((0,Le.Z)(de),"onKeyDown",function(Te){var Ye=de.state,Ge=Ye.activeKey,pt=Ye.expandedKeys,Rt=Ye.checkedKeys,Vt=Ye.fieldNames,kt=de.props,ln=kt.onKeyDown,$t=kt.checkable,_t=kt.selectable;switch(Te.which){case lt.Z.UP:{de.offsetActiveKey(-1),Te.preventDefault();break}case lt.Z.DOWN:{de.offsetActiveKey(1),Te.preventDefault();break}}var $e=de.getActiveItem();if($e&&$e.data){var un=de.getTreeNodeRequiredProps(),Mt=$e.data.isLeaf===!1||!!($e.data[Vt.children]||[]).length,Ut=(0,Se.F)((0,Me.Z)((0,Me.Z)({},(0,Se.H8)(Ge,un)),{},{data:$e.data,active:!0}));switch(Te.which){case lt.Z.LEFT:{Mt&&pt.includes(Ge)?de.onNodeExpand({},Ut):$e.parent&&de.onActiveChange($e.parent.key),Te.preventDefault();break}case lt.Z.RIGHT:{Mt&&!pt.includes(Ge)?de.onNodeExpand({},Ut):$e.children&&$e.children.length&&de.onActiveChange($e.children[0].key),Te.preventDefault();break}case lt.Z.ENTER:case lt.Z.SPACE:{$t&&!Ut.disabled&&Ut.checkable!==!1&&!Ut.disableCheckbox?de.onNodeCheck({},Ut,!Rt.includes(Ge)):!$t&&_t&&!Ut.disabled&&Ut.selectable!==!1&&de.onNodeSelect({},Ut);break}}}ln==null||ln(Te)}),(0,pe.Z)((0,Le.Z)(de),"setUncontrolledState",function(Te){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!de.destroyed){var pt=!1,Rt=!0,Vt={};Object.keys(Te).forEach(function(kt){if(de.props.hasOwnProperty(kt)){Rt=!1;return}pt=!0,Vt[kt]=Te[kt]}),pt&&(!Ye||Rt)&&de.setState((0,Me.Z)((0,Me.Z)({},Vt),Ge))}}),(0,pe.Z)((0,Le.Z)(de),"scrollTo",function(Te){de.listRef.current.scrollTo(Te)}),de}return(0,ue.Z)(ne,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Re=this.props,wt=Re.activeKey,Tt=Re.itemScrollOffset,Te=Tt===void 0?0:Tt;wt!==void 0&&wt!==this.state.activeKey&&(this.setState({activeKey:wt}),wt!==null&&this.scrollTo({key:wt,offset:Te}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Re=this.state,wt=Re.focused,Tt=Re.flattenNodes,Te=Re.keyEntities,Ye=Re.draggingNodeKey,Ge=Re.activeKey,pt=Re.dropLevelOffset,Rt=Re.dropContainerKey,Vt=Re.dropTargetKey,kt=Re.dropPosition,ln=Re.dragOverNodeKey,$t=Re.indent,_t=this.props,$e=_t.prefixCls,un=_t.className,Mt=_t.style,Ut=_t.showLine,vn=_t.focusable,Pn=_t.tabIndex,Kt=Pn===void 0?0:Pn,kn=_t.selectable,tr=_t.showIcon,Jn=_t.icon,Ft=_t.switcherIcon,Bt=_t.draggable,At=_t.checkable,xn=_t.checkStrictly,wn=_t.disabled,zn=_t.motion,rr=_t.loadData,mn=_t.filterTreeNode,Xt=_t.height,Nn=_t.itemHeight,kr=_t.scrollWidth,gn=_t.virtual,Ln=_t.titleRender,Mn=_t.dropIndicatorRender,_n=_t.onContextMenu,Tr=_t.onScroll,xr=_t.direction,Hr=_t.rootClassName,br=_t.rootStyle,or=(0,je.Z)(this.props,{aria:!0,data:!0}),Fr;Bt&&((0,Oe.Z)(Bt)==="object"?Fr=Bt:typeof Bt=="function"?Fr={nodeDraggable:Bt}:Fr={});var dn={prefixCls:$e,selectable:kn,showIcon:tr,icon:Jn,switcherIcon:Ft,draggable:Fr,draggingNodeKey:Ye,checkable:At,checkStrictly:xn,disabled:wn,keyEntities:Te,dropLevelOffset:pt,dropContainerKey:Rt,dropTargetKey:Vt,dropPosition:kt,dragOverNodeKey:ln,indent:$t,direction:xr,dropIndicatorRender:Mn,loadData:rr,filterTreeNode:mn,titleRender:Ln,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return Ee.createElement(Ae.k.Provider,{value:dn},Ee.createElement("div",{className:me()($e,un,Hr,(0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat($e,"-show-line"),Ut),"".concat($e,"-focused"),wt),"".concat($e,"-active-focused"),Ge!==null)),style:br},Ee.createElement(_e,(0,oe.Z)({ref:this.listRef,prefixCls:$e,style:Mt,data:Tt,disabled:wn,selectable:kn,checkable:!!At,motion:zn,dragging:Ye!==null,height:Xt,itemHeight:Nn,virtual:gn,focusable:vn,focused:wt,tabIndex:Kt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:_n,onScroll:Tr,scrollWidth:kr},this.getTreeNodeRequiredProps(),or))))}}],[{key:"getDerivedStateFromProps",value:function(Re,wt){var Tt=wt.prevProps,Te={prevProps:Re};function Ye(Kt){return!Tt&&Re.hasOwnProperty(Kt)||Tt&&Tt[Kt]!==Re[Kt]}var Ge,pt=wt.fieldNames;if(Ye("fieldNames")&&(pt=(0,Se.w$)(Re.fieldNames),Te.fieldNames=pt),Ye("treeData")?Ge=Re.treeData:Ye("children")&&((0,Ze.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ge=(0,Se.zn)(Re.children)),Ge){Te.treeData=Ge;var Rt=(0,Se.I8)(Ge,{fieldNames:pt});Te.keyEntities=(0,Me.Z)((0,pe.Z)({},he,qt),Rt.keyEntities)}var Vt=Te.keyEntities||wt.keyEntities;if(Ye("expandedKeys")||Tt&&Ye("autoExpandParent"))Te.expandedKeys=Re.autoExpandParent||!Tt&&Re.defaultExpandParent?(0,Dt.r7)(Re.expandedKeys,Vt):Re.expandedKeys;else if(!Tt&&Re.defaultExpandAll){var kt=(0,Me.Z)({},Vt);delete kt[he];var ln=[];Object.keys(kt).forEach(function(Kt){var kn=kt[Kt];kn.children&&kn.children.length&&ln.push(kn.key)}),Te.expandedKeys=ln}else!Tt&&Re.defaultExpandedKeys&&(Te.expandedKeys=Re.autoExpandParent||Re.defaultExpandParent?(0,Dt.r7)(Re.defaultExpandedKeys,Vt):Re.defaultExpandedKeys);if(Te.expandedKeys||delete Te.expandedKeys,Ge||Te.expandedKeys){var $t=(0,Se.oH)(Ge||wt.treeData,Te.expandedKeys||wt.expandedKeys,pt);Te.flattenNodes=$t}if(Re.selectable&&(Ye("selectedKeys")?Te.selectedKeys=(0,Dt.BT)(Re.selectedKeys,Re):!Tt&&Re.defaultSelectedKeys&&(Te.selectedKeys=(0,Dt.BT)(Re.defaultSelectedKeys,Re))),Re.checkable){var _t;if(Ye("checkedKeys")?_t=(0,Dt.E6)(Re.checkedKeys)||{}:!Tt&&Re.defaultCheckedKeys?_t=(0,Dt.E6)(Re.defaultCheckedKeys)||{}:Ge&&(_t=(0,Dt.E6)(Re.checkedKeys)||{checkedKeys:wt.checkedKeys,halfCheckedKeys:wt.halfCheckedKeys}),_t){var $e=_t,un=$e.checkedKeys,Mt=un===void 0?[]:un,Ut=$e.halfCheckedKeys,vn=Ut===void 0?[]:Ut;if(!Re.checkStrictly){var Pn=(0,Je.S)(Mt,!0,Vt);Mt=Pn.checkedKeys,vn=Pn.halfCheckedKeys}Te.checkedKeys=Mt,Te.halfCheckedKeys=vn}}return Ye("loadedKeys")&&(Te.loadedKeys=Re.loadedKeys),Te}}]),ne}(Ee.Component);(0,pe.Z)(ae,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:st,allowDrop:function(){return!0},expandAction:!1}),(0,pe.Z)(ae,"TreeNode",Ce.Z);var te=ae,z=te},82661:function(on,nn,ce){"use strict";ce.d(nn,{BT:function(){return Ee},E6:function(){return st},L0:function(){return pe},OM:function(){return Ze},_5:function(){return be},r7:function(){return ut},wA:function(){return me},yx:function(){return rt}});var oe=ce(3300),Oe=ce(34666),Me=ce(48736),nt=ce(59301),xe=ce(639),ue=ce(65065),Le=ce(34061),Xe=null;function be(Pe,ge){if(!Pe)return[];var Be=Pe.slice(),ze=Be.indexOf(ge);return ze>=0&&Be.splice(ze,1),Be}function pe(Pe,ge){var Be=(Pe||[]).slice();return Be.indexOf(ge)===-1&&Be.push(ge),Be}function rt(Pe){return Pe.split("-")}function me(Pe,ge){var Be=[],ze=(0,ue.Z)(ge,Pe);function yt(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ce.forEach(function(we){var We=we.key,Se=we.children;Be.push(We),yt(Se)})}return yt(ze.children),Be}function lt(Pe){if(Pe.parent){var ge=rt(Pe.pos);return Number(ge[ge.length-1])===Pe.parent.children.length-1}return!1}function je(Pe){var ge=rt(Pe.pos);return Number(ge[ge.length-1])===0}function Ze(Pe,ge,Be,ze,yt,Ce,we,We,Se,Ue){var Ne,tt=Pe.clientX,Yt=Pe.clientY,Et=Pe.target.getBoundingClientRect(),Jt=Et.top,Ht=Et.height,ye=(Ue==="rtl"?-1:1)*(((yt==null?void 0:yt.x)||0)-tt),he=(ye-12)/ze,mt=Se.filter(function(z){var re;return(re=We[z])===null||re===void 0||(re=re.children)===null||re===void 0?void 0:re.length}),qt=(0,ue.Z)(We,Be.eventKey);if(Yt<Jt+Ht/2){var Pt=we.findIndex(function(z){return z.key===qt.key}),Ke=Pt<=0?0:Pt-1,ct=we[Ke].key;qt=(0,ue.Z)(We,ct)}var dt=qt.key,yn=qt,_e=qt.key,Dt=0,Je=0;if(!mt.includes(dt))for(var Ot=0;Ot<he&<(qt);Ot+=1)qt=qt.parent,Je+=1;var Nt=ge.data,ae=qt.node,te=!0;return je(qt)&&qt.level===0&&Yt<Jt+Ht/2&&Ce({dragNode:Nt,dropNode:ae,dropPosition:-1})&&qt.key===Be.eventKey?Dt=-1:(yn.children||[]).length&&mt.includes(_e)?Ce({dragNode:Nt,dropNode:ae,dropPosition:0})?Dt=0:te=!1:Je===0?he>-1.5?Ce({dragNode:Nt,dropNode:ae,dropPosition:1})?Dt=1:te=!1:Ce({dragNode:Nt,dropNode:ae,dropPosition:0})?Dt=0:Ce({dragNode:Nt,dropNode:ae,dropPosition:1})?Dt=1:te=!1:Ce({dragNode:Nt,dropNode:ae,dropPosition:1})?Dt=1:te=!1,{dropPosition:Dt,dropLevelOffset:Je,dropTargetKey:qt.key,dropTargetPos:qt.pos,dragOverNodeKey:_e,dropContainerKey:Dt===0?null:((Ne=qt.parent)===null||Ne===void 0?void 0:Ne.key)||null,dropAllowed:te}}function Ee(Pe,ge){if(Pe){var Be=ge.multiple;return Be?Pe.slice():Pe.length?[Pe[0]]:Pe}}var Ae=function(ge){return ge};function ot(Pe,ge){if(!Pe)return[];var Be=ge||{},ze=Be.processProps,yt=ze===void 0?Ae:ze,Ce=Array.isArray(Pe)?Pe:[Pe];return Ce.map(function(we){var We=we.children,Se=_objectWithoutProperties(we,Xe),Ue=ot(We,ge);return React.createElement(TreeNode,_extends({key:Se.key},yt(Se)),Ue)})}function st(Pe){if(!Pe)return null;var ge;if(Array.isArray(Pe))ge={checkedKeys:Pe,halfCheckedKeys:void 0};else if((0,Oe.Z)(Pe)==="object")ge={checkedKeys:Pe.checked||void 0,halfCheckedKeys:Pe.halfChecked||void 0};else return(0,Me.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ge}function ut(Pe,ge){var Be=new Set;function ze(yt){if(!Be.has(yt)){var Ce=(0,ue.Z)(ge,yt);if(Ce){Be.add(yt);var we=Ce.parent,We=Ce.node;We.disabled||we&&ze(we.key)}}}return(Pe||[]).forEach(function(yt){ze(yt)}),(0,oe.Z)(Be)}},34643:function(on,nn,ce){"use strict";ce.d(nn,{S:function(){return Le}});var oe=ce(48736),Oe=ce(65065);function Me(Xe,be){var pe=new Set;return Xe.forEach(function(rt){be.has(rt)||pe.add(rt)}),pe}function nt(Xe){var be=Xe||{},pe=be.disabled,rt=be.disableCheckbox,me=be.checkable;return!!(pe||rt)||me===!1}function xe(Xe,be,pe,rt){for(var me=new Set(Xe),lt=new Set,je=0;je<=pe;je+=1){var Ze=be.get(je)||new Set;Ze.forEach(function(st){var ut=st.key,Pe=st.node,ge=st.children,Be=ge===void 0?[]:ge;me.has(ut)&&!rt(Pe)&&Be.filter(function(ze){return!rt(ze.node)}).forEach(function(ze){me.add(ze.key)})})}for(var Ee=new Set,Ae=pe;Ae>=0;Ae-=1){var ot=be.get(Ae)||new Set;ot.forEach(function(st){var ut=st.parent,Pe=st.node;if(!(rt(Pe)||!st.parent||Ee.has(st.parent.key))){if(rt(st.parent.node)){Ee.add(ut.key);return}var ge=!0,Be=!1;(ut.children||[]).filter(function(ze){return!rt(ze.node)}).forEach(function(ze){var yt=ze.key,Ce=me.has(yt);ge&&!Ce&&(ge=!1),!Be&&(Ce||lt.has(yt))&&(Be=!0)}),ge&&me.add(ut.key),Be&<.add(ut.key),Ee.add(ut.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(Me(lt,me))}}function ue(Xe,be,pe,rt,me){for(var lt=new Set(Xe),je=new Set(be),Ze=0;Ze<=rt;Ze+=1){var Ee=pe.get(Ze)||new Set;Ee.forEach(function(ut){var Pe=ut.key,ge=ut.node,Be=ut.children,ze=Be===void 0?[]:Be;!lt.has(Pe)&&!je.has(Pe)&&!me(ge)&&ze.filter(function(yt){return!me(yt.node)}).forEach(function(yt){lt.delete(yt.key)})})}je=new Set;for(var Ae=new Set,ot=rt;ot>=0;ot-=1){var st=pe.get(ot)||new Set;st.forEach(function(ut){var Pe=ut.parent,ge=ut.node;if(!(me(ge)||!ut.parent||Ae.has(ut.parent.key))){if(me(ut.parent.node)){Ae.add(Pe.key);return}var Be=!0,ze=!1;(Pe.children||[]).filter(function(yt){return!me(yt.node)}).forEach(function(yt){var Ce=yt.key,we=lt.has(Ce);Be&&!we&&(Be=!1),!ze&&(we||je.has(Ce))&&(ze=!0)}),Be||lt.delete(Pe.key),ze&&je.add(Pe.key),Ae.add(Pe.key)}})}return{checkedKeys:Array.from(lt),halfCheckedKeys:Array.from(Me(je,lt))}}function Le(Xe,be,pe,rt){var me=[],lt;rt?lt=rt:lt=nt;var je=new Set(Xe.filter(function(ot){var st=!!(0,Oe.Z)(pe,ot);return st||me.push(ot),st})),Ze=new Map,Ee=0;Object.keys(pe).forEach(function(ot){var st=pe[ot],ut=st.level,Pe=Ze.get(ut);Pe||(Pe=new Set,Ze.set(ut,Pe)),Pe.add(st),Ee=Math.max(Ee,ut)}),(0,oe.ZP)(!me.length,"Tree missing follow keys: ".concat(me.slice(0,100).map(function(ot){return"'".concat(ot,"'")}).join(", ")));var Ae;return be===!0?Ae=xe(je,Ze,Ee,lt):Ae=ue(je,be.halfCheckedKeys,Ze,Ee,lt),Ae}},65065:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return oe}});function oe(Oe,Me){return Oe[Me]}},34061:function(on,nn,ce){"use strict";ce.d(nn,{F:function(){return ut},H8:function(){return st},I8:function(){return ot},km:function(){return me},oH:function(){return Ee},w$:function(){return lt},zn:function(){return Ze}});var oe=ce(34666),Oe=ce(3300),Me=ce(27247),nt=ce(43079),xe=ce(11592),ue=ce(2738),Le=ce(48736),Xe=ce(65065),be=["children"];function pe(Pe,ge){return"".concat(Pe,"-").concat(ge)}function rt(Pe){return Pe&&Pe.type&&Pe.type.isTreeNode}function me(Pe,ge){return Pe!=null?Pe:ge}function lt(Pe){var ge=Pe||{},Be=ge.title,ze=ge._title,yt=ge.key,Ce=ge.children,we=Be||"title";return{title:we,_title:ze||[we],key:yt||"key",children:Ce||"children"}}function je(Pe,ge){var Be=new Map;function ze(yt){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(yt||[]).forEach(function(we){var We=we[ge.key],Se=we[ge.children];warning(We!=null,"Tree node must have a certain key: [".concat(Ce).concat(We,"]"));var Ue=String(We);warning(!Be.has(Ue)||We===null||We===void 0,"Same 'key' exist in the Tree: ".concat(Ue)),Be.set(Ue,!0),ze(Se,"".concat(Ce).concat(Ue," > "))})}ze(Pe)}function Ze(Pe){function ge(Be){var ze=(0,xe.Z)(Be);return ze.map(function(yt){if(!rt(yt))return(0,Le.ZP)(!yt,"Tree/TreeNode can only accept TreeNode as children."),null;var Ce=yt.key,we=yt.props,We=we.children,Se=(0,nt.Z)(we,be),Ue=(0,Me.Z)({key:Ce},Se),Ne=ge(We);return Ne.length&&(Ue.children=Ne),Ue}).filter(function(yt){return yt})}return ge(Pe)}function Ee(Pe,ge,Be){var ze=lt(Be),yt=ze._title,Ce=ze.key,we=ze.children,We=new Set(ge===!0?[]:ge),Se=[];function Ue(Ne){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ne.map(function(Yt,Et){for(var Jt=pe(tt?tt.pos:"0",Et),Ht=me(Yt[Ce],Jt),ye,he=0;he<yt.length;he+=1){var mt=yt[he];if(Yt[mt]!==void 0){ye=Yt[mt];break}}var qt=Object.assign((0,ue.Z)(Yt,[].concat((0,Oe.Z)(yt),[Ce,we])),{title:ye,key:Ht,parent:tt,pos:Jt,children:null,data:Yt,isStart:[].concat((0,Oe.Z)(tt?tt.isStart:[]),[Et===0]),isEnd:[].concat((0,Oe.Z)(tt?tt.isEnd:[]),[Et===Ne.length-1])});return Se.push(qt),ge===!0||We.has(Ht)?qt.children=Ue(Yt[we]||[],qt):qt.children=[],qt})}return Ue(Pe),Se}function Ae(Pe,ge,Be){var ze={};(0,oe.Z)(Be)==="object"?ze=Be:ze={externalGetKey:Be},ze=ze||{};var yt=ze,Ce=yt.childrenPropName,we=yt.externalGetKey,We=yt.fieldNames,Se=lt(We),Ue=Se.key,Ne=Se.children,tt=Ce||Ne,Yt;we?typeof we=="string"?Yt=function(Ht){return Ht[we]}:typeof we=="function"&&(Yt=function(Ht){return we(Ht)}):Yt=function(Ht,ye){return me(Ht[Ue],ye)};function Et(Jt,Ht,ye,he){var mt=Jt?Jt[tt]:Pe,qt=Jt?pe(ye.pos,Ht):"0",Pt=Jt?[].concat((0,Oe.Z)(he),[Jt]):[];if(Jt){var Ke=Yt(Jt,qt),ct={node:Jt,index:Ht,pos:qt,key:Ke,parentPos:ye.node?ye.pos:null,level:ye.level+1,nodes:Pt};ge(ct)}mt&&mt.forEach(function(dt,yn){Et(dt,yn,{node:Jt,pos:qt,level:ye?ye.level+1:-1},Pt)})}Et(null)}function ot(Pe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=ge.initWrapper,ze=ge.processEntity,yt=ge.onProcessFinished,Ce=ge.externalGetKey,we=ge.childrenPropName,We=ge.fieldNames,Se=arguments.length>2?arguments[2]:void 0,Ue=Ce||Se,Ne={},tt={},Yt={posEntities:Ne,keyEntities:tt};return Be&&(Yt=Be(Yt)||Yt),Ae(Pe,function(Et){var Jt=Et.node,Ht=Et.index,ye=Et.pos,he=Et.key,mt=Et.parentPos,qt=Et.level,Pt=Et.nodes,Ke={node:Jt,nodes:Pt,index:Ht,key:he,pos:ye,level:qt},ct=me(he,ye);Ne[ye]=Ke,tt[ct]=Ke,Ke.parent=Ne[mt],Ke.parent&&(Ke.parent.children=Ke.parent.children||[],Ke.parent.children.push(Ke)),ze&&ze(Ke,Yt)},{externalGetKey:Ue,childrenPropName:we,fieldNames:We}),yt&&yt(Yt),Yt}function st(Pe,ge){var Be=ge.expandedKeys,ze=ge.selectedKeys,yt=ge.loadedKeys,Ce=ge.loadingKeys,we=ge.checkedKeys,We=ge.halfCheckedKeys,Se=ge.dragOverNodeKey,Ue=ge.dropPosition,Ne=ge.keyEntities,tt=(0,Xe.Z)(Ne,Pe),Yt={eventKey:Pe,expanded:Be.indexOf(Pe)!==-1,selected:ze.indexOf(Pe)!==-1,loaded:yt.indexOf(Pe)!==-1,loading:Ce.indexOf(Pe)!==-1,checked:we.indexOf(Pe)!==-1,halfChecked:We.indexOf(Pe)!==-1,pos:String(tt?tt.pos:""),dragOver:Se===Pe&&Ue===0,dragOverGapTop:Se===Pe&&Ue===-1,dragOverGapBottom:Se===Pe&&Ue===1};return Yt}function ut(Pe){var ge=Pe.data,Be=Pe.expanded,ze=Pe.selected,yt=Pe.checked,Ce=Pe.loaded,we=Pe.loading,We=Pe.halfChecked,Se=Pe.dragOver,Ue=Pe.dragOverGapTop,Ne=Pe.dragOverGapBottom,tt=Pe.pos,Yt=Pe.active,Et=Pe.eventKey,Jt=(0,Me.Z)((0,Me.Z)({},ge),{},{expanded:Be,selected:ze,checked:yt,loaded:Ce,loading:we,halfChecked:We,dragOver:Se,dragOverGapTop:Ue,dragOverGapBottom:Ne,pos:tt,active:Yt,key:Et});return"props"in Jt||Object.defineProperty(Jt,"props",{get:function(){return(0,Le.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Pe}}),Jt}},8224:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Oe}});var oe=ce(4676);function Oe(Me,nt,xe,ue){var Le=oe.unstable_batchedUpdates?function(be){oe.unstable_batchedUpdates(xe,be)}:xe;return Me!=null&&Me.addEventListener&&Me.addEventListener(nt,Le,ue),{remove:function(){Me!=null&&Me.removeEventListener&&Me.removeEventListener(nt,Le,ue)}}}},24514:function(on,nn,ce){"use strict";ce.d(nn,{G:function(){return nt}});var oe=ce(47273),Oe=function(ue){if((0,oe.Z)()&&window.document.documentElement){var Le=Array.isArray(ue)?ue:[ue],Xe=window.document.documentElement;return Le.some(function(be){return be in Xe.style})}return!1},Me=function(ue,Le){if(!Oe(ue))return!1;var Xe=document.createElement("div"),be=Xe.style[ue];return Xe.style[ue]=Le,Xe.style[ue]!==be};function nt(xe,ue){return!Array.isArray(xe)&&ue!==void 0?Me(xe,ue):Oe(xe)}},6790:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Nt}});var oe=ce(32855),Oe=ce(34666),Me=ce(27247),nt=ce(74430),xe=ce(11913),ue=ce(43079),Le=ce(92310),Xe=ce.n(Le),be=ce(29301),pe=ce(70425),rt=ce(34280),me=ce(59301),lt=ce(4676),je=me.forwardRef(function(ae,te){var z=ae.height,re=ae.offsetY,le=ae.offsetX,ne=ae.children,de=ae.prefixCls,Re=ae.onInnerResize,wt=ae.innerProps,Tt=ae.rtl,Te=ae.extra,Ye={},Ge={display:"flex",flexDirection:"column"};return re!==void 0&&(Ye={height:z,position:"relative",overflow:"hidden"},Ge=(0,Me.Z)((0,Me.Z)({},Ge),{},(0,nt.Z)((0,nt.Z)((0,nt.Z)((0,nt.Z)((0,nt.Z)({transform:"translateY(".concat(re,"px)")},Tt?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:Ye},me.createElement(be.Z,{onResize:function(Rt){var Vt=Rt.offsetHeight;Vt&&Re&&Re()}},me.createElement("div",(0,oe.Z)({style:Ge,className:Xe()((0,nt.Z)({},"".concat(de,"-holder-inner"),de)),ref:te},wt),ne,Te)))});je.displayName="Filler";var Ze=je;function Ee(ae){var te=ae.children,z=ae.setRef,re=me.useCallback(function(le){z(le)},[]);return me.cloneElement(te,{ref:re})}function Ae(ae,te,z,re,le,ne,de,Re){var wt=Re.getKey;return ae.slice(te,z+1).map(function(Tt,Te){var Ye=te+Te,Ge=de(Tt,Ye,{style:{width:re},offsetX:le}),pt=wt(Tt);return me.createElement(Ee,{key:pt,setRef:function(Vt){return ne(Tt,Vt)}},Ge)})}function ot(ae,te,z,re){var le=z-ae,ne=te-z,de=Math.min(le,ne)*2;if(re<=de){var Re=Math.floor(re/2);return re%2?z+Re+1:z-Re}return le>ne?z-(re-ne):z+(re-le)}function st(ae,te,z){var re=ae.length,le=te.length,ne,de;if(re===0&&le===0)return null;re<le?(ne=ae,de=te):(ne=te,de=ae);var Re={__EMPTY_ITEM__:!0};function wt(Rt){return Rt!==void 0?z(Rt):Re}for(var Tt=null,Te=Math.abs(re-le)!==1,Ye=0;Ye<de.length;Ye+=1){var Ge=wt(ne[Ye]),pt=wt(de[Ye]);if(Ge!==pt){Tt=Ye,Te=Te||Ge!==wt(de[Ye+1]);break}}return Tt===null?null:{index:Tt,multiple:Te}}function ut(ae,te,z){var re=me.useState(ae),le=(0,xe.Z)(re,2),ne=le[0],de=le[1],Re=me.useState(null),wt=(0,xe.Z)(Re,2),Tt=wt[0],Te=wt[1];return me.useEffect(function(){var Ye=st(ne||[],ae||[],te);(Ye==null?void 0:Ye.index)!==void 0&&(z==null||z(Ye.index),Te(ae[Ye.index])),de(ae)},[ae]),[Tt]}var Pe=ce(16089),ge=(typeof navigator=="undefined"?"undefined":(0,Oe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Be=ge,ze=function(ae,te,z,re){var le=(0,me.useRef)(!1),ne=(0,me.useRef)(null);function de(){clearTimeout(ne.current),le.current=!0,ne.current=setTimeout(function(){le.current=!1},50)}var Re=(0,me.useRef)({top:ae,bottom:te,left:z,right:re});return Re.current.top=ae,Re.current.bottom=te,Re.current.left=z,Re.current.right=re,function(wt,Tt){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ye=wt?Tt<0&&Re.current.left||Tt>0&&Re.current.right:Tt<0&&Re.current.top||Tt>0&&Re.current.bottom;return Te&&Ye?(clearTimeout(ne.current),le.current=!1):(!Ye||le.current)&&de(),!le.current&&Ye}};function yt(ae,te,z,re,le,ne,de){var Re=(0,me.useRef)(0),wt=(0,me.useRef)(null),Tt=(0,me.useRef)(null),Te=(0,me.useRef)(!1),Ye=ze(te,z,re,le);function Ge($t,_t){if(Pe.Z.cancel(wt.current),!Ye(!1,_t)){var $e=$t;if(!$e._virtualHandled)$e._virtualHandled=!0;else return;Re.current+=_t,Tt.current=_t,Be||$e.preventDefault(),wt.current=(0,Pe.Z)(function(){var un=Te.current?10:1;de(Re.current*un,!1),Re.current=0})}}function pt($t,_t){de(_t,!0),Be||$t.preventDefault()}var Rt=(0,me.useRef)(null),Vt=(0,me.useRef)(null);function kt($t){if(ae){Pe.Z.cancel(Vt.current),Vt.current=(0,Pe.Z)(function(){Rt.current=null},2);var _t=$t.deltaX,$e=$t.deltaY,un=$t.shiftKey,Mt=_t,Ut=$e;(Rt.current==="sx"||!Rt.current&&un&&$e&&!_t)&&(Mt=$e,Ut=0,Rt.current="sx");var vn=Math.abs(Mt),Pn=Math.abs(Ut);Rt.current===null&&(Rt.current=ne&&vn>Pn?"x":"y"),Rt.current==="y"?Ge($t,Ut):pt($t,Mt)}}function ln($t){ae&&(Te.current=$t.detail===Tt.current)}return[kt,ln]}function Ce(ae,te,z,re){var le=me.useMemo(function(){return[new Map,[]]},[ae,z.id,re]),ne=(0,xe.Z)(le,2),de=ne[0],Re=ne[1],wt=function(Te){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Te,Ge=de.get(Te),pt=de.get(Ye);if(Ge===void 0||pt===void 0)for(var Rt=ae.length,Vt=Re.length;Vt<Rt;Vt+=1){var kt,ln=ae[Vt],$t=te(ln);de.set($t,Vt);var _t=(kt=z.get($t))!==null&&kt!==void 0?kt:re;if(Re[Vt]=(Re[Vt-1]||0)+_t,$t===Te&&(Ge=Vt),$t===Ye&&(pt=Vt),Ge!==void 0&&pt!==void 0)break}return{top:Re[Ge-1]||0,bottom:Re[pt]}};return wt}var we=ce(33377),We=ce(93912),Se=function(){function ae(){(0,we.Z)(this,ae),(0,nt.Z)(this,"maps",void 0),(0,nt.Z)(this,"id",0),(0,nt.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,We.Z)(ae,[{key:"set",value:function(z,re){this.diffRecords.set(z,this.maps[z]),this.maps[z]=re,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ae}(),Ue=Se;function Ne(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function tt(ae,te,z){var re=me.useState(0),le=(0,xe.Z)(re,2),ne=le[0],de=le[1],Re=(0,me.useRef)(new Map),wt=(0,me.useRef)(new Ue),Tt=(0,me.useRef)(0);function Te(){Tt.current+=1}function Ye(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Te();var Rt=function(){var ln=!1;Re.current.forEach(function($t,_t){if($t&&$t.offsetParent){var $e=$t.offsetHeight,un=getComputedStyle($t),Mt=un.marginTop,Ut=un.marginBottom,vn=Ne(Mt),Pn=Ne(Ut),Kt=$e+vn+Pn;wt.current.get(_t)!==Kt&&(wt.current.set(_t,Kt),ln=!0)}}),ln&&de(function($t){return $t+1})};if(pt)Rt();else{Tt.current+=1;var Vt=Tt.current;Promise.resolve().then(function(){Vt===Tt.current&&Rt()})}}function Ge(pt,Rt){var Vt=ae(pt),kt=Re.current.get(Vt);Rt?(Re.current.set(Vt,Rt),Ye()):Re.current.delete(Vt),!kt!=!Rt&&(Rt?te==null||te(pt):z==null||z(pt))}return(0,me.useEffect)(function(){return Te},[]),[Ge,Ye,wt.current,ne]}var Yt=14/15;function Et(ae,te,z){var re=(0,me.useRef)(!1),le=(0,me.useRef)(0),ne=(0,me.useRef)(0),de=(0,me.useRef)(null),Re=(0,me.useRef)(null),wt,Tt=function(pt){if(re.current){var Rt=Math.ceil(pt.touches[0].pageX),Vt=Math.ceil(pt.touches[0].pageY),kt=le.current-Rt,ln=ne.current-Vt,$t=Math.abs(kt)>Math.abs(ln);$t?le.current=Rt:ne.current=Vt;var _t=z($t,$t?kt:ln,!1,pt);_t&&pt.preventDefault(),clearInterval(Re.current),_t&&(Re.current=setInterval(function(){$t?kt*=Yt:ln*=Yt;var $e=Math.floor($t?kt:ln);(!z($t,$e,!0)||Math.abs($e)<=.1)&&clearInterval(Re.current)},16))}},Te=function(){re.current=!1,wt()},Ye=function(pt){wt(),pt.touches.length===1&&!re.current&&(re.current=!0,le.current=Math.ceil(pt.touches[0].pageX),ne.current=Math.ceil(pt.touches[0].pageY),de.current=pt.target,de.current.addEventListener("touchmove",Tt,{passive:!1}),de.current.addEventListener("touchend",Te,{passive:!0}))};wt=function(){de.current&&(de.current.removeEventListener("touchmove",Tt),de.current.removeEventListener("touchend",Te))},(0,rt.Z)(function(){return ae&&te.current.addEventListener("touchstart",Ye,{passive:!0}),function(){var Ge;(Ge=te.current)===null||Ge===void 0||Ge.removeEventListener("touchstart",Ye),wt(),clearInterval(Re.current)}},[ae])}function Jt(ae){return Math.floor(Math.pow(ae,.5))}function Ht(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function ye(ae,te,z){me.useEffect(function(){var re=te.current;if(ae&&re){var le=!1,ne,de,Re=function(){Pe.Z.cancel(ne)},wt=function Ge(){Re(),ne=(0,Pe.Z)(function(){z(de),Ge()})},Tt=function(pt){if(!(pt.target.draggable||pt.button!==0)){var Rt=pt;Rt._virtualHandled||(Rt._virtualHandled=!0,le=!0)}},Te=function(){le=!1,Re()},Ye=function(pt){if(le){var Rt=Ht(pt,!1),Vt=re.getBoundingClientRect(),kt=Vt.top,ln=Vt.bottom;if(Rt<=kt){var $t=kt-Rt;de=-Jt($t),wt()}else if(Rt>=ln){var _t=Rt-ln;de=Jt(_t),wt()}else Re()}};return re.addEventListener("mousedown",Tt),re.ownerDocument.addEventListener("mouseup",Te),re.ownerDocument.addEventListener("mousemove",Ye),function(){re.removeEventListener("mousedown",Tt),re.ownerDocument.removeEventListener("mouseup",Te),re.ownerDocument.removeEventListener("mousemove",Ye),Re()}}},[ae])}var he=10;function mt(ae,te,z,re,le,ne,de,Re){var wt=me.useRef(),Tt=me.useState(null),Te=(0,xe.Z)(Tt,2),Ye=Te[0],Ge=Te[1];return(0,rt.Z)(function(){if(Ye&&Ye.times<he){if(!ae.current){Ge(function(zn){return(0,Me.Z)({},zn)});return}ne();var pt=Ye.targetAlign,Rt=Ye.originAlign,Vt=Ye.index,kt=Ye.offset,ln=ae.current.clientHeight,$t=!1,_t=pt,$e=null;if(ln){for(var un=pt||Rt,Mt=0,Ut=0,vn=0,Pn=Math.min(te.length-1,Vt),Kt=0;Kt<=Pn;Kt+=1){var kn=le(te[Kt]);Ut=Mt;var tr=z.get(kn);vn=Ut+(tr===void 0?re:tr),Mt=vn}for(var Jn=un==="top"?kt:ln-kt,Ft=Pn;Ft>=0;Ft-=1){var Bt=le(te[Ft]),At=z.get(Bt);if(At===void 0){$t=!0;break}if(Jn-=At,Jn<=0)break}switch(un){case"top":$e=Ut-kt;break;case"bottom":$e=vn-ln+kt;break;default:{var xn=ae.current.scrollTop,wn=xn+ln;Ut<xn?_t="top":vn>wn&&(_t="bottom")}}$e!==null&&de($e),$e!==Ye.lastTop&&($t=!0)}$t&&Ge((0,Me.Z)((0,Me.Z)({},Ye),{},{times:Ye.times+1,targetAlign:_t,lastTop:$e}))}},[Ye,ae.current]),function(pt){if(pt==null){Re();return}if(Pe.Z.cancel(wt.current),typeof pt=="number")de(pt);else if(pt&&(0,Oe.Z)(pt)==="object"){var Rt,Vt=pt.align;"index"in pt?Rt=pt.index:Rt=te.findIndex(function($t){return le($t)===pt.key});var kt=pt.offset,ln=kt===void 0?0:kt;Ge({times:0,index:Rt,offset:ln,originAlign:Vt})}}}var qt=me.forwardRef(function(ae,te){var z=ae.prefixCls,re=ae.rtl,le=ae.scrollOffset,ne=ae.scrollRange,de=ae.onStartMove,Re=ae.onStopMove,wt=ae.onScroll,Tt=ae.horizontal,Te=ae.spinSize,Ye=ae.containerSize,Ge=ae.style,pt=ae.thumbStyle,Rt=ae.showScrollBar,Vt=me.useState(!1),kt=(0,xe.Z)(Vt,2),ln=kt[0],$t=kt[1],_t=me.useState(null),$e=(0,xe.Z)(_t,2),un=$e[0],Mt=$e[1],Ut=me.useState(null),vn=(0,xe.Z)(Ut,2),Pn=vn[0],Kt=vn[1],kn=!re,tr=me.useRef(),Jn=me.useRef(),Ft=me.useState(Rt),Bt=(0,xe.Z)(Ft,2),At=Bt[0],xn=Bt[1],wn=me.useRef(),zn=function(){Rt===!0||Rt===!1||(clearTimeout(wn.current),xn(!0),wn.current=setTimeout(function(){xn(!1)},3e3))},rr=ne-Ye||0,mn=Ye-Te||0,Xt=me.useMemo(function(){if(le===0||rr===0)return 0;var Hr=le/rr;return Hr*mn},[le,rr,mn]),Nn=function(br){br.stopPropagation(),br.preventDefault()},kr=me.useRef({top:Xt,dragging:ln,pageY:un,startTop:Pn});kr.current={top:Xt,dragging:ln,pageY:un,startTop:Pn};var gn=function(br){$t(!0),Mt(Ht(br,Tt)),Kt(kr.current.top),de(),br.stopPropagation(),br.preventDefault()};me.useEffect(function(){var Hr=function(dn){dn.preventDefault()},br=tr.current,or=Jn.current;return br.addEventListener("touchstart",Hr,{passive:!1}),or.addEventListener("touchstart",gn,{passive:!1}),function(){br.removeEventListener("touchstart",Hr),or.removeEventListener("touchstart",gn)}},[]);var Ln=me.useRef();Ln.current=rr;var Mn=me.useRef();Mn.current=mn,me.useEffect(function(){if(ln){var Hr,br=function(dn){var St=kr.current,cn=St.dragging,nr=St.pageY,Er=St.startTop;Pe.Z.cancel(Hr);var Fe=tr.current.getBoundingClientRect(),He=Ye/(Tt?Fe.width:Fe.height);if(cn){var rn=(Ht(dn,Tt)-nr)*He,zt=Er;!kn&&Tt?zt-=rn:zt+=rn;var Qe=Ln.current,jt=Mn.current,sn=jt?zt/jt:0,hn=Math.ceil(sn*Qe);hn=Math.max(hn,0),hn=Math.min(hn,Qe),Hr=(0,Pe.Z)(function(){wt(hn,Tt)})}},or=function(){$t(!1),Re()};return window.addEventListener("mousemove",br,{passive:!0}),window.addEventListener("touchmove",br,{passive:!0}),window.addEventListener("mouseup",or,{passive:!0}),window.addEventListener("touchend",or,{passive:!0}),function(){window.removeEventListener("mousemove",br),window.removeEventListener("touchmove",br),window.removeEventListener("mouseup",or),window.removeEventListener("touchend",or),Pe.Z.cancel(Hr)}}},[ln]),me.useEffect(function(){return zn(),function(){clearTimeout(wn.current)}},[le]),me.useImperativeHandle(te,function(){return{delayHidden:zn}});var _n="".concat(z,"-scrollbar"),Tr={position:"absolute",visibility:At?null:"hidden"},xr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Tt?(Object.assign(Tr,{height:8,left:0,right:0,bottom:0}),Object.assign(xr,(0,nt.Z)({height:"100%",width:Te},kn?"left":"right",Xt))):(Object.assign(Tr,(0,nt.Z)({width:8,top:0,bottom:0},kn?"right":"left",0)),Object.assign(xr,{width:"100%",height:Te,top:Xt})),me.createElement("div",{ref:tr,className:Xe()(_n,(0,nt.Z)((0,nt.Z)((0,nt.Z)({},"".concat(_n,"-horizontal"),Tt),"".concat(_n,"-vertical"),!Tt),"".concat(_n,"-visible"),At)),style:(0,Me.Z)((0,Me.Z)({},Tr),Ge),onMouseDown:Nn,onMouseMove:zn},me.createElement("div",{ref:Jn,className:Xe()("".concat(_n,"-thumb"),(0,nt.Z)({},"".concat(_n,"-thumb-moving"),ln)),style:(0,Me.Z)((0,Me.Z)({},xr),pt),onMouseDown:gn}))}),Pt=qt,Ke=20;function ct(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/te*ae;return isNaN(z)&&(z=0),z=Math.max(z,Ke),Math.floor(z)}var dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],yn=[],_e={overflowY:"auto",overflowAnchor:"none"};function Dt(ae,te){var z=ae.prefixCls,re=z===void 0?"rc-virtual-list":z,le=ae.className,ne=ae.height,de=ae.itemHeight,Re=ae.fullHeight,wt=Re===void 0?!0:Re,Tt=ae.style,Te=ae.data,Ye=ae.children,Ge=ae.itemKey,pt=ae.virtual,Rt=ae.direction,Vt=ae.scrollWidth,kt=ae.component,ln=kt===void 0?"div":kt,$t=ae.onScroll,_t=ae.onVirtualScroll,$e=ae.onVisibleChange,un=ae.innerProps,Mt=ae.extraRender,Ut=ae.styles,vn=ae.showScrollBar,Pn=vn===void 0?"optional":vn,Kt=(0,ue.Z)(ae,dt),kn=me.useCallback(function(et){return typeof Ge=="function"?Ge(et):et==null?void 0:et[Ge]},[Ge]),tr=tt(kn,null,null),Jn=(0,xe.Z)(tr,4),Ft=Jn[0],Bt=Jn[1],At=Jn[2],xn=Jn[3],wn=!!(pt!==!1&&ne&&de),zn=me.useMemo(function(){return Object.values(At.maps).reduce(function(et,xt){return et+xt},0)},[At.id,At.maps]),rr=wn&&Te&&(Math.max(de*Te.length,zn)>ne||!!Vt),mn=Rt==="rtl",Xt=Xe()(re,(0,nt.Z)({},"".concat(re,"-rtl"),mn),le),Nn=Te||yn,kr=(0,me.useRef)(),gn=(0,me.useRef)(),Ln=(0,me.useRef)(),Mn=(0,me.useState)(0),_n=(0,xe.Z)(Mn,2),Tr=_n[0],xr=_n[1],Hr=(0,me.useState)(0),br=(0,xe.Z)(Hr,2),or=br[0],Fr=br[1],dn=(0,me.useState)(!1),St=(0,xe.Z)(dn,2),cn=St[0],nr=St[1],Er=function(){nr(!0)},Fe=function(){nr(!1)},He={getKey:kn};function rn(et){xr(function(xt){var Ct;typeof et=="function"?Ct=et(xt):Ct=et;var bt=$r(Ct);return kr.current.scrollTop=bt,bt})}var zt=(0,me.useRef)({start:0,end:Nn.length}),Qe=(0,me.useRef)(),jt=ut(Nn,kn),sn=(0,xe.Z)(jt,1),hn=sn[0];Qe.current=hn;var bn=me.useMemo(function(){if(!wn)return{scrollHeight:void 0,start:0,end:Nn.length-1,offset:void 0};if(!rr){var et;return{scrollHeight:((et=gn.current)===null||et===void 0?void 0:et.offsetHeight)||0,start:0,end:Nn.length-1,offset:void 0}}for(var xt=0,Ct,bt,Zt,gt=Nn.length,Lt=0;Lt<gt;Lt+=1){var Wt=Nn[Lt],Qt=kn(Wt),Tn=At.get(Qt),Dn=xt+(Tn===void 0?de:Tn);Dn>=Tr&&Ct===void 0&&(Ct=Lt,bt=xt),Dn>Tr+ne&&Zt===void 0&&(Zt=Lt),xt=Dn}return Ct===void 0&&(Ct=0,bt=0,Zt=Math.ceil(ne/de)),Zt===void 0&&(Zt=Nn.length-1),Zt=Math.min(Zt+1,Nn.length-1),{scrollHeight:xt,start:Ct,end:Zt,offset:bt}},[rr,wn,Tr,Nn,xn,ne]),pn=bn.scrollHeight,Cn=bn.start,Ve=bn.end,Vn=bn.offset;zt.current.start=Cn,zt.current.end=Ve,me.useLayoutEffect(function(){var et=At.getRecord();if(et.size===1){var xt=Array.from(et.keys())[0],Ct=et.get(xt),bt=Nn[Cn];if(bt&&Ct===void 0){var Zt=kn(bt);if(Zt===xt){var gt=At.get(xt),Lt=gt-de;rn(function(Wt){return Wt+Lt})}}}At.resetRecord()},[pn]);var Sn=me.useState({width:0,height:ne}),Fn=(0,xe.Z)(Sn,2),Hn=Fn[0],Yn=Fn[1],ar=function(xt){Yn({width:xt.offsetWidth,height:xt.offsetHeight})},zr=(0,me.useRef)(),Cr=(0,me.useRef)(),dr=me.useMemo(function(){return ct(Hn.width,Vt)},[Hn.width,Vt]),Zr=me.useMemo(function(){return ct(Hn.height,pn)},[Hn.height,pn]),ur=pn-ne,jr=(0,me.useRef)(ur);jr.current=ur;function $r(et){var xt=et;return Number.isNaN(jr.current)||(xt=Math.min(xt,jr.current)),xt=Math.max(xt,0),xt}var Ur=Tr<=0,Gr=Tr>=ur,Yr=or<=0,Vr=or>=Vt,Mr=ze(Ur,Gr,Yr,Vr),qr=function(){return{x:mn?-or:or,y:Tr}},Kr=(0,me.useRef)(qr()),On=(0,pe.zX)(function(et){if(_t){var xt=(0,Me.Z)((0,Me.Z)({},qr()),et);(Kr.current.x!==xt.x||Kr.current.y!==xt.y)&&(_t(xt),Kr.current=xt)}});function Qn(et,xt){var Ct=et;xt?((0,lt.flushSync)(function(){Fr(Ct)}),On()):rn(Ct)}function mr(et){var xt=et.currentTarget.scrollTop;xt!==Tr&&rn(xt),$t==null||$t(et),On()}var Nr=function(xt){var Ct=xt,bt=Vt?Vt-Hn.width:0;return Ct=Math.max(Ct,0),Ct=Math.min(Ct,bt),Ct},Ar=(0,pe.zX)(function(et,xt){xt?((0,lt.flushSync)(function(){Fr(function(Ct){var bt=Ct+(mn?-et:et);return Nr(bt)})}),On()):rn(function(Ct){var bt=Ct+et;return bt})}),Or=yt(wn,Ur,Gr,Yr,Vr,!!Vt,Ar),si=(0,xe.Z)(Or,2),ke=si[0],at=si[1];Et(wn,kr,function(et,xt,Ct,bt){var Zt=bt;return Mr(et,xt,Ct)?!1:!Zt||!Zt._virtualHandled?(Zt&&(Zt._virtualHandled=!0),ke({preventDefault:function(){},deltaX:et?xt:0,deltaY:et?0:xt}),!0):!1}),ye(rr,kr,function(et){rn(function(xt){return xt+et})}),(0,rt.Z)(function(){function et(Ct){var bt=Ur&&Ct.detail<0,Zt=Gr&&Ct.detail>0;wn&&!bt&&!Zt&&Ct.preventDefault()}var xt=kr.current;return xt.addEventListener("wheel",ke,{passive:!1}),xt.addEventListener("DOMMouseScroll",at,{passive:!0}),xt.addEventListener("MozMousePixelScroll",et,{passive:!1}),function(){xt.removeEventListener("wheel",ke),xt.removeEventListener("DOMMouseScroll",at),xt.removeEventListener("MozMousePixelScroll",et)}},[wn,Ur,Gr]),(0,rt.Z)(function(){if(Vt){var et=Nr(or);Fr(et),On({x:et})}},[Hn.width,Vt]);var qe=function(){var xt,Ct;(xt=zr.current)===null||xt===void 0||xt.delayHidden(),(Ct=Cr.current)===null||Ct===void 0||Ct.delayHidden()},ft=mt(kr,Nn,At,de,kn,function(){return Bt(!0)},rn,qe);me.useImperativeHandle(te,function(){return{nativeElement:Ln.current,getScrollInfo:qr,scrollTo:function(xt){function Ct(bt){return bt&&(0,Oe.Z)(bt)==="object"&&("left"in bt||"top"in bt)}Ct(xt)?(xt.left!==void 0&&Fr(Nr(xt.left)),ft(xt.top)):ft(xt)}}}),(0,rt.Z)(function(){if($e){var et=Nn.slice(Cn,Ve+1);$e(et,Nn)}},[Cn,Ve,Nn]);var vt=Ce(Nn,kn,At,de),It=Mt==null?void 0:Mt({start:Cn,end:Ve,virtual:rr,offsetX:or,offsetY:Vn,rtl:mn,getSize:vt}),an=Ae(Nn,Cn,Ve,Vt,or,Ft,Ye,He),en=null;ne&&(en=(0,Me.Z)((0,nt.Z)({},wt?"height":"maxHeight",ne),_e),wn&&(en.overflowY="hidden",Vt&&(en.overflowX="hidden"),cn&&(en.pointerEvents="none")));var Gt={};return mn&&(Gt.dir="rtl"),me.createElement("div",(0,oe.Z)({ref:Ln,style:(0,Me.Z)((0,Me.Z)({},Tt),{},{position:"relative"}),className:Xt},Gt,Kt),me.createElement(be.Z,{onResize:ar},me.createElement(ln,{className:"".concat(re,"-holder"),style:en,ref:kr,onScroll:mr,onMouseEnter:qe},me.createElement(Ze,{prefixCls:re,height:pn,offsetX:or,offsetY:Vn,scrollWidth:Vt,onInnerResize:Bt,ref:gn,innerProps:un,rtl:mn,extra:It},an))),rr&&pn>ne&&me.createElement(Pt,{ref:zr,prefixCls:re,scrollOffset:Tr,scrollRange:pn,rtl:mn,onScroll:Qn,onStartMove:Er,onStopMove:Fe,spinSize:Zr,containerSize:Hn.height,style:Ut==null?void 0:Ut.verticalScrollBar,thumbStyle:Ut==null?void 0:Ut.verticalScrollBarThumb,showScrollBar:Pn}),rr&&Vt>Hn.width&&me.createElement(Pt,{ref:Cr,prefixCls:re,scrollOffset:or,scrollRange:Vt,rtl:mn,onScroll:Qn,onStartMove:Er,onStopMove:Fe,spinSize:dr,containerSize:Hn.width,horizontal:!0,style:Ut==null?void 0:Ut.horizontalScrollBar,thumbStyle:Ut==null?void 0:Ut.horizontalScrollBarThumb,showScrollBar:Pn}))}var Je=me.forwardRef(Dt);Je.displayName="List";var Ot=Je,Nt=Ot},93314:function(on){"use strict";on.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(on,nn,ce){"use strict";ce.d(nn,{Z:function(){return Xe}});const oe=be=>typeof be=="object"&&be!=null&&be.nodeType===1,Oe=(be,pe)=>(!pe||be!=="hidden")&&be!=="visible"&&be!=="clip",Me=(be,pe)=>{if(be.clientHeight<be.scrollHeight||be.clientWidth<be.scrollWidth){const rt=getComputedStyle(be,null);return Oe(rt.overflowY,pe)||Oe(rt.overflowX,pe)||(me=>{const lt=(je=>{if(!je.ownerDocument||!je.ownerDocument.defaultView)return null;try{return je.ownerDocument.defaultView.frameElement}catch(Ze){return null}})(me);return!!lt&&(lt.clientHeight<me.scrollHeight||lt.clientWidth<me.scrollWidth)})(be)}return!1},nt=(be,pe,rt,me,lt,je,Ze,Ee)=>je<be&&Ze>pe||je>be&&Ze<pe?0:je<=be&&Ee<=rt||Ze>=pe&&Ee>=rt?je-be-me:Ze>pe&&Ee<rt||je<be&&Ee>rt?Ze-pe+lt:0,xe=be=>{const pe=be.parentElement;return pe==null?be.getRootNode().host||null:pe},ue=(be,pe)=>{var rt,me,lt,je;if(typeof document=="undefined")return[];const{scrollMode:Ze,block:Ee,inline:Ae,boundary:ot,skipOverflowHiddenElements:st}=pe,ut=typeof ot=="function"?ot:Pt=>Pt!==ot;if(!oe(be))throw new TypeError("Invalid target");const Pe=document.scrollingElement||document.documentElement,ge=[];let Be=be;for(;oe(Be)&&ut(Be);){if(Be=xe(Be),Be===Pe){ge.push(Be);break}Be!=null&&Be===document.body&&Me(Be)&&!Me(document.documentElement)||Be!=null&&Me(Be,st)&&ge.push(Be)}const ze=(me=(rt=window.visualViewport)==null?void 0:rt.width)!=null?me:innerWidth,yt=(je=(lt=window.visualViewport)==null?void 0:lt.height)!=null?je:innerHeight,{scrollX:Ce,scrollY:we}=window,{height:We,width:Se,top:Ue,right:Ne,bottom:tt,left:Yt}=be.getBoundingClientRect(),{top:Et,right:Jt,bottom:Ht,left:ye}=(Pt=>{const Ke=window.getComputedStyle(Pt);return{top:parseFloat(Ke.scrollMarginTop)||0,right:parseFloat(Ke.scrollMarginRight)||0,bottom:parseFloat(Ke.scrollMarginBottom)||0,left:parseFloat(Ke.scrollMarginLeft)||0}})(be);let he=Ee==="start"||Ee==="nearest"?Ue-Et:Ee==="end"?tt+Ht:Ue+We/2-Et+Ht,mt=Ae==="center"?Yt+Se/2-ye+Jt:Ae==="end"?Ne+Jt:Yt-ye;const qt=[];for(let Pt=0;Pt<ge.length;Pt++){const Ke=ge[Pt],{height:ct,width:dt,top:yn,right:_e,bottom:Dt,left:Je}=Ke.getBoundingClientRect();if(Ze==="if-needed"&&Ue>=0&&Yt>=0&&tt<=yt&&Ne<=ze&&(Ke===Pe&&!Me(Ke)||Ue>=yn&&tt<=Dt&&Yt>=Je&&Ne<=_e))return qt;const Ot=getComputedStyle(Ke),Nt=parseInt(Ot.borderLeftWidth,10),ae=parseInt(Ot.borderTopWidth,10),te=parseInt(Ot.borderRightWidth,10),z=parseInt(Ot.borderBottomWidth,10);let re=0,le=0;const ne="offsetWidth"in Ke?Ke.offsetWidth-Ke.clientWidth-Nt-te:0,de="offsetHeight"in Ke?Ke.offsetHeight-Ke.clientHeight-ae-z:0,Re="offsetWidth"in Ke?Ke.offsetWidth===0?0:dt/Ke.offsetWidth:0,wt="offsetHeight"in Ke?Ke.offsetHeight===0?0:ct/Ke.offsetHeight:0;if(Pe===Ke)re=Ee==="start"?he:Ee==="end"?he-yt:Ee==="nearest"?nt(we,we+yt,yt,ae,z,we+he,we+he+We,We):he-yt/2,le=Ae==="start"?mt:Ae==="center"?mt-ze/2:Ae==="end"?mt-ze:nt(Ce,Ce+ze,ze,Nt,te,Ce+mt,Ce+mt+Se,Se),re=Math.max(0,re+we),le=Math.max(0,le+Ce);else{re=Ee==="start"?he-yn-ae:Ee==="end"?he-Dt+z+de:Ee==="nearest"?nt(yn,Dt,ct,ae,z+de,he,he+We,We):he-(yn+ct/2)+de/2,le=Ae==="start"?mt-Je-Nt:Ae==="center"?mt-(Je+dt/2)+ne/2:Ae==="end"?mt-_e+te+ne:nt(Je,_e,dt,Nt,te+ne,mt,mt+Se,Se);const{scrollLeft:Tt,scrollTop:Te}=Ke;re=wt===0?0:Math.max(0,Math.min(Te+re/wt,Ke.scrollHeight-ct/wt+de)),le=Re===0?0:Math.max(0,Math.min(Tt+le/Re,Ke.scrollWidth-dt/Re+ne)),he+=Te-re,mt+=Tt-le}qt.push({el:Ke,top:re,left:le})}return qt},Le=be=>be===!1?{block:"end",inline:"nearest"}:(pe=>pe===Object(pe)&&Object.keys(pe).length!==0)(be)?be:{block:"start",inline:"nearest"};function Xe(be,pe){if(!be.isConnected||!(lt=>{let je=lt;for(;je&&je.parentNode;){if(je.parentNode===document)return!0;je=je.parentNode instanceof ShadowRoot?je.parentNode.host:je.parentNode}return!1})(be))return;const rt=(lt=>{const je=window.getComputedStyle(lt);return{top:parseFloat(je.scrollMarginTop)||0,right:parseFloat(je.scrollMarginRight)||0,bottom:parseFloat(je.scrollMarginBottom)||0,left:parseFloat(je.scrollMarginLeft)||0}})(be);if((lt=>typeof lt=="object"&&typeof lt.behavior=="function")(pe))return pe.behavior(ue(be,pe));const me=typeof pe=="boolean"||pe==null?void 0:pe.behavior;for(const{el:lt,top:je,left:Ze}of ue(be,Le(pe))){const Ee=je-rt.top+rt.bottom,Ae=Ze-rt.left+rt.right;lt.scroll({top:Ee,left:Ae,behavior:me})}}}}]);
|