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

1105 lines
667 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[3317],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(Pt,Nt){"use strict";Nt.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 Pt={},Nt="5.0",fe={},le=null,it=!1,Le=!1,Ke=null,me=!1,ge=null,He=null,Ze=0;Ze<arguments.length;Ze++){var Ce=arguments[Ze];if(Ce!==null)switch(typeof Ce){case"number":Nt=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?Nt=Ce:Ke=Ce;break;case"object":typeof Ce.is3D!="undefined"?le=Ce:fe=Ce;break;case"boolean":it=Ce,Le=!0;break}}le===null&&(le={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!Le&&(it=!0)),Ke!==null&&fe.id===void 0&&(fe.id=Ke);var he="",Ye="",pe=!1,rt=null,Te=null,Ae=null,Me=!1,ke=null,et=null,tt=null,Qe=null,Re=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var _e=function(Oe){return parseFloat(Oe)>4?parseFloat(Oe):5};Pt.setHTML5Codebase=function(Oe,at){He=Oe,lt(Oe,at)},Pt.setJavaCodebase=Pt.setJavaCodebaseVersion=Pt.isCompiledInstalled=Pt.setPreCompiledScriptPath=Pt.setPreCompiledResourcePath=function(){},Pt.setHTML5CodebaseVersion=function(Oe,at){var ot=parseFloat(Oe);if(ot!==NaN&&ot<5){console.log("The GeoGebra HTML5 codebase version "+ot+" is deprecated. Using version latest instead.");return}ge=Oe,de(Oe,at)},Pt.getHTML5CodebaseVersion=function(){return Te},Pt.getParameters=function(){return fe},Pt.setFontsCSSURL=function(Oe){Qe=Oe},Pt.setGiacJSURL=function(Oe){},Pt.setJNLPFile=function(Oe){he=Oe},Pt.setJNLPBaseDir=function(Oe){},Pt.inject=function(){function Oe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var at="auto",ot=fe.id,en,dt=!1,Zt=0;Zt<arguments.length;Zt++){var We=arguments[Zt];typeof We=="string"?(We=We.toLowerCase(),We.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?at=We:ot=arguments[Zt]):typeof We=="boolean"?dt=We:We instanceof HTMLElement&&(en=We)}Ct();function Ct(){if(!me){setTimeout(Ct,200);return}at=Rt(at);var St=en||document.getElementById(ot);if(!St){console.log("possibly bug on ajax loading? ");return}if(Pt.removeExistingApplet(St,!1),fe.width===void 0&&St.clientWidth&&(fe.width=St.clientWidth),fe.height===void 0&&St.clientHeight&&(fe.height=St.clientHeight),!(fe.width&&fe.height)&&at==="html5"&&(delete fe.width,delete fe.height),rt=at,at==="screenshot")we(St,fe);else{var ae=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?ae=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(ae=(!je()||Oe())&&ze()),ae?(rt="screenshot",mt(St,fe,dt,at)):Xe(St,fe,dt)}}};function je(){try{return window.self!==window.top}catch(Oe){return!0}}function ze(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pt.getViews=function(){return le},Pt.isJavaInstalled=function(){return!1};var bt=function(Oe){var at=function(Zt){var We=JSON.parse(Zt),Ct=function(te){return te.type=="G"||te.type=="E"},St=We.elements?We.elements.filter(Ct)[0]:We;if(!St||!St.url){ot();return}fe.fileName=St.url,Ve(St.settings||{}),le.is3D=!0;var ae="https://www.geogebra.org/images/";Pt.setPreviewImage(ke||St.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Oe()},ot=function(){fe.onError&&fe.onError(),Wt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},en=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dt="/materials/"+fe.material_id+"?scope=basic";Ne("https://"+en+"/api/proxy.php?path="+encodeURIComponent(dt),at,ot)};function Ve(Oe){var at=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ot){Oe[ot]=!!Oe[ot]}),at.forEach(function(ot){fe[ot]===void 0&&Oe[ot]!==void 0&&(fe[ot]=Oe[ot])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ne(Oe,at,ot){var en=new XMLHttpRequest;en.open("GET",Oe),en.onload=function(){at(en.responseText)},en.onerror=ot,en.send()}Pt.isHTML5Installed=function(){return!0},Pt.getLoadedAppletType=function(){return rt},Pt.setPreviewImage=function(Oe,at,ot){ke=Oe,et=at,tt=ot},Pt.removeExistingApplet=function(Oe,at){var ot;typeof Oe=="string"&&(Oe=document.getElementById(Oe)),rt=null;var en=null;for(ot=0;ot<Oe.childNodes.length;ot++){var dt=Oe.childNodes[ot],Zt=dt.className;Zt==="applet_screenshot"?at?(dt.style.display="block",rt="screenshot"):dt.style.display="none":Zt!=="applet_scaler prerender"&&(Oe.removeChild(dt),en=Zt&&Zt.indexOf("appletParameters")!=-1?dt.id:null,ot--)}var We=fe.id!==void 0?fe.id:en,Ct=window[We];Ct&&typeof Ct.getBase64=="function"&&(Ct.remove(),window[We]=null)},Pt.refreshHitPoints=function(){if(_e(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Oe=Pt.getAppletObject();return Oe&&typeof Oe.recalculateEnvironments=="function"?(Oe.recalculateEnvironments(),!0):!1},Pt.startAnimation=function(){var Oe=Pt.getAppletObject();return Oe&&typeof Oe.startAnimation=="function"?(Oe.startAnimation(),!0):!1},Pt.stopAnimation=function(){var Oe=Pt.getAppletObject();return Oe&&typeof Oe.stopAnimation=="function"?(Oe.stopAnimation(),!0):!1},Pt.getAppletObject=function(){var Oe=fe.id!==void 0?fe.id:"ggbApplet";return window[Oe]},Pt.resize=function(){};var ht=function(Oe,at,ot){var en=document.createElement("param");en.setAttribute("name",at),en.setAttribute("value",ot),Oe.appendChild(en)},Be=function(Oe){return Oe&&Oe!=="false"},Xe=function(Oe,at,ot){_e(Te)<=4.2&&(ot=!0);var en=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Te||ggbHTML5LoadedCodebaseIsWebSimple&&!Me)&&(en=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dt=document.createElement("div");dt.classList.add("appletParameters","notranslate");var Zt=at.width,We=at.height;if(at.disableAutoScale=at.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():at.disableAutoScale,at.width!==void 0)if(_e(Te)<=4.4)Be(at.showToolBar)&&(at.height-=7),Be(at.showAlgebraInput)&&(at.height-=37),at.width<605&&Be(at.showToolBar)&&(at.width=605,Zt=605);else{var Ct=100;(Be(at.showToolBar)||Be(at.showMenuBar))&&(at.hasOwnProperty("customToolBar")&&(at.customToolbar=at.customToolBar),Ct=Be(at.showMenuBar)?245:155),Zt<Ct&&(at.width=Ct,Zt=Ct)}dt.style.border="none",dt.style.display="inline-block";for(var St in at)at.hasOwnProperty(St)&&St!=="appletOnLoad"&&dt.setAttribute("data-param-"+St,at[St]);Qe&&dt.setAttribute("data-param-fontscssurl",Qe),Pt.resize=function(){GGBAppletUtils.responsiveResize(Oe,at)},window.addEventListener("resize",function(tn){Pt.resize()});var ae=typeof at.appletOnLoad=="function"?at.appletOnLoad:function(){};if(!ot&&at.width!==void 0){at.hasOwnProperty("showSplash")||dt.setAttribute("data-param-showSplash","false");var te=Oe.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var ie=te.querySelector(".ggb_preview");else{var ie=Xt(Zt,We,at.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Zt+"px",te.style.height=We+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),_e(Te)>=5?(at.appletOnLoad=function(tn){var Jt=Oe.querySelector(".ggb_preview");Jt&&Jt.parentNode.removeChild(Jt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(tn)},z||te.appendChild(ie)):dt.appendChild(ie),te.appendChild(dt),z||Oe.appendChild(te),setTimeout(function(){Pt.resize()},1)}else{var ue=document.createElement("div");ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.appendChild(dt),Oe.appendChild(ue),at.appletOnLoad=function(tn){Pt.resize(),ae(tn)}}function ne(tn,Jt){Jt&&typeof Jt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(tn,Jt.appletOnLoad):renderGGBElement(tn),Wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Jt)}function be(tn,Jt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:tn,params:Jt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(dn){ne(dn.article,dn.params)}),html5AppletsToProcess=null)},_e(Te)<5&&(tn.className+=" geogebraweb")):ne(tn,Jt)}if(en){scriptLoadStarted=!0;for(var $e=0;$e<dt.childNodes.length;$e++){var It=dt.childNodes[$e].tagName;It==="TABLE"&&(dt.removeChild(dt.childNodes[$e]),$e--)}if(ggbHTML5LoadedScript!==null){var Dt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Dt!=null&&Dt.parentNode.removeChild(Dt)}var gt=document.createElement("script"),kt=function(){be(dt,at)};gt.src=Ye+Ae,ggbHTML5LoadedCodebaseIsWebSimple=Me,ggbHTML5LoadedCodebaseVersion=Te,ggbHTML5LoadedScript=gt.src,Wt("GeoGebra HTML5 codebase loaded: '"+Ye+"'.",at),!He&&(!ge||ge=="5.0")?(Me?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),kt()):Ye.requirejs?__webpack_require__.e(981).then(function(){var tn=[__webpack_require__(60981)];kt.apply(null,tn)}.bind(this)).catch(__webpack_require__.oe):(gt.onload=kt,Oe.appendChild(gt))}else be(dt,at);at.height=We,at.width=Zt},we=function(Oe,at,ot){var en=Xt(at.width,at.height,at.borderColor,ot),dt=document.createElement("div");dt.style.position="relative",dt.style.display="block",dt.style.width=at.width+"px",dt.style.height=at.height+"px",dt.className="applet_screenshot applet_scaler"+(ot?" applet_screenshot_play":""),dt.appendChild(en);var Zt=GGBAppletUtils.getScale(at,Oe,ot);ot?(Oe.appendChild(ut()),window.GGBT_wsf_view||(Oe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dt,"66%"),Oe.appendChild(dt),Zt!==1&&!isNaN(Zt)&&(GGBAppletUtils.scaleElement(dt,Zt),dt.style.width=at.width+"px",dt.style.height=at.height+"px",dt.parentNode.style.width=at.width*Zt+"px",dt.parentNode.style.height=at.height*Zt+"px"),Pt.resize=function(){Ge(Oe,en,dt,ot)},window.addEventListener("resize",function(We){Pt.resize()}),Pt.resize()};function Ge(Oe,at,ot,en){if(Oe.contains(at)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Oe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Oe)}var dt=GGBAppletUtils.getScale(fe,Oe,en);ot.parentNode!==null&&(!isNaN(dt)&&dt!==1?(GGBAppletUtils.scaleElement(ot,dt),ot.parentNode.style.width=fe.width*dt+"px",ot.parentNode.style.height=fe.height*dt+"px"):(GGBAppletUtils.scaleElement(ot,1),ot.parentNode.style.width=fe.width+"px",ot.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Oe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pt.onExitFullscreen=function(Oe,at){at.appendChild(Oe)};var mt=function(Oe,at,ot,en){we(Oe,at,!0);for(var dt=function(){var Ct=[];for(We=0;We<Oe.childNodes.length;We++)Ct.push(Oe.childNodes[We]);if(window.GGBT_wsf_view){var St=window.GGBT_wsf_view.renderFullScreen(Oe,at.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(Oe).find(".fullscreencontent");te.length>0?(St.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Xe(St,at,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else rt=en,Xe(Oe,at,!1);if(!window.GGBT_wsf_view)for(We=0;We<Ct.length;We++)Oe.removeChild(Ct[We])},Zt=Oe.getElementsByClassName("ggb_preview_play"),We=0;We<Zt.length;We++)Zt[We].addEventListener("click",dt,!1),Zt[We].addEventListener("ontouchstart",dt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Oe),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ut=function(){var Oe=document.createElement("div");if(Oe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var at='.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");}',ot=document.createElement("style");ot.styleSheet?ot.styleSheet.cssText=at:ot.appendChild(document.createTextNode(at)),document.getElementsByTagName("head")[0].appendChild(ot)}return Oe},Xt=function(Oe,at,ot,en){var dt=document.createElement("div");dt.className="ggb_preview",dt.style.position="absolute",dt.style.zIndex="90",dt.style.width=Oe-2+"px",dt.style.height=at-2+"px",dt.style.top="0px",dt.style.left="0px",dt.style.overflow="hidden",dt.style.backgroundColor="white";var Zt="lightgrey";ot!==void 0&&(ot==="none"?Zt="transparent":Zt=ot),dt.style.border="1px solid "+Zt;var We=document.createElement("img");if(We.style.position="relative",We.style.zIndex="1000",We.style.top="-1px",We.style.left="-1px",ke!==null&&We.setAttribute("src",ke),We.style.opacity=.7,et!==null){var Ct,St,ae;if(!en){Ct=document.createElement("img"),Ct.style.position="absolute",Ct.style.zIndex="1001",Ct.style.opacity=1,We.style.opacity=.3,St=360,St>Oe/4*3&&(St=Oe/4*3),ae=St/5.8,Ct.setAttribute("src",et),Ct.setAttribute("width",St),Ct.setAttribute("height",ae);var te=(Oe-St)/2,z=(at-ae)/2;Ct.style.left=te+"px",Ct.style.top=z+"px",dt.appendChild(Ct)}}return dt.appendChild(We),dt},Rt=function(Oe){return Oe=Oe.toLowerCase(),Oe==="html5"||Oe==="screenshot"?Oe:"html5"},ve=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Oe,at){if(Te=Oe,at){lt(Te,!0);return}var ot=!it;if(ot){var en=_e(Te);!isNaN(en)&&en<4.4&&(ot=!1)}var dt,Zt;window.location.protocol.substr(0,4)==="http"?dt=window.location.protocol:dt="http:";var We=Te.indexOf("//");We>0?Zt=Te:We===0?Zt=dt+Te:Zt="https://www.geogebra.org/apps/5.2.814.0/";for(var Ct in ve)if(Te.slice(ve[Ct].length*-1)===ve[Ct]||Te.slice((ve[Ct].length+1)*-1)===ve[Ct]+"/"){lt(Zt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ot&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Be(fe.showToolBar)&&!Be(fe.showMenuBar)&&!Be(fe.showAlgebraInput)&&!Be(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Zt+="webSimple/":Zt+="web3d/",lt(Zt,!1)},lt=function(Oe,at){if(Oe.requirejs){Ye=Oe;return}Oe.slice(-1)!=="/"&&(Oe+="/"),Ye=Oe,at===null&&(at=Oe.indexOf("http")===-1),pe=at,Ae="web.nocache.js",Me=!1;var ot=Ye.split("/");ot.length>1&&(!at&&ot[ot.length-2]==="webSimple"?(Ae="webSimple.nocache.js",Me=!0):ve.indexOf(ot[ot.length-2])>=0&&(Ae=ot[ot.length-2]+".nocache.js")),ot=Oe.split("/"),Te=ot[ot.length-3],Te.substr(0,4)==="test"?Te=Te.substr(4,1)+"."+Te.substr(5,1):(Te.substr(0,3)==="war"||Te.substr(0,4)==="beta")&&(Te="5.0");var en=parseFloat(Te);en!==NaN&&en<5&&Oe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+en+" is deprecated. Using version latest instead."),de("5.0",at))},Wt=function(Oe,at){window.console&&window.console.log&&(!at||typeof at.showLogging=="undefined"||at.showLogging&&at.showLogging!=="false")&&console.log(Oe)};fe.material_id!==void 0?bt(xt):xt();function xt(){var Oe=Nt;ge!==null?Oe=ge:parseFloat(Oe)<5&&(Oe="5.0"),de(Oe,!1),He!==null&&lt(He,pe),me=!0}return Pt},GGBAppletUtils=function(){"use strict";function Pt(){return window.GGBT_wsf_edit!==void 0}function Nt(me,ge){ge!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+ge+","+ge+")",me.style.webkitTransform="scale("+ge+","+ge+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function fe(me,ge,He,Ze,Ce,he){var Ye=null;if(he!=null&&he!="")for(var pe=me.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+he+" ")>-1){Ye=pe;break}else pe=pe.parentNode;var rt=0,Te=0,Ae=0,Me=0,ke=0,et=0,tt=0;if(Ye)rt=Ye.offsetWidth,Te=Math.max(Ze?Ye.offsetWidth:0,Ye.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(rt=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),Ae=rt):(rt=window.innerWidth,Te=window.innerHeight,Ae=window.innerWidth),me){var Qe=me.getBoundingClientRect();Qe.left>0&&Qe.left<=rt&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ke=rt-Qe.width-Qe.left,et=Ae<=480?10:30):(et=Qe.left,ke=Ae<=480?10:30),Me=et+ke)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Re=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me=40,tt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Me=0,tt=40)}}return me&&((He===void 0||!He)&&ge>0&&ge+Me<rt?rt=ge:rt-=Me,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He===void 0||!He)&&(Te-=tt)),{width:rt,height:Te}}function le(me,ge,He,Ze,Ce){if(me.isScreenshoGenerator)return 1;var he=Ze!==void 0&&Ze,Ye=me.noScaleMargin!=null&&me.noScaleMargin,pe=function(Re){return Re&&Re!=="false"},rt=pe(me.autoHeight),Te=fe(ge,me.width,He,rt,he&&window.GGBT_wsf_view||Ye,Ce),Ae=parseInt(Te.width),Me=me.width,ke=me.height;if(Me===void 0){var et=ge.querySelector(".appletParameters");et&&(Me=et.offsetWidth,ke=et.offsetHeight)}var tt=Ae/Me,Qe=he?1:Te.height/ke;return He!==void 0&&!He&&(tt=Math.min(1,tt),Qe=Math.min(1,Qe)),Math.min(tt,Qe)}function it(me,ge,He){var Ze=1,Ce,he=!1;if(me.hasOwnProperty("allowUpscale")&&(he=me.allowUpscale),me.hasOwnProperty("scale")&&(Ze=parseFloat(me.scale),(isNaN(Ze)||Ze===null||Ze===0)&&(Ze=1),Ze>1&&(he=!0)),ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))Ce=le(me,ge,he,He,me.scaleContainerClass);else return Ze;return he&&(!me.hasOwnProperty("scale")||Ze===1)?Ce:Math.min(Ze,Ce)}function Le(me){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),Ze=me.getBoundingClientRect(),Ce=(ge-Ze.width)/2,he=(He-Ze.height)/2;he<0&&(he=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?me.style.left="40px":me.style.left=Ce+"px",me.style.top=he+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(he<40?me.style.top="40px":me.style.top=he+"px",me.style.left=Ce+"px")}function Ke(me,ge){var He=me.querySelector(".appletParameters");if(He){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==He.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(He.parentElement&&/fullscreen/.test(He.parentElement.className))return;var Ze=it(ge,me);Pt()&&He.setAttribute("data-param-scale",Ze);for(var Ce=null,he=0;he<me.childNodes.length;he++)if(me.childNodes[he].className!==void 0&&me.childNodes[he].className.match(/^applet_scaler/)){Ce=me.childNodes[he];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var Ye=ge.id!==void 0?ge.id:"ggbApplet",pe=window[Ye];(pe==null||!pe.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(Ze)&&Ze!==1?(Ce.parentNode.style.width=ge.width*Ze+"px",Ce.parentNode.style.height=ge.height*Ze+"px",Nt(Ce,Ze)):(Nt(Ce,1),Ce.parentNode.style.width=ge.width+"px",Ce.parentNode.style.height=ge.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Le(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(He).parents(".content-added-content"))}}return{responsiveResize:Ke,isFlexibleWorksheetEditor:Pt,positionCenter:Le,getScale:it,scaleElement:Nt}}();__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 Pt=n.location.search;return Pt.indexOf(J)!=-1||Pt.indexOf(K)!=-1}function q(Pt,Nt){}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(Pt){var Nt=s[L].bindings;s[L].bindings=function(){for(var fe=Nt?Nt():{},le=Pt[webModule.__softPermutationId],it=O;it<le.length;it++){var Le=le[it];fe[Le[O]]=Le[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Pt=o.createElement(Q);if(Pt.id=L,Pt.style.cssText=R+S,Pt.tabIndex=-1,o.body.appendChild(Pt),t=Pt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Nt=document.compatMode==U?V:W;t.write(Nt+X),t.close()}}}function w(Pt){function Nt(le){function it(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Le=it();if(Le){le();return}function Ke(){if(!Le){if(!it())return;Le=!0,le(),o.removeEventListener&&o.removeEventListener(Z,Ke,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,Ke,!1);var me=setInterval(function(){Ke()},$)}function fe(le){var it=u(),Le=it.body,Ke=it.createElement(_);Ke.language=ab,Ke.crossOrigin=W,Ke.src=le,webModule.__errFn&&(Ke.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),Le.appendChild(Ke)}Nt(function(){fe(Pt)})}webModule.__startLoadingFragment=function(Pt){return C(Pt)},webModule.__installRunAsyncCode=function(Pt){var Nt=u(),fe=Nt.body,le=Nt.createElement(_);le.language=ab,le.text=Pt,fe.appendChild(le),fe.removeChild(le)};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(Pt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pt){var Nt=c[Pt];return Nt==null?null:Nt},r=d,webModule.__errFn=e}function B(){function Pt(me){var ge=me.lastIndexOf(rb);ge==-1&&(ge=me.length);var He=me.indexOf(sb);He==-1&&(He=me.length);var Ze=me.lastIndexOf(tb,Math.min(He,ge));return Ze>=O?me.substring(O,Ze+P):W}function Nt(me){if(!me.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=me+vb,me=Pt(ge.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function le(){for(var me=o.getElementsByTagName(_),ge=O;ge<me.length;++ge)if(me[ge].src.indexOf(xb)!=-1)return Pt(me[ge].src);return W}function it(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Le(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var Ke=fe();return Ke==W&&(Ke=le()),Ke==W&&(Ke=it()),Ke==W&&Le()&&(Ke=Pt(o.location.href)),Ke=Nt(Ke),Ke}function C(Pt){return Pt.match(/^\//)||Pt.match(/^[a-zA-Z]+:\/\//)?Pt:webModule.__moduleBase+Pt}function D(){var Pt=[],Nt=O,fe=[],le=[];function it(me){var ge=le[me](),He=fe[me];if(ge in He)return ge;var Ze=[];for(var Ce in He)Ze[He[Ce]]=Ce;throw r&&r(me,Ze,ge),null}if(__gwt_isKnownPropertyValue=function(me,ge){return ge in fe[me]},webModule.__getPropMap=function(){var me={};for(var ge in fe)fe.hasOwnProperty(ge)&&(me[ge]=it(ge));return me},webModule.__computePropValue=it,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Le;try{Le=Cb;var Ke=Le.indexOf(Db);Ke!=-1&&(Nt=parseInt(Le.substring(Ke+P),$),Le=Le.substring(O,Ke))}catch(me){}return webModule.__softPermutationId=Nt,C(Le+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(Pt,Nt,fe){"use strict";fe.d(Nt,{Ax:function(){return Ke},Ds:function(){return me},KI:function(){return He},SI:function(){return Le},f1:function(){return it}});var le=fe(90524);function it(Ze){let Ce=!0;if(Ze.length>0){for(let he=0;he<Ze.length;he++)if(Ze[he].compile_success==0||!Ze[he].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function Le(Ze,Ce=""){let he=[];for(let Ye=0;Ye<Ze.length;Ye++){let pe=Ze[Ye],rt=Ce?`${Ce}/${pe.name}`:`${pe.name}`;he.push({title:pe.name,type:pe.type,isLeaf:pe.type!=="tree",key:rt})}return he}function Ke(Ze,Ce,he){for(let Ye=0;Ye<Ze.length;Ye++){let pe=Ze[Ye];if(pe.key===Ce){pe.children=he;break}pe.children&&Ke(pe.children,Ce,he)}return Ze}function me(Ze,Ce,he){let Ye;return function(){let pe=this,rt=arguments,Te=function(){Ye=null,he||Ze.apply(pe,rt)},Ae=he&&!Ye;clearTimeout(Ye),Ye=setTimeout(Te,Ce),Ae&&Ze.apply(pe,rt)}}const ge=!0,He=le.Z.API_SERVER},6077:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Ye}});var le=fe(59301),it={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Le=fe(92310),Ke=fe.n(Le),me=fe(29787),ge=fe(2859),He=fe(82093),Ze=fe(49661),Ce=(pe,rt,Te)=>new Promise((Ae,Me)=>{var ke=Qe=>{try{tt(Te.next(Qe))}catch(Re){Me(Re)}},et=Qe=>{try{tt(Te.throw(Qe))}catch(Re){Me(Re)}},tt=Qe=>Qe.done?Ae(Qe.value):Promise.resolve(Qe.value).then(ke,et);tt((Te=Te.apply(pe,rt)).next())}),Ye=({data:pe,className:rt,fullWidth:Te,style:Ae={},onClose:Me,onOk:ke,showFullTools:et,noAssociationId:tt})=>{const Qe=(0,le.useRef)(null),Re=(0,le.useRef)(null),_e=(0,le.useRef)(null),je=(0,le.useRef)(null),[ze,bt]=(0,le.useState)(!1),[Ve,Ne]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(_e.current||(_e.current=document.createElement("style"),document.head.appendChild(_e.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),_e.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&ht()):(document.body.removeAttribute("data-custom"),_e.current&&(document.head.removeChild(_e.current),_e.current=null)),()=>{document.body.removeAttribute("data-custom"),_e.current&&(document.head.removeChild(_e.current),_e.current=null)}),[pe==null?void 0:pe.visible]);const ht=()=>Ce(void 0,null,function*(){bt(!0),Ne("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ge=yield(0,Ze.ZJ)(pe==null?void 0:pe.src);Qe.current.src="",Qe.current.src=Ge,Qe.current.onload=function(){we()},bt(!1),Ne("")}),Be=Ge=>Ce(void 0,null,function*(){bt(!0),Ne("\u6B63\u5728\u4FDD\u5B58\u4E2D");const mt=yield(0,He.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:Ge.dataUrl}});mt!=null&&mt.id&&!tt?(yield(0,He.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:mt==null?void 0:mt.id,settings:JSON.stringify(Ge.state)}})).status===0&&ke():mt!=null&&mt.id&&ke(mt),bt(!1),Ne("")}),Xe=()=>{const Ge=document.querySelector('a[href="https://markerjs.com/"]');Ge&&Ge.parentNode&&(Ge.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(ut=>{const Xt=document.querySelector(ut.name);Xt&&Xt.setAttribute("title",ut.title)})},we=()=>{Re.current=new ge.hP(Qe.current),Re.current.targetRoot=je.current,Re.current.addEventListener("render",Be),Re.current.addEventListener("beforeclose",Me),et&&(Re.current.availableMarkerTypes=Re.current.ALL_MARKER_TYPES,Re.current.uiStyleSettings.redoButtonVisible=!0,Re.current.uiStyleSettings.notesButtonVisible=!0,Re.current.uiStyleSettings.zoomButtonVisible=!0,Re.current.uiStyleSettings.zoomOutButtonVisible=!0,Re.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Re.current.uiStyleSettings,Re.current.show(),pe!=null&&pe.snapshotData&&Re.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Xe()},300)};return le.createElement(le.Fragment,null,(pe==null?void 0:pe.visible)&&le.createElement(me.Z,{spinning:ze,tip:Ve,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:je,className:Ke()(it.imageDimensions,rt,Te?it.fullWidth:""),style:Ae},le.createElement("img",{className:it.img,ref:Qe}))))}},88615:function(Pt,Nt,fe){"use strict";var le=fe(59301),it=fe(77019),Le=fe(5269),Ke=fe(20554),me=fe(99571),ge=fe(38394),He=fe(21697),Ze=fe(48136),Ce=fe(59301);const he=(0,le.forwardRef)(({callback:Ye,showSaveButton:pe,value:rt=""},Te)=>{const Ae=(0,le.useRef)(),Me=[{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 "}]}]}],ke=[{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}`}]}]}],et=Re=>{Ae.current.setValue(Ae.current.getValue()+" "+Re.value+" ")},tt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(it.Z,{className:He.Z.lists,gutter:[10,10]},Me.map((Re,_e)=>Ce.createElement(Le.Z,{flex:"110px",className:He.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:`$$${Re.value}$$`}),Re.name),Ce.createElement("div",{className:He.Z.children},Re.children.map((je,ze)=>Ce.createElement("div",{key:ze},Ce.createElement("h1",null,je.name),Ce.createElement(it.Z,{gutter:[10,10]},je.data.map((bt,Ve)=>Ce.createElement(Le.Z,{key:Ve,onClick:()=>et(bt),className:He.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+bt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(it.Z,{className:He.Z.lists,gutter:[10,10]},ke.map((Re,_e)=>Ce.createElement(Le.Z,{flex:"110px",className:He.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:"`$$"+Re.value+"$$`"}),Re.name),Ce.createElement("div",{className:He.Z.children},Re.children.map((je,ze)=>Ce.createElement("div",{key:ze},je.name&&Ce.createElement("h1",null,je.name),Ce.createElement(it.Z,{gutter:[10,10]},je.data.map((bt,Ve)=>Ce.createElement(Le.Z,{key:Ve,onClick:()=>et(bt),className:He.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+bt.value+"$$`"}))))))))))}],Qe=()=>{var Re=document.createElement("div");Re.innerHTML=Ae.current.getValue();var _e=Re.innerText;return Ye&&Ye(_e),_e};return(0,le.useImperativeHandle)(Te,()=>({getData:Qe})),Ce.createElement("div",{className:He.Z.mathWrap},Ce.createElement(Ke.default,{defaultActiveKey:"1",items:tt}),Ce.createElement("math-field",{locale:"zh_cn",className:He.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ae,style:{width:800,marginTop:30,fontSize:18}},rt||""),pe&&Ce.createElement("div",{className:He.Z.button},Ce.createElement(me.ZP,{size:"large",onClick:Qe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Nt.Z=he},57884:function(Pt,Nt,fe){"use strict";var le=fe(59301),it=fe(93314),Le=fe(99571),Ke=Object.defineProperty,me=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,he=(Te,Ae,Me)=>Ae in Te?Ke(Te,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Te[Ae]=Me,Ye=(Te,Ae)=>{for(var Me in Ae||(Ae={}))Ze.call(Ae,Me)&&he(Te,Me,Ae[Me]);if(He)for(var Me of He(Ae))Ce.call(Ae,Me)&&he(Te,Me,Ae[Me]);return Te},pe=(Te,Ae)=>me(Te,ge(Ae));const rt=({img:Te,buttonProps:Ae={},styles:Me={},customText:ke,ButtonText:et,ButtonClick:tt,Buttonclass:Qe,ButtonTwo:Re,imgStyles:_e,loading:je=!1,className:ze=""})=>le.createElement("section",{className:`tc animated fadeIn ${ze}`,style:Ye({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},Me)},le.createElement("img",{src:Te||it,style:pe(Ye({},_e),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},ke||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),et&&le.createElement(Le.ZP,Ye({className:Qe,onClick:tt},Ae),et),Re&&Re);Nt.Z=rt},41550:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Qe}});var le=fe(59301),it={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Le=fe(99571),Ke=fe(70557),me=fe(51124),ge=fe(25399),He=fe(49661),Ze=fe(72664),Ce=fe(57884),he=fe(90524),Ye=fe(14794),pe=fe(59301),rt=Object.defineProperty,Te=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ke=(Re,_e,je)=>_e in Re?rt(Re,_e,{enumerable:!0,configurable:!0,writable:!0,value:je}):Re[_e]=je,et=(Re,_e)=>{for(var je in _e||(_e={}))Ae.call(_e,je)&&ke(Re,je,_e[je]);if(Te)for(var je of Te(_e))Me.call(_e,je)&&ke(Re,je,_e[je]);return Re},tt=(Re,_e,je)=>new Promise((ze,bt)=>{var Ve=Be=>{try{ht(je.next(Be))}catch(Xe){bt(Xe)}},Ne=Be=>{try{ht(je.throw(Be))}catch(Xe){bt(Xe)}},ht=Be=>Be.done?ze(Be.value):Promise.resolve(Be.value).then(Ve,Ne);ht((je=je.apply(Re,_e)).next())}),Qe=({editOffice:Re="view",data:_e,issaver:je,onSaver:ze,theme:bt,type:Ve,filename:Ne,monacoEditor:ht,className:Be,style:Xe,close:we,onClose:Ge,hasMask:mt,disabledDownload:ut,onImgDimensions:Xt,showNodata:Rt,recordInfo:ve})=>{const[de,lt]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Wt,xt]=(0,le.useState)(""),[Oe,at]=(0,le.useState)(),ot=window.ENV==="build"?"/react/build":"",en=location.host.startsWith("localhost")?he.Z.PROXY_SERVER:he.Z.API_SERVER,Zt=10*(1024*1024),We=(0,le.useRef)();_e!=null&&_e.startsWith("/api")&&Ve!=="txt"&&(_e=he.Z.API_SERVER+_e);const Ct=ie=>ie.substring(ie.lastIndexOf("/")+1).split(".").pop();Ne&&ht&&(ht.filename=Ne),(0,le.useEffect)(()=>{var ie,ue;const ne=(ue=(ie=document.cookie)==null?void 0:ie.replace(/\s/g,""))==null?void 0:ue.split(";");ne==null||ne.map(be=>{let $e=be.split("=");$e[0]==="_educoder_session"&&xt($e[1])})},[]),(0,le.useEffect)(()=>{Ve==="office"&&(_e.indexOf("bigfilescdn.")>-1||_e.indexOf("bigfiles1")>-1?at({url:_e,fileType:Ct(_e),model:_e.indexOf("model=edit")?"edit":"view"}):ae())},[Ve,_e]);function St(ie){return tt(this,null,function*(){ie.data.type==="pdfdata"&&(ze(ie.data.data),window.removeEventListener("message",St,!1)),console.log("mess---:",ie.data)})}const ae=()=>tt(void 0,null,function*(){console.log("data:",_e);let ie=_e;_e.startsWith("http")||(ie=location.origin+ie);let ue=new URL(ie).pathname.split("/").pop();const ne=yield(0,Ze.gJ)({attachment_id:ue});ne.url=en+ne.url,at(ne)}),te=()=>{if(_e.startsWith("http")||_e.startsWith("blob:")){z();return}(0,He.Sv)(Ne||"educoder",_e,Ne)},z=()=>{ve&&(0,Ye.fc)({id:ve==null?void 0:ve.id,watch_type:1,course_id:ve==null?void 0:ve.course_id}),(0,He.Nd)(Ne||"educoder",decodeURIComponent(_e))};return pe.createElement("div",{style:et({},Xe||{}),className:`${mt&&it.bgBlack} ${Ve?it.wrp:"hide"}`},we&&pe.createElement("div",{className:it.close,ref:We},!!Xt&&pe.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>We.current},pe.createElement("span",{onClick:()=>{Ge(),Xt()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!ut&&pe.createElement(ge.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>We.current},pe.createElement("span",{onClick:z},pe.createElement("i",{className:"icon-quxiaozhiding"}))),je&&pe.createElement(ge.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>We.current},pe.createElement("span",{className:"",onClick:()=>{const ie=document.getElementById("pdfiframe");window.addEventListener("message",St,!1),setTimeout(()=>{ie.contentWindow.postMessage("getData","*")},300)}},pe.createElement("i",{className:"icon-baocun"}))),pe.createElement(ge.Z,{title:"\u5173\u95ED",getPopupContainer:()=>We.current},pe.createElement("span",{className:"",onClick:()=>{Ge()}},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${it[Be]} ${Be} ${it.monaco} ${Ve==="txt"?"show":"hide"}`},Ve==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(me.ZP,et({},ht)))),Ve==="audio"&&pe.createElement("audio",{src:`${(_e==null?void 0:_e.indexOf("http://"))>-1||(_e==null?void 0:_e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${_e}`,autoPlay:!0}),Ve==="video"&&pe.createElement(pe.Fragment,null,(_e==null?void 0:_e.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${_e}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${_e}`,autoPlay:!0})),Ve==="office"&&Oe&&pe.createElement("iframe",{src:`${ot}/office.html?key=${Oe.key}&url=${btoa(Oe.url)}&callbackUrl=${en+(Oe.callbackUrl||"")}&fileType=${Oe.fileType}&title=${Oe.title||""}&model=${Re}&officeServer=${he.Z.ONLYOFFICE}&disabledDownload=${!!ut}`}),Ve==="html"&&pe.createElement("iframe",{src:_e+"&disposition=inline"}),Ve==="pdf"&&pe.createElement("iframe",{id:"pdfiframe",src:`${ot}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(_e)}&disabledDownload=${!!ut}&model=${Re}`}),Ve==="image"&&pe.createElement("img",{src:`${(_e==null?void 0:_e.indexOf("http://"))>-1||(_e==null?void 0:_e.indexOf("https://"))>-1?"":"data:image/png;base64,"}${_e}`}),(Ve==="other"||Ve==="download")&&pe.createElement(pe.Fragment,null,Rt?pe.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pe.createElement(Le.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:ut},"\u4E0B\u8F7D")}):pe.createElement(Le.ZP,{type:"primary",size:"middle",onClick:te,disabled:ut},pe.createElement(Ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ve==="flowChart"&&pe.createElement("div",{className:"embed"},pe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${_e||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(Pt,Nt,fe){"use strict";fe.d(Nt,{z:function(){return ht},Z:function(){return Be}});var le=fe(59301),it=fe(88831),Le=fe(90290),Ke=fe(64018),me=fe(68535),ge=fe(90524),He=fe(49661),Ze=fe(15342),Ce=fe(77736),he=fe(99571),Ye=fe(1012),pe=fe(41550),rt=fe(59301),Ae=({html:Xe})=>{const we=(0,le.useRef)(null),Ge=(0,le.useRef)(null),mt=`.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,le.useEffect)(()=>{const ut=we.current.attachShadow({mode:"open"});Ge.current=document.createElement("div"),Ge.current.className="markdown-body",Ge.current.innerHTML=Xe,ut.appendChild(Ge.current);const Xt=document.createElement("style");return Xt.textContent=mt,ut.appendChild(Xt),()=>{ut.innerHTML=""}},[]),(0,le.useEffect)(()=>{Ge.current&&(Ge.current.innerHTML=Xe)},[Xe]),rt.createElement("div",{ref:we})};function Me(Xe){const we=["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"],Ge=new RegExp(`\\b(${we.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Xe.replace(Ge,"").trim()}var ke={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},et=Object.defineProperty,tt=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,_e=(Xe,we,Ge)=>we in Xe?et(Xe,we,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Xe[we]=Ge,je=(Xe,we)=>{for(var Ge in we||(we={}))Qe.call(we,Ge)&&_e(Xe,Ge,we[Ge]);if(tt)for(var Ge of tt(we))Re.call(we,Ge)&&_e(Xe,Ge,we[Ge]);return Xe};const ze="@\u2581\u2581@",bt="@\u2581@",Ve=/<pre[^>]*>/g;function Ne(Xe){let we=document.createElement("div");return we.innerHTML=Xe,we.childNodes.length===0?"":we.childNodes[0].nodeValue}const ht=(Xe,we)=>{Xe=Xe||"";const Ge=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ut=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Xt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return we?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ge,(Rt,ve,de,lt,Wt,xt,Oe)=>{const at=ve||lt||xt,ot=de||Wt||Oe||"?";return ge.Z.API_SERVER+"/api/attachments/"+at+ot+"&t="+(0,He.Jn)(at,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(Xt,(Rt,ve,de,lt,Wt,xt,Oe)=>{const at=ve||lt||xt,ot=de||Wt||Oe||"?";return ge.Z.API_SERVER+"/attachments/download/"+at+ot+"&t="+(0,He.Jn)(at,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replace(Ge,(Rt,ve,de,lt,Wt,xt,Oe)=>{const at=ve||lt||xt,ot=de||Wt||Oe||"?";return ge.Z.API_SERVER+"/api/attachments/"+at+ot+"&t="+(0,He.Jn)(at,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replace(mt,(Rt,ve,de,lt,Wt)=>{const xt=ve||lt,Oe=de||Wt||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+xt+Oe+xt+Oe+"&t="+(0,He.Jn)(xt,Date.now())}).replace(ut,(Rt,ve,de,lt,Wt)=>{const xt=ve||lt,Oe=de||Wt||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+xt+Oe+xt+Oe+"&t="+(0,He.Jn)(xt,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,`
`),Xe)};var Be=({value:Xe="",edit:we=!1,className:Ge,showTextOnly:mt,showLines:ut,style:Xt={},stylesPrev:Rt={},highlightKeywords:ve,showProgramFill:de,isProgramFill:lt,disabledFill:Wt=!1,programFillValue:xt,openEditor:Oe=()=>{},onFillChange:at=dt=>{},onFillBlur:ot=()=>{},onFillFocus:en=()=>{}})=>{let dt=Me(String(Xe||""));const Zt=(0,le.useRef)(),We=(0,le.useRef)(),[Ct,St]=(0,le.useState)(""),[ae,te]=(0,le.useState)("office"),[z,ie]=(0,le.useState)([]),ue=(0,le.useRef)("a"+(0,Ye.Z)()),ne={},be=Ee=>/<style[\s\S]*?>/i.test(Ee||""),$e=(Ee,vt,st)=>{const pt=document.createElement(Ee===bt?"input":"textarea");pt.style.width="100%",pt.style.height=Ee===bt?"40px":"151px",pt.rows=5,pt.spellcheck=!1,pt.name="edu-program-fill",pt.placeholder="\u8BF7\u8F93\u5165",pt.dataset.id=vt;const wt=Object.keys(ne).length;return ne[wt]=pt,`<span class="edu-program-fill-wrap ${Ee===bt?"":"show"}" style="width:${Ee===bt?"600px":"100%"}" title=${st||""}><span>${pt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function It(Ee){return Ee=Ee.replace(/!\[.*?\]\(.*?\)/g,""),Ee=Ee.replace(/\[.*?\]\(.*?\)/g,""),Ee=Ee.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ee=Ee.replace(/<embed.*?>/g,""),Ee=Ee.replace(/<img.*?>/g,""),Ee=Ee.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ee=Ee.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ee=Ee.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ee=Ee.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ee}const Dt=Ee=>!mt&&be(dt)?Ee:Ee.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(vt,st){let pt=st.replace(/(\n|\r)/g,"").split("}"),wt=[];return pt.map(jt=>{jt!=""&&wt.push(`.${ue.current} ${jt}`)}),`<style>${wt.join("}")}</style>`}),gt=(0,le.useMemo)(()=>{try{const pt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,wt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,jt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Bt=/\(\/attachments\/download\//g;dt=dt.replace(Bt,"("+ge.Z.API_SERVER+"/attachments/download/").replace(pt,"("+ge.Z.API_SERVER+"/api/attachments/").replace(wt,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(jt,'"'+ge.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,`
`),Zt.current.style.display="none"}catch(pt){}if(de){let pt=-1;return dt=dt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(wt,jt,Bt){var Gt;return++pt,$e(wt,pt,(Gt=xt==null?void 0:xt[pt])==null?void 0:Gt.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Dt(dt||"")}</pre>`}let Ee=Dt(dt);Ee=(0,Le.ZP)(Ee);const vt=(0,Le.ez)();dt.match(/\[TOC\]/)&&(Ee=Ee.replace("<p>[TOC]</p>",(0,Le.Qv)()),(0,Le.Iy)()),Ee=Ee.replace(/(__special_katext_id_\d+__)/g,(pt,wt)=>{const{type:jt,expression:Bt}=vt[wt];return(0,Ze.renderToString)(Ne(Bt)||"",{displayMode:jt==="block",throwOnError:!1,output:"html"})}),Ee=Ee.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Le.AL)();const st=document.createElement("div");if(st.innerHTML=Ee,mt)return st.innerText;if(ve){const pt=ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return dn(st,pt),st.innerHTML}return setTimeout(()=>Sn(),500),st.innerHTML},[dt,ve]);(0,le.useEffect)(()=>{sn.current&&sn.current.querySelectorAll(["input","textarea"]).forEach(vt=>{vt.oninput=kt,vt.onblur=tn,vt.onfocus=Jt})},[z]),(0,le.useEffect)(()=>{var Ee,vt,st,pt,wt;if(xt!=null&&xt.length)try{const jt=sn.current.querySelectorAll(".edu-program-fill-score"),Bt=sn.current.querySelectorAll('[name="edu-program-fill"]');for(const[Gt,Dn]of Bt.entries())Dn.value=((Ee=xt==null?void 0:xt[Gt])==null?void 0:Ee.value)||"",((vt=xt==null?void 0:xt[Gt])==null?void 0:vt.type)==="warning"?Dn.className="program-fill-warning":((st=xt==null?void 0:xt[Gt])==null?void 0:st.type)==="success"?Dn.className="program-fill-success":Dn.className="";for(const[Gt,Dn]of jt.entries())Dn.innerHTML=(pt=xt==null?void 0:xt[Gt])!=null&&pt.score?`${(wt=xt==null?void 0:xt[Gt])==null?void 0:wt.score}\u5206`:"";ie(xt)}catch(jt){console.log(jt,"error")}},[xt]);const kt=Ee=>{z[Ee.target.dataset.id]=z[Ee.target.dataset.id]||{},z[Ee.target.dataset.id].value=Ee.target.value,ie([...z]),at(z,Ee.target.dataset.id)},tn=Ee=>{z[Ee.target.dataset.id]=z[Ee.target.dataset.id]||{},z[Ee.target.dataset.id].value=Ee.target.value,ie([...z]),ot(z,Ee.target.dataset.id)},Jt=Ee=>{z[Ee.target.dataset.id]=z[Ee.target.dataset.id]||{},z[Ee.target.dataset.id].value=Ee.target.value,ie([...z]),en(z,Ee.target.dataset.id)};function dn(Ee,vt){return Ee.childNodes.forEach(st=>{var pt;if(st.childNodes.length>0)dn(st,vt);else if(st.nodeName!=="IMG")if(st.innerHTML)st.innerHTML=(pt=st.innerHTML)==null?void 0:pt.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const wt=document.createElement("span");wt.innerHTML=st.textContent.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),st.replaceWith(wt)}})}const sn=(0,le.useRef)();Le.jb.WebkitLineClamp=ut,ut&&(Xt=je(je({},Xt),Le.jb));function _t(Ee){let vt=Ee.target;if(vt.tagName.toUpperCase()==="A"){let st=vt.getAttribute("href");if(st.indexOf("office")>-1)Ee.preventDefault(),St(st),te("office");else if(st.indexOf("application/pdf")>-1)Ee.preventDefault(),St(st),te("pdf");else if(st.indexOf("text/html")>-1)Ee.preventDefault(),St(st),te("html");else if(st.startsWith("#")){Ee.preventDefault();let pt=document.getElementById(st.replace("#",""));pt&&pt.scrollIntoView(!0)}}}const Sn=()=>{var Ee;const vt=(Ee=sn.current)==null?void 0:Ee.querySelectorAll("video");vt==null||vt.forEach(st=>{if(st.oncontextmenu=()=>!1,st.src.indexOf(".m3u8")>-1&&!st.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var pt=new me.ZP;pt.loadSource(st.src),pt.attachMedia(st)}}})};(0,le.useEffect)(()=>{if(sn.current&&gt&&gt.match(Ve)&&window.PR.prettyPrint(),sn.current)return sn.current.addEventListener("click",_t),()=>{var Ee;(Ee=sn.current)==null||Ee.removeEventListener("click",_t),(0,Le.AL)(),(0,Le.Iy)()}},[gt,sn.current,_t]);const Pe=Ee=>{Ee.target.nodeName==="IMG"&&Ee.target.className.indexOf("draw-flowchart")>-1?(Zt.current.style.zIndex=1,Zt.current.style.display="flex",Zt.current.style.width=Ee.target.clientWidth+"px",Zt.current.style.height=Ee.target.clientHeight+"px",Zt.current.style.top=Ee.target.offsetTop+"px",Zt.current.style.left=Ee.target.offsetLeft+"px",Ee.target.id&&(We.current=Ee.target.id)):Zt.current.style.display="none"},qe=()=>{Zt.current.style.display="none"};return(0,le.useEffect)(()=>{var Ee;const vt=st=>{st.preventDefault(),st.clipboardData.setData("text",window.getSelection().toString())};return(Ee=sn.current)==null||Ee.addEventListener("copy",vt),()=>{var st;(st=sn.current)==null||st.removeEventListener("copy",vt)}},[sn.current]),le.createElement("div",{style:{position:"relative"},onMouseLeave:qe},mt&&le.createElement("div",{ref:sn,className:`${ke.mdBody} `},gt),!mt&&!be(gt)&&le.createElement("div",{ref:sn,style:je({},Xt),onMouseOver:Pe,className:`${Ge||""} ${Wt?"disabled-fill":""} markdown-body ${ke.mdBody} ${ue.current}`,dangerouslySetInnerHTML:{__html:gt}}),!mt&&be(gt)&&le.createElement(Ae,{html:gt}),le.createElement("div",{ref:Zt,className:`${ke.button} ${we?"":ke.previewFlowChart}`},le.createElement(Ce.Z,null,le.createElement(he.ZP,{onClick:()=>{we?Oe(We.current):(St(We.current),te("flowChart"))}},we?"\u7F16\u8F91":"\u9884\u89C8"))),le.createElement(pe.Z,{close:!0,data:Ct,type:Ct!=null&&Ct.length?ae:"",style:je({},Rt),onClose:()=>St("")}))}},44905:function(Pt,Nt,fe){"use strict";fe.d(Nt,{h:function(){return Re}});var le=fe(59301),it=fe(82326),Le=fe(28284),Ke=fe(99571),me=fe(89780),ge=fe.n(me),He=fe(66543),Ze=fe(59598),Ce=Object.defineProperty,he=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ae=(_e,je,ze)=>je in _e?Ce(_e,je,{enumerable:!0,configurable:!0,writable:!0,value:ze}):_e[je]=ze,Me=(_e,je)=>{for(var ze in je||(je={}))rt.call(je,ze)&&Ae(_e,ze,je[ze]);if(pe)for(var ze of pe(je))Te.call(je,ze)&&Ae(_e,ze,je[ze]);return _e},ke=(_e,je)=>he(_e,Ye(je));const et=it.default.Option,tt={labelCol:{span:4},wrapperCol:{span:20}},Qe={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"]};Nt.Z=({callback:_e,onCancel:je})=>{const[ze,bt]=(0,le.useState)("python");function Ve(ht){bt(Qe[ht][1])}function Ne(ht){_e(ht)}return le.createElement(Le.default,ke(Me({},tt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ne,style:{width:500}}),le.createElement(Le.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(it.default,{getPopupContainer:ht=>ht.parentNode,onChange:Ve},Object.keys(Qe).map(ht=>le.createElement(et,{key:ht,value:ht},Qe[ht][0])))),le.createElement(Le.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(Re,{mode:ze})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Ke.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function Re({value:_e,onChange:je,mode:ze,options:bt={}}){const Ve=(0,le.useRef)(),[Ne,ht]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ne){let Be=function(Xe){const we=Xe.getValue();je&&je(we)};return Ne.on("change",Be),()=>{Ne.off("change",Be)}}},[Ne,je]),(0,le.useEffect)(()=>{Ne&&Ne.setOption("mode",ze)},[Ne,ze]),(0,le.useEffect)(()=>{Ne&&(_e!==Ne.getValue()||_e==="")&&setTimeout(()=>{Ne.setValue(_e||"")},300)},[Ne,_e]),(0,le.useEffect)(()=>{if(Ve.current&&!Ne){const Be=ge().fromTextArea(Ve.current,Me({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},bt));ht(Be)}},[Ve.current,Ne]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Ve}))}},2978:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Rn}});var le=fe(59301),it=fe(76560),Le=fe(89780),Ke=fe.n(Le),me=fe(76374),ge=fe(66543),He=fe(6313),Ze=fe(25717),Ce=fe(99498),he=fe(25419),Ye=fe(67549),pe=fe(38394),rt=({value:Ht="",className:Qt,showTextOnly:un,showLines:xn,style:yn={}})=>{const Pn=(0,le.useMemo)(()=>"",[Ht]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Pn}}))},Te=Object.defineProperty,Ae=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Qe=(Ht,Qt,un)=>Qt in Ht?Te(Ht,Qt,{enumerable:!0,configurable:!0,writable:!0,value:un}):Ht[Qt]=un,Re=(Ht,Qt)=>{for(var un in Qt||(Qt={}))et.call(Qt,un)&&Qe(Ht,un,Qt[un]);if(ke)for(var un of ke(Qt))tt.call(Qt,un)&&Qe(Ht,un,Qt[un]);return Ht},_e=(Ht,Qt)=>Ae(Ht,Me(Qt));let je=[{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:Ht,title:Qt,icon:un,actionName:xn,className:yn="",children:Pn}){function Hn(){Ht(xn)}return le.createElement("a",{title:Qt,className:yn,onClick:Hn},le.createElement("i",{className:`${un}`}),Pn)}var bt=({watch:Ht,showNullButton:Qt,showNullProgramButton:un,onActionCallback:xn,fullScreen:yn,insertTemp:Pn,hidetoolBar:Hn,extraUse:Mn})=>{const Fn=[...je,{title:`${Ht?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ht?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!Hn&&Fn.map((qn,At)=>le.createElement("li",{key:At},qn.actionName?le.createElement(ze,_e(Re({},qn),{onActionCallback:xn})):le.createElement("span",{className:"v-line"}))),Qt?le.createElement("li",null,le.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:xn},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,un?le.createElement(le.Fragment,null,le.createElement("li",null,le.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:xn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),le.createElement("li",null,le.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:xn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Pn&&le.createElement("li",null,le.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Pn}`,onActionCallback:xn},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Mn&&le.createElement("li",null,Mn),le.createElement("li",{className:"btn-full-screen"},le.createElement(ze,{icon:`${yn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:yn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:xn})))},Ve=fe(75790),Ne=fe(28284),ht=fe(37568),Be=fe(99571),Xe=Object.defineProperty,we=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Rt=(Ht,Qt,un)=>Qt in Ht?Xe(Ht,Qt,{enumerable:!0,configurable:!0,writable:!0,value:un}):Ht[Qt]=un,ve=(Ht,Qt)=>{for(var un in Qt||(Qt={}))ut.call(Qt,un)&&Rt(Ht,un,Qt[un]);if(mt)for(var un of mt(Qt))Xt.call(Qt,un)&&Rt(Ht,un,Qt[un]);return Ht},de=(Ht,Qt)=>we(Ht,Ge(Qt));const lt={labelCol:{span:4},wrapperCol:{span:20}};var Wt=({callback:Ht,onCancel:Qt})=>{function un(xn){Ht(xn)}return le.createElement(Ne.default,de(ve({},lt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:un,style:{width:500}}),le.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(ht.default,null)),le.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(ht.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Be.ZP,{type:"ghost",onClick:Qt},"\u53D6\u6D88")))},xt=fe(44905),Oe=fe(45596),at=fe(62957),ot=fe(77019),en=fe(6077),dt=fe(59301),Zt=({callback:Ht,onCancel:Qt})=>{const un=document.createElement("canvas"),xn=un.getContext("2d");un.width=1e3,un.height=800,xn.fillStyle="#ffffff",xn.fillRect(0,0,un.width,un.height);const yn=un.toDataURL("image/png");return dt.createElement(at.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dt.createElement(ot.Z,{style:{height:"100vh"}},dt.createElement(en.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:yn,visible:!0,title:String(Date.now())},onOk:Pn=>{Ht({src:Pn.url})},onClose:Qt})))},We=fe(30641),Ct=fe(5269),St=fe(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=fe(59301),ie=(0,le.forwardRef)(({onCancel:Ht,editImgId:Qt,callback:un},xn)=>{let yn=(0,le.useRef)(),Pn=(0,le.useRef)(),Hn=(0,le.useRef)(),Mn=(0,le.useRef)(!1);const Fn=(0,le.useRef)(!1);console.log("ref:",xn);const[qn,At]=(0,le.useState)(0),[nt,Vt]=(0,le.useState)("100vh");return(0,le.useEffect)(()=>{At(1)},[]),(0,le.useImperativeHandle)(xn,()=>({setHeight:Vt})),te.createElement("div",{ref:Fn,className:"body-overflow-initial"},te.createElement(We.Z,{width:"100vw",height:nt,footer:null,closable:!0,placement:"bottom",open:!!qn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(vn=>{un({src:`/api/attachments/${vn}`,id:vn})})},title:te.createElement(ot.Z,{align:"middle"},te.createElement(Ct.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(Ct.Z,{onClick:()=>{Vt(nt==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(Ct.Z,{onClick:()=>{window.saveDrawData(vn=>{if(vn===null){St.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}St.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),un({src:`/api/attachments/${vn}`,id:vn,disabledClose:!0})})}},te.createElement(Be.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Qt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Pn})))}),ue=fe(90524),ne=fe(47889),be=fe(71051);const $e=ne.ZP.Group,It={margin:"0 8px"};var Dt=({callback:Ht,onCancel:Qt})=>{function un(xn){Ht(xn)}return le.createElement(Ne.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:un},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:It},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:It},"\u884C\u6570"),le.createElement(Ne.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(be.Z,null)),le.createElement("span",{style:It},"\u5217\u6570"),le.createElement(Ne.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(be.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:It},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Ne.default.Item,{name:"align"},le.createElement($e,null,le.createElement(ne.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(ne.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(ne.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(ne.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Be.ZP,{type:"ghost",onClick:Qt},"\u53D6\u6D88")))},gt=fe(71411),kt=fe(11081),tn=fe.n(kt),dn=(0,le.forwardRef)(({use3d:Ht,width:Qt,height:un,callback:xn,showSaveButton:yn},Pn)=>{const Hn=(0,le.useRef)(),Mn=(0,le.useRef)(),[Fn,qn]=(0,le.useState)(!1),At=(0,le.useRef)({id:Hn,appName:"graphing",width:Qt||1e3,height:un||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{Mn.current=new(tn())(At.current,!0),window.onload=function(){Mn.current.inject("applet_container")}},[]);const nt=()=>{var Vt=window.ggbApplet.getPNGBase64(1,!0,72);return xn&&xn(Vt),Vt};return(0,le.useEffect)(()=>{At.current.appName=Fn?"3D":"graphing",Mn.current.inject("applet_container")},[Fn]),(0,le.useEffect)(()=>{qn(Ht)},[Ht]),(0,le.useImperativeHandle)(Pn,()=>({getImgData:nt})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Hn}),le.createElement(ot.Z,{align:"middle"},le.createElement(Ct.Z,{flex:1},le.createElement(gt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Fn,onChange:Vt=>qn(Vt)})),le.createElement(Ct.Z,null,le.createElement(Be.ZP,{size:"large",onClick:nt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),sn=fe(88615);const _t="link",Sn="upload-image",Pe="add-flowchart",qe="draw-image",Ee="add-flowchart",vt="code-block",st="add-table",pt="------------",wt={default:pt,left:`:${pt}`,center:`:${pt}:`,right:`${pt}:`};var jt=fe(17904),Bt=fe(49661);function Gt(){}let Dn=0;const bn=1e4,Ln="\u2581",Zn="@\u2581\u2581@",An="@\u2581@",kn=`
**\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`,mn=["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 In(Ht){return/^\d+$/.test(Ht)?`${Ht}px`:Ht}const gn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Nn={[gn+"-B"]:"bold",[gn+"-I"]:"italic"},_n={[_t]:"\u6DFB\u52A0\u94FE\u63A5",[vt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Sn]:"\u6DFB\u52A0\u56FE\u7247",[qe]:"\u6DFB\u52A0\u753B\u56FE",[Pe]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[st]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Rn=({defaultValue:Ht="",onChange:Qt,width:un="100%",height:xn=400,miniToolbar:yn=!1,isFocus:Pn=!1,watch:Hn,insertTemp:Mn,mode:Fn="markdown",id:qn="markdown-editor-id",showResizeBar:At=!1,noStorage:nt=!1,showNullButton:Vt=!1,showNullProgramButton:vn=!1,hidetoolBar:Vn=!1,fullScreen:xe=!1,onBlur:De,onCMBeforeChange:Et,onFullScreen:ct,className:Ie="",disablePaste:ft=!1,disabled:zt=!1,disabledFill:an=!1,placeholder:pn="",values:Lt="",extraUse:Ut})=>{const[Fe,nn]=(0,le.useState)(null),[Ft,rn]=(0,le.useState)(Ht),[ln,Bn]=(0,le.useState)(Hn),[Tn,ar]=(0,le.useState)(xe),[Gn,jn]=(0,le.useState)(""),[or,Kn]=(0,le.useState)(0),[gr,Mr]=(0,le.useState)(xn),[yr,Cr]=(0,le.useState)(!1),[kr,hr]=(0,le.useState)(0),[sr,Dr]=(0,le.useState)(0),dr=(0,le.useRef)(),br=(0,le.useRef)(),xr=(0,le.useRef)(),Br=(0,le.useRef)(),fr=(0,le.useRef)(),ur=(0,le.useRef)(),nr=(0,it.useDispatch)();(0,le.useEffect)(()=>{const Yt=window.scrollY||window.pageYOffset;rn(Lt),Fe==null||Fe.setValue(Lt),window.scrollTo(0,Yt)},[Lt]),(0,le.useEffect)(()=>{ct==null||ct(Tn)},[Tn]),(0,le.useEffect)(()=>{if(dr.current){let Yt=function($t,on){var Jn;if(ft){on.preventDefault();return}const er=on.clipboardData;if(er){const Lr=er.types.toString(),rr=er.items;if(Lr==="Files"||er.types.indexOf("Files")>-1){if(on.preventDefault(),Fn=="stex")return;try{let vr=rr[1];((Jn=rr[0])==null?void 0:Jn.kind)==="file"&&(vr=rr[0]);const Nr=vr.getAsFile(),Ur=Nr.name.split(".").pop();(0,Oe.I)(Nr,Ar=>{var Qr,Rr,di;Ar.id?((Qr=Nr==null?void 0:Nr.type)==null?void 0:Qr.indexOf("image"))>-1?Ot.replaceSelection(`<img width="100%" src="/api/attachments/${Ar.id}?type=${Ar.content_type})" alt="" />`):((Rr=Nr==null?void 0:Nr.type)==null?void 0:Rr.indexOf("video"))>-1?Ot.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ar.id}"></video>`):((di=Nr==null?void 0:Nr.type)==null?void 0:di.indexOf("pdf"))>-1?Ot.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=${Nr.type}&disposition=inline" target="_blank">${Nr.name}</a>`):mn.includes(Ur)?Ot.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=office&disposition=inline" target="_blank">${Nr.name}</a>`):Ot.replaceSelection(`[${Nr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(vr){St.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ot=Ke().fromTextArea(dr.current,{mode:Fn,lineNumbers:!yn,lineWrapping:!0,value:Ht,autoCloseTags:!0,autoCloseBrackets:!0});return Ot.on("keyup",function($t,on){on.keyCode===8&&($t.getValue()==""?Ot.setOption("placeholder",pn):Ot.setOption("placeholder",null))}),Ot.on("keydown",function($t,on){if(on.keyCode===8){var Jn=Zr($t);Jn&&on.preventDefault()}}),Pn&&Ot.focus(),Ot.on("paste",Yt),zt&&Ot.on("beforeChange",function($t,on){(on.origin==="paste"||on.origin==="+input")&&on.cancel()}),nn(Ot),()=>{Ot.off("paste",Yt)}}},[]);const Tr=(0,le.useCallback)(()=>{if(br.current)try{}catch(Yt){console.log(Yt,"---- to set md editor body height")}},[gr,br,Tn]);(0,le.useEffect)(()=>{function Yt(){let Ot=new me.Z($t=>{for(let on of $t)(on.target.offsetHeight>0||on.target.offsetWidth>0)&&(Tr(),Fe.setSize("100%","100%"),Fe.refresh())});return Ot.observe(dr.current.parentElement),Ot}if(Fe){const Ot=Yt();return()=>{var $t,on;($t=dr.current)!=null&&$t.parentElement&&Ot.unobserve((on=dr.current)==null?void 0:on.parentElement)}}},[Fe,Tr]),(0,le.useEffect)(()=>{if(Fe){let Yt=[];for(const[Ot,$t]of Object.entries(Nn)){let on={[Ot]:()=>{Gr($t)}};Yt.push(on),Fe.addKeyMap(on)}return()=>{for(let Ot of Yt)Fe.removeKeyMap(Ot)}}},[Fe]),(0,le.useEffect)(()=>{xe!==Tn&&ar(xe)},[xe]),(0,jt.Z)(()=>{if(!nt&&or>0){let Yt=new Date().getTime(),Ot=window.sessionStorage.getItem(qn);Yt>=or+bn&&(!Ot||Ot!==Ft)&&(window.sessionStorage.setItem(qn,Ft),Cr(!0))}},bn),(0,le.useEffect)(()=>{Bn(Hn)},[Fe,Hn]),(0,le.useEffect)(()=>{Fe&&Pn&&Fe.focus()},[Fe,Pn]),(0,le.useEffect)(()=>{if(ln&&Fe){let Yt=function($t){let on=$t.target;if(Br.current){let Jn=on.scrollTop/on.scrollHeight;Br.current.scrollTop=Br.current.scrollHeight*Jn}};const Ot=Fe.getScrollerElement();return Ot.addEventListener("scroll",Yt),()=>{Ot.removeEventListener("scroll",Yt)}}},[Fe,ln]),(0,le.useEffect)(()=>{if(Fe&&Et){let Yt=function(Ot,$t){Et(Ot,$t)};return Fe.on("beforeChange",Yt),()=>{Fe.off("beforeChange",Yt)}}},[Fe,Et]),(0,le.useEffect)(()=>{if(Fe&&De){let Yt=function(){De(Fe.getValue())};return Fe.on("blur",Yt),()=>{Fe.off("blur",Yt)}}},[Fe,De]);function Zr(Yt,Ot){var $t=Yt.getDoc(),on=$t.getCursor(),Jn=$t.getLine(on.line),er=Jn.charAt(on.ch-1),Lr=Jn.lastIndexOf("@\u2581@",on.ch),rr=Jn.lastIndexOf("@\u2581\u2581@",on.ch),vr=Lr>rr?Lr:rr,Nr=Lr>rr?3:4;if(Zn.indexOf(er)===-1)return null;if(console.log("change1:",Ot,Yt,Jn,on,vr,Lr,rr,er),vr>=0&&on.ch-vr<5){var Ur=vr+Nr;return $t.replaceRange("",{line:on.line,ch:vr},{line:on.line,ch:Ur}),{line:on.line,ch:Ur}}return null}(0,le.useEffect)(()=>{if(Fe){let Yt=function(Ot,$t){const on=Ot.getValue();rn(on),Kn(new Date().getTime()),Ot.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qt&&(vn?Qt(on,Mt(on)):Qt(on))};return Fe.on("change",Yt),()=>{Fe.off("change",Yt)}}},[Fe,Qt]),(0,le.useEffect)(()=>{if(Fe)if(Ht==null)Fe.setValue(""),rn("");else{const Yt=window.scrollY||window.pageYOffset;Ht!==Fe.getValue()&&(Fe.setValue(Ht),rn(Ht),Fe.setCursor(zt?1:Fe.lineCount(),0),window.scrollTo(0,Yt))}},[Fe,Ht]);const Gr=(0,le.useCallback)(Yt=>{const Ot=Fe.getCursor(),$t=Fe.getSelection();let on=$t.split(`
`);switch(Yt){case"bold":return Fe.replaceSelection("**"+$t+"**"),$t===""&&Fe.setCursor(Ot.line,Ot.ch+2),Fe.focus();case"italic":return Fe.replaceSelection("*"+$t+"*"),$t===""&&Fe.setCursor(Ot.line,Ot.ch+1),Fe.focus();case"code":return Fe.replaceSelection("`"+$t+"`"),$t===""&&Fe.setCursor(Ot.line,Ot.ch+1),Fe.focus();case"inline-latex":return(0,Bt.Ye)(nr)?void 0:(jn("inline-latex"),Fe.focus());case"latex":return Fe.replaceSelection("```latex\n"+$t+"\n```"),Fe.setCursor(Ot.line+1,$t.length+1),Fe.focus();case"line-break":return Fe.replaceSelection(`<br/>
`),Fe.focus();case"list-ul":return $t===""?Fe.replaceSelection("- "+$t):Fe.replaceSelection(on.map(Jn=>Jn===""?"":`- ${Jn}`).join(`
`)),Fe.focus();case"list-ol":return $t===""?Fe.replaceSelection("1. "+$t):Fe.replaceSelection(on.map((Jn,er)=>Jn===""?"":`${er+1}. ${Jn}`).join(`
`)),Fe.focus();case"add-null-ch":return $t===""&&Fe.setCursor(Ot.line,Ot.ch),Fe.replaceSelection(Ln),Fe.focus();case"add-signal":return $t===""&&Fe.setCursor(Ot.line,Ot.ch),Fe.replaceSelection(An),Fe.focus();case"add-multiple":return $t===""&&Fe.setCursor(Ot.line,Ot.ch),Fe.replaceSelection(Zn),Fe.focus();case"inster-template-1":return $t===""&&Fe.setCursor(Ot.line,Ot.ch),Fe.replaceSelection(kn),Fe.focus();case"eraser":return Fe.setValue(""),Fe.focus();case"trigger-watch":return Bn(!ln),Fe.focus();case"trigger-full-screen":return ar(!Tn),Fe.focus();case _t:jn(_t);return;case vt:jn(vt);return;case Sn:jn(Sn);return;case qe:jn(qe);return;case"maths-latex":if((0,Bt.Ye)(nr))return;jn("maths-latex");return;case Pe:fr.current="",sessionStorage.removeItem("file_id"),jn(Pe);return;case st:jn(st);return;default:throw new Error}},[Fe,ln,Tn]),cr=(0,le.useCallback)((Yt,Ot)=>{var $t,on,Jn,er,Lr,rr;Yt!=null&&Yt.disabledClose||jn("");const{src:vr,alt:Nr,id:Ur}=Yt||{};switch(Gn){case _t:const{title:zi,link:Ri}=Yt;return Fe.replaceSelection(`[${zi}](${Ri})`),Fe.focus();case vt:const{language:Ci,content:mi}=Yt;return Fe.replaceSelection(["```"+Ci,mi,"```"].join(`
`)),Fe.focus();case"maths-latex":for(var Ar=atob(Yt),Qr=new Uint8Array(Ar.length),Rr=0;Rr<Ar.length;Rr++)Qr[Rr]=Ar.charCodeAt(Rr);var di=new Blob([Qr],{type:"image/png"});(0,Oe.I)(di,hi=>{hi.id?Fe.replaceSelection(`![,](/api/attachments/${hi.id}?type=${hi.content_type})`):(hi==null?void 0:hi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Bt.Ye)(nr))return;Fe.replaceSelection("`$$"+Yt+"$$`");break;case Ee:if(!Ur)return;Fe.getValue().indexOf(vr)===-1?Fe.replaceSelection(`<center><img id="${Ur}" width="80%" src="${vr}" class="draw-flowchart" alt="${Nr||""}" /></center>`):document.getElementById(Ur).src=ue.Z.API_SERVER+vr+"?t="+Date.now();break;case Sn:case qe:const Or=Ot,xi=(Jn=(on=($t=Or==null?void 0:Or.name)==null?void 0:$t.split("."))==null?void 0:on.pop)==null?void 0:Jn.call(on);return((er=Or==null?void 0:Or.type)==null?void 0:er.indexOf("image"))>-1||!(Or!=null&&Or.type)?Or!=null&&Or.align||Or!=null&&Or.width?Fe.replaceSelection(`<p style="text-align:${Or.align||"initial"}"><img width="${Or.width?Or.width+"%":"initial"}" src="${vr}" alt="${Nr||""}" /></p>`):Fe.replaceSelection(`<img width="100%" src="${vr}" alt="${Nr||""}" />`):((Lr=Or==null?void 0:Or.type)==null?void 0:Lr.indexOf("video"))>-1?Fe.replaceSelection(`<video width="100%" controls src="${vr}"></video>`):((rr=Or==null?void 0:Or.type)==null?void 0:rr.indexOf("pdf"))>-1?Fe.replaceSelection(`<a href="${vr}?type=${Or.type}&disposition=inline" target="_blank">${Or.name}</a>`):mn.includes(xi)?Fe.replaceSelection(`<a href="${vr}?type=office&disposition=inline" target="_blank">${Or.name}</a>`):Fe.replaceSelection(`[${Or.name}](${vr})`),Fe.focus();case st:const{row:ea,col:qr,align:Ni}=Yt;let Xi=`
`;for(let hi=0;hi<ea;hi++){let oa=[],Pi=[];for(let Wr=0;Wr<qr;Wr++)hi===1&&Pi.push(wt[Ni]),oa.push(" ");hi===1&&(Xi+=`| ${Pi.join(" | ")} |
`),Xi+=`| ${oa.join(qr===1?"":" | ")} |
`}return Fe.replaceSelection(Xi+`
`),Fe.focus();default:throw new Error}},[Fe,Gn]),Jr=(0,le.useMemo)(()=>{switch(Gn){case _t:return le.createElement(Wt,{callback:cr,onCancel:pr});case vt:return le.createElement(xt.Z,{callback:cr,onCancel:pr});case Sn:return le.createElement(Oe.Z,{callback:cr,onCancel:pr});case Pe:return le.createElement(ie,{editImgId:fr.current,callback:cr,onCancel:pr});case st:return le.createElement(Dt,{callback:cr,onCancel:pr});case"maths-latex":return le.createElement(dn,{showSaveButton:!0,callback:cr});case"inline-latex":return le.createElement(sn.Z,{showSaveButton:!0,callback:cr});default:return null}},[Gn]);function pr(){jn("")}(0,le.useEffect)(()=>{if(xr.current){let Yt=function(Lr){Jn=!0,er=Lr.pageY},Ot=function(){Jn=!1},$t=function(Lr){if(Jn){let rr=Lr.pageY-er;rr<0&&(rr=0),rr>300&&(rr=300);let vr=xn+rr+"px";Mr(vr)}},on=xr.current,Jn=!1,er=0;return on.addEventListener("mousedown",Yt),document.addEventListener("mousemove",$t),document.addEventListener("mouseup",Ot),()=>{on.removeEventListener("mousedown",Yt),document.removeEventListener("mousemove",$t),document.removeEventListener("mouseup",Ot)}}},[Fe,xr]),(0,le.useEffect)(()=>{Mr(xn)},[xn]);const Pr=In(un),Sr=In(gr),wr={width:Pr,height:Sr},Yn=(0,le.useMemo)(()=>{if(or){let Yt=new Date(or),Ot=Yt.getHours(),$t=Yt.getMinutes(),on=Yt.getSeconds();return Ot=Ot<10?"0"+Ot:Ot,$t=$t<10?"0"+$t:$t,on=on<10?"0"+on:on,`${Ot}:${$t}:${on}`}return 0},[or]),Mt=Yt=>{const Ot=[];if(vn){let $t=-1;Yt=Yt.replace(/(@▁▁@|@▁@)/g,function(on,Jn,er){Ot.push({multiLine:on!==An})})}return Ot};function Kt(){window.sessionStorage.removeItem(qn),Cr(!1),Kn(0)}function wn(){Cr(!1),Kn(0),Fe.setValue(window.sessionStorage.getItem(qn))}(0,le.useEffect)(()=>{_n[Gn]&&Gn!==qe&&Gn!==Pe&&setTimeout(()=>{const Yt=document.getElementsByClassName("markdown-popup-form")[0],Ot=window.innerWidth/2-Yt.offsetWidth/2,$t=window.innerHeight/2-Yt.offsetHeight/2;hr(Ot),Dr($t)},0)},[Gn]);const cn=Yt=>{Yt.preventDefault();const Ot=Yt.clientX-kr,$t=Yt.clientY-sr;document.body.onmousemove=on=>{let Jn=on.clientX-Ot,er=on.clientY-$t;const Lr=document.getElementsByClassName("markdown-popup-form")[0],rr=window.innerWidth-Lr.offsetWidth,vr=window.innerHeight-Lr.offsetHeight;Jn=Math.max(0,Math.min(Jn,rr)),er=Math.max(0,Math.min(er,vr)),Wn(on.clientX,on.clientY,Ot,$t)&&(hr(Jn),Dr(er))},document.body.onmouseup=function(){document.body.onmousemove=null}},Wn=(Yt,Ot,$t,on)=>{const Jn=document.body.clientHeight,er=document.body.clientWidth;return Yt<20&&$t>Yt||Yt>er-20&&$t<Yt||Ot<20&&on>Ot||Ot>Jn-20&&on<Ot?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:br},le.createElement("div",{className:`markdown-editor-container ${Ie} ${ln?"on-preview":""} ${yn?"mini":""} ${Tn?"full-screen":""}`,style:wr},le.createElement(bt,{insertTemp:Mn,watch:ln,fullScreen:Tn,showNullButton:Vt,showNullProgramButton:vn,onActionCallback:Gr,hidetoolBar:Vn,extraUse:Ut}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:dr,placeholder:pn})),ln?le.createElement("div",{ref:Br,className:"preview-container"},Fn==="stex"&&le.createElement(rt,{value:Ft}),Fn!=="stex"&&le.createElement(pe.Z,{edit:!0,disabledFill:an,showProgramFill:vn,value:Ft,openEditor:Yt=>{var Ot;fr.current=Yt,(Ot=ur.current)==null||Ot.setHeight("100vh"),setTimeout(()=>{jn("add-flowchart")},150)}})):null))),At?le.createElement("a",{ref:xr,className:"editor-resize"}):null,Gn===qe&&le.createElement(Zt,{callback:cr,onCancel:pr}),Gn===Pe&&le.createElement(ie,{ref:ur,editImgId:fr.current,callback:cr,onCancel:pr}),le.createElement(Ve.Z,null,_n[Gn]&&Gn!==qe&&Gn!==Pe?le.createElement(at.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:kr,top:sr},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:cn},_n[Gn]),open:!0,onCancel:pr,footer:null,destroyOnClose:!0,width:Gn===Pe?"1200px":null,height:Gn===Pe?"80vh":null,className:"markdown-popup-form"},Jr):null))}},45596:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return je},I:function(){return bt}});var le=fe(28284),it=fe(6767),Le=fe(37568),Ke=fe(77736),me=fe(71051),ge=fe(47889),He=fe(99571),Ze=fe(67303),Ce=fe(59301),he=fe(59301),Ye=Object.defineProperty,pe=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ke=(Ve,Ne,ht)=>Ne in Ve?Ye(Ve,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ve[Ne]=ht,et=(Ve,Ne)=>{for(var ht in Ne||(Ne={}))Ae.call(Ne,ht)&&ke(Ve,ht,Ne[ht]);if(Te)for(var ht of Te(Ne))Me.call(Ne,ht)&&ke(Ve,ht,Ne[ht]);return Ve},tt=(Ve,Ne)=>pe(Ve,rt(Ne));const{useForm:Qe}=le.default,Re={width:280,marginRight:10},_e={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ve,onCancel:Ne})=>{const[ht]=Qe();let Be=(0,Ce.useRef)();function Xe(mt){Be.current.width=ht.getFieldValue("width"),Be.current.align=ht.getFieldValue("align"),Ve(mt,Be.current)}function we(mt,ut){if(mt.status===-1){it.ZP.error(mt.message);return}ht.setFieldsValue({src:`/api/attachments/${mt.id}`,type:ut.type})}function Ge(mt){let ut=mt.target.files[0];Be.current=ut,bt(ut,we)}return he.createElement(le.default,tt(et({form:ht},_e),{className:"upload-image-panel",onFinish:Xe,style:{width:470,overflow:"hidden"}}),he.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(Le.default,{style:Re})),he.createElement(ze,{onFileChange:Ge}))),he.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Le.default,{style:{width:264}})),he.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},he.createElement(Ke.Z,null,he.createElement(le.default.Item,{name:"width",style:{margin:0}},he.createElement(me.Z,{style:{width:264}})),he.createElement("span",{className:"ml8"},"%"))),he.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},he.createElement(ge.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"}]})),he.createElement("aside",null,he.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},he.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(He.ZP,{type:"default",onClick:Ne},"\u53D6\u6D88"))))};function ze({onFileChange:Ve}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:Ve}))}function bt(Ve,Ne){if(!Ve)throw new String("\u6CA1\u6709\u6587\u4EF6");let ht=new FormData;ht.append("editormd-image-file",Ve),ht.append("file_param_name","editormd-image-file"),ht.append("byxhr","true");var Be=new window.XMLHttpRequest;Be.withCredentials=!0,Be.addEventListener("load",function(Xe){Ne(JSON.parse(Xe.target.responseText),Ve)},!1),Be.addEventListener("error",function(Xe){console.error(Xe)},!1),Be.open("POST",`${Ze.KI}/api/attachments.json`),Be.send(ht)}},75790:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Le}});var le=fe(59301),it=fe(4676);class Le extends le.Component{constructor(me){super(me);const ge=window.document;this.node=ge.createElement("div"),ge.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,it.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(Pt,Nt,fe){"use strict";fe.d(Nt,{SV:function(){return Zt},ZP:function(){return dt}});var le=fe(59301),it=fe(76374);const Le={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"]},Ke={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"]},me={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(`
`)}]},ge={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(`
`)}]},He={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 Ze=fe(53184),Ce=fe.n(Ze),he=(We,Ct,St)=>new Promise((ae,te)=>{var z=ne=>{try{ue(St.next(ne))}catch(be){te(be)}},ie=ne=>{try{ue(St.throw(ne))}catch(be){te(be)}},ue=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);ue((St=St.apply(We,Ct)).next())});const Ye={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"]}},pe=(We,Ct,St,ae)=>{const te=Ct.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:St.lineNumber,endColumn:St.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(ie=>({label:ie,kind:We.languages.CompletionItemKind.Text,insertText:ie,range:ae}))},rt=(We,Ct,St,ae)=>{We.languages.registerCompletionItemProvider(Ct,{provideCompletionItems(te,z){const ie=te.getWordUntilPosition(z),ue={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:ie.startColumn,endColumn:ie.endColumn},ne=te.getLineContent(z.lineNumber).substring(ie.startColumn-2,ie.endColumn);return{suggestions:[...pe(We,te,z,ue),...St.map($e=>({label:$e,kind:We.languages.CompletionItemKind.Keyword,documentation:$e,insertText:$e,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ue})),...ae.map($e=>({label:$e.label,kind:We.languages.CompletionItemKind.Snippet,documentation:$e.content,insertText:ne.startsWith("#")?$e.content.replace(/#/,""):$e.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ue}))]}}})};var Te=We=>{Ye.languages.forEach(Ct=>{We.languages.registerDocumentFormattingEditProvider(Ct,{provideDocumentFormattingEdits(St){return he(this,null,function*(){const ae=Ce()(St.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:St.getFullModelRange(),text:ae}]})}})}),rt(We,"java",Ke.keywords,Ke.quickKey),rt(We,"cpp",me.keywords,me.quickKey),rt(We,"c",Le.keywords,[]),rt(We,"python",ge.keywords,ge.quickKey),rt(We,"scala",He.keywords,He.quickKey)};const Ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,ke=(We,Ct,St)=>Ct in We?Me(We,Ct,{enumerable:!0,configurable:!0,writable:!0,value:St}):We[Ct]=St,et=(We,Ct,St)=>ke(We,typeof Ct!="symbol"?Ct+"":Ct,St);const tt=class _s{constructor(Ct,St,ae){this.placeholder=Ct,this.editor=St,this.monaco=ae,St.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _s.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)}};et(tt,"ID","editor.widget.placeholderHint");var Re=tt,_e=fe(96236),je=fe(6767),ze=fe(25399),bt=fe(89392),Ve=fe(33796),Ne=fe(56102),ht=Object.defineProperty,Be=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ut=(We,Ct,St)=>Ct in We?ht(We,Ct,{enumerable:!0,configurable:!0,writable:!0,value:St}):We[Ct]=St,Xt=(We,Ct)=>{for(var St in Ct||(Ct={}))Ge.call(Ct,St)&&ut(We,St,Ct[St]);if(we)for(var St of we(Ct))mt.call(Ct,St)&&ut(We,St,Ct[St]);return We},Rt=(We,Ct)=>Be(We,Xe(Ct)),ve=(We,Ct)=>{var St={};for(var ae in We)Ge.call(We,ae)&&Ct.indexOf(ae)<0&&(St[ae]=We[ae]);if(We!=null&&we)for(var ae of we(We))Ct.indexOf(ae)<0&&mt.call(We,ae)&&(St[ae]=We[ae]);return St},de=(We,Ct,St)=>new Promise((ae,te)=>{var z=ne=>{try{ue(St.next(ne))}catch(be){te(be)}},ie=ne=>{try{ue(St.throw(ne))}catch(be){te(be)}},ue=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);ue((St=St.apply(We,Ct)).next())});function lt(We){return/^\d+$/.test(We)?`${We}px`:We}function Wt(){}let xt=!1;const Oe={"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 at(We=[]){let Ct=We;if(Array.isArray(We)){for(let St=0;St<We.length;St++){let ae=Oe[We[St]];if(ae)return ae}return Ct[0]}return Oe[Ct]||Ct}let ot=null;const en=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(We){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",We)}});var dt=We=>{var Ct=We,{width:St="100%",height:ae="100%",value:te,language:z="javascript",style:ie={},options:ue={},overrideServices:ne={},theme:be="vs-dark",onEditBlur:$e,isCopy:It=!1,onSave:Dt,autoHeight:gt=!1,forbidCopy:kt=!1,onChange:tn=Wt,editorDidMount:Jt=Wt,onFocus:dn=Wt,onBreakPoint:sn=Wt,breakPointValue:_t=[],filename:Sn="educoder.txt",errorLine:Pe,errorContent:qe="",highlightLine:Ee,openBreakPoint:vt=!1,placeholder:st="",showMiniMap:pt=!0}=Ct,wt=ve(Ct,["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 jt=(0,le.useRef)(),Bt=(0,le.useRef)({}),Gt=(0,le.useRef)(),Dn=(0,le.useRef)(),bn=(0,le.useRef)([]),Ln=(0,le.useRef)(!1),Zn=(0,le.useRef)(),An=(0,le.useRef)(),kn=(0,le.useRef)(!1),[mn,In]=(0,le.useState)(!1);function $n(){let At;return jt.current&&(At=new it.Z(nt=>{for(let Vt of nt)(Vt.target.offsetHeight>0||Vt.target.offsetWidth>0)&&Bt.current.instance.layout()}),At.observe(jt.current)),At}function gn(){je.ZP.warning({content:decodeURIComponent(Ae),key:"monaco-editor-tip"})}const Nn=()=>{let At=Bt.current.instance;if(te!=null&&At&&mn){const nt=At.getModel();nt&&te!==nt.getValue()&&(xt=!0,nt.setValue(te),At.layout(),xt=!1)}};(0,le.useEffect)(()=>{const At=Ve.Z.subscribe("formatDocument",nt=>{var Vt;let vn=Bt.current.instance;(Vt=vn==null?void 0:vn.getAction)==null||Vt.call(vn,"editor.action.formatDocument").run()});return window.updateMonacoValue=nt=>{tn(nt)},At},[]),(0,le.useEffect)(()=>{var At;let nt=Bt.current.instance;Dn.current&&clearTimeout(Dn.current),Dn.current=setTimeout(()=>{Nn()},500),te&&(te!=null&&te.length)&&((At=nt==null?void 0:nt.updateOptions)==null||At.call(nt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,mn,Bt.current]),(0,le.useEffect)(()=>{if(Pe&&Bt.current&&Bt.current.instance){let nt=Bt.current.instance;nt.changeViewZones(function(Vt){var vn=document.createElement("div");vn.style.padding="10px 20px",vn.style.width="calc(100% - 20px)",vn.className="my-error-line-wrp",vn.innerHTML=qe,Vt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:vn})});var At={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}};nt.addOverlayWidget(At),nt.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,Bt.current,mn]);const _n=(At="",nt)=>{if(!At||At.trim()==="")return!0;const vn=Bt.current.instance.getModel().getLineTokens(nt);let Vn=!1;for(let xe=0;xe<2;xe++)vn.getStandardTokenType(xe)===1&&(Vn=!0);return Vn};(0,le.useEffect)(()=>{var At;const nt=(At=Bt.current)==null?void 0:At.instance;if(nt&&mn&&kt){const Vt=nt.onDidBlurEditorWidget(()=>{kn.current=!1}),vn=nt.onDidFocusEditorText(()=>{kn.current=!0});return()=>{Vt.dispose(),vn.dispose()}}},[Bt.current,mn,kt]),(0,le.useEffect)(()=>{var At;if((At=Bt.current)!=null&&At.instance&&mn&&vt){let nt=Bt.current.instance,Vt=nt.getModel();if(!Vt)return;(()=>{var Lt;let Ut=[],Fe=[];const nn=Vt.getAllDecorations();for(let rn of nn)rn.options.className==="highlighted-line"&&(Ut.push((Lt=rn==null?void 0:rn.range)==null?void 0:Lt.startLineNumber),Fe.push(rn==null?void 0:rn.id));if(Ee===Ut[0])return;Vt.deltaDecorations(Fe,[]);const Ft=Vt.getLineCount();Ee&&Ee<=Ft&&(nt.deltaDecorations([],[{range:new ot.Range(Ee,1,Ee,Vt.getLineMaxColumn(Ee)),options:{isWholeLine:!0,className:"highlighted-line"}}]),nt.revealLineInCenter(Ee))})();const Vn=(Lt=!1)=>{var Ut;let Fe=[],nn=[];const Ft=Vt.getAllDecorations();for(let rn of Ft)rn.options.linesDecorationsClassName==="breakpoints-select"&&(Fe.push((Ut=rn==null?void 0:rn.range)==null?void 0:Ut.startLineNumber),nn.push(rn==null?void 0:rn.id));if(Lt)return{lines:Fe,ids:nn};sn(Fe)},xe=Lt=>de(void 0,null,function*(){let Ut={range:new ot.Range(Lt,1,Lt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Vt.deltaDecorations([],[Ut]),Vn()}),De=Lt=>de(void 0,null,function*(){let Ut=[];const Fe=nt.getLineDecorations(Lt);for(let nn of Fe)nn.options.linesDecorationsClassName==="breakpoints-select"&&Ut.push(nn.id);yield Vt.deltaDecorations(Ut,[]),Vn()}),Et=Lt=>{let Ut=nt.getLineDecorations(Lt);for(let Fe of Ut)if(Fe.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,bt.isEqual)(_t,Vn(!0).lines)){Vt.deltaDecorations(Vn(!0).ids,[]);const Lt=_t.map(Ut=>({range:new ot.Range(Ut,1,Ut,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Vt.deltaDecorations([],Lt)}const ct=nt.onDidChangeModelContent(Lt=>{let Ut=nt.getPosition();if(Ut){let Fe=Ut.lineNumber;clearTimeout(An.current),An.current=setTimeout(()=>{_n(Vt.getLineContent(Fe),Fe)?De(Fe):Et(Fe)?(De(Fe),xe(Fe)):Vn()},100)}}),Ie=nt.onMouseDown(Lt=>{var Ut,Fe,nn;if(Lt.target.detail&&((nn=(Fe=(Ut=Lt.target)==null?void 0:Ut.element)==null?void 0:Fe.className)!=null&&nn.includes("line-numbers"))){let Ft=Lt.target.position.lineNumber;if(_n(Vt.getLineContent(Ft),Ft))return;Et(Ft)?De(Ft):xe(Ft)}}),ft=Lt=>{let Ut={range:new ot.Range(Lt,1,Lt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};bn.current=nt.deltaDecorations(bn.current,[Ut])},zt=()=>{bn.current=nt.deltaDecorations(bn.current,[])},an=nt.onMouseMove(Lt=>{var Ut,Fe,nn;if(zt(),Lt.target.detail&&((nn=(Fe=(Ut=Lt.target)==null?void 0:Ut.element)==null?void 0:Fe.className)!=null&&nn.includes("line-numbers"))){let Ft=Lt.target.position.lineNumber;if(_n(Vt.getLineContent(Ft),Ft))return;ft(Ft)}}),pn=nt.onMouseLeave(()=>{zt()});return()=>{ct.dispose(),Ie.dispose(),an.dispose(),pn.dispose()}}},[Bt.current,mn,_t,Ee,vt,z]),(0,le.useEffect)(()=>{var At;(At=Bt.current)!=null&&At.instance&&vt&&Bt.current.instance.setPosition({lineNumber:0,column:0})},[Ee]);function Rn(){let At=Bt.current.instance;if(At){const nt=At.getSelection(),Vt=Bt.current.pastePos||{},vn=new ot.Range(Vt.startLineNumber||nt.endLineNumber,Vt.startColumn||nt.endColumn,Vt.endLineNumber||nt.endLineNumber,Vt.endColumn||nt.endColumn);setTimeout(()=>{At.executeEdits("",[{range:vn,text:""}])},300)}}function Ht(At){(window.navigator.platform.match("Mac")?At.metaKey:At.ctrlKey)&&At.keyCode==83&&(At.preventDefault(),Dt())}const Qt=()=>{if(gt&&Bt.current.instance){const At=Bt.current.instance.getContentHeight();Fn(At<ae?ae:At)}else Fn(ae)};function un(At){var nt=document.createEvent("MouseEvents");nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),At.dispatchEvent(nt)}const xn=At=>{if(!kn.current)return;const{keyCode:nt,ctrlKey:Vt,metaKey:vn,target:Vn,type:xe}=At;return(xe==="paste"||(nt===67||nt===86)&&(vn||Vt))&&Vn.nodeName==="TEXTAREA"&&(gn(),At.preventDefault()),!1};function yn(At,nt){var Vt=window.URL||window.webkitURL||window,vn=new Blob([nt]),Vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Vn.href=Vt.createObjectURL(vn),Vn.download=At,un(Vn)}(0,le.useEffect)(()=>{Qt()},[Qt]),(0,le.useEffect)(()=>{jt.current&&!mn&&Promise.all([fe.e(8909),fe.e(5028)]).then(fe.bind(fe,71448)).then(At=>{try{ot=At,Bt.current.instance=ot.editor.create(jt.current,{value:te,language:at(z),theme:be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:pt||!1}},ne);const nt=Bt.current.instance;let Vn=[..._e.BH._menuItems].find(ct=>ct[0]._debugName=="EditorContext")[1],xe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],De=(ct,Ie)=>{var ft,zt;let an=ct._first;do Ie.includes((zt=(ft=an.element)==null?void 0:ft.command)==null?void 0:zt.id)&&ct._remove(an);while(an=an.next)};if(Jt(nt,ot),setTimeout(()=>{Qt(),Bt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{yn(Sn||"educoder.txt",nt.getValue())}})},500),Bt.current.subscription=nt.onDidChangeModelContent(ct=>{Ln.current?clearTimeout(Zn.current):(Qt(),tn(nt.getValue(),ct)),Zn.current=setTimeout(()=>{Ln.current=!1},500)}),window.Monaco||Te(ot,at(z)),kt&&(De(Vn,xe),jt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",xn),window.removeEventListener("paste",xn),window.addEventListener("keydown",xn),window.addEventListener("paste",xn)),window.Monaco=ot,$e&&nt.onDidBlurEditorWidget(()=>{$e(nt.getValue())}),dn&&nt.onDidFocusEditorText(()=>{kt&&en(),dn(nt.getValue())}),kt){en();try{nt.onDidPaste(ct=>{const Ie=nt.getSelection(),ft=Bt.current.pastePos||{},zt=new ot.Range(ft.startLineNumber||Ie.endLineNumber,ft.startColumn||Ie.endColumn,ft.endLineNumber||Ie.endLineNumber,ft.endColumn||Ie.endColumn);nt.executeEdits("",[{range:ct.range,text:""}])})}catch(ct){}}let Et=$n();return st&&typeof st=="string"&&new Re(st,nt,ot),In(!0),()=>{const ct=Bt.current.instance;ct.dispose();const Ie=ct.getModel();Ie&&Ie.dispose(),Bt.current.subscription&&Bt.current.subscription.dispose(),Et.unobserve(jt.current)}}catch(nt){}})},[]),(0,le.useEffect)(()=>{if(Bt.current.instance&&mn)return document.addEventListener("keydown",Ht,!1),()=>{document.removeEventListener("keydown",Ht)}},[Dt,mn]),(0,le.useEffect)(()=>{let At=Bt.current.instance;if(At&&mn){let nt=at(z);ot.editor.setModelLanguage(At.getModel(),nt)}},[z,mn]),(0,le.useEffect)(()=>{Bt.current.instance&&mn&&ot.editor.setTheme(be)},[be,mn]),(0,le.useEffect)(()=>{let At=Bt.current.instance;Gt.current=ue,At&&mn&&(At.updateOptions(Xt({},ue)),setTimeout(()=>{At.getModel().updateOptions(Xt({},ue))},200))},[JSON.stringify(ue),mn]),(0,le.useEffect)(()=>{let At=Bt.current.instance;At&&mn&&At.layout()},[St,ae,mn]);const[Pn,Hn]=(0,le.useState)(lt(St)),[Mn,Fn]=(0,le.useState)(lt(ae)),qn=Rt(Xt({},ie),{width:Pn,height:Mn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:jt,style:qn},It&&le.createElement(Ne.CopyToClipboard,{text:te,onCopy:()=>je.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(ze.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Zt({width:We="100%",height:Ct="100%",original:St,modified:ae,language:te,options:z={}}){const ie=(0,le.useRef)(),[ue,ne]=(0,le.useState)(null);function be(gt){let kt;return ie.current&&(kt=new it.Z(tn=>{for(let Jt of tn)(Jt.target.offsetHeight>0||Jt.target.offsetWidth>0)&&gt.layout()}),kt.observe(ie.current)),kt}(0,le.useEffect)(()=>(ie.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(gt=>{ot=gt;const kt=ot.editor.createDiffEditor(ie.current,Rt(Xt({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(kt);let tn=be(kt);return()=>{kt.dispose();const Jt=kt.getModel();Jt&&Jt.dispose(),tn.unobserve(ie.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{ue&&ue.setModel({original:ot.editor.createModel(St,te),modified:ot.editor.createModel(ae,te)})},[St,ae,te,ue]);const $e=lt(We),It=lt(Ct),Dt={width:$e,height:It};return le.createElement("div",{className:"my-diff-editor",ref:ie,style:Dt})}},17904:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return it}});var le=fe(59301);function it(Le,Ke){const me=(0,le.useRef)();(0,le.useEffect)(()=>{me.current=Le}),(0,le.useEffect)(()=>{function ge(){me.current()}if(Ke!==null){let He=setInterval(ge,Ke);return()=>clearInterval(He)}},[Ke])}},57383:function(Pt,Nt,fe){"use strict";fe.r(Nt),fe.d(Nt,{default:function(){return Xe}});var le=fe(59301),it=fe(2978),Le=fe(76560),Ke=fe(93041),me=fe(24404),ge=fe(28284),He=fe(6767),Ze=fe(91882),Ce=fe(77019),he=fe(5269),Ye=fe(82326),pe=fe(37568),rt=fe(37285),Te=fe(17149),Ae=fe(99571),Me=fe(82874),ke={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},et=Object.defineProperty,tt=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,_e=(we,Ge,mt)=>Ge in we?et(we,Ge,{enumerable:!0,configurable:!0,writable:!0,value:mt}):we[Ge]=mt,je=(we,Ge)=>{for(var mt in Ge||(Ge={}))Qe.call(Ge,mt)&&_e(we,mt,Ge[mt]);if(tt)for(var mt of tt(Ge))Re.call(Ge,mt)&&_e(we,mt,Ge[mt]);return we},ze=(we,Ge)=>{var mt={};for(var ut in we)Qe.call(we,ut)&&Ge.indexOf(ut)<0&&(mt[ut]=we[ut]);if(we!=null&&tt)for(var ut of tt(we))Ge.indexOf(ut)<0&&Re.call(we,ut)&&(mt[ut]=we[ut]);return mt},bt=(we,Ge,mt)=>new Promise((ut,Xt)=>{var Rt=lt=>{try{de(mt.next(lt))}catch(Wt){Xt(Wt)}},ve=lt=>{try{de(mt.throw(lt))}catch(Wt){Xt(Wt)}},de=lt=>lt.done?ut(lt.value):Promise.resolve(lt.value).then(Rt,ve);de((mt=mt.apply(we,Ge)).next())});const{SubMenu:Ve}=Ke.default,{Content:Ne,Sider:ht}=me.default,Be=we=>{var Ge=we,{graduation:mt,globalSetting:ut,loading:Xt,user:Rt,dispatch:ve}=Ge,de=ze(Ge,["graduation","globalSetting","loading","user","dispatch"]),lt,Wt,xt,Oe,at,ot,en;const dt=(0,Le.useParams)(),Zt=(0,Le.useLocation)(),{userInfo:We}=Rt,[Ct]=ge.default.useForm(),{addTopicData:St}=mt,ae=()=>bt(void 0,null,function*(){const te=Ct.getFieldsValue(),z=je({},te);z.city&&(z.province=z.city[0],z.city=z.city[1]);const ie=yield ve({type:"graduation/addTopic",payload:{coursesId:dt.coursesId,attachment_ids:[],graduation_topic:z}});ie.status?He.ZP.error(ie.message):Le.history.push(`/classrooms/${dt.coursesId}/graduation_topics/${dt.categoryId}`)});return(0,le.useEffect)(()=>{ve({type:"graduation/addTopicDefaultData",payload:je({},dt)})},[dt.coursesId]),le.createElement("section",{className:"edu-container"},le.createElement("section",{className:"animated fadeIn"},le.createElement("aside",{className:"mt10"},We&&le.createElement(Ze.Z,{separator:">"},le.createElement(Ze.Z.Item,null,le.createElement(Le.Link,{to:`${We.first_category_url}`},(lt=We==null?void 0:We.course)==null?void 0:lt.course_name)),le.createElement(Ze.Z.Item,null,le.createElement(Le.Link,{to:`/classrooms/${dt.coursesId}/graduation_topics/${dt.categoryId}`},"\u6BD5\u8BBE\u9009\u9898")),le.createElement(Ze.Z.Item,null,"\u65B0\u5EFA"))),le.createElement("aside",{className:[ke.title,"mt20"].join(" ")},le.createElement(Ce.Z,{style:{width:"100%"}},le.createElement(he.Z,{flex:"1"},le.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u6BD5\u8BBE\u9009\u9898")),le.createElement(he.Z,null,le.createElement(Le.Link,{className:"font16 c-light-black",to:`/classrooms/${dt.coursesId}/exercise`},"\u8FD4\u56DE"))))),le.createElement("section",{className:[ke.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},le.createElement(ge.default,{layout:"vertical",form:Ct,scrollToFirstError:!0,onFinish:te=>bt(void 0,null,function*(){ae()})},le.createElement(ge.default.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(Wt=St.teacher_list)==null?void 0:Wt.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)}))),le.createElement(ge.default.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},le.createElement(pe.default,{maxLength:60,size:"middle",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),le.createElement(rt.Z,null),le.createElement(ge.default.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},le.createElement(it.Z,{watch:!0,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),le.createElement(Ce.Z,{gutter:[20,0]},le.createElement(he.Z,{flex:"1"},le.createElement(ge.default.Item,{name:"topic_type"},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(xt=St.topic_type)==null?void 0:xt.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)})))),le.createElement(he.Z,{flex:"1"},le.createElement(ge.default.Item,{name:"topic_source"},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(Oe=St.topic_source)==null?void 0:Oe.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)})))),le.createElement(he.Z,{flex:"1"},le.createElement(ge.default.Item,{name:"topic_property_first"},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(at=St.topic_property_first)==null?void 0:at.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)})))),le.createElement(he.Z,{flex:"1"},le.createElement(ge.default.Item,{name:"topic_property_second"},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(ot=St.topic_property_second)==null?void 0:ot.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)})))),le.createElement(he.Z,{flex:"150px"})),le.createElement(rt.Z,null),le.createElement(ge.default.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},le.createElement(pe.default,{width:"200",size:"middle",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),le.createElement(ge.default.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},le.createElement(Ye.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(en=St.topic_repeat)==null?void 0:en.map(function(te,z){return le.createElement(Ye.default.Option,{value:te.id,key:z},te.name)}))),le.createElement(ge.default.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},le.createElement(Te.Z,{size:"middle",style:{width:200},options:Me.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),le.createElement("aside",{className:ke.btns},le.createElement(Ae.ZP,{type:"primary",onClick:()=>{Ct.submit()}},"\u4FDD\u5B58"),le.createElement(Le.Link,{to:`/classrooms/${dt.coursesId}/graduation_topics/${dt.categoryId}`},"\u53D6\u6D88")))};var Xe=(0,Le.connect)(({graduation:we,loading:Ge,user:mt,globalSetting:ut})=>({graduation:we,globalSetting:ut,user:mt,loading:Ge.effects}))(Be)},82874:function(Pt,Nt,fe){"use strict";fe.d(Nt,{P:function(){return le}});const le=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},90290:function(Pt,Nt,fe){"use strict";fe.d(Nt,{AL:function(){return Re},Iy:function(){return Ye},Qv:function(){return Te},ez:function(){return Qe},jb:function(){return pe}});var le=fe(32834),it=fe.n(le),Le=fe(11690),Ke=fe.n(Le);let me=1;function ge(Ve,Ne){const ht=Ve.match(/^(\s+)(?:```)/);if(ht===null)return Ne;const Be=ht[1];return Ne.split(`
`).map(Xe=>{const we=Xe.match(/^\s+/);if(we===null)return Xe;const[Ge]=we;return Ge.length>=Be.length?Xe.slice(Be.length):Xe}).join(`
`)}let He=[],Ze=["<ul>"];const Ce=new(it()).Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ye(){He.length=0,Ze=["<ul>"]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function rt(Ve,Ne,ht,Be){if(Ne>=Ve.length||Ve[Ne].level<=ht)return Ne;var Xe=Ve[Ne];Be.push("<li><a href='#"+me+Xe.anchor+"'>"+Xe.text+"</a>"),Ne++;var we=[];return Ne=rt(Ve,Ne,Xe.level,we),we.length>0&&(Be.push("<ul>"),we.forEach(function(Ge){Be.push(Ge)}),Be.push("</ul>")),Be.push("</li>"),Ne=rt(Ve,Ne,ht,Be),Ne}function Te(){return rt(He,0,0,Ze),Ze.push("</ul>"),Ze.join("")}const Ae={heading(Ve){const Ne=he.exec(Ve);if(me+=1,Ne)return{type:"heading",raw:Ne[0],depth:Ne[1].length,text:Ne[2]}},fences(Ve){const Ne=this.rules.block.fences.exec(Ve);if(Ne){const ht=Ne[0];let Be=ge(ht,Ne[3]||"");const Xe=Ne[2]?Ne[2].trim():Ne[2];if(["latex","katex","math"].indexOf(Xe)>=0){const we=et(),Ge=Be;Be=we,tt[we]={type:"block",expression:Ge}}return{type:"code",raw:ht,lang:Xe,text:Be}}}},Me=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ke=0;const et=()=>`__special_katext_id_${ke++}__`;let tt={};function Qe(){return tt}function Re(){ke=0,tt={}}function _e(Ve){return Ve=Ve.replace(Me,(Ne,ht)=>{const Be=et();return tt[Be]={type:"inline",expression:ht},Be}),Ve}const je=Ce.listitem;Ce.listitem=function(Ve){return je(_e(Ve))};const ze=Ce.paragraph;Ce.paragraph=function(Ve){return ze(_e(Ve))};const bt=Ce.tablecell;Ce.tablecell=function(Ve,Ne){return bt(_e(Ve),Ne)},Ce.code=function(Ve,Ne,ht){const Be=(Ne||"").match(/\S*/)[0];return Be?["latex","katex","math"].indexOf(Be)>=0?`<p class='editormd-tex'>${Ve}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ne}">${ht?Ve:(0,Le.escape)(Ve,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ht?Ve:(0,Le.escape)(Ve,!0))+"</code></pre>"},Ce.heading=function(Ve,Ne,ht){let Be=this.options.headerPrefix+ht.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return He.push({anchor:Be,level:Ne,text:Ve}),"<h"+Ne+' id="'+me+Be+'">'+Ve+"</h"+Ne+">"},it().setOptions({silent:!0,gfm:!0,pedantic:!1}),it().use({tokenizer:Ae,renderer:Ce}),Nt.ZP=it()},99498:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){le.defineOption("placeholder","",function(Ze,Ce,he){var Ye=he&&he!=le.Init;if(Ce&&!Ye)Ze.on("blur",me),Ze.on("change",ge),Ze.on("swapDoc",ge),le.on(Ze.getInputField(),"compositionupdate",Ze.state.placeholderCompose=function(){Ke(Ze)}),ge(Ze);else if(!Ce&&Ye){Ze.off("blur",me),Ze.off("change",ge),Ze.off("swapDoc",ge),le.off(Ze.getInputField(),"compositionupdate",Ze.state.placeholderCompose),it(Ze);var pe=Ze.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}Ce&&!Ze.hasFocus()&&me(Ze)});function it(Ze){Ze.state.placeholder&&(Ze.state.placeholder.parentNode.removeChild(Ze.state.placeholder),Ze.state.placeholder=null)}function Le(Ze){it(Ze);var Ce=Ze.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=Ze.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var he=Ze.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),Ce.appendChild(he),Ze.display.lineSpace.insertBefore(Ce,Ze.display.lineSpace.firstChild)}function Ke(Ze){setTimeout(function(){var Ce=!1,he=Ze.getInputField();he.nodeName=="TEXTAREA"?Ce=!he.value:Ze.lineCount()==1&&(Ce=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),Ce?Le(Ze):it(Ze)},20)}function me(Ze){He(Ze)&&Le(Ze)}function ge(Ze){var Ce=Ze.getWrapperElement(),he=He(Ze);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?Le(Ze):it(Ze)}function He(Ze){return Ze.lineCount()===1&&Ze.getLine(0)===""}})},25717:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){var it={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Le=le.Pos;le.defineOption("autoCloseBrackets",!1,function(Ae,Me,ke){ke&&ke!=le.Init&&(Ae.removeKeyMap(me),Ae.state.closeBrackets=null),Me&&(ge(Ke(Me,"pairs")),Ae.state.closeBrackets=Me,Ae.addKeyMap(me))});function Ke(Ae,Me){return Me=="pairs"&&typeof Ae=="string"?Ae:typeof Ae=="object"&&Ae[Me]!=null?Ae[Me]:it[Me]}var me={Backspace:Ce,Enter:he};function ge(Ae){for(var Me=0;Me<Ae.length;Me++){var ke=Ae.charAt(Me),et="'"+ke+"'";me[et]||(me[et]=He(ke))}}ge(it.pairs+"`");function He(Ae){return function(Me){return pe(Me,Ae)}}function Ze(Ae){var Me=Ae.state.closeBrackets;if(!Me||Me.override)return Me;var ke=Ae.getModeAt(Ae.getCursor());return ke.closeBrackets||Me}function Ce(Ae){var Me=Ze(Ae);if(!Me||Ae.getOption("disableInput"))return le.Pass;for(var ke=Ke(Me,"pairs"),et=Ae.listSelections(),tt=0;tt<et.length;tt++){if(!et[tt].empty())return le.Pass;var Qe=rt(Ae,et[tt].head);if(!Qe||ke.indexOf(Qe)%2!=0)return le.Pass}for(var tt=et.length-1;tt>=0;tt--){var Re=et[tt].head;Ae.replaceRange("",Le(Re.line,Re.ch-1),Le(Re.line,Re.ch+1),"+delete")}}function he(Ae){var Me=Ze(Ae),ke=Me&&Ke(Me,"explode");if(!ke||Ae.getOption("disableInput"))return le.Pass;for(var et=Ae.listSelections(),tt=0;tt<et.length;tt++){if(!et[tt].empty())return le.Pass;var Qe=rt(Ae,et[tt].head);if(!Qe||ke.indexOf(Qe)%2!=0)return le.Pass}Ae.operation(function(){var Re=Ae.lineSeparator()||`
`;Ae.replaceSelection(Re+Re,null),Ae.execCommand("goCharLeft"),et=Ae.listSelections();for(var _e=0;_e<et.length;_e++){var je=et[_e].head.line;Ae.indentLine(je,null,!0),Ae.indentLine(je+1,null,!0)}})}function Ye(Ae){var Me=le.cmpPos(Ae.anchor,Ae.head)>0;return{anchor:new Le(Ae.anchor.line,Ae.anchor.ch+(Me?-1:1)),head:new Le(Ae.head.line,Ae.head.ch+(Me?1:-1))}}function pe(Ae,Me){var ke=Ze(Ae);if(!ke||Ae.getOption("disableInput"))return le.Pass;var et=Ke(ke,"pairs"),tt=et.indexOf(Me);if(tt==-1)return le.Pass;for(var Qe=Ke(ke,"closeBefore"),Re=Ke(ke,"triples"),_e=et.charAt(tt+1)==Me,je=Ae.listSelections(),ze=tt%2==0,bt,Ve=0;Ve<je.length;Ve++){var Ne=je[Ve],ht=Ne.head,Be,Xe=Ae.getRange(ht,Le(ht.line,ht.ch+1));if(ze&&!Ne.empty())Be="surround";else if((_e||!ze)&&Xe==Me)_e&&Te(Ae,ht)?Be="both":Re.indexOf(Me)>=0&&Ae.getRange(ht,Le(ht.line,ht.ch+3))==Me+Me+Me?Be="skipThree":Be="skip";else if(_e&&ht.ch>1&&Re.indexOf(Me)>=0&&Ae.getRange(Le(ht.line,ht.ch-2),ht)==Me+Me){if(ht.ch>2&&/\bstring/.test(Ae.getTokenTypeAt(Le(ht.line,ht.ch-2))))return le.Pass;Be="addFour"}else if(_e){var we=ht.ch==0?" ":Ae.getRange(Le(ht.line,ht.ch-1),ht);if(!le.isWordChar(Xe)&&we!=Me&&!le.isWordChar(we))Be="both";else return le.Pass}else if(ze&&(Xe.length===0||/\s/.test(Xe)||Qe.indexOf(Xe)>-1))Be="both";else return le.Pass;if(!bt)bt=Be;else if(bt!=Be)return le.Pass}var Ge=tt%2?et.charAt(tt-1):Me,mt=tt%2?Me:et.charAt(tt+1);Ae.operation(function(){if(bt=="skip")Ae.execCommand("goCharRight");else if(bt=="skipThree")for(var ut=0;ut<3;ut++)Ae.execCommand("goCharRight");else if(bt=="surround"){for(var Xt=Ae.getSelections(),ut=0;ut<Xt.length;ut++)Xt[ut]=Ge+Xt[ut]+mt;Ae.replaceSelections(Xt,"around"),Xt=Ae.listSelections().slice();for(var ut=0;ut<Xt.length;ut++)Xt[ut]=Ye(Xt[ut]);Ae.setSelections(Xt)}else bt=="both"?(Ae.replaceSelection(Ge+mt,null),Ae.triggerElectric(Ge+mt),Ae.execCommand("goCharLeft")):bt=="addFour"&&(Ae.replaceSelection(Ge+Ge+Ge+Ge,"before"),Ae.execCommand("goCharRight"))})}function rt(Ae,Me){var ke=Ae.getRange(Le(Me.line,Me.ch-1),Le(Me.line,Me.ch+1));return ke.length==2?ke:null}function Te(Ae,Me){var ke=Ae.getTokenAt(Le(Me.line,Me.ch+1));return/\bstring/.test(ke.type)&&ke.start==Me.ch&&(Me.ch==0||!/\bstring/.test(Ae.getTokenTypeAt(Me)))}})},6313:function(Pt,Nt,fe){(function(le){le(fe(89780),fe(52730))})(function(le){le.defineOption("autoCloseTags",!1,function(Ce,he,Ye){if(Ye!=le.Init&&Ye&&Ce.removeKeyMap("autoCloseTags"),!!he){var pe={name:"autoCloseTags"};(typeof he!="object"||he.whenClosing!==!1)&&(pe["'/'"]=function(rt){return ge(rt)}),(typeof he!="object"||he.whenOpening!==!1)&&(pe["'>'"]=function(rt){return Ke(rt)}),Ce.addKeyMap(pe)}});var it=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Le=["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 Ke(Ce){if(Ce.getOption("disableInput"))return le.Pass;for(var he=Ce.listSelections(),Ye=[],pe=Ce.getOption("autoCloseTags"),rt=0;rt<he.length;rt++){if(!he[rt].empty())return le.Pass;var Te=he[rt].head,Ae=Ce.getTokenAt(Te),Me=le.innerMode(Ce.getMode(),Ae.state),ke=Me.state,et=Me.mode.xmlCurrentTag&&Me.mode.xmlCurrentTag(ke),tt=et&&et.name;if(!tt)return le.Pass;var Qe=Me.mode.configuration=="html",Re=typeof pe=="object"&&pe.dontCloseTags||Qe&&it,_e=typeof pe=="object"&&pe.indentTags||Qe&&Le;Ae.end>Te.ch&&(tt=tt.slice(0,tt.length-Ae.end+Te.ch));var je=tt.toLowerCase();if(!tt||Ae.type=="string"&&(Ae.end!=Te.ch||!/[\"\']/.test(Ae.string.charAt(Ae.string.length-1))||Ae.string.length==1)||Ae.type=="tag"&&et.close||Ae.string.indexOf("/")==Te.ch-Ae.start-1||Re&&He(Re,je)>-1||Ze(Ce,Me.mode.xmlCurrentContext&&Me.mode.xmlCurrentContext(ke)||[],tt,Te,!0))return le.Pass;var ze=typeof pe=="object"&&pe.emptyTags;if(ze&&He(ze,tt)>-1){Ye[rt]={text:"/>",newPos:le.Pos(Te.line,Te.ch+2)};continue}var bt=_e&&He(_e,je)>-1;Ye[rt]={indent:bt,text:">"+(bt?`
`:"")+"</"+tt+">",newPos:bt?le.Pos(Te.line+1,0):le.Pos(Te.line,Te.ch+1)}}for(var Ve=typeof pe=="object"&&pe.dontIndentOnAutoClose,rt=he.length-1;rt>=0;rt--){var Ne=Ye[rt];Ce.replaceRange(Ne.text,he[rt].head,he[rt].anchor,"+insert");var ht=Ce.listSelections().slice(0);ht[rt]={head:Ne.newPos,anchor:Ne.newPos},Ce.setSelections(ht),!Ve&&Ne.indent&&(Ce.indentLine(Ne.newPos.line,null,!0),Ce.indentLine(Ne.newPos.line+1,null,!0))}}function me(Ce,he){for(var Ye=Ce.listSelections(),pe=[],rt=he?"/":"</",Te=Ce.getOption("autoCloseTags"),Ae=typeof Te=="object"&&Te.dontIndentOnSlash,Me=0;Me<Ye.length;Me++){if(!Ye[Me].empty())return le.Pass;var ke=Ye[Me].head,et=Ce.getTokenAt(ke),tt=le.innerMode(Ce.getMode(),et.state),Qe=tt.state;if(he&&(et.type=="string"||et.string.charAt(0)!="<"||et.start!=ke.ch-1))return le.Pass;var Re,_e=tt.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(_e&&tt.mode.name=="javascript")Re=rt+"script";else if(_e&&tt.mode.name=="css")Re=rt+"style";else{var je=tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(Qe);if(!je||je.length&&Ze(Ce,je,je[je.length-1],ke))return le.Pass;Re=rt+je[je.length-1]}Ce.getLine(ke.line).charAt(et.end)!=">"&&(Re+=">"),pe[Me]=Re}if(Ce.replaceSelections(pe),Ye=Ce.listSelections(),!Ae)for(var Me=0;Me<Ye.length;Me++)(Me==Ye.length-1||Ye[Me].head.line<Ye[Me+1].head.line)&&Ce.indentLine(Ye[Me].head.line)}function ge(Ce){return Ce.getOption("disableInput")?le.Pass:me(Ce,!0)}le.commands.closeTag=function(Ce){return me(Ce)};function He(Ce,he){if(Ce.indexOf)return Ce.indexOf(he);for(var Ye=0,pe=Ce.length;Ye<pe;++Ye)if(Ce[Ye]==he)return Ye;return-1}function Ze(Ce,he,Ye,pe,rt){if(!le.scanForClosingTag)return!1;var Te=Math.min(Ce.lastLine()+1,pe.line+500),Ae=le.scanForClosingTag(Ce,pe,null,Te);if(!Ae||Ae.tag!=Ye)return!1;for(var Me=rt?1:0,ke=he.length-1;ke>=0&&he[ke]==Ye;ke--)++Me;pe=Ae.to;for(var ke=1;ke<Me;ke++){var et=le.scanForClosingTag(Ce,pe,null,Te);if(!et||et.tag!=Ye)return!1;pe=et.to}return!0}})},52730:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){"use strict";var it=le.Pos;function Le(ke,et){return ke.line-et.line||ke.ch-et.ch}var Ke="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",me=Ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ge=new RegExp("<(/?)(["+Ke+"]["+me+"]*)","g");function He(ke,et,tt,Qe){this.line=et,this.ch=tt,this.cm=ke,this.text=ke.getLine(et),this.min=Qe?Math.max(Qe.from,ke.firstLine()):ke.firstLine(),this.max=Qe?Math.min(Qe.to-1,ke.lastLine()):ke.lastLine()}function Ze(ke,et){var tt=ke.cm.getTokenTypeAt(it(ke.line,et));return tt&&/\btag\b/.test(tt)}function Ce(ke){if(!(ke.line>=ke.max))return ke.ch=0,ke.text=ke.cm.getLine(++ke.line),!0}function he(ke){if(!(ke.line<=ke.min))return ke.text=ke.cm.getLine(--ke.line),ke.ch=ke.text.length,!0}function Ye(ke){for(;;){var et=ke.text.indexOf(">",ke.ch);if(et==-1){if(Ce(ke))continue;return}if(!Ze(ke,et+1)){ke.ch=et+1;continue}var tt=ke.text.lastIndexOf("/",et),Qe=tt>-1&&!/\S/.test(ke.text.slice(tt+1,et));return ke.ch=et+1,Qe?"selfClose":"regular"}}function pe(ke){for(;;){var et=ke.ch?ke.text.lastIndexOf("<",ke.ch-1):-1;if(et==-1){if(he(ke))continue;return}if(!Ze(ke,et+1)){ke.ch=et;continue}ge.lastIndex=et,ke.ch=et;var tt=ge.exec(ke.text);if(tt&&tt.index==et)return tt}}function rt(ke){for(;;){ge.lastIndex=ke.ch;var et=ge.exec(ke.text);if(!et){if(Ce(ke))continue;return}if(!Ze(ke,et.index+1)){ke.ch=et.index+1;continue}return ke.ch=et.index+et[0].length,et}}function Te(ke){for(;;){var et=ke.ch?ke.text.lastIndexOf(">",ke.ch-1):-1;if(et==-1){if(he(ke))continue;return}if(!Ze(ke,et+1)){ke.ch=et;continue}var tt=ke.text.lastIndexOf("/",et),Qe=tt>-1&&!/\S/.test(ke.text.slice(tt+1,et));return ke.ch=et+1,Qe?"selfClose":"regular"}}function Ae(ke,et){for(var tt=[];;){var Qe=rt(ke),Re,_e=ke.line,je=ke.ch-(Qe?Qe[0].length:0);if(!Qe||!(Re=Ye(ke)))return;if(Re!="selfClose")if(Qe[1]){for(var ze=tt.length-1;ze>=0;--ze)if(tt[ze]==Qe[2]){tt.length=ze;break}if(ze<0&&(!et||et==Qe[2]))return{tag:Qe[2],from:it(_e,je),to:it(ke.line,ke.ch)}}else tt.push(Qe[2])}}function Me(ke,et){for(var tt=[];;){var Qe=Te(ke);if(!Qe)return;if(Qe=="selfClose"){pe(ke);continue}var Re=ke.line,_e=ke.ch,je=pe(ke);if(!je)return;if(je[1])tt.push(je[2]);else{for(var ze=tt.length-1;ze>=0;--ze)if(tt[ze]==je[2]){tt.length=ze;break}if(ze<0&&(!et||et==je[2]))return{tag:je[2],from:it(ke.line,ke.ch),to:it(Re,_e)}}}}le.registerHelper("fold","xml",function(ke,et){for(var tt=new He(ke,et.line,0);;){var Qe=rt(tt);if(!Qe||tt.line!=et.line)return;var Re=Ye(tt);if(!Re)return;if(!Qe[1]&&Re!="selfClose"){var _e=it(tt.line,tt.ch),je=Ae(tt,Qe[2]);return je&&Le(je.from,_e)>0?{from:_e,to:je.from}:null}}}),le.findMatchingTag=function(ke,et,tt){var Qe=new He(ke,et.line,et.ch,tt);if(!(Qe.text.indexOf(">")==-1&&Qe.text.indexOf("<")==-1)){var Re=Ye(Qe),_e=Re&&it(Qe.line,Qe.ch),je=Re&&pe(Qe);if(!(!Re||!je||Le(Qe,et)>0)){var ze={from:it(Qe.line,Qe.ch),to:_e,tag:je[2]};return Re=="selfClose"?{open:ze,close:null,at:"open"}:je[1]?{open:Me(Qe,je[2]),close:ze,at:"close"}:(Qe=new He(ke,_e.line,_e.ch,tt),{open:ze,close:Ae(Qe,je[2]),at:"open"})}}},le.findEnclosingTag=function(ke,et,tt,Qe){for(var Re=new He(ke,et.line,et.ch,tt);;){var _e=Me(Re,Qe);if(!_e)break;var je=new He(ke,et.line,et.ch,tt),ze=Ae(je,_e.tag);if(ze)return{open:_e,close:ze}}},le.scanForClosingTag=function(ke,et,tt,Qe){var Re=new He(ke,et.line,et.ch,Qe?{from:0,to:Qe}:null);return Ae(Re,tt)}})},89780:function(Pt){(function(Nt,fe){Pt.exports=fe()})(this,function(){"use strict";var Nt=navigator.userAgent,fe=navigator.platform,le=/gecko\/\d/i.test(Nt),it=/MSIE \d/.test(Nt),Le=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Nt),Ke=/Edge\/(\d+)/.exec(Nt),me=it||Le||Ke,ge=me&&(it?document.documentMode||6:+(Ke||Le)[1]),He=!Ke&&/WebKit\//.test(Nt),Ze=He&&/Qt\/\d+\.\d+/.test(Nt),Ce=!Ke&&/Chrome\//.test(Nt),he=/Opera\//.test(Nt),Ye=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Nt),rt=/PhantomJS/.test(Nt),Te=!Ke&&/AppleWebKit/.test(Nt)&&/Mobile\/\w+/.test(Nt),Ae=/Android/.test(Nt),Me=Te||Ae||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Nt),ke=Te||/Mac/.test(fe),et=/\bCrOS\b/.test(Nt),tt=/win/i.test(fe),Qe=he&&Nt.match(/Version\/(\d*\.\d*)/);Qe&&(Qe=Number(Qe[1])),Qe&&Qe>=15&&(he=!1,He=!0);var Re=ke&&(Ze||he&&(Qe==null||Qe<12.11)),_e=le||me&&ge>=9;function je(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ze=function(a,y){var x=a.className,b=je(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function bt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ve(a,y){return bt(a).appendChild(y)}function Ne(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),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 ht(a,y,x,b){var E=Ne(a,y,x,b);return E.setAttribute("role","presentation"),E}var Be;document.createRange?Be=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Be=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function Xe(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 we(){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 Ge(a,y){var x=a.className;je(y).test(x)||(a.className+=(x?" ":"")+y)}function mt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!je(x[b]).test(y)&&(y+=" "+x[b]);return y}var ut=function(a){a.select()};Te?ut=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(ut=function(a){try{a.select()}catch(y){}});function Xt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Rt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function ve(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=b||0,re=E||0;;){var oe=a.indexOf(" ",ee);if(oe<0||oe>=y)return re+(y-ee);re+=oe-ee,re+=x-re%x,ee=oe+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=Xt(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function lt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Wt=50,xt={toString:function(){return"CodeMirror.Pass"}},Oe={scroll:!1},at={origin:"*mouse"},ot={origin:"+move"};function en(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var re=ee-b;if(ee==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var dt=[""];function Zt(a){for(;dt.length<=a;)dt.push(We(dt)+" ");return dt[a]}function We(a){return a[a.length-1]}function Ct(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function St(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function ae(){}function te(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&Rt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function ue(a,y){return y?y.source.indexOf("\\w")>-1&&ie(a)?!0:y.test(a):ie(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var be=/[\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 $e(a){return a.charCodeAt(0)>=768&&be.test(a)}function It(a,y,x){for(;(x<0?y>0:y<a.length)&&$e(a.charAt(y));)y+=x;return y}function Dt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function gt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var re=a[ee];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var kt=null;function tn(a,y,x){var b;kt=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&&x=="before"?b=E:kt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:kt=E)}return b!=null?b:kt}var Jt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function se(ce,ye,Se){this.level=ce,this.from=ye,this.to=Se}return function(ce,ye){var Se=ye=="ltr"?"L":"R";if(ce.length==0||ye=="ltr"&&!b.test(ce))return!1;for(var Je=ce.length,Ue=[],yt=0;yt<Je;++yt)Ue.push(x(ce.charCodeAt(yt)));for(var Tt=0,qt=Se;Tt<Je;++Tt){var hn=Ue[Tt];hn=="m"?Ue[Tt]=qt:qt=hn}for(var Cn=0,fn=Se;Cn<Je;++Cn){var En=Ue[Cn];En=="1"&&fn=="r"?Ue[Cn]="n":ee.test(En)&&(fn=En,En=="r"&&(Ue[Cn]="R"))}for(var Un=1,On=Ue[0];Un<Je-1;++Un){var lr=Ue[Un];lr=="+"&&On=="1"&&Ue[Un+1]=="1"?Ue[Un]="1":lr==","&&On==Ue[Un+1]&&(On=="1"||On=="n")&&(Ue[Un]=On),On=lr}for(var Hr=0;Hr<Je;++Hr){var oi=Ue[Hr];if(oi==",")Ue[Hr]="N";else if(oi=="%"){var Vr=void 0;for(Vr=Hr+1;Vr<Je&&Ue[Vr]=="%";++Vr);for(var Ti=Hr&&Ue[Hr-1]=="!"||Vr<Je&&Ue[Vr]=="1"?"1":"N",ki=Hr;ki<Vr;++ki)Ue[ki]=Ti;Hr=Vr-1}}for(var ei=0,Di=Se;ei<Je;++ei){var ci=Ue[ei];Di=="L"&&ci=="1"?Ue[ei]="L":ee.test(ci)&&(Di=ci)}for(var ri=0;ri<Je;++ri)if(E.test(Ue[ri])){var ti=void 0;for(ti=ri+1;ti<Je&&E.test(Ue[ti]);++ti);for(var jr=(ri?Ue[ri-1]:Se)=="L",Bi=(ti<Je?Ue[ti]:Se)=="L",Va=jr==Bi?jr?"L":"R":Se,ya=ri;ya<ti;++ya)Ue[ya]=Va;ri=ti-1}for(var vi=[],$i,li=0;li<Je;)if(re.test(Ue[li])){var bl=li;for(++li;li<Je&&re.test(Ue[li]);++li);vi.push(new se(0,bl,li))}else{var aa=li,Ba=vi.length,Aa=ye=="rtl"?1:0;for(++li;li<Je&&Ue[li]!="L";++li);for(var bi=aa;bi<li;)if(oe.test(Ue[bi])){aa<bi&&(vi.splice(Ba,0,new se(1,aa,bi)),Ba+=Aa);var ja=bi;for(++bi;bi<li&&oe.test(Ue[bi]);++bi);vi.splice(Ba,0,new se(2,ja,bi)),Ba+=Aa,aa=bi}else++bi;aa<li&&vi.splice(Ba,0,new se(1,aa,li))}return ye=="ltr"&&(vi[0].level==1&&($i=ce.match(/^\s+/))&&(vi[0].from=$i[0].length,vi.unshift(new se(0,0,$i[0].length))),We(vi).level==1&&($i=ce.match(/\s+$/))&&(We(vi).to-=$i[0].length,vi.push(new se(0,Je-$i[0].length,Je)))),ye=="rtl"?vi.reverse():vi}}();function dn(a,y){var x=a.order;return x==null&&(x=a.order=Jt(a.text,y)),x}var sn=[],_t=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||sn).concat(x)}};function Sn(a,y){return a._handlers&&a._handlers[y]||sn}function Pe(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var ee=lt(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function qe(a,y){var x=Sn(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function Ee(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),qe(a,x||y.type,a,y),Bt(y)||y.codemirrorIgnore}function vt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)lt(x,y[b])==-1&&x.push(y[b])}function st(a,y){return Sn(a,y).length>0}function pt(a){a.prototype.on=function(y,x){_t(this,y,x)},a.prototype.off=function(y,x){Pe(this,y,x)}}function wt(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function jt(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Bt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Gt(a){wt(a),jt(a)}function Dn(a){return a.target||a.srcElement}function bn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),ke&&a.ctrlKey&&y==1&&(y=3),y}var Ln=function(){if(me&&ge<9)return!1;var a=Ne("div");return"draggable"in a||"dragDrop"in a}(),Zn;function An(a){if(Zn==null){var y=Ne("span","\u200B");Ve(a,Ne("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Zn=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&ge<8))}var x=Zn?Ne("span","\u200B"):Ne("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var kn;function mn(a){if(kn!=null)return kn;var y=Ve(a,document.createTextNode("A\u062EA")),x=Be(y,0,1).getBoundingClientRect(),b=Be(y,1,2).getBoundingClientRect();return bt(a),!x||x.left==x.right?!1:kn=b.right-x.right<3}var In=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=ee.indexOf("\r");re!=-1?(x.push(ee.slice(0,re)),y+=re+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},$n=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(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},gn=function(){var a=Ne("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Nn=null;function _n(a){if(Nn!=null)return Nn;var y=Ve(a,Ne("span","x")),x=y.getBoundingClientRect(),b=Be(y,0,1).getBoundingClientRect();return Nn=Math.abs(x.left-b.left)>1}var Rn={},Ht={};function Qt(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Rn[a]=y}function un(a,y){Ht[a]=y}function xn(a){if(typeof a=="string"&&Ht.hasOwnProperty(a))a=Ht[a];else if(a&&typeof a.name=="string"&&Ht.hasOwnProperty(a.name)){var y=Ht[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 xn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return xn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function yn(a,y){y=xn(y);var x=Rn[y.name];if(!x)return yn(a,"text/plain");var b=x(a,y);if(Pn.hasOwnProperty(y.name)){var E=Pn[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var Pn={};function Hn(a,y){var x=Pn.hasOwnProperty(a)?Pn[a]:Pn[a]={};Rt(y,x)}function Mn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Fn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function qn(a,y,x){return a.startState?a.startState(y,x):!0}var At=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};At.prototype.eol=function(){return this.pos>=this.string.length},At.prototype.sol=function(){return this.pos==this.lineStart},At.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},At.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},At.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},At.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},At.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},At.prototype.skipToEnd=function(){this.pos=this.string.length},At.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},At.prototype.backUp=function(a){this.pos-=a},At.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},At.prototype.indentation=function(){return ve(this.string,null,this.tabSize)-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},At.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(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)}},At.prototype.current=function(){return this.string.slice(this.start,this.pos)},At.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},At.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},At.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function nt(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 x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function Vt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var re=ee.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function vn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Vn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function xe(a){if(a.parent==null)return null;for(var y=a.parent,x=lt(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function De(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var oe=a.lines[re],se=oe.height;if(y<se)break;y-=se}return x+re}function Et(a,y){return y>=a.first&&y<a.first+a.size}function ct(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Ie(a,y,x){if(x===void 0&&(x=null),!(this instanceof Ie))return new Ie(a,y,x);this.line=a,this.ch=y,this.sticky=x}function ft(a,y){return a.line-y.line||a.ch-y.ch}function zt(a,y){return a.sticky==y.sticky&&ft(a,y)==0}function an(a){return Ie(a.line,a.ch)}function pn(a,y){return ft(a,y)<0?y:a}function Lt(a,y){return ft(a,y)<0?a:y}function Ut(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Fe(a,y){if(y.line<a.first)return Ie(a.first,0);var x=a.first+a.size-1;return y.line>x?Ie(x,nt(a,x).text.length):nn(y,nt(a,y.line).text.length)}function nn(a,y){var x=a.ch;return x==null||x>y?Ie(a.line,y):x<0?Ie(a.line,0):a}function Ft(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Fe(a,y[b]);return x}var rn=function(a,y){this.state=a,this.lookAhead=y},ln=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};ln.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},ln.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}},ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ln.fromSaved=function(a,y,x){return y instanceof rn?new ln(a,Mn(a.mode,y.state),x,y.lookAhead):new ln(a,Mn(a.mode,y),x)},ln.prototype.save=function(a){var y=a!==!1?Mn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new rn(y,this.maxLookAhead):y};function Bn(a,y,x,b){var E=[a.state.modeGen],ee={};yr(a,y.text,a.doc.mode,x,function(ce,ye){return E.push(ce,ye)},ee,b);for(var re=x.state,oe=function(ce){x.baseTokens=E;var ye=a.state.overlays[ce],Se=1,Je=0;x.state=!0,yr(a,y.text,ye.mode,x,function(Ue,yt){for(var Tt=Se;Je<Ue;){var qt=E[Se];qt>Ue&&E.splice(Se,1,Ue,E[Se+1],qt),Se+=2,Je=Math.min(Ue,qt)}if(yt)if(ye.opaque)E.splice(Tt,Se-Tt,Ue,"overlay "+yt),Se=Tt+2;else for(;Tt<Se;Tt+=2){var hn=E[Tt+1];E[Tt+1]=(hn?hn+" ":"")+"overlay "+yt}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},se=0;se<a.state.overlays.length;++se)oe(se);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function Tn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=ar(a,xe(y)),E=y.text.length>a.options.maxHighlightLength&&Mn(a.doc.mode,b.state),ee=Bn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function ar(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new ln(b,!0,y);var ee=Cr(a,y,x),re=ee>b.first&&nt(b,ee-1).stateAfter,oe=re?ln.fromSaved(b,re,ee):new ln(b,qn(b.mode),ee);return b.iter(ee,y,function(se){Gn(a,se.text,oe);var ce=oe.line;se.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?oe.save():null,oe.nextLine()}),x&&(b.modeFrontier=oe.line),oe}function Gn(a,y,x,b){var E=a.doc.mode,ee=new At(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&jn(E,x.state);!ee.eol();)or(E,ee,x.state),ee.start=ee.pos}function jn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Fn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function or(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Fn(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Kn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function gr(a,y,x,b){var E=a.doc,ee=E.mode,re;y=Fe(E,y);var oe=nt(E,y.line),se=ar(a,y.line,x),ce=new At(oe.text,a.options.tabSize,se),ye;for(b&&(ye=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=or(ee,ce,se.state),b&&ye.push(new Kn(ce,re,Mn(E.mode,se.state)));return b?ye:new Kn(ce,re,se.state)}function Mr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function yr(a,y,x,b,E,ee,re){var oe=x.flattenSpans;oe==null&&(oe=a.options.flattenSpans);var se=0,ce=null,ye=new At(y,a.options.tabSize,b),Se,Je=a.options.addModeClass&&[null];for(y==""&&Mr(jn(x,b.state),ee);!ye.eol();){if(ye.pos>a.options.maxHighlightLength?(oe=!1,re&&Gn(a,y,b,ye.pos),ye.pos=y.length,Se=null):Se=Mr(or(x,ye,b.state,Je),ee),Je){var Ue=Je[0].name;Ue&&(Se="m-"+(Se?Ue+" "+Se:Ue))}if(!oe||ce!=Se){for(;se<ye.start;)se=Math.min(ye.start,se+5e3),E(se,ce);ce=Se}ye.start=ye.pos}for(;se<ye.pos;){var yt=Math.min(ye.pos,se+5e3);E(yt,ce),se=yt}}function Cr(a,y,x){for(var b,E,ee=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),oe=y;oe>re;--oe){if(oe<=ee.first)return ee.first;var se=nt(ee,oe-1),ce=se.stateAfter;if(ce&&(!x||oe+(ce instanceof rn?ce.lookAhead:0)<=ee.modeFrontier))return oe;var ye=ve(se.text,null,a.options.tabSize);(E==null||b>ye)&&(E=oe-1,b=ye)}return E}function kr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=nt(a,b).stateAfter;if(E&&(!(E instanceof rn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var hr=!1,sr=!1;function Dr(){hr=!0}function dr(){sr=!0}function br(a,y,x){this.marker=a,this.from=y,this.to=x}function xr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Br(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function fr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function ur(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,oe=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);if(oe||ee.from==y&&re.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var se=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new br(re,ee.from,se?null:ee.to))}}return b}function nr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,oe=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);if(oe||ee.from==y&&re.type=="bookmark"&&(!x||ee.marker.insertLeft)){var se=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new br(re,se?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Tr(a,y){if(y.full)return null;var x=Et(a,y.from.line)&&nt(a,y.from.line).markedSpans,b=Et(a,y.to.line)&&nt(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=ft(y.from,y.to)==0,oe=ur(x,E,re),se=nr(b,ee,re),ce=y.text.length==1,ye=We(y.text).length+(ce?E:0);if(oe)for(var Se=0;Se<oe.length;++Se){var Je=oe[Se];if(Je.to==null){var Ue=xr(se,Je.marker);Ue?ce&&(Je.to=Ue.to==null?null:Ue.to+ye):Je.to=E}}if(se)for(var yt=0;yt<se.length;++yt){var Tt=se[yt];if(Tt.to!=null&&(Tt.to+=ye),Tt.from==null){var qt=xr(oe,Tt.marker);qt||(Tt.from=ye,ce&&(oe||(oe=[])).push(Tt))}else Tt.from+=ye,ce&&(oe||(oe=[])).push(Tt)}oe&&(oe=Zr(oe)),se&&se!=oe&&(se=Zr(se));var hn=[oe];if(!ce){var Cn=y.text.length-2,fn;if(Cn>0&&oe)for(var En=0;En<oe.length;++En)oe[En].to==null&&(fn||(fn=[])).push(new br(oe[En].marker,null,null));for(var Un=0;Un<Cn;++Un)hn.push(fn);hn.push(se)}return hn}function Zr(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Gr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Ue){if(Ue.markedSpans)for(var yt=0;yt<Ue.markedSpans.length;++yt){var Tt=Ue.markedSpans[yt].marker;Tt.readOnly&&(!b||lt(b,Tt)==-1)&&(b||(b=[])).push(Tt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var re=b[ee],oe=re.find(0),se=0;se<E.length;++se){var ce=E[se];if(!(ft(ce.to,oe.from)<0||ft(ce.from,oe.to)>0)){var ye=[se,1],Se=ft(ce.from,oe.from),Je=ft(ce.to,oe.to);(Se<0||!re.inclusiveLeft&&!Se)&&ye.push({from:ce.from,to:oe.from}),(Je>0||!re.inclusiveRight&&!Je)&&ye.push({from:oe.to,to:ce.to}),E.splice.apply(E,ye),se+=ye.length-3}}return E}function cr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Jr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function pr(a){return a.inclusiveLeft?-1:0}function Pr(a){return a.inclusiveRight?1:0}function Sr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=ft(b.from,E.from)||pr(a)-pr(y);if(ee)return-ee;var re=ft(b.to,E.to)||Pr(a)-Pr(y);return re||y.id-a.id}function wr(a,y){var x=sr&&a.markedSpans,b;if(x)for(var E=void 0,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||Sr(b,E.marker)<0)&&(b=E.marker);return b}function Yn(a){return wr(a,!0)}function Mt(a){return wr(a,!1)}function Kt(a,y){var x=sr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||Sr(b,ee.marker)<0)&&(b=ee.marker)}return b}function wn(a,y,x,b,E){var ee=nt(a,y),re=sr&&ee.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var se=re[oe];if(se.marker.collapsed){var ce=se.marker.find(0),ye=ft(ce.from,x)||pr(se.marker)-pr(E),Se=ft(ce.to,b)||Pr(se.marker)-Pr(E);if(!(ye>=0&&Se<=0||ye<=0&&Se>=0)&&(ye<=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ft(ce.to,x)>=0:ft(ce.to,x)>0)||ye>=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ft(ce.from,b)<=0:ft(ce.from,b)<0)))return!0}}}function cn(a){for(var y;y=Yn(a);)a=y.find(-1,!0).line;return a}function Wn(a){for(var y;y=Mt(a);)a=y.find(1,!0).line;return a}function Yt(a){for(var y,x;y=Mt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Ot(a,y){var x=nt(a,y),b=cn(x);return x==b?y:xe(b)}function $t(a,y){if(y>a.lastLine())return y;var x=nt(a,y),b;if(!on(a,x))return y;for(;b=Mt(x);)x=b.find(1,!0).line;return xe(x)+1}function on(a,y){var x=sr&&y.markedSpans;if(x){for(var b=void 0,E=0;E<x.length;++E)if(b=x[E],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&Jn(a,y,b))return!0}}}function Jn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Jn(a,b.line,xr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.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==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&Jn(a,y,E))return!0}function er(a){a=cn(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var ee=x.parent;ee;x=ee,ee=x.parent)for(var re=0;re<ee.children.length;++re){var oe=ee.children[re];if(oe==x)break;y+=oe.height}return y}function Lr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Yn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Mt(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function rr(a){var y=a.display,x=a.doc;y.maxLine=nt(x,x.first),y.maxLineLength=Lr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Lr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var vr=function(a,y,x){this.text=a,Jr(this,y),this.height=x?x(this):1};vr.prototype.lineNo=function(){return xe(this)},pt(vr);function Nr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),cr(a),Jr(a,x);var E=b?b(a):1;E!=a.height&&Vn(a,E)}function Ur(a){a.parent=null,cr(a)}var Ar={},Qr={};function Rr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Qr:Ar;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function di(a,y){var x=ht("span",null,null,He?"padding-right: .1px":null),b={pre:ht("pre",[x],"CodeMirror-line"),content:x,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,re=void 0;b.pos=0,b.addToken=Ri,mn(a.display.measure)&&(re=dn(ee,a.doc.direction))&&(b.addToken=mi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&xe(ee);xi(ee,b,Tn(a,ee,oe)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=mt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=mt(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(An(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(He){var se=b.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return qe(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=mt(b.pre.className,b.textClass||"")),b}function zi(a){var y=Ne("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ri(a,y,x,b,E,ee,re){if(y){var oe=a.splitSpaces?Ci(y,a.trailingSpace):y,se=a.cm.state.specialChars,ce=!1,ye;if(!se.test(y))a.col+=y.length,ye=document.createTextNode(oe),a.map.push(a.pos,a.pos+y.length,ye),me&&ge<9&&(ce=!0),a.pos+=y.length;else{ye=document.createDocumentFragment();for(var Se=0;;){se.lastIndex=Se;var Je=se.exec(y),Ue=Je?Je.index-Se:y.length-Se;if(Ue){var yt=document.createTextNode(oe.slice(Se,Se+Ue));me&&ge<9?ye.appendChild(Ne("span",[yt])):ye.appendChild(yt),a.map.push(a.pos,a.pos+Ue,yt),a.col+=Ue,a.pos+=Ue}if(!Je)break;Se+=Ue+1;var Tt=void 0;if(Je[0]==" "){var qt=a.cm.options.tabSize,hn=qt-a.col%qt;Tt=ye.appendChild(Ne("span",Zt(hn),"cm-tab")),Tt.setAttribute("role","presentation"),Tt.setAttribute("cm-text"," "),a.col+=hn}else Je[0]=="\r"||Je[0]==`
`?(Tt=ye.appendChild(Ne("span",Je[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Tt.setAttribute("cm-text",Je[0]),a.col+=1):(Tt=a.cm.options.specialCharPlaceholder(Je[0]),Tt.setAttribute("cm-text",Je[0]),me&&ge<9?ye.appendChild(Ne("span",[Tt])):ye.appendChild(Tt),a.col+=1);a.map.push(a.pos,a.pos+1,Tt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||ce||ee||re){var Cn=x||"";b&&(Cn+=b),E&&(Cn+=E);var fn=Ne("span",[ye],Cn,ee);if(re)for(var En in re)re.hasOwnProperty(En)&&En!="style"&&En!="class"&&fn.setAttribute(En,re[En]);return a.content.appendChild(fn)}a.content.appendChild(ye)}}function Ci(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function mi(a,y){return function(x,b,E,ee,re,oe,se){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,ye=ce+b.length;;){for(var Se=void 0,Je=0;Je<y.length&&(Se=y[Je],!(Se.to>ce&&Se.from<=ce));Je++);if(Se.to>=ye)return a(x,b,E,ee,re,oe,se);a(x,b.slice(0,Se.to-ce),E,ee,null,oe,se),ee=null,b=b.slice(Se.to-ce),ce=Se.to}}}function Or(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function xi(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(ee,ee=x[re]),Rr(x[re+1],y.cm.options));return}for(var oe=E.length,se=0,ce=1,ye="",Se,Je,Ue=0,yt,Tt,qt,hn,Cn;;){if(Ue==se){yt=Tt=qt=Je="",Cn=null,hn=null,Ue=1/0;for(var fn=[],En=void 0,Un=0;Un<b.length;++Un){var On=b[Un],lr=On.marker;if(lr.type=="bookmark"&&On.from==se&&lr.widgetNode)fn.push(lr);else if(On.from<=se&&(On.to==null||On.to>se||lr.collapsed&&On.to==se&&On.from==se)){if(On.to!=null&&On.to!=se&&Ue>On.to&&(Ue=On.to,Tt=""),lr.className&&(yt+=" "+lr.className),lr.css&&(Je=(Je?Je+";":"")+lr.css),lr.startStyle&&On.from==se&&(qt+=" "+lr.startStyle),lr.endStyle&&On.to==Ue&&(En||(En=[])).push(lr.endStyle,On.to),lr.title&&((Cn||(Cn={})).title=lr.title),lr.attributes)for(var Hr in lr.attributes)(Cn||(Cn={}))[Hr]=lr.attributes[Hr];lr.collapsed&&(!hn||Sr(hn.marker,lr)<0)&&(hn=On)}else On.from>se&&Ue>On.from&&(Ue=On.from)}if(En)for(var oi=0;oi<En.length;oi+=2)En[oi+1]==Ue&&(Tt+=" "+En[oi]);if(!hn||hn.from==se)for(var Vr=0;Vr<fn.length;++Vr)Or(y,0,fn[Vr]);if(hn&&(hn.from||0)==se){if(Or(y,(hn.to==null?oe+1:hn.to)-se,hn.marker,hn.from==null),hn.to==null)return;hn.to==se&&(hn=!1)}}if(se>=oe)break;for(var Ti=Math.min(oe,Ue);;){if(ye){var ki=se+ye.length;if(!hn){var ei=ki>Ti?ye.slice(0,Ti-se):ye;y.addToken(y,ei,Se?Se+yt:yt,qt,se+ei.length==Ue?Tt:"",Je,Cn)}if(ki>=Ti){ye=ye.slice(Ti-se),se=Ti;break}se=ki,qt=""}ye=E.slice(ee,ee=x[ce++]),Se=Rr(x[ce++],y.cm.options)}}}function ea(a,y,x){this.line=y,this.rest=Yt(y),this.size=this.rest?xe(We(this.rest))-x+1:1,this.node=this.text=null,this.hidden=on(a,y)}function qr(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new ea(a.doc,nt(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var Ni=null;function Xi(a){Ni?Ni.ops.push(a):a.ownsGroup=Ni={ops:[a],delayedCallbacks:[]}}function hi(a){var y=a.delayedCallbacks,x=0;do{for(;x<y.length;x++)y[x].call(null);for(var b=0;b<a.ops.length;b++){var E=a.ops[b];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(x<y.length)}function oa(a,y){var x=a.ownsGroup;if(x)try{hi(x)}finally{Ni=null,y(x)}}var Pi=null;function Wr(a,y){var x=Sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ni?E=Ni.delayedCallbacks:Pi?E=Pi:(E=Pi=[],setTimeout(ta,0));for(var ee=function(oe){E.push(function(){return x[oe].apply(null,b)})},re=0;re<x.length;++re)ee(re)}}function ta(){var a=Pi;Pi=null;for(var y=0;y<a.length;++y)a[y]()}function la(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?sa(a,y):ee=="gutter"?tr(a,y,x,b):ee=="class"?zn(a,y):ee=="widget"&&Xn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=Ne("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&ge<8&&(a.node.style.zIndex=2)),a.node}function $r(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(Ne("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function ba(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):di(a,y)}function sa(a,y){var x=y.text.className,b=ba(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,zn(a,y)):x&&(y.text.className=x)}function zn(a,y){$r(a,y),y.line.wrapClass?Zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function tr(a,y,x,b){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=Zi(y);y.gutterBackground=Ne("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.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 re=Zi(y),oe=y.gutter=Ne("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(oe),re.insertBefore(oe,y.text),y.line.gutterClass&&(oe.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=oe.appendChild(Ne("div",ct(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=a.display.gutterSpecs[se].className,ye=ee.hasOwnProperty(ce)&&ee[ce];ye&&oe.appendChild(Ne("div",[ye],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function Xn(a,y,x){y.alignable&&(y.alignable=null);for(var b=je("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);Er(a,y,x)}function Qn(a,y,x,b){var E=ba(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),zn(a,y),tr(a,y,x,b),Er(a,y,b),y.node}function Er(a,y,x){if(_r(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)_r(a,y.rest[b],y,x,!1)}function _r(a,y,x,b,E){if(y.widgets)for(var ee=Zi(x),re=0,oe=y.widgets;re<oe.length;++re){var se=oe[re],ce=Ne("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Gi(se,ce,x,b),a.display.input.setUneditable(ce),E&&se.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Wr(se,"redraw")}}function Gi(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function gi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Xe(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),Ve(y.display.measure,Ne("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function si(a,y){for(var x=Dn(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function Kr(a){return a.lineSpace.offsetTop}function _i(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ji(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ve(a.measure,Ne("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Ai(a){return Wt-a.display.nativeBarWidth}function Qi(a){return a.display.scroller.clientWidth-Ai(a)-a.display.barWidth}function na(a){return a.display.scroller.clientHeight-Ai(a)-a.display.barHeight}function Vi(a,y,x){var b=a.options.lineWrapping,E=b&&Qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),oe=0;oe<re.length-1;oe++){var se=re[oe],ce=re[oe+1];Math.abs(se.bottom-ce.bottom)>2&&ee.push((se.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Fa(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(xe(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Vo(a,y){y=cn(y);var x=xe(y),b=a.display.externalMeasured=new ea(a.doc,y,x);b.lineN=x;var E=b.built=di(a,b);return b.text=E.pre,Ve(a.display.lineMeasure,E.pre),b}function yo(a,y,x,b){return Hi(a,ua(a,y),x,b)}function qi(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[wa(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function ua(a,y){var x=xe(y),b=qi(a,x);b&&!b.text?b=null:b&&b.changes&&(la(a,b,x,ca(a)),a.curOp.forceUpdate=!0),b||(b=Vo(a,y));var E=Fa(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Hi(a,y,x,b,E){y.before&&(x=-1);var ee=x+(b||""),re;return y.cache.hasOwnProperty(ee)?re=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Vi(a,y.view,y.rect),y.hasHeights=!0),re=xo(a,y,x,b),re.bogus||(y.cache[ee]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var bo={left:0,right:0,top:0,bottom:0};function Co(a,y,x){for(var b,E,ee,re,oe,se,ce=0;ce<a.length;ce+=3)if(oe=a[ce],se=a[ce+1],y<oe?(E=0,ee=1,re="left"):y<se?(E=y-oe,ee=E+1):(ce==a.length-3||y==se&&a[ce+3]>y)&&(ee=se-oe,E=ee-1,y>=se&&(re="right")),E!=null){if(b=a[ce+2],oe==se&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],re="left";if(x=="right"&&E==se-oe)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],re="right";break}return{node:b,start:E,end:ee,collapse:re,coverStart:oe,coverEnd:se}}function jo(a,y){var x=bo;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function xo(a,y,x,b){var E=Co(y.map,x,b),ee=E.node,re=E.start,oe=E.end,se=E.collapse,ce;if(ee.nodeType==3){for(var ye=0;ye<4;ye++){for(;re&&$e(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe<E.coverEnd&&$e(y.line.text.charAt(E.coverStart+oe));)++oe;if(me&&ge<9&&re==0&&oe==E.coverEnd-E.coverStart?ce=ee.parentNode.getBoundingClientRect():ce=jo(Be(ee,re,oe).getClientRects(),b),ce.left||ce.right||re==0)break;oe=re,re=re-1,se="right"}me&&ge<11&&(ce=Uo(a.display.measure,ce))}else{re>0&&(se=b="right");var Se;a.options.lineWrapping&&(Se=ee.getClientRects()).length>1?ce=Se[b=="right"?Se.length-1:0]:ce=ee.getBoundingClientRect()}if(me&&ge<9&&!re&&(!ce||!ce.left&&!ce.right)){var Je=ee.parentNode.getClientRects()[0];Je?ce={left:Je.left,right:Je.left+Ui(a.display),top:Je.top,bottom:Je.bottom}:ce=bo}for(var Ue=ce.top-y.rect.top,yt=ce.bottom-y.rect.top,Tt=(Ue+yt)/2,qt=y.view.measure.heights,hn=0;hn<qt.length-1&&!(Tt<qt[hn]);hn++);var Cn=hn?qt[hn-1]:0,fn=qt[hn],En={left:(se=="right"?ce.right:ce.left)-y.rect.left,right:(se=="left"?ce.left:ce.right)-y.rect.left,top:Cn,bottom:fn};return!ce.left&&!ce.right&&(En.bogus=!0),a.options.singleCursorHeightPerLine||(En.rtop=Ue,En.rbottom=yt),En}function Uo(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!_n(a))return y;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*x,right:y.right*x,top:y.top*b,bottom:y.bottom*b}}function Ua(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 Ka(a){a.display.externalMeasure=null,bt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ua(a.display.view[y])}function Ca(a){Ka(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Ya(){return Ce&&Ae?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wo(){return Ce&&Ae?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xa(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=gi(a.widgets[x]));return y}function La(a,y,x,b,E){if(!E){var ee=Xa(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var re=er(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var oe=a.display.lineSpace.getBoundingClientRect();re+=oe.top+(b=="window"?0:wo());var se=oe.left+(b=="window"?0:Ya());x.left+=se,x.right+=se}return x.top+=re,x.bottom+=re,x}function So(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Ya(),E-=wo();else if(x=="local"||!x){var ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Ma(a,y,x,b,E){return b||(b=nt(a.doc,y.line)),La(a,b,yo(a,b,y.ch,E),x)}function wi(a,y,x,b,E,ee){b=b||nt(a.doc,y.line),E||(E=ua(a,b));function re(yt,Tt){var qt=Hi(a,E,yt,Tt?"right":"left",ee);return Tt?qt.left=qt.right:qt.right=qt.left,La(a,b,qt,x)}var oe=dn(b,a.doc.direction),se=y.ch,ce=y.sticky;if(se>=b.text.length?(se=b.text.length,ce="before"):se<=0&&(se=0,ce="after"),!oe)return re(ce=="before"?se-1:se,ce=="before");function ye(yt,Tt,qt){var hn=oe[Tt],Cn=hn.level==1;return re(qt?yt-1:yt,Cn!=qt)}var Se=tn(oe,se,ce),Je=kt,Ue=ye(se,Se,ce=="before");return Je!=null&&(Ue.other=ye(se,Je,ce!="before")),Ue}function mr(a,y){var x=0;y=Fe(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=nt(a.doc,y.line),E=er(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function ir(a,y,x,b,E){var ee=Ie(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ui(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return ir(b.first,0,null,-1,-1);var E=De(b,x),ee=b.first+b.size-1;if(E>ee)return ir(b.first+b.size-1,nt(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=nt(b,E);;){var oe=ji(a,re,E,y,x),se=Kt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!se)return oe;var ce=se.find(1);if(ce.line==E)return ce;re=nt(b,E=ce.line)}}function fi(a,y,x,b){b-=Xa(y);var E=y.text.length,ee=Dt(function(re){return Hi(a,x,re-1).bottom<=b},E,0);return E=Dt(function(re){return Hi(a,x,re).top>b},ee,E),{begin:ee,end:E}}function Yr(a,y,x,b){x||(x=ua(a,y));var E=La(a,y,Hi(a,x,b),"line").top;return fi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function ji(a,y,x,b,E){E-=er(y);var ee=ua(a,y),re=Xa(y),oe=0,se=y.text.length,ce=!0,ye=dn(y,a.doc.direction);if(ye){var Se=(a.options.lineWrapping?ra:Wi)(a,y,x,ee,ye,b,E);ce=Se.level!=1,oe=ce?Se.from:Se.to-1,se=ce?Se.to:Se.from-1}var Je=null,Ue=null,yt=Dt(function(Un){var On=Hi(a,ee,Un);return On.top+=re,On.bottom+=re,ni(On,b,E,!1)?(On.top<=E&&On.left<=b&&(Je=Un,Ue=On),!0):!1},oe,se),Tt,qt,hn=!1;if(Ue){var Cn=b-Ue.left<Ue.right-b,fn=Cn==ce;yt=Je+(fn?0:1),qt=fn?"after":"before",Tt=Cn?Ue.left:Ue.right}else{!ce&&(yt==se||yt==oe)&&yt++,qt=yt==0?"after":yt==y.text.length?"before":Hi(a,ee,yt-(ce?1:0)).bottom+re<=E==ce?"after":"before";var En=wi(a,Ie(x,yt,qt),"line",y,ee);Tt=En.left,hn=E<En.top?-1:E>=En.bottom?1:0}return yt=It(y.text,yt,1),ir(x,yt,qt,hn,b-Tt)}function Wi(a,y,x,b,E,ee,re){var oe=Dt(function(Se){var Je=E[Se],Ue=Je.level!=1;return ni(wi(a,Ie(x,Ue?Je.to:Je.from,Ue?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),se=E[oe];if(oe>0){var ce=se.level!=1,ye=wi(a,Ie(x,ce?se.from:se.to,ce?"after":"before"),"line",y,b);ni(ye,ee,re,!0)&&ye.top>re&&(se=E[oe-1])}return se}function ra(a,y,x,b,E,ee,re){var oe=fi(a,y,b,re),se=oe.begin,ce=oe.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var ye=null,Se=null,Je=0;Je<E.length;Je++){var Ue=E[Je];if(!(Ue.from>=ce||Ue.to<=se)){var yt=Ue.level!=1,Tt=Hi(a,b,yt?Math.min(ce,Ue.to)-1:Math.max(se,Ue.from)).right,qt=Tt<ee?ee-Tt+1e9:Tt-ee;(!ye||Se>qt)&&(ye=Ue,Se=qt)}}return ye||(ye=E[E.length-1]),ye.from<se&&(ye={from:se,to:ye.to,level:ye.level}),ye.to>ce&&(ye={from:ye.from,to:ce,level:ye.level}),ye}var Fi;function Li(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Fi==null){Fi=Ne("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Fi.appendChild(document.createTextNode("x")),Fi.appendChild(Ne("br"));Fi.appendChild(document.createTextNode("x"))}Ve(a.measure,Fi);var x=Fi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),bt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ne("span","xxxxxxxxxx"),x=Ne("pre",[y],"CodeMirror-line-like");Ve(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function ca(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=ee.offsetLeft+ee.clientLeft+E,b[oe]=ee.clientWidth}return{fixedPos:Ko(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ko(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function xl(a){var y=Li(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(on(a.doc,E))return 0;var ee=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(ee+=E.widgets[re].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Yo(a){var y=a.doc,x=xl(a);y.iter(function(b){var E=x(b);E!=b.height&&Vn(b,E)})}function xa(a,y,x,b){var E=a.display;if(!x&&Dn(y).getAttribute("cm-not-content")=="true")return null;var ee,re,oe=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-oe.left,re=y.clientY-oe.top}catch(Se){return null}var se=ui(a,ee,re),ce;if(b&&se.xRel>0&&(ce=nt(a.doc,se.line).text).length==se.ch){var ye=ve(ce,ce.length,a.options.tabSize)-ce.length;se=Ie(se.line,Math.max(0,Math.round((ee-Ji(a.display).left)/Ui(a.display))-ye))}return se}function wa(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function Si(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)sr&&Ot(a.doc,y)<E.viewTo&&ha(a);else if(x<=E.viewFrom)sr&&$t(a.doc,x+b)>E.viewFrom?ha(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ha(a);else if(y<=E.viewFrom){var ee=Eo(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):ha(a)}else if(x>=E.viewTo){var re=Eo(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):ha(a)}else{var oe=Eo(a,y,y,-1),se=Eo(a,x,x+b,1);oe&&se?(E.view=E.view.slice(0,oe.index).concat(qr(a,oe.lineN,se.lineN)).concat(E.view.slice(se.index)),E.viewTo+=b):ha(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function da(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var ee=b.view[wa(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);lt(re,x)==-1&&re.push(x)}}}function ha(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Eo(a,y,x,b){var E=wa(a,y),ee,re=a.display.view;if(!sr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,se=0;se<E;se++)oe+=re[se].size;if(oe!=y){if(b>0){if(E==re.length-1)return null;ee=oe+re[E].size-y,E++}else ee=oe-y;y+=ee,x+=ee}for(;Ot(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=qr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=qr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(wa(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(qr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,wa(a,x)))),b.viewTo=x}function wl(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Ja(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ee=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var oe=x.sel.ranges[re];if(!(oe.from().line>=a.display.viewTo||oe.to().line<a.display.viewFrom)){var se=oe.empty();(se||a.options.showCursorWhenSelecting)&&El(a,oe.head,E),se||Ws(a,oe,ee)}}return b}function El(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ne("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ee=x.appendChild(Ne("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ko(a,y){return a.top-y.top||a.left-y.left}function Ws(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),re=Ji(a.display),oe=re.left,se=Math.max(b.sizerWidth,Qi(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function ye(fn,En,Un,On){En<0&&(En=0),En=Math.round(En),On=Math.round(On),ee.appendChild(Ne("div",null,"CodeMirror-selected","position: absolute; left: "+fn+`px;
top: `+En+"px; width: "+(Un==null?se-fn:Un)+`px;
height: `+(On-En)+"px"))}function Se(fn,En,Un){var On=nt(E,fn),lr=On.text.length,Hr,oi;function Vr(ei,Di){return Ma(a,Ie(fn,ei),"div",On,Di)}function Ti(ei,Di,ci){var ri=Yr(a,On,null,ei),ti=Di=="ltr"==(ci=="after")?"left":"right",jr=ci=="after"?ri.begin:ri.end-(/\s/.test(On.text.charAt(ri.end-1))?2:1);return Vr(jr,ti)[ti]}var ki=dn(On,E.direction);return gt(ki,En||0,Un==null?lr:Un,function(ei,Di,ci,ri){var ti=ci=="ltr",jr=Vr(ei,ti?"left":"right"),Bi=Vr(Di-1,ti?"right":"left"),Va=En==null&&ei==0,ya=Un==null&&Di==lr,vi=ri==0,$i=!ki||ri==ki.length-1;if(Bi.top-jr.top<=3){var li=(ce?Va:ya)&&vi,bl=(ce?ya:Va)&&$i,aa=li?oe:(ti?jr:Bi).left,Ba=bl?se:(ti?Bi:jr).right;ye(aa,jr.top,Ba-aa,jr.bottom)}else{var Aa,bi,ja,Cl;ti?(Aa=ce&&Va&&vi?oe:jr.left,bi=ce?se:Ti(ei,ci,"before"),ja=ce?oe:Ti(Di,ci,"after"),Cl=ce&&ya&&$i?se:Bi.right):(Aa=ce?Ti(ei,ci,"before"):oe,bi=!ce&&Va&&vi?se:jr.right,ja=!ce&&ya&&$i?oe:Bi.left,Cl=ce?Ti(Di,ci,"after"):se),ye(Aa,jr.top,bi-Aa,jr.bottom),jr.bottom<Bi.top&&ye(oe,jr.bottom,null,Bi.top),ye(ja,Bi.top,Cl-ja,Bi.bottom)}(!Hr||ko(jr,Hr)<0)&&(Hr=jr),ko(Bi,Hr)<0&&(Hr=Bi),(!oi||ko(jr,oi)<0)&&(oi=jr),ko(Bi,oi)<0&&(oi=Bi)}),{start:Hr,end:oi}}var Je=y.from(),Ue=y.to();if(Je.line==Ue.line)Se(Je.line,Je.ch,Ue.ch);else{var yt=nt(E,Je.line),Tt=nt(E,Ue.line),qt=cn(yt)==cn(Tt),hn=Se(Je.line,Je.ch,qt?yt.text.length+1:null).end,Cn=Se(Ue.line,qt?0:null,Ue.ch).start;qt&&(hn.top<Cn.top-2?(ye(hn.right,hn.top,null,hn.bottom),ye(oe,Cn.top,Cn.left,Cn.bottom)):ye(hn.right,hn.top,Cn.left-hn.right,hn.bottom)),hn.bottom<Cn.top&&ye(oe,hn.bottom,null,Cn.top)}x.appendChild(ee)}function Xo(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ta(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function kl(a){a.state.focused||(a.display.input.focus(),Jo(a))}function Dl(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ta(a))},100)}function Jo(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(qe(a,"focus",a,y),a.state.focused=!0,Ge(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),He&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xo(a))}function Ta(a,y){a.state.delayingBlurEvent||(a.state.focused&&(qe(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 Do(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ee=a.options.lineWrapping,re=void 0,oe=0;if(!E.hidden){if(me&&ge<8){var se=E.node.offsetTop+E.node.offsetHeight;re=se-x,x=se}else{var ce=E.node.getBoundingClientRect();re=ce.bottom-ce.top,!ee&&E.text.firstChild&&(oe=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var ye=E.line.height-re;if((ye>.005||ye<-.005)&&(Vn(E.line,re),Bl(E.line),E.rest))for(var Se=0;Se<E.rest.length;Se++)Bl(E.rest[Se]);if(oe>a.display.sizerWidth){var Je=Math.ceil(oe/Ui(a.display));Je>a.display.maxLineLength&&(a.display.maxLineLength=Je,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Bl(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function Bo(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Kr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=De(y,b),re=De(y,E);if(x&&x.ensure){var oe=x.ensure.from.line,se=x.ensure.to.line;oe<ee?(ee=oe,re=De(y,er(nt(y,oe))+a.wrapper.clientHeight)):Math.min(se,y.lastLine())>=re&&(ee=De(y,er(nt(y,se))-a.wrapper.clientHeight),re=se)}return{from:ee,to:Math.max(re,ee+1)}}function zs(a,y){if(!Ee(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!rt){var ee=Ne("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
height: `+(y.bottom-y.top+Ai(a)+x.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 Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ie(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ie(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,oe=wi(a,y),se=!x||x==y?oe:wi(a,x);E={left:Math.min(oe.left,se.left),top:Math.min(oe.top,se.top)-b,right:Math.max(oe.left,se.left),bottom:Math.max(oe.bottom,se.bottom)+b};var ce=Qo(a,E),ye=a.doc.scrollTop,Se=a.doc.scrollLeft;if(ce.scrollTop!=null&&(qa(a,ce.scrollTop),Math.abs(a.doc.scrollTop-ye)>1&&(re=!0)),ce.scrollLeft!=null&&(Sa(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-Se)>1&&(re=!0)),!re)break}return E}function Gs(a,y){var x=Qo(a,y);x.scrollTop!=null&&qa(a,x.scrollTop),x.scrollLeft!=null&&Sa(a,x.scrollLeft)}function Qo(a,y){var x=a.display,b=Li(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=na(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var oe=a.doc.height+_i(x),se=y.top<b,ce=y.bottom>oe-b;if(y.top<E)re.scrollTop=se?0:y.top;else if(y.bottom>E+ee){var ye=Math.min(y.top,(ce?oe:y.bottom)-ee);ye!=E&&(re.scrollTop=ye)}var Se=a.options.fixedGutter?0:x.gutters.offsetWidth,Je=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Se,Ue=Qi(a)-x.gutters.offsetWidth,yt=y.right-y.left>Ue;return yt&&(y.right=y.left+Ue),y.left<10?re.scrollLeft=0:y.left<Je?re.scrollLeft=Math.max(0,y.left+Se-(yt?0:10)):y.right>Ue+Je-3&&(re.scrollLeft=y.right+(yt?0:10)-Ue),re}function qo(a,y){y!=null&&(Ao(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Pa(a){Ao(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Qa(a,y,x){(y!=null||x!=null)&&Ao(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Vs(a,y){Ao(a),a.curOp.scrollToPos=y}function Ao(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=mr(a,y.from),b=mr(a,y.to);Al(a,x,b,y.margin)}}function Al(a,y,x,b){var E=Qo(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});Qa(a,E.scrollLeft,E.scrollTop)}function qa(a,y){Math.abs(a.doc.scrollTop-y)<2||(le||el(a,{top:y}),Fl(a,y,!0),le&&el(a),to(a,100))}function Fl(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Sa(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Ol(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function $a(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+_i(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?x:0,docHeight:b,scrollHeight:b+Ai(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Ea=function(a,y,x){this.cm=x;var b=this.vert=Ne("div",[Ne("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ne("div",[Ne("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),_t(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),_t(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ge<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ea.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b: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=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b: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&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Ea.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ea.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ea.prototype.zeroWidthHack=function(){var a=ke&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},Ea.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="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,b)}y.set(1e3,b)},Ea.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var eo=function(){};eo.prototype.update=function(){return{bottom:0,right:0}},eo.prototype.setScrollLeft=function(){},eo.prototype.setScrollTop=function(){},eo.prototype.clear=function(){};function Oa(a,y){y||(y=$a(a));var x=a.display.barWidth,b=a.display.barHeight;Ll(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Do(a),Ll(a,$a(a)),x=a.display.barWidth,b=a.display.barHeight}function Ll(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ml={native:Ea,null:eo};function Tl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ze(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ml[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),_t(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?Sa(a,y):qa(a,y)},a),a.display.scrollbars.addClass&&Ge(a.display.wrapper,a.display.scrollbars.addClass)}var js=0;function ka(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:++js},Xi(a.curOp)}function Da(a){var y=a.curOp;y&&oa(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var ee=0;ee<y.length;ee++)Js(y[ee]);for(var re=0;re<y.length;re++)Qs(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&rr(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Fo(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$o(a.cm,a.update)}function Xs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Do(y),a.barMeasure=$a(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=yo(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Ai(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.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&&Sa(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==we();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Oa(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&Xo(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Qs(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Pl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Fl(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Sa(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,Fe(b,a.scrollToPos.from),Fe(b,a.scrollToPos.to),a.scrollToPos.margin);zs(y,E)}var ee=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(ee)for(var oe=0;oe<ee.length;++oe)ee[oe].lines.length||qe(ee[oe],"hide");if(re)for(var se=0;se<re.length;++se)re[se].lines.length&&qe(re[se],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&qe(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Mi(a,y){if(a.curOp)return y();ka(a);try{return y()}finally{Da(a)}}function ii(a,y){return function(){if(a.curOp)return y.apply(a,arguments);ka(a);try{return y.apply(a,arguments)}finally{Da(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);ka(this);try{return a.apply(this,arguments)}finally{Da(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);ka(y);try{return a.apply(this,arguments)}finally{Da(y)}}}function to(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Xt(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=ar(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var re=ee.styles,oe=ee.text.length>a.options.maxHighlightLength?Mn(y.mode,b.state):null,se=Bn(a,ee,b,!0);oe&&(b.state=oe),ee.styles=se.styles;var ce=ee.styleClasses,ye=se.classes;ye?ee.styleClasses=ye:ce&&(ee.styleClasses=null);for(var Se=!re||re.length!=ee.styles.length||ce!=ye&&(!ce||!ye||ce.bgClass!=ye.bgClass||ce.textClass!=ye.textClass),Je=0;!Se&&Je<re.length;++Je)Se=re[Je]!=ee.styles[Je];Se&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&Gn(a,ee.text,b),ee.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return to(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Mi(a,function(){for(var ee=0;ee<E.length;ee++)da(a,E[ee],"text")})}}var Fo=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Bo(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=Qi(a),this.force=x,this.dims=ca(a),this.events=[]};Fo.prototype.signal=function(a,y){st(a,y)&&this.events.push(arguments)},Fo.prototype.finish=function(){for(var a=0;a<this.events.length;a++)qe.apply(null,this.events[a])};function $s(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Ai(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ai(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=we();if(!y||!Xe(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Xe(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==we())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Xe(document.body,a.anchorNode)&&Xe(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $o(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return ha(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&wl(a)==0)return!1;Il(a)&&(ha(a),y.dims=ca(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),sr&&(ee=Ot(a.doc,ee),re=$t(a.doc,re));var oe=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,ee,re),x.viewOffset=er(nt(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var se=wl(a);if(!oe&&se==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return se>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),se>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),bt(x.cursorDiv),bt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,oe&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,to(a,400)),x.updateLineNumbers=null,!0}function Pl(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==Qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+_i(a.display)-na(a),x.top)}),y.visible=Bo(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Bo(a.display,a.doc,x));if(!$o(a,y))break;Do(a);var E=$a(a);Ja(a),Oa(a,E),nl(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 el(a,y){var x=new Fo(a,y);if($o(a,x)){Do(a),Pl(a,x);var b=$a(a);Ja(a),Oa(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,re=ee.firstChild;function oe(yt){var Tt=yt.nextSibling;return He&&ke&&a.display.currentWheelTarget==yt?yt.style.display="none":yt.parentNode.removeChild(yt),Tt}for(var se=b.view,ce=b.viewFrom,ye=0;ye<se.length;ye++){var Se=se[ye];if(!Se.hidden)if(!Se.node||Se.node.parentNode!=ee){var Je=Qn(a,Se,ce,x);ee.insertBefore(Je,re)}else{for(;re!=Se.node;)re=oe(re);var Ue=E&&y!=null&&y<=ce&&Se.lineNumber;Se.changes&&(lt(Se.changes,"gutter")>-1&&(Ue=!1),la(a,Se,ce,x)),Ue&&(bt(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(ct(a.options,ce)))),re=Se.node.nextSibling}ce+=Se.size}for(;re;)re=oe(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(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+Ai(a)+"px"}function Ol(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ko(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=ee),x[re].gutterBackground&&(x[re].gutterBackground.style.left=ee));var oe=x[re].alignable;if(oe)for(var se=0;se<oe.length;se++)oe[se].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Il(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=ct(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ne("div",[Ne("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,re=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],re=null;if(typeof ee!="string"&&(re=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rl(a){var y=a.gutters,x=a.gutterSpecs;bt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,re=E.style,oe=y.appendChild(Ne("div",null,"CodeMirror-gutter "+ee));re&&(oe.style.cssText=re),ee=="CodeMirror-linenumbers"&&(a.lineGutter=oe,oe.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function no(a){Rl(a.display),Si(a),Ol(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ne("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ne("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ht("div",null,"CodeMirror-code"),E.selectionDiv=Ne("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ne("div",null,"CodeMirror-cursors"),E.measure=Ne("div",null,"CodeMirror-measure"),E.lineMeasure=Ne("div",null,"CodeMirror-measure"),E.lineSpace=ht("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=ht("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ne("div",[ee],null,"position: relative"),E.sizer=Ne("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ne("div",null,null,"position: absolute; height: "+Wt+"px; width: 1px;"),E.gutters=Ne("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ne("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ne("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&ge<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!He&&!(le&&Me)&&(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=rl(b.gutters,b.lineNumbers),Rl(E),x.init(E)}var Lo=0,Oi=null;me?Oi=-.53:le?Oi=15:Ce?Oi=-.7:Ye&&(Oi=-1/3);function Nl(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Nl(a);return y.x*=Oi,y.y*=Oi,y}function _l(a,y){var x=Nl(y),b=x.x,E=x.y,ee=a.display,re=ee.scroller,oe=re.scrollWidth>re.clientWidth,se=re.scrollHeight>re.clientHeight;if(b&&oe||E&&se){if(E&&ke&&He){e:for(var ce=y.target,ye=ee.view;ce!=re;ce=ce.parentNode)for(var Se=0;Se<ye.length;Se++)if(ye[Se].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!le&&!he&&Oi!=null){E&&se&&qa(a,Math.max(0,re.scrollTop+E*Oi)),Sa(a,Math.max(0,re.scrollLeft+b*Oi)),(!E||E&&se)&&wt(y),ee.wheelStartX=null;return}if(E&&Oi!=null){var Je=E*Oi,Ue=a.doc.scrollTop,yt=Ue+ee.wrapper.clientHeight;Je<0?Ue=Math.max(0,Ue+Je-50):yt=Math.min(a.doc.height,yt+Je+50),el(a,{top:Ue,bottom:yt})}Lo<20&&(ee.wheelStartX==null?(ee.wheelStartX=re.scrollLeft,ee.wheelStartY=re.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var Tt=re.scrollLeft-ee.wheelStartX,qt=re.scrollTop-ee.wheelStartY,hn=qt&&ee.wheelDY&&qt/ee.wheelDY||Tt&&ee.wheelDX&&Tt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,hn&&(Oi=(Oi*Lo+hn)/(Lo+1),++Lo)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var Ii=function(a,y){this.ranges=a,this.primIndex=y};Ii.prototype.primary=function(){return this.ranges[this.primIndex]},Ii.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 x=this.ranges[y],b=a.ranges[y];if(!zt(x.anchor,b.anchor)||!zt(x.head,b.head))return!1}return!0},Ii.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Fr(an(this.ranges[y].anchor),an(this.ranges[y].head));return new Ii(a,this.primIndex)},Ii.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ii.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(ft(y,b.from())>=0&&ft(a,b.to())<=0)return x}return-1};var Fr=function(a,y){this.anchor=a,this.head=y};Fr.prototype.from=function(){return Lt(this.anchor,this.head)},Fr.prototype.to=function(){return pn(this.anchor,this.head)},Fr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Je,Ue){return ft(Je.from(),Ue.from())}),x=lt(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],oe=y[ee-1],se=ft(oe.to(),re.from());if(b&&!re.empty()?se>0:se>=0){var ce=Lt(oe.from(),re.from()),ye=pn(oe.to(),re.to()),Se=oe.empty()?re.from()==re.head:oe.from()==oe.head;ee<=x&&--x,y.splice(--ee,2,new Fr(Se?ye:ce,Se?ce:ye))}}return new Ii(y,x)}function fa(a,y){return new Ii([new Fr(a,y||a)],0)}function pa(a){return a.text?Ie(a.from.line+a.text.length-1,We(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(ft(a,y.from)<0)return a;if(ft(a,y.to)<=0)return pa(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=pa(y).ch-y.to.ch),Ie(x,b)}function il(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Fr(Hl(E.anchor,y),Hl(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function Wl(a,y,x){return a.line==y.line?Ie(x.line,a.ch-y.ch+x.ch):Ie(x.line+(a.line-y.line),a.ch)}function au(a,y,x){for(var b=[],E=Ie(a.first,0),ee=E,re=0;re<y.length;re++){var oe=y[re],se=Wl(oe.from,E,ee),ce=Wl(pa(oe),E,ee);if(E=oe.to,ee=ce,x=="around"){var ye=a.sel.ranges[re],Se=ft(ye.head,ye.anchor)<0;b[re]=new Fr(Se?ce:se,Se?se:ce)}else b[re]=new Fr(se,se)}return new Ii(b,a.sel.primIndex)}function al(a){a.doc.mode=yn(a.options,a.doc.modeOption),ro(a)}function ro(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,to(a,100),a.state.modeGen++,a.curOp&&Si(a)}function zl(a,y){return y.from.ch==0&&y.to.ch==0&&We(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function ol(a,y,x,b){function E(Cn){return x?x[Cn]:null}function ee(Cn,fn,En){Nr(Cn,fn,En,b),Wr(Cn,"change",Cn,y)}function re(Cn,fn){for(var En=[],Un=Cn;Un<fn;++Un)En.push(new vr(ce[Un],E(Un),b));return En}var oe=y.from,se=y.to,ce=y.text,ye=nt(a,oe.line),Se=nt(a,se.line),Je=We(ce),Ue=E(ce.length-1),yt=se.line-oe.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(zl(a,y)){var Tt=re(0,ce.length-1);ee(Se,Se.text,Ue),yt&&a.remove(oe.line,yt),Tt.length&&a.insert(oe.line,Tt)}else if(ye==Se)if(ce.length==1)ee(ye,ye.text.slice(0,oe.ch)+Je+ye.text.slice(se.ch),Ue);else{var qt=re(1,ce.length-1);qt.push(new vr(Je+ye.text.slice(se.ch),Ue,b)),ee(ye,ye.text.slice(0,oe.ch)+ce[0],E(0)),a.insert(oe.line+1,qt)}else if(ce.length==1)ee(ye,ye.text.slice(0,oe.ch)+ce[0]+Se.text.slice(se.ch),E(0)),a.remove(oe.line+1,yt);else{ee(ye,ye.text.slice(0,oe.ch)+ce[0],E(0)),ee(Se,Je+Se.text.slice(se.ch),Ue);var hn=re(1,ce.length-1);yt>1&&a.remove(oe.line+1,yt-1),a.insert(oe.line+1,hn)}Wr(a,"change",a,y)}function va(a,y,x){function b(E,ee,re){if(E.linked)for(var oe=0;oe<E.linked.length;++oe){var se=E.linked[oe];if(se.doc!=ee){var ce=re&&se.sharedHist;x&&!ce||(y(se.doc,ce),b(se.doc,E,ce))}}}b(a,null,!0)}function Zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Yo(a),al(a),Gl(a),a.options.lineWrapping||rr(a),a.options.mode=y.modeOption,Si(a)}function Gl(a){(a.doc.direction=="rtl"?Ge:ze)(a.display.lineDiv,"CodeMirror-rtl")}function ou(a){Mi(a,function(){Gl(a),Si(a)})}function Mo(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 ll(a,y){var x={from:an(y.from),to:pa(y),text:Vt(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),va(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function Vl(a){for(;a.length;){var y=We(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Vl(a.done),We(a.done);if(a.done.length&&!We(a.done).ranges)return We(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),We(a.done)}function jl(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,re,oe;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))oe=We(re.changes),ft(y.from,y.to)==0&&ft(y.from,oe.to)==0?oe.to=pa(y):re.changes.push(ll(a,y));else{var se=We(E.done);for((!se||!se.ranges)&&To(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,oe||qe(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||su(a,ee,We(E.done),y))?E.done[E.done.length-1]=y:To(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&Vl(E.undone)}function To(a,y){var x=We(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=re.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Kl(a,y){var x=du(a,y),b=Tr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],re=b[E];if(ee&&re)e:for(var oe=0;oe<re.length;++oe){for(var se=re[oe],ce=0;ce<ee.length;++ce)if(ee[ce].marker==se.marker)continue e;ee.push(se)}else re&&(x[E]=re)}return x}function Ia(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?Ii.prototype.deepCopy.call(ee):ee);continue}var re=ee.changes,oe=[];b.push({changes:oe});for(var se=0;se<re.length;++se){var ce=re[se],ye=void 0;if(oe.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var Se in ce)(ye=Se.match(/^spans_(\d+)$/))&&lt(y,Number(ye[1]))>-1&&(We(oe)[Se]=ce[Se],delete ce[Se])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=ft(y,E)<0;ee!=ft(x,E)<0?(E=y,y=x):ee!=ft(y,x)<0&&(y=x)}return new Fr(E,y)}else return new Fr(x||y,y)}function Po(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),pi(a,new Ii([sl(a.sel.primary(),y,x,E)],0),b)}function Yl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=sl(a.sel.ranges[ee],y[ee],null,E);var re=Ki(a.cm,b,a.sel.primIndex);pi(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,pi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){pi(a,fa(y,x),b)}function hu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new Fr(Fe(a,E[ee].anchor),Fe(a,E[ee].head))},origin:x&&x.origin};return qe(a,"beforeSelectionChange",a,b),a.cm&&qe(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Jl(a,y,x){var b=a.history.done,E=We(b);E&&E.ranges?(b[b.length-1]=y,Oo(a,y,x)):pi(a,y,x)}function pi(a,y,x){Oo(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Oo(a,y,x){(st(a,"beforeSelectionChange")||a.cm&&st(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(ft(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Pa(a.cm)}function Ql(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,vt(a.cm)),Wr(a,"cursorActivity",a))}function ql(a){Ql(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,ee=0;ee<y.ranges.length;ee++){var re=y.ranges[ee],oe=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],se=Io(a,re.anchor,oe&&oe.anchor,x,b),ce=Io(a,re.head,oe&&oe.head,x,b);(E||se!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new Fr(se,ce))}return E?Ki(a.cm,E,y.primIndex):y}function Ra(a,y,x,b,E){var ee=nt(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var oe=ee.markedSpans[re],se=oe.marker,ce="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,ye="selectRight"in se?!se.selectRight:se.inclusiveRight;if((oe.from==null||(ce?oe.from<=y.ch:oe.from<y.ch))&&(oe.to==null||(ye?oe.to>=y.ch:oe.to>y.ch))){if(E&&(qe(se,"beforeCursorEnter"),se.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!se.atomic)continue;if(x){var Se=se.find(b<0?1:-1),Je=void 0;if((b<0?ye:ce)&&(Se=es(a,Se,-b,Se&&Se.line==y.line?ee:null)),Se&&Se.line==y.line&&(Je=ft(Se,x))&&(b<0?Je<0:Je>0))return Ra(a,Se,y,b,E)}var Ue=se.find(b<0?-1:1);return(b<0?ce:ye)&&(Ue=es(a,Ue,b,Ue.line==y.line?ee:null)),Ue?Ra(a,Ue,y,b,E):null}}return y}function Io(a,y,x,b,E){var ee=b||1,re=Ra(a,y,x,ee,E)||!E&&Ra(a,y,x,ee,!0)||Ra(a,y,x,-ee,E)||!E&&Ra(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Ie(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Fe(a,Ie(y.line-1)):null:x>0&&y.ch==(b||nt(a,y.line)).text.length?y.line<a.first+a.size-1?Ie(y.line+1,0):null:new Ie(y.line,y.ch+x)}function ts(a){a.setSelection(Ie(a.firstLine(),0),Ie(a.lastLine()),Oe)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ee,re,oe){E&&(b.from=Fe(a,E)),ee&&(b.to=Fe(a,ee)),re&&(b.text=re),oe!==void 0&&(b.origin=oe)}),qe(a,"beforeChange",a,b),a.cm&&qe(a.cm,"beforeChange",a.cm,b),b.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function Na(a,y,x){if(a.cm){if(!a.cm.curOp)return ii(a.cm,Na)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((st(a,"beforeChange")||a.cm&&st(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=hr&&!x&&Gr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rs(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rs(a,y)}}function rs(a,y){if(!(y.text.length==1&&y.text[0]==""&&ft(y.from,y.to)==0)){var x=il(a,y);jl(a,y,x,a.cm?a.cm.curOp.id:NaN),io(a,y,x,Tr(a,y));var b=[];va(a,function(E,ee){!ee&&lt(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),io(E,y,null,Tr(E,y))})}}function Ro(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,oe=y=="undo"?E.done:E.undone,se=y=="undo"?E.undone:E.done,ce=0;ce<oe.length&&(ee=oe[ce],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ce++);if(ce!=oe.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=oe.pop(),ee.ranges){if(To(ee,se),x&&!ee.equals(a.sel)){pi(a,ee,{clearRedo:!1});return}re=ee}else if(b){oe.push(ee);return}else break;var ye=[];To(re,se),se.push({changes:ye,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var Se=st(a,"beforeChange")||a.cm&&st(a.cm,"beforeChange"),Je=function(Tt){var qt=ee.changes[Tt];if(qt.origin=y,Se&&!ns(a,qt,!1))return oe.length=0,{};ye.push(ll(a,qt));var hn=Tt?il(a,qt):We(oe);io(a,qt,hn,Kl(a,qt)),!Tt&&a.cm&&a.cm.scrollIntoView({from:qt.from,to:pa(qt)});var Cn=[];va(a,function(fn,En){!En&&lt(Cn,fn.history)==-1&&(ls(fn.history,qt),Cn.push(fn.history)),io(fn,qt,null,Kl(fn,qt))})},Ue=ee.changes.length-1;Ue>=0;--Ue){var yt=Je(Ue);if(yt)return yt.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Ii(Ct(a.sel.ranges,function(E){return new Fr(Ie(E.anchor.line+y,E.anchor.ch),Ie(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Si(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)da(a.cm,b,"gutter")}}function io(a,y,x,b){if(a.cm&&!a.cm.curOp)return ii(a.cm,io)(a,y,x,b);if(y.to.line<a.first){is(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);is(a,E),y={from:Ie(a.first,0),to:Ie(y.to.line+E,y.to.ch),text:[We(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Ie(ee,nt(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Vt(a,y.from,y.to),x||(x=il(a,y)),a.cm?fu(a.cm,y,b):ol(a,y,b),Oo(a,x,Oe),a.cantEdit&&Io(a,Ie(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,oe=!1,se=ee.line;a.options.lineWrapping||(se=xe(cn(nt(b,ee.line))),b.iter(se,re.line+1,function(Ue){if(Ue==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&vt(a),ol(b,y,x,xl(a)),a.options.lineWrapping||(b.iter(se,ee.line+y.text.length,function(Ue){var yt=Lr(Ue);yt>E.maxLineLength&&(E.maxLine=Ue,E.maxLineLength=yt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),kr(b,ee.line),to(a,400);var ce=y.text.length-(re.line-ee.line)-1;y.full?Si(a):ee.line==re.line&&y.text.length==1&&!zl(a.doc,y)?da(a,ee.line,"text"):Si(a,ee.line,re.line+1,ce);var ye=st(a,"changes"),Se=st(a,"change");if(Se||ye){var Je={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};Se&&Wr(a,"change",a,Je),ye&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Je)}a.display.selForContextMenu=null}function _a(a,y,x,b,E){var ee;b||(b=x),ft(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Na(a,{from:x,to:b,text:y,origin:E})}function as(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function os(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],re=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var oe=0;oe<ee.ranges.length;oe++)as(ee.ranges[oe].anchor,y,x,b),as(ee.ranges[oe].head,y,x,b);continue}for(var se=0;se<ee.changes.length;++se){var ce=ee.changes[se];if(x<ce.from.line)ce.from=Ie(ce.from.line+b,ce.from.ch),ce.to=Ie(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;os(a.done,x,b,E),os(a.undone,x,b,E)}function ao(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=nt(a,Ut(a,y)):E=xe(y),E==null?null:(b(ee,E)&&a.cm&&da(a.cm,E,x),ee)}function oo(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Ur(E),Wr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function lo(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}lo.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ee=Math.min(y,E-a),re=b.height;if(b.removeInner(a,ee),this.height-=re-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var oe=[];this.collapse(oe),this.children=[new oo(oe)],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,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,oe=re;oe<E.lines.length;){var se=new oo(E.lines.slice(oe,oe+=25));E.height-=se.height,this.children.splice(++b,0,se),se.parent=this}E.lines=E.lines.slice(0,re),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),x=new lo(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=lt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new lo(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<ee){var re=Math.min(y,ee-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=ee}}};var so=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};so.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=xe(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ee=gi(this);Vn(x,Math.max(0,x.height-ee)),a&&(Mi(a,function(){ss(a,x,-ee),da(a,b,"widget")}),Wr(a,"lineWidgetCleared",a,this,b))}},so.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(on(this.doc,b)||Vn(b,b.height+E),x&&Mi(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wr(x,"lineWidgetChanged",x,a,xe(b))}))},pt(so);function ss(a,y,x){er(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qo(a,x)}function pu(a,y,x,b){var E=new so(a,x,b),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),ao(a,y,"widget",function(re){var oe=re.widgets||(re.widgets=[]);if(E.insertAt==null?oe.push(E):oe.splice(Math.min(oe.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,ee&&!on(a,re)){var se=er(re)<a.scrollTop;Vn(re,re.height+gi(E)),se&&qo(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Wr(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:xe(y)),E}var us=0,ma=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};ma.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&ka(a),st(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var re=this.lines[ee],oe=xr(re.markedSpans,this);a&&!this.collapsed?da(a,xe(re),"text"):a&&(oe.to!=null&&(E=xe(re)),oe.from!=null&&(b=xe(re))),re.markedSpans=Br(re.markedSpans,oe),oe.from==null&&this.collapsed&&!on(this.doc,re)&&a&&Vn(re,Li(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var ce=cn(this.lines[se]),ye=Lr(ce);ye>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=ye,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Si(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&ql(a.doc)),a&&Wr(a,"markerCleared",a,this,b,E),y&&Da(a),this.parent&&this.parent.clear()}},ma.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],re=xr(ee.markedSpans,this);if(re.from!=null&&(x=Ie(y?ee:xe(ee),re.from),a==-1))return x;if(re.to!=null&&(b=Ie(y?ee:xe(ee),re.to),a==1))return b}return x&&{from:x,to:b}},ma.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Mi(b,function(){var E=y.line,ee=xe(y.line),re=qi(b,ee);if(re&&(Ua(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!on(x.doc,E)&&x.height!=null){var oe=x.height;x.height=null;var se=gi(x)-oe;se&&Vn(E,E.height+se)}Wr(b,"markerChanged",b,a)})},ma.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||lt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ma.prototype.detachLine=function(a){if(this.lines.splice(lt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},pt(ma);function Ha(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return ii(a.cm,Ha)(a,y,x,b,E);var ee=new ma(a,E),re=ft(y,x);if(b&&Rt(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=ht("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(wn(a,y.line,y,x,ee)||y.line!=x.line&&wn(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");dr()}ee.addToHistory&&jl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var oe=y.line,se=a.cm,ce;if(a.iter(oe,x.line+1,function(Se){se&&ee.collapsed&&!se.options.lineWrapping&&cn(Se)==se.display.maxLine&&(ce=!0),ee.collapsed&&oe!=y.line&&Vn(Se,0),fr(Se,new br(ee,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),ee.collapsed&&a.iter(y.line,x.line+1,function(Se){on(a,Se)&&Vn(Se,0)}),ee.clearOnEnter&&_t(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Dr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++us,ee.atomic=!0),se){if(ce&&(se.curOp.updateMaxLine=!0),ee.collapsed)Si(se,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var ye=y.line;ye<=x.line;ye++)da(se,ye,"text");ee.atomic&&ql(se.doc),Wr(se,"markerAdded",se,ee)}return ee}var uo=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};uo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Wr(this,"clear")}},uo.prototype.find=function(a,y){return this.primary.find(a,y)},pt(uo);function vu(a,y,x,b,E){b=Rt(b),b.shared=!1;var ee=[Ha(a,y,x,b,E)],re=ee[0],oe=b.widgetNode;return va(a,function(se){oe&&(b.widgetNode=oe.cloneNode(!0)),ee.push(Ha(se,Fe(se,y),Fe(se,x),b,E));for(var ce=0;ce<se.linked.length;++ce)if(se.linked[ce].isParent)return;re=We(ee)}),new uo(ee,re)}function cs(a){return a.findMarks(Ie(a.first,0),a.clipPos(Ie(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ee=a.clipPos(E.from),re=a.clipPos(E.to);if(ft(ee,re)){var oe=Ha(a,ee,re,b.primary,b.primary.type);b.markers.push(oe),oe.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];va(E.primary.doc,function(se){return ee.push(se)});for(var re=0;re<E.markers.length;re++){var oe=E.markers[re];lt(ee,oe.doc)==-1&&(oe.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Ei=function(a,y,x,b,E){if(!(this instanceof Ei))return new Ei(a,y,x,b,E);x==null&&(x=0),lo.call(this,[new oo([new vr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=Ie(x,0);this.sel=fa(ee),this.history=new Mo(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),ol(this,{from:ee,to:ee,text:a}),pi(this,fa(ee),Oe)};Ei.prototype=te(lo.prototype,{constructor:Ei,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=vn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=Ie(this.first,0),x=this.first+this.size-1;Na(this,{from:y,to:Ie(x,nt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qa(this.cm,0,0),pi(this,fa(y),Oe)}),replaceRange:function(a,y,x,b){y=Fe(this,y),x=x?Fe(this,x):y,_a(this,a,y,x,b)},getRange:function(a,y,x){var b=Vt(this,Fe(this,a),Fe(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(Et(this,a))return nt(this,a)},getLineNumber:function(a){return xe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=nt(this,a)),cn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Fe(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ai(function(a,y,x){Xl(this,Fe(this,typeof a=="number"?Ie(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xl(this,Fe(this,a),Fe(this,y||a),x)}),extendSelection:ai(function(a,y,x){Po(this,Fe(this,a),y&&Fe(this,y),x)}),extendSelections:ai(function(a,y){Yl(this,Ft(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Ct(this.sel.ranges,a);Yl(this,Ft(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Fr(Fe(this,a[E].anchor),Fe(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),pi(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Fr(Fe(this,a),Fe(this,y||a))),pi(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Vt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Vt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ai(function(a,y,x){for(var b=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var re=E.ranges[ee];b[ee]={from:re.from(),to:re.to(),text:this.splitLines(a[ee]),origin:x}}for(var oe=y&&y!="end"&&au(this,b,y),se=b.length-1;se>=0;se--)Na(this,b[se]);oe?Jl(this,oe):this.cm&&Pa(this.cm)}),undo:ai(function(){Ro(this,"undo")}),redo:ai(function(){Ro(this,"redo")}),undoSelection:ai(function(){Ro(this,"undo",!0)}),redoSelection:ai(function(){Ro(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Mo(this.history.maxGeneration),va(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:Ia(this.history.done),undone:Ia(this.history.undone)}},setHistory:function(a){var y=this.history=new Mo(this.history.maxGeneration);y.done=Ia(a.done.slice(0),null,!0),y.undone=Ia(a.undone.slice(0),null,!0)},setGutterMarker:ai(function(a,y,x){return ao(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ne(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ai(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&ao(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Et(this,a)||(y=a,a=nt(this,a),!a))return null}else if(y=xe(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:ai(function(a,y,x){return ao(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!b[E])b[E]=x;else{if(je(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return ao(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",ee=b[E];if(ee)if(x==null)b[E]=null;else{var re=ee.match(je(x));if(!re)return!1;var oe=re.index+re[0].length;b[E]=ee.slice(0,re.index)+(!re.index||oe==ee.length?"":" ")+ee.slice(oe)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ha(this,Fe(this,a),Fe(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Fe(this,a),Ha(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Fe(this,a);var y=[],x=nt(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(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,x){a=Fe(this,a),y=Fe(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var re=ee.markedSpans;if(re)for(var oe=0;oe<re.length;oe++){var se=re[oe];!(se.to!=null&&E==a.line&&a.ch>=se.to||se.from==null&&E!=a.line||se.from!=null&&E==y.line&&se.from>=y.ch)&&(!x||x(se.marker))&&b.push(se.marker.parent||se.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),Fe(this,Ie(x,y))},indexFromPos:function(a){a=Fe(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Ei(vn(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,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Ei(vn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cs(this)),b},unlinkDoc:function(a){if(a instanceof zr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cs(this));break}}if(a.history==this.history){var b=[a.id];va(a,function(E){return b.push(E.id)},!0),a.history=new Mo(null),a.history.done=Ia(this.history.done,b),a.history.undone=Ia(this.history.undone,b)}},iterLinkedDocs:function(a){va(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):In(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ai(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&ou(this.cm))})}),Ei.prototype.eachLine=Ei.prototype.iter;var ds=0;function bu(a){var y=this;if(hs(y),!(Ee(y,a)||si(y.display,a))){wt(a),me&&(ds=+new Date);var x=xa(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,ee=Array(E),re=0,oe=function(){++re==E&&ii(y,function(){x=Fe(y.doc,x);var Ue={from:x,to:x,text:y.doc.splitLines(ee.filter(function(yt){return yt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Na(y.doc,Ue),Jl(y.doc,fa(Fe(y.doc,x),Fe(y.doc,pa(Ue))))})()},se=function(Ue,yt){if(y.options.allowDropFileTypes&&lt(y.options.allowDropFileTypes,Ue.type)==-1){oe();return}var Tt=new FileReader;Tt.onerror=function(){return oe()},Tt.onload=function(){var qt=Tt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(qt)){oe();return}ee[yt]=qt,oe()},Tt.readAsText(Ue)},ce=0;ce<b.length;ce++)se(b[ce],ce);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var ye=a.dataTransfer.getData("Text");if(ye){var Se;if(y.state.draggingText&&!y.state.draggingText.copy&&(Se=y.listSelections()),Oo(y.doc,fa(x,x)),Se)for(var Je=0;Je<Se.length;++Je)_a(y.doc,"",Se[Je].anchor,Se[Je].head,"drag");y.replaceSelection(ye,"around","paste"),y.display.input.focus()}}catch(Ue){}}}}function Cu(a,y){if(me&&(!a.state.draggingText||+new Date-ds<100)){Gt(y);return}if(!(Ee(a,y)||si(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ye)){var x=Ne("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",he&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),he&&x.parentNode.removeChild(x)}}function xu(a,y){var x=xa(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ne("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ve(a.display.dragCursor,b)}}function hs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var ee=0;ee<x.length;ee++)a(x[ee])})}}var ps=!1;function wu(){ps||(Su(),ps=!0)}function Su(){var a;_t(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(Eu)},100))}),_t(window,"blur",function(){return fs(Ta)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var ga={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"},co=0;co<10;co++)ga[co+48]=ga[co+96]=String(co);for(var No=65;No<=90;No++)ga[No]=String.fromCharCode(No);for(var ho=1;ho<=12;ho++)ga[ho+111]=ga[ho+63235]="F"+ho;var ia={};ia.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"},ia.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"},ia.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"},ia.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"]},ia.default=ke?ia.macDefault:ia.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,re=0;re<y.length-1;re++){var oe=y[re];if(/^(cmd|meta|m)$/i.test(oe))ee=!0;else if(/^a(lt)?$/i.test(oe))x=!0;else if(/^(c|ctrl|control)$/i.test(oe))b=!0;else if(/^s(hift)?$/i.test(oe))E=!0;else throw new Error("Unrecognized modifier name: "+oe)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=Ct(x.split(" "),ku),ee=0;ee<E.length;ee++){var re=void 0,oe=void 0;ee==E.length-1?(oe=E.join(" "),re=b):(oe=E.slice(0,ee+1).join(" "),re="...");var se=y[oe];if(!se)y[oe]=re;else if(se!=re)throw new Error("Inconsistent bindings for "+oe)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wa(a,y,x,b){y=_o(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return Wa(a,y.fallthrough,x,b);for(var ee=0;ee<y.fallthrough.length;ee++){var re=Wa(a,y.fallthrough[ee],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:ga[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(Re?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(Re?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(he&&a.keyCode==34&&a.char)return!1;var x=ga[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function _o(a){return typeof a=="string"?ia[a]:a}function za(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&ft(ee.from,We(b).to)<=0;){var re=b.pop();if(ft(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}Mi(a,function(){for(var oe=b.length-1;oe>=0;oe--)_a(a.doc,"",b[oe].from,b[oe].to,"+delete");Pa(a)})}function cl(a,y,x){var b=It(a.text,y+x,x);return b<0||b>a.text.length?null:b}function dl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new Ie(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=dn(x,y.doc.direction);if(ee){var re=E<0?We(ee):ee[0],oe=E<0==(re.level==1),se=oe?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var ye=ua(y,x);ce=E<0?x.text.length-1:0;var Se=Hi(y,ye,ce).top;ce=Dt(function(Je){return Hi(y,ye,Je).top==Se},E<0==(re.level==1)?re.from:re.to-1,ce),se=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new Ie(b,ce,se)}}return new Ie(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=dn(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=tn(E,x.ch,x.sticky),re=E[ee];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return dl(y,x,b);var oe=function(hn,Cn){return cl(y,hn instanceof Ie?hn.ch:hn,Cn)},se,ce=function(hn){return a.options.lineWrapping?(se=se||ua(a,y),Yr(a,y,se,hn)):{begin:0,end:y.text.length}},ye=ce(x.sticky=="before"?oe(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var Se=re.level==1==b<0,Je=oe(x,Se?1:-1);if(Je!=null&&(Se?Je<=re.to&&Je<=ye.end:Je>=re.from&&Je>=ye.begin)){var Ue=Se?"before":"after";return new Ie(x.line,Je,Ue)}}var yt=function(hn,Cn,fn){for(var En=function(Hr,oi){return oi?new Ie(x.line,oe(Hr,1),"before"):new Ie(x.line,Hr,"after")};hn>=0&&hn<E.length;hn+=Cn){var Un=E[hn],On=Cn>0==(Un.level!=1),lr=On?fn.begin:oe(fn.end,-1);if(Un.from<=lr&&lr<Un.to||(lr=On?Un.from:oe(Un.to,-1),fn.begin<=lr&&lr<fn.end))return En(lr,On)}},Tt=yt(ee+b,b,ye);if(Tt)return Tt;var qt=b>0?ye.end:oe(ye.begin,-1);return qt!=null&&!(b>0&&qt==y.text.length)&&(Tt=yt(b>0?0:E.length-1,b,ce(qt)),Tt)?Tt:null}var fo={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Oe)},killLine:function(a){return za(a,function(y){if(y.empty()){var x=nt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Ie(y.head.line+1,0)}:{from:y.head,to:Ie(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return za(a,function(y){return{from:Ie(y.from().line,0),to:Fe(a.doc,Ie(y.to().line+1,0))}})},delLineLeft:function(a){return za(a,function(y){return{from:Ie(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return za(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return za(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},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(Ie(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Ie(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ys(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bs(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Au(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},ot)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},ot)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bs(a,y.head):b},ot)},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=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var ee=x[E].from(),re=ve(a.getLine(ee.line),ee.ch,b);y.push(Zt(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Mi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=nt(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Ie(E.line,E.ch-1)),E.ch>0)E=new Ie(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Ie(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=nt(a.doc,E.line-1).text;re&&(E=new Ie(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ie(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Fr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Mi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);Pa(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=nt(a.doc,y),b=cn(x);return b!=x&&(y=xe(b)),hl(!0,a,b,y,1)}function Au(a,y){var x=nt(a.doc,y),b=Wn(x);return b!=x&&(y=xe(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=nt(a.doc,x.line),E=dn(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=ee&&y.ch;return Ie(x.line,re?0:ee,x.sticky)}return x}function Ho(a,y,x){if(typeof y=="string"&&(y=fo[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=xt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Fu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wa(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wa(y,a.options.extraKeys,x,a)||Wa(y,a.options.keyMap,x,a)}var Lu=new de;function po(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Lu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),Cs(a,E+" "+y,x,b))return!0}return Cs(a,y,x,b)}function Cs(a,y,x,b){var E=Fu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(wt(x),Xo(a)),!!E}function xs(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?po(a,"Shift-"+x,y,function(b){return Ho(a,b,!0)})||po(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ho(a,b)}):po(a,x,y,function(b){return Ho(a,b)}):!1}function Mu(a,y,x){return po(a,"'"+x+"'",y,function(b){return Ho(a,b,!0)})}var fl=null;function ws(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=we(),!Ee(y,a))){me&&ge<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=xs(y,a);he&&(fl=b?x:null,!b&&x==88&&!gn&&(ke?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),le&&!ke&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Tu(y)}}function Tu(a){var y=a.display.lineDiv;Ge(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(ze(y,"CodeMirror-crosshair"),Pe(document,"keyup",x),Pe(document,"mouseover",x))}_t(document,"keyup",x),_t(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),Ee(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(si(y.display,a)||Ee(y,a)||a.ctrlKey&&!a.altKey||ke&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(he&&x==fl){fl=null,wt(a);return}if(!(he&&(!a.which||a.which<10)&&xs(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Mu(y,a,E)||y.display.input.onKeyPress(a))}}}var Pu=400,pl=function(a,y,x){this.time=a,this.pos=y,this.button=x};pl.prototype.compare=function(a,y,x){return this.time+Pu>a&&ft(y,this.pos)==0&&x==this.button};var vo,mo;function Ou(a,y){var x=+new Date;return mo&&mo.compare(x,a,y)?(vo=mo=null,"triple"):vo&&vo.compare(x,a,y)?(mo=new pl(x,a,y),vo=null,"double"):(vo=new pl(x,a,y),mo=null,"single")}function ks(a){var y=this,x=y.display;if(!(Ee(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,si(x,a)){He||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=xa(y,a),E=bn(a),ee=b?Ou(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,ee,a))&&(E==1?b?Nu(y,b,ee,a):Dn(a)==x.scroller&&wt(a):E==2?(b&&Po(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(_e?y.display.input.onContextMenu(a):Dl(y)))}}}function Iu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,po(a,ms(ee,E),E,function(re){if(typeof re=="string"&&(re=fo[re]),!re)return!1;var oe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),oe=re(a,x)!=xt}finally{a.state.suppressEdits=!1}return oe})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=et?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=ke?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(ke?x.altKey:x.ctrlKey)),E}function Nu(a,y,x,b){me?setTimeout(Xt(kl,a),0):a.curOp.focus=we();var E=Ru(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&Ln&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(ft((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(ft(re.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Hu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,ee=!1,re=ii(a,function(ce){He&&(E.scroller.draggable=!1),a.state.draggingText=!1,Pe(E.wrapper.ownerDocument,"mouseup",re),Pe(E.wrapper.ownerDocument,"mousemove",oe),Pe(E.scroller,"dragstart",se),Pe(E.scroller,"drop",re),ee||(wt(ce),b.addNew||Po(a.doc,x,null,null,b.extend),He&&!Ye||me&&ge==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(ce){ee=ee||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},se=function(){return ee=!0};He&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),_t(E.wrapper.ownerDocument,"mouseup",re),_t(E.wrapper.ownerDocument,"mousemove",oe),_t(E.scroller,"dragstart",se),_t(E.scroller,"drop",re),Dl(a),setTimeout(function(){return E.input.focus()},20)}function Ds(a,y,x){if(x=="char")return new Fr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Fr(Ie(y.line,0),Fe(a.doc,Ie(y.line+1,0)));var b=x(a,y);return new Fr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;wt(y);var re,oe,se=ee.sel,ce=se.ranges;if(b.addNew&&!b.extend?(oe=ee.sel.contains(x),oe>-1?re=ce[oe]:re=new Fr(x,x)):(re=ee.sel.primary(),oe=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Fr(x,x)),x=xa(a,y,!0,!0),oe=-1;else{var ye=Ds(a,x,b.unit);b.extend?re=sl(re,ye.anchor,ye.head,b.extend):re=ye}b.addNew?oe==-1?(oe=ce.length,pi(ee,Ki(a,ce.concat([re]),oe),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[oe].empty()&&b.unit=="char"&&!b.extend?(pi(ee,Ki(a,ce.slice(0,oe).concat(ce.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),se=ee.sel):ul(ee,oe,re,at):(oe=0,pi(ee,new Ii([re],0),at),se=ee.sel);var Se=x;function Je(fn){if(ft(Se,fn)!=0)if(Se=fn,b.unit=="rectangle"){for(var En=[],Un=a.options.tabSize,On=ve(nt(ee,x.line).text,x.ch,Un),lr=ve(nt(ee,fn.line).text,fn.ch,Un),Hr=Math.min(On,lr),oi=Math.max(On,lr),Vr=Math.min(x.line,fn.line),Ti=Math.min(a.lastLine(),Math.max(x.line,fn.line));Vr<=Ti;Vr++){var ki=nt(ee,Vr).text,ei=en(ki,Hr,Un);Hr==oi?En.push(new Fr(Ie(Vr,ei),Ie(Vr,ei))):ki.length>ei&&En.push(new Fr(Ie(Vr,ei),Ie(Vr,en(ki,oi,Un))))}En.length||En.push(new Fr(x,x)),pi(ee,Ki(a,se.ranges.slice(0,oe).concat(En),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(fn)}else{var Di=re,ci=Ds(a,fn,b.unit),ri=Di.anchor,ti;ft(ci.anchor,ri)>0?(ti=ci.head,ri=Lt(Di.from(),ci.anchor)):(ti=ci.anchor,ri=pn(Di.to(),ci.head));var jr=se.ranges.slice(0);jr[oe]=Wu(a,new Fr(Fe(ee,ri),ti)),pi(ee,Ki(a,jr,oe),at)}}var Ue=E.wrapper.getBoundingClientRect(),yt=0;function Tt(fn){var En=++yt,Un=xa(a,fn,!0,b.unit=="rectangle");if(Un)if(ft(Un,Se)!=0){a.curOp.focus=we(),Je(Un);var On=Bo(E,ee);(Un.line>=On.to||Un.line<On.from)&&setTimeout(ii(a,function(){yt==En&&Tt(fn)}),150)}else{var lr=fn.clientY<Ue.top?-20:fn.clientY>Ue.bottom?20:0;lr&&setTimeout(ii(a,function(){yt==En&&(E.scroller.scrollTop+=lr,Tt(fn))}),50)}}function qt(fn){a.state.selectingText=!1,yt=1/0,fn&&(wt(fn),E.input.focus()),Pe(E.wrapper.ownerDocument,"mousemove",hn),Pe(E.wrapper.ownerDocument,"mouseup",Cn),ee.history.lastSelOrigin=null}var hn=ii(a,function(fn){fn.buttons===0||!bn(fn)?qt(fn):Tt(fn)}),Cn=ii(a,qt);a.state.selectingText=Cn,_t(E.wrapper.ownerDocument,"mousemove",hn),_t(E.wrapper.ownerDocument,"mouseup",Cn)}function Wu(a,y){var x=y.anchor,b=y.head,E=nt(a.doc,x.line);if(ft(x,b)==0&&x.sticky==b.sticky)return y;var ee=dn(E);if(!ee)return y;var re=tn(ee,x.ch,x.sticky),oe=ee[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var se=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(se==0||se==ee.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var ye=tn(ee,b.ch,b.sticky),Se=ye-re||(b.ch-x.ch)*(oe.level==1?-1:1);ye==se-1||ye==se?ce=Se<0:ce=Se>0}var Je=ee[se+(ce?-1:0)],Ue=ce==(Je.level==1),yt=Ue?Je.from:Je.to,Tt=Ue?"after":"before";return x.ch==yt&&x.sticky==Tt?y:new Fr(new Ie(x.line,yt,Tt),b)}function Bs(a,y,x,b){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(Je){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&wt(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(ee>oe.bottom||!st(a,x))return Bt(y);ee-=oe.top-re.viewOffset;for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=re.gutters.childNodes[se];if(ce&&ce.getBoundingClientRect().right>=E){var ye=De(a.doc,ee),Se=a.display.gutterSpecs[se];return qe(a,x,a,ye,Se.className,y),Bt(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function As(a,y){si(a.display,y)||zu(a,y)||Ee(a,y,"contextmenu")||_e||a.display.input.onContextMenu(y)}function zu(a,y){return st(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Fs(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ca(a)}var Za={toString:function(){return"CodeMirror.Init"}},Ls={},Wo={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(oe,se,ce){ce!=Za&&ee(oe,se,ce)}:ee)}a.defineOption=x,a.Init=Za,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,al(b)},!0),x("indentUnit",2,al,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ro(b),Ca(b),Si(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],re=b.doc.first;b.doc.iter(function(se){for(var ce=0;;){var ye=se.text.indexOf(E,ce);if(ye==-1)break;ce=ye+E.length,ee.push(Ie(re,ye))}re++});for(var oe=ee.length-1;oe>=0;oe--)_a(b.doc,E,ee[oe],Ie(ee[oe].line,ee[oe].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Za&&b.refresh()}),x("specialCharPlaceholder",zi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Me?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!tt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Fs(b),no(b)},!0),x("keyMap","default",function(b,E,ee){var re=_o(E),oe=ee!=Za&&_o(ee);oe&&oe.detach&&oe.detach(b,re),re.attach&&re.attach(b,oe||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Vu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rl(E,b.options.lineNumbers),no(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ko(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Oa(b)},!0),x("scrollbarStyle","native",function(b){Tl(b),Oa(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rl(b.options.gutters,E),no(b)},!0),x("firstLineNumber",1,no,!0),x("lineNumberFormatter",function(b){return b},no,!0),x("showCursorWhenSelecting",!1,Ja,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Ta(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Ja,!0),x("singleCursorHeightPerLine",!0,Ja,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ro,!0),x("addModeClass",!1,ro,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ro,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Za;if(!y!=!b){var E=a.display.dragFunctions,ee=y?_t:Pe;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 Vu(a){a.options.lineWrapping?(Ge(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ze(a.display.wrapper,"CodeMirror-wrap"),rr(a)),Yo(a),Si(a),Ca(a),setTimeout(function(){return Oa(a)},100)}function zr(a,y){var x=this;if(!(this instanceof zr))return new zr(a,y);this.options=y=y?Rt(y):{},Rt(Ls,y,!1);var b=y.value;typeof b=="string"?b=new Ei(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new zr.inputStyles[y.inputStyle](this),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Fs(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tl(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 de,keySeq:null,specialChars:null},y.autofocus&&!Me&&ee.input.focus(),me&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),ju(this),wu(),ka(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Me||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Jo(x)},20):Ta(this);for(var re in Wo)Wo.hasOwnProperty(re)&&Wo[re](this,y[re],Za);Il(this),y.finishInit&&y.finishInit(this);for(var oe=0;oe<ml.length;++oe)ml[oe](this);Da(this),He&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}zr.defaults=Ls,zr.optionHandlers=Wo;function ju(a){var y=a.display;_t(y.scroller,"mousedown",ii(a,ks)),me&&ge<11?_t(y.scroller,"dblclick",ii(a,function(se){if(!Ee(a,se)){var ce=xa(a,se);if(!(!ce||vl(a,se)||si(a.display,se))){wt(se);var ye=a.findWordAt(ce);Po(a.doc,ye.anchor,ye.head)}}})):_t(y.scroller,"dblclick",function(se){return Ee(a,se)||wt(se)}),_t(y.scroller,"contextmenu",function(se){return As(a,se)}),_t(y.input.getField(),"contextmenu",function(se){y.scroller.contains(se.target)||As(a,se)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ee(se){if(se.touches.length!=1)return!1;var ce=se.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(se,ce){if(ce.left==null)return!0;var ye=ce.left-se.left,Se=ce.top-se.top;return ye*ye+Se*Se>20*20}_t(y.scroller,"touchstart",function(se){if(!Ee(a,se)&&!ee(se)&&!vl(a,se)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},se.touches.length==1&&(y.activeTouch.left=se.touches[0].pageX,y.activeTouch.top=se.touches[0].pageY)}}),_t(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),_t(y.scroller,"touchend",function(se){var ce=y.activeTouch;if(ce&&!si(y,se)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var ye=a.coordsChar(y.activeTouch,"page"),Se;!ce.prev||re(ce,ce.prev)?Se=new Fr(ye,ye):!ce.prev.prev||re(ce,ce.prev.prev)?Se=a.findWordAt(ye):Se=new Fr(Ie(ye.line,0),Fe(a.doc,Ie(ye.line+1,0))),a.setSelection(Se.anchor,Se.head),a.focus(),wt(se)}E()}),_t(y.scroller,"touchcancel",E),_t(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qa(a,y.scroller.scrollTop),Sa(a,y.scroller.scrollLeft,!0),qe(a,"scroll",a))}),_t(y.scroller,"mousewheel",function(se){return _l(a,se)}),_t(y.scroller,"DOMMouseScroll",function(se){return _l(a,se)}),_t(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(se){Ee(a,se)||Gt(se)},over:function(se){Ee(a,se)||(xu(a,se),Gt(se))},start:function(se){return Cu(a,se)},drop:ii(a,bu),leave:function(se){Ee(a,se)||hs(a)}};var oe=y.input.getField();_t(oe,"keyup",function(se){return Ss.call(a,se)}),_t(oe,"keydown",ii(a,ws)),_t(oe,"keypress",ii(a,Es)),_t(oe,"focus",function(se){return Jo(a,se)}),_t(oe,"blur",function(se){return Ta(a,se)})}var ml=[];zr.defineInitHook=function(a){return ml.push(a)};function go(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=ar(a,y).state:x="prev");var re=a.options.tabSize,oe=nt(E,y),se=ve(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var ce=oe.text.match(/^\s*/)[0],ye;if(!b&&!/\S/.test(oe.text))ye=0,x="not";else if(x=="smart"&&(ye=E.mode.indent(ee,oe.text.slice(ce.length),oe.text),ye==xt||ye>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?ye=ve(nt(E,y-1).text,null,re):ye=0:x=="add"?ye=se+a.options.indentUnit:x=="subtract"?ye=se-a.options.indentUnit:typeof x=="number"&&(ye=se+x),ye=Math.max(0,ye);var Se="",Je=0;if(a.options.indentWithTabs)for(var Ue=Math.floor(ye/re);Ue;--Ue)Je+=re,Se+=" ";if(Je<ye&&(Se+=Zt(ye-Je)),Se!=ce)return _a(E,Se,Ie(y,0),Ie(y,ce.length),"+input"),oe.stateAfter=null,!0;for(var yt=0;yt<E.sel.ranges.length;yt++){var Tt=E.sel.ranges[yt];if(Tt.head.line==y&&Tt.head.ch<ce.length){var qt=Ie(y,ce.length);ul(E,yt,new Fr(qt,qt));break}}}var Yi=null;function zo(a){Yi=a}function gl(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var re=+new Date-200,oe=E=="paste"||a.state.pasteIncoming>re,se=In(y),ce=null;if(oe&&b.ranges.length>1)if(Yi&&Yi.text.join(`
`)==y){if(b.ranges.length%Yi.text.length==0){ce=[];for(var ye=0;ye<Yi.text.length;ye++)ce.push(ee.splitLines(Yi.text[ye]))}}else se.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=Ct(se,function(hn){return[hn]}));for(var Se=a.curOp.updateInput,Je=b.ranges.length-1;Je>=0;Je--){var Ue=b.ranges[Je],yt=Ue.from(),Tt=Ue.to();Ue.empty()&&(x&&x>0?yt=Ie(yt.line,yt.ch-x):a.state.overwrite&&!oe?Tt=Ie(Tt.line,Math.min(nt(ee,Tt.line).text.length,Tt.ch+We(se).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==se.join(`
`)&&(yt=Tt=Ie(yt.line,0)));var qt={from:yt,to:Tt,text:ce?ce[Je%ce.length]:se,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Na(a.doc,qt),Wr(a,"inputRead",a,qt)}y&&!oe&&Ts(a,y),Pa(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Se),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ms(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Mi(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ts(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),re=!1;if(ee.electricChars){for(var oe=0;oe<ee.electricChars.length;oe++)if(y.indexOf(ee.electricChars.charAt(oe))>-1){re=go(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(nt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=go(a,E.head.line,"smart"));re&&Wr(a,"electricInput",a,E.head.line)}}}function Ps(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:Ie(E,0),head:Ie(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function Os(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Is(){var a=Ne("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ne("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return He?a.style.width="1000px":a.setAttribute("wrap","off"),Te&&(a.style.border="1px solid black"),Os(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ee=this.options,re=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&ii(this,y[b])(this,E,re),qe(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](_o(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:yi(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");St(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Si(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var re=E[ee].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(ee,1),this.state.modeGen++,Si(this);return}}}),indentLine:yi(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Et(this.doc,b)&&go(this,b,E,ee)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,ee=-1,re=0;re<E.length;re++){var oe=E[re];if(oe.empty())oe.head.line>ee&&(go(this,oe.head.line,b,!0),ee=oe.head.line,re==this.doc.sel.primIndex&&Pa(this));else{var se=oe.from(),ce=oe.to(),ye=Math.max(ee,se.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var Se=ye;Se<ee;++Se)go(this,Se,b);var Je=this.doc.sel.ranges;se.ch==0&&E.length==Je.length&&Je[re].from().ch>0&&ul(this.doc,re,new Fr(se,Je[re].to()),Oe)}}}),getTokenAt:function(b,E){return gr(this,b,E)},getLineTokens:function(b,E){return gr(this,Ie(b),E,!0)},getTokenTypeAt:function(b){b=Fe(this.doc,b);var E=Tn(this,nt(this.doc,b.line)),ee=0,re=(E.length-1)/2,oe=b.ch,se;if(oe==0)se=E[2];else for(;;){var ce=ee+re>>1;if((ce?E[ce*2-1]:0)>=oe)re=ce;else if(E[ce*2+1]<oe)ee=ce+1;else{se=E[ce*2+2];break}}var ye=se?se.indexOf("overlay "):-1;return ye<0?se:ye==0?null:se.slice(0,ye-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var ee=[];if(!x.hasOwnProperty(E))return ee;var re=x[E],oe=this.getModeAt(b);if(typeof oe[E]=="string")re[oe[E]]&&ee.push(re[oe[E]]);else if(oe[E])for(var se=0;se<oe[E].length;se++){var ce=re[oe[E][se]];ce&&ee.push(ce)}else oe.helperType&&re[oe.helperType]?ee.push(re[oe.helperType]):re[oe.name]&&ee.push(re[oe.name]);for(var ye=0;ye<re._global.length;ye++){var Se=re._global[ye];Se.pred(oe,this)&&lt(ee,Se.val)==-1&&ee.push(Se.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=Ut(ee,b==null?ee.first+ee.size-1:b),ar(this,b+1,E).state},cursorCoords:function(b,E){var ee,re=this.doc.sel.primary();return b==null?ee=re.head:typeof b=="object"?ee=Fe(this.doc,b):ee=b?re.from():re.to(),wi(this,ee,E||"page")},charCoords:function(b,E){return Ma(this,Fe(this.doc,b),E||"page")},coordsChar:function(b,E){return b=So(this,b,E||"page"),ui(this,b.left,b.top)},lineAtHeight:function(b,E){return b=So(this,{top:b,left:0},E||"page").top,De(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var re=!1,oe;if(typeof b=="number"){var se=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>se&&(b=se,re=!0),oe=nt(this.doc,b)}else oe=b;return La(this,oe,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-er(oe):0)},defaultTextHeight:function(){return Li(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,re,oe){var se=this.display;b=wi(this,Fe(this.doc,b));var ce=b.bottom,ye=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),se.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var Se=Math.max(se.wrapper.clientHeight,this.doc.height),Je=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Se)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Se&&(ce=b.bottom),ye+E.offsetWidth>Je&&(ye=Je-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",oe=="right"?(ye=se.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?ye=0:oe=="middle"&&(ye=(se.sizer.clientWidth-E.offsetWidth)/2),E.style.left=ye+"px"),ee&&Gs(this,{left:ye,top:ce,right:ye+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:yi(ws),triggerOnKeyPress:yi(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:yi(ks),execCommand:function(b){if(fo.hasOwnProperty(b))return fo[b].call(null,this)},triggerElectric:yi(function(b){Ts(this,b)}),findPosH:function(b,E,ee,re){var oe=1;E<0&&(oe=-1,E=-E);for(var se=Fe(this.doc,b),ce=0;ce<E&&(se=yl(this.doc,se,oe,ee,re),!se.hitSide);++ce);return se},moveH:yi(function(b,E){var ee=this;this.extendSelectionsBy(function(re){return ee.display.shift||ee.doc.extend||re.empty()?yl(ee.doc,re.head,b,E,ee.options.rtlMoveVisually):b<0?re.from():re.to()},ot)}),deleteH:yi(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):za(this,function(oe){var se=yl(re,oe.head,b,E,!1);return b<0?{from:se,to:oe.head}:{from:oe.head,to:se}})}),findPosV:function(b,E,ee,re){var oe=1,se=re;E<0&&(oe=-1,E=-E);for(var ce=Fe(this.doc,b),ye=0;ye<E;++ye){var Se=wi(this,ce,"div");if(se==null?se=Se.left:Se.left=se,ce=Rs(this,Se,oe,ee),ce.hitSide)break}return ce},moveV:yi(function(b,E){var ee=this,re=this.doc,oe=[],se=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(ye){if(se)return b<0?ye.from():ye.to();var Se=wi(ee,ye.head,"div");ye.goalColumn!=null&&(Se.left=ye.goalColumn),oe.push(Se.left);var Je=Rs(ee,Se,b,E);return E=="page"&&ye==re.sel.primary()&&qo(ee,Ma(ee,Je,"div").top-Se.top),Je},ot),oe.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=oe[ce]}),findWordAt:function(b){var E=this.doc,ee=nt(E,b.line).text,re=b.ch,oe=b.ch;if(ee){var se=this.getHelper(b,"wordChars");(b.sticky=="before"||oe==ee.length)&&re?--re:++oe;for(var ce=ee.charAt(re),ye=ue(ce,se)?function(Se){return ue(Se,se)}:/\s/.test(ce)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!ue(Se)};re>0&&ye(ee.charAt(re-1));)--re;for(;oe<ee.length&&ye(ee.charAt(oe));)++oe}return new Fr(Ie(b.line,re),Ie(b.line,oe))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ge(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),qe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==we()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){Qa(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ai(this)-this.display.barHeight,width:b.scrollWidth-Ai(this)-this.display.barWidth,clientHeight:na(this),clientWidth:Qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Ie(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?Vs(this,b):Al(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var ee=this,re=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Ka(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(se){if(se.widgets){for(var ce=0;ce<se.widgets.length;ce++)if(se.widgets[ce].noHScroll){da(ee,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,qe(this,"refresh",this)}),operation:function(b){return Mi(this,b)},startOperation:function(){return ka(this)},endOperation:function(){return Da(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Si(this),this.curOp.forceUpdate=!0,Ca(this),Qa(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Li(this.display))>.5||this.options.lineWrapping)&&Yo(this),qe(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),Ca(this),this.display.input.reset(),Qa(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},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}},pt(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,re){a.registerHelper(b,E,re),x[b]._global.push({pred:ee,val:re})}}function yl(a,y,x,b,E){var ee=y,re=x,oe=nt(a,y.line),se=E&&a.direction=="rtl"?-x:x;function ce(){var Cn=y.line+se;return Cn<a.first||Cn>=a.first+a.size?!1:(y=new Ie(Cn,y.ch,y.sticky),oe=nt(a,Cn))}function ye(Cn){var fn;if(b=="codepoint"){var En=oe.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(En)?fn=null:fn=new Ie(y.line,Math.max(0,Math.min(oe.text.length,y.ch+x*(En>=55296&&En<56320?2:1))),-x)}else E?fn=Bu(a.cm,oe,y,x):fn=dl(oe,y,x);if(fn==null)if(!Cn&&ce())y=hl(E,a.cm,oe,y.line,se);else return!1;else y=fn;return!0}if(b=="char"||b=="codepoint")ye();else if(b=="column")ye(!0);else if(b=="word"||b=="group")for(var Se=null,Je=b=="group",Ue=a.cm&&a.cm.getHelper(y,"wordChars"),yt=!0;!(x<0&&!ye(!yt));yt=!1){var Tt=oe.text.charAt(y.ch)||`
`,qt=ue(Tt,Ue)?"w":Je&&Tt==`
`?"n":!Je||/\s/.test(Tt)?null:"p";if(Je&&!yt&&!qt&&(qt="s"),Se&&Se!=qt){x<0&&(x=1,ye(),y.sticky="after");break}if(qt&&(Se=qt),x>0&&!ye(!yt))break}var hn=Io(a,y,ee,re,!0);return zt(ee,hn)&&(hn.hitSide=!0),hn}function Rs(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(oe-.5*Li(a.display),3);re=(x>0?y.bottom:y.top)+x*se}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=ui(a,ee,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Ir=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ir.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Os(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(oe){for(var se=oe.target;se;se=se.parentNode){if(se==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}_t(E,"paste",function(oe){!ee(oe)||Ee(b,oe)||Ms(oe,b)||ge<=11&&setTimeout(ii(b,function(){return y.updateFromDOM()}),20)}),_t(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),_t(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),_t(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),_t(E,"touchstart",function(){return x.forceCompositionEnd()}),_t(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!ee(oe)||Ee(b,oe))){if(b.somethingSelected())zo({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var se=Ps(b);zo({lineWise:!0,text:se.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(se.ranges,0,Oe),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var ce=Yi.text.join(`
`);if(oe.clipboardData.setData("Text",ce),oe.clipboardData.getData("Text")==ce){oe.preventDefault();return}}var ye=Is(),Se=ye.firstChild;b.display.lineSpace.insertBefore(ye,b.display.lineSpace.firstChild),Se.value=Yi.text.join(`
`);var Je=document.activeElement;ut(Se),setTimeout(function(){b.display.lineSpace.removeChild(ye),Je.focus(),Je==E&&x.showPrimarySelection()},50)}}_t(E,"copy",re),_t(E,"cut",re)},Ir.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Ir.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Ir.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ir.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ee=Zo(y,a.anchorNode,a.anchorOffset),re=Zo(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&re&&!re.bad&&ft(Lt(ee,re),b)==0&&ft(pn(ee,re),E)==0)){var oe=y.display.view,se=b.line>=y.display.viewFrom&&Ns(y,b)||{node:oe[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Ns(y,E);if(!ce){var ye=oe[oe.length-1].measure,Se=ye.maps?ye.maps[ye.maps.length-1]:ye.map;ce={node:Se[Se.length-1],offset:Se[Se.length-2]-Se[Se.length-3]}}if(!se||!ce){a.removeAllRanges();return}var Je=a.rangeCount&&a.getRangeAt(0),Ue;try{Ue=Be(se.node,se.offset,ce.offset,ce.node)}catch(yt){}Ue&&(!le&&y.state.focused?(a.collapse(se.node,se.offset),Ue.collapsed||(a.removeAllRanges(),a.addRange(Ue))):(a.removeAllRanges(),a.addRange(Ue)),Je&&a.anchorNode==null?a.addRange(Je):le&&this.startGracePeriod()),this.rememberSelection()}},Ir.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)},Ir.prototype.showMultipleSelections=function(a){Ve(this.cm.display.cursorDiv,a.cursors),Ve(this.cm.display.selectionDiv,a.selection)},Ir.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Ir.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Xe(this.div,y)},Ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ir.prototype.blur=function(){this.div.blur()},Ir.prototype.getField=function(){return this.div},Ir.prototype.supportsTouch=function(){return!0},Ir.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Mi(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)},Ir.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Ir.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ae&&Ce&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Zo(y,a.anchorNode,a.anchorOffset),b=Zo(y,a.focusNode,a.focusOffset);x&&b&&Mi(y,function(){pi(y.doc,fa(x,b),Oe),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=Ie(b.line-1,nt(a.doc,b.line-1).length)),E.ch==nt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Ie(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,oe;b.line==y.viewFrom||(ee=wa(a,b.line))==0?(re=xe(y.view[0].line),oe=y.view[0].node):(re=xe(y.view[ee].line),oe=y.view[ee-1].node.nextSibling);var se=wa(a,E.line),ce,ye;if(se==y.view.length-1?(ce=y.viewTo-1,ye=y.lineDiv.lastChild):(ce=xe(y.view[se+1].line)-1,ye=y.view[se+1].node.previousSibling),!oe)return!1;for(var Se=a.doc.splitLines(Yu(a,oe,ye,re,ce)),Je=Vt(a.doc,Ie(re,0),Ie(ce,nt(a.doc,ce).text.length));Se.length>1&&Je.length>1;)if(We(Se)==We(Je))Se.pop(),Je.pop(),ce--;else if(Se[0]==Je[0])Se.shift(),Je.shift(),re++;else break;for(var Ue=0,yt=0,Tt=Se[0],qt=Je[0],hn=Math.min(Tt.length,qt.length);Ue<hn&&Tt.charCodeAt(Ue)==qt.charCodeAt(Ue);)++Ue;for(var Cn=We(Se),fn=We(Je),En=Math.min(Cn.length-(Se.length==1?Ue:0),fn.length-(Je.length==1?Ue:0));yt<En&&Cn.charCodeAt(Cn.length-yt-1)==fn.charCodeAt(fn.length-yt-1);)++yt;if(Se.length==1&&Je.length==1&&re==b.line)for(;Ue&&Ue>b.ch&&Cn.charCodeAt(Cn.length-yt-1)==fn.charCodeAt(fn.length-yt-1);)Ue--,yt++;Se[Se.length-1]=Cn.slice(0,Cn.length-yt).replace(/^\u200b+/,""),Se[0]=Se[0].slice(Ue).replace(/\u200b+$/,"");var Un=Ie(re,Ue),On=Ie(ce,Je.length?We(Je).length-yt:0);if(Se.length>1||Se[0]||ft(Un,On))return _a(a.doc,Se,Un,On,"+input"),!0},Ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ir.prototype.reset=function(){this.forceCompositionEnd()},Ir.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ir.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))},Ir.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Mi(this.cm,function(){return Si(a.cm)})},Ir.prototype.setUneditable=function(a){a.contentEditable="false"},Ir.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||ii(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Ir.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Ir.prototype.onContextMenu=function(){},Ir.prototype.resetPosition=function(){},Ir.prototype.needsContentAttribute=!0;function Ns(a,y){var x=qi(a,y.line);if(!x||x.hidden)return null;var b=nt(a.doc,y.line),E=Fa(x,b,y.line),ee=dn(b,a.doc.direction),re="left";if(ee){var oe=tn(ee,y.ch);re=oe%2?"right":"left"}var se=Co(E.map,y.ch,re);return se.offset=se.collapse=="right"?se.end:se.start,se}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Ga(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,oe=a.doc.lineSeparator(),se=!1;function ce(Ue){return function(yt){return yt.id==Ue}}function ye(){re&&(ee+=oe,se&&(ee+=oe),re=se=!1)}function Se(Ue){Ue&&(ye(),ee+=Ue)}function Je(Ue){if(Ue.nodeType==1){var yt=Ue.getAttribute("cm-text");if(yt){Se(yt);return}var Tt=Ue.getAttribute("cm-marker"),qt;if(Tt){var hn=a.findMarks(Ie(b,0),Ie(E+1,0),ce(+Tt));hn.length&&(qt=hn[0].find(0))&&Se(Vt(a.doc,qt.from,qt.to).join(oe));return}if(Ue.getAttribute("contenteditable")=="false")return;var Cn=/^(pre|div|p|li|table|br)$/i.test(Ue.nodeName);if(!/^br$/i.test(Ue.nodeName)&&Ue.textContent.length==0)return;Cn&&ye();for(var fn=0;fn<Ue.childNodes.length;fn++)Je(Ue.childNodes[fn]);/^(pre|p)$/i.test(Ue.nodeName)&&(se=!0),Cn&&(re=!0)}else Ue.nodeType==3&&Se(Ue.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Je(y),y!=x;)y=y.nextSibling,se=!1;return ee}function Zo(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Ga(a.clipPos(Ie(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return Xu(ee,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Xe(b,y))return Ga(Ie(xe(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?We(a.rest):a.line;return Ga(Ie(xe(ee),ee.text.length),E)}var re=y.nodeType==3?y:null,oe=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));oe.parentNode!=b;)oe=oe.parentNode;var se=a.measure,ce=se.maps;function ye(qt,hn,Cn){for(var fn=-1;fn<(ce?ce.length:0);fn++)for(var En=fn<0?se.map:ce[fn],Un=0;Un<En.length;Un+=3){var On=En[Un+2];if(On==qt||On==hn){var lr=xe(fn<0?a.line:a.rest[fn]),Hr=En[Un]+Cn;return(Cn<0||On!=qt)&&(Hr=En[Un+(Cn?1:0)]),Ie(lr,Hr)}}}var Se=ye(re,oe,x);if(Se)return Ga(Se,E);for(var Je=oe.nextSibling,Ue=re?re.nodeValue.length-x:0;Je;Je=Je.nextSibling){if(Se=ye(Je,Je.firstChild,0),Se)return Ga(Ie(Se.line,Se.ch-Ue),E);Ue+=Je.textContent.length}for(var yt=oe.previousSibling,Tt=x;yt;yt=yt.previousSibling){if(Se=ye(yt,yt.firstChild,-1),Se)return Ga(Ie(Se.line,Se.ch+Tt),E);Tt+=yt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};Xr.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),Te&&(E.style.width="0px"),_t(E,"input",function(){me&&ge>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),_t(E,"paste",function(re){Ee(b,re)||Ms(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!Ee(b,re)){if(b.somethingSelected())zo({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Ps(b);zo({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,Oe):(x.prevInput="",E.value=oe.text.join(`
`),ut(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}_t(E,"cut",ee),_t(E,"copy",ee),_t(a.scroller,"paste",function(re){if(!(si(a,re)||Ee(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,E.dispatchEvent(oe)}}),_t(a.lineSpace,"selectstart",function(re){si(a,re)||wt(re)}),_t(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),_t(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Is(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-ee.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ve(x.cursorDiv,a.cursors),Ve(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&ut(this.textarea),me&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ge>=9&&(this.hasSelection=null))}},Xr.prototype.getField=function(){return this.textarea},Xr.prototype.supportsTouch=function(){return!1},Xr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Me||we()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xr.prototype.blur=function(){this.textarea.blur()},Xr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xr.prototype.receivedFocus=function(){this.slowPoll()},Xr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Xr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||$n(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&ge>=9&&this.hasSelection===E||ke&&/[\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&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(b.length,E.length);re<oe&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Mi(y,function(){gl(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?x.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},Xr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xr.prototype.onKeyPress=function(){me&&ge>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=xa(x,a),re=b.scroller.scrollTop;if(!ee||he)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(ee)==-1&&ii(x,pi)(x.doc,fa(ee),Oe);var se=E.style.cssText,ce=y.wrapper.style.cssText,ye=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-ye.top-5)+"px; left: "+(a.clientX-ye.left-5)+`px;
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;He&&(Se=window.scrollY),b.input.focus(),He&&window.scrollTo(null,Se),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ue,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Je(){if(E.selectionStart!=null){var Tt=x.somethingSelected(),qt="\u200B"+(Tt?E.value:"");E.value="\u21DA",E.value=qt,y.prevInput=Tt?"":"\u200B",E.selectionStart=1,E.selectionEnd=qt.length,b.selForContextMenu=x.doc.sel}}function Ue(){if(y.contextMenuPending==Ue&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=se,me&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&ge<9)&&Je();var Tt=0,qt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?ii(x,ts)(x):Tt++<10?b.detectingSelectAll=setTimeout(qt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(qt,200)}}if(me&&ge>=9&&Je(),_e){Gt(a);var yt=function(){Pe(window,"mouseup",yt),setTimeout(Ue,20)};_t(window,"mouseup",yt)}else setTimeout(Ue,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Rt(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 x=we();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(_t(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=re}}catch(se){}}y.finishInit=function(se){se.save=b,se.getTextArea=function(){return a},se.toTextArea=function(){se.toTextArea=isNaN,b(),a.parentNode.removeChild(se.getWrapperElement()),a.style.display="",a.form&&(Pe(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var oe=zr(function(se){return a.parentNode.insertBefore(se,a.nextSibling)},y);return oe}function Qu(a){a.off=Pe,a.on=_t,a.wheelEventPixels=iu,a.Doc=Ei,a.splitLines=In,a.countColumn=ve,a.findColumn=en,a.isWordChar=ie,a.Pass=xt,a.signal=qe,a.Line=vr,a.changeEnd=pa,a.scrollbarModel=Ml,a.Pos=Ie,a.cmpPos=ft,a.modes=Rn,a.mimeModes=Ht,a.resolveMode=xn,a.getMode=yn,a.modeExtensions=Pn,a.extendMode=Hn,a.copyState=Mn,a.startState=qn,a.innerMode=Fn,a.commands=fo,a.keyMap=ia,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wa,a.normalizeKeyMap=Du,a.StringStream=At,a.SharedTextMarker=uo,a.TextMarker=ma,a.LineWidget=so,a.e_preventDefault=wt,a.e_stopPropagation=jt,a.e_stop=Gt,a.addClass=Ge,a.contains=Xe,a.rmClass=ze,a.keyNames=ga}Zu(zr),Uu(zr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Go in Ei.prototype)Ei.prototype.hasOwnProperty(Go)&&lt(qu,Go)<0&&(zr.prototype[Go]=function(a){return function(){return a.apply(this.doc,arguments)}}(Ei.prototype[Go]));return pt(Ei),zr.inputStyles={textarea:Xr,contenteditable:Ir},zr.defineMode=function(a){!zr.defaults.mode&&a!="null"&&(zr.defaults.mode=a),Qt.apply(this,arguments)},zr.defineMIME=un,zr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),zr.defineMIME("text/plain","null"),zr.defineExtension=function(a,y){zr.prototype[a]=y},zr.defineDocExtension=function(a,y){Ei.prototype[a]=y},zr.fromTextArea=Ju,Qu(zr),zr.version="5.58.2",zr})},25419:function(Pt,Nt,fe){(function(le){le(fe(89780),fe(15525),fe(98101))})(function(le){"use strict";le.defineMode("markdown",function(it,Le){var Ke=le.getMode(it,"text/html"),me=Ke.name=="null";function ge(ve){if(le.findModeByName){var de=le.findModeByName(ve);de&&(ve=de.mime||de.mimes[0])}var lt=le.getMode(it,ve);return lt.name=="null"?null:lt}Le.highlightFormatting===void 0&&(Le.highlightFormatting=!1),Le.maxBlockquoteDepth===void 0&&(Le.maxBlockquoteDepth=0),Le.taskLists===void 0&&(Le.taskLists=!1),Le.strikethrough===void 0&&(Le.strikethrough=!1),Le.emoji===void 0&&(Le.emoji=!1),Le.fencedCodeBlockHighlighting===void 0&&(Le.fencedCodeBlockHighlighting=!0),Le.fencedCodeBlockDefaultMode===void 0&&(Le.fencedCodeBlockDefaultMode="text/plain"),Le.xml===void 0&&(Le.xml=!0),Le.tokenTypeOverrides===void 0&&(Le.tokenTypeOverrides={});var He={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 Ze in He)He.hasOwnProperty(Ze)&&Le.tokenTypeOverrides[Ze]&&(He[Ze]=Le.tokenTypeOverrides[Ze]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ye=/^\[(x| )\](?=\s)/i,pe=Le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Te=/^[^#!\[\]*_\\<>` "'(~:]+/,Ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Me=/^\s*\[[^\]]+?\]:.*$/,ke=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,et=" ";function tt(ve,de,lt){return de.f=de.inline=lt,lt(ve,de)}function Qe(ve,de,lt){return de.f=de.block=lt,lt(ve,de)}function Re(ve){return!ve||!/\S/.test(ve.string)}function _e(ve){if(ve.linkTitle=!1,ve.linkHref=!1,ve.linkText=!1,ve.em=!1,ve.strong=!1,ve.strikethrough=!1,ve.quote=0,ve.indentedCode=!1,ve.f==ze){var de=me;if(!de){var lt=le.innerMode(Ke,ve.htmlState);de=lt.mode.name=="xml"&&lt.state.tagStart===null&&!lt.state.context&&lt.state.tokenize.isInText}de&&(ve.f=ht,ve.block=je,ve.htmlState=null)}return ve.trailingSpace=0,ve.trailingSpaceNewLine=!1,ve.prevLine=ve.thisLine,ve.thisLine={stream:null},null}function je(ve,de){var lt=ve.column()===de.indentation,Wt=Re(de.prevLine.stream),xt=de.indentedCode,Oe=de.prevLine.hr,at=de.list!==!1,ot=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var en=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,at)){for(de.list=null;en<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=en-de.listStack[de.listStack.length-1])}var dt=!Wt&&!Oe&&!de.prevLine.header&&(!at||!xt)&&!de.prevLine.fencedCodeEnd,Zt=(de.list===!1||Oe||Wt)&&de.indentation<=ot&&ve.match(Ce),We=null;if(de.indentationDiff>=4&&(xt||de.prevLine.fencedCodeEnd||de.prevLine.header||Wt))return ve.skipToEnd(),de.indentedCode=!0,He.code;if(ve.eatSpace())return null;if(lt&&de.indentation<=ot&&(We=ve.match(pe))&&We[1].length<=6)return de.quote=0,de.header=We[1].length,de.thisLine.header=!0,Le.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Ve(de);if(de.indentation<=ot&&ve.eat(">"))return de.quote=lt?1:de.quote+1,Le.highlightFormatting&&(de.formatting="quote"),ve.eatSpace(),Ve(de);if(!Zt&&!de.setext&&lt&&de.indentation<=ot&&(We=ve.match(he))){var Ct=We[1]?"ol":"ul";return de.indentation=en+ve.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,Le.taskLists&&ve.match(Ye,!1)&&(de.taskList=!0),de.f=de.inline,Le.highlightFormatting&&(de.formatting=["list","list-"+Ct]),Ve(de)}else{if(lt&&de.indentation<=ot&&(We=ve.match(Ae,!0)))return de.quote=0,de.fencedEndRE=new RegExp(We[1]+"+ *$"),de.localMode=Le.fencedCodeBlockHighlighting&&ge(We[2]||Le.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=le.startState(de.localMode)),de.f=de.block=bt,Le.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Ve(de);if(de.setext||(!dt||!at)&&!de.quote&&de.list===!1&&!de.code&&!Zt&&!Me.test(ve.string)&&(We=ve.lookAhead(1))&&(We=We.match(rt)))return de.setext?(de.header=de.setext,de.setext=0,ve.skipToEnd(),Le.highlightFormatting&&(de.formatting="header")):(de.header=We[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Ve(de);if(Zt)return ve.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,He.hr;if(ve.peek()==="[")return tt(ve,de,mt)}return tt(ve,de,de.inline)}function ze(ve,de){var lt=Ke.token(ve,de.htmlState);if(!me){var Wt=le.innerMode(Ke,de.htmlState);(Wt.mode.name=="xml"&&Wt.state.tagStart===null&&!Wt.state.context&&Wt.state.tokenize.isInText||de.md_inside&&ve.current().indexOf(">")>-1)&&(de.f=ht,de.block=je,de.htmlState=null)}return lt}function bt(ve,de){var lt=de.listStack[de.listStack.length-1]||0,Wt=de.indentation<lt,xt=lt+3;if(de.fencedEndRE&&de.indentation<=xt&&(Wt||ve.match(de.fencedEndRE))){Le.highlightFormatting&&(de.formatting="code-block");var Oe;return Wt||(Oe=Ve(de)),de.localMode=de.localState=null,de.block=je,de.f=ht,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,Wt?Qe(ve,de,de.block):Oe}else return de.localMode?de.localMode.token(ve,de.localState):(ve.skipToEnd(),He.code)}function Ve(ve){var de=[];if(ve.formatting){de.push(He.formatting),typeof ve.formatting=="string"&&(ve.formatting=[ve.formatting]);for(var lt=0;lt<ve.formatting.length;lt++)de.push(He.formatting+"-"+ve.formatting[lt]),ve.formatting[lt]==="header"&&de.push(He.formatting+"-"+ve.formatting[lt]+"-"+ve.header),ve.formatting[lt]==="quote"&&(!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=ve.quote?de.push(He.formatting+"-"+ve.formatting[lt]+"-"+ve.quote):de.push("error"))}if(ve.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(ve.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(ve.linkHref?de.push(He.linkHref,"url"):(ve.strong&&de.push(He.strong),ve.em&&de.push(He.em),ve.strikethrough&&de.push(He.strikethrough),ve.emoji&&de.push(He.emoji),ve.linkText&&de.push(He.linkText),ve.code&&de.push(He.code),ve.image&&de.push(He.image),ve.imageAltText&&de.push(He.imageAltText,"link"),ve.imageMarker&&de.push(He.imageMarker)),ve.header&&de.push(He.header,He.header+"-"+ve.header),ve.quote&&(de.push(He.quote),!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=ve.quote?de.push(He.quote+"-"+ve.quote):de.push(He.quote+"-"+Le.maxBlockquoteDepth)),ve.list!==!1){var Wt=(ve.listStack.length-1)%3;Wt?Wt===1?de.push(He.list2):de.push(He.list3):de.push(He.list1)}return ve.trailingSpaceNewLine?de.push("trailing-space-new-line"):ve.trailingSpace&&de.push("trailing-space-"+(ve.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function Ne(ve,de){if(ve.match(Te,!0))return Ve(de)}function ht(ve,de){var lt=de.text(ve,de);if(typeof lt!="undefined")return lt;if(de.list)return de.list=null,Ve(de);if(de.taskList){var Wt=ve.match(Ye,!0)[1]===" ";return Wt?de.taskOpen=!0:de.taskClosed=!0,Le.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Ve(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&ve.match(/^#+$/,!0))return Le.highlightFormatting&&(de.formatting="header"),Ve(de);var xt=ve.next();if(de.linkTitle){de.linkTitle=!1;var Oe=xt;xt==="("&&(Oe=")"),Oe=(Oe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var at="^\\s*(?:[^"+Oe+"\\\\]+|\\\\\\\\|\\\\.)"+Oe;if(ve.match(new RegExp(at),!0))return He.linkHref}if(xt==="`"){var ot=de.formatting;Le.highlightFormatting&&(de.formatting="code"),ve.eatWhile("`");var en=ve.current().length;if(de.code==0&&(!de.quote||en==1))return de.code=en,Ve(de);if(en==de.code){var dt=Ve(de);return de.code=0,dt}else return de.formatting=ot,Ve(de)}else if(de.code)return Ve(de);if(xt==="\\"&&(ve.next(),Le.highlightFormatting)){var Zt=Ve(de),We=He.formatting+"-escape";return Zt?Zt+" "+We:We}if(xt==="!"&&ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,Le.highlightFormatting&&(de.formatting="image"),Ve(de);if(xt==="["&&de.imageMarker&&ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,Le.highlightFormatting&&(de.formatting="image"),Ve(de);if(xt==="]"&&de.imageAltText){Le.highlightFormatting&&(de.formatting="image");var Zt=Ve(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Xe,Zt}if(xt==="["&&!de.image)return de.linkText&&ve.match(/^.*?\]/)||(de.linkText=!0,Le.highlightFormatting&&(de.formatting="link")),Ve(de);if(xt==="]"&&de.linkText){Le.highlightFormatting&&(de.formatting="link");var Zt=Ve(de);return de.linkText=!1,de.inline=de.f=ve.match(/\(.*?\)| ?\[.*?\]/,!1)?Xe:ht,Zt}if(xt==="<"&&ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Be,Le.highlightFormatting&&(de.formatting="link");var Zt=Ve(de);return Zt?Zt+=" ":Zt="",Zt+He.linkInline}if(xt==="<"&&ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Be,Le.highlightFormatting&&(de.formatting="link");var Zt=Ve(de);return Zt?Zt+=" ":Zt="",Zt+He.linkEmail}if(Le.xml&&xt==="<"&&ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ct=ve.string.indexOf(">",ve.pos);if(Ct!=-1){var St=ve.string.substring(ve.start,Ct);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(St)&&(de.md_inside=!0)}return ve.backUp(1),de.htmlState=le.startState(Ke),Qe(ve,de,ze)}if(Le.xml&&xt==="<"&&ve.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(xt==="*"||xt==="_"){for(var ae=1,te=ve.pos==1?" ":ve.string.charAt(ve.pos-2);ae<3&&ve.eat(xt);)ae++;var z=ve.peek()||" ",ie=!/\s/.test(z)&&(!ke.test(z)||/\s/.test(te)||ke.test(te)),ue=!/\s/.test(te)&&(!ke.test(te)||/\s/.test(z)||ke.test(z)),ne=null,be=null;if(ae%2&&(!de.em&&ie&&(xt==="*"||!ue||ke.test(te))?ne=!0:de.em==xt&&ue&&(xt==="*"||!ie||ke.test(z))&&(ne=!1)),ae>1&&(!de.strong&&ie&&(xt==="*"||!ue||ke.test(te))?be=!0:de.strong==xt&&ue&&(xt==="*"||!ie||ke.test(z))&&(be=!1)),be!=null||ne!=null){Le.highlightFormatting&&(de.formatting=ne==null?"strong":be==null?"em":"strong em"),ne===!0&&(de.em=xt),be===!0&&(de.strong=xt);var dt=Ve(de);return ne===!1&&(de.em=!1),be===!1&&(de.strong=!1),dt}}else if(xt===" "&&(ve.eat("*")||ve.eat("_"))){if(ve.peek()===" ")return Ve(de);ve.backUp(1)}if(Le.strikethrough){if(xt==="~"&&ve.eatWhile(xt)){if(de.strikethrough){Le.highlightFormatting&&(de.formatting="strikethrough");var dt=Ve(de);return de.strikethrough=!1,dt}else if(ve.match(/^[^\s]/,!1))return de.strikethrough=!0,Le.highlightFormatting&&(de.formatting="strikethrough"),Ve(de)}else if(xt===" "&&ve.match(/^~~/,!0)){if(ve.peek()===" ")return Ve(de);ve.backUp(2)}}if(Le.emoji&&xt===":"&&ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,Le.highlightFormatting&&(de.formatting="emoji");var $e=Ve(de);return de.emoji=!1,$e}return xt===" "&&(ve.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Ve(de)}function Be(ve,de){var lt=ve.next();if(lt===">"){de.f=de.inline=ht,Le.highlightFormatting&&(de.formatting="link");var Wt=Ve(de);return Wt?Wt+=" ":Wt="",Wt+He.linkInline}return ve.match(/^[^>]+/,!0),He.linkInline}function Xe(ve,de){if(ve.eatSpace())return null;var lt=ve.next();return lt==="("||lt==="["?(de.f=de.inline=Ge(lt==="("?")":"]"),Le.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Ve(de)):"error"}var we={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ge(ve){return function(de,lt){var Wt=de.next();if(Wt===ve){lt.f=lt.inline=ht,Le.highlightFormatting&&(lt.formatting="link-string");var xt=Ve(lt);return lt.linkHref=!1,xt}return de.match(we[ve]),lt.linkHref=!0,Ve(lt)}}function mt(ve,de){return ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=ut,ve.next(),Le.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Ve(de)):tt(ve,de,ht)}function ut(ve,de){if(ve.match(/^\]:/,!0)){de.f=de.inline=Xt,Le.highlightFormatting&&(de.formatting="link");var lt=Ve(de);return de.linkText=!1,lt}return ve.match(/^([^\]\\]|\\.)+/,!0),He.linkText}function Xt(ve,de){return ve.eatSpace()?null:(ve.match(/^[^\s]+/,!0),ve.peek()===void 0?de.linkTitle=!0:ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=ht,He.linkHref+" url")}var Rt={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:ht,text:Ne,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(ve){return{f:ve.f,prevLine:ve.prevLine,thisLine:ve.thisLine,block:ve.block,htmlState:ve.htmlState&&le.copyState(Ke,ve.htmlState),indentation:ve.indentation,localMode:ve.localMode,localState:ve.localMode?le.copyState(ve.localMode,ve.localState):null,inline:ve.inline,text:ve.text,formatting:!1,linkText:ve.linkText,linkTitle:ve.linkTitle,linkHref:ve.linkHref,code:ve.code,em:ve.em,strong:ve.strong,strikethrough:ve.strikethrough,emoji:ve.emoji,header:ve.header,setext:ve.setext,hr:ve.hr,taskList:ve.taskList,list:ve.list,listStack:ve.listStack.slice(0),quote:ve.quote,indentedCode:ve.indentedCode,trailingSpace:ve.trailingSpace,trailingSpaceNewLine:ve.trailingSpaceNewLine,md_inside:ve.md_inside,fencedEndRE:ve.fencedEndRE}},token:function(ve,de){if(de.formatting=!1,ve!=de.thisLine.stream){if(de.header=0,de.hr=!1,ve.match(/^\s*$/,!0))return _e(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:ve},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=ze)){var lt=ve.match(/^\s*/,!0)[0].replace(/\t/g,et).length;if(de.indentation=lt,de.indentationDiff=null,lt>0)return null}}return de.f(ve,de)},innerMode:function(ve){return ve.block==ze?{state:ve.htmlState,mode:Ke}:ve.localState?{state:ve.localState,mode:ve.localMode}:{state:ve,mode:Rt}},indent:function(ve,de,lt){return ve.block==ze&&Ke.indent?Ke.indent(ve.htmlState,de,lt):ve.localState&&ve.localMode.indent?ve.localMode.indent(ve.localState,de,lt):le.Pass},blankLine:_e,getType:Ve,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Rt},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){"use strict";le.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 it=0;it<le.modeInfo.length;it++){var Le=le.modeInfo[it];Le.mimes&&(Le.mime=Le.mimes[0])}le.findModeByMIME=function(Ke){Ke=Ke.toLowerCase();for(var me=0;me<le.modeInfo.length;me++){var ge=le.modeInfo[me];if(ge.mime==Ke)return ge;if(ge.mimes){for(var He=0;He<ge.mimes.length;He++)if(ge.mimes[He]==Ke)return ge}}if(/\+xml$/.test(Ke))return le.findModeByMIME("application/xml");if(/\+json$/.test(Ke))return le.findModeByMIME("application/json")},le.findModeByExtension=function(Ke){Ke=Ke.toLowerCase();for(var me=0;me<le.modeInfo.length;me++){var ge=le.modeInfo[me];if(ge.ext){for(var He=0;He<ge.ext.length;He++)if(ge.ext[He]==Ke)return ge}}},le.findModeByFileName=function(Ke){for(var me=0;me<le.modeInfo.length;me++){var ge=le.modeInfo[me];if(ge.file&&ge.file.test(Ke))return ge}var He=Ke.lastIndexOf("."),Ze=He>-1&&Ke.substring(He+1,Ke.length);if(Ze)return le.findModeByExtension(Ze)},le.findModeByName=function(Ke){Ke=Ke.toLowerCase();for(var me=0;me<le.modeInfo.length;me++){var ge=le.modeInfo[me];if(ge.name.toLowerCase()==Ke)return ge;if(ge.alias){for(var He=0;He<ge.alias.length;He++)if(ge.alias[He].toLowerCase()==Ke)return ge}}}})},67549:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){"use strict";le.defineMode("stex",function(it,Le){"use strict";function Ke(Te,Ae){Te.cmdState.push(Ae)}function me(Te){return Te.cmdState.length>0?Te.cmdState[Te.cmdState.length-1]:null}function ge(Te){var Ae=Te.cmdState.pop();Ae&&Ae.closeBracket()}function He(Te){for(var Ae=Te.cmdState,Me=Ae.length-1;Me>=0;Me--){var ke=Ae[Me];if(ke.name!="DEFAULT")return ke}return{styleIdentifier:function(){return null}}}function Ze(Te,Ae,Me){return function(){this.name=Te,this.bracketNo=0,this.style=Ae,this.styles=Me,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ce={};Ce.importmodule=Ze("importmodule","tag",["string","builtin"]),Ce.documentclass=Ze("documentclass","tag",["","atom"]),Ce.usepackage=Ze("usepackage","tag",["atom"]),Ce.begin=Ze("begin","tag",["atom"]),Ce.end=Ze("end","tag",["atom"]),Ce.label=Ze("label","tag",["atom"]),Ce.ref=Ze("ref","tag",["atom"]),Ce.eqref=Ze("eqref","tag",["atom"]),Ce.cite=Ze("cite","tag",["atom"]),Ce.bibitem=Ze("bibitem","tag",["atom"]),Ce.Bibitem=Ze("Bibitem","tag",["atom"]),Ce.RBibitem=Ze("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function he(Te,Ae){Te.f=Ae}function Ye(Te,Ae){var Me;if(Te.match(/^\\[a-zA-Z@]+/)){var ke=Te.current().slice(1);return Me=Ce.hasOwnProperty(ke)?Ce[ke]:Ce.DEFAULT,Me=new Me,Ke(Ae,Me),he(Ae,rt),Me.style}if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/\\]/))return"tag";if(Te.match("\\["))return he(Ae,function(tt,Qe){return pe(tt,Qe,"\\]")}),"keyword";if(Te.match("\\("))return he(Ae,function(tt,Qe){return pe(tt,Qe,"\\)")}),"keyword";if(Te.match("$$"))return he(Ae,function(tt,Qe){return pe(tt,Qe,"$$")}),"keyword";if(Te.match("$"))return he(Ae,function(tt,Qe){return pe(tt,Qe,"$")}),"keyword";var et=Te.next();if(et=="%")return Te.skipToEnd(),"comment";if(et=="}"||et=="]"){if(Me=me(Ae),Me)Me.closeBracket(et),he(Ae,rt);else return"error";return"bracket"}else return et=="{"||et=="["?(Me=Ce.DEFAULT,Me=new Me,Ke(Ae,Me),"bracket"):/\d/.test(et)?(Te.eatWhile(/[\w.%]/),"atom"):(Te.eatWhile(/[\w\-_]/),Me=He(Ae),Me.name=="begin"&&(Me.argument=Te.current()),Me.styleIdentifier())}function pe(Te,Ae,Me){if(Te.eatSpace())return null;if(Me&&Te.match(Me))return he(Ae,Ye),"keyword";if(Te.match(/^\\[a-zA-Z@]+/))return"tag";if(Te.match(/^[a-zA-Z]+/))return"variable-2";if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/]/)||Te.match(/^[\^_&]/))return"tag";if(Te.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Te.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ke=Te.next();return ke=="{"||ke=="}"||ke=="["||ke=="]"||ke=="("||ke==")"?"bracket":ke=="%"?(Te.skipToEnd(),"comment"):"error"}function rt(Te,Ae){var Me=Te.peek(),ke;return Me=="{"||Me=="["?(ke=me(Ae),ke.openBracket(Me),Te.eat(Me),he(Ae,Ye),"bracket"):/[ \t\r]/.test(Me)?(Te.eat(Me),null):(he(Ae,Ye),ge(Ae),Ye(Te,Ae))}return{startState:function(){var Te=Le.inMathMode?function(Ae,Me){return pe(Ae,Me)}:Ye;return{cmdState:[],f:Te}},copyState:function(Te){return{cmdState:Te.cmdState.slice(),f:Te.f}},token:function(Te,Ae){return Ae.f(Te,Ae)},blankLine:function(Te){Te.f=Ye,Te.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(Pt,Nt,fe){(function(le){le(fe(89780))})(function(le){"use strict";var it={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},Le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(Ke,me){var ge=Ke.indentUnit,He={},Ze=me.htmlMode?it:Le;for(var Ce in Ze)He[Ce]=Ze[Ce];for(var Ce in me)He[Ce]=me[Ce];var he,Ye;function pe(Be,Xe){function we(ut){return Xe.tokenize=ut,ut(Be,Xe)}var Ge=Be.next();if(Ge=="<")return Be.eat("!")?Be.eat("[")?Be.match("CDATA[")?we(Ae("atom","]]>")):null:Be.match("--")?we(Ae("comment","-->")):Be.match("DOCTYPE",!0,!0)?(Be.eatWhile(/[\w\._\-]/),we(Me(1))):null:Be.eat("?")?(Be.eatWhile(/[\w\._\-]/),Xe.tokenize=Ae("meta","?>"),"meta"):(he=Be.eat("/")?"closeTag":"openTag",Xe.tokenize=rt,"tag bracket");if(Ge=="&"){var mt;return Be.eat("#")?Be.eat("x")?mt=Be.eatWhile(/[a-fA-F\d]/)&&Be.eat(";"):mt=Be.eatWhile(/[\d]/)&&Be.eat(";"):mt=Be.eatWhile(/[\w\.\-:]/)&&Be.eat(";"),mt?"atom":"error"}else return Be.eatWhile(/[^&<]/),null}pe.isInText=!0;function rt(Be,Xe){var we=Be.next();if(we==">"||we=="/"&&Be.eat(">"))return Xe.tokenize=pe,he=we==">"?"endTag":"selfcloseTag","tag bracket";if(we=="=")return he="equals",null;if(we=="<"){Xe.tokenize=pe,Xe.state=Qe,Xe.tagName=Xe.tagStart=null;var Ge=Xe.tokenize(Be,Xe);return Ge?Ge+" tag error":"tag error"}else return/[\'\"]/.test(we)?(Xe.tokenize=Te(we),Xe.stringStartCol=Be.column(),Xe.tokenize(Be,Xe)):(Be.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Te(Be){var Xe=function(we,Ge){for(;!we.eol();)if(we.next()==Be){Ge.tokenize=rt;break}return"string"};return Xe.isInAttribute=!0,Xe}function Ae(Be,Xe){return function(we,Ge){for(;!we.eol();){if(we.match(Xe)){Ge.tokenize=pe;break}we.next()}return Be}}function Me(Be){return function(Xe,we){for(var Ge;(Ge=Xe.next())!=null;){if(Ge=="<")return we.tokenize=Me(Be+1),we.tokenize(Xe,we);if(Ge==">")if(Be==1){we.tokenize=pe;break}else return we.tokenize=Me(Be-1),we.tokenize(Xe,we)}return"meta"}}function ke(Be,Xe,we){this.prev=Be.context,this.tagName=Xe,this.indent=Be.indented,this.startOfLine=we,(He.doNotIndent.hasOwnProperty(Xe)||Be.context&&Be.context.noIndent)&&(this.noIndent=!0)}function et(Be){Be.context&&(Be.context=Be.context.prev)}function tt(Be,Xe){for(var we;;){if(!Be.context||(we=Be.context.tagName,!He.contextGrabbers.hasOwnProperty(we)||!He.contextGrabbers[we].hasOwnProperty(Xe)))return;et(Be)}}function Qe(Be,Xe,we){return Be=="openTag"?(we.tagStart=Xe.column(),Re):Be=="closeTag"?_e:Qe}function Re(Be,Xe,we){return Be=="word"?(we.tagName=Xe.current(),Ye="tag",bt):He.allowMissingTagName&&Be=="endTag"?(Ye="tag bracket",bt(Be,Xe,we)):(Ye="error",Re)}function _e(Be,Xe,we){if(Be=="word"){var Ge=Xe.current();return we.context&&we.context.tagName!=Ge&&He.implicitlyClosed.hasOwnProperty(we.context.tagName)&&et(we),we.context&&we.context.tagName==Ge||He.matchClosing===!1?(Ye="tag",je):(Ye="tag error",ze)}else return He.allowMissingTagName&&Be=="endTag"?(Ye="tag bracket",je(Be,Xe,we)):(Ye="error",ze)}function je(Be,Xe,we){return Be!="endTag"?(Ye="error",je):(et(we),Qe)}function ze(Be,Xe,we){return Ye="error",je(Be,Xe,we)}function bt(Be,Xe,we){if(Be=="word")return Ye="attribute",Ve;if(Be=="endTag"||Be=="selfcloseTag"){var Ge=we.tagName,mt=we.tagStart;return we.tagName=we.tagStart=null,Be=="selfcloseTag"||He.autoSelfClosers.hasOwnProperty(Ge)?tt(we,Ge):(tt(we,Ge),we.context=new ke(we,Ge,mt==we.indented)),Qe}return Ye="error",bt}function Ve(Be,Xe,we){return Be=="equals"?Ne:(He.allowMissing||(Ye="error"),bt(Be,Xe,we))}function Ne(Be,Xe,we){return Be=="string"?ht:Be=="word"&&He.allowUnquoted?(Ye="string",bt):(Ye="error",bt(Be,Xe,we))}function ht(Be,Xe,we){return Be=="string"?ht:bt(Be,Xe,we)}return{startState:function(Be){var Xe={tokenize:pe,state:Qe,indented:Be||0,tagName:null,tagStart:null,context:null};return Be!=null&&(Xe.baseIndent=Be),Xe},token:function(Be,Xe){if(!Xe.tagName&&Be.sol()&&(Xe.indented=Be.indentation()),Be.eatSpace())return null;he=null;var we=Xe.tokenize(Be,Xe);return(we||he)&&we!="comment"&&(Ye=null,Xe.state=Xe.state(he||we,Be,Xe),Ye&&(we=Ye=="error"?we+" error":Ye)),we},indent:function(Be,Xe,we){var Ge=Be.context;if(Be.tokenize.isInAttribute)return Be.tagStart==Be.indented?Be.stringStartCol+1:Be.indented+ge;if(Ge&&Ge.noIndent)return le.Pass;if(Be.tokenize!=rt&&Be.tokenize!=pe)return we?we.match(/^(\s*)/)[0].length:0;if(Be.tagName)return He.multilineTagIndentPastTag!==!1?Be.tagStart+Be.tagName.length+2:Be.tagStart+ge*(He.multilineTagIndentFactor||1);if(He.alignCDATA&&/<!\[CDATA\[/.test(Xe))return 0;var mt=Xe&&/^<(\/)?([\w_:\.-]*)/.exec(Xe);if(mt&&mt[1])for(;Ge;)if(Ge.tagName==mt[2]){Ge=Ge.prev;break}else if(He.implicitlyClosed.hasOwnProperty(Ge.tagName))Ge=Ge.prev;else break;else if(mt)for(;Ge;){var ut=He.contextGrabbers[Ge.tagName];if(ut&&ut.hasOwnProperty(mt[2]))Ge=Ge.prev;else break}for(;Ge&&Ge.prev&&!Ge.startOfLine;)Ge=Ge.prev;return Ge?Ge.indent+ge:Be.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:He.htmlMode?"html":"xml",helperType:He.htmlMode?"html":"xml",skipAttribute:function(Be){Be.state==Ne&&(Be.state=bt)},xmlCurrentTag:function(Be){return Be.tagName?{name:Be.tagName,close:Be.type=="closeTag"}:null},xmlCurrentContext:function(Be){for(var Xe=[],we=Be.context;we;we=we.prev)we.tagName&&Xe.push(we.tagName);return Xe.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Pt,Nt,fe){"use strict";fe.d(Nt,{hP:function(){return St}});var le=function(ae,te){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ie){z.__proto__=ie}||function(z,ie){for(var ue in ie)Object.prototype.hasOwnProperty.call(ie,ue)&&(z[ue]=ie[ue])})(ae,te)};function it(ae,te){function z(){this.constructor=ae}le(ae,te),ae.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Le(ae,te,z,ie){return new(z||(z=Promise))(function(ue,ne){function be(Dt){try{It(ie.next(Dt))}catch(gt){ne(gt)}}function $e(Dt){try{It(ie.throw(Dt))}catch(gt){ne(gt)}}function It(Dt){var gt;Dt.done?ue(Dt.value):(gt=Dt.value,gt instanceof z?gt:new z(function(kt){kt(gt)})).then(be,$e)}It((ie=ie.apply(ae,te||[])).next())})}function Ke(ae,te){var z,ie,ue,ne,be={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ne={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function $e(It){return function(Dt){return function(gt){if(z)throw new TypeError("Generator is already executing.");for(;be;)try{if(z=1,ie&&(ue=2&gt[0]?ie.return:gt[0]?ie.throw||((ue=ie.return)&&ue.call(ie),0):ie.next)&&!(ue=ue.call(ie,gt[1])).done)return ue;switch(ie=0,ue&&(gt=[2&gt[0],ue.value]),gt[0]){case 0:case 1:ue=gt;break;case 4:return be.label++,{value:gt[1],done:!1};case 5:be.label++,ie=gt[1],gt=[0];continue;case 7:gt=be.ops.pop(),be.trys.pop();continue;default:if(ue=be.trys,!((ue=ue.length>0&&ue[ue.length-1])||gt[0]!==6&&gt[0]!==2)){be=0;continue}if(gt[0]===3&&(!ue||gt[1]>ue[0]&&gt[1]<ue[3])){be.label=gt[1];break}if(gt[0]===6&&be.label<ue[1]){be.label=ue[1],ue=gt;break}if(ue&&be.label<ue[2]){be.label=ue[2],be.ops.push(gt);break}ue[2]&&be.ops.pop(),be.trys.pop();continue}gt=te.call(ae,be)}catch(kt){gt=[6,kt],ie=0}finally{z=ue=0}if(5&gt[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([It,Dt])}}}function me(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var ie=Array(ae),ue=0;for(te=0;te<z;te++)for(var ne=arguments[te],be=0,$e=ne.length;be<$e;be++,ue++)ie[ue]=ne[be];return ie}var ge=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,z){for(var ie=0,ue=z;ie<ue.length;ie++){var ne=ue[ie],be=ne[0],$e=ne[1];te.setAttribute(be,$e)}},ae.createRect=function(te,z,ie){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",te.toString()),ue.setAttribute("height",z.toString()),ie&&ae.setAttributes(ue,ie),ue},ae.createLine=function(te,z,ie,ue,ne){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",te.toString()),be.setAttribute("y1",z.toString()),be.setAttribute("x2",ie.toString()),be.setAttribute("y2",ue.toString()),ne&&ae.setAttributes(be,ne),be},ae.createPolygon=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),z&&ae.setAttributes(ie,z),ie},ae.createCircle=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(te/2).toString()),ie.setAttribute("cy",(te/2).toString()),ie.setAttribute("r",te.toString()),z&&ae.setAttributes(ie,z),ie},ae.createEllipse=function(te,z,ie){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(te/2).toString()),ue.setAttribute("cy",(z/2).toString()),ue.setAttribute("rx",(te/2).toString()),ue.setAttribute("ry",(z/2).toString()),ie&&ae.setAttributes(ue,ie),ue},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,ie,ue,ne,be,$e){var It=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(It,[["id",te],["orient",z],["markerWidth",ie.toString()],["markerHeight",ue.toString()],["refX",ne.toString()],["refY",be.toString()]]),It.appendChild($e),It},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 ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,z&&ae.setAttributes(ie,z),ie},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 ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=z,ie},ae.createPath=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),z&&ae.setAttributes(ie,z),ie},ae}(),He=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}(),Ze=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,ie){var ue=this;return new Promise(function(ne){var be=ie!==void 0?ie:document.createElement("canvas");te===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var $e=document.createElementNS("http://www.w3.org/2000/svg","svg");$e.setAttribute("xmlns","http://www.w3.org/2000/svg"),$e.setAttribute("width",z.width.baseVal.valueAsString),$e.setAttribute("height",z.height.baseVal.valueAsString),$e.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),$e.innerHTML=z.innerHTML,ue.naturalSize===!0?($e.width.baseVal.value=te.naturalWidth,$e.height.baseVal.value=te.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&($e.width.baseVal.value=ue.width,$e.height.baseVal.value=ue.height),be.width=$e.width.baseVal.value,be.height=$e.height.baseVal.value;var It=$e.outerHTML,Dt=be.getContext("2d");ue.markersOnly!==!0&&Dt.drawImage(te,0,0,be.width,be.height);var gt=window.URL,kt=new Image(be.width,be.height);kt.setAttribute("crossOrigin","anonymous");var tn=new Blob([It],{type:"image/svg+xml"}),Jt=gt.createObjectURL(tn);kt.onload=function(){Dt.drawImage(kt,0,0),gt.revokeObjectURL(Jt);var dn=be.toDataURL(ue.imageType,ue.imageQuality);ne(dn)},kt.src=Jt})},ae}(),Ce=function(){},he=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 Ye("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ye("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ye("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new pe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new pe("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}(),Ye=function(ae,te){this.selector=ae,this.style=te},pe=function(ae,te){this.localName=ae,this.style=te},rt=function(){function ae(te,z,ie,ue,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=ie,this.uiStyleSettings=ue,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 ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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 be=document.createElement("div");be.className=""+z.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",ne.typeName),be.innerHTML=ne.icon,be.addEventListener("click",function(){z.markerToolbarButtonClicked(be,ne)}),z.buttons.push(be),z.markerButtons.push(be)}),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 ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<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(ue,'<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,ie){var ue=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){ue.actionToolbarButtonClicked(ne,ie)}),ie){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 pe("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 pe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new pe("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 pe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("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 pe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ye("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ye("."+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(ie){return ie("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("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(ie){return ie.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){z.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ae}(),Te=function(){function ae(te,z,ie,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=ie,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",`
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("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 pe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ye("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ye("."+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,ie,ue=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+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var be;ne.uiStyleSettings=ue.uiStyleSettings;var $e=document.createElement("div");$e.className=ue.toolboxButtonStyleClass.name+" "+((be=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:ue.toolboxButtonStyleColorsClass.name),$e.innerHTML=ne.icon,$e.title=ne.title,$e.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push($e),ue.buttonRow.appendChild($e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var z=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var ue=te.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),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,be){var $e,It;ne.className=z.toolboxButtonStyleClass.name+" "+(be===ie?""+(($e=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&$e!==void 0?$e:z.toolboxActiveButtonStyleColorsClass.name):""+((It=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&It!==void 0?It:z.toolboxButtonStyleColorsClass.name))})},ae}(),Ae=function(ae,te){this.title=ae,this.icon=te},Me=function(ae){function te(z,ie,ue,ne){var be=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 be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=ie,be.currentColor=ue,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ne=z.getColorBox(ue);ie.appendChild(ne),z.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(z){var ie=this,ue=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ue,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=ne-2+"px",be.style.height=ne-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(ne+2)/2+"px",be.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){ie.setCurrentColor(z,be)});var $e=document.createElement("div");return $e.style.display="inline-block",$e.style.width=ne-2+"px",$e.style.height=ne-2+"px",$e.style.backgroundColor=z,$e.style.borderRadius=ne/2+"px",z==="transparent"&&($e.style.fill=this.uiStyleSettings.toolboxAccentColor,$e.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>`),be.appendChild($e),be},te.prototype.setCurrentColor=function(z,ie){var ue=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Ae),ke=function(){function ae(te,z,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=ie,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}(),et=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}(),tt=function(){function ae(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.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}(),Qe=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}(),Re=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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(ge.createTransform()),ne.setupControlBox(),ne}return it(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 ie=ge.createTransform();this._visual.transform.baseVal.appendItem(ie)},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,ie){ae.prototype.pointerDown.call(this,z,ie),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 ue=this.unrotatePoint(z);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){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 be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var ie=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",ie==="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 ie=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var ie=this.manipulationStartLeft,ue=this.manipulationStartWidth,ne=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+z.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=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,be=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+z.y-this.manipulationStartY}ue>=0?(this.left=ie,this.width=ue):(this.left=ie+ue,this.width=-ue),be>=0?(this.top=ne,this.height=be):(this.top=ne+be,this.height=-be),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 ie=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*ie,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 ie=this.container.getCTM(),ue=ge.createPoint(z.x,z.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM();ie=ie.inverse();var ue=ge.createPoint(z.x,z.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.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=ge.createGroup();var z=ge.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ge.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=ge.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 et,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 tt;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,ie=-z/2,ue=ie,ne=(this.width+this.CB_DISTANCE)/2-z/2,be=(this.height+this.CB_DISTANCE)/2-z/2,$e=this.height+this.CB_DISTANCE-z/2,It=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ue),this.positionGrip(this.controlGrips.topCenter.visual,ne,ue),this.positionGrip(this.controlGrips.topRight.visual,It,ue),this.positionGrip(this.controlGrips.centerLeft.visual,ie,be),this.positionGrip(this.controlGrips.centerRight.visual,It,be),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,$e),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,$e),this.positionGrip(this.controlGrips.bottomRight.visual,It,$e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ue-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,ie,ue){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),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:Qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Qe.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 ie=z;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie);var ue=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ue.x*z,y:ue.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*ie,this.adjustControlBox()},te}(ke),_e=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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 it(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.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,ie){ae.prototype.pointerDown.call(this,z,ie),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),ge.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&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.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 ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setSize()},te.title="Rectangle marker",te}(Re),je=function(ae){function te(z,ie,ue,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=ie,be.currentWidth=ue,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(ue){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=ue===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=ue.toString(),be.style.marginRight="5px",ne.appendChild(be);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.display="flex",$e.style.alignItems="center";var It=document.createElement("hr");It.style.minWidth="20px",It.style.border="0px",It.style.borderTop=ue+"px solid "+z.uiStyleSettings.toolboxColor,It.style.flexGrow="2",$e.appendChild(It),ne.appendChild($e),z.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(z,ie){var ue=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Ae),ze=function(ae){function te(z,ie,ue,ne){var be=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 be.styles=[],be.styleBoxes=[],be.styles=ie,be.currentStyle=ue,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(ue){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=ue===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var $e=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
</svg>`;be.innerHTML=$e,ne.appendChild(be),z.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(z,ie){var ue=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Ae),bt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(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}(_e),Ve=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"},Ne=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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 it(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,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var ie=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",ie==="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=ge.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 tt;return z.visual.transform.baseVal.appendItem(ge.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,ie,ue){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),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 ie=z;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.x1=this.x1*z,this.y1=this.y1*ie,this.x2=this.x2*z,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(ke),ht=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(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=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.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,ie){ae.prototype.pointerDown.call(this,z,ie),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()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.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 ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.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}(Ne),Be=function(ae){function te(z,ie,ue,ne){var be=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 be.fonts=[],be.fontBoxes=[],be.fonts=ie,be.currentFont=ue,be.setCurrentFont=be.setCurrentFont.bind(be),be}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ue){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=ue===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=ue,be.style.overflow="hidden";var $e=document.createElement("div");$e.style.whiteSpace="nowrap",$e.style.overflow="hidden",$e.style.textOverflow="ellipsis",$e.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild($e),ne.appendChild(be),z.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(z,ie){var ue=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Ae),Xe=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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=ue.defaultColor,ne.fontFamily=ue.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 Me("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Be("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return it(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 ie=!1;return this.textElement.childNodes.forEach(function(ue){ue===z&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie){z.textElement.appendChild(ge.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),ie=1;if(z.width>0&&z.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;ie=Math.min(ue,ne)}return ie},te.prototype.getTextPosition=function(z){var ie=this.textElement.getBBox(),ue=0,ne=0;return ie.width>0&&ie.height>0&&(ue=(this.width-ie.width*z)/2,ne=this.height/2-ie.height*z/2),{x:ue,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),ie=this.getTextScale(),ue=this.getTextPosition(ie);ue.y-=z.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},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&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(ie==="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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,z.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var ue=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ue)),ie.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(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ne={x:ue.width*z,y:ue.height*z};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.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,ie){ae.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ge.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&&ge.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 ie=z;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),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}(Re),we=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ue.defaultColor,ne.lineWidth=ue.defaultStrokeWidth,ne.pixelRatio=ue.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 Me("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return it(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=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var z=ge.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,ie){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,ie)},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),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.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),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=ie[0],ne=ie[1],be=ie[2],$e=ie[3],It=!1,Dt=0;Dt<this.canvasElement.height;Dt++)for(var gt=0;gt<this.canvasElement.width;gt++)z.data[Dt*this.canvasElement.width*4+4*gt+3]>0&&(It=!0,Dt<ne&&(ne=Dt),gt<ue&&(ue=gt),Dt>$e&&($e=Dt),gt>be&&(be=gt));if(It){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-ue)/this.pixelRatio,this.height=($e-ne)/this.pixelRatio;var kt=document.createElement("canvas");kt.width=be-ue,kt.height=$e-ne,kt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,be-ue,$e-ne),0,0),this.drawingImgUrl=kt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.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,ie){ae.prototype.scale.call(this,z,ie),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}(Re),Ge=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ue||'<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=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ue=function($e){var It="both";switch($e){case 0:It="both";break;case 1:It="start";break;case 2:It="end";break;case 3:It="none"}var Dt=document.createElement("div");if(Dt.style.display="flex",Dt.style.flexGrow="2",Dt.style.alignItems="center",Dt.style.justifyContent="space-between",Dt.style.padding="5px",Dt.style.borderWidth="2px",Dt.style.borderStyle="solid",Dt.style.borderColor=It===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Dt.addEventListener("click",function(){z.setCurrentType(It,Dt)}),ie.appendChild(Dt),It==="both"||It==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.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>`,gt.style.marginLeft="5px",Dt.appendChild(gt)}var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.style.flexGrow="2";var tn=document.createElement("hr");if(tn.style.minWidth="20px",tn.style.border="0px",tn.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),tn.style.flexGrow="2",kt.appendChild(tn),Dt.appendChild(kt),It==="both"||It==="end"){var Jt=document.createElement("div");Jt.style.display="flex",Jt.style.alignItems="center",Jt.style.minHeight="20px",Jt.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>`,Jt.style.marginRight="5px",Dt.appendChild(Jt)}ne.typeBoxes.push(Dt)},ne=this,be=0;be<4;be++)ue(be);return ie},te.prototype.setCurrentType=function(z,ie){var ue=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Ae),mt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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 Ge("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return it(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,ie){var ue=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-ue/2+","+(ie+ne/2)+" "+z+","+(ie-ne/2)+" "+(z+ue/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),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",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.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 ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,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 ie=z;this.arrowType=ie.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}(ht),ut=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Me("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return it(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}(_e),Xt=function(ae){function te(z,ie,ue,ne){var be=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 be.opacities=[],be.opacityBoxes=[],be.opacities=ie,be.currentOpacity=ue,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return it(te,ae),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(ue){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=ue===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=100*ue+"%",ne.appendChild(be),z.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(z,ie){var ue=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Ae),Rt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ue.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ue.defaultHighlightOpacity,ne.fillPanel=new Me("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Xt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return it(te,ae),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.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}(ut),ve='<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>',de='<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>',lt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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=ue.defaultStrokeColor,ne.bgColor=ue.defaultFillColor,ne.fontFamily=ue.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 Me("Text color",ue.defaultColorSet,ne.color,ve),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Me("Fill color",ue.defaultColorSet,ne.bgColor,de),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Be("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new tt,ne.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return it(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(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,ie){this.state==="new"&&ae.prototype.pointerDown.call(this,z,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,ie)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var ie=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var ie=this.unrotatePoint(z);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",z]]),ge.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 ie=Math.min(this.height/2,15),ue=this.height/5;z&&(this.tipPosition={x:ie+ue/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))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+ue,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+ue}):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))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ue,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+ue}):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))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ue,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-ue},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-ue})},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){ge.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 ie=z;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*ie},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}(Xe),Wt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.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 Me("Line color",me(ue.defaultColorSet,["transparent"]),ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(ue.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Xt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return it(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.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,ie){ae.prototype.pointerDown.call(this,z,ie),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),ge.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&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.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 ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),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}(Re),xt=function(ae){function te(z,ie,ue){return ae.call(this,z,ie,ue)||this}return it(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=ge.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(ge.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ge.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(ge.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ge.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()]]),ge.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),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,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}(ht),Oe=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return it(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}(Wt),at=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}(),ot=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(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=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.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,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie)&&(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()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.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,ie){this.curveX=this.curveX*z,this.curveY=this.curveY*ie,ae.prototype.scale.call(this,z,ie)},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 ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.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}(Ne),en=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,ie,ue)||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=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.textColor=ue.defaultStrokeColor,ne.fontFamily=ue.defaultFontFamily,ne.fontSize=ue.defaultCaptionFontSize,ne.captionText=ue.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 Me("Line color",me(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(ue.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new je("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ze("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Be("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Me("Text color",ue.defaultColorSet,ne.textColor,ve),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return it(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=ge.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ge.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ge.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=ge.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,ie){ae.prototype.pointerDown.call(this,z,ie),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),ge.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')"]]),ge.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(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.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&&ge.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&&ge.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),ge.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,ie){ae.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ge.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ge.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ge.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ge.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 ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),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}(Re),dt=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}(),Zt=function(ae){function te(z,ie,ue){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=ie,ne.state=ue,ne}return it(te,ae),te}(dt),We=function(ae){function te(z,ie,ue){ue===void 0&&(ue=!1);var ne=ae.call(this,z,ue)||this;return ne.marker=ie,ne}return it(te,ae),te}(dt),Ct=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 ie=this[te].indexOf(z);ie>-1&&this[te].splice(ie,1)},ae}(),St=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 Ve,this._isOpen=!1,this.undoRedoManager=new at,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 Ct,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new he(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[bt,we,mt,Xe,Oe,Wt,Rt,lt,xt,ut,ht,ot,en]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[bt,we,mt,Xe,Wt,Rt,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[bt,we,mt,Xe,Rt]},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(ie){if(typeof ie=="string"){var ue=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ue!==void 0&&z._availableMarkerTypes.push(ue)}else z._availableMarkerTypes.push(ie)})},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(),He.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new dt(te))})},ae.prototype.render=function(){return Le(this,void 0,void 0,function(){var te;return Ke(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ze).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 ie=!1;te||this.eventListeners.beforeclose.forEach(function(ue){var ne=new dt(z,!0);ue(ne),ne.defaultPrevented&&(ie=!0)}),ie||(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(ue){return ue(new dt(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];(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,ie=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,ie)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(te,z){this._isResizing=!0;var ie=te/this.imageWidth,ue=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(ie,ue),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var ie,ue=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(te,z):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ue._currentMarker&&ne.scale(te,z)}),ie!==void 0&&this.setCurrentMarker(ie)},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=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];this.defs=ge.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 rt(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 Te(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(ue){var ne=new We(te,te._currentMarker,!0);ue(ne),ne.defaultPrevented&&(z=!0)}),!z){var ie=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(ue){return ue(new We(te,ie))})}}},ae.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var $e=new We(te,void 0,!0);be($e),$e.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var ie=function(be){var $e=ue.markers[be];ue.setCurrentMarker(ue.markers[be]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(It){return It(new We(te,$e))})},ue=this,ne=this.markers.length-1;ne>=0;ne--)ie(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(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===z.width&&ie.height===z.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new dt(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new dt(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(ie){return ie(new dt(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(ie){return ie(new dt(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 Le(this,void 0,void 0,function(){var te,z,ie=this;return Ke(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return te=ue.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Zt(ie,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(ie){return z.markers.push(ie.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(ie){var ue=z._availableMarkerTypes.find(function(be){return be.typeName===ie.typeName});if(ue!==void 0){var ne=z.addNewMarker(ue);ne.restoreState(ie),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(ie){return ie(new dt(z))})},ae.prototype.addNewMarker=function(te){var z=ge.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(te){var z,ie=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(ue){return ue.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(ue){return ue(new We(ie,ie._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 we&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(we):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new We(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(ie){return ie(new We(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(ie){return ie(new We(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(ie){return ie(new We(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(ie){return ie.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(ie){return ie.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 ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(z-ie.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){He.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 dt(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 dt(te))}))},ae.instanceCounter=0,ae}()},63727:function(Pt,Nt,fe){"use strict";fe.d(Nt,{s:function(){return gt},default:function(){return Sn}});var le=fe(32855),it=fe(27247),Le=fe(3300),Ke=fe(11913),me=fe(43079),ge=fe(37463),He=fe(6551),Ze=fe(6089),Ce=fe(18929),he=fe(59301),Ye=he.createContext({}),pe=Ye,rt=fe(34666),Te=fe(74430),Ae="__rc_cascader_search_mark__",Me=function(qe,Ee,vt){var st=vt.label,pt=st===void 0?"":st;return Ee.some(function(wt){return String(wt[pt]).toLowerCase().includes(qe.toLowerCase())})},ke=function(qe,Ee,vt,st){return Ee.map(function(pt){return pt[st.label]}).join(" / ")},et=function(qe,Ee,vt,st,pt,wt){var jt=pt.filter,Bt=jt===void 0?Me:jt,Gt=pt.render,Dn=Gt===void 0?ke:Gt,bn=pt.limit,Ln=bn===void 0?50:bn,Zn=pt.sort;return he.useMemo(function(){var An=[];if(!qe)return[];function kn(mn,In){var $n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;mn.forEach(function(gn){if(!(!Zn&&Ln!==!1&&Ln>0&&An.length>=Ln)){var Nn=[].concat((0,Le.Z)(In),[gn]),_n=gn[vt.children],Rn=$n||gn.disabled;if((!_n||_n.length===0||wt)&&Bt(qe,Nn,{label:vt.label})){var Ht;An.push((0,it.Z)((0,it.Z)({},gn),{},(Ht={disabled:Rn},(0,Te.Z)(Ht,vt.label,Dn(qe,Nn,st,vt)),(0,Te.Z)(Ht,Ae,Nn),(0,Te.Z)(Ht,vt.children,void 0),Ht)))}_n&&kn(gn[vt.children],Nn,Rn)}})}return kn(Ee,[]),Zn&&An.sort(function(mn,In){return Zn(mn[Ae],In[Ae],qe,vt)}),Ln!==!1&&Ln>0?An.slice(0,Ln):An},[qe,Ee,vt,st,Dn,wt,Bt,Zn,Ln])},tt=et,Qe="__RC_CASCADER_SPLIT__",Re="SHOW_PARENT",_e="SHOW_CHILD";function je(Pe){return Pe.join(Qe)}function ze(Pe){return Pe.map(je)}function bt(Pe){return Pe.split(Qe)}function Ve(Pe){var qe=Pe||{},Ee=qe.label,vt=qe.value,st=qe.children,pt=vt||"value";return{label:Ee||"label",value:pt,key:pt,children:st||"children"}}function Ne(Pe,qe){var Ee,vt;return(Ee=Pe.isLeaf)!==null&&Ee!==void 0?Ee:!((vt=Pe[qe.children])!==null&&vt!==void 0&&vt.length)}function ht(Pe){var qe=Pe.parentElement;if(qe){var Ee=Pe.offsetTop-qe.offsetTop;Ee-qe.scrollTop<0?qe.scrollTo({top:Ee}):Ee+Pe.offsetHeight-qe.scrollTop>qe.offsetHeight&&qe.scrollTo({top:Ee+Pe.offsetHeight-qe.offsetHeight})}}function Be(Pe,qe){return Pe.map(function(Ee){var vt;return(vt=Ee[Ae])===null||vt===void 0?void 0:vt.map(function(st){return st[qe.value]})})}function Xe(Pe){return Array.isArray(Pe)&&Array.isArray(Pe[0])}function we(Pe){return Pe?Xe(Pe)?Pe:(Pe.length===0?[]:[Pe]).map(function(qe){return Array.isArray(qe)?qe:[qe]}):[]}function Ge(Pe,qe,Ee){var vt=new Set(Pe),st=qe();return Pe.filter(function(pt){var wt=st[pt],jt=wt?wt.parent:null,Bt=wt?wt.children:null;return wt&&wt.node.disabled?!0:Ee===_e?!(Bt&&Bt.some(function(Gt){return Gt.key&&vt.has(Gt.key)})):!(jt&&!jt.node.disabled&&vt.has(jt.key))})}function mt(Pe,qe,Ee){for(var vt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,st=qe,pt=[],wt=function(){var Gt,Dn,bn,Ln=Pe[jt],Zn=(Gt=st)===null||Gt===void 0?void 0:Gt.findIndex(function(kn){var mn=kn[Ee.value];return vt?String(mn)===String(Ln):mn===Ln}),An=Zn!==-1?(Dn=st)===null||Dn===void 0?void 0:Dn[Zn]:null;pt.push({value:(bn=An==null?void 0:An[Ee.value])!==null&&bn!==void 0?bn:Ln,index:Zn,option:An}),st=An==null?void 0:An[Ee.children]},jt=0;jt<Pe.length;jt+=1)wt();return pt}var ut=function(Pe,qe,Ee,vt,st){return he.useMemo(function(){var pt=st||function(wt){var jt=vt?wt.slice(-1):wt,Bt=" / ";return jt.every(function(Gt){return["string","number"].includes((0,rt.Z)(Gt))})?jt.join(Bt):jt.reduce(function(Gt,Dn,bn){var Ln=he.isValidElement(Dn)?he.cloneElement(Dn,{key:bn}):Dn;return bn===0?[Ln]:[].concat((0,Le.Z)(Gt),[Bt,Ln])},[])};return Pe.map(function(wt){var jt,Bt=mt(wt,qe,Ee),Gt=pt(Bt.map(function(bn){var Ln,Zn=bn.option,An=bn.value;return(Ln=Zn==null?void 0:Zn[Ee.label])!==null&&Ln!==void 0?Ln:An}),Bt.map(function(bn){var Ln=bn.option;return Ln})),Dn=je(wt);return{label:Gt,value:Dn,key:Dn,valueCells:wt,disabled:(jt=Bt[Bt.length-1])===null||jt===void 0||(jt=jt.option)===null||jt===void 0?void 0:jt.disabled}})},[Pe,qe,Ee,st,vt])};function Xt(Pe,qe){return he.useCallback(function(Ee){var vt=[],st=[];return Ee.forEach(function(pt){var wt=mt(pt,Pe,qe);wt.every(function(jt){return jt.option})?st.push(pt):vt.push(pt)}),[st,vt]},[Pe,qe])}var Rt=fe(34061),ve=function(Pe,qe){var Ee=he.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),vt=he.useCallback(function(){return Ee.current.options!==Pe&&(Ee.current.options=Pe,Ee.current.info=(0,Rt.I8)(Pe,{fieldNames:qe,initWrapper:function(pt){return(0,it.Z)((0,it.Z)({},pt),{},{pathKeyEntities:{}})},processEntity:function(pt,wt){var jt=pt.nodes.map(function(Bt){return Bt[qe.value]}).join(Qe);wt.pathKeyEntities[jt]=pt,pt.key=jt}})),Ee.current.info.pathKeyEntities},[qe,Pe]);return vt};function de(Pe,qe){var Ee=he.useMemo(function(){return qe||[]},[qe]),vt=ve(Ee,Pe),st=he.useCallback(function(pt){var wt=vt();return pt.map(function(jt){var Bt=wt[jt].nodes;return Bt.map(function(Gt){return Gt[Pe.value]})})},[vt,Pe]);return[Ee,vt,st]}var lt=fe(48736);function Wt(Pe){return he.useMemo(function(){if(!Pe)return[!1,{}];var qe={matchInputWidth:!0,limit:50};return Pe&&(0,rt.Z)(Pe)==="object"&&(qe=(0,it.Z)((0,it.Z)({},qe),Pe)),qe.limit<=0&&(qe.limit=!1),[!0,qe]},[Pe])}var xt=fe(34643);function Oe(Pe,qe,Ee,vt,st,pt,wt,jt){return function(Bt){if(!Pe)qe(Bt);else{var Gt=je(Bt),Dn=ze(Ee),bn=ze(vt),Ln=Dn.includes(Gt),Zn=st.some(function(Rn){return je(Rn)===Gt}),An=Ee,kn=st;if(Zn&&!Ln)kn=st.filter(function(Rn){return je(Rn)!==Gt});else{var mn=Ln?Dn.filter(function(Rn){return Rn!==Gt}):[].concat((0,Le.Z)(Dn),[Gt]),In=pt(),$n;if(Ln){var gn=(0,xt.S)(mn,{checked:!1,halfCheckedKeys:bn},In);$n=gn.checkedKeys}else{var Nn=(0,xt.S)(mn,!0,In);$n=Nn.checkedKeys}var _n=Ge($n,pt,jt);An=wt(_n)}qe([].concat((0,Le.Z)(kn),(0,Le.Z)(An)))}}}function at(Pe,qe,Ee,vt,st){return he.useMemo(function(){var pt=st(qe),wt=(0,Ke.Z)(pt,2),jt=wt[0],Bt=wt[1];if(!Pe||!qe.length)return[jt,[],Bt];var Gt=ze(jt),Dn=Ee(),bn=(0,xt.S)(Gt,!0,Dn),Ln=bn.checkedKeys,Zn=bn.halfCheckedKeys;return[vt(Ln),vt(Zn),Bt]},[Pe,qe,Ee,vt,st])}var ot=fe(92310),en=fe.n(ot),dt=he.memo(function(Pe){var qe=Pe.children;return qe},function(Pe,qe){return!qe.open}),Zt=dt;function We(Pe){var qe,Ee=Pe.prefixCls,vt=Pe.checked,st=Pe.halfChecked,pt=Pe.disabled,wt=Pe.onClick,jt=Pe.disableCheckbox,Bt=he.useContext(pe),Gt=Bt.checkable,Dn=typeof Gt!="boolean"?Gt:null;return he.createElement("span",{className:en()("".concat(Ee),(qe={},(0,Te.Z)(qe,"".concat(Ee,"-checked"),vt),(0,Te.Z)(qe,"".concat(Ee,"-indeterminate"),!vt&&st),(0,Te.Z)(qe,"".concat(Ee,"-disabled"),pt||jt),qe)),onClick:wt},Dn)}var Ct="__cascader_fix_label__";function St(Pe){var qe=Pe.prefixCls,Ee=Pe.multiple,vt=Pe.options,st=Pe.activeValue,pt=Pe.prevValuePath,wt=Pe.onToggleOpen,jt=Pe.onSelect,Bt=Pe.onActive,Gt=Pe.checkedSet,Dn=Pe.halfCheckedSet,bn=Pe.loadingKeys,Ln=Pe.isSelectable,Zn=Pe.disabled,An="".concat(qe,"-menu"),kn="".concat(qe,"-menu-item"),mn=he.useContext(pe),In=mn.fieldNames,$n=mn.changeOnSelect,gn=mn.expandTrigger,Nn=mn.expandIcon,_n=mn.loadingIcon,Rn=mn.dropdownMenuColumnStyle,Ht=mn.optionRender,Qt=gn==="hover",un=function(Pn){return Zn||Pn},xn=he.useMemo(function(){return vt.map(function(yn){var Pn,Hn=yn.disabled,Mn=yn.disableCheckbox,Fn=yn[Ae],qn=(Pn=yn[Ct])!==null&&Pn!==void 0?Pn:yn[In.label],At=yn[In.value],nt=Ne(yn,In),Vt=Fn?Fn.map(function(Et){return Et[In.value]}):[].concat((0,Le.Z)(pt),[At]),vn=je(Vt),Vn=bn.includes(vn),xe=Gt.has(vn),De=Dn.has(vn);return{disabled:Hn,label:qn,value:At,isLeaf:nt,isLoading:Vn,checked:xe,halfChecked:De,option:yn,disableCheckbox:Mn,fullPath:Vt,fullPathKey:vn}})},[vt,Gt,In,Dn,bn,pt]);return he.createElement("ul",{className:An,role:"menu"},xn.map(function(yn){var Pn,Hn=yn.disabled,Mn=yn.label,Fn=yn.value,qn=yn.isLeaf,At=yn.isLoading,nt=yn.checked,Vt=yn.halfChecked,vn=yn.option,Vn=yn.fullPath,xe=yn.fullPathKey,De=yn.disableCheckbox,Et=function(){if(!un(Hn)){var zt=(0,Le.Z)(Vn);Qt&&qn&&zt.pop(),Bt(zt)}},ct=function(){Ln(vn)&&!un(Hn)&&jt(Vn,qn)},Ie;return typeof vn.title=="string"?Ie=vn.title:typeof Mn=="string"&&(Ie=Mn),he.createElement("li",{key:xe,className:en()(kn,(Pn={},(0,Te.Z)(Pn,"".concat(kn,"-expand"),!qn),(0,Te.Z)(Pn,"".concat(kn,"-active"),st===Fn||st===xe),(0,Te.Z)(Pn,"".concat(kn,"-disabled"),un(Hn)),(0,Te.Z)(Pn,"".concat(kn,"-loading"),At),Pn)),style:Rn,role:"menuitemcheckbox",title:Ie,"aria-checked":nt,"data-path-key":xe,onClick:function(){Et(),!De&&(!Ee||qn)&&ct()},onDoubleClick:function(){$n&&wt(!1)},onMouseEnter:function(){Qt&&Et()},onMouseDown:function(zt){zt.preventDefault()}},Ee&&he.createElement(We,{prefixCls:"".concat(qe,"-checkbox"),checked:nt,halfChecked:Vt,disabled:un(Hn)||De,disableCheckbox:De,onClick:function(zt){De||(zt.stopPropagation(),ct())}}),he.createElement("div",{className:"".concat(kn,"-content")},Ht?Ht(vn):Mn),!At&&Nn&&!qn&&he.createElement("div",{className:"".concat(kn,"-expand-icon")},Nn),At&&_n&&he.createElement("div",{className:"".concat(kn,"-loading-icon")},_n))}))}var ae=function(qe,Ee){var vt=he.useContext(pe),st=vt.values,pt=st[0],wt=he.useState([]),jt=(0,Ke.Z)(wt,2),Bt=jt[0],Gt=jt[1];return he.useEffect(function(){qe||Gt(pt||[])},[Ee,pt]),[Bt,Gt]},te=ae,z=fe(10228),ie=function(Pe,qe,Ee,vt,st,pt,wt){var jt=wt.direction,Bt=wt.searchValue,Gt=wt.toggleOpen,Dn=wt.open,bn=jt==="rtl",Ln=he.useMemo(function(){for(var Rn=-1,Ht=qe,Qt=[],un=[],xn=vt.length,yn=Be(qe,Ee),Pn=function(At){var nt=Ht.findIndex(function(Vt,vn){return(yn[vn]?je(yn[vn]):Vt[Ee.value])===vt[At]});if(nt===-1)return 1;Rn=nt,Qt.push(Rn),un.push(vt[At]),Ht=Ht[Rn][Ee.children]},Hn=0;Hn<xn&&Ht&&!Pn(Hn);Hn+=1);for(var Mn=qe,Fn=0;Fn<Qt.length-1;Fn+=1)Mn=Mn[Qt[Fn]][Ee.children];return[un,Rn,Mn,yn]},[vt,Ee,qe]),Zn=(0,Ke.Z)(Ln,4),An=Zn[0],kn=Zn[1],mn=Zn[2],In=Zn[3],$n=function(Ht){st(Ht)},gn=function(Ht){var Qt=mn.length,un=kn;un===-1&&Ht<0&&(un=Qt);for(var xn=0;xn<Qt;xn+=1){un=(un+Ht+Qt)%Qt;var yn=mn[un];if(yn&&!yn.disabled){var Pn=An.slice(0,-1).concat(In[un]?je(In[un]):yn[Ee.value]);$n(Pn);return}}},Nn=function(){if(An.length>1){var Ht=An.slice(0,-1);$n(Ht)}else Gt(!1)},_n=function(){var Ht,Qt=((Ht=mn[kn])===null||Ht===void 0?void 0:Ht[Ee.children])||[],un=Qt.find(function(yn){return!yn.disabled});if(un){var xn=[].concat((0,Le.Z)(An),[un[Ee.value]]);$n(xn)}};he.useImperativeHandle(Pe,function(){return{onKeyDown:function(Ht){var Qt=Ht.which;switch(Qt){case z.Z.UP:case z.Z.DOWN:{var un=0;Qt===z.Z.UP?un=-1:Qt===z.Z.DOWN&&(un=1),un!==0&&gn(un);break}case z.Z.LEFT:{if(Bt)break;bn?_n():Nn();break}case z.Z.RIGHT:{if(Bt)break;bn?Nn():_n();break}case z.Z.BACKSPACE:{Bt||Nn();break}case z.Z.ENTER:{if(An.length){var xn=mn[kn],yn=(xn==null?void 0:xn[Ae])||[];yn.length?pt(yn.map(function(Pn){return Pn[Ee.value]}),yn[yn.length-1]):pt(An,mn[kn])}break}case z.Z.ESC:Gt(!1),Dn&&Ht.stopPropagation()}},onKeyUp:function(){}}})},ue=he.forwardRef(function(Pe,qe){var Ee,vt,st,pt=Pe.prefixCls,wt=Pe.multiple,jt=Pe.searchValue,Bt=Pe.toggleOpen,Gt=Pe.notFoundContent,Dn=Pe.direction,bn=Pe.open,Ln=Pe.disabled,Zn=he.useRef(null),An=Dn==="rtl",kn=he.useContext(pe),mn=kn.options,In=kn.values,$n=kn.halfValues,gn=kn.fieldNames,Nn=kn.changeOnSelect,_n=kn.onSelect,Rn=kn.searchOptions,Ht=kn.dropdownPrefixCls,Qt=kn.loadData,un=kn.expandTrigger,xn=Ht||pt,yn=he.useState([]),Pn=(0,Ke.Z)(yn,2),Hn=Pn[0],Mn=Pn[1],Fn=function(nn){if(!(!Qt||jt)){var Ft=mt(nn,mn,gn),rn=Ft.map(function(Tn){var ar=Tn.option;return ar}),ln=rn[rn.length-1];if(ln&&!Ne(ln,gn)){var Bn=je(nn);Mn(function(Tn){return[].concat((0,Le.Z)(Tn),[Bn])}),Qt(rn)}}};he.useEffect(function(){Hn.length&&Hn.forEach(function(Fe){var nn=bt(Fe),Ft=mt(nn,mn,gn,!0).map(function(ln){var Bn=ln.option;return Bn}),rn=Ft[Ft.length-1];(!rn||rn[gn.children]||Ne(rn,gn))&&Mn(function(ln){return ln.filter(function(Bn){return Bn!==Fe})})})},[mn,Hn,gn]);var qn=he.useMemo(function(){return new Set(ze(In))},[In]),At=he.useMemo(function(){return new Set(ze($n))},[$n]),nt=te(wt,bn),Vt=(0,Ke.Z)(nt,2),vn=Vt[0],Vn=Vt[1],xe=function(nn){Vn(nn),Fn(nn)},De=function(nn){if(Ln)return!1;var Ft=nn.disabled,rn=Ne(nn,gn);return!Ft&&(rn||Nn||wt)},Et=function(nn,Ft){var rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;_n(nn),!wt&&(Ft||Nn&&(un==="hover"||rn))&&Bt(!1)},ct=he.useMemo(function(){return jt?Rn:mn},[jt,Rn,mn]),Ie=he.useMemo(function(){for(var Fe=[{options:ct}],nn=ct,Ft=Be(nn,gn),rn=function(){var Tn=vn[ln],ar=nn.find(function(jn,or){return(Ft[or]?je(Ft[or]):jn[gn.value])===Tn}),Gn=ar==null?void 0:ar[gn.children];if(!(Gn!=null&&Gn.length))return 1;nn=Gn,Fe.push({options:Gn})},ln=0;ln<vn.length&&!rn();ln+=1);return Fe},[ct,vn,gn]),ft=function(nn,Ft){De(Ft)&&Et(nn,Ne(Ft,gn),!0)};ie(qe,ct,gn,vn,xe,ft,{direction:Dn,searchValue:jt,toggleOpen:Bt,open:bn}),he.useEffect(function(){if(!jt)for(var Fe=0;Fe<vn.length;Fe+=1){var nn,Ft=vn.slice(0,Fe+1),rn=je(Ft),ln=(nn=Zn.current)===null||nn===void 0?void 0:nn.querySelector('li[data-path-key="'.concat(rn.replace(/\\{0,2}"/g,'\\"'),'"]'));ln&&ht(ln)}},[vn,jt]);var zt=!((Ee=Ie[0])!==null&&Ee!==void 0&&(Ee=Ee.options)!==null&&Ee!==void 0&&Ee.length),an=[(vt={},(0,Te.Z)(vt,gn.value,"__EMPTY__"),(0,Te.Z)(vt,Ct,Gt),(0,Te.Z)(vt,"disabled",!0),vt)],pn=(0,it.Z)((0,it.Z)({},Pe),{},{multiple:!zt&&wt,onSelect:Et,onActive:xe,onToggleOpen:Bt,checkedSet:qn,halfCheckedSet:At,loadingKeys:Hn,isSelectable:De}),Lt=zt?[{options:an}]:Ie,Ut=Lt.map(function(Fe,nn){var Ft=vn.slice(0,nn),rn=vn[nn];return he.createElement(St,(0,le.Z)({key:nn},pn,{prefixCls:xn,options:Fe.options,prevValuePath:Ft,activeValue:rn}))});return he.createElement(Zt,{open:bn},he.createElement("div",{className:en()("".concat(xn,"-menus"),(st={},(0,Te.Z)(st,"".concat(xn,"-menu-empty"),zt),(0,Te.Z)(st,"".concat(xn,"-rtl"),An),st)),ref:Zn},Ut))}),ne=ue,be=he.forwardRef(function(Pe,qe){var Ee=(0,ge.lk)();return he.createElement(ne,(0,le.Z)({},Pe,Ee,{ref:qe}))}),$e=be,It=fe(70425);function Dt(){}function gt(Pe){var qe,Ee=Pe,vt=Ee.prefixCls,st=vt===void 0?"rc-cascader":vt,pt=Ee.style,wt=Ee.className,jt=Ee.options,Bt=Ee.checkable,Gt=Ee.defaultValue,Dn=Ee.value,bn=Ee.fieldNames,Ln=Ee.changeOnSelect,Zn=Ee.onChange,An=Ee.showCheckedStrategy,kn=Ee.loadData,mn=Ee.expandTrigger,In=Ee.expandIcon,$n=In===void 0?">":In,gn=Ee.loadingIcon,Nn=Ee.direction,_n=Ee.notFoundContent,Rn=_n===void 0?"Not Found":_n,Ht=Ee.disabled,Qt=!!Bt,un=(0,It.C8)(Gt,{value:Dn,postState:we}),xn=(0,Ke.Z)(un,2),yn=xn[0],Pn=xn[1],Hn=he.useMemo(function(){return Ve(bn)},[JSON.stringify(bn)]),Mn=de(Hn,jt),Fn=(0,Ke.Z)(Mn,3),qn=Fn[0],At=Fn[1],nt=Fn[2],Vt=Xt(qn,Hn),vn=at(Qt,yn,At,nt,Vt),Vn=(0,Ke.Z)(vn,3),xe=Vn[0],De=Vn[1],Et=Vn[2],ct=(0,It.zX)(function(Lt){if(Pn(Lt),Zn){var Ut=we(Lt),Fe=Ut.map(function(rn){return mt(rn,qn,Hn).map(function(ln){return ln.option})}),nn=Qt?Ut:Ut[0],Ft=Qt?Fe:Fe[0];Zn(nn,Ft)}}),Ie=Oe(Qt,ct,xe,De,Et,At,nt,An),ft=(0,It.zX)(function(Lt){Ie(Lt)}),zt=he.useMemo(function(){return{options:qn,fieldNames:Hn,values:xe,halfValues:De,changeOnSelect:Ln,onSelect:ft,checkable:Bt,searchOptions:[],dropdownPrefixCls:void 0,loadData:kn,expandTrigger:mn,expandIcon:$n,loadingIcon:gn,dropdownMenuColumnStyle:void 0}},[qn,Hn,xe,De,Ln,ft,Bt,kn,mn,$n,gn]),an="".concat(st,"-panel"),pn=!qn.length;return he.createElement(pe.Provider,{value:zt},he.createElement("div",{className:en()(an,(qe={},(0,Te.Z)(qe,"".concat(an,"-rtl"),Nn==="rtl"),(0,Te.Z)(qe,"".concat(an,"-empty"),pn),qe),wt),style:pt},pn?Rn:he.createElement(ne,{prefixCls:st,searchValue:"",multiple:Qt,toggleOpen:Dt,open:!0,direction:Nn,disabled:Ht})))}function kt(Pe){var qe=Pe.onPopupVisibleChange,Ee=Pe.popupVisible,vt=Pe.popupClassName,st=Pe.popupPlacement;warning(!qe,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Ee===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(vt===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(st===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function tn(Pe,qe){if(Pe){var Ee=function vt(st){for(var pt=0;pt<st.length;pt++){var wt=st[pt];if(wt[qe==null?void 0:qe.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(wt[qe==null?void 0:qe.children])&&vt(wt[qe==null?void 0:qe.children]))return!0}};Ee(Pe)}}var Jt=null,dn=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],sn=he.forwardRef(function(Pe,qe){var Ee=Pe.id,vt=Pe.prefixCls,st=vt===void 0?"rc-cascader":vt,pt=Pe.fieldNames,wt=Pe.defaultValue,jt=Pe.value,Bt=Pe.changeOnSelect,Gt=Pe.onChange,Dn=Pe.displayRender,bn=Pe.checkable,Ln=Pe.autoClearSearchValue,Zn=Ln===void 0?!0:Ln,An=Pe.searchValue,kn=Pe.onSearch,mn=Pe.showSearch,In=Pe.expandTrigger,$n=Pe.options,gn=Pe.dropdownPrefixCls,Nn=Pe.loadData,_n=Pe.popupVisible,Rn=Pe.open,Ht=Pe.popupClassName,Qt=Pe.dropdownClassName,un=Pe.dropdownMenuColumnStyle,xn=Pe.dropdownStyle,yn=Pe.popupPlacement,Pn=Pe.placement,Hn=Pe.onDropdownVisibleChange,Mn=Pe.onPopupVisibleChange,Fn=Pe.expandIcon,qn=Fn===void 0?">":Fn,At=Pe.loadingIcon,nt=Pe.children,Vt=Pe.dropdownMatchSelectWidth,vn=Vt===void 0?!1:Vt,Vn=Pe.showCheckedStrategy,xe=Vn===void 0?Re:Vn,De=Pe.optionRender,Et=(0,me.Z)(Pe,dn),ct=(0,He.ZP)(Ee),Ie=!!bn,ft=(0,Ce.Z)(wt,{value:jt,postState:we}),zt=(0,Ke.Z)(ft,2),an=zt[0],pn=zt[1],Lt=he.useMemo(function(){return Ve(pt)},[JSON.stringify(pt)]),Ut=de(Lt,$n),Fe=(0,Ke.Z)(Ut,3),nn=Fe[0],Ft=Fe[1],rn=Fe[2],ln=(0,Ce.Z)("",{value:An,postState:function(Sr){return Sr||""}}),Bn=(0,Ke.Z)(ln,2),Tn=Bn[0],ar=Bn[1],Gn=function(Sr,wr){ar(Sr),wr.source!=="blur"&&kn&&kn(Sr)},jn=Wt(mn),or=(0,Ke.Z)(jn,2),Kn=or[0],gr=or[1],Mr=tt(Tn,nn,Lt,gn||st,gr,Bt||Ie),yr=Xt(nn,Lt),Cr=at(Ie,an,Ft,rn,yr),kr=(0,Ke.Z)(Cr,3),hr=kr[0],sr=kr[1],Dr=kr[2],dr=he.useMemo(function(){var Pr=ze(hr),Sr=Ge(Pr,Ft,xe);return[].concat((0,Le.Z)(Dr),(0,Le.Z)(rn(Sr)))},[hr,Ft,rn,Dr,xe]),br=ut(dr,nn,Lt,Ie,Dn),xr=(0,Ze.Z)(function(Pr){if(pn(Pr),Gt){var Sr=we(Pr),wr=Sr.map(function(Kt){return mt(Kt,nn,Lt).map(function(wn){return wn.option})}),Yn=Ie?Sr:Sr[0],Mt=Ie?wr:wr[0];Gt(Yn,Mt)}}),Br=Oe(Ie,xr,hr,sr,Dr,Ft,rn,xe),fr=(0,Ze.Z)(function(Pr){(!Ie||Zn)&&ar(""),Br(Pr)}),ur=function(Sr,wr){if(wr.type==="clear"){xr([]);return}var Yn=wr.values[0],Mt=Yn.valueCells;fr(Mt)},nr=Rn!==void 0?Rn:_n,Tr=Qt||Ht,Zr=Pn||yn,Gr=function(Sr){Hn==null||Hn(Sr),Mn==null||Mn(Sr)},cr=he.useMemo(function(){return{options:nn,fieldNames:Lt,values:hr,halfValues:sr,changeOnSelect:Bt,onSelect:fr,checkable:bn,searchOptions:Mr,dropdownPrefixCls:gn,loadData:Nn,expandTrigger:In,expandIcon:qn,loadingIcon:At,dropdownMenuColumnStyle:un,optionRender:De}},[nn,Lt,hr,sr,Bt,fr,bn,Mr,gn,Nn,In,qn,At,un,De]),Jr=!(Tn?Mr:nn).length,pr=Tn&&gr.matchInputWidth||Jr?{}:{minWidth:"auto"};return he.createElement(pe.Provider,{value:cr},he.createElement(ge.Ac,(0,le.Z)({},Et,{ref:qe,id:ct,prefixCls:st,autoClearSearchValue:Zn,dropdownMatchSelectWidth:vn,dropdownStyle:(0,it.Z)((0,it.Z)({},pr),xn),displayValues:br,onDisplayValuesChange:ur,mode:Ie?"multiple":void 0,searchValue:Tn,onSearch:Gn,showSearch:Kn,OptionList:$e,emptyOptions:Jr,open:nr,dropdownClassName:Tr,placement:Zr,onDropdownVisibleChange:Gr,getRawInputElement:function(){return nt}})))});sn.SHOW_PARENT=Re,sn.SHOW_CHILD=_e,sn.Panel=gt;var _t=sn,Sn=_t},66042:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Xe}});var le=fe(27247),it=fe(11913),Le=fe(43403),Ke=fe(34280),me=fe(59301),ge=me.createContext(null),He=me.createContext({}),Ze=ge,Ce=fe(74430),he=fe(32855),Ye=fe(92310),pe=fe.n(Ye),rt=fe(77900),Te=fe(10228),Ae=fe(26112),Me=fe(43079),ke=fe(8654),et=["prefixCls","className","containerRef"],tt=function(Ge){var mt=Ge.prefixCls,ut=Ge.className,Xt=Ge.containerRef,Rt=(0,Me.Z)(Ge,et),ve=me.useContext(He),de=ve.panel,lt=(0,ke.x1)(de,Xt);return me.createElement("div",(0,he.Z)({className:pe()("".concat(mt,"-content"),ut),role:"dialog",ref:lt},(0,Ae.Z)(Ge,{aria:!0}),{"aria-modal":"true"},Rt))},Qe=tt,Re=fe(48736);function _e(we){return typeof we=="string"&&String(Number(we))===we?((0,Re.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(we)):we}function je(we){warning(!("wrapperClassName"in we),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!we.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 bt(we,Ge){var mt,ut,Xt,Rt=we.prefixCls,ve=we.open,de=we.placement,lt=we.inline,Wt=we.push,xt=we.forceRender,Oe=we.autoFocus,at=we.keyboard,ot=we.classNames,en=we.rootClassName,dt=we.rootStyle,Zt=we.zIndex,We=we.className,Ct=we.id,St=we.style,ae=we.motion,te=we.width,z=we.height,ie=we.children,ue=we.mask,ne=we.maskClosable,be=we.maskMotion,$e=we.maskClassName,It=we.maskStyle,Dt=we.afterOpenChange,gt=we.onClose,kt=we.onMouseEnter,tn=we.onMouseOver,Jt=we.onMouseLeave,dn=we.onClick,sn=we.onKeyDown,_t=we.onKeyUp,Sn=we.styles,Pe=we.drawerRender,qe=me.useRef(),Ee=me.useRef(),vt=me.useRef();me.useImperativeHandle(Ge,function(){return qe.current});var st=function(Nn){var _n=Nn.keyCode,Rn=Nn.shiftKey;switch(_n){case Te.Z.TAB:{if(_n===Te.Z.TAB){if(!Rn&&document.activeElement===vt.current){var Ht;(Ht=Ee.current)===null||Ht===void 0||Ht.focus({preventScroll:!0})}else if(Rn&&document.activeElement===Ee.current){var Qt;(Qt=vt.current)===null||Qt===void 0||Qt.focus({preventScroll:!0})}}break}case Te.Z.ESC:{gt&&at&&(Nn.stopPropagation(),gt(Nn));break}}};me.useEffect(function(){if(ve&&Oe){var gn;(gn=qe.current)===null||gn===void 0||gn.focus({preventScroll:!0})}},[ve]);var pt=me.useState(!1),wt=(0,it.Z)(pt,2),jt=wt[0],Bt=wt[1],Gt=me.useContext(Ze),Dn;typeof Wt=="boolean"?Dn=Wt?{}:{distance:0}:Dn=Wt||{};var bn=(mt=(ut=(Xt=Dn)===null||Xt===void 0?void 0:Xt.distance)!==null&&ut!==void 0?ut:Gt==null?void 0:Gt.pushDistance)!==null&&mt!==void 0?mt:180,Ln=me.useMemo(function(){return{pushDistance:bn,push:function(){Bt(!0)},pull:function(){Bt(!1)}}},[bn]);me.useEffect(function(){if(ve){var gn;Gt==null||(gn=Gt.push)===null||gn===void 0||gn.call(Gt)}else{var Nn;Gt==null||(Nn=Gt.pull)===null||Nn===void 0||Nn.call(Gt)}},[ve]),me.useEffect(function(){return function(){var gn;Gt==null||(gn=Gt.pull)===null||gn===void 0||gn.call(Gt)}},[]);var Zn=ue&&me.createElement(rt.default,(0,he.Z)({key:"mask"},be,{visible:ve}),function(gn,Nn){var _n=gn.className,Rn=gn.style;return me.createElement("div",{className:pe()("".concat(Rt,"-mask"),_n,ot==null?void 0:ot.mask,$e),style:(0,le.Z)((0,le.Z)((0,le.Z)({},Rn),It),Sn==null?void 0:Sn.mask),onClick:ne&&ve?gt:void 0,ref:Nn})}),An=typeof ae=="function"?ae(de):ae,kn={};if(jt&&bn)switch(de){case"top":kn.transform="translateY(".concat(bn,"px)");break;case"bottom":kn.transform="translateY(".concat(-bn,"px)");break;case"left":kn.transform="translateX(".concat(bn,"px)");break;default:kn.transform="translateX(".concat(-bn,"px)");break}de==="left"||de==="right"?kn.width=_e(te):kn.height=_e(z);var mn={onMouseEnter:kt,onMouseOver:tn,onMouseLeave:Jt,onClick:dn,onKeyDown:sn,onKeyUp:_t},In=me.createElement(rt.default,(0,he.Z)({key:"panel"},An,{visible:ve,forceRender:xt,onVisibleChanged:function(Nn){Dt==null||Dt(Nn)},removeOnLeave:!1,leavedClassName:"".concat(Rt,"-content-wrapper-hidden")}),function(gn,Nn){var _n=gn.className,Rn=gn.style,Ht=me.createElement(Qe,(0,he.Z)({id:Ct,containerRef:Nn,prefixCls:Rt,className:pe()(We,ot==null?void 0:ot.content),style:(0,le.Z)((0,le.Z)({},St),Sn==null?void 0:Sn.content)},(0,Ae.Z)(we,{aria:!0}),mn),ie);return me.createElement("div",(0,he.Z)({className:pe()("".concat(Rt,"-content-wrapper"),ot==null?void 0:ot.wrapper,_n),style:(0,le.Z)((0,le.Z)((0,le.Z)({},kn),Rn),Sn==null?void 0:Sn.wrapper)},(0,Ae.Z)(we,{data:!0})),Pe?Pe(Ht):Ht)}),$n=(0,le.Z)({},dt);return Zt&&($n.zIndex=Zt),me.createElement(Ze.Provider,{value:Ln},me.createElement("div",{className:pe()(Rt,"".concat(Rt,"-").concat(de),en,(0,Ce.Z)((0,Ce.Z)({},"".concat(Rt,"-open"),ve),"".concat(Rt,"-inline"),lt)),style:$n,tabIndex:-1,ref:qe,onKeyDown:st},Zn,me.createElement("div",{tabIndex:0,ref:Ee,style:ze,"aria-hidden":"true","data-sentinel":"start"}),In,me.createElement("div",{tabIndex:0,ref:vt,style:ze,"aria-hidden":"true","data-sentinel":"end"})))}var Ve=me.forwardRef(bt),Ne=Ve,ht=function(Ge){var mt=Ge.open,ut=mt===void 0?!1:mt,Xt=Ge.prefixCls,Rt=Xt===void 0?"rc-drawer":Xt,ve=Ge.placement,de=ve===void 0?"right":ve,lt=Ge.autoFocus,Wt=lt===void 0?!0:lt,xt=Ge.keyboard,Oe=xt===void 0?!0:xt,at=Ge.width,ot=at===void 0?378:at,en=Ge.mask,dt=en===void 0?!0:en,Zt=Ge.maskClosable,We=Zt===void 0?!0:Zt,Ct=Ge.getContainer,St=Ge.forceRender,ae=Ge.afterOpenChange,te=Ge.destroyOnClose,z=Ge.onMouseEnter,ie=Ge.onMouseOver,ue=Ge.onMouseLeave,ne=Ge.onClick,be=Ge.onKeyDown,$e=Ge.onKeyUp,It=Ge.panelRef,Dt=me.useState(!1),gt=(0,it.Z)(Dt,2),kt=gt[0],tn=gt[1],Jt=me.useState(!1),dn=(0,it.Z)(Jt,2),sn=dn[0],_t=dn[1];(0,Ke.Z)(function(){_t(!0)},[]);var Sn=sn?ut:!1,Pe=me.useRef(),qe=me.useRef();(0,Ke.Z)(function(){Sn&&(qe.current=document.activeElement)},[Sn]);var Ee=function(jt){var Bt;if(tn(jt),ae==null||ae(jt),!jt&&qe.current&&!((Bt=Pe.current)!==null&&Bt!==void 0&&Bt.contains(qe.current))){var Gt;(Gt=qe.current)===null||Gt===void 0||Gt.focus({preventScroll:!0})}},vt=me.useMemo(function(){return{panel:It}},[It]);if(!St&&!kt&&!Sn&&te)return null;var st={onMouseEnter:z,onMouseOver:ie,onMouseLeave:ue,onClick:ne,onKeyDown:be,onKeyUp:$e},pt=(0,le.Z)((0,le.Z)({},Ge),{},{open:Sn,prefixCls:Rt,placement:de,autoFocus:Wt,keyboard:Oe,width:ot,mask:dt,maskClosable:We,inline:Ct===!1,afterOpenChange:Ee,ref:Pe},st);return me.createElement(He.Provider,{value:vt},me.createElement(Le.Z,{open:Sn||St||kt,autoDestroy:!1,getContainer:Ct,autoLock:dt&&(Sn||kt)},me.createElement(Ne,pt)))},Be=ht,Xe=Be},6551:function(Pt,Nt,fe){"use strict";fe.d(Nt,{ZP:function(){return He}});var le=fe(11913),it=fe(59301),Le=fe(47273),Ke=0,me=(0,Le.Z)();function ge(){var Ze;return me?(Ze=Ke,Ke+=1):Ze="TEST_OR_SSR",Ze}function He(Ze){var Ce=it.useState(),he=(0,le.Z)(Ce,2),Ye=he[0],pe=he[1];return it.useEffect(function(){pe("rc_select_".concat(ge()))},[]),Ze||Ye}},37463:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Ac:function(){return Ee},Xo:function(){return st},Wx:function(){return wt},ZP:function(){return Vn},lk:function(){return Qe}});var le=fe(32855),it=fe(3300),Le=fe(74430),Ke=fe(27247),me=fe(11913),ge=fe(43079),He=fe(34666),Ze=fe(18929),Ce=fe(48736),he=fe(59301),Ye=fe(92310),pe=fe.n(Ye),rt=fe(34280),Te=fe(49658),Ae=fe(8654),Me=function(De){var Et=De.className,ct=De.customizeIcon,Ie=De.customizeIconProps,ft=De.children,zt=De.onMouseDown,an=De.onClick,pn=typeof ct=="function"?ct(Ie):ct;return he.createElement("span",{className:Et,onMouseDown:function(Ut){Ut.preventDefault(),zt==null||zt(Ut)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:an,"aria-hidden":!0},pn!==void 0?pn:he.createElement("span",{className:pe()(Et.split(/\s+/).map(function(Lt){return"".concat(Lt,"-icon")}))},ft))},ke=Me,et=function(De,Et,ct,Ie,ft){var zt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,an=arguments.length>6?arguments[6]:void 0,pn=arguments.length>7?arguments[7]:void 0,Lt=he.useMemo(function(){if((0,He.Z)(Ie)==="object")return Ie.clearIcon;if(ft)return ft},[Ie,ft]),Ut=he.useMemo(function(){return!!(!zt&&Ie&&(ct.length||an)&&!(pn==="combobox"&&an===""))},[Ie,zt,ct.length,an,pn]);return{allowClear:Ut,clearIcon:he.createElement(ke,{className:"".concat(De,"-clear"),onMouseDown:Et,customizeIcon:Lt},"\xD7")}},tt=he.createContext(null);function Qe(){return he.useContext(tt)}function Re(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=he.useState(!1),Et=(0,me.Z)(De,2),ct=Et[0],Ie=Et[1],ft=he.useRef(null),zt=function(){window.clearTimeout(ft.current)};he.useEffect(function(){return zt},[]);var an=function(Lt,Ut){zt(),ft.current=window.setTimeout(function(){Ie(Lt),Ut&&Ut()},xe)};return[ct,an,zt]}function _e(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=he.useRef(null),Et=he.useRef(null);he.useEffect(function(){return function(){window.clearTimeout(Et.current)}},[]);function ct(Ie){(Ie||De.current===null)&&(De.current=Ie),window.clearTimeout(Et.current),Et.current=window.setTimeout(function(){De.current=null},xe)}return[function(){return De.current},ct]}function je(xe,De,Et,ct){var Ie=he.useRef(null);Ie.current={open:De,triggerOpen:Et,customizedTrigger:ct},he.useEffect(function(){function ft(zt){var an;if(!((an=Ie.current)!==null&&an!==void 0&&an.customizedTrigger)){var pn=zt.target;pn.shadowRoot&&zt.composed&&(pn=zt.composedPath()[0]||pn),Ie.current.open&&xe().filter(function(Lt){return Lt}).every(function(Lt){return!Lt.contains(pn)&&Lt!==pn})&&Ie.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ft),function(){return window.removeEventListener("mousedown",ft)}},[])}var ze=fe(10228);function bt(xe){return xe&&![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(xe)}var Ve=fe(26112),Ne=fe(11780);function ht(xe,De,Et){var ct=(0,Ke.Z)((0,Ke.Z)({},xe),Et?De:{});return Object.keys(De).forEach(function(Ie){var ft=De[Ie];typeof ft=="function"&&(ct[Ie]=function(){for(var zt,an=arguments.length,pn=new Array(an),Lt=0;Lt<an;Lt++)pn[Lt]=arguments[Lt];return ft.apply(void 0,pn),(zt=xe[Ie])===null||zt===void 0?void 0:zt.call.apply(zt,[xe].concat(pn))})}),ct}var Be=ht,Xe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],we=function(De,Et){var ct=De.prefixCls,Ie=De.id,ft=De.inputElement,zt=De.autoFocus,an=De.autoComplete,pn=De.editable,Lt=De.activeDescendantId,Ut=De.value,Fe=De.open,nn=De.attrs,Ft=(0,ge.Z)(De,Xe),rn=ft||he.createElement("input",null),ln=rn,Bn=ln.ref,Tn=ln.props;return(0,Ce.Kp)(!("maxLength"in rn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),rn=he.cloneElement(rn,(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({type:"search"},Be(Ft,Tn,!0)),{},{id:Ie,ref:(0,Ae.sQ)(Et,Bn),autoComplete:an||"off",autoFocus:zt,className:pe()("".concat(ct,"-selection-search-input"),Tn==null?void 0:Tn.className),role:"combobox","aria-expanded":Fe||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ie,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ie,"_list"),"aria-activedescendant":Fe?Lt:void 0},nn),{},{value:pn?Ut:"",readOnly:!pn,unselectable:pn?null:"on",style:(0,Ke.Z)((0,Ke.Z)({},Tn.style),{},{opacity:pn?null:0})})),rn},Ge=he.forwardRef(we),mt=Ge;function ut(xe){return Array.isArray(xe)?xe:xe!==void 0?[xe]:[]}var Xt=typeof window!="undefined"&&window.document&&window.document.documentElement,Rt=Xt;function ve(xe){return xe!=null}function de(xe){return!xe&&xe!==0}function lt(xe){return["string","number"].includes((0,He.Z)(xe))}function Wt(xe){var De=void 0;return xe&&(lt(xe.title)?De=xe.title.toString():lt(xe.label)&&(De=xe.label.toString())),De}function xt(xe,De){Rt?he.useLayoutEffect(xe,De):he.useEffect(xe,De)}function Oe(xe){var De;return(De=xe.key)!==null&&De!==void 0?De:xe.value}var at=function(De){De.preventDefault(),De.stopPropagation()},ot=function(De){var Et=De.id,ct=De.prefixCls,Ie=De.values,ft=De.open,zt=De.searchValue,an=De.autoClearSearchValue,pn=De.inputRef,Lt=De.placeholder,Ut=De.disabled,Fe=De.mode,nn=De.showSearch,Ft=De.autoFocus,rn=De.autoComplete,ln=De.activeDescendantId,Bn=De.tabIndex,Tn=De.removeIcon,ar=De.maxTagCount,Gn=De.maxTagTextLength,jn=De.maxTagPlaceholder,or=jn===void 0?function(wn){return"+ ".concat(wn.length," ...")}:jn,Kn=De.tagRender,gr=De.onToggleOpen,Mr=De.onRemove,yr=De.onInputChange,Cr=De.onInputPaste,kr=De.onInputKeyDown,hr=De.onInputMouseDown,sr=De.onInputCompositionStart,Dr=De.onInputCompositionEnd,dr=De.onInputBlur,br=he.useRef(null),xr=(0,he.useState)(0),Br=(0,me.Z)(xr,2),fr=Br[0],ur=Br[1],nr=(0,he.useState)(!1),Tr=(0,me.Z)(nr,2),Zr=Tr[0],Gr=Tr[1],cr="".concat(ct,"-selection"),Jr=ft||Fe==="multiple"&&an===!1||Fe==="tags"?zt:"",pr=Fe==="tags"||Fe==="multiple"&&an===!1||nn&&(ft||Zr);xt(function(){ur(br.current.scrollWidth)},[Jr]);var Pr=function(cn,Wn,Yt,Ot,$t){return he.createElement("span",{title:Wt(cn),className:pe()("".concat(cr,"-item"),(0,Le.Z)({},"".concat(cr,"-item-disabled"),Yt))},he.createElement("span",{className:"".concat(cr,"-item-content")},Wn),Ot&&he.createElement(ke,{className:"".concat(cr,"-item-remove"),onMouseDown:at,onClick:$t,customizeIcon:Tn},"\xD7"))},Sr=function(cn,Wn,Yt,Ot,$t,on){var Jn=function(Lr){at(Lr),gr(!ft)};return he.createElement("span",{onMouseDown:Jn},Kn({label:Wn,value:cn,disabled:Yt,closable:Ot,onClose:$t,isMaxTag:!!on}))},wr=function(cn){var Wn=cn.disabled,Yt=cn.label,Ot=cn.value,$t=!Ut&&!Wn,on=Yt;if(typeof Gn=="number"&&(typeof Yt=="string"||typeof Yt=="number")){var Jn=String(on);Jn.length>Gn&&(on="".concat(Jn.slice(0,Gn),"..."))}var er=function(rr){rr&&rr.stopPropagation(),Mr(cn)};return typeof Kn=="function"?Sr(Ot,on,Wn,$t,er):Pr(cn,on,Wn,$t,er)},Yn=function(cn){if(!Ie.length)return null;var Wn=typeof or=="function"?or(cn):or;return typeof Kn=="function"?Sr(void 0,Wn,!1,!1,void 0,!0):Pr({title:Wn},Wn,!1)},Mt=he.createElement("div",{className:"".concat(cr,"-search"),style:{width:fr},onFocus:function(){Gr(!0)},onBlur:function(){Gr(!1)}},he.createElement(mt,{ref:pn,open:ft,prefixCls:ct,id:Et,inputElement:null,disabled:Ut,autoFocus:Ft,autoComplete:rn,editable:pr,activeDescendantId:ln,value:Jr,onKeyDown:kr,onMouseDown:hr,onChange:yr,onPaste:Cr,onCompositionStart:sr,onCompositionEnd:Dr,onBlur:dr,tabIndex:Bn,attrs:(0,Ve.Z)(De,!0)}),he.createElement("span",{ref:br,className:"".concat(cr,"-search-mirror"),"aria-hidden":!0},Jr,"\xA0")),Kt=he.createElement(Ne.Z,{prefixCls:"".concat(cr,"-overflow"),data:Ie,renderItem:wr,renderRest:Yn,suffix:Mt,itemKey:Oe,maxCount:ar});return he.createElement("span",{className:"".concat(cr,"-wrap")},Kt,!Ie.length&&!Jr&&he.createElement("span",{className:"".concat(cr,"-placeholder")},Lt))},en=ot,dt=function(De){var Et=De.inputElement,ct=De.prefixCls,Ie=De.id,ft=De.inputRef,zt=De.disabled,an=De.autoFocus,pn=De.autoComplete,Lt=De.activeDescendantId,Ut=De.mode,Fe=De.open,nn=De.values,Ft=De.placeholder,rn=De.tabIndex,ln=De.showSearch,Bn=De.searchValue,Tn=De.activeValue,ar=De.maxLength,Gn=De.onInputKeyDown,jn=De.onInputMouseDown,or=De.onInputChange,Kn=De.onInputPaste,gr=De.onInputCompositionStart,Mr=De.onInputCompositionEnd,yr=De.onInputBlur,Cr=De.title,kr=he.useState(!1),hr=(0,me.Z)(kr,2),sr=hr[0],Dr=hr[1],dr=Ut==="combobox",br=dr||ln,xr=nn[0],Br=Bn||"";dr&&Tn&&!sr&&(Br=Tn),he.useEffect(function(){dr&&Dr(!1)},[dr,Tn]);var fr=Ut!=="combobox"&&!Fe&&!ln?!1:!!Br,ur=Cr===void 0?Wt(xr):Cr,nr=he.useMemo(function(){return xr?null:he.createElement("span",{className:"".concat(ct,"-selection-placeholder"),style:fr?{visibility:"hidden"}:void 0},Ft)},[xr,fr,Ft,ct]);return he.createElement("span",{className:"".concat(ct,"-selection-wrap")},he.createElement("span",{className:"".concat(ct,"-selection-search")},he.createElement(mt,{ref:ft,prefixCls:ct,id:Ie,open:Fe,inputElement:Et,disabled:zt,autoFocus:an,autoComplete:pn,editable:br,activeDescendantId:Lt,value:Br,onKeyDown:Gn,onMouseDown:jn,onChange:function(Zr){Dr(!0),or(Zr)},onPaste:Kn,onCompositionStart:gr,onCompositionEnd:Mr,onBlur:yr,tabIndex:rn,attrs:(0,Ve.Z)(De,!0),maxLength:dr?ar:void 0})),!dr&&xr?he.createElement("span",{className:"".concat(ct,"-selection-item"),title:ur,style:fr?{visibility:"hidden"}:void 0},xr.label):null,nr)},Zt=dt,We=function(De,Et){var ct=(0,he.useRef)(null),Ie=(0,he.useRef)(!1),ft=De.prefixCls,zt=De.open,an=De.mode,pn=De.showSearch,Lt=De.tokenWithEnter,Ut=De.disabled,Fe=De.prefix,nn=De.autoClearSearchValue,Ft=De.onSearch,rn=De.onSearchSubmit,ln=De.onToggleOpen,Bn=De.onInputKeyDown,Tn=De.onInputBlur,ar=De.domRef;he.useImperativeHandle(Et,function(){return{focus:function(ur){ct.current.focus(ur)},blur:function(){ct.current.blur()}}});var Gn=_e(0),jn=(0,me.Z)(Gn,2),or=jn[0],Kn=jn[1],gr=function(ur){var nr=ur.which,Tr=ct.current instanceof HTMLTextAreaElement;!Tr&&zt&&(nr===ze.Z.UP||nr===ze.Z.DOWN)&&ur.preventDefault(),Bn&&Bn(ur),nr===ze.Z.ENTER&&an==="tags"&&!Ie.current&&!zt&&(rn==null||rn(ur.target.value)),!(Tr&&!zt&&~[ze.Z.UP,ze.Z.DOWN,ze.Z.LEFT,ze.Z.RIGHT].indexOf(nr))&&bt(nr)&&ln(!0)},Mr=function(){Kn(!0)},yr=(0,he.useRef)(null),Cr=function(ur){Ft(ur,!0,Ie.current)!==!1&&ln(!0)},kr=function(){Ie.current=!0},hr=function(ur){Ie.current=!1,an!=="combobox"&&Cr(ur.target.value)},sr=function(ur){var nr=ur.target.value;if(Lt&&yr.current&&/[\r\n]/.test(yr.current)){var Tr=yr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");nr=nr.replace(Tr,yr.current)}yr.current=null,Cr(nr)},Dr=function(ur){var nr=ur.clipboardData,Tr=nr==null?void 0:nr.getData("text");yr.current=Tr||""},dr=function(ur){var nr=ur.target;if(nr!==ct.current){var Tr=document.body.style.msTouchAction!==void 0;Tr?setTimeout(function(){ct.current.focus()}):ct.current.focus()}},br=function(ur){var nr=or();ur.target!==ct.current&&!nr&&!(an==="combobox"&&Ut)&&ur.preventDefault(),(an!=="combobox"&&(!pn||!nr)||!zt)&&(zt&&nn!==!1&&Ft("",!0,!1),ln())},xr={inputRef:ct,onInputKeyDown:gr,onInputMouseDown:Mr,onInputChange:sr,onInputPaste:Dr,onInputCompositionStart:kr,onInputCompositionEnd:hr,onInputBlur:Tn},Br=an==="multiple"||an==="tags"?he.createElement(en,(0,le.Z)({},De,xr)):he.createElement(Zt,(0,le.Z)({},De,xr));return he.createElement("div",{ref:ar,className:"".concat(ft,"-selector"),onClick:dr,onMouseDown:br},Fe&&he.createElement("div",{className:"".concat(ft,"-prefix")},Fe),Br)},Ct=he.forwardRef(We),St=Ct,ae=fe(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(De){var Et=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Et,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Et,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Et,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Et,adjustY:1},htmlRegion:"scroll"}}},ie=function(De,Et){var ct=De.prefixCls,Ie=De.disabled,ft=De.visible,zt=De.children,an=De.popupElement,pn=De.animation,Lt=De.transitionName,Ut=De.dropdownStyle,Fe=De.dropdownClassName,nn=De.direction,Ft=nn===void 0?"ltr":nn,rn=De.placement,ln=De.builtinPlacements,Bn=De.dropdownMatchSelectWidth,Tn=De.dropdownRender,ar=De.dropdownAlign,Gn=De.getPopupContainer,jn=De.empty,or=De.getTriggerDOMNode,Kn=De.onPopupVisibleChange,gr=De.onPopupMouseEnter,Mr=(0,ge.Z)(De,te),yr="".concat(ct,"-dropdown"),Cr=an;Tn&&(Cr=Tn(an));var kr=he.useMemo(function(){return ln||z(Bn)},[ln,Bn]),hr=pn?"".concat(yr,"-").concat(pn):Lt,sr=typeof Bn=="number",Dr=he.useMemo(function(){return sr?null:Bn===!1?"minWidth":"width"},[Bn,sr]),dr=Ut;sr&&(dr=(0,Ke.Z)((0,Ke.Z)({},dr),{},{width:Bn}));var br=he.useRef(null);return he.useImperativeHandle(Et,function(){return{getPopupElement:function(){var Br;return(Br=br.current)===null||Br===void 0?void 0:Br.popupElement}}}),he.createElement(ae.Z,(0,le.Z)({},Mr,{showAction:Kn?["click"]:[],hideAction:Kn?["click"]:[],popupPlacement:rn||(Ft==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:kr,prefixCls:yr,popupTransitionName:hr,popup:he.createElement("div",{onMouseEnter:gr},Cr),ref:br,stretch:Dr,popupAlign:ar,popupVisible:ft,getPopupContainer:Gn,popupClassName:pe()(Fe,(0,Le.Z)({},"".concat(yr,"-empty"),jn)),popupStyle:dr,getTriggerDOMNode:or,onPopupVisibleChange:Kn}),zt)},ue=he.forwardRef(ie),ne=ue,be=fe(40954);function $e(xe,De){var Et=xe.key,ct;return"value"in xe&&(ct=xe.value),Et!=null?Et:ct!==void 0?ct:"rc-index-key-".concat(De)}function It(xe){return typeof xe!="undefined"&&!Number.isNaN(xe)}function Dt(xe,De){var Et=xe||{},ct=Et.label,Ie=Et.value,ft=Et.options,zt=Et.groupLabel,an=ct||(De?"children":"label");return{label:an,value:Ie||"value",options:ft||"options",groupLabel:zt||an}}function gt(xe){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Et=De.fieldNames,ct=De.childrenAsData,Ie=[],ft=Dt(Et,!1),zt=ft.label,an=ft.value,pn=ft.options,Lt=ft.groupLabel;function Ut(Fe,nn){Array.isArray(Fe)&&Fe.forEach(function(Ft){if(nn||!(pn in Ft)){var rn=Ft[an];Ie.push({key:$e(Ft,Ie.length),groupOption:nn,data:Ft,label:Ft[zt],value:rn})}else{var ln=Ft[Lt];ln===void 0&&ct&&(ln=Ft.label),Ie.push({key:$e(Ft,Ie.length),group:!0,data:Ft,label:ln}),Ut(Ft[pn],!0)}})}return Ut(xe,!1),Ie}function kt(xe){var De=(0,Ke.Z)({},xe);return"props"in De||Object.defineProperty(De,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),De}}),De}var tn=function(De,Et,ct){if(!Et||!Et.length)return null;var Ie=!1,ft=function an(pn,Lt){var Ut=(0,be.Z)(Lt),Fe=Ut[0],nn=Ut.slice(1);if(!Fe)return[pn];var Ft=pn.split(Fe);return Ie=Ie||Ft.length>1,Ft.reduce(function(rn,ln){return[].concat((0,it.Z)(rn),(0,it.Z)(an(ln,nn)))},[]).filter(Boolean)},zt=ft(De,Et);return Ie?typeof ct!="undefined"?zt.slice(0,ct):zt:null},Jt=he.createContext(null),dn=Jt;function sn(xe){var De=xe.visible,Et=xe.values;if(!De)return null;var ct=50;return he.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Et.slice(0,ct).map(function(Ie){var ft=Ie.label,zt=Ie.value;return["number","string"].includes((0,He.Z)(ft))?ft:zt}).join(", ")),Et.length>ct?", ...":null)}var _t=["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"],Sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Pe=function(De){return De==="tags"||De==="multiple"},qe=he.forwardRef(function(xe,De){var Et,ct=xe.id,Ie=xe.prefixCls,ft=xe.className,zt=xe.showSearch,an=xe.tagRender,pn=xe.direction,Lt=xe.omitDomProps,Ut=xe.displayValues,Fe=xe.onDisplayValuesChange,nn=xe.emptyOptions,Ft=xe.notFoundContent,rn=Ft===void 0?"Not Found":Ft,ln=xe.onClear,Bn=xe.mode,Tn=xe.disabled,ar=xe.loading,Gn=xe.getInputElement,jn=xe.getRawInputElement,or=xe.open,Kn=xe.defaultOpen,gr=xe.onDropdownVisibleChange,Mr=xe.activeValue,yr=xe.onActiveValueChange,Cr=xe.activeDescendantId,kr=xe.searchValue,hr=xe.autoClearSearchValue,sr=xe.onSearch,Dr=xe.onSearchSplit,dr=xe.tokenSeparators,br=xe.allowClear,xr=xe.prefix,Br=xe.suffixIcon,fr=xe.clearIcon,ur=xe.OptionList,nr=xe.animation,Tr=xe.transitionName,Zr=xe.dropdownStyle,Gr=xe.dropdownClassName,cr=xe.dropdownMatchSelectWidth,Jr=xe.dropdownRender,pr=xe.dropdownAlign,Pr=xe.placement,Sr=xe.builtinPlacements,wr=xe.getPopupContainer,Yn=xe.showAction,Mt=Yn===void 0?[]:Yn,Kt=xe.onFocus,wn=xe.onBlur,cn=xe.onKeyUp,Wn=xe.onKeyDown,Yt=xe.onMouseDown,Ot=(0,ge.Z)(xe,_t),$t=Pe(Bn),on=(zt!==void 0?zt:$t)||Bn==="combobox",Jn=(0,Ke.Z)({},Ot);Sn.forEach(function(mr){delete Jn[mr]}),Lt==null||Lt.forEach(function(mr){delete Jn[mr]});var er=he.useState(!1),Lr=(0,me.Z)(er,2),rr=Lr[0],vr=Lr[1];he.useEffect(function(){vr((0,Te.Z)())},[]);var Nr=he.useRef(null),Ur=he.useRef(null),Ar=he.useRef(null),Qr=he.useRef(null),Rr=he.useRef(null),di=he.useRef(!1),zi=Re(),Ri=(0,me.Z)(zi,3),Ci=Ri[0],mi=Ri[1],Or=Ri[2];he.useImperativeHandle(De,function(){var mr,ir;return{focus:(mr=Qr.current)===null||mr===void 0?void 0:mr.focus,blur:(ir=Qr.current)===null||ir===void 0?void 0:ir.blur,scrollTo:function(fi){var Yr;return(Yr=Rr.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:Nr.current||Ur.current}});var xi=he.useMemo(function(){var mr;if(Bn!=="combobox")return kr;var ir=(mr=Ut[0])===null||mr===void 0?void 0:mr.value;return typeof ir=="string"||typeof ir=="number"?String(ir):""},[kr,Bn,Ut]),ea=Bn==="combobox"&&typeof Gn=="function"&&Gn()||null,qr=typeof jn=="function"&&jn(),Ni=(0,Ae.x1)(Ur,qr==null||(Et=qr.props)===null||Et===void 0?void 0:Et.ref),Xi=he.useState(!1),hi=(0,me.Z)(Xi,2),oa=hi[0],Pi=hi[1];(0,rt.Z)(function(){Pi(!0)},[]);var Wr=(0,Ze.Z)(!1,{defaultValue:Kn,value:or}),ta=(0,me.Z)(Wr,2),la=ta[0],Zi=ta[1],$r=oa?la:!1,ba=!rn&&nn;(Tn||ba&&$r&&Bn==="combobox")&&($r=!1);var sa=ba?!1:$r,zn=he.useCallback(function(mr){var ir=mr!==void 0?mr:!$r;Tn||(Zi(ir),$r!==ir&&(gr==null||gr(ir)))},[Tn,$r,Zi,gr]),tr=he.useMemo(function(){return(dr||[]).some(function(mr){return[`
`,`\r
`].includes(mr)})},[dr]),Xn=he.useContext(dn)||{},Qn=Xn.maxCount,Er=Xn.rawValues,_r=function(ir,ui,fi){if(!($t&&It(Qn)&&(Er==null?void 0:Er.size)>=Qn)){var Yr=!0,ni=ir;yr==null||yr(null);var ji=tn(ir,dr,It(Qn)?Qn-Er.size:void 0),Wi=fi?null:ji;return Bn!=="combobox"&&Wi&&(ni="",Dr==null||Dr(Wi),zn(!1),Yr=!1),sr&&xi!==ni&&sr(ni,{source:ui?"typing":"effect"}),Yr}},Gi=function(ir){!ir||!ir.trim()||sr(ir,{source:"submit"})};he.useEffect(function(){!$r&&!$t&&Bn!=="combobox"&&_r("",!1,!1)},[$r]),he.useEffect(function(){la&&Tn&&Zi(!1),Tn&&!di.current&&mi(!1)},[Tn]);var gi=_e(),si=(0,me.Z)(gi,2),Kr=si[0],_i=si[1],Ji=he.useRef(!1),Ai=function(ir){var ui=Kr(),fi=ir.key,Yr=fi==="Enter";if(Yr&&(Bn!=="combobox"&&ir.preventDefault(),$r||zn(!0)),_i(!!xi),fi==="Backspace"&&!ui&&$t&&!xi&&Ut.length){for(var ni=(0,it.Z)(Ut),ji=null,Wi=ni.length-1;Wi>=0;Wi-=1){var ra=ni[Wi];if(!ra.disabled){ni.splice(Wi,1),ji=ra;break}}ji&&Fe(ni,{type:"remove",values:[ji]})}for(var Fi=arguments.length,Li=new Array(Fi>1?Fi-1:0),Ui=1;Ui<Fi;Ui++)Li[Ui-1]=arguments[Ui];if($r&&(!Yr||!Ji.current)){var ca;Yr&&(Ji.current=!0),(ca=Rr.current)===null||ca===void 0||ca.onKeyDown.apply(ca,[ir].concat(Li))}Wn==null||Wn.apply(void 0,[ir].concat(Li))},Qi=function(ir){for(var ui=arguments.length,fi=new Array(ui>1?ui-1:0),Yr=1;Yr<ui;Yr++)fi[Yr-1]=arguments[Yr];if($r){var ni;(ni=Rr.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[ir].concat(fi))}ir.key==="Enter"&&(Ji.current=!1),cn==null||cn.apply(void 0,[ir].concat(fi))},na=function(ir){var ui=Ut.filter(function(fi){return fi!==ir});Fe(ui,{type:"remove",values:[ir]})},Vi=function(){Ji.current=!1},Fa=he.useRef(!1),Vo=function(){mi(!0),Tn||(Kt&&!Fa.current&&Kt.apply(void 0,arguments),Mt.includes("focus")&&zn(!0)),Fa.current=!0},yo=function(){di.current=!0,mi(!1,function(){Fa.current=!1,di.current=!1,zn(!1)}),!Tn&&(xi&&(Bn==="tags"?sr(xi,{source:"submit"}):Bn==="multiple"&&sr("",{source:"blur"})),wn&&wn.apply(void 0,arguments))},qi=[];he.useEffect(function(){return function(){qi.forEach(function(mr){return clearTimeout(mr)}),qi.splice(0,qi.length)}},[]);var ua=function(ir){var ui,fi=ir.target,Yr=(ui=Ar.current)===null||ui===void 0?void 0:ui.getPopupElement();if(Yr&&Yr.contains(fi)){var ni=setTimeout(function(){var Fi=qi.indexOf(ni);if(Fi!==-1&&qi.splice(Fi,1),Or(),!rr&&!Yr.contains(document.activeElement)){var Li;(Li=Qr.current)===null||Li===void 0||Li.focus()}});qi.push(ni)}for(var ji=arguments.length,Wi=new Array(ji>1?ji-1:0),ra=1;ra<ji;ra++)Wi[ra-1]=arguments[ra];Yt==null||Yt.apply(void 0,[ir].concat(Wi))},Hi=he.useState({}),bo=(0,me.Z)(Hi,2),Co=bo[1];function jo(){Co({})}var xo;qr&&(xo=function(ir){zn(ir)}),je(function(){var mr;return[Nr.current,(mr=Ar.current)===null||mr===void 0?void 0:mr.getPopupElement()]},sa,zn,!!qr);var Uo=he.useMemo(function(){return(0,Ke.Z)((0,Ke.Z)({},xe),{},{notFoundContent:rn,open:$r,triggerOpen:sa,id:ct,showSearch:on,multiple:$t,toggleOpen:zn})},[xe,rn,sa,$r,ct,on,$t,zn]),Ua=!!Br||ar,Ka;Ua&&(Ka=he.createElement(ke,{className:pe()("".concat(Ie,"-arrow"),(0,Le.Z)({},"".concat(Ie,"-arrow-loading"),ar)),customizeIcon:Br,customizeIconProps:{loading:ar,searchValue:xi,open:$r,focused:Ci,showSearch:on}}));var Ca=function(){var ir;ln==null||ln(),(ir=Qr.current)===null||ir===void 0||ir.focus(),Fe([],{type:"clear",values:Ut}),_r("",!1,!1)},Ya=et(Ie,Ca,Ut,br,fr,Tn,xi,Bn),wo=Ya.allowClear,Xa=Ya.clearIcon,La=he.createElement(ur,{ref:Rr}),So=pe()(Ie,ft,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(Ie,"-focused"),Ci),"".concat(Ie,"-multiple"),$t),"".concat(Ie,"-single"),!$t),"".concat(Ie,"-allow-clear"),br),"".concat(Ie,"-show-arrow"),Ua),"".concat(Ie,"-disabled"),Tn),"".concat(Ie,"-loading"),ar),"".concat(Ie,"-open"),$r),"".concat(Ie,"-customize-input"),ea),"".concat(Ie,"-show-search"),on)),Ma=he.createElement(ne,{ref:Ar,disabled:Tn,prefixCls:Ie,visible:sa,popupElement:La,animation:nr,transitionName:Tr,dropdownStyle:Zr,dropdownClassName:Gr,direction:pn,dropdownMatchSelectWidth:cr,dropdownRender:Jr,dropdownAlign:pr,placement:Pr,builtinPlacements:Sr,getPopupContainer:wr,empty:nn,getTriggerDOMNode:function(ir){return Ur.current||ir},onPopupVisibleChange:xo,onPopupMouseEnter:jo},qr?he.cloneElement(qr,{ref:Ni}):he.createElement(St,(0,le.Z)({},xe,{domRef:Ur,prefixCls:Ie,inputElement:ea,ref:Qr,id:ct,prefix:xr,showSearch:on,autoClearSearchValue:hr,mode:Bn,activeDescendantId:Cr,tagRender:an,values:Ut,open:$r,onToggleOpen:zn,activeValue:Mr,searchValue:xi,onSearch:_r,onSearchSubmit:Gi,onRemove:na,tokenWithEnter:tr,onInputBlur:Vi}))),wi;return qr?wi=Ma:wi=he.createElement("div",(0,le.Z)({className:So},Jn,{ref:Nr,onMouseDown:ua,onKeyDown:Ai,onKeyUp:Qi,onFocus:Vo,onBlur:yo}),he.createElement(sn,{visible:Ci&&!$r,values:Ut}),Ma,Ka,wo&&Xa),he.createElement(tt.Provider,{value:Uo},wi)}),Ee=qe,vt=function(){return null};vt.isSelectOptGroup=!0;var st=vt,pt=function(){return null};pt.isSelectOption=!0;var wt=pt,jt=fe(80547),Bt=fe(2738),Gt=fe(6790);function Dn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var bn=["disabled","title","children","style","className"];function Ln(xe){return typeof xe=="string"||typeof xe=="number"}var Zn=function(De,Et){var ct=Qe(),Ie=ct.prefixCls,ft=ct.id,zt=ct.open,an=ct.multiple,pn=ct.mode,Lt=ct.searchValue,Ut=ct.toggleOpen,Fe=ct.notFoundContent,nn=ct.onPopupScroll,Ft=he.useContext(dn),rn=Ft.maxCount,ln=Ft.flattenOptions,Bn=Ft.onActiveValue,Tn=Ft.defaultActiveFirstOption,ar=Ft.onSelect,Gn=Ft.menuItemSelectedIcon,jn=Ft.rawValues,or=Ft.fieldNames,Kn=Ft.virtual,gr=Ft.direction,Mr=Ft.listHeight,yr=Ft.listItemHeight,Cr=Ft.optionRender,kr="".concat(Ie,"-item"),hr=(0,jt.Z)(function(){return ln},[zt,ln],function(Yn,Mt){return Mt[0]&&Yn[1]!==Mt[1]}),sr=he.useRef(null),Dr=he.useMemo(function(){return an&&It(rn)&&(jn==null?void 0:jn.size)>=rn},[an,rn,jn==null?void 0:jn.size]),dr=function(Mt){Mt.preventDefault()},br=function(Mt){var Kt;(Kt=sr.current)===null||Kt===void 0||Kt.scrollTo(typeof Mt=="number"?{index:Mt}:Mt)},xr=he.useCallback(function(Yn){return pn==="combobox"?!1:jn.has(Yn)},[pn,(0,it.Z)(jn).toString(),jn.size]),Br=function(Mt){for(var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,wn=hr.length,cn=0;cn<wn;cn+=1){var Wn=(Mt+cn*Kt+wn)%wn,Yt=hr[Wn]||{},Ot=Yt.group,$t=Yt.data;if(!Ot&&!($t!=null&&$t.disabled)&&(xr($t.value)||!Dr))return Wn}return-1},fr=he.useState(function(){return Br(0)}),ur=(0,me.Z)(fr,2),nr=ur[0],Tr=ur[1],Zr=function(Mt){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Tr(Mt);var wn={source:Kt?"keyboard":"mouse"},cn=hr[Mt];if(!cn){Bn(null,-1,wn);return}Bn(cn.value,Mt,wn)};(0,he.useEffect)(function(){Zr(Tn!==!1?Br(0):-1)},[hr.length,Lt]);var Gr=he.useCallback(function(Yn){return pn==="combobox"?String(Yn).toLowerCase()===Lt.toLowerCase():jn.has(Yn)},[pn,Lt,(0,it.Z)(jn).toString(),jn.size]);(0,he.useEffect)(function(){var Yn=setTimeout(function(){if(!an&&zt&&jn.size===1){var Kt=Array.from(jn)[0],wn=hr.findIndex(function(cn){var Wn=cn.data;return Lt?String(Wn.value).startsWith(Lt):Wn.value===Kt});wn!==-1&&(Zr(wn),br(wn))}});if(zt){var Mt;(Mt=sr.current)===null||Mt===void 0||Mt.scrollTo(void 0)}return function(){return clearTimeout(Yn)}},[zt,Lt]);var cr=function(Mt){Mt!==void 0&&ar(Mt,{selected:!jn.has(Mt)}),an||Ut(!1)};if(he.useImperativeHandle(Et,function(){return{onKeyDown:function(Mt){var Kt=Mt.which,wn=Mt.ctrlKey;switch(Kt){case ze.Z.N:case ze.Z.P:case ze.Z.UP:case ze.Z.DOWN:{var cn=0;if(Kt===ze.Z.UP?cn=-1:Kt===ze.Z.DOWN?cn=1:Dn()&&wn&&(Kt===ze.Z.N?cn=1:Kt===ze.Z.P&&(cn=-1)),cn!==0){var Wn=Br(nr+cn,cn);br(Wn),Zr(Wn,!0)}break}case ze.Z.TAB:case ze.Z.ENTER:{var Yt,Ot=hr[nr];Ot&&!(Ot!=null&&(Yt=Ot.data)!==null&&Yt!==void 0&&Yt.disabled)&&!Dr?cr(Ot.value):cr(void 0),zt&&Mt.preventDefault();break}case ze.Z.ESC:Ut(!1),zt&&Mt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Mt){br(Mt)}}}),hr.length===0)return he.createElement("div",{role:"listbox",id:"".concat(ft,"_list"),className:"".concat(kr,"-empty"),onMouseDown:dr},Fe);var Jr=Object.keys(or).map(function(Yn){return or[Yn]}),pr=function(Mt){return Mt.label};function Pr(Yn,Mt){var Kt=Yn.group;return{role:Kt?"presentation":"option",id:"".concat(ft,"_list_").concat(Mt)}}var Sr=function(Mt){var Kt=hr[Mt];if(!Kt)return null;var wn=Kt.data||{},cn=wn.value,Wn=Kt.group,Yt=(0,Ve.Z)(wn,!0),Ot=pr(Kt);return Kt?he.createElement("div",(0,le.Z)({"aria-label":typeof Ot=="string"&&!Wn?Ot:null},Yt,{key:Mt},Pr(Kt,Mt),{"aria-selected":Gr(cn)}),cn):null},wr={role:"listbox",id:"".concat(ft,"_list")};return he.createElement(he.Fragment,null,Kn&&he.createElement("div",(0,le.Z)({},wr,{style:{height:0,width:0,overflow:"hidden"}}),Sr(nr-1),Sr(nr),Sr(nr+1)),he.createElement(Gt.Z,{itemKey:"key",ref:sr,data:hr,height:Mr,itemHeight:yr,fullHeight:!1,onMouseDown:dr,onScroll:nn,virtual:Kn,direction:gr,innerProps:Kn?null:wr},function(Yn,Mt){var Kt=Yn.group,wn=Yn.groupOption,cn=Yn.data,Wn=Yn.label,Yt=Yn.value,Ot=cn.key;if(Kt){var $t,on=($t=cn.title)!==null&&$t!==void 0?$t:Ln(Wn)?Wn.toString():void 0;return he.createElement("div",{className:pe()(kr,"".concat(kr,"-group"),cn.className),title:on},Wn!==void 0?Wn:Ot)}var Jn=cn.disabled,er=cn.title,Lr=cn.children,rr=cn.style,vr=cn.className,Nr=(0,ge.Z)(cn,bn),Ur=(0,Bt.Z)(Nr,Jr),Ar=xr(Yt),Qr=Jn||!Ar&&Dr,Rr="".concat(kr,"-option"),di=pe()(kr,Rr,vr,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(Rr,"-grouped"),wn),"".concat(Rr,"-active"),nr===Mt&&!Qr),"".concat(Rr,"-disabled"),Qr),"".concat(Rr,"-selected"),Ar)),zi=pr(Yn),Ri=!Gn||typeof Gn=="function"||Ar,Ci=typeof zi=="number"?zi:zi||Yt,mi=Ln(Ci)?Ci.toString():void 0;return er!==void 0&&(mi=er),he.createElement("div",(0,le.Z)({},(0,Ve.Z)(Ur),Kn?{}:Pr(Yn,Mt),{"aria-selected":Gr(Yt),className:di,title:mi,onMouseMove:function(){nr===Mt||Qr||Zr(Mt)},onClick:function(){Qr||cr(Yt)},style:rr}),he.createElement("div",{className:"".concat(Rr,"-content")},typeof Cr=="function"?Cr(Yn,{index:Mt}):Ci),he.isValidElement(Gn)||Ar,Ri&&he.createElement(ke,{className:"".concat(kr,"-option-state"),customizeIcon:Gn,customizeIconProps:{value:Yt,disabled:Qr,isSelected:Ar}},Ar?"\u2713":null))}))},An=he.forwardRef(Zn),kn=An,mn=function(xe,De){var Et=he.useRef({values:new Map,options:new Map}),ct=he.useMemo(function(){var ft=Et.current,zt=ft.values,an=ft.options,pn=xe.map(function(Fe){if(Fe.label===void 0){var nn;return(0,Ke.Z)((0,Ke.Z)({},Fe),{},{label:(nn=zt.get(Fe.value))===null||nn===void 0?void 0:nn.label})}return Fe}),Lt=new Map,Ut=new Map;return pn.forEach(function(Fe){Lt.set(Fe.value,Fe),Ut.set(Fe.value,De.get(Fe.value)||an.get(Fe.value))}),Et.current.values=Lt,Et.current.options=Ut,pn},[xe,De]),Ie=he.useCallback(function(ft){return De.get(ft)||Et.current.options.get(ft)},[De]);return[ct,Ie]};function In(xe,De){return ut(xe).join("").toUpperCase().includes(De)}var $n=function(xe,De,Et,ct,Ie){return he.useMemo(function(){if(!Et||ct===!1)return xe;var ft=De.options,zt=De.label,an=De.value,pn=[],Lt=typeof ct=="function",Ut=Et.toUpperCase(),Fe=Lt?ct:function(Ft,rn){return Ie?In(rn[Ie],Ut):rn[ft]?In(rn[zt!=="children"?zt:"label"],Ut):In(rn[an],Ut)},nn=Lt?function(Ft){return kt(Ft)}:function(Ft){return Ft};return xe.forEach(function(Ft){if(Ft[ft]){var rn=Fe(Et,nn(Ft));if(rn)pn.push(Ft);else{var ln=Ft[ft].filter(function(Bn){return Fe(Et,nn(Bn))});ln.length&&pn.push((0,Ke.Z)((0,Ke.Z)({},Ft),{},(0,Le.Z)({},ft,ln)))}return}Fe(Et,nn(Ft))&&pn.push(Ft)}),pn},[xe,ct,Ie,Et,De])},gn=fe(6551),Nn=fe(11592),_n=["children","value"],Rn=["children"];function Ht(xe){var De=xe,Et=De.key,ct=De.props,Ie=ct.children,ft=ct.value,zt=(0,ge.Z)(ct,_n);return(0,Ke.Z)({key:Et,value:ft!==void 0?ft:Et,children:Ie},zt)}function Qt(xe){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Nn.Z)(xe).map(function(Et,ct){if(!he.isValidElement(Et)||!Et.type)return null;var Ie=Et,ft=Ie.type.isSelectOptGroup,zt=Ie.key,an=Ie.props,pn=an.children,Lt=(0,ge.Z)(an,Rn);return De||!ft?Ht(Et):(0,Ke.Z)((0,Ke.Z)({key:"__RC_SELECT_GRP__".concat(zt===null?ct:zt,"__"),label:zt},Lt),{},{options:Qt(pn)})}).filter(function(Et){return Et})}var un=function(De,Et,ct,Ie,ft){return he.useMemo(function(){var zt=De,an=!De;an&&(zt=Qt(Et));var pn=new Map,Lt=new Map,Ut=function(Ft,rn,ln){ln&&typeof ln=="string"&&Ft.set(rn[ln],rn)},Fe=function nn(Ft){for(var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=0;ln<Ft.length;ln+=1){var Bn=Ft[ln];!Bn[ct.options]||rn?(pn.set(Bn[ct.value],Bn),Ut(Lt,Bn,ct.label),Ut(Lt,Bn,Ie),Ut(Lt,Bn,ft)):nn(Bn[ct.options],!0)}};return Fe(zt),{options:zt,valueOptions:pn,labelOptions:Lt}},[De,Et,ct,Ie,ft])},xn=un;function yn(xe){var De=he.useRef();De.current=xe;var Et=he.useCallback(function(){return De.current.apply(De,arguments)},[]);return Et}function Pn(xe){var De=xe.mode,Et=xe.options,ct=xe.children,Ie=xe.backfill,ft=xe.allowClear,zt=xe.placeholder,an=xe.getInputElement,pn=xe.showSearch,Lt=xe.onSearch,Ut=xe.defaultOpen,Fe=xe.autoFocus,nn=xe.labelInValue,Ft=xe.value,rn=xe.inputValue,ln=xe.optionLabelProp,Bn=isMultiple(De),Tn=pn!==void 0?pn:Bn||De==="combobox",ar=Et||convertChildrenToData(ct);if(warning(De!=="tags"||ar.every(function(Kn){return!Kn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),De==="tags"||De==="combobox"){var Gn=ar.some(function(Kn){return Kn.options?Kn.options.some(function(gr){return typeof("value"in gr?gr.value:gr.key)=="number"}):typeof("value"in Kn?Kn.value:Kn.key)=="number"});warning(!Gn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(De!=="combobox"||!ln,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(De==="combobox"||!Ie,"`backfill` only works with `combobox` mode."),warning(De==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(De!=="combobox"||!an||!ft||!zt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Lt&&!Tn&&De!=="combobox"&&De!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ut||Fe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ft!=null){var jn=toArray(Ft);warning(!nn||jn.every(function(Kn){return _typeof(Kn)==="object"&&("key"in Kn||"value"in Kn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Bn||Array.isArray(Ft),"`value` should be array when `mode` is `multiple` or `tags`")}if(ct){var or=null;toNodeArray(ct).some(function(Kn){if(!React.isValidElement(Kn)||!Kn.type)return!1;var gr=Kn,Mr=gr.type;if(Mr.isSelectOption)return!1;if(Mr.isSelectOptGroup){var yr=toNodeArray(Kn.props.children).every(function(Cr){return!React.isValidElement(Cr)||!Kn.type||Cr.type.isSelectOption?!0:(or=Cr.type,!1)});return!yr}return or=Mr,!0}),or&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(or.displayName||or.name||or,"`.")),warning(rn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hn(xe,De){if(xe){var Et=function ct(Ie){for(var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt=0;zt<Ie.length;zt++){var an=Ie[zt];if(an[De==null?void 0:De.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ft&&Array.isArray(an[De==null?void 0:De.options])&&ct(an[De==null?void 0:De.options],!0))break}};Et(xe)}}var Mn=null,Fn=["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"],qn=["inputValue"];function At(xe){return!xe||(0,He.Z)(xe)!=="object"}var nt=he.forwardRef(function(xe,De){var Et=xe.id,ct=xe.mode,Ie=xe.prefixCls,ft=Ie===void 0?"rc-select":Ie,zt=xe.backfill,an=xe.fieldNames,pn=xe.inputValue,Lt=xe.searchValue,Ut=xe.onSearch,Fe=xe.autoClearSearchValue,nn=Fe===void 0?!0:Fe,Ft=xe.onSelect,rn=xe.onDeselect,ln=xe.dropdownMatchSelectWidth,Bn=ln===void 0?!0:ln,Tn=xe.filterOption,ar=xe.filterSort,Gn=xe.optionFilterProp,jn=xe.optionLabelProp,or=xe.options,Kn=xe.optionRender,gr=xe.children,Mr=xe.defaultActiveFirstOption,yr=xe.menuItemSelectedIcon,Cr=xe.virtual,kr=xe.direction,hr=xe.listHeight,sr=hr===void 0?200:hr,Dr=xe.listItemHeight,dr=Dr===void 0?20:Dr,br=xe.labelRender,xr=xe.value,Br=xe.defaultValue,fr=xe.labelInValue,ur=xe.onChange,nr=xe.maxCount,Tr=(0,ge.Z)(xe,Fn),Zr=(0,gn.ZP)(Et),Gr=Pe(ct),cr=!!(!or&&gr),Jr=he.useMemo(function(){return Tn===void 0&&ct==="combobox"?!1:Tn},[Tn,ct]),pr=he.useMemo(function(){return Dt(an,cr)},[JSON.stringify(an),cr]),Pr=(0,Ze.Z)("",{value:Lt!==void 0?Lt:pn,postState:function(tr){return tr||""}}),Sr=(0,me.Z)(Pr,2),wr=Sr[0],Yn=Sr[1],Mt=xn(or,gr,pr,Gn,jn),Kt=Mt.valueOptions,wn=Mt.labelOptions,cn=Mt.options,Wn=he.useCallback(function(zn){var tr=ut(zn);return tr.map(function(Xn){var Qn,Er,_r,Gi,gi;if(At(Xn))Qn=Xn;else{var si;_r=Xn.key,Er=Xn.label,Qn=(si=Xn.value)!==null&&si!==void 0?si:_r}var Kr=Kt.get(Qn);if(Kr){var _i;if(Er===void 0&&(Er=Kr==null?void 0:Kr[jn||pr.label]),_r===void 0&&(_r=(_i=Kr==null?void 0:Kr.key)!==null&&_i!==void 0?_i:Qn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Ji}return{label:Er,value:Qn,key:_r,disabled:Gi,title:gi}})},[pr,jn,Kt]),Yt=(0,Ze.Z)(Br,{value:xr}),Ot=(0,me.Z)(Yt,2),$t=Ot[0],on=Ot[1],Jn=he.useMemo(function(){var zn,tr=Gr&&$t===null?[]:$t,Xn=Wn(tr);return ct==="combobox"&&de((zn=Xn[0])===null||zn===void 0?void 0:zn.value)?[]:Xn},[$t,Wn,ct,Gr]),er=mn(Jn,Kt),Lr=(0,me.Z)(er,2),rr=Lr[0],vr=Lr[1],Nr=he.useMemo(function(){if(!ct&&rr.length===1){var zn=rr[0];if(zn.value===null&&(zn.label===null||zn.label===void 0))return[]}return rr.map(function(tr){var Xn;return(0,Ke.Z)((0,Ke.Z)({},tr),{},{label:(Xn=typeof br=="function"?br(tr):tr.label)!==null&&Xn!==void 0?Xn:tr.value})})},[ct,rr,br]),Ur=he.useMemo(function(){return new Set(rr.map(function(zn){return zn.value}))},[rr]);he.useEffect(function(){if(ct==="combobox"){var zn,tr=(zn=rr[0])===null||zn===void 0?void 0:zn.value;Yn(ve(tr)?String(tr):"")}},[rr]);var Ar=yn(function(zn,tr){var Xn=tr!=null?tr:zn;return(0,Le.Z)((0,Le.Z)({},pr.value,zn),pr.label,Xn)}),Qr=he.useMemo(function(){if(ct!=="tags")return cn;var zn=(0,it.Z)(cn),tr=function(Qn){return Kt.has(Qn)};return(0,it.Z)(rr).sort(function(Xn,Qn){return Xn.value<Qn.value?-1:1}).forEach(function(Xn){var Qn=Xn.value;tr(Qn)||zn.push(Ar(Qn,Xn.label))}),zn},[Ar,cn,Kt,rr,ct]),Rr=$n(Qr,pr,wr,Jr,Gn),di=he.useMemo(function(){return ct!=="tags"||!wr||Rr.some(function(zn){return zn[Gn||"value"]===wr})||Rr.some(function(zn){return zn[pr.value]===wr})?Rr:[Ar(wr)].concat((0,it.Z)(Rr))},[Ar,Gn,ct,Rr,wr,pr]),zi=function zn(tr){var Xn=(0,it.Z)(tr).sort(function(Qn,Er){return ar(Qn,Er,{searchValue:wr})});return Xn.map(function(Qn){return Array.isArray(Qn.options)?(0,Ke.Z)((0,Ke.Z)({},Qn),{},{options:Qn.options.length>0?zn(Qn.options):Qn.options}):Qn})},Ri=he.useMemo(function(){return ar?zi(di):di},[di,ar,wr]),Ci=he.useMemo(function(){return gt(Ri,{fieldNames:pr,childrenAsData:cr})},[Ri,pr,cr]),mi=function(tr){var Xn=Wn(tr);if(on(Xn),ur&&(Xn.length!==rr.length||Xn.some(function(_r,Gi){var gi;return((gi=rr[Gi])===null||gi===void 0?void 0:gi.value)!==(_r==null?void 0:_r.value)}))){var Qn=fr?Xn:Xn.map(function(_r){return _r.value}),Er=Xn.map(function(_r){return kt(vr(_r.value))});ur(Gr?Qn:Qn[0],Gr?Er:Er[0])}},Or=he.useState(null),xi=(0,me.Z)(Or,2),ea=xi[0],qr=xi[1],Ni=he.useState(0),Xi=(0,me.Z)(Ni,2),hi=Xi[0],oa=Xi[1],Pi=Mr!==void 0?Mr:ct!=="combobox",Wr=he.useCallback(function(zn,tr){var Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Qn=Xn.source,Er=Qn===void 0?"keyboard":Qn;oa(tr),zt&&ct==="combobox"&&zn!==null&&Er==="keyboard"&&qr(String(zn))},[zt,ct]),ta=function(tr,Xn,Qn){var Er=function(){var na,Vi=vr(tr);return[fr?{label:Vi==null?void 0:Vi[pr.label],value:tr,key:(na=Vi==null?void 0:Vi.key)!==null&&na!==void 0?na:tr}:tr,kt(Vi)]};if(Xn&&Ft){var _r=Er(),Gi=(0,me.Z)(_r,2),gi=Gi[0],si=Gi[1];Ft(gi,si)}else if(!Xn&&rn&&Qn!=="clear"){var Kr=Er(),_i=(0,me.Z)(Kr,2),Ji=_i[0],Ai=_i[1];rn(Ji,Ai)}},la=yn(function(zn,tr){var Xn,Qn=Gr?tr.selected:!0;Qn?Xn=Gr?[].concat((0,it.Z)(rr),[zn]):[zn]:Xn=rr.filter(function(Er){return Er.value!==zn}),mi(Xn),ta(zn,Qn),ct==="combobox"?qr(""):(!Pe||nn)&&(Yn(""),qr(""))}),Zi=function(tr,Xn){mi(tr);var Qn=Xn.type,Er=Xn.values;(Qn==="remove"||Qn==="clear")&&Er.forEach(function(_r){ta(_r.value,!1,Qn)})},$r=function(tr,Xn){if(Yn(tr),qr(null),Xn.source==="submit"){var Qn=(tr||"").trim();if(Qn){var Er=Array.from(new Set([].concat((0,it.Z)(Ur),[Qn])));mi(Er),ta(Qn,!0),Yn("")}return}Xn.source!=="blur"&&(ct==="combobox"&&mi(tr),Ut==null||Ut(tr))},ba=function(tr){var Xn=tr;ct!=="tags"&&(Xn=tr.map(function(Er){var _r=wn.get(Er);return _r==null?void 0:_r.value}).filter(function(Er){return Er!==void 0}));var Qn=Array.from(new Set([].concat((0,it.Z)(Ur),(0,it.Z)(Xn))));mi(Qn),Qn.forEach(function(Er){ta(Er,!0)})},sa=he.useMemo(function(){var zn=Cr!==!1&&Bn!==!1;return(0,Ke.Z)((0,Ke.Z)({},Mt),{},{flattenOptions:Ci,onActiveValue:Wr,defaultActiveFirstOption:Pi,onSelect:la,menuItemSelectedIcon:yr,rawValues:Ur,fieldNames:pr,virtual:zn,direction:kr,listHeight:sr,listItemHeight:dr,childrenAsData:cr,maxCount:nr,optionRender:Kn})},[nr,Mt,Ci,Wr,Pi,la,yr,Ur,pr,Cr,Bn,kr,sr,dr,cr,Kn]);return he.createElement(dn.Provider,{value:sa},he.createElement(Ee,(0,le.Z)({},Tr,{id:Zr,prefixCls:ft,ref:De,omitDomProps:qn,mode:ct,displayValues:Nr,onDisplayValuesChange:Zi,direction:kr,searchValue:wr,onSearch:$r,autoClearSearchValue:nn,onSearchSplit:ba,dropdownMatchSelectWidth:Bn,OptionList:kn,emptyOptions:!Ci.length,activeValue:ea,activeDescendantId:"".concat(Zr,"_list_").concat(hi)})))}),Vt=nt;Vt.Option=wt,Vt.OptGroup=st;var vn=Vt,Vn=vn},63158:function(Pt,Nt,fe){"use strict";var le=fe(32855),it=fe(74430),Le=fe(11913),Ke=fe(43079),me=fe(59301),ge=fe(92310),He=fe.n(ge),Ze=fe(18929),Ce=fe(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ye=me.forwardRef(function(pe,rt){var Te,Ae=pe.prefixCls,Me=Ae===void 0?"rc-switch":Ae,ke=pe.className,et=pe.checked,tt=pe.defaultChecked,Qe=pe.disabled,Re=pe.loadingIcon,_e=pe.checkedChildren,je=pe.unCheckedChildren,ze=pe.onClick,bt=pe.onChange,Ve=pe.onKeyDown,Ne=(0,Ke.Z)(pe,he),ht=(0,Ze.Z)(!1,{value:et,defaultValue:tt}),Be=(0,Le.Z)(ht,2),Xe=Be[0],we=Be[1];function Ge(Rt,ve){var de=Xe;return Qe||(de=Rt,we(de),bt==null||bt(de,ve)),de}function mt(Rt){Rt.which===Ce.Z.LEFT?Ge(!1,Rt):Rt.which===Ce.Z.RIGHT&&Ge(!0,Rt),Ve==null||Ve(Rt)}function ut(Rt){var ve=Ge(!Xe,Rt);ze==null||ze(ve,Rt)}var Xt=He()(Me,ke,(Te={},(0,it.Z)(Te,"".concat(Me,"-checked"),Xe),(0,it.Z)(Te,"".concat(Me,"-disabled"),Qe),Te));return me.createElement("button",(0,le.Z)({},Ne,{type:"button",role:"switch","aria-checked":Xe,disabled:Qe,className:Xt,ref:rt,onKeyDown:mt,onClick:ut}),Re,me.createElement("span",{className:"".concat(Me,"-inner")},me.createElement("span",{className:"".concat(Me,"-inner-checked")},_e),me.createElement("span",{className:"".concat(Me,"-inner-unchecked")},je)))});Ye.displayName="Switch",Nt.Z=Ye},22711:function(Pt,Nt,fe){"use strict";fe.r(Nt),fe.d(Nt,{ResizableTextArea:function(){return Be},default:function(){return mt}});var le=fe(32855),it=fe(74430),Le=fe(27247),Ke=fe(3300),me=fe(11913),ge=fe(43079),He=fe(92310),Ze=fe.n(He),Ce=fe(36901),he=fe(66003),Ye=fe(30292),pe=fe(18929),rt=fe(59301),Te=fe(34666),Ae=fe(29301),Me=fe(34280),ke=fe(16089),et=`
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;
`,tt=["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"],Qe={},Re;function _e(ut){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=ut.getAttribute("id")||ut.getAttribute("data-reactid")||ut.getAttribute("name");if(Xt&&Qe[Rt])return Qe[Rt];var ve=window.getComputedStyle(ut),de=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),lt=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),Wt=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),xt=tt.map(function(at){return"".concat(at,":").concat(ve.getPropertyValue(at))}).join(";"),Oe={sizingStyle:xt,paddingSize:lt,borderSize:Wt,boxSizing:de};return Xt&&Rt&&(Qe[Rt]=Oe),Oe}function je(ut){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Re||(Re=document.createElement("textarea"),Re.setAttribute("tab-index","-1"),Re.setAttribute("aria-hidden","true"),Re.setAttribute("name","hiddenTextarea"),document.body.appendChild(Re)),ut.getAttribute("wrap")?Re.setAttribute("wrap",ut.getAttribute("wrap")):Re.removeAttribute("wrap");var de=_e(ut,Xt),lt=de.paddingSize,Wt=de.borderSize,xt=de.boxSizing,Oe=de.sizingStyle;Re.setAttribute("style","".concat(Oe,";").concat(et)),Re.value=ut.value||ut.placeholder||"";var at=void 0,ot=void 0,en,dt=Re.scrollHeight;if(xt==="border-box"?dt+=Wt:xt==="content-box"&&(dt-=lt),Rt!==null||ve!==null){Re.value=" ";var Zt=Re.scrollHeight-lt;Rt!==null&&(at=Zt*Rt,xt==="border-box"&&(at=at+lt+Wt),dt=Math.max(at,dt)),ve!==null&&(ot=Zt*ve,xt==="border-box"&&(ot=ot+lt+Wt),en=dt>ot?"":"hidden",dt=Math.min(ot,dt))}var We={height:dt,overflowY:en,resize:"none"};return at&&(We.minHeight=at),ot&&(We.maxHeight=ot),We}var ze=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],bt=0,Ve=1,Ne=2,ht=rt.forwardRef(function(ut,Xt){var Rt=ut,ve=Rt.prefixCls,de=Rt.defaultValue,lt=Rt.value,Wt=Rt.autoSize,xt=Rt.onResize,Oe=Rt.className,at=Rt.style,ot=Rt.disabled,en=Rt.onChange,dt=Rt.onInternalAutoSize,Zt=(0,ge.Z)(Rt,ze),We=(0,pe.Z)(de,{value:lt,postState:function(wt){return wt!=null?wt:""}}),Ct=(0,me.Z)(We,2),St=Ct[0],ae=Ct[1],te=function(wt){ae(wt.target.value),en==null||en(wt)},z=rt.useRef();rt.useImperativeHandle(Xt,function(){return{textArea:z.current}});var ie=rt.useMemo(function(){return Wt&&(0,Te.Z)(Wt)==="object"?[Wt.minRows,Wt.maxRows]:[]},[Wt]),ue=(0,me.Z)(ie,2),ne=ue[0],be=ue[1],$e=!!Wt,It=function(){try{if(document.activeElement===z.current){var wt=z.current,jt=wt.selectionStart,Bt=wt.selectionEnd,Gt=wt.scrollTop;z.current.setSelectionRange(jt,Bt),z.current.scrollTop=Gt}}catch(Dn){}},Dt=rt.useState(Ne),gt=(0,me.Z)(Dt,2),kt=gt[0],tn=gt[1],Jt=rt.useState(),dn=(0,me.Z)(Jt,2),sn=dn[0],_t=dn[1],Sn=function(){tn(bt)};(0,Me.Z)(function(){$e&&Sn()},[lt,ne,be,$e]),(0,Me.Z)(function(){if(kt===bt)tn(Ve);else if(kt===Ve){var pt=je(z.current,!1,ne,be);tn(Ne),_t(pt)}else It()},[kt]);var Pe=rt.useRef(),qe=function(){ke.Z.cancel(Pe.current)},Ee=function(wt){kt===Ne&&(xt==null||xt(wt),Wt&&(qe(),Pe.current=(0,ke.Z)(function(){Sn()})))};rt.useEffect(function(){return qe},[]);var vt=$e?sn:null,st=(0,Le.Z)((0,Le.Z)({},at),vt);return(kt===bt||kt===Ve)&&(st.overflowY="hidden",st.overflowX="hidden"),rt.createElement(Ae.Z,{onResize:Ee,disabled:!(Wt||xt)},rt.createElement("textarea",(0,le.Z)({},Zt,{ref:z,style:st,className:Ze()(ve,Oe,(0,it.Z)({},"".concat(ve,"-disabled"),ot)),disabled:ot,value:St,onChange:te})))}),Be=ht,Xe=["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"],we=rt.forwardRef(function(ut,Xt){var Rt,ve=ut.defaultValue,de=ut.value,lt=ut.onFocus,Wt=ut.onBlur,xt=ut.onChange,Oe=ut.allowClear,at=ut.maxLength,ot=ut.onCompositionStart,en=ut.onCompositionEnd,dt=ut.suffix,Zt=ut.prefixCls,We=Zt===void 0?"rc-textarea":Zt,Ct=ut.showCount,St=ut.count,ae=ut.className,te=ut.style,z=ut.disabled,ie=ut.hidden,ue=ut.classNames,ne=ut.styles,be=ut.onResize,$e=ut.onClear,It=ut.onPressEnter,Dt=ut.readOnly,gt=ut.autoSize,kt=ut.onKeyDown,tn=(0,ge.Z)(ut,Xe),Jt=(0,pe.Z)(ve,{value:de,defaultValue:ve}),dn=(0,me.Z)(Jt,2),sn=dn[0],_t=dn[1],Sn=sn==null?"":String(sn),Pe=rt.useState(!1),qe=(0,me.Z)(Pe,2),Ee=qe[0],vt=qe[1],st=rt.useRef(!1),pt=rt.useState(null),wt=(0,me.Z)(pt,2),jt=wt[0],Bt=wt[1],Gt=(0,rt.useRef)(null),Dn=(0,rt.useRef)(null),bn=function(){var Vt;return(Vt=Dn.current)===null||Vt===void 0?void 0:Vt.textArea},Ln=function(){bn().focus()};(0,rt.useImperativeHandle)(Xt,function(){var nt;return{resizableTextArea:Dn.current,focus:Ln,blur:function(){bn().blur()},nativeElement:((nt=Gt.current)===null||nt===void 0?void 0:nt.nativeElement)||bn()}}),(0,rt.useEffect)(function(){vt(function(nt){return!z&&nt})},[z]);var Zn=rt.useState(null),An=(0,me.Z)(Zn,2),kn=An[0],mn=An[1];rt.useEffect(function(){if(kn){var nt;(nt=bn()).setSelectionRange.apply(nt,(0,Ke.Z)(kn))}},[kn]);var In=(0,he.Z)(St,Ct),$n=(Rt=In.max)!==null&&Rt!==void 0?Rt:at,gn=Number($n)>0,Nn=In.strategy(Sn),_n=!!$n&&Nn>$n,Rn=function(Vt,vn){var Vn=vn;!st.current&&In.exceedFormatter&&In.max&&In.strategy(vn)>In.max&&(Vn=In.exceedFormatter(vn,{max:In.max}),vn!==Vn&&mn([bn().selectionStart||0,bn().selectionEnd||0])),_t(Vn),(0,Ye.rJ)(Vt.currentTarget,Vt,xt,Vn)},Ht=function(Vt){st.current=!0,ot==null||ot(Vt)},Qt=function(Vt){st.current=!1,Rn(Vt,Vt.currentTarget.value),en==null||en(Vt)},un=function(Vt){Rn(Vt,Vt.target.value)},xn=function(Vt){Vt.key==="Enter"&&It&&It(Vt),kt==null||kt(Vt)},yn=function(Vt){vt(!0),lt==null||lt(Vt)},Pn=function(Vt){vt(!1),Wt==null||Wt(Vt)},Hn=function(Vt){_t(""),Ln(),(0,Ye.rJ)(bn(),Vt,xt)},Mn=dt,Fn;In.show&&(In.showFormatter?Fn=In.showFormatter({value:Sn,count:Nn,maxLength:$n}):Fn="".concat(Nn).concat(gn?" / ".concat($n):""),Mn=rt.createElement(rt.Fragment,null,Mn,rt.createElement("span",{className:Ze()("".concat(We,"-data-count"),ue==null?void 0:ue.count),style:ne==null?void 0:ne.count},Fn)));var qn=function(Vt){var vn;be==null||be(Vt),(vn=bn())!==null&&vn!==void 0&&vn.style.height&&Bt(!0)},At=!gt&&!Ct&&!Oe;return rt.createElement(Ce.BaseInput,{ref:Gt,value:Sn,allowClear:Oe,handleReset:Hn,suffix:Mn,prefixCls:We,classNames:(0,Le.Z)((0,Le.Z)({},ue),{},{affixWrapper:Ze()(ue==null?void 0:ue.affixWrapper,(0,it.Z)((0,it.Z)({},"".concat(We,"-show-count"),Ct),"".concat(We,"-textarea-allow-clear"),Oe))}),disabled:z,focused:Ee,className:Ze()(ae,_n&&"".concat(We,"-out-of-range")),style:(0,Le.Z)((0,Le.Z)({},te),jt&&!At?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:ie,readOnly:Dt,onClear:$e},rt.createElement(Be,(0,le.Z)({},tn,{autoSize:gt,maxLength:at,onKeyDown:xn,onChange:un,onFocus:yn,onBlur:Pn,onCompositionStart:Ht,onCompositionEnd:Qt,className:Ze()(ue==null?void 0:ue.textarea),style:(0,Le.Z)((0,Le.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:We,onResize:qn,ref:Dn,readOnly:Dt})))}),Ge=we,mt=Ge},34643:function(Pt,Nt,fe){"use strict";fe.d(Nt,{S:function(){return He}});var le=fe(48736),it=fe(65065);function Le(Ze,Ce){var he=new Set;return Ze.forEach(function(Ye){Ce.has(Ye)||he.add(Ye)}),he}function Ke(Ze){var Ce=Ze||{},he=Ce.disabled,Ye=Ce.disableCheckbox,pe=Ce.checkable;return!!(he||Ye)||pe===!1}function me(Ze,Ce,he,Ye){for(var pe=new Set(Ze),rt=new Set,Te=0;Te<=he;Te+=1){var Ae=Ce.get(Te)||new Set;Ae.forEach(function(tt){var Qe=tt.key,Re=tt.node,_e=tt.children,je=_e===void 0?[]:_e;pe.has(Qe)&&!Ye(Re)&&je.filter(function(ze){return!Ye(ze.node)}).forEach(function(ze){pe.add(ze.key)})})}for(var Me=new Set,ke=he;ke>=0;ke-=1){var et=Ce.get(ke)||new Set;et.forEach(function(tt){var Qe=tt.parent,Re=tt.node;if(!(Ye(Re)||!tt.parent||Me.has(tt.parent.key))){if(Ye(tt.parent.node)){Me.add(Qe.key);return}var _e=!0,je=!1;(Qe.children||[]).filter(function(ze){return!Ye(ze.node)}).forEach(function(ze){var bt=ze.key,Ve=pe.has(bt);_e&&!Ve&&(_e=!1),!je&&(Ve||rt.has(bt))&&(je=!0)}),_e&&pe.add(Qe.key),je&&rt.add(Qe.key),Me.add(Qe.key)}})}return{checkedKeys:Array.from(pe),halfCheckedKeys:Array.from(Le(rt,pe))}}function ge(Ze,Ce,he,Ye,pe){for(var rt=new Set(Ze),Te=new Set(Ce),Ae=0;Ae<=Ye;Ae+=1){var Me=he.get(Ae)||new Set;Me.forEach(function(Qe){var Re=Qe.key,_e=Qe.node,je=Qe.children,ze=je===void 0?[]:je;!rt.has(Re)&&!Te.has(Re)&&!pe(_e)&&ze.filter(function(bt){return!pe(bt.node)}).forEach(function(bt){rt.delete(bt.key)})})}Te=new Set;for(var ke=new Set,et=Ye;et>=0;et-=1){var tt=he.get(et)||new Set;tt.forEach(function(Qe){var Re=Qe.parent,_e=Qe.node;if(!(pe(_e)||!Qe.parent||ke.has(Qe.parent.key))){if(pe(Qe.parent.node)){ke.add(Re.key);return}var je=!0,ze=!1;(Re.children||[]).filter(function(bt){return!pe(bt.node)}).forEach(function(bt){var Ve=bt.key,Ne=rt.has(Ve);je&&!Ne&&(je=!1),!ze&&(Ne||Te.has(Ve))&&(ze=!0)}),je||rt.delete(Re.key),ze&&Te.add(Re.key),ke.add(Re.key)}})}return{checkedKeys:Array.from(rt),halfCheckedKeys:Array.from(Le(Te,rt))}}function He(Ze,Ce,he,Ye){var pe=[],rt;Ye?rt=Ye:rt=Ke;var Te=new Set(Ze.filter(function(et){var tt=!!(0,it.Z)(he,et);return tt||pe.push(et),tt})),Ae=new Map,Me=0;Object.keys(he).forEach(function(et){var tt=he[et],Qe=tt.level,Re=Ae.get(Qe);Re||(Re=new Set,Ae.set(Qe,Re)),Re.add(tt),Me=Math.max(Me,Qe)}),(0,le.ZP)(!pe.length,"Tree missing follow keys: ".concat(pe.slice(0,100).map(function(et){return"'".concat(et,"'")}).join(", ")));var ke;return Ce===!0?ke=me(Te,Ae,Me,rt):ke=ge(Te,Ce.halfCheckedKeys,Ae,Me,rt),ke}},65065:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return le}});function le(it,Le){return it[Le]}},34061:function(Pt,Nt,fe){"use strict";fe.d(Nt,{F:function(){return Qe},H8:function(){return tt},I8:function(){return et},km:function(){return pe},oH:function(){return Me},w$:function(){return rt},zn:function(){return Ae}});var le=fe(34666),it=fe(3300),Le=fe(27247),Ke=fe(43079),me=fe(11592),ge=fe(2738),He=fe(48736),Ze=fe(65065),Ce=["children"];function he(Re,_e){return"".concat(Re,"-").concat(_e)}function Ye(Re){return Re&&Re.type&&Re.type.isTreeNode}function pe(Re,_e){return Re!=null?Re:_e}function rt(Re){var _e=Re||{},je=_e.title,ze=_e._title,bt=_e.key,Ve=_e.children,Ne=je||"title";return{title:Ne,_title:ze||[Ne],key:bt||"key",children:Ve||"children"}}function Te(Re,_e){var je=new Map;function ze(bt){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(bt||[]).forEach(function(Ne){var ht=Ne[_e.key],Be=Ne[_e.children];warning(ht!=null,"Tree node must have a certain key: [".concat(Ve).concat(ht,"]"));var Xe=String(ht);warning(!je.has(Xe)||ht===null||ht===void 0,"Same 'key' exist in the Tree: ".concat(Xe)),je.set(Xe,!0),ze(Be,"".concat(Ve).concat(Xe," > "))})}ze(Re)}function Ae(Re){function _e(je){var ze=(0,me.Z)(je);return ze.map(function(bt){if(!Ye(bt))return(0,He.ZP)(!bt,"Tree/TreeNode can only accept TreeNode as children."),null;var Ve=bt.key,Ne=bt.props,ht=Ne.children,Be=(0,Ke.Z)(Ne,Ce),Xe=(0,Le.Z)({key:Ve},Be),we=_e(ht);return we.length&&(Xe.children=we),Xe}).filter(function(bt){return bt})}return _e(Re)}function Me(Re,_e,je){var ze=rt(je),bt=ze._title,Ve=ze.key,Ne=ze.children,ht=new Set(_e===!0?[]:_e),Be=[];function Xe(we){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return we.map(function(mt,ut){for(var Xt=he(Ge?Ge.pos:"0",ut),Rt=pe(mt[Ve],Xt),ve,de=0;de<bt.length;de+=1){var lt=bt[de];if(mt[lt]!==void 0){ve=mt[lt];break}}var Wt=Object.assign((0,ge.Z)(mt,[].concat((0,it.Z)(bt),[Ve,Ne])),{title:ve,key:Rt,parent:Ge,pos:Xt,children:null,data:mt,isStart:[].concat((0,it.Z)(Ge?Ge.isStart:[]),[ut===0]),isEnd:[].concat((0,it.Z)(Ge?Ge.isEnd:[]),[ut===we.length-1])});return Be.push(Wt),_e===!0||ht.has(Rt)?Wt.children=Xe(mt[Ne]||[],Wt):Wt.children=[],Wt})}return Xe(Re),Be}function ke(Re,_e,je){var ze={};(0,le.Z)(je)==="object"?ze=je:ze={externalGetKey:je},ze=ze||{};var bt=ze,Ve=bt.childrenPropName,Ne=bt.externalGetKey,ht=bt.fieldNames,Be=rt(ht),Xe=Be.key,we=Be.children,Ge=Ve||we,mt;Ne?typeof Ne=="string"?mt=function(Rt){return Rt[Ne]}:typeof Ne=="function"&&(mt=function(Rt){return Ne(Rt)}):mt=function(Rt,ve){return pe(Rt[Xe],ve)};function ut(Xt,Rt,ve,de){var lt=Xt?Xt[Ge]:Re,Wt=Xt?he(ve.pos,Rt):"0",xt=Xt?[].concat((0,it.Z)(de),[Xt]):[];if(Xt){var Oe=mt(Xt,Wt),at={node:Xt,index:Rt,pos:Wt,key:Oe,parentPos:ve.node?ve.pos:null,level:ve.level+1,nodes:xt};_e(at)}lt&&lt.forEach(function(ot,en){ut(ot,en,{node:Xt,pos:Wt,level:ve?ve.level+1:-1},xt)})}ut(null)}function et(Re){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=_e.initWrapper,ze=_e.processEntity,bt=_e.onProcessFinished,Ve=_e.externalGetKey,Ne=_e.childrenPropName,ht=_e.fieldNames,Be=arguments.length>2?arguments[2]:void 0,Xe=Ve||Be,we={},Ge={},mt={posEntities:we,keyEntities:Ge};return je&&(mt=je(mt)||mt),ke(Re,function(ut){var Xt=ut.node,Rt=ut.index,ve=ut.pos,de=ut.key,lt=ut.parentPos,Wt=ut.level,xt=ut.nodes,Oe={node:Xt,nodes:xt,index:Rt,key:de,pos:ve,level:Wt},at=pe(de,ve);we[ve]=Oe,Ge[at]=Oe,Oe.parent=we[lt],Oe.parent&&(Oe.parent.children=Oe.parent.children||[],Oe.parent.children.push(Oe)),ze&&ze(Oe,mt)},{externalGetKey:Xe,childrenPropName:Ne,fieldNames:ht}),bt&&bt(mt),mt}function tt(Re,_e){var je=_e.expandedKeys,ze=_e.selectedKeys,bt=_e.loadedKeys,Ve=_e.loadingKeys,Ne=_e.checkedKeys,ht=_e.halfCheckedKeys,Be=_e.dragOverNodeKey,Xe=_e.dropPosition,we=_e.keyEntities,Ge=(0,Ze.Z)(we,Re),mt={eventKey:Re,expanded:je.indexOf(Re)!==-1,selected:ze.indexOf(Re)!==-1,loaded:bt.indexOf(Re)!==-1,loading:Ve.indexOf(Re)!==-1,checked:Ne.indexOf(Re)!==-1,halfChecked:ht.indexOf(Re)!==-1,pos:String(Ge?Ge.pos:""),dragOver:Be===Re&&Xe===0,dragOverGapTop:Be===Re&&Xe===-1,dragOverGapBottom:Be===Re&&Xe===1};return mt}function Qe(Re){var _e=Re.data,je=Re.expanded,ze=Re.selected,bt=Re.checked,Ve=Re.loaded,Ne=Re.loading,ht=Re.halfChecked,Be=Re.dragOver,Xe=Re.dragOverGapTop,we=Re.dragOverGapBottom,Ge=Re.pos,mt=Re.active,ut=Re.eventKey,Xt=(0,Le.Z)((0,Le.Z)({},_e),{},{expanded:je,selected:ze,checked:bt,loaded:Ve,loading:Ne,halfChecked:ht,dragOver:Be,dragOverGapTop:Xe,dragOverGapBottom:we,pos:Ge,active:mt,key:ut});return"props"in Xt||Object.defineProperty(Xt,"props",{get:function(){return(0,He.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Re}}),Xt}},6790:function(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return St}});var le=fe(32855),it=fe(34666),Le=fe(27247),Ke=fe(74430),me=fe(11913),ge=fe(43079),He=fe(92310),Ze=fe.n(He),Ce=fe(29301),he=fe(70425),Ye=fe(34280),pe=fe(59301),rt=fe(4676),Te=pe.forwardRef(function(ae,te){var z=ae.height,ie=ae.offsetY,ue=ae.offsetX,ne=ae.children,be=ae.prefixCls,$e=ae.onInnerResize,It=ae.innerProps,Dt=ae.rtl,gt=ae.extra,kt={},tn={display:"flex",flexDirection:"column"};return ie!==void 0&&(kt={height:z,position:"relative",overflow:"hidden"},tn=(0,Le.Z)((0,Le.Z)({},tn),{},(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({transform:"translateY(".concat(ie,"px)")},Dt?"marginRight":"marginLeft",-ue),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:kt},pe.createElement(Ce.Z,{onResize:function(dn){var sn=dn.offsetHeight;sn&&$e&&$e()}},pe.createElement("div",(0,le.Z)({style:tn,className:Ze()((0,Ke.Z)({},"".concat(be,"-holder-inner"),be)),ref:te},It),ne,gt)))});Te.displayName="Filler";var Ae=Te;function Me(ae){var te=ae.children,z=ae.setRef,ie=pe.useCallback(function(ue){z(ue)},[]);return pe.cloneElement(te,{ref:ie})}function ke(ae,te,z,ie,ue,ne,be,$e){var It=$e.getKey;return ae.slice(te,z+1).map(function(Dt,gt){var kt=te+gt,tn=be(Dt,kt,{style:{width:ie},offsetX:ue}),Jt=It(Dt);return pe.createElement(Me,{key:Jt,setRef:function(sn){return ne(Dt,sn)}},tn)})}function et(ae,te,z,ie){var ue=z-ae,ne=te-z,be=Math.min(ue,ne)*2;if(ie<=be){var $e=Math.floor(ie/2);return ie%2?z+$e+1:z-$e}return ue>ne?z-(ie-ne):z+(ie-ue)}function tt(ae,te,z){var ie=ae.length,ue=te.length,ne,be;if(ie===0&&ue===0)return null;ie<ue?(ne=ae,be=te):(ne=te,be=ae);var $e={__EMPTY_ITEM__:!0};function It(dn){return dn!==void 0?z(dn):$e}for(var Dt=null,gt=Math.abs(ie-ue)!==1,kt=0;kt<be.length;kt+=1){var tn=It(ne[kt]),Jt=It(be[kt]);if(tn!==Jt){Dt=kt,gt=gt||tn!==It(be[kt+1]);break}}return Dt===null?null:{index:Dt,multiple:gt}}function Qe(ae,te,z){var ie=pe.useState(ae),ue=(0,me.Z)(ie,2),ne=ue[0],be=ue[1],$e=pe.useState(null),It=(0,me.Z)($e,2),Dt=It[0],gt=It[1];return pe.useEffect(function(){var kt=tt(ne||[],ae||[],te);(kt==null?void 0:kt.index)!==void 0&&(z==null||z(kt.index),gt(ae[kt.index])),be(ae)},[ae]),[Dt]}var Re=fe(16089),_e=(typeof navigator=="undefined"?"undefined":(0,it.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=_e,ze=function(ae,te,z,ie){var ue=(0,pe.useRef)(!1),ne=(0,pe.useRef)(null);function be(){clearTimeout(ne.current),ue.current=!0,ne.current=setTimeout(function(){ue.current=!1},50)}var $e=(0,pe.useRef)({top:ae,bottom:te,left:z,right:ie});return $e.current.top=ae,$e.current.bottom=te,$e.current.left=z,$e.current.right=ie,function(It,Dt){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,kt=It?Dt<0&&$e.current.left||Dt>0&&$e.current.right:Dt<0&&$e.current.top||Dt>0&&$e.current.bottom;return gt&&kt?(clearTimeout(ne.current),ue.current=!1):(!kt||ue.current)&&be(),!ue.current&&kt}};function bt(ae,te,z,ie,ue,ne,be){var $e=(0,pe.useRef)(0),It=(0,pe.useRef)(null),Dt=(0,pe.useRef)(null),gt=(0,pe.useRef)(!1),kt=ze(te,z,ie,ue);function tn(Pe,qe){if(Re.Z.cancel(It.current),!kt(!1,qe)){var Ee=Pe;if(!Ee._virtualHandled)Ee._virtualHandled=!0;else return;$e.current+=qe,Dt.current=qe,je||Ee.preventDefault(),It.current=(0,Re.Z)(function(){var vt=gt.current?10:1;be($e.current*vt,!1),$e.current=0})}}function Jt(Pe,qe){be(qe,!0),je||Pe.preventDefault()}var dn=(0,pe.useRef)(null),sn=(0,pe.useRef)(null);function _t(Pe){if(ae){Re.Z.cancel(sn.current),sn.current=(0,Re.Z)(function(){dn.current=null},2);var qe=Pe.deltaX,Ee=Pe.deltaY,vt=Pe.shiftKey,st=qe,pt=Ee;(dn.current==="sx"||!dn.current&&vt&&Ee&&!qe)&&(st=Ee,pt=0,dn.current="sx");var wt=Math.abs(st),jt=Math.abs(pt);dn.current===null&&(dn.current=ne&&wt>jt?"x":"y"),dn.current==="y"?tn(Pe,pt):Jt(Pe,st)}}function Sn(Pe){ae&&(gt.current=Pe.detail===Dt.current)}return[_t,Sn]}function Ve(ae,te,z,ie){var ue=pe.useMemo(function(){return[new Map,[]]},[ae,z.id,ie]),ne=(0,me.Z)(ue,2),be=ne[0],$e=ne[1],It=function(gt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gt,tn=be.get(gt),Jt=be.get(kt);if(tn===void 0||Jt===void 0)for(var dn=ae.length,sn=$e.length;sn<dn;sn+=1){var _t,Sn=ae[sn],Pe=te(Sn);be.set(Pe,sn);var qe=(_t=z.get(Pe))!==null&&_t!==void 0?_t:ie;if($e[sn]=($e[sn-1]||0)+qe,Pe===gt&&(tn=sn),Pe===kt&&(Jt=sn),tn!==void 0&&Jt!==void 0)break}return{top:$e[tn-1]||0,bottom:$e[Jt]}};return It}var Ne=fe(33377),ht=fe(93912),Be=function(){function ae(){(0,Ne.Z)(this,ae),(0,Ke.Z)(this,"maps",void 0),(0,Ke.Z)(this,"id",0),(0,Ke.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ht.Z)(ae,[{key:"set",value:function(z,ie){this.diffRecords.set(z,this.maps[z]),this.maps[z]=ie,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}(),Xe=Be;function we(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function Ge(ae,te,z){var ie=pe.useState(0),ue=(0,me.Z)(ie,2),ne=ue[0],be=ue[1],$e=(0,pe.useRef)(new Map),It=(0,pe.useRef)(new Xe),Dt=(0,pe.useRef)(0);function gt(){Dt.current+=1}function kt(){var Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;gt();var dn=function(){var Sn=!1;$e.current.forEach(function(Pe,qe){if(Pe&&Pe.offsetParent){var Ee=Pe.offsetHeight,vt=getComputedStyle(Pe),st=vt.marginTop,pt=vt.marginBottom,wt=we(st),jt=we(pt),Bt=Ee+wt+jt;It.current.get(qe)!==Bt&&(It.current.set(qe,Bt),Sn=!0)}}),Sn&&be(function(Pe){return Pe+1})};if(Jt)dn();else{Dt.current+=1;var sn=Dt.current;Promise.resolve().then(function(){sn===Dt.current&&dn()})}}function tn(Jt,dn){var sn=ae(Jt),_t=$e.current.get(sn);dn?($e.current.set(sn,dn),kt()):$e.current.delete(sn),!_t!=!dn&&(dn?te==null||te(Jt):z==null||z(Jt))}return(0,pe.useEffect)(function(){return gt},[]),[tn,kt,It.current,ne]}var mt=14/15;function ut(ae,te,z){var ie=(0,pe.useRef)(!1),ue=(0,pe.useRef)(0),ne=(0,pe.useRef)(0),be=(0,pe.useRef)(null),$e=(0,pe.useRef)(null),It,Dt=function(Jt){if(ie.current){var dn=Math.ceil(Jt.touches[0].pageX),sn=Math.ceil(Jt.touches[0].pageY),_t=ue.current-dn,Sn=ne.current-sn,Pe=Math.abs(_t)>Math.abs(Sn);Pe?ue.current=dn:ne.current=sn;var qe=z(Pe,Pe?_t:Sn,!1,Jt);qe&&Jt.preventDefault(),clearInterval($e.current),qe&&($e.current=setInterval(function(){Pe?_t*=mt:Sn*=mt;var Ee=Math.floor(Pe?_t:Sn);(!z(Pe,Ee,!0)||Math.abs(Ee)<=.1)&&clearInterval($e.current)},16))}},gt=function(){ie.current=!1,It()},kt=function(Jt){It(),Jt.touches.length===1&&!ie.current&&(ie.current=!0,ue.current=Math.ceil(Jt.touches[0].pageX),ne.current=Math.ceil(Jt.touches[0].pageY),be.current=Jt.target,be.current.addEventListener("touchmove",Dt,{passive:!1}),be.current.addEventListener("touchend",gt,{passive:!0}))};It=function(){be.current&&(be.current.removeEventListener("touchmove",Dt),be.current.removeEventListener("touchend",gt))},(0,Ye.Z)(function(){return ae&&te.current.addEventListener("touchstart",kt,{passive:!0}),function(){var tn;(tn=te.current)===null||tn===void 0||tn.removeEventListener("touchstart",kt),It(),clearInterval($e.current)}},[ae])}function Xt(ae){return Math.floor(Math.pow(ae,.5))}function Rt(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function ve(ae,te,z){pe.useEffect(function(){var ie=te.current;if(ae&&ie){var ue=!1,ne,be,$e=function(){Re.Z.cancel(ne)},It=function tn(){$e(),ne=(0,Re.Z)(function(){z(be),tn()})},Dt=function(Jt){if(!(Jt.target.draggable||Jt.button!==0)){var dn=Jt;dn._virtualHandled||(dn._virtualHandled=!0,ue=!0)}},gt=function(){ue=!1,$e()},kt=function(Jt){if(ue){var dn=Rt(Jt,!1),sn=ie.getBoundingClientRect(),_t=sn.top,Sn=sn.bottom;if(dn<=_t){var Pe=_t-dn;be=-Xt(Pe),It()}else if(dn>=Sn){var qe=dn-Sn;be=Xt(qe),It()}else $e()}};return ie.addEventListener("mousedown",Dt),ie.ownerDocument.addEventListener("mouseup",gt),ie.ownerDocument.addEventListener("mousemove",kt),function(){ie.removeEventListener("mousedown",Dt),ie.ownerDocument.removeEventListener("mouseup",gt),ie.ownerDocument.removeEventListener("mousemove",kt),$e()}}},[ae])}var de=10;function lt(ae,te,z,ie,ue,ne,be,$e){var It=pe.useRef(),Dt=pe.useState(null),gt=(0,me.Z)(Dt,2),kt=gt[0],tn=gt[1];return(0,Ye.Z)(function(){if(kt&&kt.times<de){if(!ae.current){tn(function(In){return(0,Le.Z)({},In)});return}ne();var Jt=kt.targetAlign,dn=kt.originAlign,sn=kt.index,_t=kt.offset,Sn=ae.current.clientHeight,Pe=!1,qe=Jt,Ee=null;if(Sn){for(var vt=Jt||dn,st=0,pt=0,wt=0,jt=Math.min(te.length-1,sn),Bt=0;Bt<=jt;Bt+=1){var Gt=ue(te[Bt]);pt=st;var Dn=z.get(Gt);wt=pt+(Dn===void 0?ie:Dn),st=wt}for(var bn=vt==="top"?_t:Sn-_t,Ln=jt;Ln>=0;Ln-=1){var Zn=ue(te[Ln]),An=z.get(Zn);if(An===void 0){Pe=!0;break}if(bn-=An,bn<=0)break}switch(vt){case"top":Ee=pt-_t;break;case"bottom":Ee=wt-Sn+_t;break;default:{var kn=ae.current.scrollTop,mn=kn+Sn;pt<kn?qe="top":wt>mn&&(qe="bottom")}}Ee!==null&&be(Ee),Ee!==kt.lastTop&&(Pe=!0)}Pe&&tn((0,Le.Z)((0,Le.Z)({},kt),{},{times:kt.times+1,targetAlign:qe,lastTop:Ee}))}},[kt,ae.current]),function(Jt){if(Jt==null){$e();return}if(Re.Z.cancel(It.current),typeof Jt=="number")be(Jt);else if(Jt&&(0,it.Z)(Jt)==="object"){var dn,sn=Jt.align;"index"in Jt?dn=Jt.index:dn=te.findIndex(function(Pe){return ue(Pe)===Jt.key});var _t=Jt.offset,Sn=_t===void 0?0:_t;tn({times:0,index:dn,offset:Sn,originAlign:sn})}}}var Wt=pe.forwardRef(function(ae,te){var z=ae.prefixCls,ie=ae.rtl,ue=ae.scrollOffset,ne=ae.scrollRange,be=ae.onStartMove,$e=ae.onStopMove,It=ae.onScroll,Dt=ae.horizontal,gt=ae.spinSize,kt=ae.containerSize,tn=ae.style,Jt=ae.thumbStyle,dn=ae.showScrollBar,sn=pe.useState(!1),_t=(0,me.Z)(sn,2),Sn=_t[0],Pe=_t[1],qe=pe.useState(null),Ee=(0,me.Z)(qe,2),vt=Ee[0],st=Ee[1],pt=pe.useState(null),wt=(0,me.Z)(pt,2),jt=wt[0],Bt=wt[1],Gt=!ie,Dn=pe.useRef(),bn=pe.useRef(),Ln=pe.useState(dn),Zn=(0,me.Z)(Ln,2),An=Zn[0],kn=Zn[1],mn=pe.useRef(),In=function(){dn===!0||dn===!1||(clearTimeout(mn.current),kn(!0),mn.current=setTimeout(function(){kn(!1)},3e3))},$n=ne-kt||0,gn=kt-gt||0,Nn=pe.useMemo(function(){if(ue===0||$n===0)return 0;var Hn=ue/$n;return Hn*gn},[ue,$n,gn]),_n=function(Mn){Mn.stopPropagation(),Mn.preventDefault()},Rn=pe.useRef({top:Nn,dragging:Sn,pageY:vt,startTop:jt});Rn.current={top:Nn,dragging:Sn,pageY:vt,startTop:jt};var Ht=function(Mn){Pe(!0),st(Rt(Mn,Dt)),Bt(Rn.current.top),be(),Mn.stopPropagation(),Mn.preventDefault()};pe.useEffect(function(){var Hn=function(At){At.preventDefault()},Mn=Dn.current,Fn=bn.current;return Mn.addEventListener("touchstart",Hn,{passive:!1}),Fn.addEventListener("touchstart",Ht,{passive:!1}),function(){Mn.removeEventListener("touchstart",Hn),Fn.removeEventListener("touchstart",Ht)}},[]);var Qt=pe.useRef();Qt.current=$n;var un=pe.useRef();un.current=gn,pe.useEffect(function(){if(Sn){var Hn,Mn=function(At){var nt=Rn.current,Vt=nt.dragging,vn=nt.pageY,Vn=nt.startTop;Re.Z.cancel(Hn);var xe=Dn.current.getBoundingClientRect(),De=kt/(Dt?xe.width:xe.height);if(Vt){var Et=(Rt(At,Dt)-vn)*De,ct=Vn;!Gt&&Dt?ct-=Et:ct+=Et;var Ie=Qt.current,ft=un.current,zt=ft?ct/ft:0,an=Math.ceil(zt*Ie);an=Math.max(an,0),an=Math.min(an,Ie),Hn=(0,Re.Z)(function(){It(an,Dt)})}},Fn=function(){Pe(!1),$e()};return window.addEventListener("mousemove",Mn,{passive:!0}),window.addEventListener("touchmove",Mn,{passive:!0}),window.addEventListener("mouseup",Fn,{passive:!0}),window.addEventListener("touchend",Fn,{passive:!0}),function(){window.removeEventListener("mousemove",Mn),window.removeEventListener("touchmove",Mn),window.removeEventListener("mouseup",Fn),window.removeEventListener("touchend",Fn),Re.Z.cancel(Hn)}}},[Sn]),pe.useEffect(function(){return In(),function(){clearTimeout(mn.current)}},[ue]),pe.useImperativeHandle(te,function(){return{delayHidden:In}});var xn="".concat(z,"-scrollbar"),yn={position:"absolute",visibility:An?null:"hidden"},Pn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Dt?(Object.assign(yn,{height:8,left:0,right:0,bottom:0}),Object.assign(Pn,(0,Ke.Z)({height:"100%",width:gt},Gt?"left":"right",Nn))):(Object.assign(yn,(0,Ke.Z)({width:8,top:0,bottom:0},Gt?"right":"left",0)),Object.assign(Pn,{width:"100%",height:gt,top:Nn})),pe.createElement("div",{ref:Dn,className:Ze()(xn,(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},"".concat(xn,"-horizontal"),Dt),"".concat(xn,"-vertical"),!Dt),"".concat(xn,"-visible"),An)),style:(0,Le.Z)((0,Le.Z)({},yn),tn),onMouseDown:_n,onMouseMove:In},pe.createElement("div",{ref:bn,className:Ze()("".concat(xn,"-thumb"),(0,Ke.Z)({},"".concat(xn,"-thumb-moving"),Sn)),style:(0,Le.Z)((0,Le.Z)({},Pn),Jt),onMouseDown:Ht}))}),xt=Wt,Oe=20;function at(){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,Oe),Math.floor(z)}var ot=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],en=[],dt={overflowY:"auto",overflowAnchor:"none"};function Zt(ae,te){var z=ae.prefixCls,ie=z===void 0?"rc-virtual-list":z,ue=ae.className,ne=ae.height,be=ae.itemHeight,$e=ae.fullHeight,It=$e===void 0?!0:$e,Dt=ae.style,gt=ae.data,kt=ae.children,tn=ae.itemKey,Jt=ae.virtual,dn=ae.direction,sn=ae.scrollWidth,_t=ae.component,Sn=_t===void 0?"div":_t,Pe=ae.onScroll,qe=ae.onVirtualScroll,Ee=ae.onVisibleChange,vt=ae.innerProps,st=ae.extraRender,pt=ae.styles,wt=ae.showScrollBar,jt=wt===void 0?"optional":wt,Bt=(0,ge.Z)(ae,ot),Gt=pe.useCallback(function(Mt){return typeof tn=="function"?tn(Mt):Mt==null?void 0:Mt[tn]},[tn]),Dn=Ge(Gt,null,null),bn=(0,me.Z)(Dn,4),Ln=bn[0],Zn=bn[1],An=bn[2],kn=bn[3],mn=!!(Jt!==!1&&ne&&be),In=pe.useMemo(function(){return Object.values(An.maps).reduce(function(Mt,Kt){return Mt+Kt},0)},[An.id,An.maps]),$n=mn&&gt&&(Math.max(be*gt.length,In)>ne||!!sn),gn=dn==="rtl",Nn=Ze()(ie,(0,Ke.Z)({},"".concat(ie,"-rtl"),gn),ue),_n=gt||en,Rn=(0,pe.useRef)(),Ht=(0,pe.useRef)(),Qt=(0,pe.useRef)(),un=(0,pe.useState)(0),xn=(0,me.Z)(un,2),yn=xn[0],Pn=xn[1],Hn=(0,pe.useState)(0),Mn=(0,me.Z)(Hn,2),Fn=Mn[0],qn=Mn[1],At=(0,pe.useState)(!1),nt=(0,me.Z)(At,2),Vt=nt[0],vn=nt[1],Vn=function(){vn(!0)},xe=function(){vn(!1)},De={getKey:Gt};function Et(Mt){Pn(function(Kt){var wn;typeof Mt=="function"?wn=Mt(Kt):wn=Mt;var cn=Mr(wn);return Rn.current.scrollTop=cn,cn})}var ct=(0,pe.useRef)({start:0,end:_n.length}),Ie=(0,pe.useRef)(),ft=Qe(_n,Gt),zt=(0,me.Z)(ft,1),an=zt[0];Ie.current=an;var pn=pe.useMemo(function(){if(!mn)return{scrollHeight:void 0,start:0,end:_n.length-1,offset:void 0};if(!$n){var Mt;return{scrollHeight:((Mt=Ht.current)===null||Mt===void 0?void 0:Mt.offsetHeight)||0,start:0,end:_n.length-1,offset:void 0}}for(var Kt=0,wn,cn,Wn,Yt=_n.length,Ot=0;Ot<Yt;Ot+=1){var $t=_n[Ot],on=Gt($t),Jn=An.get(on),er=Kt+(Jn===void 0?be:Jn);er>=yn&&wn===void 0&&(wn=Ot,cn=Kt),er>yn+ne&&Wn===void 0&&(Wn=Ot),Kt=er}return wn===void 0&&(wn=0,cn=0,Wn=Math.ceil(ne/be)),Wn===void 0&&(Wn=_n.length-1),Wn=Math.min(Wn+1,_n.length-1),{scrollHeight:Kt,start:wn,end:Wn,offset:cn}},[$n,mn,yn,_n,kn,ne]),Lt=pn.scrollHeight,Ut=pn.start,Fe=pn.end,nn=pn.offset;ct.current.start=Ut,ct.current.end=Fe,pe.useLayoutEffect(function(){var Mt=An.getRecord();if(Mt.size===1){var Kt=Array.from(Mt.keys())[0],wn=Mt.get(Kt),cn=_n[Ut];if(cn&&wn===void 0){var Wn=Gt(cn);if(Wn===Kt){var Yt=An.get(Kt),Ot=Yt-be;Et(function($t){return $t+Ot})}}}An.resetRecord()},[Lt]);var Ft=pe.useState({width:0,height:ne}),rn=(0,me.Z)(Ft,2),ln=rn[0],Bn=rn[1],Tn=function(Kt){Bn({width:Kt.offsetWidth,height:Kt.offsetHeight})},ar=(0,pe.useRef)(),Gn=(0,pe.useRef)(),jn=pe.useMemo(function(){return at(ln.width,sn)},[ln.width,sn]),or=pe.useMemo(function(){return at(ln.height,Lt)},[ln.height,Lt]),Kn=Lt-ne,gr=(0,pe.useRef)(Kn);gr.current=Kn;function Mr(Mt){var Kt=Mt;return Number.isNaN(gr.current)||(Kt=Math.min(Kt,gr.current)),Kt=Math.max(Kt,0),Kt}var yr=yn<=0,Cr=yn>=Kn,kr=Fn<=0,hr=Fn>=sn,sr=ze(yr,Cr,kr,hr),Dr=function(){return{x:gn?-Fn:Fn,y:yn}},dr=(0,pe.useRef)(Dr()),br=(0,he.zX)(function(Mt){if(qe){var Kt=(0,Le.Z)((0,Le.Z)({},Dr()),Mt);(dr.current.x!==Kt.x||dr.current.y!==Kt.y)&&(qe(Kt),dr.current=Kt)}});function xr(Mt,Kt){var wn=Mt;Kt?((0,rt.flushSync)(function(){qn(wn)}),br()):Et(wn)}function Br(Mt){var Kt=Mt.currentTarget.scrollTop;Kt!==yn&&Et(Kt),Pe==null||Pe(Mt),br()}var fr=function(Kt){var wn=Kt,cn=sn?sn-ln.width:0;return wn=Math.max(wn,0),wn=Math.min(wn,cn),wn},ur=(0,he.zX)(function(Mt,Kt){Kt?((0,rt.flushSync)(function(){qn(function(wn){var cn=wn+(gn?-Mt:Mt);return fr(cn)})}),br()):Et(function(wn){var cn=wn+Mt;return cn})}),nr=bt(mn,yr,Cr,kr,hr,!!sn,ur),Tr=(0,me.Z)(nr,2),Zr=Tr[0],Gr=Tr[1];ut(mn,Rn,function(Mt,Kt,wn,cn){var Wn=cn;return sr(Mt,Kt,wn)?!1:!Wn||!Wn._virtualHandled?(Wn&&(Wn._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Mt?Kt:0,deltaY:Mt?0:Kt}),!0):!1}),ve($n,Rn,function(Mt){Et(function(Kt){return Kt+Mt})}),(0,Ye.Z)(function(){function Mt(wn){var cn=yr&&wn.detail<0,Wn=Cr&&wn.detail>0;mn&&!cn&&!Wn&&wn.preventDefault()}var Kt=Rn.current;return Kt.addEventListener("wheel",Zr,{passive:!1}),Kt.addEventListener("DOMMouseScroll",Gr,{passive:!0}),Kt.addEventListener("MozMousePixelScroll",Mt,{passive:!1}),function(){Kt.removeEventListener("wheel",Zr),Kt.removeEventListener("DOMMouseScroll",Gr),Kt.removeEventListener("MozMousePixelScroll",Mt)}},[mn,yr,Cr]),(0,Ye.Z)(function(){if(sn){var Mt=fr(Fn);qn(Mt),br({x:Mt})}},[ln.width,sn]);var cr=function(){var Kt,wn;(Kt=ar.current)===null||Kt===void 0||Kt.delayHidden(),(wn=Gn.current)===null||wn===void 0||wn.delayHidden()},Jr=lt(Rn,_n,An,be,Gt,function(){return Zn(!0)},Et,cr);pe.useImperativeHandle(te,function(){return{nativeElement:Qt.current,getScrollInfo:Dr,scrollTo:function(Kt){function wn(cn){return cn&&(0,it.Z)(cn)==="object"&&("left"in cn||"top"in cn)}wn(Kt)?(Kt.left!==void 0&&qn(fr(Kt.left)),Jr(Kt.top)):Jr(Kt)}}}),(0,Ye.Z)(function(){if(Ee){var Mt=_n.slice(Ut,Fe+1);Ee(Mt,_n)}},[Ut,Fe,_n]);var pr=Ve(_n,Gt,An,be),Pr=st==null?void 0:st({start:Ut,end:Fe,virtual:$n,offsetX:Fn,offsetY:nn,rtl:gn,getSize:pr}),Sr=ke(_n,Ut,Fe,sn,Fn,Ln,kt,De),wr=null;ne&&(wr=(0,Le.Z)((0,Ke.Z)({},It?"height":"maxHeight",ne),dt),mn&&(wr.overflowY="hidden",sn&&(wr.overflowX="hidden"),Vt&&(wr.pointerEvents="none")));var Yn={};return gn&&(Yn.dir="rtl"),pe.createElement("div",(0,le.Z)({ref:Qt,style:(0,Le.Z)((0,Le.Z)({},Dt),{},{position:"relative"}),className:Nn},Yn,Bt),pe.createElement(Ce.Z,{onResize:Tn},pe.createElement(Sn,{className:"".concat(ie,"-holder"),style:wr,ref:Rn,onScroll:Br,onMouseEnter:cr},pe.createElement(Ae,{prefixCls:ie,height:Lt,offsetX:Fn,offsetY:nn,scrollWidth:sn,onInnerResize:Zn,ref:Ht,innerProps:vt,rtl:gn,extra:Pr},Sr))),$n&&Lt>ne&&pe.createElement(xt,{ref:ar,prefixCls:ie,scrollOffset:yn,scrollRange:Lt,rtl:gn,onScroll:xr,onStartMove:Vn,onStopMove:xe,spinSize:or,containerSize:ln.height,style:pt==null?void 0:pt.verticalScrollBar,thumbStyle:pt==null?void 0:pt.verticalScrollBarThumb,showScrollBar:jt}),$n&&sn>ln.width&&pe.createElement(xt,{ref:Gn,prefixCls:ie,scrollOffset:Fn,scrollRange:sn,rtl:gn,onScroll:xr,onStartMove:Vn,onStopMove:xe,spinSize:jn,containerSize:ln.width,horizontal:!0,style:pt==null?void 0:pt.horizontalScrollBar,thumbStyle:pt==null?void 0:pt.horizontalScrollBarThumb,showScrollBar:jt}))}var We=pe.forwardRef(Zt);We.displayName="List";var Ct=We,St=Ct},93314:function(Pt){"use strict";Pt.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(Pt,Nt,fe){"use strict";fe.d(Nt,{Z:function(){return Ze}});const le=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,it=(Ce,he)=>(!he||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",Le=(Ce,he)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const Ye=getComputedStyle(Ce,null);return it(Ye.overflowY,he)||it(Ye.overflowX,he)||(pe=>{const rt=(Te=>{if(!Te.ownerDocument||!Te.ownerDocument.defaultView)return null;try{return Te.ownerDocument.defaultView.frameElement}catch(Ae){return null}})(pe);return!!rt&&(rt.clientHeight<pe.scrollHeight||rt.clientWidth<pe.scrollWidth)})(Ce)}return!1},Ke=(Ce,he,Ye,pe,rt,Te,Ae,Me)=>Te<Ce&&Ae>he||Te>Ce&&Ae<he?0:Te<=Ce&&Me<=Ye||Ae>=he&&Me>=Ye?Te-Ce-pe:Ae>he&&Me<Ye||Te<Ce&&Me>Ye?Ae-he+rt:0,me=Ce=>{const he=Ce.parentElement;return he==null?Ce.getRootNode().host||null:he},ge=(Ce,he)=>{var Ye,pe,rt,Te;if(typeof document=="undefined")return[];const{scrollMode:Ae,block:Me,inline:ke,boundary:et,skipOverflowHiddenElements:tt}=he,Qe=typeof et=="function"?et:xt=>xt!==et;if(!le(Ce))throw new TypeError("Invalid target");const Re=document.scrollingElement||document.documentElement,_e=[];let je=Ce;for(;le(je)&&Qe(je);){if(je=me(je),je===Re){_e.push(je);break}je!=null&&je===document.body&&Le(je)&&!Le(document.documentElement)||je!=null&&Le(je,tt)&&_e.push(je)}const ze=(pe=(Ye=window.visualViewport)==null?void 0:Ye.width)!=null?pe:innerWidth,bt=(Te=(rt=window.visualViewport)==null?void 0:rt.height)!=null?Te:innerHeight,{scrollX:Ve,scrollY:Ne}=window,{height:ht,width:Be,top:Xe,right:we,bottom:Ge,left:mt}=Ce.getBoundingClientRect(),{top:ut,right:Xt,bottom:Rt,left:ve}=(xt=>{const Oe=window.getComputedStyle(xt);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(Ce);let de=Me==="start"||Me==="nearest"?Xe-ut:Me==="end"?Ge+Rt:Xe+ht/2-ut+Rt,lt=ke==="center"?mt+Be/2-ve+Xt:ke==="end"?we+Xt:mt-ve;const Wt=[];for(let xt=0;xt<_e.length;xt++){const Oe=_e[xt],{height:at,width:ot,top:en,right:dt,bottom:Zt,left:We}=Oe.getBoundingClientRect();if(Ae==="if-needed"&&Xe>=0&&mt>=0&&Ge<=bt&&we<=ze&&(Oe===Re&&!Le(Oe)||Xe>=en&&Ge<=Zt&&mt>=We&&we<=dt))return Wt;const Ct=getComputedStyle(Oe),St=parseInt(Ct.borderLeftWidth,10),ae=parseInt(Ct.borderTopWidth,10),te=parseInt(Ct.borderRightWidth,10),z=parseInt(Ct.borderBottomWidth,10);let ie=0,ue=0;const ne="offsetWidth"in Oe?Oe.offsetWidth-Oe.clientWidth-St-te:0,be="offsetHeight"in Oe?Oe.offsetHeight-Oe.clientHeight-ae-z:0,$e="offsetWidth"in Oe?Oe.offsetWidth===0?0:ot/Oe.offsetWidth:0,It="offsetHeight"in Oe?Oe.offsetHeight===0?0:at/Oe.offsetHeight:0;if(Re===Oe)ie=Me==="start"?de:Me==="end"?de-bt:Me==="nearest"?Ke(Ne,Ne+bt,bt,ae,z,Ne+de,Ne+de+ht,ht):de-bt/2,ue=ke==="start"?lt:ke==="center"?lt-ze/2:ke==="end"?lt-ze:Ke(Ve,Ve+ze,ze,St,te,Ve+lt,Ve+lt+Be,Be),ie=Math.max(0,ie+Ne),ue=Math.max(0,ue+Ve);else{ie=Me==="start"?de-en-ae:Me==="end"?de-Zt+z+be:Me==="nearest"?Ke(en,Zt,at,ae,z+be,de,de+ht,ht):de-(en+at/2)+be/2,ue=ke==="start"?lt-We-St:ke==="center"?lt-(We+ot/2)+ne/2:ke==="end"?lt-dt+te+ne:Ke(We,dt,ot,St,te+ne,lt,lt+Be,Be);const{scrollLeft:Dt,scrollTop:gt}=Oe;ie=It===0?0:Math.max(0,Math.min(gt+ie/It,Oe.scrollHeight-at/It+be)),ue=$e===0?0:Math.max(0,Math.min(Dt+ue/$e,Oe.scrollWidth-ot/$e+ne)),de+=gt-ie,lt+=Dt-ue}Wt.push({el:Oe,top:ie,left:ue})}return Wt},He=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(he=>he===Object(he)&&Object.keys(he).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function Ze(Ce,he){if(!Ce.isConnected||!(rt=>{let Te=rt;for(;Te&&Te.parentNode;){if(Te.parentNode===document)return!0;Te=Te.parentNode instanceof ShadowRoot?Te.parentNode.host:Te.parentNode}return!1})(Ce))return;const Ye=(rt=>{const Te=window.getComputedStyle(rt);return{top:parseFloat(Te.scrollMarginTop)||0,right:parseFloat(Te.scrollMarginRight)||0,bottom:parseFloat(Te.scrollMarginBottom)||0,left:parseFloat(Te.scrollMarginLeft)||0}})(Ce);if((rt=>typeof rt=="object"&&typeof rt.behavior=="function")(he))return he.behavior(ge(Ce,he));const pe=typeof he=="boolean"||he==null?void 0:he.behavior;for(const{el:rt,top:Te,left:Ae}of ge(Ce,He(he))){const Me=Te-Ye.top+Ye.bottom,ke=Ae-Ye.left+Ye.right;rt.scroll({top:Me,left:ke,behavior:pe})}}}}]);