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([[1482],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(Nt,_t){"use strict";_t.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},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 Nt={},_t="5.0",fe={},le=null,it=!1,Ae=!1,Ke=null,me=!1,ge=null,_e=null,Ge=0;Ge<arguments.length;Ge++){var Ce=arguments[Ge];if(Ce!==null)switch(typeof Ce){case"number":_t=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?_t=Ce:Ke=Ce;break;case"object":typeof Ce.is3D!="undefined"?le=Ce:fe=Ce;break;case"boolean":it=Ce,Ae=!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&&!Ae&&(it=!0)),Ke!==null&&fe.id===void 0&&(fe.id=Ke);var he="",Ye="",pe=!1,rt=null,Me=null,Be=null,Le=!1,ke=null,tt=null,et=null,$e=null,Ie=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var Re=function(Pe){return parseFloat(Pe)>4?parseFloat(Pe):5};Nt.setHTML5Codebase=function(Pe,at){_e=Pe,st(Pe,at)},Nt.setJavaCodebase=Nt.setJavaCodebaseVersion=Nt.isCompiledInstalled=Nt.setPreCompiledScriptPath=Nt.setPreCompiledResourcePath=function(){},Nt.setHTML5CodebaseVersion=function(Pe,at){var lt=parseFloat(Pe);if(lt!==NaN&&lt<5){console.log("The GeoGebra HTML5 codebase version "+lt+" is deprecated. Using version latest instead.");return}ge=Pe,de(Pe,at)},Nt.getHTML5CodebaseVersion=function(){return Me},Nt.getParameters=function(){return fe},Nt.setFontsCSSURL=function(Pe){$e=Pe},Nt.setGiacJSURL=function(Pe){},Nt.setJNLPFile=function(Pe){he=Pe},Nt.setJNLPBaseDir=function(Pe){},Nt.inject=function(){function Pe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var at="auto",lt=fe.id,tn,gt=!1,Tt=0;Tt<arguments.length;Tt++){var We=arguments[Tt];typeof We=="string"?(We=We.toLowerCase(),We.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?at=We:lt=arguments[Tt]):typeof We=="boolean"?gt=We:We instanceof HTMLElement&&(tn=We)}Et();function Et(){if(!me){setTimeout(Et,200);return}at=Ht(at);var Bt=tn||document.getElementById(lt);if(!Bt){console.log("possibly bug on ajax loading? ");return}if(Nt.removeExistingApplet(Bt,!1),fe.width===void 0&&Bt.clientWidth&&(fe.width=Bt.clientWidth),fe.height===void 0&&Bt.clientHeight&&(fe.height=Bt.clientHeight),!(fe.width&&fe.height)&&at==="html5"&&(delete fe.width,delete fe.height),rt=at,at==="screenshot")Se(Bt,fe);else{var ae=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?ae=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(ae=(!Ze()||Pe())&&je()),ae?(rt="screenshot",yt(Bt,fe,gt,at)):Xe(Bt,fe,gt)}}};function Ze(){try{return window.self!==window.top}catch(Pe){return!0}}function je(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Nt.getViews=function(){return le},Nt.isJavaInstalled=function(){return!1};var wt=function(Pe){var at=function(Tt){var We=JSON.parse(Tt),Et=function(te){return te.type=="G"||te.type=="E"},Bt=We.elements?We.elements.filter(Et)[0]:We;if(!Bt||!Bt.url){lt();return}fe.fileName=Bt.url,ze(Bt.settings||{}),le.is3D=!0;var ae="https://www.geogebra.org/images/";Nt.setPreviewImage(ke||Bt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Pe()},lt=function(){fe.onError&&fe.onError(),Zt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},tn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",gt="/materials/"+fe.material_id+"?scope=basic";Ne("https://"+tn+"/api/proxy.php?path="+encodeURIComponent(gt),at,lt)};function ze(Pe){var at=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(lt){Pe[lt]=!!Pe[lt]}),at.forEach(function(lt){fe[lt]===void 0&&Pe[lt]!==void 0&&(fe[lt]=Pe[lt])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ne(Pe,at,lt){var tn=new XMLHttpRequest;tn.open("GET",Pe),tn.onload=function(){at(tn.responseText)},tn.onerror=lt,tn.send()}Nt.isHTML5Installed=function(){return!0},Nt.getLoadedAppletType=function(){return rt},Nt.setPreviewImage=function(Pe,at,lt){ke=Pe,tt=at,et=lt},Nt.removeExistingApplet=function(Pe,at){var lt;typeof Pe=="string"&&(Pe=document.getElementById(Pe)),rt=null;var tn=null;for(lt=0;lt<Pe.childNodes.length;lt++){var gt=Pe.childNodes[lt],Tt=gt.className;Tt==="applet_screenshot"?at?(gt.style.display="block",rt="screenshot"):gt.style.display="none":Tt!=="applet_scaler prerender"&&(Pe.removeChild(gt),tn=Tt&&Tt.indexOf("appletParameters")!=-1?gt.id:null,lt--)}var We=fe.id!==void 0?fe.id:tn,Et=window[We];Et&&typeof Et.getBase64=="function"&&(Et.remove(),window[We]=null)},Nt.refreshHitPoints=function(){if(Re(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Pe=Nt.getAppletObject();return Pe&&typeof Pe.recalculateEnvironments=="function"?(Pe.recalculateEnvironments(),!0):!1},Nt.startAnimation=function(){var Pe=Nt.getAppletObject();return Pe&&typeof Pe.startAnimation=="function"?(Pe.startAnimation(),!0):!1},Nt.stopAnimation=function(){var Pe=Nt.getAppletObject();return Pe&&typeof Pe.stopAnimation=="function"?(Pe.stopAnimation(),!0):!1},Nt.getAppletObject=function(){var Pe=fe.id!==void 0?fe.id:"ggbApplet";return window[Pe]},Nt.resize=function(){};var ct=function(Pe,at,lt){var tn=document.createElement("param");tn.setAttribute("name",at),tn.setAttribute("value",lt),Pe.appendChild(tn)},Fe=function(Pe){return Pe&&Pe!=="false"},Xe=function(Pe,at,lt){Re(Me)<=4.2&&(lt=!0);var tn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Me||ggbHTML5LoadedCodebaseIsWebSimple&&!Le)&&(tn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var gt=document.createElement("div");gt.classList.add("appletParameters","notranslate");var Tt=at.width,We=at.height;if(at.disableAutoScale=at.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():at.disableAutoScale,at.width!==void 0)if(Re(Me)<=4.4)Fe(at.showToolBar)&&(at.height-=7),Fe(at.showAlgebraInput)&&(at.height-=37),at.width<605&&Fe(at.showToolBar)&&(at.width=605,Tt=605);else{var Et=100;(Fe(at.showToolBar)||Fe(at.showMenuBar))&&(at.hasOwnProperty("customToolBar")&&(at.customToolbar=at.customToolBar),Et=Fe(at.showMenuBar)?245:155),Tt<Et&&(at.width=Et,Tt=Et)}gt.style.border="none",gt.style.display="inline-block";for(var Bt in at)at.hasOwnProperty(Bt)&&Bt!=="appletOnLoad"&&gt.setAttribute("data-param-"+Bt,at[Bt]);$e&&gt.setAttribute("data-param-fontscssurl",$e),Nt.resize=function(){GGBAppletUtils.responsiveResize(Pe,at)},window.addEventListener("resize",function(on){Nt.resize()});var ae=typeof at.appletOnLoad=="function"?at.appletOnLoad:function(){};if(!lt&&at.width!==void 0){at.hasOwnProperty("showSplash")||gt.setAttribute("data-param-showSplash","false");var te=Pe.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var ie=te.querySelector(".ggb_preview");else{var ie=Qt(Tt,We,at.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Tt+"px",te.style.height=We+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),Re(Me)>=5?(at.appletOnLoad=function(on){var $t=Pe.querySelector(".ggb_preview");$t&&$t.parentNode.removeChild($t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(on)},z||te.appendChild(ie)):gt.appendChild(ie),te.appendChild(gt),z||Pe.appendChild(te),setTimeout(function(){Nt.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(gt),Pe.appendChild(se),at.appletOnLoad=function(on){Nt.resize(),ae(on)}}function ne(on,$t){$t&&typeof $t.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(on,$t.appletOnLoad):renderGGBElement(on),Zt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$t)}function be(on,$t){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:on,params:$t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(cn){ne(cn.article,cn.params)}),html5AppletsToProcess=null)},Re(Me)<5&&(on.className+=" geogebraweb")):ne(on,$t)}if(tn){scriptLoadStarted=!0;for(var Qe=0;Qe<gt.childNodes.length;Qe++){var Wt=gt.childNodes[Qe].tagName;Wt==="TABLE"&&(gt.removeChild(gt.childNodes[Qe]),Qe--)}if(ggbHTML5LoadedScript!==null){var Ft=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ft!=null&&Ft.parentNode.removeChild(Ft)}var Ct=document.createElement("script"),Dt=function(){be(gt,at)};Ct.src=Ye+Be,ggbHTML5LoadedCodebaseIsWebSimple=Le,ggbHTML5LoadedCodebaseVersion=Me,ggbHTML5LoadedScript=Ct.src,Zt("GeoGebra HTML5 codebase loaded: '"+Ye+"'.",at),!_e&&(!ge||ge=="5.0")?(Le?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Dt()):Ye.requirejs?__webpack_require__.e(981).then(function(){var on=[__webpack_require__(60981)];Dt.apply(null,on)}.bind(this)).catch(__webpack_require__.oe):(Ct.onload=Dt,Pe.appendChild(Ct))}else be(gt,at);at.height=We,at.width=Tt},Se=function(Pe,at,lt){var tn=Qt(at.width,at.height,at.borderColor,lt),gt=document.createElement("div");gt.style.position="relative",gt.style.display="block",gt.style.width=at.width+"px",gt.style.height=at.height+"px",gt.className="applet_screenshot applet_scaler"+(lt?" applet_screenshot_play":""),gt.appendChild(tn);var Tt=GGBAppletUtils.getScale(at,Pe,lt);lt?(Pe.appendChild(ht()),window.GGBT_wsf_view||(Pe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(gt,"66%"),Pe.appendChild(gt),Tt!==1&&!isNaN(Tt)&&(GGBAppletUtils.scaleElement(gt,Tt),gt.style.width=at.width+"px",gt.style.height=at.height+"px",gt.parentNode.style.width=at.width*Tt+"px",gt.parentNode.style.height=at.height*Tt+"px"),Nt.resize=function(){Ve(Pe,tn,gt,lt)},window.addEventListener("resize",function(We){Nt.resize()}),Nt.resize()};function Ve(Pe,at,lt,tn){if(Pe.contains(at)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Pe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Pe)}var gt=GGBAppletUtils.getScale(fe,Pe,tn);lt.parentNode!==null&&(!isNaN(gt)&&gt!==1?(GGBAppletUtils.scaleElement(lt,gt),lt.parentNode.style.width=fe.width*gt+"px",lt.parentNode.style.height=fe.height*gt+"px"):(GGBAppletUtils.scaleElement(lt,1),lt.parentNode.style.width=fe.width+"px",lt.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Pe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Nt.onExitFullscreen=function(Pe,at){at.appendChild(Pe)};var yt=function(Pe,at,lt,tn){Se(Pe,at,!0);for(var gt=function(){var Et=[];for(We=0;We<Pe.childNodes.length;We++)Et.push(Pe.childNodes[We]);if(window.GGBT_wsf_view){var Bt=window.GGBT_wsf_view.renderFullScreen(Pe,at.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(Pe).find(".fullscreencontent");te.length>0?(Bt.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Xe(Bt,at,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else rt=tn,Xe(Pe,at,!1);if(!window.GGBT_wsf_view)for(We=0;We<Et.length;We++)Pe.removeChild(Et[We])},Tt=Pe.getElementsByClassName("ggb_preview_play"),We=0;We<Tt.length;We++)Tt[We].addEventListener("click",gt,!1),Tt[We].addEventListener("ontouchstart",gt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Pe),je()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ht=function(){var Pe=document.createElement("div");if(Pe.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");}',lt=document.createElement("style");lt.styleSheet?lt.styleSheet.cssText=at:lt.appendChild(document.createTextNode(at)),document.getElementsByTagName("head")[0].appendChild(lt)}return Pe},Qt=function(Pe,at,lt,tn){var gt=document.createElement("div");gt.className="ggb_preview",gt.style.position="absolute",gt.style.zIndex="90",gt.style.width=Pe-2+"px",gt.style.height=at-2+"px",gt.style.top="0px",gt.style.left="0px",gt.style.overflow="hidden",gt.style.backgroundColor="white";var Tt="lightgrey";lt!==void 0&&(lt==="none"?Tt="transparent":Tt=lt),gt.style.border="1px solid "+Tt;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,tt!==null){var Et,Bt,ae;if(!tn){Et=document.createElement("img"),Et.style.position="absolute",Et.style.zIndex="1001",Et.style.opacity=1,We.style.opacity=.3,Bt=360,Bt>Pe/4*3&&(Bt=Pe/4*3),ae=Bt/5.8,Et.setAttribute("src",tt),Et.setAttribute("width",Bt),Et.setAttribute("height",ae);var te=(Pe-Bt)/2,z=(at-ae)/2;Et.style.left=te+"px",Et.style.top=z+"px",gt.appendChild(Et)}}return gt.appendChild(We),gt},Ht=function(Pe){return Pe=Pe.toLowerCase(),Pe==="html5"||Pe==="screenshot"?Pe:"html5"},ve=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Pe,at){if(Me=Pe,at){st(Me,!0);return}var lt=!it;if(lt){var tn=Re(Me);!isNaN(tn)&&tn<4.4&&(lt=!1)}var gt,Tt;window.location.protocol.substr(0,4)==="http"?gt=window.location.protocol:gt="http:";var We=Me.indexOf("//");We>0?Tt=Me:We===0?Tt=gt+Me:Tt="https://www.geogebra.org/apps/5.2.814.0/";for(var Et in ve)if(Me.slice(ve[Et].length*-1)===ve[Et]||Me.slice((ve[Et].length+1)*-1)===ve[Et]+"/"){st(Tt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&lt&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Fe(fe.showToolBar)&&!Fe(fe.showMenuBar)&&!Fe(fe.showAlgebraInput)&&!Fe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Tt+="webSimple/":Tt+="web3d/",st(Tt,!1)},st=function(Pe,at){if(Pe.requirejs){Ye=Pe;return}Pe.slice(-1)!=="/"&&(Pe+="/"),Ye=Pe,at===null&&(at=Pe.indexOf("http")===-1),pe=at,Be="web.nocache.js",Le=!1;var lt=Ye.split("/");lt.length>1&&(!at&&lt[lt.length-2]==="webSimple"?(Be="webSimple.nocache.js",Le=!0):ve.indexOf(lt[lt.length-2])>=0&&(Be=lt[lt.length-2]+".nocache.js")),lt=Pe.split("/"),Me=lt[lt.length-3],Me.substr(0,4)==="test"?Me=Me.substr(4,1)+"."+Me.substr(5,1):(Me.substr(0,3)==="war"||Me.substr(0,4)==="beta")&&(Me="5.0");var tn=parseFloat(Me);tn!==NaN&&tn<5&&Pe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+tn+" is deprecated. Using version latest instead."),de("5.0",at))},Zt=function(Pe,at){window.console&&window.console.log&&(!at||typeof at.showLogging=="undefined"||at.showLogging&&at.showLogging!=="false")&&console.log(Pe)};fe.material_id!==void 0?wt(St):St();function St(){var Pe=_t;ge!==null?Pe=ge:parseFloat(Pe)<5&&(Pe="5.0"),de(Pe,!1),_e!==null&&st(_e,pe),me=!0}return Nt},GGBAppletUtils=function(){"use strict";function Nt(){return window.GGBT_wsf_edit!==void 0}function _t(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,_e,Ge,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,Me=0,Be=0,Le=0,ke=0,tt=0,et=0;if(Ye)rt=Ye.offsetWidth,Me=Math.max(Ge?Ye.offsetWidth:0,Ye.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(rt=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Be=rt):(rt=window.innerWidth,Me=window.innerHeight,Be=window.innerWidth),me){var $e=me.getBoundingClientRect();$e.left>0&&$e.left<=rt&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ke=rt-$e.width-$e.left,tt=Be<=480?10:30):(tt=$e.left,ke=Be<=480?10:30),Le=tt+ke)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ie=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Le=40,et=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Le=0,et=40)}}return me&&((_e===void 0||!_e)&&ge>0&&ge+Le<rt?rt=ge:rt-=Le,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(_e===void 0||!_e)&&(Me-=et)),{width:rt,height:Me}}function le(me,ge,_e,Ge,Ce){if(me.isScreenshoGenerator)return 1;var he=Ge!==void 0&&Ge,Ye=me.noScaleMargin!=null&&me.noScaleMargin,pe=function(Ie){return Ie&&Ie!=="false"},rt=pe(me.autoHeight),Me=fe(ge,me.width,_e,rt,he&&window.GGBT_wsf_view||Ye,Ce),Be=parseInt(Me.width),Le=me.width,ke=me.height;if(Le===void 0){var tt=ge.querySelector(".appletParameters");tt&&(Le=tt.offsetWidth,ke=tt.offsetHeight)}var et=Be/Le,$e=he?1:Me.height/ke;return _e!==void 0&&!_e&&(et=Math.min(1,et),$e=Math.min(1,$e)),Math.min(et,$e)}function it(me,ge,_e){var Ge=1,Ce,he=!1;if(me.hasOwnProperty("allowUpscale")&&(he=me.allowUpscale),me.hasOwnProperty("scale")&&(Ge=parseFloat(me.scale),(isNaN(Ge)||Ge===null||Ge===0)&&(Ge=1),Ge>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,_e,me.scaleContainerClass);else return Ge;return he&&(!me.hasOwnProperty("scale")||Ge===1)?Ce:Math.min(Ge,Ce)}function Ae(me){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),_e=Math.min(window.innerHeight,document.documentElement.clientHeight),Ge=me.getBoundingClientRect(),Ce=(ge-Ge.width)/2,he=(_e-Ge.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 _e=me.querySelector(".appletParameters");if(_e){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==_e.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(_e.parentElement&&/fullscreen/.test(_e.parentElement.className))return;var Ge=it(ge,me);Nt()&&_e.setAttribute("data-param-scale",Ge);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(Ge)&&Ge!==1?(Ce.parentNode.style.width=ge.width*Ge+"px",Ce.parentNode.style.height=ge.height*Ge+"px",_t(Ce,Ge)):(_t(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()&&Ae(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(_e).parents(".content-added-content"))}}return{responsiveResize:Ke,isFlexibleWorksheetEditor:Nt,positionCenter:Ae,getScale:it,scaleElement:_t}}();__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 Nt=n.location.search;return Nt.indexOf(J)!=-1||Nt.indexOf(K)!=-1}function q(Nt,_t){}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(Nt){var _t=s[L].bindings;s[L].bindings=function(){for(var fe=_t?_t():{},le=Nt[webModule.__softPermutationId],it=O;it<le.length;it++){var Ae=le[it];fe[Ae[O]]=Ae[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Nt=o.createElement(Q);if(Nt.id=L,Nt.style.cssText=R+S,Nt.tabIndex=-1,o.body.appendChild(Nt),t=Nt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var _t=document.compatMode==U?V:W;t.write(_t+X),t.close()}}}function w(Nt){function _t(le){function it(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ae=it();if(Ae){le();return}function Ke(){if(!Ae){if(!it())return;Ae=!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(),Ae=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))}),Ae.appendChild(Ke)}_t(function(){fe(Nt)})}webModule.__startLoadingFragment=function(Nt){return C(Nt)},webModule.__installRunAsyncCode=function(Nt){var _t=u(),fe=_t.body,le=_t.createElement(_);le.language=ab,le.text=Nt,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(Nt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Nt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Nt){var _t=c[Nt];return _t==null?null:_t},r=d,webModule.__errFn=e}function B(){function Nt(me){var ge=me.lastIndexOf(rb);ge==-1&&(ge=me.length);var _e=me.indexOf(sb);_e==-1&&(_e=me.length);var Ge=me.lastIndexOf(tb,Math.min(_e,ge));return Ge>=O?me.substring(O,Ge+P):W}function _t(me){if(!me.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=me+vb,me=Nt(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 Nt(me[ge].src);return W}function it(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Ae(){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&&Ae()&&(Ke=Nt(o.location.href)),Ke=_t(Ke),Ke}function C(Nt){return Nt.match(/^\//)||Nt.match(/^[a-zA-Z]+:\/\//)?Nt:webModule.__moduleBase+Nt}function D(){var Nt=[],_t=O,fe=[],le=[];function it(me){var ge=le[me](),_e=fe[me];if(ge in _e)return ge;var Ge=[];for(var Ce in _e)Ge[_e[Ce]]=Ce;throw r&&r(me,Ge,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 Ae;try{Ae=Cb;var Ke=Ae.indexOf(Db);Ke!=-1&&(_t=parseInt(Ae.substring(Ke+P),$),Ae=Ae.substring(O,Ke))}catch(me){}return webModule.__softPermutationId=_t,C(Ae+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(Nt,_t,fe){"use strict";fe.d(_t,{Ax:function(){return Ke},Ds:function(){return me},KI:function(){return _e},SI:function(){return Ae},f1:function(){return it}});var le=fe(90524);function it(Ge){let Ce=!0;if(Ge.length>0){for(let he=0;he<Ge.length;he++)if(Ge[he].compile_success==0||!Ge[he].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function Ae(Ge,Ce=""){let he=[];for(let Ye=0;Ye<Ge.length;Ye++){let pe=Ge[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(Ge,Ce,he){for(let Ye=0;Ye<Ge.length;Ye++){let pe=Ge[Ye];if(pe.key===Ce){pe.children=he;break}pe.children&&Ke(pe.children,Ce,he)}return Ge}function me(Ge,Ce,he){let Ye;return function(){let pe=this,rt=arguments,Me=function(){Ye=null,he||Ge.apply(pe,rt)},Be=he&&!Ye;clearTimeout(Ye),Ye=setTimeout(Me,Ce),Be&&Ge.apply(pe,rt)}}const ge=!0,_e=le.Z.API_SERVER},6077:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Ye}});var le=fe(59301),it={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ae=fe(92310),Ke=fe.n(Ae),me=fe(29787),ge=fe(2859),_e=fe(82093),Ge=fe(49661),Ce=(pe,rt,Me)=>new Promise((Be,Le)=>{var ke=$e=>{try{et(Me.next($e))}catch(Ie){Le(Ie)}},tt=$e=>{try{et(Me.throw($e))}catch(Ie){Le(Ie)}},et=$e=>$e.done?Be($e.value):Promise.resolve($e.value).then(ke,tt);et((Me=Me.apply(pe,rt)).next())}),Ye=({data:pe,className:rt,fullWidth:Me,style:Be={},onClose:Le,onOk:ke,showFullTools:tt,noAssociationId:et})=>{const $e=(0,le.useRef)(null),Ie=(0,le.useRef)(null),Re=(0,le.useRef)(null),Ze=(0,le.useRef)(null),[je,wt]=(0,le.useState)(!1),[ze,Ne]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(Re.current||(Re.current=document.createElement("style"),document.head.appendChild(Re.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),Re.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&ct()):(document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)),()=>{document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)}),[pe==null?void 0:pe.visible]);const ct=()=>Ce(void 0,null,function*(){wt(!0),Ne("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ve=yield(0,Ge.ZJ)(pe==null?void 0:pe.src);$e.current.src="",$e.current.src=Ve,$e.current.onload=function(){Se()},wt(!1),Ne("")}),Fe=Ve=>Ce(void 0,null,function*(){wt(!0),Ne("\u6B63\u5728\u4FDD\u5B58\u4E2D");const yt=yield(0,_e.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:Ve.dataUrl}});yt!=null&&yt.id&&!et?(yield(0,_e.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:yt==null?void 0:yt.id,settings:JSON.stringify(Ve.state)}})).status===0&&ke():yt!=null&&yt.id&&ke(yt),wt(!1),Ne("")}),Xe=()=>{const Ve=document.querySelector('a[href="https://markerjs.com/"]');Ve&&Ve.parentNode&&(Ve.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(ht=>{const Qt=document.querySelector(ht.name);Qt&&Qt.setAttribute("title",ht.title)})},Se=()=>{Ie.current=new ge.hP($e.current),Ie.current.targetRoot=Ze.current,Ie.current.addEventListener("render",Fe),Ie.current.addEventListener("beforeclose",Le),tt&&(Ie.current.availableMarkerTypes=Ie.current.ALL_MARKER_TYPES,Ie.current.uiStyleSettings.redoButtonVisible=!0,Ie.current.uiStyleSettings.notesButtonVisible=!0,Ie.current.uiStyleSettings.zoomButtonVisible=!0,Ie.current.uiStyleSettings.zoomOutButtonVisible=!0,Ie.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ie.current.uiStyleSettings,Ie.current.show(),pe!=null&&pe.snapshotData&&Ie.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:je,tip:ze,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:Ze,className:Ke()(it.imageDimensions,rt,Me?it.fullWidth:""),style:Be},le.createElement("img",{className:it.img,ref:$e}))))}},88615:function(Nt,_t,fe){"use strict";var le=fe(59301),it=fe(77019),Ae=fe(5269),Ke=fe(20554),me=fe(99571),ge=fe(38394),_e=fe(21697),Ge=fe(48136),Ce=fe(59301);const he=(0,le.forwardRef)(({callback:Ye,showSaveButton:pe,value:rt=""},Me)=>{const Be=(0,le.useRef)(),Le=[{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}`}]}]}],tt=Ie=>{Be.current.setValue(Be.current.getValue()+" "+Ie.value+" ")},et=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(it.Z,{className:_e.Z.lists,gutter:[10,10]},Le.map((Ie,Re)=>Ce.createElement(Ae.Z,{flex:"110px",className:_e.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:`$$${Ie.value}$$`}),Ie.name),Ce.createElement("div",{className:_e.Z.children},Ie.children.map((Ze,je)=>Ce.createElement("div",{key:je},Ce.createElement("h1",null,Ze.name),Ce.createElement(it.Z,{gutter:[10,10]},Ze.data.map((wt,ze)=>Ce.createElement(Ae.Z,{key:ze,onClick:()=>tt(wt),className:_e.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(it.Z,{className:_e.Z.lists,gutter:[10,10]},ke.map((Ie,Re)=>Ce.createElement(Ae.Z,{flex:"110px",className:_e.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:"`$$"+Ie.value+"$$`"}),Ie.name),Ce.createElement("div",{className:_e.Z.children},Ie.children.map((Ze,je)=>Ce.createElement("div",{key:je},Ze.name&&Ce.createElement("h1",null,Ze.name),Ce.createElement(it.Z,{gutter:[10,10]},Ze.data.map((wt,ze)=>Ce.createElement(Ae.Z,{key:ze,onClick:()=>tt(wt),className:_e.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+wt.value+"$$`"}))))))))))}],$e=()=>{var Ie=document.createElement("div");Ie.innerHTML=Be.current.getValue();var Re=Ie.innerText;return Ye&&Ye(Re),Re};return(0,le.useImperativeHandle)(Me,()=>({getData:$e})),Ce.createElement("div",{className:_e.Z.mathWrap},Ce.createElement(Ke.default,{defaultActiveKey:"1",items:et}),Ce.createElement("math-field",{locale:"zh_cn",className:_e.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Be,style:{width:800,marginTop:30,fontSize:18}},rt||""),pe&&Ce.createElement("div",{className:_e.Z.button},Ce.createElement(me.ZP,{size:"large",onClick:$e,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});_t.Z=he},57884:function(Nt,_t,fe){"use strict";var le=fe(59301),it=fe(93314),Ae=fe(99571),Ke=Object.defineProperty,me=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,he=(Me,Be,Le)=>Be in Me?Ke(Me,Be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Me[Be]=Le,Ye=(Me,Be)=>{for(var Le in Be||(Be={}))Ge.call(Be,Le)&&he(Me,Le,Be[Le]);if(_e)for(var Le of _e(Be))Ce.call(Be,Le)&&he(Me,Le,Be[Le]);return Me},pe=(Me,Be)=>me(Me,ge(Be));const rt=({img:Me,buttonProps:Be={},styles:Le={},customText:ke,ButtonText:tt,ButtonClick:et,Buttonclass:$e,ButtonTwo:Ie,imgStyles:Re,loading:Ze=!1,className:je=""})=>le.createElement("section",{className:`tc animated fadeIn ${je}`,style:Ye({color:"#999",margin:"100px auto",visibility:Ze?"hidden":"visible"},Le)},le.createElement("img",{src:Me||it,style:pe(Ye({},Re),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},ke||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),tt&&le.createElement(Ae.ZP,Ye({className:$e,onClick:et},Be),tt),Ie&&Ie);_t.Z=rt},41550:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return $e}});var le=fe(59301),it={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ae=fe(99571),Ke=fe(70557),me=fe(51124),ge=fe(25399),_e=fe(49661),Ge=fe(72664),Ce=fe(57884),he=fe(90524),Ye=fe(14794),pe=fe(59301),rt=Object.defineProperty,Me=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ke=(Ie,Re,Ze)=>Re in Ie?rt(Ie,Re,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ie[Re]=Ze,tt=(Ie,Re)=>{for(var Ze in Re||(Re={}))Be.call(Re,Ze)&&ke(Ie,Ze,Re[Ze]);if(Me)for(var Ze of Me(Re))Le.call(Re,Ze)&&ke(Ie,Ze,Re[Ze]);return Ie},et=(Ie,Re,Ze)=>new Promise((je,wt)=>{var ze=Fe=>{try{ct(Ze.next(Fe))}catch(Xe){wt(Xe)}},Ne=Fe=>{try{ct(Ze.throw(Fe))}catch(Xe){wt(Xe)}},ct=Fe=>Fe.done?je(Fe.value):Promise.resolve(Fe.value).then(ze,Ne);ct((Ze=Ze.apply(Ie,Re)).next())}),$e=({editOffice:Ie="view",data:Re,issaver:Ze,onSaver:je,theme:wt,type:ze,filename:Ne,monacoEditor:ct,className:Fe,style:Xe,close:Se,onClose:Ve,hasMask:yt,disabledDownload:ht,onImgDimensions:Qt,showNodata:Ht,recordInfo:ve})=>{const[de,st]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Zt,St]=(0,le.useState)(""),[Pe,at]=(0,le.useState)(),lt=window.ENV==="build"?"/react/build":"",tn=location.host.startsWith("localhost")?he.Z.PROXY_SERVER:he.Z.API_SERVER,Tt=10*(1024*1024),We=(0,le.useRef)();Re!=null&&Re.startsWith("/api")&&ze!=="txt"&&(Re=he.Z.API_SERVER+Re);const Et=ie=>ie.substring(ie.lastIndexOf("/")+1).split(".").pop();Ne&&ct&&(ct.filename=Ne),(0,le.useEffect)(()=>{var ie,se;const ne=(se=(ie=document.cookie)==null?void 0:ie.replace(/\s/g,""))==null?void 0:se.split(";");ne==null||ne.map(be=>{let Qe=be.split("=");Qe[0]==="_educoder_session"&&St(Qe[1])})},[]),(0,le.useEffect)(()=>{ze==="office"&&(Re.indexOf("bigfilescdn.")>-1||Re.indexOf("bigfiles1")>-1?at({url:Re,fileType:Et(Re),model:Re.indexOf("model=edit")?"edit":"view"}):ae())},[ze,Re]);function Bt(ie){return et(this,null,function*(){ie.data.type==="pdfdata"&&(je(ie.data.data),window.removeEventListener("message",Bt,!1)),console.log("mess---:",ie.data)})}const ae=()=>et(void 0,null,function*(){console.log("data:",Re);let ie=Re;Re.startsWith("http")||(ie=location.origin+ie);let se=new URL(ie).pathname.split("/").pop();const ne=yield(0,Ge.gJ)({attachment_id:se});ne.url=tn+ne.url,at(ne)}),te=()=>{if(Re.startsWith("http")||Re.startsWith("blob:")){z();return}(0,_e.Sv)(Ne||"educoder",Re,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,_e.Nd)(Ne||"educoder",decodeURIComponent(Re))};return pe.createElement("div",{style:tt({},Xe||{}),className:`${yt&&it.bgBlack} ${ze?it.wrp:"hide"}`},Se&&pe.createElement("div",{className:it.close,ref:We},!!Qt&&pe.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>We.current},pe.createElement("span",{onClick:()=>{Ve(),Qt()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!ht&&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"}))),Ze&&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",Bt,!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:()=>{Ve()}},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${it[Fe]} ${Fe} ${it.monaco} ${ze==="txt"?"show":"hide"}`},ze==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(me.ZP,tt({},ct)))),ze==="audio"&&pe.createElement("audio",{src:`${(Re==null?void 0:Re.indexOf("http://"))>-1||(Re==null?void 0:Re.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Re}`,autoPlay:!0}),ze==="video"&&pe.createElement(pe.Fragment,null,(Re==null?void 0:Re.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${Re}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Re}`,autoPlay:!0})),ze==="office"&&Pe&&pe.createElement("iframe",{src:`${lt}/office.html?key=${Pe.key}&url=${btoa(Pe.url)}&callbackUrl=${tn+(Pe.callbackUrl||"")}&fileType=${Pe.fileType}&title=${Pe.title||""}&model=${Ie}&officeServer=${he.Z.ONLYOFFICE}&disabledDownload=${!!ht}`}),ze==="html"&&pe.createElement("iframe",{src:Re+"&disposition=inline"}),ze==="pdf"&&pe.createElement("iframe",{id:"pdfiframe",src:`${lt}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(Re)}&disabledDownload=${!!ht}&model=${Ie}`}),ze==="image"&&pe.createElement("img",{src:`${(Re==null?void 0:Re.indexOf("http://"))>-1||(Re==null?void 0:Re.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Re}`}),(ze==="other"||ze==="download")&&pe.createElement(pe.Fragment,null,Ht?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(Ae.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:ht},"\u4E0B\u8F7D")}):pe.createElement(Ae.ZP,{type:"primary",size:"middle",onClick:te,disabled:ht},pe.createElement(Ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),ze==="flowChart"&&pe.createElement("div",{className:"embed"},pe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Re||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(Nt,_t,fe){"use strict";fe.d(_t,{z:function(){return ct},Z:function(){return Fe}});var le=fe(59301),it=fe(88831),Ae=fe(90290),Ke=fe(64018),me=fe(39394),ge=fe(90524),_e=fe(49661),Ge=fe(15342),Ce=fe(77736),he=fe(99571),Ye=fe(1012),pe=fe(41550),rt=fe(59301),Be=({html:Xe})=>{const Se=(0,le.useRef)(null),Ve=(0,le.useRef)(null),yt=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,le.useEffect)(()=>{const ht=Se.current.attachShadow({mode:"open"});Ve.current=document.createElement("div"),Ve.current.className="markdown-body",Ve.current.innerHTML=Xe,ht.appendChild(Ve.current);const Qt=document.createElement("style");return Qt.textContent=yt,ht.appendChild(Qt),()=>{ht.innerHTML=""}},[]),(0,le.useEffect)(()=>{Ve.current&&(Ve.current.innerHTML=Xe)},[Xe]),rt.createElement("div",{ref:Se})};function Le(Xe){const Se=["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"],Ve=new RegExp(`\\b(${Se.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Xe.replace(Ve,"").trim()}var ke={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},tt=Object.defineProperty,et=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Re=(Xe,Se,Ve)=>Se in Xe?tt(Xe,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Xe[Se]=Ve,Ze=(Xe,Se)=>{for(var Ve in Se||(Se={}))$e.call(Se,Ve)&&Re(Xe,Ve,Se[Ve]);if(et)for(var Ve of et(Se))Ie.call(Se,Ve)&&Re(Xe,Ve,Se[Ve]);return Xe};const je="@\u2581\u2581@",wt="@\u2581@",ze=/<pre[^>]*>/g;function Ne(Xe){let Se=document.createElement("div");return Se.innerHTML=Xe,Se.childNodes.length===0?"":Se.childNodes[0].nodeValue}const ct=(Xe,Se)=>{Xe=Xe||"";const Ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,yt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ht=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Qt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Se?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ve,(Ht,ve,de,st,Zt,St,Pe)=>{const at=ve||st||St,lt=de||Zt||Pe||"?";return ge.Z.API_SERVER+"/api/attachments/"+at+lt+"&t="+(0,_e.Jn)(at,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(Qt,(Ht,ve,de,st,Zt,St,Pe)=>{const at=ve||st||St,lt=de||Zt||Pe||"?";return ge.Z.API_SERVER+"/attachments/download/"+at+lt+"&t="+(0,_e.Jn)(at,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(Ve,(Ht,ve,de,st,Zt,St,Pe)=>{const at=ve||st||St,lt=de||Zt||Pe||"?";return ge.Z.API_SERVER+"/api/attachments/"+at+lt+"&t="+(0,_e.Jn)(at,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(yt,(Ht,ve,de,st,Zt)=>{const St=ve||st,Pe=de||Zt||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+St+Pe+St+Pe+"&t="+(0,_e.Jn)(St,Date.now())}).replace(ht,(Ht,ve,de,st,Zt)=>{const St=ve||st,Pe=de||Zt||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+St+Pe+St+Pe+"&t="+(0,_e.Jn)(St,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 Fe=({value:Xe="",edit:Se=!1,className:Ve,showTextOnly:yt,showLines:ht,style:Qt={},stylesPrev:Ht={},highlightKeywords:ve,showProgramFill:de,isProgramFill:st,disabledFill:Zt=!1,programFillValue:St,openEditor:Pe=()=>{},onFillChange:at=gt=>{},onFillBlur:lt=()=>{},onFillFocus:tn=()=>{}})=>{let gt=Le(String(Xe||""));const Tt=(0,le.useRef)(),We=(0,le.useRef)(),[Et,Bt]=(0,le.useState)(""),[ae,te]=(0,le.useState)("office"),[z,ie]=(0,le.useState)([]),se=(0,le.useRef)("a"+(0,Ye.Z)()),ne={},be=we=>/<style[\s\S]*?>/i.test(we||""),Qe=(we,mt,dt)=>{const vt=document.createElement(we===wt?"input":"textarea");vt.style.width="100%",vt.style.height=we===wt?"40px":"151px",vt.rows=5,vt.spellcheck=!1,vt.name="edu-program-fill",vt.placeholder="\u8BF7\u8F93\u5165",vt.dataset.id=mt;const kt=Object.keys(ne).length;return ne[kt]=vt,`<span class="edu-program-fill-wrap ${we===wt?"":"show"}" style="width:${we===wt?"600px":"100%"}" title=${dt||""}><span>${vt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Wt(we){return we=we.replace(/!\[.*?\]\(.*?\)/g,""),we=we.replace(/\[.*?\]\(.*?\)/g,""),we=we.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),we=we.replace(/<embed.*?>/g,""),we=we.replace(/<img.*?>/g,""),we=we.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),we=we.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),we=we.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),we=we.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),we}const Ft=we=>!yt&&be(gt)?we:we.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(mt,dt){let vt=dt.replace(/(\n|\r)/g,"").split("}"),kt=[];return vt.map(Yt=>{Yt!=""&&kt.push(`.${se.current} ${Yt}`)}),`<style>${kt.join("}")}</style>`}),Ct=(0,le.useMemo)(()=>{try{const vt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,kt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Yt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Pt=/\(\/attachments\/download\//g;gt=gt.replace(Pt,"("+ge.Z.API_SERVER+"/attachments/download/").replace(vt,"("+ge.Z.API_SERVER+"/api/attachments/").replace(kt,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(Yt,'"'+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,`
`),Tt.current.style.display="none"}catch(vt){}if(de){let vt=-1;return gt=gt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(kt,Yt,Pt){var Vt;return++vt,Qe(kt,vt,(Vt=St==null?void 0:St[vt])==null?void 0:Vt.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ft(gt||"")}</pre>`}let we=Ft(gt);we=(0,Ae.ZP)(we);const mt=(0,Ae.ez)();gt.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",(0,Ae.Qv)()),(0,Ae.Iy)()),we=we.replace(/(__special_katext_id_\d+__)/g,(vt,kt)=>{const{type:Yt,expression:Pt}=mt[kt];return(0,Ge.renderToString)(Ne(Pt)||"",{displayMode:Yt==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ae.AL)();const dt=document.createElement("div");if(dt.innerHTML=we,yt)return dt.innerText;if(ve){const vt=ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return cn(dt,vt),dt.innerHTML}return setTimeout(()=>Cn(),500),dt.innerHTML},[gt,ve]);(0,le.useEffect)(()=>{ln.current&&ln.current.querySelectorAll(["input","textarea"]).forEach(mt=>{mt.oninput=Dt,mt.onblur=on,mt.onfocus=$t})},[z]),(0,le.useEffect)(()=>{var we,mt,dt,vt,kt;if(St!=null&&St.length)try{const Yt=ln.current.querySelectorAll(".edu-program-fill-score"),Pt=ln.current.querySelectorAll('[name="edu-program-fill"]');for(const[Vt,En]of Pt.entries())En.value=((we=St==null?void 0:St[Vt])==null?void 0:we.value)||"",((mt=St==null?void 0:St[Vt])==null?void 0:mt.type)==="warning"?En.className="program-fill-warning":((dt=St==null?void 0:St[Vt])==null?void 0:dt.type)==="success"?En.className="program-fill-success":En.className="";for(const[Vt,En]of Yt.entries())En.innerHTML=(vt=St==null?void 0:St[Vt])!=null&&vt.score?`${(kt=St==null?void 0:St[Vt])==null?void 0:kt.score}\u5206`:"";ie(St)}catch(Yt){console.log(Yt,"error")}},[St]);const Dt=we=>{z[we.target.dataset.id]=z[we.target.dataset.id]||{},z[we.target.dataset.id].value=we.target.value,ie([...z]),at(z,we.target.dataset.id)},on=we=>{z[we.target.dataset.id]=z[we.target.dataset.id]||{},z[we.target.dataset.id].value=we.target.value,ie([...z]),lt(z,we.target.dataset.id)},$t=we=>{z[we.target.dataset.id]=z[we.target.dataset.id]||{},z[we.target.dataset.id].value=we.target.value,ie([...z]),tn(z,we.target.dataset.id)};function cn(we,mt){return we.childNodes.forEach(dt=>{var vt;if(dt.childNodes.length>0)cn(dt,mt);else if(dt.nodeName!=="IMG")if(dt.innerHTML)dt.innerHTML=(vt=dt.innerHTML)==null?void 0:vt.replace(new RegExp(mt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const kt=document.createElement("span");kt.innerHTML=dt.textContent.replace(new RegExp(mt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dt.replaceWith(kt)}})}const ln=(0,le.useRef)();Ae.jb.WebkitLineClamp=ht,ht&&(Qt=Ze(Ze({},Qt),Ae.jb));function zt(we){let mt=we.target;if(mt.tagName.toUpperCase()==="A"){let dt=mt.getAttribute("href");if(dt.indexOf("office")>-1)we.preventDefault(),Bt(dt),te("office");else if(dt.indexOf("application/pdf")>-1)we.preventDefault(),Bt(dt),te("pdf");else if(dt.indexOf("text/html")>-1)we.preventDefault(),Bt(dt),te("html");else if(dt.startsWith("#")){we.preventDefault();let vt=document.getElementById(dt.replace("#",""));vt&&vt.scrollIntoView(!0)}}}const Cn=()=>{var we;const mt=(we=ln.current)==null?void 0:we.querySelectorAll("video");mt==null||mt.forEach(dt=>{if(dt.oncontextmenu=()=>!1,dt.src.indexOf(".m3u8")>-1&&!dt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var vt=new me.ZP;vt.loadSource(dt.src),vt.attachMedia(dt)}}})};(0,le.useEffect)(()=>{if(ln.current&&Ct&&Ct.match(ze)&&window.PR.prettyPrint(),ln.current)return ln.current.addEventListener("click",zt),()=>{var we;(we=ln.current)==null||we.removeEventListener("click",zt),(0,Ae.AL)(),(0,Ae.Iy)()}},[Ct,ln.current,zt]);const Oe=we=>{we.target.nodeName==="IMG"&&we.target.className.indexOf("draw-flowchart")>-1?(Tt.current.style.zIndex=1,Tt.current.style.display="flex",Tt.current.style.width=we.target.clientWidth+"px",Tt.current.style.height=we.target.clientHeight+"px",Tt.current.style.top=we.target.offsetTop+"px",Tt.current.style.left=we.target.offsetLeft+"px",we.target.id&&(We.current=we.target.id)):Tt.current.style.display="none"},nt=()=>{Tt.current.style.display="none"};return(0,le.useEffect)(()=>{var we;const mt=dt=>{dt.preventDefault(),dt.clipboardData.setData("text",window.getSelection().toString())};return(we=ln.current)==null||we.addEventListener("copy",mt),()=>{var dt;(dt=ln.current)==null||dt.removeEventListener("copy",mt)}},[ln.current]),le.createElement("div",{style:{position:"relative"},onMouseLeave:nt},yt&&le.createElement("div",{ref:ln,className:`${ke.mdBody} `},Ct),!yt&&!be(Ct)&&le.createElement("div",{ref:ln,style:Ze({},Qt),onMouseOver:Oe,className:`${Ve||""} ${Zt?"disabled-fill":""} markdown-body ${ke.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:Ct}}),!yt&&be(Ct)&&le.createElement(Be,{html:Ct}),le.createElement("div",{ref:Tt,className:`${ke.button} ${Se?"":ke.previewFlowChart}`},le.createElement(Ce.Z,null,le.createElement(he.ZP,{onClick:()=>{Se?Pe(We.current):(Bt(We.current),te("flowChart"))}},Se?"\u7F16\u8F91":"\u9884\u89C8"))),le.createElement(pe.Z,{close:!0,data:Et,type:Et!=null&&Et.length?ae:"",style:Ze({},Ht),onClose:()=>Bt("")}))}},44905:function(Nt,_t,fe){"use strict";fe.d(_t,{h:function(){return Ie}});var le=fe(59301),it=fe(82326),Ae=fe(28284),Ke=fe(99571),me=fe(89780),ge=fe.n(me),_e=fe(66543),Ge=fe(59598),Ce=Object.defineProperty,he=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Be=(Re,Ze,je)=>Ze in Re?Ce(Re,Ze,{enumerable:!0,configurable:!0,writable:!0,value:je}):Re[Ze]=je,Le=(Re,Ze)=>{for(var je in Ze||(Ze={}))rt.call(Ze,je)&&Be(Re,je,Ze[je]);if(pe)for(var je of pe(Ze))Me.call(Ze,je)&&Be(Re,je,Ze[je]);return Re},ke=(Re,Ze)=>he(Re,Ye(Ze));const tt=it.default.Option,et={labelCol:{span:4},wrapperCol:{span:20}},$e={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"]};_t.Z=({callback:Re,onCancel:Ze})=>{const[je,wt]=(0,le.useState)("python");function ze(ct){wt($e[ct][1])}function Ne(ct){Re(ct)}return le.createElement(Ae.default,ke(Le({},et),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ne,style:{width:500}}),le.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(it.default,{getPopupContainer:ct=>ct.parentNode,onChange:ze},Object.keys($e).map(ct=>le.createElement(tt,{key:ct,value:ct},$e[ct][0])))),le.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(Ie,{mode:je})),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:Ze},"\u53D6\u6D88")))};function Ie({value:Re,onChange:Ze,mode:je,options:wt={}}){const ze=(0,le.useRef)(),[Ne,ct]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ne){let Fe=function(Xe){const Se=Xe.getValue();Ze&&Ze(Se)};return Ne.on("change",Fe),()=>{Ne.off("change",Fe)}}},[Ne,Ze]),(0,le.useEffect)(()=>{Ne&&Ne.setOption("mode",je)},[Ne,je]),(0,le.useEffect)(()=>{Ne&&(Re!==Ne.getValue()||Re==="")&&setTimeout(()=>{Ne.setValue(Re||"")},300)},[Ne,Re]),(0,le.useEffect)(()=>{if(ze.current&&!Ne){const Fe=ge().fromTextArea(ze.current,Le({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},wt));ct(Fe)}},[ze.current,Ne]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:ze}))}},2978:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return In}});var le=fe(59301),it=fe(89780),Ae=fe.n(it),Ke=fe(76374),me=fe(66543),ge=fe(6313),_e=fe(25717),Ge=fe(99498),Ce=fe(25419),he=fe(67549),Ye=fe(38394),pe=({value:Kt="",className:Ut,showTextOnly:jt,showLines:vn,style:Wn={}})=>{const Ln=(0,le.useMemo)(()=>"",[Kt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Ln}}))},rt=Object.defineProperty,Me=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,et=(Kt,Ut,jt)=>Ut in Kt?rt(Kt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:jt}):Kt[Ut]=jt,$e=(Kt,Ut)=>{for(var jt in Ut||(Ut={}))ke.call(Ut,jt)&&et(Kt,jt,Ut[jt]);if(Le)for(var jt of Le(Ut))tt.call(Ut,jt)&&et(Kt,jt,Ut[jt]);return Kt},Ie=(Kt,Ut)=>Me(Kt,Be(Ut));let Re=[{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:Kt,title:Ut,icon:jt,actionName:vn,className:Wn="",children:Ln}){function mn(){Kt(vn)}return le.createElement("a",{title:Ut,className:Wn,onClick:mn},le.createElement("i",{className:`${jt}`}),Ln)}var je=({watch:Kt,showNullButton:Ut,showNullProgramButton:jt,onActionCallback:vn,fullScreen:Wn,insertTemp:Ln,hidetoolBar:mn,extraUse:Gn})=>{const Rn=[...Re,{title:`${Kt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Kt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!mn&&Rn.map((Fn,On)=>le.createElement("li",{key:On},Fn.actionName?le.createElement(Ze,Ie($e({},Fn),{onActionCallback:vn})):le.createElement("span",{className:"v-line"}))),Ut?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:vn},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,jt?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:vn},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:vn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Ln&&le.createElement("li",null,le.createElement(Ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Ln}`,onActionCallback:vn},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Gn&&le.createElement("li",null,Gn),le.createElement("li",{className:"btn-full-screen"},le.createElement(Ze,{icon:`${Wn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Wn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:vn})))},wt=fe(75790),ze=fe(28284),Ne=fe(37568),ct=fe(99571),Fe=Object.defineProperty,Xe=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Qt=(Kt,Ut,jt)=>Ut in Kt?Fe(Kt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:jt}):Kt[Ut]=jt,Ht=(Kt,Ut)=>{for(var jt in Ut||(Ut={}))yt.call(Ut,jt)&&Qt(Kt,jt,Ut[jt]);if(Ve)for(var jt of Ve(Ut))ht.call(Ut,jt)&&Qt(Kt,jt,Ut[jt]);return Kt},ve=(Kt,Ut)=>Xe(Kt,Se(Ut));const de={labelCol:{span:4},wrapperCol:{span:20}};var st=({callback:Kt,onCancel:Ut})=>{function jt(vn){Kt(vn)}return le.createElement(ze.default,ve(Ht({},de),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:jt,style:{width:500}}),le.createElement(ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(Ne.default,null)),le.createElement(ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(Ne.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(ct.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(ct.ZP,{type:"ghost",onClick:Ut},"\u53D6\u6D88")))},Zt=fe(44905),St=fe(45596),Pe=fe(62957),at=fe(77019),lt=fe(6077),tn=fe(59301),gt=({callback:Kt,onCancel:Ut})=>{const jt=document.createElement("canvas"),vn=jt.getContext("2d");jt.width=1e3,jt.height=800,vn.fillStyle="#ffffff",vn.fillRect(0,0,jt.width,jt.height);const Wn=jt.toDataURL("image/png");return tn.createElement(Pe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},tn.createElement(at.Z,{style:{height:"100vh"}},tn.createElement(lt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Wn,visible:!0,title:String(Date.now())},onOk:Ln=>{Kt({src:Ln.url})},onClose:Ut})))},Tt=fe(30641),We=fe(5269),Et=fe(6767),Bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ae=fe(59301),z=(0,le.forwardRef)(({onCancel:Kt,editImgId:Ut,callback:jt},vn)=>{let Wn=(0,le.useRef)(),Ln=(0,le.useRef)(),mn=(0,le.useRef)(),Gn=(0,le.useRef)(!1);const Rn=(0,le.useRef)(!1);console.log("ref:",vn);const[Fn,On]=(0,le.useState)(0),[tr,Mt]=(0,le.useState)("100vh");return(0,le.useEffect)(()=>{On(1)},[]),(0,le.useImperativeHandle)(vn,()=>({setHeight:Mt})),ae.createElement("div",{ref:Rn,className:"body-overflow-initial"},ae.createElement(Tt.Z,{width:"100vw",height:tr,footer:null,closable:!0,placement:"bottom",open:!!Fn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Bt.drawerWrap}`,onClose:()=>{window.saveDrawData(qe=>{jt({src:`/api/attachments/${qe}`,id:qe})})},title:ae.createElement(at.Z,{align:"middle"},ae.createElement(We.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ae.createElement(We.Z,{onClick:()=>{Mt(tr==="60px"?"100vh":"60px")}},ae.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ae.createElement(We.Z,{onClick:()=>{window.saveDrawData(qe=>{if(qe===null){Et.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Et.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),jt({src:`/api/attachments/${qe}`,id:qe,disabledClose:!0})})}},ae.createElement(ct.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ae.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Ut||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Ln})))}),ie=fe(90524),se=fe(47889),ne=fe(71051);const be=se.ZP.Group,Qe={margin:"0 8px"};var Wt=({callback:Kt,onCancel:Ut})=>{function jt(vn){Kt(vn)}return le.createElement(ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:jt},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:Qe},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:Qe},"\u884C\u6570"),le.createElement(ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(ne.Z,null)),le.createElement("span",{style:Qe},"\u5217\u6570"),le.createElement(ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(ne.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:Qe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(ze.default.Item,{name:"align"},le.createElement(be,null,le.createElement(se.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(se.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(se.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(se.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(ct.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(ct.ZP,{type:"ghost",onClick:Ut},"\u53D6\u6D88")))},Ft=fe(71411),Ct=fe(11081),Dt=fe.n(Ct),$t=(0,le.forwardRef)(({use3d:Kt,width:Ut,height:jt,callback:vn,showSaveButton:Wn},Ln)=>{const mn=(0,le.useRef)(),Gn=(0,le.useRef)(),[Rn,Fn]=(0,le.useState)(!1),On=(0,le.useRef)({id:mn,appName:"graphing",width:Ut||1e3,height:jt||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)(()=>{Gn.current=new(Dt())(On.current,!0),window.onload=function(){Gn.current.inject("applet_container")}},[]);const tr=()=>{var Mt=window.ggbApplet.getPNGBase64(1,!0,72);return vn&&vn(Mt),Mt};return(0,le.useEffect)(()=>{On.current.appName=Rn?"3D":"graphing",Gn.current.inject("applet_container")},[Rn]),(0,le.useEffect)(()=>{Fn(Kt)},[Kt]),(0,le.useImperativeHandle)(Ln,()=>({getImgData:tr})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:mn}),le.createElement(at.Z,{align:"middle"},le.createElement(We.Z,{flex:1},le.createElement(Ft.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Rn,onChange:Mt=>Fn(Mt)})),le.createElement(We.Z,null,le.createElement(ct.ZP,{size:"large",onClick:tr,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),cn=fe(88615);const ln="link",zt="upload-image",Cn="add-flowchart",Oe="draw-image",nt="add-flowchart",we="code-block",mt="add-table",dt="------------",vt={default:dt,left:`:${dt}`,center:`:${dt}:`,right:`${dt}:`};var kt=fe(17904);function Yt(){}let Pt=0;const Vt=1e4,En="\u2581",gn="@\u2581\u2581@",Mn="@\u2581@",zn=`
**\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`,An=["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 wn(Kt){return/^\d+$/.test(Kt)?`${Kt}px`:Kt}const Pn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Pn+"-B"]:"bold",[Pn+"-I"]:"italic"},pn={[ln]:"\u6DFB\u52A0\u94FE\u63A5",[we]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[zt]:"\u6DFB\u52A0\u56FE\u7247",[Oe]:"\u6DFB\u52A0\u753B\u56FE",[Cn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[mt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var In=({defaultValue:Kt="",onChange:Ut,width:jt="100%",height:vn=400,miniToolbar:Wn=!1,isFocus:Ln=!1,watch:mn,insertTemp:Gn,mode:Rn="markdown",id:Fn="markdown-editor-id",showResizeBar:On=!1,noStorage:tr=!1,showNullButton:Mt=!1,showNullProgramButton:qe=!1,hidetoolBar:rn=!1,fullScreen:xn=!1,onBlur:_n,onCMBeforeChange:xe,onFullScreen:De,className:At="",disablePaste:ft=!1,disabled:Te=!1,disabledFill:pt=!1,placeholder:Gt="",values:an="",extraUse:fn})=>{const[He,Xt]=(0,le.useState)(null),[ut,nn]=(0,le.useState)(Kt),[Lt,sn]=(0,le.useState)(mn),[un,Dn]=(0,le.useState)(xn),[kn,Un]=(0,le.useState)(""),[qn,Jn]=(0,le.useState)(0),[or,Kn]=(0,le.useState)(vn),[yr,Fr]=(0,le.useState)(!1),[ur,br]=(0,le.useState)(0),[Sr,cr]=(0,le.useState)(0),$n=(0,le.useRef)(),Er=(0,le.useRef)(),dr=(0,le.useRef)(),hr=(0,le.useRef)(),mr=(0,le.useRef)(),Tr=(0,le.useRef)();(0,le.useEffect)(()=>{const bt=window.scrollY||window.pageYOffset;nn(an),He==null||He.setValue(an),window.scrollTo(0,bt)},[an]),(0,le.useEffect)(()=>{De==null||De(un)},[un]),(0,le.useEffect)(()=>{if($n.current){let bt=function(It,qt){var Bn;if(ft){qt.preventDefault();return}const Nn=qt.clipboardData;if(Nn){const rr=Nn.types.toString(),sr=Nn.items;if(rr==="Files"||Nn.types.indexOf("Files")>-1){if(qt.preventDefault(),Rn=="stex")return;try{let ir=sr[1];((Bn=sr[0])==null?void 0:Bn.kind)==="file"&&(ir=sr[0]);const Dr=ir.getAsFile(),gr=Dr.name.split(".").pop();(0,St.I)(Dr,Hr=>{var Di,ai,jr;Hr.id?((Di=Dr==null?void 0:Dr.type)==null?void 0:Di.indexOf("image"))>-1?ot.replaceSelection(`<img width="100%" src="/api/attachments/${Hr.id}?type=${Hr.content_type})" alt="" />`):((ai=Dr==null?void 0:Dr.type)==null?void 0:ai.indexOf("video"))>-1?ot.replaceSelection(`<video width="100%" controls src="/api/attachments/${Hr.id}"></video>`):((jr=Dr==null?void 0:Dr.type)==null?void 0:jr.indexOf("pdf"))>-1?ot.replaceSelection(`<a href="/api/attachments/${Hr.id}?type=${Dr.type}&disposition=inline" target="_blank">${Dr.name}</a>`):An.includes(gr)?ot.replaceSelection(`<a href="/api/attachments/${Hr.id}?type=office&disposition=inline" target="_blank">${Dr.name}</a>`):ot.replaceSelection(`[${Dr.name}](/api/attachments/${Hr.id}?type=${Hr.content_type})`):(Hr==null?void 0:Hr.status)===401&&(document.location.href="/user/login")})}catch(ir){Et.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ot=Ae().fromTextArea($n.current,{mode:Rn,lineNumbers:!Wn,lineWrapping:!0,value:Kt,autoCloseTags:!0,autoCloseBrackets:!0});return ot.on("keyup",function(It,qt){qt.keyCode===8&&(It.getValue()==""?ot.setOption("placeholder",Gt):ot.setOption("placeholder",null))}),ot.on("keydown",function(It,qt){if(qt.keyCode===8){var Bn=lr(It);Bn&&qt.preventDefault()}}),Ln&&ot.focus(),ot.on("paste",bt),Te&&ot.on("beforeChange",function(It,qt){(qt.origin==="paste"||qt.origin==="+input")&&qt.cancel()}),Xt(ot),()=>{ot.off("paste",bt)}}},[]);const vr=(0,le.useCallback)(()=>{if(Er.current)try{}catch(bt){console.log(bt,"---- to set md editor body height")}},[or,Er,un]);(0,le.useEffect)(()=>{function bt(){let ot=new Ke.Z(It=>{for(let qt of It)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&(vr(),He.setSize("100%","100%"),He.refresh())});return ot.observe($n.current.parentElement),ot}if(He){const ot=bt();return()=>{var It,qt;(It=$n.current)!=null&&It.parentElement&&ot.unobserve((qt=$n.current)==null?void 0:qt.parentElement)}}},[He,vr]),(0,le.useEffect)(()=>{if(He){let bt=[];for(const[ot,It]of Object.entries(Xn)){let qt={[ot]:()=>{nr(It)}};bt.push(qt),He.addKeyMap(qt)}return()=>{for(let ot of bt)He.removeKeyMap(ot)}}},[He]),(0,le.useEffect)(()=>{xn!==un&&Dn(xn)},[xn]),(0,kt.Z)(()=>{if(!tr&&qn>0){let bt=new Date().getTime(),ot=window.sessionStorage.getItem(Fn);bt>=qn+Vt&&(!ot||ot!==ut)&&(window.sessionStorage.setItem(Fn,ut),Fr(!0))}},Vt),(0,le.useEffect)(()=>{sn(mn)},[He,mn]),(0,le.useEffect)(()=>{He&&Ln&&He.focus()},[He,Ln]),(0,le.useEffect)(()=>{if(Lt&&He){let bt=function(It){let qt=It.target;if(hr.current){let Bn=qt.scrollTop/qt.scrollHeight;hr.current.scrollTop=hr.current.scrollHeight*Bn}};const ot=He.getScrollerElement();return ot.addEventListener("scroll",bt),()=>{ot.removeEventListener("scroll",bt)}}},[He,Lt]),(0,le.useEffect)(()=>{if(He&&xe){let bt=function(ot,It){xe(ot,It)};return He.on("beforeChange",bt),()=>{He.off("beforeChange",bt)}}},[He,xe]),(0,le.useEffect)(()=>{if(He&&_n){let bt=function(){_n(He.getValue())};return He.on("blur",bt),()=>{He.off("blur",bt)}}},[He,_n]);function lr(bt,ot){var It=bt.getDoc(),qt=It.getCursor(),Bn=It.getLine(qt.line),Nn=Bn.charAt(qt.ch-1),rr=Bn.lastIndexOf("@\u2581@",qt.ch),sr=Bn.lastIndexOf("@\u2581\u2581@",qt.ch),ir=rr>sr?rr:sr,Dr=rr>sr?3:4;if(gn.indexOf(Nn)===-1)return null;if(console.log("change1:",ot,bt,Bn,qt,ir,rr,sr,Nn),ir>=0&&qt.ch-ir<5){var gr=ir+Dr;return It.replaceRange("",{line:qt.line,ch:ir},{line:qt.line,ch:gr}),{line:qt.line,ch:gr}}return null}(0,le.useEffect)(()=>{if(He){let bt=function(ot,It){const qt=ot.getValue();nn(qt),Jn(new Date().getTime()),ot.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ut&&(qe?Ut(qt,Cr(qt)):Ut(qt))};return He.on("change",bt),()=>{He.off("change",bt)}}},[He,Ut]),(0,le.useEffect)(()=>{if(He)if(Kt==null)He.setValue(""),nn("");else{const bt=window.scrollY||window.pageYOffset;Kt!==He.getValue()&&(He.setValue(Kt),nn(Kt),He.setCursor(Te?1:He.lineCount(),0),window.scrollTo(0,bt))}},[He,Kt]);const nr=(0,le.useCallback)(bt=>{const ot=He.getCursor(),It=He.getSelection();let qt=It.split(`
`);switch(bt){case"bold":return He.replaceSelection("**"+It+"**"),It===""&&He.setCursor(ot.line,ot.ch+2),He.focus();case"italic":return He.replaceSelection("*"+It+"*"),It===""&&He.setCursor(ot.line,ot.ch+1),He.focus();case"code":return He.replaceSelection("`"+It+"`"),It===""&&He.setCursor(ot.line,ot.ch+1),He.focus();case"inline-latex":return Un("inline-latex"),He.focus();case"latex":return He.replaceSelection("```latex\n"+It+"\n```"),He.setCursor(ot.line+1,It.length+1),He.focus();case"line-break":return He.replaceSelection(`<br/>
`),He.focus();case"list-ul":return It===""?He.replaceSelection("- "+It):He.replaceSelection(qt.map(Bn=>Bn===""?"":`- ${Bn}`).join(`
`)),He.focus();case"list-ol":return It===""?He.replaceSelection("1. "+It):He.replaceSelection(qt.map((Bn,Nn)=>Bn===""?"":`${Nn+1}. ${Bn}`).join(`
`)),He.focus();case"add-null-ch":return It===""&&He.setCursor(ot.line,ot.ch),He.replaceSelection(En),He.focus();case"add-signal":return It===""&&He.setCursor(ot.line,ot.ch),He.replaceSelection(Mn),He.focus();case"add-multiple":return It===""&&He.setCursor(ot.line,ot.ch),He.replaceSelection(gn),He.focus();case"inster-template-1":return It===""&&He.setCursor(ot.line,ot.ch),He.replaceSelection(zn),He.focus();case"eraser":return He.setValue(""),He.focus();case"trigger-watch":return sn(!Lt),He.focus();case"trigger-full-screen":return Dn(!un),He.focus();case ln:Un(ln);return;case we:Un(we);return;case zt:Un(zt);return;case Oe:Un(Oe);return;case"maths-latex":Un("maths-latex");return;case Cn:mr.current="",sessionStorage.removeItem("file_id"),Un(Cn);return;case mt:Un(mt);return;default:throw new Error}},[He,Lt,un]),fr=(0,le.useCallback)((bt,ot)=>{var It,qt,Bn,Nn,rr,sr;switch(bt!=null&&bt.disabledClose||Un(""),kn){case ln:const{title:Di,link:ai}=bt;return He.replaceSelection(`[${Di}](${ai})`),He.focus();case we:const{language:jr,content:ui}=bt;return He.replaceSelection(["```"+jr,ui,"```"].join(`
`)),He.focus();case"maths-latex":for(var ir=atob(bt),Dr=new Uint8Array(ir.length),gr=0;gr<ir.length;gr++)Dr[gr]=ir.charCodeAt(gr);var Hr=new Blob([Dr],{type:"image/png"});(0,St.I)(Hr,Rr=>{Rr.id?He.replaceSelection(`![,](/api/attachments/${Rr.id}?type=${Rr.content_type})`):(Rr==null?void 0:Rr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":He.replaceSelection("`$$"+bt+"$$`");break;case nt:const{src:Mr,alt:fi,id:Ti}=bt;if(!Ti)return;He.getValue().indexOf(Mr)===-1?He.replaceSelection(`<center><img id="${Ti}" width="80%" src="${Mr}" class="draw-flowchart" alt="${fi||""}" /></center>`):document.getElementById(Ti).src=ie.Z.API_SERVER+Mr+"?t="+Date.now();break;case zt:case Oe:const Br=ot,yi=(Bn=(qt=(It=Br==null?void 0:Br.name)==null?void 0:It.split("."))==null?void 0:qt.pop)==null?void 0:Bn.call(qt);return((Nn=Br==null?void 0:Br.type)==null?void 0:Nn.indexOf("image"))>-1||!(Br!=null&&Br.type)?Br!=null&&Br.align||Br!=null&&Br.width?He.replaceSelection(`<p style="text-align:${Br.align||"initial"}"><img width="${Br.width?Br.width+"%":"initial"}" src="${Mr}" alt="${fi||""}" /></p>`):He.replaceSelection(`<img width="100%" src="${Mr}" alt="${fi||""}" />`):((rr=Br==null?void 0:Br.type)==null?void 0:rr.indexOf("video"))>-1?He.replaceSelection(`<video width="100%" controls src="${Mr}"></video>`):((sr=Br==null?void 0:Br.type)==null?void 0:sr.indexOf("pdf"))>-1?He.replaceSelection(`<a href="${Mr}?type=${Br.type}&disposition=inline" target="_blank">${Br.name}</a>`):An.includes(yi)?He.replaceSelection(`<a href="${Mr}?type=office&disposition=inline" target="_blank">${Br.name}</a>`):He.replaceSelection(`[${Br.name}](${Mr})`),He.focus();case mt:const{row:pi,col:Hi,align:bi}=bt;let Wi=`
`;for(let Rr=0;Rr<pi;Rr++){let Pi=[],$i=[];for(let ea=0;ea<Hi;ea++)Rr===1&&$i.push(vt[bi]),Pi.push(" ");Rr===1&&(Wi+=`| ${$i.join(" | ")} |
`),Wi+=`| ${Pi.join(Hi===1?"":" | ")} |
`}return He.replaceSelection(Wi+`
`),He.focus();default:throw new Error}},[He,kn]),zr=(0,le.useMemo)(()=>{switch(kn){case ln:return le.createElement(st,{callback:fr,onCancel:Pr});case we:return le.createElement(Zt.Z,{callback:fr,onCancel:Pr});case zt:return le.createElement(St.Z,{callback:fr,onCancel:Pr});case Cn:return le.createElement(z,{editImgId:mr.current,callback:fr,onCancel:Pr});case mt:return le.createElement(Wt,{callback:fr,onCancel:Pr});case"maths-latex":return le.createElement($t,{showSaveButton:!0,callback:fr});case"inline-latex":return le.createElement(cn.Z,{showSaveButton:!0,callback:fr});default:return null}},[kn]);function Pr(){Un("")}(0,le.useEffect)(()=>{if(dr.current){let bt=function(rr){Bn=!0,Nn=rr.pageY},ot=function(){Bn=!1},It=function(rr){if(Bn){let sr=rr.pageY-Nn;sr<0&&(sr=0),sr>300&&(sr=300);let ir=vn+sr+"px";Kn(ir)}},qt=dr.current,Bn=!1,Nn=0;return qt.addEventListener("mousedown",bt),document.addEventListener("mousemove",It),document.addEventListener("mouseup",ot),()=>{qt.removeEventListener("mousedown",bt),document.removeEventListener("mousemove",It),document.removeEventListener("mouseup",ot)}}},[He,dr]),(0,le.useEffect)(()=>{Kn(vn)},[vn]);const kr=wn(jt),Xr=wn(or),Lr={width:kr,height:Xr},Ir=(0,le.useMemo)(()=>{if(qn){let bt=new Date(qn),ot=bt.getHours(),It=bt.getMinutes(),qt=bt.getSeconds();return ot=ot<10?"0"+ot:ot,It=It<10?"0"+It:It,qt=qt<10?"0"+qt:qt,`${ot}:${It}:${qt}`}return 0},[qn]),Cr=bt=>{const ot=[];if(qe){let It=-1;bt=bt.replace(/(@▁▁@|@▁@)/g,function(qt,Bn,Nn){ot.push({multiLine:qt!==Mn})})}return ot};function xr(){window.sessionStorage.removeItem(Fn),Fr(!1),Jn(0)}function Vn(){Fr(!1),Jn(0),He.setValue(window.sessionStorage.getItem(Fn))}(0,le.useEffect)(()=>{pn[kn]&&kn!==Oe&&kn!==Cn&&setTimeout(()=>{const bt=document.getElementsByClassName("markdown-popup-form")[0],ot=window.innerWidth/2-bt.offsetWidth/2,It=window.innerHeight/2-bt.offsetHeight/2;br(ot),cr(It)},0)},[kn]);const Ot=bt=>{bt.preventDefault();const ot=bt.clientX-ur,It=bt.clientY-Sr;document.body.onmousemove=qt=>{let Bn=qt.clientX-ot,Nn=qt.clientY-It;const rr=document.getElementsByClassName("markdown-popup-form")[0],sr=window.innerWidth-rr.offsetWidth,ir=window.innerHeight-rr.offsetHeight;Bn=Math.max(0,Math.min(Bn,sr)),Nn=Math.max(0,Math.min(Nn,ir)),Jt(qt.clientX,qt.clientY,ot,It)&&(br(Bn),cr(Nn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Jt=(bt,ot,It,qt)=>{const Bn=document.body.clientHeight,Nn=document.body.clientWidth;return bt<20&&It>bt||bt>Nn-20&&It<bt||ot<20&&qt>ot||ot>Bn-20&&qt<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:Er},le.createElement("div",{className:`markdown-editor-container ${At} ${Lt?"on-preview":""} ${Wn?"mini":""} ${un?"full-screen":""}`,style:Lr},le.createElement(je,{insertTemp:Gn,watch:Lt,fullScreen:un,showNullButton:Mt,showNullProgramButton:qe,onActionCallback:nr,hidetoolBar:rn,extraUse:fn}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:$n,placeholder:Gt})),Lt?le.createElement("div",{ref:hr,className:"preview-container"},Rn==="stex"&&le.createElement(pe,{value:ut}),Rn!=="stex"&&le.createElement(Ye.Z,{edit:!0,disabledFill:pt,showProgramFill:qe,value:ut,openEditor:bt=>{var ot;mr.current=bt,(ot=Tr.current)==null||ot.setHeight("100vh"),setTimeout(()=>{Un("add-flowchart")},150)}})):null))),On?le.createElement("a",{ref:dr,className:"editor-resize"}):null,kn===Oe&&le.createElement(gt,{callback:fr,onCancel:Pr}),kn===Cn&&le.createElement(z,{ref:Tr,editImgId:mr.current,callback:fr,onCancel:Pr}),le.createElement(wt.Z,null,pn[kn]&&kn!==Oe&&kn!==Cn?le.createElement(Pe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ur,top:Sr},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:Ot},pn[kn]),open:!0,onCancel:Pr,footer:null,destroyOnClose:!0,width:kn===Cn?"1200px":null,height:kn===Cn?"80vh":null,className:"markdown-popup-form"},zr):null))}},45596:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Ze},I:function(){return wt}});var le=fe(28284),it=fe(6767),Ae=fe(37568),Ke=fe(77736),me=fe(71051),ge=fe(47889),_e=fe(99571),Ge=fe(67303),Ce=fe(59301),he=fe(59301),Ye=Object.defineProperty,pe=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ke=(ze,Ne,ct)=>Ne in ze?Ye(ze,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ct}):ze[Ne]=ct,tt=(ze,Ne)=>{for(var ct in Ne||(Ne={}))Be.call(Ne,ct)&&ke(ze,ct,Ne[ct]);if(Me)for(var ct of Me(Ne))Le.call(Ne,ct)&&ke(ze,ct,Ne[ct]);return ze},et=(ze,Ne)=>pe(ze,rt(Ne));const{useForm:$e}=le.default,Ie={width:280,marginRight:10},Re={labelCol:{span:5},wrapperCol:{span:19}};var Ze=({callback:ze,onCancel:Ne})=>{const[ct]=$e();let Fe=(0,Ce.useRef)();function Xe(yt){Fe.current.width=ct.getFieldValue("width"),Fe.current.align=ct.getFieldValue("align"),ze(yt,Fe.current)}function Se(yt,ht){if(yt.status===-1){it.ZP.error(yt.message);return}ct.setFieldsValue({src:`/api/attachments/${yt.id}`,type:ht.type})}function Ve(yt){let ht=yt.target.files[0];Fe.current=ht,wt(ht,Se)}return he.createElement(le.default,et(tt({form:ct},Re),{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(Ae.default,{style:Ie})),he.createElement(je,{onFileChange:Ve}))),he.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Ae.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(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(_e.ZP,{type:"default",onClick:Ne},"\u53D6\u6D88"))))};function je({onFileChange:ze}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:ze}))}function wt(ze,Ne){if(!ze)throw new String("\u6CA1\u6709\u6587\u4EF6");let ct=new FormData;ct.append("editormd-image-file",ze),ct.append("file_param_name","editormd-image-file"),ct.append("byxhr","true");var Fe=new window.XMLHttpRequest;Fe.withCredentials=!0,Fe.addEventListener("load",function(Xe){Ne(JSON.parse(Xe.target.responseText),ze)},!1),Fe.addEventListener("error",function(Xe){console.error(Xe)},!1),Fe.open("POST",`${Ge.KI}/api/attachments.json`),Fe.send(ct)}},75790:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Ae}});var le=fe(59301),it=fe(4676);class Ae 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(Nt,_t,fe){"use strict";fe.d(_t,{SV:function(){return Tt},ZP:function(){return gt}});var le=fe(59301),it=fe(76374);const Ae={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(`
`)}]},_e={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 Ge=fe(53184),Ce=fe.n(Ge),he=(We,Et,Bt)=>new Promise((ae,te)=>{var z=ne=>{try{se(Bt.next(ne))}catch(be){te(be)}},ie=ne=>{try{se(Bt.throw(ne))}catch(be){te(be)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);se((Bt=Bt.apply(We,Et)).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,Et,Bt,ae)=>{const te=Et.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Bt.lineNumber,endColumn:Bt.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,Et,Bt,ae)=>{We.languages.registerCompletionItemProvider(Et,{provideCompletionItems(te,z){const ie=te.getWordUntilPosition(z),se={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,se),...Bt.map(Qe=>({label:Qe,kind:We.languages.CompletionItemKind.Keyword,documentation:Qe,insertText:Qe,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(Qe=>({label:Qe.label,kind:We.languages.CompletionItemKind.Snippet,documentation:Qe.content,insertText:ne.startsWith("#")?Qe.content.replace(/#/,""):Qe.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var Me=We=>{Ye.languages.forEach(Et=>{We.languages.registerDocumentFormattingEditProvider(Et,{provideDocumentFormattingEdits(Bt){return he(this,null,function*(){const ae=Ce()(Bt.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:Bt.getFullModelRange(),text:ae}]})}})}),rt(We,"java",Ke.keywords,Ke.quickKey),rt(We,"cpp",me.keywords,me.quickKey),rt(We,"c",Ae.keywords,[]),rt(We,"python",ge.keywords,ge.quickKey),rt(We,"scala",_e.keywords,_e.quickKey)};const Be="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Le=Object.defineProperty,ke=(We,Et,Bt)=>Et in We?Le(We,Et,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):We[Et]=Bt,tt=(We,Et,Bt)=>ke(We,typeof Et!="symbol"?Et+"":Et,Bt);const et=class _s{constructor(Et,Bt,ae){this.placeholder=Et,this.editor=Bt,this.monaco=ae,Bt.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)}};tt(et,"ID","editor.widget.placeholderHint");var Ie=et,Re=fe(96236),Ze=fe(6767),je=fe(25399),wt=fe(89392),ze=fe(33796),Ne=fe(56102),ct=Object.defineProperty,Fe=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ht=(We,Et,Bt)=>Et in We?ct(We,Et,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):We[Et]=Bt,Qt=(We,Et)=>{for(var Bt in Et||(Et={}))Ve.call(Et,Bt)&&ht(We,Bt,Et[Bt]);if(Se)for(var Bt of Se(Et))yt.call(Et,Bt)&&ht(We,Bt,Et[Bt]);return We},Ht=(We,Et)=>Fe(We,Xe(Et)),ve=(We,Et)=>{var Bt={};for(var ae in We)Ve.call(We,ae)&&Et.indexOf(ae)<0&&(Bt[ae]=We[ae]);if(We!=null&&Se)for(var ae of Se(We))Et.indexOf(ae)<0&&yt.call(We,ae)&&(Bt[ae]=We[ae]);return Bt},de=(We,Et,Bt)=>new Promise((ae,te)=>{var z=ne=>{try{se(Bt.next(ne))}catch(be){te(be)}},ie=ne=>{try{se(Bt.throw(ne))}catch(be){te(be)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);se((Bt=Bt.apply(We,Et)).next())});function st(We){return/^\d+$/.test(We)?`${We}px`:We}function Zt(){}let St=!1;const Pe={"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 Et=We;if(Array.isArray(We)){for(let Bt=0;Bt<We.length;Bt++){let ae=Pe[We[Bt]];if(ae)return ae}return Et[0]}return Pe[Et]||Et}let lt=null;const tn=()=>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 gt=We=>{var Et=We,{width:Bt="100%",height:ae="100%",value:te,language:z="javascript",style:ie={},options:se={},overrideServices:ne={},theme:be="vs-dark",onEditBlur:Qe,isCopy:Wt=!1,onSave:Ft,autoHeight:Ct=!1,forbidCopy:Dt=!1,onChange:on=Zt,editorDidMount:$t=Zt,onFocus:cn=Zt,onBreakPoint:ln=Zt,breakPointValue:zt=[],filename:Cn="educoder.txt",errorLine:Oe,errorContent:nt="",highlightLine:we,openBreakPoint:mt=!1,placeholder:dt="",showMiniMap:vt=!0}=Et,kt=ve(Et,["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 Yt=(0,le.useRef)(),Pt=(0,le.useRef)({}),Vt=(0,le.useRef)(),En=(0,le.useRef)(),gn=(0,le.useRef)([]),Mn=(0,le.useRef)(!1),zn=(0,le.useRef)(),An=(0,le.useRef)(),wn=(0,le.useRef)(!1),[yn,Pn]=(0,le.useState)(!1);function Xn(){let Mt;return Yt.current&&(Mt=new it.Z(qe=>{for(let rn of qe)(rn.target.offsetHeight>0||rn.target.offsetWidth>0)&&Pt.current.instance.layout()}),Mt.observe(Yt.current)),Mt}function pn(){Ze.ZP.warning({content:decodeURIComponent(Be),key:"monaco-editor-tip"})}const In=()=>{let Mt=Pt.current.instance;if(te!=null&&Mt&&yn){const qe=Mt.getModel();qe&&te!==qe.getValue()&&(St=!0,qe.setValue(te),Mt.layout(),St=!1)}};(0,le.useEffect)(()=>{const Mt=ze.Z.subscribe("formatDocument",qe=>{var rn;let xn=Pt.current.instance;(rn=xn==null?void 0:xn.getAction)==null||rn.call(xn,"editor.action.formatDocument").run()});return window.updateMonacoValue=qe=>{on(qe)},Mt},[]),(0,le.useEffect)(()=>{var Mt;let qe=Pt.current.instance;En.current&&clearTimeout(En.current),En.current=setTimeout(()=>{In()},500),te&&(te!=null&&te.length)&&((Mt=qe==null?void 0:qe.updateOptions)==null||Mt.call(qe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,yn,Pt.current]),(0,le.useEffect)(()=>{if(Oe&&Pt.current&&Pt.current.instance){let qe=Pt.current.instance;qe.changeViewZones(function(rn){var xn=document.createElement("div");xn.style.padding="10px 20px",xn.style.width="calc(100% - 20px)",xn.className="my-error-line-wrp",xn.innerHTML=nt,rn.addZone({afterLineNumber:Oe||11,heightInLines:3,domNode:xn})});var Mt={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}};qe.addOverlayWidget(Mt),qe.revealPositionInCenter({lineNumber:20,column:1})}},[Oe,Pt.current,yn]);const Kt=(Mt="",qe)=>{if(!Mt||Mt.trim()==="")return!0;const xn=Pt.current.instance.getModel().getLineTokens(qe);let _n=!1;for(let xe=0;xe<2;xe++)xn.getStandardTokenType(xe)===1&&(_n=!0);return _n};(0,le.useEffect)(()=>{var Mt;const qe=(Mt=Pt.current)==null?void 0:Mt.instance;if(qe&&yn&&Dt){const rn=qe.onDidBlurEditorWidget(()=>{wn.current=!1}),xn=qe.onDidFocusEditorText(()=>{wn.current=!0});return()=>{rn.dispose(),xn.dispose()}}},[Pt.current,yn,Dt]),(0,le.useEffect)(()=>{var Mt;if((Mt=Pt.current)!=null&&Mt.instance&&yn&&mt){let qe=Pt.current.instance,rn=qe.getModel();if(!rn)return;(()=>{var He;let Xt=[],ut=[];const nn=rn.getAllDecorations();for(let sn of nn)sn.options.className==="highlighted-line"&&(Xt.push((He=sn==null?void 0:sn.range)==null?void 0:He.startLineNumber),ut.push(sn==null?void 0:sn.id));if(we===Xt[0])return;rn.deltaDecorations(ut,[]);const Lt=rn.getLineCount();we&&we<=Lt&&(qe.deltaDecorations([],[{range:new lt.Range(we,1,we,rn.getLineMaxColumn(we)),options:{isWholeLine:!0,className:"highlighted-line"}}]),qe.revealLineInCenter(we))})();const _n=(He=!1)=>{var Xt;let ut=[],nn=[];const Lt=rn.getAllDecorations();for(let sn of Lt)sn.options.linesDecorationsClassName==="breakpoints-select"&&(ut.push((Xt=sn==null?void 0:sn.range)==null?void 0:Xt.startLineNumber),nn.push(sn==null?void 0:sn.id));if(He)return{lines:ut,ids:nn};ln(ut)},xe=He=>de(void 0,null,function*(){let Xt={range:new lt.Range(He,1,He,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield rn.deltaDecorations([],[Xt]),_n()}),De=He=>de(void 0,null,function*(){let Xt=[];const ut=qe.getLineDecorations(He);for(let nn of ut)nn.options.linesDecorationsClassName==="breakpoints-select"&&Xt.push(nn.id);yield rn.deltaDecorations(Xt,[]),_n()}),At=He=>{let Xt=qe.getLineDecorations(He);for(let ut of Xt)if(ut.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,wt.isEqual)(zt,_n(!0).lines)){rn.deltaDecorations(_n(!0).ids,[]);const He=zt.map(Xt=>({range:new lt.Range(Xt,1,Xt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));rn.deltaDecorations([],He)}const ft=qe.onDidChangeModelContent(He=>{let Xt=qe.getPosition();if(Xt){let ut=Xt.lineNumber;clearTimeout(An.current),An.current=setTimeout(()=>{Kt(rn.getLineContent(ut),ut)?De(ut):At(ut)?(De(ut),xe(ut)):_n()},100)}}),Te=qe.onMouseDown(He=>{var Xt,ut,nn;if(He.target.detail&&((nn=(ut=(Xt=He.target)==null?void 0:Xt.element)==null?void 0:ut.className)!=null&&nn.includes("line-numbers"))){let Lt=He.target.position.lineNumber;if(Kt(rn.getLineContent(Lt),Lt))return;At(Lt)?De(Lt):xe(Lt)}}),pt=He=>{let Xt={range:new lt.Range(He,1,He,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};gn.current=qe.deltaDecorations(gn.current,[Xt])},Gt=()=>{gn.current=qe.deltaDecorations(gn.current,[])},an=qe.onMouseMove(He=>{var Xt,ut,nn;if(Gt(),He.target.detail&&((nn=(ut=(Xt=He.target)==null?void 0:Xt.element)==null?void 0:ut.className)!=null&&nn.includes("line-numbers"))){let Lt=He.target.position.lineNumber;if(Kt(rn.getLineContent(Lt),Lt))return;pt(Lt)}}),fn=qe.onMouseLeave(()=>{Gt()});return()=>{ft.dispose(),Te.dispose(),an.dispose(),fn.dispose()}}},[Pt.current,yn,zt,we,mt,z]),(0,le.useEffect)(()=>{var Mt;(Mt=Pt.current)!=null&&Mt.instance&&mt&&Pt.current.instance.setPosition({lineNumber:0,column:0})},[we]);function Ut(){let Mt=Pt.current.instance;if(Mt){const qe=Mt.getSelection(),rn=Pt.current.pastePos||{},xn=new lt.Range(rn.startLineNumber||qe.endLineNumber,rn.startColumn||qe.endColumn,rn.endLineNumber||qe.endLineNumber,rn.endColumn||qe.endColumn);setTimeout(()=>{Mt.executeEdits("",[{range:xn,text:""}])},300)}}function jt(Mt){(window.navigator.platform.match("Mac")?Mt.metaKey:Mt.ctrlKey)&&Mt.keyCode==83&&(Mt.preventDefault(),Ft())}const vn=()=>{if(Ct&&Pt.current.instance){const Mt=Pt.current.instance.getContentHeight();On(Mt<ae?ae:Mt)}else On(ae)};function Wn(Mt){var qe=document.createEvent("MouseEvents");qe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Mt.dispatchEvent(qe)}const Ln=Mt=>{if(!wn.current)return;const{keyCode:qe,ctrlKey:rn,metaKey:xn,target:_n,type:xe}=Mt;return(xe==="paste"||(qe===67||qe===86)&&(xn||rn))&&_n.nodeName==="TEXTAREA"&&(pn(),Mt.preventDefault()),!1};function mn(Mt,qe){var rn=window.URL||window.webkitURL||window,xn=new Blob([qe]),_n=document.createElementNS("http://www.w3.org/1999/xhtml","a");_n.href=rn.createObjectURL(xn),_n.download=Mt,Wn(_n)}(0,le.useEffect)(()=>{vn()},[vn]),(0,le.useEffect)(()=>{Yt.current&&!yn&&Promise.all([fe.e(8909),fe.e(5028)]).then(fe.bind(fe,71448)).then(Mt=>{try{lt=Mt,Pt.current.instance=lt.editor.create(Yt.current,{value:te,language:at(z),theme:be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:vt||!1}},ne);const qe=Pt.current.instance;let _n=[...Re.BH._menuItems].find(ft=>ft[0]._debugName=="EditorContext")[1],xe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],De=(ft,Te)=>{var pt,Gt;let an=ft._first;do Te.includes((Gt=(pt=an.element)==null?void 0:pt.command)==null?void 0:Gt.id)&&ft._remove(an);while(an=an.next)};if($t(qe,lt),setTimeout(()=>{vn(),Pt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{mn(Cn||"educoder.txt",qe.getValue())}})},500),Pt.current.subscription=qe.onDidChangeModelContent(ft=>{Mn.current?clearTimeout(zn.current):(vn(),on(qe.getValue(),ft)),zn.current=setTimeout(()=>{Mn.current=!1},500)}),window.Monaco||Me(lt,at(z)),Dt&&(De(_n,xe),Yt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ln),window.removeEventListener("paste",Ln),window.addEventListener("keydown",Ln),window.addEventListener("paste",Ln)),window.Monaco=lt,Qe&&qe.onDidBlurEditorWidget(()=>{Qe(qe.getValue())}),cn&&qe.onDidFocusEditorText(()=>{Dt&&tn(),cn(qe.getValue())}),Dt){tn();try{qe.onDidPaste(ft=>{const Te=qe.getSelection(),pt=Pt.current.pastePos||{},Gt=new lt.Range(pt.startLineNumber||Te.endLineNumber,pt.startColumn||Te.endColumn,pt.endLineNumber||Te.endLineNumber,pt.endColumn||Te.endColumn);qe.executeEdits("",[{range:ft.range,text:""}])})}catch(ft){}}let At=Xn();return dt&&typeof dt=="string"&&new Ie(dt,qe,lt),Pn(!0),()=>{const ft=Pt.current.instance;ft.dispose();const Te=ft.getModel();Te&&Te.dispose(),Pt.current.subscription&&Pt.current.subscription.dispose(),At.unobserve(Yt.current)}}catch(qe){}})},[]),(0,le.useEffect)(()=>{if(Pt.current.instance&&yn)return document.addEventListener("keydown",jt,!1),()=>{document.removeEventListener("keydown",jt)}},[Ft,yn]),(0,le.useEffect)(()=>{let Mt=Pt.current.instance;if(Mt&&yn){let qe=at(z);lt.editor.setModelLanguage(Mt.getModel(),qe)}},[z,yn]),(0,le.useEffect)(()=>{Pt.current.instance&&yn&&lt.editor.setTheme(be)},[be,yn]),(0,le.useEffect)(()=>{let Mt=Pt.current.instance;Vt.current=se,Mt&&yn&&(Mt.updateOptions(Qt({},se)),setTimeout(()=>{Mt.getModel().updateOptions(Qt({},se))},200))},[JSON.stringify(se),yn]),(0,le.useEffect)(()=>{let Mt=Pt.current.instance;Mt&&yn&&Mt.layout()},[Bt,ae,yn]);const[Gn,Rn]=(0,le.useState)(st(Bt)),[Fn,On]=(0,le.useState)(st(ae)),tr=Ht(Qt({},ie),{width:Gn,height:Fn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:Yt,style:tr},Wt&&le.createElement(Ne.CopyToClipboard,{text:te,onCopy:()=>Ze.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(je.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 Tt({width:We="100%",height:Et="100%",original:Bt,modified:ae,language:te,options:z={}}){const ie=(0,le.useRef)(),[se,ne]=(0,le.useState)(null);function be(Ct){let Dt;return ie.current&&(Dt=new it.Z(on=>{for(let $t of on)($t.target.offsetHeight>0||$t.target.offsetWidth>0)&&Ct.layout()}),Dt.observe(ie.current)),Dt}(0,le.useEffect)(()=>(ie.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(Ct=>{lt=Ct;const Dt=lt.editor.createDiffEditor(ie.current,Ht(Qt({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(Dt);let on=be(Dt);return()=>{Dt.dispose();const $t=Dt.getModel();$t&&$t.dispose(),on.unobserve(ie.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{se&&se.setModel({original:lt.editor.createModel(Bt,te),modified:lt.editor.createModel(ae,te)})},[Bt,ae,te,se]);const Qe=st(We),Wt=st(Et),Ft={width:Qe,height:Wt};return le.createElement("div",{className:"my-diff-editor",ref:ie,style:Ft})}},17904:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return it}});var le=fe(59301);function it(Ae,Ke){const me=(0,le.useRef)();(0,le.useEffect)(()=>{me.current=Ae}),(0,le.useEffect)(()=>{function ge(){me.current()}if(Ke!==null){let _e=setInterval(ge,Ke);return()=>clearInterval(_e)}},[Ke])}},86608:function(Nt,_t,fe){"use strict";fe.r(_t),fe.d(_t,{default:function(){return Xe}});var le=fe(59301),it=fe(2978),Ae=fe(76560),Ke=fe(93041),me=fe(24404),ge=fe(28284),_e=fe(6767),Ge=fe(91882),Ce=fe(77019),he=fe(5269),Ye=fe(82326),pe=fe(37568),rt=fe(37285),Me=fe(17149),Be=fe(99571),Le=fe(82874),ke={flex_box_center:"flex_box_center___oUI48",flex_space_between:"flex_space_between___ygvRP",flex_box_vertical_center:"flex_box_vertical_center___eHXbG",flex_box_center_end:"flex_box_center_end___VqFf6",flex_box_column:"flex_box_column___VdaxG",bg:"bg___AuzLD",title:"title___ig1Ym",titleLeft:"titleLeft___HQ0Kv",titleRight:"titleRight___gvlMr",btns:"btns___vjaR0"},tt=Object.defineProperty,et=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Re=(Se,Ve,yt)=>Ve in Se?tt(Se,Ve,{enumerable:!0,configurable:!0,writable:!0,value:yt}):Se[Ve]=yt,Ze=(Se,Ve)=>{for(var yt in Ve||(Ve={}))$e.call(Ve,yt)&&Re(Se,yt,Ve[yt]);if(et)for(var yt of et(Ve))Ie.call(Ve,yt)&&Re(Se,yt,Ve[yt]);return Se},je=(Se,Ve)=>{var yt={};for(var ht in Se)$e.call(Se,ht)&&Ve.indexOf(ht)<0&&(yt[ht]=Se[ht]);if(Se!=null&&et)for(var ht of et(Se))Ve.indexOf(ht)<0&&Ie.call(Se,ht)&&(yt[ht]=Se[ht]);return yt},wt=(Se,Ve,yt)=>new Promise((ht,Qt)=>{var Ht=st=>{try{de(yt.next(st))}catch(Zt){Qt(Zt)}},ve=st=>{try{de(yt.throw(st))}catch(Zt){Qt(Zt)}},de=st=>st.done?ht(st.value):Promise.resolve(st.value).then(Ht,ve);de((yt=yt.apply(Se,Ve)).next())});const{SubMenu:ze}=Ke.default,{Content:Ne,Sider:ct}=me.default,Fe=Se=>{var Ve=Se,{graduation:yt,globalSetting:ht,loading:Qt,user:Ht,dispatch:ve}=Ve,de=je(Ve,["graduation","globalSetting","loading","user","dispatch"]),st,Zt,St,Pe,at,lt,tn,gt;const Tt=(0,Ae.useParams)(),We=(0,Ae.useLocation)(),{userInfo:Et}=Ht,[Bt]=ge.default.useForm(),{editTopicData:ae}=yt,te=()=>wt(void 0,null,function*(){const z=Bt.getFieldsValue(),ie=Ze({},z);ie.city&&(ie.province=ie.city[0],ie.city=ie.city[1]);const se=yield ve({type:"graduation/editTopic",payload:{categoryId:Tt.categoryId,coursesId:Tt.coursesId,attachment_ids:[],graduation_topic:ie}});se.status?_e.ZP.error(se.message):Ae.history.push(`/classrooms/${Tt.coursesId}/graduation_topics/${ae.left_banner_id}`)});return(0,le.useEffect)(()=>{function z(){return wt(this,null,function*(){const ie=yield ve({type:"graduation/editTopicDefaultData",payload:Ze({},Tt)}),se=Ze({},ie.selected_data);se.city=[se.province,se.city],Bt.setFieldsValue(se)})}z()},[Tt.coursesId]),le.createElement("section",{className:"edu-container"},le.createElement("section",{className:"animated fadeIn"},le.createElement("aside",{className:"mt10"},Et&&le.createElement(Ge.Z,{separator:">"},le.createElement(Ge.Z.Item,null,le.createElement(Ae.Link,{to:`${Et.first_category_url}`},(st=Et==null?void 0:Et.course)==null?void 0:st.course_name)),le.createElement(Ge.Z.Item,null,le.createElement(Ae.Link,{to:`/classrooms/${Tt.coursesId}/graduation_topics/${ae.left_banner_id}`},"\u6BD5\u8BBE\u9009\u9898")),le.createElement(Ge.Z.Item,null,"\u7F16\u8F91"))),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"},"\u7F16\u8F91\u6BD5\u8BBE\u9009\u9898")),le.createElement(he.Z,null,le.createElement(Ae.Link,{className:"font16 c-light-black",to:`/classrooms/${Tt.coursesId}/graduation_topics/${ae.left_banner_id}`},"\u8FD4\u56DE"))))),le.createElement("section",{className:[ke.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},le.createElement(ge.default,{layout:"vertical",form:Bt,scrollToFirstError:!0,initialValues:ae==null?void 0:ae.selected_data,onFinish:z=>wt(void 0,null,function*(){te()})},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}},(Zt=ae.teacher_list)==null?void 0:Zt.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.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,defaultValue:(St=ae.selected_data)==null?void 0:St.description,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"},(Pe=ae.topic_type)==null?void 0:Pe.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.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"},(at=ae.topic_source)==null?void 0:at.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.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"},(lt=ae.topic_property_first)==null?void 0:lt.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.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"},(tn=ae.topic_property_second)==null?void 0:tn.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.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}},(gt=ae.topic_repeat)==null?void 0:gt.map(function(z,ie){return le.createElement(Ye.default.Option,{value:z.id,key:ie},z.name)}))),le.createElement(ge.default.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},le.createElement(Me.Z,{size:"middle",style:{width:200},options:Le.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),le.createElement("aside",{className:ke.btns},le.createElement(Be.ZP,{type:"primary",onClick:()=>{Bt.submit()}},"\u4FDD\u5B58"),le.createElement(Ae.Link,{to:`/classrooms/${Tt.coursesId}/graduation_topics/${Tt.categoryId}`},"\u53D6\u6D88")))};var Xe=(0,Ae.connect)(({graduation:Se,loading:Ve,user:yt,globalSetting:ht})=>({graduation:Se,globalSetting:ht,user:yt,loading:Ve.effects}))(Fe)},82874:function(Nt,_t,fe){"use strict";fe.d(_t,{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(Nt,_t,fe){"use strict";fe.d(_t,{AL:function(){return Ie},Iy:function(){return Ye},Qv:function(){return Me},ez:function(){return $e},jb:function(){return pe}});var le=fe(32834),it=fe.n(le),Ae=fe(11690),Ke=fe.n(Ae);let me=1;function ge(ze,Ne){const ct=ze.match(/^(\s+)(?:```)/);if(ct===null)return Ne;const Fe=ct[1];return Ne.split(`
`).map(Xe=>{const Se=Xe.match(/^\s+/);if(Se===null)return Xe;const[Ve]=Se;return Ve.length>=Fe.length?Xe.slice(Fe.length):Xe}).join(`
`)}let _e=[],Ge=["<ul>"];const Ce=new(it()).Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ye(){_e.length=0,Ge=["<ul>"]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function rt(ze,Ne,ct,Fe){if(Ne>=ze.length||ze[Ne].level<=ct)return Ne;var Xe=ze[Ne];Fe.push("<li><a href='#"+me+Xe.anchor+"'>"+Xe.text+"</a>"),Ne++;var Se=[];return Ne=rt(ze,Ne,Xe.level,Se),Se.length>0&&(Fe.push("<ul>"),Se.forEach(function(Ve){Fe.push(Ve)}),Fe.push("</ul>")),Fe.push("</li>"),Ne=rt(ze,Ne,ct,Fe),Ne}function Me(){return rt(_e,0,0,Ge),Ge.push("</ul>"),Ge.join("")}const Be={heading(ze){const Ne=he.exec(ze);if(me+=1,Ne)return{type:"heading",raw:Ne[0],depth:Ne[1].length,text:Ne[2]}},fences(ze){const Ne=this.rules.block.fences.exec(ze);if(Ne){const ct=Ne[0];let Fe=ge(ct,Ne[3]||"");const Xe=Ne[2]?Ne[2].trim():Ne[2];if(["latex","katex","math"].indexOf(Xe)>=0){const Se=tt(),Ve=Fe;Fe=Se,et[Se]={type:"block",expression:Ve}}return{type:"code",raw:ct,lang:Xe,text:Fe}}}},Le=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ke=0;const tt=()=>`__special_katext_id_${ke++}__`;let et={};function $e(){return et}function Ie(){ke=0,et={}}function Re(ze){return ze=ze.replace(Le,(Ne,ct)=>{const Fe=tt();return et[Fe]={type:"inline",expression:ct},Fe}),ze}const Ze=Ce.listitem;Ce.listitem=function(ze){return Ze(Re(ze))};const je=Ce.paragraph;Ce.paragraph=function(ze){return je(Re(ze))};const wt=Ce.tablecell;Ce.tablecell=function(ze,Ne){return wt(Re(ze),Ne)},Ce.code=function(ze,Ne,ct){const Fe=(Ne||"").match(/\S*/)[0];return Fe?["latex","katex","math"].indexOf(Fe)>=0?`<p class='editormd-tex'>${ze}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ne}">${ct?ze:(0,Ae.escape)(ze,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ct?ze:(0,Ae.escape)(ze,!0))+"</code></pre>"},Ce.heading=function(ze,Ne,ct){let Fe=this.options.headerPrefix+ct.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return _e.push({anchor:Fe,level:Ne,text:ze}),"<h"+Ne+' id="'+me+Fe+'">'+ze+"</h"+Ne+">"},it().setOptions({silent:!0,gfm:!0,pedantic:!1}),it().use({tokenizer:Be,renderer:Ce}),_t.ZP=it()},99498:function(Nt,_t,fe){(function(le){le(fe(89780))})(function(le){le.defineOption("placeholder","",function(Ge,Ce,he){var Ye=he&&he!=le.Init;if(Ce&&!Ye)Ge.on("blur",me),Ge.on("change",ge),Ge.on("swapDoc",ge),le.on(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose=function(){Ke(Ge)}),ge(Ge);else if(!Ce&&Ye){Ge.off("blur",me),Ge.off("change",ge),Ge.off("swapDoc",ge),le.off(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose),it(Ge);var pe=Ge.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}Ce&&!Ge.hasFocus()&&me(Ge)});function it(Ge){Ge.state.placeholder&&(Ge.state.placeholder.parentNode.removeChild(Ge.state.placeholder),Ge.state.placeholder=null)}function Ae(Ge){it(Ge);var Ce=Ge.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=Ge.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var he=Ge.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),Ce.appendChild(he),Ge.display.lineSpace.insertBefore(Ce,Ge.display.lineSpace.firstChild)}function Ke(Ge){setTimeout(function(){var Ce=!1,he=Ge.getInputField();he.nodeName=="TEXTAREA"?Ce=!he.value:Ge.lineCount()==1&&(Ce=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),Ce?Ae(Ge):it(Ge)},20)}function me(Ge){_e(Ge)&&Ae(Ge)}function ge(Ge){var Ce=Ge.getWrapperElement(),he=_e(Ge);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?Ae(Ge):it(Ge)}function _e(Ge){return Ge.lineCount()===1&&Ge.getLine(0)===""}})},25717:function(Nt,_t,fe){(function(le){le(fe(89780))})(function(le){var it={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ae=le.Pos;le.defineOption("autoCloseBrackets",!1,function(Be,Le,ke){ke&&ke!=le.Init&&(Be.removeKeyMap(me),Be.state.closeBrackets=null),Le&&(ge(Ke(Le,"pairs")),Be.state.closeBrackets=Le,Be.addKeyMap(me))});function Ke(Be,Le){return Le=="pairs"&&typeof Be=="string"?Be:typeof Be=="object"&&Be[Le]!=null?Be[Le]:it[Le]}var me={Backspace:Ce,Enter:he};function ge(Be){for(var Le=0;Le<Be.length;Le++){var ke=Be.charAt(Le),tt="'"+ke+"'";me[tt]||(me[tt]=_e(ke))}}ge(it.pairs+"`");function _e(Be){return function(Le){return pe(Le,Be)}}function Ge(Be){var Le=Be.state.closeBrackets;if(!Le||Le.override)return Le;var ke=Be.getModeAt(Be.getCursor());return ke.closeBrackets||Le}function Ce(Be){var Le=Ge(Be);if(!Le||Be.getOption("disableInput"))return le.Pass;for(var ke=Ke(Le,"pairs"),tt=Be.listSelections(),et=0;et<tt.length;et++){if(!tt[et].empty())return le.Pass;var $e=rt(Be,tt[et].head);if(!$e||ke.indexOf($e)%2!=0)return le.Pass}for(var et=tt.length-1;et>=0;et--){var Ie=tt[et].head;Be.replaceRange("",Ae(Ie.line,Ie.ch-1),Ae(Ie.line,Ie.ch+1),"+delete")}}function he(Be){var Le=Ge(Be),ke=Le&&Ke(Le,"explode");if(!ke||Be.getOption("disableInput"))return le.Pass;for(var tt=Be.listSelections(),et=0;et<tt.length;et++){if(!tt[et].empty())return le.Pass;var $e=rt(Be,tt[et].head);if(!$e||ke.indexOf($e)%2!=0)return le.Pass}Be.operation(function(){var Ie=Be.lineSeparator()||`
`;Be.replaceSelection(Ie+Ie,null),Be.execCommand("goCharLeft"),tt=Be.listSelections();for(var Re=0;Re<tt.length;Re++){var Ze=tt[Re].head.line;Be.indentLine(Ze,null,!0),Be.indentLine(Ze+1,null,!0)}})}function Ye(Be){var Le=le.cmpPos(Be.anchor,Be.head)>0;return{anchor:new Ae(Be.anchor.line,Be.anchor.ch+(Le?-1:1)),head:new Ae(Be.head.line,Be.head.ch+(Le?1:-1))}}function pe(Be,Le){var ke=Ge(Be);if(!ke||Be.getOption("disableInput"))return le.Pass;var tt=Ke(ke,"pairs"),et=tt.indexOf(Le);if(et==-1)return le.Pass;for(var $e=Ke(ke,"closeBefore"),Ie=Ke(ke,"triples"),Re=tt.charAt(et+1)==Le,Ze=Be.listSelections(),je=et%2==0,wt,ze=0;ze<Ze.length;ze++){var Ne=Ze[ze],ct=Ne.head,Fe,Xe=Be.getRange(ct,Ae(ct.line,ct.ch+1));if(je&&!Ne.empty())Fe="surround";else if((Re||!je)&&Xe==Le)Re&&Me(Be,ct)?Fe="both":Ie.indexOf(Le)>=0&&Be.getRange(ct,Ae(ct.line,ct.ch+3))==Le+Le+Le?Fe="skipThree":Fe="skip";else if(Re&&ct.ch>1&&Ie.indexOf(Le)>=0&&Be.getRange(Ae(ct.line,ct.ch-2),ct)==Le+Le){if(ct.ch>2&&/\bstring/.test(Be.getTokenTypeAt(Ae(ct.line,ct.ch-2))))return le.Pass;Fe="addFour"}else if(Re){var Se=ct.ch==0?" ":Be.getRange(Ae(ct.line,ct.ch-1),ct);if(!le.isWordChar(Xe)&&Se!=Le&&!le.isWordChar(Se))Fe="both";else return le.Pass}else if(je&&(Xe.length===0||/\s/.test(Xe)||$e.indexOf(Xe)>-1))Fe="both";else return le.Pass;if(!wt)wt=Fe;else if(wt!=Fe)return le.Pass}var Ve=et%2?tt.charAt(et-1):Le,yt=et%2?Le:tt.charAt(et+1);Be.operation(function(){if(wt=="skip")Be.execCommand("goCharRight");else if(wt=="skipThree")for(var ht=0;ht<3;ht++)Be.execCommand("goCharRight");else if(wt=="surround"){for(var Qt=Be.getSelections(),ht=0;ht<Qt.length;ht++)Qt[ht]=Ve+Qt[ht]+yt;Be.replaceSelections(Qt,"around"),Qt=Be.listSelections().slice();for(var ht=0;ht<Qt.length;ht++)Qt[ht]=Ye(Qt[ht]);Be.setSelections(Qt)}else wt=="both"?(Be.replaceSelection(Ve+yt,null),Be.triggerElectric(Ve+yt),Be.execCommand("goCharLeft")):wt=="addFour"&&(Be.replaceSelection(Ve+Ve+Ve+Ve,"before"),Be.execCommand("goCharRight"))})}function rt(Be,Le){var ke=Be.getRange(Ae(Le.line,Le.ch-1),Ae(Le.line,Le.ch+1));return ke.length==2?ke:null}function Me(Be,Le){var ke=Be.getTokenAt(Ae(Le.line,Le.ch+1));return/\bstring/.test(ke.type)&&ke.start==Le.ch&&(Le.ch==0||!/\bstring/.test(Be.getTokenTypeAt(Le)))}})},6313:function(Nt,_t,fe){(function(le){le(fe(89780),fe(32855))})(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"],Ae=["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 Me=he[rt].head,Be=Ce.getTokenAt(Me),Le=le.innerMode(Ce.getMode(),Be.state),ke=Le.state,tt=Le.mode.xmlCurrentTag&&Le.mode.xmlCurrentTag(ke),et=tt&&tt.name;if(!et)return le.Pass;var $e=Le.mode.configuration=="html",Ie=typeof pe=="object"&&pe.dontCloseTags||$e&&it,Re=typeof pe=="object"&&pe.indentTags||$e&&Ae;Be.end>Me.ch&&(et=et.slice(0,et.length-Be.end+Me.ch));var Ze=et.toLowerCase();if(!et||Be.type=="string"&&(Be.end!=Me.ch||!/[\"\']/.test(Be.string.charAt(Be.string.length-1))||Be.string.length==1)||Be.type=="tag"&&tt.close||Be.string.indexOf("/")==Me.ch-Be.start-1||Ie&&_e(Ie,Ze)>-1||Ge(Ce,Le.mode.xmlCurrentContext&&Le.mode.xmlCurrentContext(ke)||[],et,Me,!0))return le.Pass;var je=typeof pe=="object"&&pe.emptyTags;if(je&&_e(je,et)>-1){Ye[rt]={text:"/>",newPos:le.Pos(Me.line,Me.ch+2)};continue}var wt=Re&&_e(Re,Ze)>-1;Ye[rt]={indent:wt,text:">"+(wt?`
`:"")+"</"+et+">",newPos:wt?le.Pos(Me.line+1,0):le.Pos(Me.line,Me.ch+1)}}for(var ze=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 ct=Ce.listSelections().slice(0);ct[rt]={head:Ne.newPos,anchor:Ne.newPos},Ce.setSelections(ct),!ze&&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?"/":"</",Me=Ce.getOption("autoCloseTags"),Be=typeof Me=="object"&&Me.dontIndentOnSlash,Le=0;Le<Ye.length;Le++){if(!Ye[Le].empty())return le.Pass;var ke=Ye[Le].head,tt=Ce.getTokenAt(ke),et=le.innerMode(Ce.getMode(),tt.state),$e=et.state;if(he&&(tt.type=="string"||tt.string.charAt(0)!="<"||tt.start!=ke.ch-1))return le.Pass;var Ie,Re=et.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Re&&et.mode.name=="javascript")Ie=rt+"script";else if(Re&&et.mode.name=="css")Ie=rt+"style";else{var Ze=et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext($e);if(!Ze||Ze.length&&Ge(Ce,Ze,Ze[Ze.length-1],ke))return le.Pass;Ie=rt+Ze[Ze.length-1]}Ce.getLine(ke.line).charAt(tt.end)!=">"&&(Ie+=">"),pe[Le]=Ie}if(Ce.replaceSelections(pe),Ye=Ce.listSelections(),!Be)for(var Le=0;Le<Ye.length;Le++)(Le==Ye.length-1||Ye[Le].head.line<Ye[Le+1].head.line)&&Ce.indentLine(Ye[Le].head.line)}function ge(Ce){return Ce.getOption("disableInput")?le.Pass:me(Ce,!0)}le.commands.closeTag=function(Ce){return me(Ce)};function _e(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 Ge(Ce,he,Ye,pe,rt){if(!le.scanForClosingTag)return!1;var Me=Math.min(Ce.lastLine()+1,pe.line+500),Be=le.scanForClosingTag(Ce,pe,null,Me);if(!Be||Be.tag!=Ye)return!1;for(var Le=rt?1:0,ke=he.length-1;ke>=0&&he[ke]==Ye;ke--)++Le;pe=Be.to;for(var ke=1;ke<Le;ke++){var tt=le.scanForClosingTag(Ce,pe,null,Me);if(!tt||tt.tag!=Ye)return!1;pe=tt.to}return!0}})},32855:function(Nt,_t,fe){(function(le){le(fe(89780))})(function(le){"use strict";var it=le.Pos;function Ae(ke,tt){return ke.line-tt.line||ke.ch-tt.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 _e(ke,tt,et,$e){this.line=tt,this.ch=et,this.cm=ke,this.text=ke.getLine(tt),this.min=$e?Math.max($e.from,ke.firstLine()):ke.firstLine(),this.max=$e?Math.min($e.to-1,ke.lastLine()):ke.lastLine()}function Ge(ke,tt){var et=ke.cm.getTokenTypeAt(it(ke.line,tt));return et&&/\btag\b/.test(et)}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 tt=ke.text.indexOf(">",ke.ch);if(tt==-1){if(Ce(ke))continue;return}if(!Ge(ke,tt+1)){ke.ch=tt+1;continue}var et=ke.text.lastIndexOf("/",tt),$e=et>-1&&!/\S/.test(ke.text.slice(et+1,tt));return ke.ch=tt+1,$e?"selfClose":"regular"}}function pe(ke){for(;;){var tt=ke.ch?ke.text.lastIndexOf("<",ke.ch-1):-1;if(tt==-1){if(he(ke))continue;return}if(!Ge(ke,tt+1)){ke.ch=tt;continue}ge.lastIndex=tt,ke.ch=tt;var et=ge.exec(ke.text);if(et&&et.index==tt)return et}}function rt(ke){for(;;){ge.lastIndex=ke.ch;var tt=ge.exec(ke.text);if(!tt){if(Ce(ke))continue;return}if(!Ge(ke,tt.index+1)){ke.ch=tt.index+1;continue}return ke.ch=tt.index+tt[0].length,tt}}function Me(ke){for(;;){var tt=ke.ch?ke.text.lastIndexOf(">",ke.ch-1):-1;if(tt==-1){if(he(ke))continue;return}if(!Ge(ke,tt+1)){ke.ch=tt;continue}var et=ke.text.lastIndexOf("/",tt),$e=et>-1&&!/\S/.test(ke.text.slice(et+1,tt));return ke.ch=tt+1,$e?"selfClose":"regular"}}function Be(ke,tt){for(var et=[];;){var $e=rt(ke),Ie,Re=ke.line,Ze=ke.ch-($e?$e[0].length:0);if(!$e||!(Ie=Ye(ke)))return;if(Ie!="selfClose")if($e[1]){for(var je=et.length-1;je>=0;--je)if(et[je]==$e[2]){et.length=je;break}if(je<0&&(!tt||tt==$e[2]))return{tag:$e[2],from:it(Re,Ze),to:it(ke.line,ke.ch)}}else et.push($e[2])}}function Le(ke,tt){for(var et=[];;){var $e=Me(ke);if(!$e)return;if($e=="selfClose"){pe(ke);continue}var Ie=ke.line,Re=ke.ch,Ze=pe(ke);if(!Ze)return;if(Ze[1])et.push(Ze[2]);else{for(var je=et.length-1;je>=0;--je)if(et[je]==Ze[2]){et.length=je;break}if(je<0&&(!tt||tt==Ze[2]))return{tag:Ze[2],from:it(ke.line,ke.ch),to:it(Ie,Re)}}}}le.registerHelper("fold","xml",function(ke,tt){for(var et=new _e(ke,tt.line,0);;){var $e=rt(et);if(!$e||et.line!=tt.line)return;var Ie=Ye(et);if(!Ie)return;if(!$e[1]&&Ie!="selfClose"){var Re=it(et.line,et.ch),Ze=Be(et,$e[2]);return Ze&&Ae(Ze.from,Re)>0?{from:Re,to:Ze.from}:null}}}),le.findMatchingTag=function(ke,tt,et){var $e=new _e(ke,tt.line,tt.ch,et);if(!($e.text.indexOf(">")==-1&&$e.text.indexOf("<")==-1)){var Ie=Ye($e),Re=Ie&&it($e.line,$e.ch),Ze=Ie&&pe($e);if(!(!Ie||!Ze||Ae($e,tt)>0)){var je={from:it($e.line,$e.ch),to:Re,tag:Ze[2]};return Ie=="selfClose"?{open:je,close:null,at:"open"}:Ze[1]?{open:Le($e,Ze[2]),close:je,at:"close"}:($e=new _e(ke,Re.line,Re.ch,et),{open:je,close:Be($e,Ze[2]),at:"open"})}}},le.findEnclosingTag=function(ke,tt,et,$e){for(var Ie=new _e(ke,tt.line,tt.ch,et);;){var Re=Le(Ie,$e);if(!Re)break;var Ze=new _e(ke,tt.line,tt.ch,et),je=Be(Ze,Re.tag);if(je)return{open:Re,close:je}}},le.scanForClosingTag=function(ke,tt,et,$e){var Ie=new _e(ke,tt.line,tt.ch,$e?{from:0,to:$e}:null);return Be(Ie,et)}})},89780:function(Nt){(function(_t,fe){Nt.exports=fe()})(this,function(){"use strict";var _t=navigator.userAgent,fe=navigator.platform,le=/gecko\/\d/i.test(_t),it=/MSIE \d/.test(_t),Ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_t),Ke=/Edge\/(\d+)/.exec(_t),me=it||Ae||Ke,ge=me&&(it?document.documentMode||6:+(Ke||Ae)[1]),_e=!Ke&&/WebKit\//.test(_t),Ge=_e&&/Qt\/\d+\.\d+/.test(_t),Ce=!Ke&&/Chrome\//.test(_t),he=/Opera\//.test(_t),Ye=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(_t),rt=/PhantomJS/.test(_t),Me=!Ke&&/AppleWebKit/.test(_t)&&/Mobile\/\w+/.test(_t),Be=/Android/.test(_t),Le=Me||Be||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(_t),ke=Me||/Mac/.test(fe),tt=/\bCrOS\b/.test(_t),et=/win/i.test(fe),$e=he&&_t.match(/Version\/(\d*\.\d*)/);$e&&($e=Number($e[1])),$e&&$e>=15&&(he=!1,_e=!0);var Ie=ke&&(Ge||he&&($e==null||$e<12.11)),Re=le||me&&ge>=9;function Ze(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var je=function(a,y){var x=a.className,b=Ze(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 wt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function ze(a,y){return wt(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 ct(a,y,x,b){var E=Ne(a,y,x,b);return E.setAttribute("role","presentation"),E}var Fe;document.createRange?Fe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Fe=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 Se(){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 Ve(a,y){var x=a.className;Ze(y).test(x)||(a.className+=(x?" ":"")+y)}function yt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Ze(x[b]).test(y)&&(y+=" "+x[b]);return y}var ht=function(a){a.select()};Me?ht=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(ht=function(a){try{a.select()}catch(y){}});function Qt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Ht(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=Qt(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 st(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Zt=50,St={toString:function(){return"CodeMirror.Pass"}},Pe={scroll:!1},at={origin:"*mouse"},lt={origin:"+move"};function tn(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 gt=[""];function Tt(a){for(;gt.length<=a;)gt.push(We(gt)+" ");return gt[a]}function We(a){return a[a.length-1]}function Et(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Bt(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&&Ht(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 se(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 Qe(a){return a.charCodeAt(0)>=768&&be.test(a)}function Wt(a,y,x){for(;(x<0?y>0:y<a.length)&&Qe(a.charAt(y));)y+=x;return y}function Ft(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 Ct(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 Dt=null;function on(a,y,x){var b;Dt=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:Dt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:Dt=E)}return b!=null?b:Dt}var $t=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 ue(ce,ye,Ee){this.level=ce,this.from=ye,this.to=Ee}return function(ce,ye){var Ee=ye=="ltr"?"L":"R";if(ce.length==0||ye=="ltr"&&!b.test(ce))return!1;for(var Je=ce.length,Ue=[],xt=0;xt<Je;++xt)Ue.push(x(ce.charCodeAt(xt)));for(var Rt=0,en=Ee;Rt<Je;++Rt){var dn=Ue[Rt];dn=="m"?Ue[Rt]=en:en=dn}for(var bn=0,hn=Ee;bn<Je;++bn){var Sn=Ue[bn];Sn=="1"&&hn=="r"?Ue[bn]="n":ee.test(Sn)&&(hn=Sn,Sn=="r"&&(Ue[bn]="R"))}for(var Zn=1,Tn=Ue[0];Zn<Je-1;++Zn){var ar=Ue[Zn];ar=="+"&&Tn=="1"&&Ue[Zn+1]=="1"?Ue[Zn]="1":ar==","&&Tn==Ue[Zn+1]&&(Tn=="1"||Tn=="n")&&(Ue[Zn]=Tn),Tn=ar}for(var _r=0;_r<Je;++_r){var ri=Ue[_r];if(ri==",")Ue[_r]="N";else if(ri=="%"){var Zr=void 0;for(Zr=_r+1;Zr<Je&&Ue[Zr]=="%";++Zr);for(var Mi=_r&&Ue[_r-1]=="!"||Zr<Je&&Ue[Zr]=="1"?"1":"N",Si=_r;Si<Zr;++Si)Ue[Si]=Mi;_r=Zr-1}}for(var Qr=0,Ei=Ee;Qr<Je;++Qr){var si=Ue[Qr];Ei=="L"&&si=="1"?Ue[Qr]="L":ee.test(si)&&(Ei=si)}for(var ei=0;ei<Je;++ei)if(E.test(Ue[ei])){var qr=void 0;for(qr=ei+1;qr<Je&&E.test(Ue[qr]);++qr);for(var Vr=(ei?Ue[ei-1]:Ee)=="L",ki=(qr<Je?Ue[qr]:Ee)=="L",Ga=Vr==ki?Vr?"L":"R":Ee,ga=ei;ga<qr;++ga)Ue[ga]=Ga;ei=qr-1}for(var hi=[],qi,ii=0;ii<Je;)if(re.test(Ue[ii])){var bl=ii;for(++ii;ii<Je&&re.test(Ue[ii]);++ii);hi.push(new ue(0,bl,ii))}else{var aa=ii,Da=hi.length,Ba=ye=="rtl"?1:0;for(++ii;ii<Je&&Ue[ii]!="L";++ii);for(var gi=aa;gi<ii;)if(oe.test(Ue[gi])){aa<gi&&(hi.splice(Da,0,new ue(1,aa,gi)),Da+=Ba);var Va=gi;for(++gi;gi<ii&&oe.test(Ue[gi]);++gi);hi.splice(Da,0,new ue(2,Va,gi)),Da+=Ba,aa=gi}else++gi;aa<ii&&hi.splice(Da,0,new ue(1,aa,ii))}return ye=="ltr"&&(hi[0].level==1&&(qi=ce.match(/^\s+/))&&(hi[0].from=qi[0].length,hi.unshift(new ue(0,0,qi[0].length))),We(hi).level==1&&(qi=ce.match(/\s+$/))&&(We(hi).to-=qi[0].length,hi.push(new ue(0,Je-qi[0].length,Je)))),ye=="rtl"?hi.reverse():hi}}();function cn(a,y){var x=a.order;return x==null&&(x=a.order=$t(a.text,y)),x}var ln=[],zt=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]||ln).concat(x)}};function Cn(a,y){return a._handlers&&a._handlers[y]||ln}function Oe(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=st(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function nt(a,y){var x=Cn(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 we(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),nt(a,x||y.type,a,y),Pt(y)||y.codemirrorIgnore}function mt(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)st(x,y[b])==-1&&x.push(y[b])}function dt(a,y){return Cn(a,y).length>0}function vt(a){a.prototype.on=function(y,x){zt(this,y,x)},a.prototype.off=function(y,x){Oe(this,y,x)}}function kt(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Yt(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Pt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Vt(a){kt(a),Yt(a)}function En(a){return a.target||a.srcElement}function gn(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 Mn=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");ze(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 wn;function yn(a){if(wn!=null)return wn;var y=ze(a,document.createTextNode("A\u062EA")),x=Fe(y,0,1).getBoundingClientRect(),b=Fe(y,1,2).getBoundingClientRect();return wt(a),!x||x.left==x.right?!1:wn=b.right-x.right<3}var Pn=`
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/)},Xn=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},pn=function(){var a=Ne("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),In=null;function Kt(a){if(In!=null)return In;var y=ze(a,Ne("span","x")),x=y.getBoundingClientRect(),b=Fe(y,0,1).getBoundingClientRect();return In=Math.abs(x.left-b.left)>1}var Ut={},jt={};function vn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Ut[a]=y}function Wn(a,y){jt[a]=y}function Ln(a){if(typeof a=="string"&&jt.hasOwnProperty(a))a=jt[a];else if(a&&typeof a.name=="string"&&jt.hasOwnProperty(a.name)){var y=jt[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 Ln("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Ln("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function mn(a,y){y=Ln(y);var x=Ut[y.name];if(!x)return mn(a,"text/plain");var b=x(a,y);if(Gn.hasOwnProperty(y.name)){var E=Gn[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 Gn={};function Rn(a,y){var x=Gn.hasOwnProperty(a)?Gn[a]:Gn[a]={};Ht(y,x)}function Fn(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 On(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 tr(a,y,x){return a.startState?a.startState(y,x):!0}var Mt=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};Mt.prototype.eol=function(){return this.pos>=this.string.length},Mt.prototype.sol=function(){return this.pos==this.lineStart},Mt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Mt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Mt.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},Mt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Mt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Mt.prototype.skipToEnd=function(){this.pos=this.string.length},Mt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Mt.prototype.backUp=function(a){this.pos-=a},Mt.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)},Mt.prototype.indentation=function(){return ve(this.string,null,this.tabSize)-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},Mt.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)}},Mt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Mt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Mt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Mt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function qe(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 rn(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 xn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function _n(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=st(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],ue=oe.height;if(y<ue)break;y-=ue}return x+re}function At(a,y){return y>=a.first&&y<a.first+a.size}function ft(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Te(a,y,x){if(x===void 0&&(x=null),!(this instanceof Te))return new Te(a,y,x);this.line=a,this.ch=y,this.sticky=x}function pt(a,y){return a.line-y.line||a.ch-y.ch}function Gt(a,y){return a.sticky==y.sticky&&pt(a,y)==0}function an(a){return Te(a.line,a.ch)}function fn(a,y){return pt(a,y)<0?y:a}function He(a,y){return pt(a,y)<0?a:y}function Xt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function ut(a,y){if(y.line<a.first)return Te(a.first,0);var x=a.first+a.size-1;return y.line>x?Te(x,qe(a,x).text.length):nn(y,qe(a,y.line).text.length)}function nn(a,y){var x=a.ch;return x==null||x>y?Te(a.line,y):x<0?Te(a.line,0):a}function Lt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=ut(a,y[b]);return x}var sn=function(a,y){this.state=a,this.lookAhead=y},un=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(a,y,x){return y instanceof sn?new un(a,Fn(a.mode,y.state),x,y.lookAhead):new un(a,Fn(a.mode,y),x)},un.prototype.save=function(a){var y=a!==!1?Fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sn(y,this.maxLookAhead):y};function Dn(a,y,x,b){var E=[a.state.modeGen],ee={};ur(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],Ee=1,Je=0;x.state=!0,ur(a,y.text,ye.mode,x,function(Ue,xt){for(var Rt=Ee;Je<Ue;){var en=E[Ee];en>Ue&&E.splice(Ee,1,Ue,E[Ee+1],en),Ee+=2,Je=Math.min(Ue,en)}if(xt)if(ye.opaque)E.splice(Rt,Ee-Rt,Ue,"overlay "+xt),Ee=Rt+2;else for(;Rt<Ee;Rt+=2){var dn=E[Rt+1];E[Rt+1]=(dn?dn+" ":"")+"overlay "+xt}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)oe(ue);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function kn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Un(a,xe(y)),E=y.text.length>a.options.maxHighlightLength&&Fn(a.doc.mode,b.state),ee=Dn(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 Un(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new un(b,!0,y);var ee=br(a,y,x),re=ee>b.first&&qe(b,ee-1).stateAfter,oe=re?un.fromSaved(b,re,ee):new un(b,tr(b.mode),ee);return b.iter(ee,y,function(ue){qn(a,ue.text,oe);var ce=oe.line;ue.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 qn(a,y,x,b){var E=a.doc.mode,ee=new Mt(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=On(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]=On(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 yr(a,y,x,b){var E=a.doc,ee=E.mode,re;y=ut(E,y);var oe=qe(E,y.line),ue=Un(a,y.line,x),ce=new Mt(oe.text,a.options.tabSize,ue),ye;for(b&&(ye=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=or(ee,ce,ue.state),b&&ye.push(new Kn(ce,re,Fn(E.mode,ue.state)));return b?ye:new Kn(ce,re,ue.state)}function Fr(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 ur(a,y,x,b,E,ee,re){var oe=x.flattenSpans;oe==null&&(oe=a.options.flattenSpans);var ue=0,ce=null,ye=new Mt(y,a.options.tabSize,b),Ee,Je=a.options.addModeClass&&[null];for(y==""&&Fr(Jn(x,b.state),ee);!ye.eol();){if(ye.pos>a.options.maxHighlightLength?(oe=!1,re&&qn(a,y,b,ye.pos),ye.pos=y.length,Ee=null):Ee=Fr(or(x,ye,b.state,Je),ee),Je){var Ue=Je[0].name;Ue&&(Ee="m-"+(Ee?Ue+" "+Ee:Ue))}if(!oe||ce!=Ee){for(;ue<ye.start;)ue=Math.min(ye.start,ue+5e3),E(ue,ce);ce=Ee}ye.start=ye.pos}for(;ue<ye.pos;){var xt=Math.min(ye.pos,ue+5e3);E(xt,ce),ue=xt}}function br(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 ue=qe(ee,oe-1),ce=ue.stateAfter;if(ce&&(!x||oe+(ce instanceof sn?ce.lookAhead:0)<=ee.modeFrontier))return oe;var ye=ve(ue.text,null,a.options.tabSize);(E==null||b>ye)&&(E=oe-1,b=ye)}return E}function Sr(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=qe(a,b).stateAfter;if(E&&(!(E instanceof sn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var cr=!1,$n=!1;function Er(){cr=!0}function dr(){$n=!0}function hr(a,y,x){this.marker=a,this.from=y,this.to=x}function mr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Tr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function vr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function lr(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 ue=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new hr(re,ee.from,ue?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 ue=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new hr(re,ue?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function fr(a,y){if(y.full)return null;var x=At(a,y.from.line)&&qe(a,y.from.line).markedSpans,b=At(a,y.to.line)&&qe(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=pt(y.from,y.to)==0,oe=lr(x,E,re),ue=nr(b,ee,re),ce=y.text.length==1,ye=We(y.text).length+(ce?E:0);if(oe)for(var Ee=0;Ee<oe.length;++Ee){var Je=oe[Ee];if(Je.to==null){var Ue=mr(ue,Je.marker);Ue?ce&&(Je.to=Ue.to==null?null:Ue.to+ye):Je.to=E}}if(ue)for(var xt=0;xt<ue.length;++xt){var Rt=ue[xt];if(Rt.to!=null&&(Rt.to+=ye),Rt.from==null){var en=mr(oe,Rt.marker);en||(Rt.from=ye,ce&&(oe||(oe=[])).push(Rt))}else Rt.from+=ye,ce&&(oe||(oe=[])).push(Rt)}oe&&(oe=zr(oe)),ue&&ue!=oe&&(ue=zr(ue));var dn=[oe];if(!ce){var bn=y.text.length-2,hn;if(bn>0&&oe)for(var Sn=0;Sn<oe.length;++Sn)oe[Sn].to==null&&(hn||(hn=[])).push(new hr(oe[Sn].marker,null,null));for(var Zn=0;Zn<bn;++Zn)dn.push(hn);dn.push(ue)}return dn}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 Pr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Ue){if(Ue.markedSpans)for(var xt=0;xt<Ue.markedSpans.length;++xt){var Rt=Ue.markedSpans[xt].marker;Rt.readOnly&&(!b||st(b,Rt)==-1)&&(b||(b=[])).push(Rt)}}),!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),ue=0;ue<E.length;++ue){var ce=E[ue];if(!(pt(ce.to,oe.from)<0||pt(ce.from,oe.to)>0)){var ye=[ue,1],Ee=pt(ce.from,oe.from),Je=pt(ce.to,oe.to);(Ee<0||!re.inclusiveLeft&&!Ee)&&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),ue+=ye.length-3}}return E}function kr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Xr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Lr(a){return a.inclusiveLeft?-1:0}function Ir(a){return a.inclusiveRight?1:0}function Cr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=pt(b.from,E.from)||Lr(a)-Lr(y);if(ee)return-ee;var re=pt(b.to,E.to)||Ir(a)-Ir(y);return re||y.id-a.id}function xr(a,y){var x=$n&&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||Cr(b,E.marker)<0)&&(b=E.marker);return b}function Vn(a){return xr(a,!0)}function Ot(a){return xr(a,!1)}function Jt(a,y){var x=$n&&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||Cr(b,ee.marker)<0)&&(b=ee.marker)}return b}function bt(a,y,x,b,E){var ee=qe(a,y),re=$n&&ee.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var ue=re[oe];if(ue.marker.collapsed){var ce=ue.marker.find(0),ye=pt(ce.from,x)||Lr(ue.marker)-Lr(E),Ee=pt(ce.to,b)||Ir(ue.marker)-Ir(E);if(!(ye>=0&&Ee<=0||ye<=0&&Ee>=0)&&(ye<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?pt(ce.to,x)>=0:pt(ce.to,x)>0)||ye>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?pt(ce.from,b)<=0:pt(ce.from,b)<0)))return!0}}}function ot(a){for(var y;y=Vn(a);)a=y.find(-1,!0).line;return a}function It(a){for(var y;y=Ot(a);)a=y.find(1,!0).line;return a}function qt(a){for(var y,x;y=Ot(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Bn(a,y){var x=qe(a,y),b=ot(x);return x==b?y:xe(b)}function Nn(a,y){if(y>a.lastLine())return y;var x=qe(a,y),b;if(!rr(a,x))return y;for(;b=Ot(x);)x=b.find(1,!0).line;return xe(x)+1}function rr(a,y){var x=$n&&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&&sr(a,y,b))return!0}}}function sr(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return sr(a,b.line,mr(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)&&sr(a,y,E))return!0}function ir(a){a=ot(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 Dr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Vn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Ot(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 gr(a){var y=a.display,x=a.doc;y.maxLine=qe(x,x.first),y.maxLineLength=Dr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Dr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Hr=function(a,y,x){this.text=a,Xr(this,y),this.height=x?x(this):1};Hr.prototype.lineNo=function(){return xe(this)},vt(Hr);function Di(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),kr(a),Xr(a,x);var E=b?b(a):1;E!=a.height&&_n(a,E)}function ai(a){a.parent=null,kr(a)}var jr={},ui={};function Mr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?ui:jr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function fi(a,y){var x=ct("span",null,null,_e?"padding-right: .1px":null),b={pre:ct("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=Br,yn(a.display.measure)&&(re=cn(ee,a.doc.direction))&&(b.addToken=pi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&xe(ee);bi(ee,b,kn(a,ee,oe)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=yt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=yt(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(_e){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return nt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=yt(b.pre.className,b.textClass||"")),b}function Ti(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 Br(a,y,x,b,E,ee,re){if(y){var oe=a.splitSpaces?yi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,ce=!1,ye;if(!ue.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 Ee=0;;){ue.lastIndex=Ee;var Je=ue.exec(y),Ue=Je?Je.index-Ee:y.length-Ee;if(Ue){var xt=document.createTextNode(oe.slice(Ee,Ee+Ue));me&&ge<9?ye.appendChild(Ne("span",[xt])):ye.appendChild(xt),a.map.push(a.pos,a.pos+Ue,xt),a.col+=Ue,a.pos+=Ue}if(!Je)break;Ee+=Ue+1;var Rt=void 0;if(Je[0]==" "){var en=a.cm.options.tabSize,dn=en-a.col%en;Rt=ye.appendChild(Ne("span",Tt(dn),"cm-tab")),Rt.setAttribute("role","presentation"),Rt.setAttribute("cm-text"," "),a.col+=dn}else Je[0]=="\r"||Je[0]==`
`?(Rt=ye.appendChild(Ne("span",Je[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Rt.setAttribute("cm-text",Je[0]),a.col+=1):(Rt=a.cm.options.specialCharPlaceholder(Je[0]),Rt.setAttribute("cm-text",Je[0]),me&&ge<9?ye.appendChild(Ne("span",[Rt])):ye.appendChild(Rt),a.col+=1);a.map.push(a.pos,a.pos+1,Rt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||ce||ee||re){var bn=x||"";b&&(bn+=b),E&&(bn+=E);var hn=Ne("span",[ye],bn,ee);if(re)for(var Sn in re)re.hasOwnProperty(Sn)&&Sn!="style"&&Sn!="class"&&hn.setAttribute(Sn,re[Sn]);return a.content.appendChild(hn)}a.content.appendChild(ye)}}function yi(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 pi(a,y){return function(x,b,E,ee,re,oe,ue){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,ye=ce+b.length;;){for(var Ee=void 0,Je=0;Je<y.length&&(Ee=y[Je],!(Ee.to>ce&&Ee.from<=ce));Je++);if(Ee.to>=ye)return a(x,b,E,ee,re,oe,ue);a(x,b.slice(0,Ee.to-ce),E,ee,null,oe,ue),ee=null,b=b.slice(Ee.to-ce),ce=Ee.to}}}function Hi(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 bi(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]),Mr(x[re+1],y.cm.options));return}for(var oe=E.length,ue=0,ce=1,ye="",Ee,Je,Ue=0,xt,Rt,en,dn,bn;;){if(Ue==ue){xt=Rt=en=Je="",bn=null,dn=null,Ue=1/0;for(var hn=[],Sn=void 0,Zn=0;Zn<b.length;++Zn){var Tn=b[Zn],ar=Tn.marker;if(ar.type=="bookmark"&&Tn.from==ue&&ar.widgetNode)hn.push(ar);else if(Tn.from<=ue&&(Tn.to==null||Tn.to>ue||ar.collapsed&&Tn.to==ue&&Tn.from==ue)){if(Tn.to!=null&&Tn.to!=ue&&Ue>Tn.to&&(Ue=Tn.to,Rt=""),ar.className&&(xt+=" "+ar.className),ar.css&&(Je=(Je?Je+";":"")+ar.css),ar.startStyle&&Tn.from==ue&&(en+=" "+ar.startStyle),ar.endStyle&&Tn.to==Ue&&(Sn||(Sn=[])).push(ar.endStyle,Tn.to),ar.title&&((bn||(bn={})).title=ar.title),ar.attributes)for(var _r in ar.attributes)(bn||(bn={}))[_r]=ar.attributes[_r];ar.collapsed&&(!dn||Cr(dn.marker,ar)<0)&&(dn=Tn)}else Tn.from>ue&&Ue>Tn.from&&(Ue=Tn.from)}if(Sn)for(var ri=0;ri<Sn.length;ri+=2)Sn[ri+1]==Ue&&(Rt+=" "+Sn[ri]);if(!dn||dn.from==ue)for(var Zr=0;Zr<hn.length;++Zr)Hi(y,0,hn[Zr]);if(dn&&(dn.from||0)==ue){if(Hi(y,(dn.to==null?oe+1:dn.to)-ue,dn.marker,dn.from==null),dn.to==null)return;dn.to==ue&&(dn=!1)}}if(ue>=oe)break;for(var Mi=Math.min(oe,Ue);;){if(ye){var Si=ue+ye.length;if(!dn){var Qr=Si>Mi?ye.slice(0,Mi-ue):ye;y.addToken(y,Qr,Ee?Ee+xt:xt,en,ue+Qr.length==Ue?Rt:"",Je,bn)}if(Si>=Mi){ye=ye.slice(Mi-ue),ue=Mi;break}ue=Si,en=""}ye=E.slice(ee,ee=x[ce++]),Ee=Mr(x[ce++],y.cm.options)}}}function Wi(a,y,x){this.line=y,this.rest=qt(y),this.size=this.rest?xe(We(this.rest))-x+1:1,this.node=this.text=null,this.hidden=rr(a,y)}function Rr(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new Wi(a.doc,qe(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var Pi=null;function $i(a){Pi?Pi.ops.push(a):a.ownsGroup=Pi={ops:[a],delayedCallbacks:[]}}function ea(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 ja(a,y){var x=a.ownsGroup;if(x)try{ea(x)}finally{Pi=null,y(x)}}var Yi=null;function Gr(a,y){var x=Cn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Pi?E=Pi.delayedCallbacks:Yi?E=Yi:(E=Yi=[],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=Yi;Yi=null;for(var y=0;y<a.length;++y)a[y]()}function oa(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?la(a,y):ee=="gutter"?Qn(a,y,x,b):ee=="class"?Hn(a,y):ee=="widget"&&jn(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 Jr(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 ya(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):fi(a,y)}function la(a,y){var x=y.text.className,b=ya(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,Hn(a,y)):x&&(y.text.className=x)}function Hn(a,y){Jr(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 Qn(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",ft(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=a.display.gutterSpecs[ue].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 jn(a,y,x){y.alignable&&(y.alignable=null);for(var b=Ze("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);wr(a,y,x)}function Yn(a,y,x,b){var E=ya(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Hn(a,y),Qn(a,y,x,b),wr(a,y,b),y.node}function wr(a,y,x){if(Nr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Nr(a,y.rest[b],y,x,!1)}function Nr(a,y,x,b,E){if(y.widgets)for(var ee=zi(x),re=0,oe=y.widgets;re<oe.length;++re){var ue=oe[re],ce=Ne("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Zi(ue,ce,x,b),a.display.input.setUneditable(ce),E&&ue.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Gr(ue,"redraw")}}function Zi(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 vi(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;"),ze(y.display.measure,Ne("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function oi(a,y){for(var x=En(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 Ur(a){return a.lineSpace.offsetTop}function Ri(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Xi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=ze(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 Bi(a){return Zt-a.display.nativeBarWidth}function Ji(a){return a.display.scroller.clientWidth-Bi(a)-a.display.barWidth}function na(a){return a.display.scroller.clientHeight-Bi(a)-a.display.barHeight}function Gi(a,y,x){var b=a.options.lineWrapping,E=b&&Ji(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 ue=re[oe],ce=re[oe+1];Math.abs(ue.bottom-ce.bottom)>2&&ee.push((ue.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Aa(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=ot(y);var x=xe(y),b=a.display.externalMeasured=new Wi(a.doc,y,x);b.lineN=x;var E=b.built=fi(a,b);return b.text=E.pre,ze(a.display.lineMeasure,E.pre),b}function yo(a,y,x,b){return Ni(a,sa(a,y),x,b)}function Qi(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[xa(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function sa(a,y){var x=xe(y),b=Qi(a,x);b&&!b.text?b=null:b&&b.changes&&(oa(a,b,x,ua(a)),a.curOp.forceUpdate=!0),b||(b=Vo(a,y));var E=Aa(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Ni(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||(Gi(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,ue,ce=0;ce<a.length;ce+=3)if(oe=a[ce],ue=a[ce+1],y<oe?(E=0,ee=1,re="left"):y<ue?(E=y-oe,ee=E+1):(ce==a.length-3||y==ue&&a[ce+3]>y)&&(ee=ue-oe,E=ee-1,y>=ue&&(re="right")),E!=null){if(b=a[ce+2],oe==ue&&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==ue-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:ue}}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,ue=E.collapse,ce;if(ee.nodeType==3){for(var ye=0;ye<4;ye++){for(;re&&Qe(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe<E.coverEnd&&Qe(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(Fe(ee,re,oe).getClientRects(),b),ce.left||ce.right||re==0)break;oe=re,re=re-1,ue="right"}me&&ge<11&&(ce=Uo(a.display.measure,ce))}else{re>0&&(ue=b="right");var Ee;a.options.lineWrapping&&(Ee=ee.getClientRects()).length>1?ce=Ee[b=="right"?Ee.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+ji(a.display),top:Je.top,bottom:Je.bottom}:ce=bo}for(var Ue=ce.top-y.rect.top,xt=ce.bottom-y.rect.top,Rt=(Ue+xt)/2,en=y.view.measure.heights,dn=0;dn<en.length-1&&!(Rt<en[dn]);dn++);var bn=dn?en[dn-1]:0,hn=en[dn],Sn={left:(ue=="right"?ce.right:ce.left)-y.rect.left,right:(ue=="left"?ce.left:ce.right)-y.rect.left,top:bn,bottom:hn};return!ce.left&&!ce.right&&(Sn.bogus=!0),a.options.singleCursorHeightPerLine||(Sn.rtop=Ue,Sn.rbottom=xt),Sn}function Uo(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kt(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,wt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ua(a.display.view[y])}function ba(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&&Be?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wo(){return Ce&&Be?-(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+=vi(a.widgets[x]));return y}function Fa(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=ir(y);if(b=="local"?re+=Ur(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var oe=a.display.lineSpace.getBoundingClientRect();re+=oe.top+(b=="window"?0:wo());var ue=oe.left+(b=="window"?0:Ya());x.left+=ue,x.right+=ue}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 La(a,y,x,b,E){return b||(b=qe(a.doc,y.line)),Fa(a,b,yo(a,b,y.ch,E),x)}function Ci(a,y,x,b,E,ee){b=b||qe(a.doc,y.line),E||(E=sa(a,b));function re(xt,Rt){var en=Ni(a,E,xt,Rt?"right":"left",ee);return Rt?en.left=en.right:en.right=en.left,Fa(a,b,en,x)}var oe=cn(b,a.doc.direction),ue=y.ch,ce=y.sticky;if(ue>=b.text.length?(ue=b.text.length,ce="before"):ue<=0&&(ue=0,ce="after"),!oe)return re(ce=="before"?ue-1:ue,ce=="before");function ye(xt,Rt,en){var dn=oe[Rt],bn=dn.level==1;return re(en?xt-1:xt,bn!=en)}var Ee=on(oe,ue,ce),Je=Dt,Ue=ye(ue,Ee,ce=="before");return Je!=null&&(Ue.other=ye(ue,Je,ce!="before")),Ue}function pr(a,y){var x=0;y=ut(a.doc,y),a.options.lineWrapping||(x=ji(a.display)*y.ch);var b=qe(a.doc,y.line),E=ir(b)+Ur(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function er(a,y,x,b,E){var ee=Te(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function li(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return er(b.first,0,null,-1,-1);var E=De(b,x),ee=b.first+b.size-1;if(E>ee)return er(b.first+b.size-1,qe(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=qe(b,E);;){var oe=Vi(a,re,E,y,x),ue=Jt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ue)return oe;var ce=ue.find(1);if(ce.line==E)return ce;re=qe(b,E=ce.line)}}function ci(a,y,x,b){b-=Xa(y);var E=y.text.length,ee=Ft(function(re){return Ni(a,x,re-1).bottom<=b},E,0);return E=Ft(function(re){return Ni(a,x,re).top>b},ee,E),{begin:ee,end:E}}function Kr(a,y,x,b){x||(x=sa(a,y));var E=Fa(a,y,Ni(a,x,b),"line").top;return ci(a,y,x,E)}function $r(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=ir(y);var ee=sa(a,y),re=Xa(y),oe=0,ue=y.text.length,ce=!0,ye=cn(y,a.doc.direction);if(ye){var Ee=(a.options.lineWrapping?ra:_i)(a,y,x,ee,ye,b,E);ce=Ee.level!=1,oe=ce?Ee.from:Ee.to-1,ue=ce?Ee.to:Ee.from-1}var Je=null,Ue=null,xt=Ft(function(Zn){var Tn=Ni(a,ee,Zn);return Tn.top+=re,Tn.bottom+=re,$r(Tn,b,E,!1)?(Tn.top<=E&&Tn.left<=b&&(Je=Zn,Ue=Tn),!0):!1},oe,ue),Rt,en,dn=!1;if(Ue){var bn=b-Ue.left<Ue.right-b,hn=bn==ce;xt=Je+(hn?0:1),en=hn?"after":"before",Rt=bn?Ue.left:Ue.right}else{!ce&&(xt==ue||xt==oe)&&xt++,en=xt==0?"after":xt==y.text.length?"before":Ni(a,ee,xt-(ce?1:0)).bottom+re<=E==ce?"after":"before";var Sn=Ci(a,Te(x,xt,en),"line",y,ee);Rt=Sn.left,dn=E<Sn.top?-1:E>=Sn.bottom?1:0}return xt=Wt(y.text,xt,1),er(x,xt,en,dn,b-Rt)}function _i(a,y,x,b,E,ee,re){var oe=Ft(function(Ee){var Je=E[Ee],Ue=Je.level!=1;return $r(Ci(a,Te(x,Ue?Je.to:Je.from,Ue?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),ue=E[oe];if(oe>0){var ce=ue.level!=1,ye=Ci(a,Te(x,ce?ue.from:ue.to,ce?"after":"before"),"line",y,b);$r(ye,ee,re,!0)&&ye.top>re&&(ue=E[oe-1])}return ue}function ra(a,y,x,b,E,ee,re){var oe=ci(a,y,b,re),ue=oe.begin,ce=oe.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var ye=null,Ee=null,Je=0;Je<E.length;Je++){var Ue=E[Je];if(!(Ue.from>=ce||Ue.to<=ue)){var xt=Ue.level!=1,Rt=Ni(a,b,xt?Math.min(ce,Ue.to)-1:Math.max(ue,Ue.from)).right,en=Rt<ee?ee-Rt+1e9:Rt-ee;(!ye||Ee>en)&&(ye=Ue,Ee=en)}}return ye||(ye=E[E.length-1]),ye.from<ue&&(ye={from:ue,to:ye.to,level:ye.level}),ye.to>ce&&(ye={from:ye.from,to:ce,level:ye.level}),ye}var Ai;function Fi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ai==null){Ai=Ne("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ai.appendChild(document.createTextNode("x")),Ai.appendChild(Ne("br"));Ai.appendChild(document.createTextNode("x"))}ze(a.measure,Ai);var x=Ai.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),wt(a.measure),x||1}function ji(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ne("span","xxxxxxxxxx"),x=Ne("pre",[y],"CodeMirror-line-like");ze(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function ua(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=Fi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/ji(a.display)-3);return function(E){if(rr(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&&_n(b,E)})}function Ca(a,y,x,b){var E=a.display;if(!x&&En(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(Ee){return null}var ue=li(a,ee,re),ce;if(b&&ue.xRel>0&&(ce=qe(a.doc,ue.line).text).length==ue.ch){var ye=ve(ce,ce.length,a.options.tabSize)-ce.length;ue=Te(ue.line,Math.max(0,Math.round((ee-Xi(a.display).left)/ji(a.display))-ye))}return ue}function xa(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 xi(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)$n&&Bn(a.doc,y)<E.viewTo&&da(a);else if(x<=E.viewFrom)$n&&Nn(a.doc,x+b)>E.viewFrom?da(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)da(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):da(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):da(a)}else{var oe=Eo(a,y,y,-1),ue=Eo(a,x,x+b,1);oe&&ue?(E.view=E.view.slice(0,oe.index).concat(Rr(a,oe.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):da(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function ca(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[xa(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);st(re,x)==-1&&re.push(x)}}}function da(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=xa(a,y),ee,re=a.display.view;if(!$n||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,ue=0;ue<E;ue++)oe+=re[ue].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(;Bn(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=Rr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Rr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(xa(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(Rr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,xa(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 ue=oe.empty();(ue||a.options.showCursorWhenSelecting)&&El(a,oe.head,E),ue||Ws(a,oe,ee)}}return b}function El(a,y,x){var b=Ci(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=Xi(a.display),oe=re.left,ue=Math.max(b.sizerWidth,Ji(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function ye(hn,Sn,Zn,Tn){Sn<0&&(Sn=0),Sn=Math.round(Sn),Tn=Math.round(Tn),ee.appendChild(Ne("div",null,"CodeMirror-selected","position: absolute; left: "+hn+`px;
top: `+Sn+"px; width: "+(Zn==null?ue-hn:Zn)+`px;
height: `+(Tn-Sn)+"px"))}function Ee(hn,Sn,Zn){var Tn=qe(E,hn),ar=Tn.text.length,_r,ri;function Zr(Qr,Ei){return La(a,Te(hn,Qr),"div",Tn,Ei)}function Mi(Qr,Ei,si){var ei=Kr(a,Tn,null,Qr),qr=Ei=="ltr"==(si=="after")?"left":"right",Vr=si=="after"?ei.begin:ei.end-(/\s/.test(Tn.text.charAt(ei.end-1))?2:1);return Zr(Vr,qr)[qr]}var Si=cn(Tn,E.direction);return Ct(Si,Sn||0,Zn==null?ar:Zn,function(Qr,Ei,si,ei){var qr=si=="ltr",Vr=Zr(Qr,qr?"left":"right"),ki=Zr(Ei-1,qr?"right":"left"),Ga=Sn==null&&Qr==0,ga=Zn==null&&Ei==ar,hi=ei==0,qi=!Si||ei==Si.length-1;if(ki.top-Vr.top<=3){var ii=(ce?Ga:ga)&&hi,bl=(ce?ga:Ga)&&qi,aa=ii?oe:(qr?Vr:ki).left,Da=bl?ue:(qr?ki:Vr).right;ye(aa,Vr.top,Da-aa,Vr.bottom)}else{var Ba,gi,Va,Cl;qr?(Ba=ce&&Ga&&hi?oe:Vr.left,gi=ce?ue:Mi(Qr,si,"before"),Va=ce?oe:Mi(Ei,si,"after"),Cl=ce&&ga&&qi?ue:ki.right):(Ba=ce?Mi(Qr,si,"before"):oe,gi=!ce&&Ga&&hi?ue:Vr.right,Va=!ce&&ga&&qi?oe:ki.left,Cl=ce?Mi(Ei,si,"after"):ue),ye(Ba,Vr.top,gi-Ba,Vr.bottom),Vr.bottom<ki.top&&ye(oe,Vr.bottom,null,ki.top),ye(Va,ki.top,Cl-Va,ki.bottom)}(!_r||ko(Vr,_r)<0)&&(_r=Vr),ko(ki,_r)<0&&(_r=ki),(!ri||ko(Vr,ri)<0)&&(ri=Vr),ko(ki,ri)<0&&(ri=ki)}),{start:_r,end:ri}}var Je=y.from(),Ue=y.to();if(Je.line==Ue.line)Ee(Je.line,Je.ch,Ue.ch);else{var xt=qe(E,Je.line),Rt=qe(E,Ue.line),en=ot(xt)==ot(Rt),dn=Ee(Je.line,Je.ch,en?xt.text.length+1:null).end,bn=Ee(Ue.line,en?0:null,Ue.ch).start;en&&(dn.top<bn.top-2?(ye(dn.right,dn.top,null,dn.bottom),ye(oe,bn.top,bn.left,bn.bottom)):ye(dn.right,dn.top,bn.left-dn.right,dn.bottom)),dn.bottom<bn.top&&ye(oe,dn.bottom,null,bn.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()||Ma(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,Ma(a))},100)}function Jo(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(nt(a,"focus",a,y),a.state.focused=!0,Ve(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),_e&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xo(a))}function Ma(a,y){a.state.delayingBlurEvent||(a.state.focused&&(nt(a,"blur",a,y),a.state.focused=!1,je(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 ue=E.node.offsetTop+E.node.offsetHeight;re=ue-x,x=ue}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)&&(_n(E.line,re),Bl(E.line),E.rest))for(var Ee=0;Ee<E.rest.length;Ee++)Bl(E.rest[Ee]);if(oe>a.display.sizerWidth){var Je=Math.ceil(oe/ji(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-Ur(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,ue=x.ensure.to.line;oe<ee?(ee=oe,re=De(y,ir(qe(y,oe))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=re&&(ee=De(y,ir(qe(y,ue))-a.wrapper.clientHeight),re=ue)}return{from:ee,to:Math.max(re,ee+1)}}function zs(a,y){if(!we(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-Ur(a.display))+`px;
height: `+(y.bottom-y.top+Bi(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?Te(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Te(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,oe=Ci(a,y),ue=!x||x==y?oe:Ci(a,x);E={left:Math.min(oe.left,ue.left),top:Math.min(oe.top,ue.top)-b,right:Math.max(oe.left,ue.left),bottom:Math.max(oe.bottom,ue.bottom)+b};var ce=Qo(a,E),ye=a.doc.scrollTop,Ee=a.doc.scrollLeft;if(ce.scrollTop!=null&&(qa(a,ce.scrollTop),Math.abs(a.doc.scrollTop-ye)>1&&(re=!0)),ce.scrollLeft!=null&&(wa(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-Ee)>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&&wa(a,x.scrollLeft)}function Qo(a,y){var x=a.display,b=Fi(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+Ri(x),ue=y.top<b,ce=y.bottom>oe-b;if(y.top<E)re.scrollTop=ue?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 Ee=a.options.fixedGutter?0:x.gutters.offsetWidth,Je=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Ee,Ue=Ji(a)-x.gutters.offsetWidth,xt=y.right-y.left>Ue;return xt&&(y.right=y.left+Ue),y.left<10?re.scrollLeft=0:y.left<Je?re.scrollLeft=Math.max(0,y.left+Ee-(xt?0:10)):y.right>Ue+Je-3&&(re.scrollLeft=y.right+(xt?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 Ta(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=pr(a,y.from),b=pr(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 wa(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+Ri(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+Bi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Sa=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),zt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),zt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ge<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sa.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}},Sa.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sa.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sa.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},Sa.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)},Sa.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 Pa(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:Sa,null:eo};function Tl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&je(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),zt(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"?wa(a,y):qa(a,y)},a),a.display.scrollbars.addClass&&Ve(a.display.wrapper,a.display.scrollbars.addClass)}var js=0;function Ea(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},$i(a.curOp)}function ka(a){var y=a.curOp;y&&ja(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&&gr(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+Bi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Ji(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&&wa(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Se();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Pa(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&&wa(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,ut(b,a.scrollToPos.from),ut(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||nt(ee[oe],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&nt(re[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&nt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Li(a,y){if(a.curOp)return y();Ea(a);try{return y()}finally{ka(a)}}function ti(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Ea(a);try{return y.apply(a,arguments)}finally{ka(a)}}}function mi(a){return function(){if(this.curOp)return a.apply(this,arguments);Ea(this);try{return a.apply(this,arguments)}finally{ka(this)}}}function ni(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Ea(y);try{return a.apply(this,arguments)}finally{ka(y)}}}function to(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Qt(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Un(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?Fn(y.mode,b.state):null,ue=Dn(a,ee,b,!0);oe&&(b.state=oe),ee.styles=ue.styles;var ce=ee.styleClasses,ye=ue.classes;ye?ee.styleClasses=ye:ce&&(ee.styleClasses=null);for(var Ee=!re||re.length!=ee.styles.length||ce!=ye&&(!ce||!ye||ce.bgClass!=ye.bgClass||ce.textClass!=ye.textClass),Je=0;!Ee&&Je<re.length;++Je)Ee=re[Je]!=ee.styles[Je];Ee&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&qn(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&&Li(a,function(){for(var ee=0;ee<E.length;ee++)ca(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=Ji(a),this.force=x,this.dims=ua(a),this.events=[]};Fo.prototype.signal=function(a,y){dt(a,y)&&this.events.push(arguments)},Fo.prototype.finish=function(){for(var a=0;a<this.events.length;a++)nt.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=Bi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Bi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Se();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==Se())&&(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 da(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)&&(da(a),y.dims=ua(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)),$n&&(ee=Bn(a.doc,ee),re=Nn(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=ir(qe(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=wl(a);if(!oe&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),wt(x.cursorDiv),wt(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==Ji(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Ri(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),Pa(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),Pa(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(xt){var Rt=xt.nextSibling;return _e&&ke&&a.display.currentWheelTarget==xt?xt.style.display="none":xt.parentNode.removeChild(xt),Rt}for(var ue=b.view,ce=b.viewFrom,ye=0;ye<ue.length;ye++){var Ee=ue[ye];if(!Ee.hidden)if(!Ee.node||Ee.node.parentNode!=ee){var Je=Yn(a,Ee,ce,x);ee.insertBefore(Je,re)}else{for(;re!=Ee.node;)re=oe(re);var Ue=E&&y!=null&&y<=ce&&Ee.lineNumber;Ee.changes&&(st(Ee.changes,"gutter")>-1&&(Ue=!1),oa(a,Ee,ce,x)),Ue&&(wt(Ee.lineNumber),Ee.lineNumber.appendChild(document.createTextNode(ft(a.options,ce)))),re=Ee.node.nextSibling}ce+=Ee.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+Bi(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 ue=0;ue<oe.length;ue++)oe[ue].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=ft(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;wt(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),xi(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=ct("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=ct("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=ct("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: "+Zt+"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),!_e&&!(le&&Le)&&(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,ue=re.scrollHeight>re.clientHeight;if(b&&oe||E&&ue){if(E&&ke&&_e){e:for(var ce=y.target,ye=ee.view;ce!=re;ce=ce.parentNode)for(var Ee=0;Ee<ye.length;Ee++)if(ye[Ee].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!le&&!he&&Oi!=null){E&&ue&&qa(a,Math.max(0,re.scrollTop+E*Oi)),wa(a,Math.max(0,re.scrollLeft+b*Oi)),(!E||E&&ue)&&kt(y),ee.wheelStartX=null;return}if(E&&Oi!=null){var Je=E*Oi,Ue=a.doc.scrollTop,xt=Ue+ee.wrapper.clientHeight;Je<0?Ue=Math.max(0,Ue+Je-50):xt=Math.min(a.doc.height,xt+Je+50),el(a,{top:Ue,bottom:xt})}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 Rt=re.scrollLeft-ee.wheelStartX,en=re.scrollTop-ee.wheelStartY,dn=en&&ee.wheelDY&&en/ee.wheelDY||Rt&&ee.wheelDX&&Rt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,dn&&(Oi=(Oi*Lo+dn)/(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(!Gt(x.anchor,b.anchor)||!Gt(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 Ar(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(pt(y,b.from())>=0&&pt(a,b.to())<=0)return x}return-1};var Ar=function(a,y){this.anchor=a,this.head=y};Ar.prototype.from=function(){return He(this.anchor,this.head)},Ar.prototype.to=function(){return fn(this.anchor,this.head)},Ar.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ui(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Je,Ue){return pt(Je.from(),Ue.from())}),x=st(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],oe=y[ee-1],ue=pt(oe.to(),re.from());if(b&&!re.empty()?ue>0:ue>=0){var ce=He(oe.from(),re.from()),ye=fn(oe.to(),re.to()),Ee=oe.empty()?re.from()==re.head:oe.from()==oe.head;ee<=x&&--x,y.splice(--ee,2,new Ar(Ee?ye:ce,Ee?ce:ye))}}return new Ii(y,x)}function ha(a,y){return new Ii([new Ar(a,y||a)],0)}function fa(a){return a.text?Te(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(pt(a,y.from)<0)return a;if(pt(a,y.to)<=0)return fa(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+=fa(y).ch-y.to.ch),Te(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 Ar(Hl(E.anchor,y),Hl(E.head,y)))}return Ui(a.cm,x,a.sel.primIndex)}function Wl(a,y,x){return a.line==y.line?Te(x.line,a.ch-y.ch+x.ch):Te(x.line+(a.line-y.line),a.ch)}function au(a,y,x){for(var b=[],E=Te(a.first,0),ee=E,re=0;re<y.length;re++){var oe=y[re],ue=Wl(oe.from,E,ee),ce=Wl(fa(oe),E,ee);if(E=oe.to,ee=ce,x=="around"){var ye=a.sel.ranges[re],Ee=pt(ye.head,ye.anchor)<0;b[re]=new Ar(Ee?ce:ue,Ee?ue:ce)}else b[re]=new Ar(ue,ue)}return new Ii(b,a.sel.primIndex)}function al(a){a.doc.mode=mn(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&&xi(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(bn){return x?x[bn]:null}function ee(bn,hn,Sn){Di(bn,hn,Sn,b),Gr(bn,"change",bn,y)}function re(bn,hn){for(var Sn=[],Zn=bn;Zn<hn;++Zn)Sn.push(new Hr(ce[Zn],E(Zn),b));return Sn}var oe=y.from,ue=y.to,ce=y.text,ye=qe(a,oe.line),Ee=qe(a,ue.line),Je=We(ce),Ue=E(ce.length-1),xt=ue.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 Rt=re(0,ce.length-1);ee(Ee,Ee.text,Ue),xt&&a.remove(oe.line,xt),Rt.length&&a.insert(oe.line,Rt)}else if(ye==Ee)if(ce.length==1)ee(ye,ye.text.slice(0,oe.ch)+Je+ye.text.slice(ue.ch),Ue);else{var en=re(1,ce.length-1);en.push(new Hr(Je+ye.text.slice(ue.ch),Ue,b)),ee(ye,ye.text.slice(0,oe.ch)+ce[0],E(0)),a.insert(oe.line+1,en)}else if(ce.length==1)ee(ye,ye.text.slice(0,oe.ch)+ce[0]+Ee.text.slice(ue.ch),E(0)),a.remove(oe.line+1,xt);else{ee(ye,ye.text.slice(0,oe.ch)+ce[0],E(0)),ee(Ee,Je+Ee.text.slice(ue.ch),Ue);var dn=re(1,ce.length-1);xt>1&&a.remove(oe.line+1,xt-1),a.insert(oe.line+1,dn)}Gr(a,"change",a,y)}function pa(a,y,x){function b(E,ee,re){if(E.linked)for(var oe=0;oe<E.linked.length;++oe){var ue=E.linked[oe];if(ue.doc!=ee){var ce=re&&ue.sharedHist;x&&!ce||(y(ue.doc,ce),b(ue.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||gr(a),a.options.mode=y.modeOption,xi(a)}function Gl(a){(a.doc.direction=="rtl"?Ve:je)(a.display.lineDiv,"CodeMirror-rtl")}function ou(a){Li(a,function(){Gl(a),xi(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:fa(y),text:rn(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),pa(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),pt(y.from,y.to)==0&&pt(y.from,oe.to)==0?oe.to=fa(y):re.changes.push(ll(a,y));else{var ue=We(E.done);for((!ue||!ue.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||nt(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=fr(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 ue=re[oe],ce=0;ce<ee.length;++ce)if(ee[ce].marker==ue.marker)continue e;ee.push(ue)}else re&&(x[E]=re)}return x}function Oa(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 ue=0;ue<re.length;++ue){var ce=re[ue],ye=void 0;if(oe.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var Ee in ce)(ye=Ee.match(/^spans_(\d+)$/))&&st(y,Number(ye[1]))>-1&&(We(oe)[Ee]=ce[Ee],delete ce[Ee])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=pt(y,E)<0;ee!=pt(x,E)<0?(E=y,y=x):ee!=pt(y,x)<0&&(y=x)}return new Ar(E,y)}else return new Ar(x||y,y)}function Po(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(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=Ui(a.cm,b,a.sel.primIndex);di(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,di(a,Ui(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){di(a,ha(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 Ar(ut(a,E[ee].anchor),ut(a,E[ee].head))},origin:x&&x.origin};return nt(a,"beforeSelectionChange",a,b),a.cm&&nt(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ui(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)):di(a,y,x)}function di(a,y,x){Oo(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Oo(a,y,x){(dt(a,"beforeSelectionChange")||a.cm&&dt(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(pt(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Ta(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,mt(a.cm)),Gr(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],ue=Io(a,re.anchor,oe&&oe.anchor,x,b),ce=Io(a,re.head,oe&&oe.head,x,b);(E||ue!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new Ar(ue,ce))}return E?Ui(a.cm,E,y.primIndex):y}function Ia(a,y,x,b,E){var ee=qe(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var oe=ee.markedSpans[re],ue=oe.marker,ce="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,ye="selectRight"in ue?!ue.selectRight:ue.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&&(nt(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(x){var Ee=ue.find(b<0?1:-1),Je=void 0;if((b<0?ye:ce)&&(Ee=es(a,Ee,-b,Ee&&Ee.line==y.line?ee:null)),Ee&&Ee.line==y.line&&(Je=pt(Ee,x))&&(b<0?Je<0:Je>0))return Ia(a,Ee,y,b,E)}var Ue=ue.find(b<0?-1:1);return(b<0?ce:ye)&&(Ue=es(a,Ue,b,Ue.line==y.line?ee:null)),Ue?Ia(a,Ue,y,b,E):null}}return y}function Io(a,y,x,b,E){var ee=b||1,re=Ia(a,y,x,ee,E)||!E&&Ia(a,y,x,ee,!0)||Ia(a,y,x,-ee,E)||!E&&Ia(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Te(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?ut(a,Te(y.line-1)):null:x>0&&y.ch==(b||qe(a,y.line)).text.length?y.line<a.first+a.size-1?Te(y.line+1,0):null:new Te(y.line,y.ch+x)}function ts(a){a.setSelection(Te(a.firstLine(),0),Te(a.lastLine()),Pe)}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=ut(a,E)),ee&&(b.to=ut(a,ee)),re&&(b.text=re),oe!==void 0&&(b.origin=oe)}),nt(a,"beforeChange",a,b),a.cm&&nt(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 Ra(a,y,x){if(a.cm){if(!a.cm.curOp)return ti(a.cm,Ra)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((dt(a,"beforeChange")||a.cm&&dt(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=cr&&!x&&Pr(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]==""&&pt(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,fr(a,y));var b=[];pa(a,function(E,ee){!ee&&st(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),io(E,y,null,fr(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,ue=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,ue),x&&!ee.equals(a.sel)){di(a,ee,{clearRedo:!1});return}re=ee}else if(b){oe.push(ee);return}else break;var ye=[];To(re,ue),ue.push({changes:ye,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var Ee=dt(a,"beforeChange")||a.cm&&dt(a.cm,"beforeChange"),Je=function(Rt){var en=ee.changes[Rt];if(en.origin=y,Ee&&!ns(a,en,!1))return oe.length=0,{};ye.push(ll(a,en));var dn=Rt?il(a,en):We(oe);io(a,en,dn,Kl(a,en)),!Rt&&a.cm&&a.cm.scrollIntoView({from:en.from,to:fa(en)});var bn=[];pa(a,function(hn,Sn){!Sn&&st(bn,hn.history)==-1&&(ls(hn.history,en),bn.push(hn.history)),io(hn,en,null,Kl(hn,en))})},Ue=ee.changes.length-1;Ue>=0;--Ue){var xt=Je(Ue);if(xt)return xt.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Ii(Et(a.sel.ranges,function(E){return new Ar(Te(E.anchor.line+y,E.anchor.ch),Te(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){xi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)ca(a.cm,b,"gutter")}}function io(a,y,x,b){if(a.cm&&!a.cm.curOp)return ti(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:Te(a.first,0),to:Te(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:Te(ee,qe(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=rn(a,y.from,y.to),x||(x=il(a,y)),a.cm?fu(a.cm,y,b):ol(a,y,b),Oo(a,x,Pe),a.cantEdit&&Io(a,Te(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,ue=ee.line;a.options.lineWrapping||(ue=xe(ot(qe(b,ee.line))),b.iter(ue,re.line+1,function(Ue){if(Ue==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&mt(a),ol(b,y,x,xl(a)),a.options.lineWrapping||(b.iter(ue,ee.line+y.text.length,function(Ue){var xt=Dr(Ue);xt>E.maxLineLength&&(E.maxLine=Ue,E.maxLineLength=xt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Sr(b,ee.line),to(a,400);var ce=y.text.length-(re.line-ee.line)-1;y.full?xi(a):ee.line==re.line&&y.text.length==1&&!zl(a.doc,y)?ca(a,ee.line,"text"):xi(a,ee.line,re.line+1,ce);var ye=dt(a,"changes"),Ee=dt(a,"change");if(Ee||ye){var Je={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};Ee&&Gr(a,"change",a,Je),ye&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Je)}a.display.selForContextMenu=null}function Na(a,y,x,b,E){var ee;b||(b=x),pt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Ra(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 ue=0;ue<ee.changes.length;++ue){var ce=ee.changes[ue];if(x<ce.from.line)ce.from=Te(ce.from.line+b,ce.from.ch),ce.to=Te(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=qe(a,Xt(a,y)):E=xe(y),E==null?null:(b(ee,E)&&a.cm&&ca(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,ai(E),Gr(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 ue=new oo(E.lines.slice(oe,oe+=25));E.height-=ue.height,this.children.splice(++b,0,ue),ue.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=st(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=vi(this);_n(x,Math.max(0,x.height-ee)),a&&(Li(a,function(){ss(a,x,-ee),ca(a,b,"widget")}),Gr(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=vi(this)-y;E&&(rr(this.doc,b)||_n(b,b.height+E),x&&Li(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Gr(x,"lineWidgetChanged",x,a,xe(b))}))},vt(so);function ss(a,y,x){ir(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&&!rr(a,re)){var ue=ir(re)<a.scrollTop;_n(re,re.height+vi(E)),ue&&qo(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Gr(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:xe(y)),E}var us=0,va=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};va.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Ea(a),dt(this,"clear")){var x=this.find();x&&Gr(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=mr(re.markedSpans,this);a&&!this.collapsed?ca(a,xe(re),"text"):a&&(oe.to!=null&&(E=xe(re)),oe.from!=null&&(b=xe(re))),re.markedSpans=Tr(re.markedSpans,oe),oe.from==null&&this.collapsed&&!rr(this.doc,re)&&a&&_n(re,Fi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ce=ot(this.lines[ue]),ye=Dr(ce);ye>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=ye,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&xi(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&&Gr(a,"markerCleared",a,this,b,E),y&&ka(a),this.parent&&this.parent.clear()}},va.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=mr(ee.markedSpans,this);if(re.from!=null&&(x=Te(y?ee:xe(ee),re.from),a==-1))return x;if(re.to!=null&&(b=Te(y?ee:xe(ee),re.to),a==1))return b}return x&&{from:x,to:b}},va.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Li(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,!rr(x.doc,E)&&x.height!=null){var oe=x.height;x.height=null;var ue=vi(x)-oe;ue&&_n(E,E.height+ue)}Gr(b,"markerChanged",b,a)})},va.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||st(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},va.prototype.detachLine=function(a){if(this.lines.splice(st(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},vt(va);function _a(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return ti(a.cm,_a)(a,y,x,b,E);var ee=new va(a,E),re=pt(y,x);if(b&&Ht(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=ct("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(bt(a,y.line,y,x,ee)||y.line!=x.line&&bt(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,ue=a.cm,ce;if(a.iter(oe,x.line+1,function(Ee){ue&&ee.collapsed&&!ue.options.lineWrapping&&ot(Ee)==ue.display.maxLine&&(ce=!0),ee.collapsed&&oe!=y.line&&_n(Ee,0),vr(Ee,new hr(ee,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),ee.collapsed&&a.iter(y.line,x.line+1,function(Ee){rr(a,Ee)&&_n(Ee,0)}),ee.clearOnEnter&&zt(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Er(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++us,ee.atomic=!0),ue){if(ce&&(ue.curOp.updateMaxLine=!0),ee.collapsed)xi(ue,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++)ca(ue,ye,"text");ee.atomic&&ql(ue.doc),Gr(ue,"markerAdded",ue,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();Gr(this,"clear")}},uo.prototype.find=function(a,y){return this.primary.find(a,y)},vt(uo);function vu(a,y,x,b,E){b=Ht(b),b.shared=!1;var ee=[_a(a,y,x,b,E)],re=ee[0],oe=b.widgetNode;return pa(a,function(ue){oe&&(b.widgetNode=oe.cloneNode(!0)),ee.push(_a(ue,ut(ue,y),ut(ue,x),b,E));for(var ce=0;ce<ue.linked.length;++ce)if(ue.linked[ce].isParent)return;re=We(ee)}),new uo(ee,re)}function cs(a){return a.findMarks(Te(a.first,0),a.clipPos(Te(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(pt(ee,re)){var oe=_a(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];pa(E.primary.doc,function(ue){return ee.push(ue)});for(var re=0;re<E.markers.length;re++){var oe=E.markers[re];st(ee,oe.doc)==-1&&(oe.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,wi=function(a,y,x,b,E){if(!(this instanceof wi))return new wi(a,y,x,b,E);x==null&&(x=0),lo.call(this,[new oo([new Hr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=Te(x,0);this.sel=ha(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}),di(this,ha(ee),Pe)};wi.prototype=te(lo.prototype,{constructor:wi,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=xn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ni(function(a){var y=Te(this.first,0),x=this.first+this.size-1;Ra(this,{from:y,to:Te(x,qe(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qa(this.cm,0,0),di(this,ha(y),Pe)}),replaceRange:function(a,y,x,b){y=ut(this,y),x=x?ut(this,x):y,Na(this,a,y,x,b)},getRange:function(a,y,x){var b=rn(this,ut(this,a),ut(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(At(this,a))return qe(this,a)},getLineNumber:function(a){return xe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=qe(this,a)),ot(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return ut(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:ni(function(a,y,x){Xl(this,ut(this,typeof a=="number"?Te(a,y||0):a),null,x)}),setSelection:ni(function(a,y,x){Xl(this,ut(this,a),ut(this,y||a),x)}),extendSelection:ni(function(a,y,x){Po(this,ut(this,a),y&&ut(this,y),x)}),extendSelections:ni(function(a,y){Yl(this,Lt(this,a),y)}),extendSelectionsBy:ni(function(a,y){var x=Et(this.sel.ranges,a);Yl(this,Lt(this,x),y)}),setSelections:ni(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Ar(ut(this,a[E].anchor),ut(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),di(this,Ui(this.cm,b,y),x)}}),addSelection:ni(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Ar(ut(this,a),ut(this,y||a))),di(this,Ui(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=rn(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=rn(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:ni(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),ue=b.length-1;ue>=0;ue--)Ra(this,b[ue]);oe?Jl(this,oe):this.cm&&Ta(this.cm)}),undo:ni(function(){Ro(this,"undo")}),redo:ni(function(){Ro(this,"redo")}),undoSelection:ni(function(){Ro(this,"undo",!0)}),redoSelection:ni(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),pa(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:Oa(this.history.done),undone:Oa(this.history.undone)}},setHistory:function(a){var y=this.history=new Mo(this.history.maxGeneration);y.done=Oa(a.done.slice(0),null,!0),y.undone=Oa(a.undone.slice(0),null,!0)},setGutterMarker:ni(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:ni(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(!At(this,a)||(y=a,a=qe(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:ni(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(Ze(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ni(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(Ze(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:ni(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return _a(this,ut(this,a),ut(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=ut(this,a),_a(this,a,a,x,"bookmark")},findMarksAt:function(a){a=ut(this,a);var y=[],x=qe(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=ut(this,a),y=ut(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 ue=re[oe];!(ue.to!=null&&E==a.line&&a.ch>=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.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}),ut(this,Te(x,y))},indexFromPos:function(a){a=ut(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 wi(xn(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 wi(xn(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 Wr&&(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];pa(a,function(E){return b.push(E.id)},!0),a.history=new Mo(null),a.history.done=Oa(this.history.done,b),a.history.undone=Oa(this.history.undone,b)}},iterLinkedDocs:function(a){pa(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):Pn(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ni(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))})}),wi.prototype.eachLine=wi.prototype.iter;var ds=0;function bu(a){var y=this;if(hs(y),!(we(y,a)||oi(y.display,a))){kt(a),me&&(ds=+new Date);var x=Ca(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&&ti(y,function(){x=ut(y.doc,x);var Ue={from:x,to:x,text:y.doc.splitLines(ee.filter(function(xt){return xt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Ra(y.doc,Ue),Jl(y.doc,ha(ut(y.doc,x),ut(y.doc,fa(Ue))))})()},ue=function(Ue,xt){if(y.options.allowDropFileTypes&&st(y.options.allowDropFileTypes,Ue.type)==-1){oe();return}var Rt=new FileReader;Rt.onerror=function(){return oe()},Rt.onload=function(){var en=Rt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(en)){oe();return}ee[xt]=en,oe()},Rt.readAsText(Ue)},ce=0;ce<b.length;ce++)ue(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 Ee;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ee=y.listSelections()),Oo(y.doc,ha(x,x)),Ee)for(var Je=0;Je<Ee.length;++Je)Na(y.doc,"",Ee[Je].anchor,Ee[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)){Vt(y);return}if(!(we(a,y)||oi(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=Ca(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)),ze(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;zt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(Eu)},100))}),zt(window,"blur",function(){return fs(Ma)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var ma={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++)ma[co+48]=ma[co+96]=String(co);for(var No=65;No<=90;No++)ma[No]=String.fromCharCode(No);for(var ho=1;ho<=12;ho++)ma[ho+111]=ma[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=Et(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 ue=y[oe];if(!ue)y[oe]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+oe)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Ha(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 Ha(a,y.fallthrough,x,b);for(var ee=0;ee<y.fallthrough.length;ee++){var re=Ha(a,y.fallthrough[ee],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:ma[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),(Ie?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(Ie?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=ma[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 Wa(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&pt(ee.from,We(b).to)<=0;){var re=b.pop();if(pt(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}Li(a,function(){for(var oe=b.length-1;oe>=0;oe--)Na(a.doc,"",b[oe].from,b[oe].to,"+delete");Ta(a)})}function cl(a,y,x){var b=Wt(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 Te(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=cn(x,y.doc.direction);if(ee){var re=E<0?We(ee):ee[0],oe=E<0==(re.level==1),ue=oe?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var ye=sa(y,x);ce=E<0?x.text.length-1:0;var Ee=Ni(y,ye,ce).top;ce=Ft(function(Je){return Ni(y,ye,Je).top==Ee},E<0==(re.level==1)?re.from:re.to-1,ce),ue=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new Te(b,ce,ue)}}return new Te(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=cn(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=on(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(dn,bn){return cl(y,dn instanceof Te?dn.ch:dn,bn)},ue,ce=function(dn){return a.options.lineWrapping?(ue=ue||sa(a,y),Kr(a,y,ue,dn)):{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 Ee=re.level==1==b<0,Je=oe(x,Ee?1:-1);if(Je!=null&&(Ee?Je<=re.to&&Je<=ye.end:Je>=re.from&&Je>=ye.begin)){var Ue=Ee?"before":"after";return new Te(x.line,Je,Ue)}}var xt=function(dn,bn,hn){for(var Sn=function(_r,ri){return ri?new Te(x.line,oe(_r,1),"before"):new Te(x.line,_r,"after")};dn>=0&&dn<E.length;dn+=bn){var Zn=E[dn],Tn=bn>0==(Zn.level!=1),ar=Tn?hn.begin:oe(hn.end,-1);if(Zn.from<=ar&&ar<Zn.to||(ar=Tn?Zn.from:oe(Zn.to,-1),hn.begin<=ar&&ar<hn.end))return Sn(ar,Tn)}},Rt=xt(ee+b,b,ye);if(Rt)return Rt;var en=b>0?ye.end:oe(ye.begin,-1);return en!=null&&!(b>0&&en==y.text.length)&&(Rt=xt(b>0?0:E.length-1,b,ce(en)),Rt)?Rt:null}var fo={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Pe)},killLine:function(a){return Wa(a,function(y){if(y.empty()){var x=qe(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Te(y.head.line+1,0)}:{from:y.head,to:Te(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Wa(a,function(y){return{from:Te(y.from().line,0),to:ut(a.doc,Te(y.to().line+1,0))}})},delLineLeft:function(a){return Wa(a,function(y){return{from:Te(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Wa(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 Wa(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(Te(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Te(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")},lt)},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")},lt)},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},lt)},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(Tt(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Li(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=qe(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Te(E.line,E.ch-1)),E.ch>0)E=new Te(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Te(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=qe(a.doc,E.line-1).text;re&&(E=new Te(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Te(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Ar(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Li(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);Ta(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=qe(a.doc,y),b=ot(x);return b!=x&&(y=xe(b)),hl(!0,a,b,y,1)}function Au(a,y){var x=qe(a.doc,y),b=It(x);return b!=x&&(y=xe(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=qe(a.doc,x.line),E=cn(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 Te(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)!=St}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=Ha(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Ha(y,a.options.extraKeys,x,a)||Ha(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"&&Gr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(kt(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=Se(),!we(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&&!pn&&(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;Ve(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(je(y,"CodeMirror-crosshair"),Oe(document,"keyup",x),Oe(document,"mouseover",x))}zt(document,"keyup",x),zt(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),we(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(oi(y.display,a)||we(y,a)||a.ctrlKey&&!a.altKey||ke&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(he&&x==fl){fl=null,kt(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&&pt(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(!(we(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,oi(x,a)){_e||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Ca(y,a),E=gn(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):En(a)==x.scroller&&kt(a):E==2?(b&&Po(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Re?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)!=St}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=tt?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(Qt(kl,a),0):a.curOp.focus=Se();var E=Ru(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&Mn&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(pt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(pt(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=ti(a,function(ce){_e&&(E.scroller.draggable=!1),a.state.draggingText=!1,Oe(E.wrapper.ownerDocument,"mouseup",re),Oe(E.wrapper.ownerDocument,"mousemove",oe),Oe(E.scroller,"dragstart",ue),Oe(E.scroller,"drop",re),ee||(kt(ce),b.addNew||Po(a.doc,x,null,null,b.extend),_e&&!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},ue=function(){return ee=!0};_e&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),zt(E.wrapper.ownerDocument,"mouseup",re),zt(E.wrapper.ownerDocument,"mousemove",oe),zt(E.scroller,"dragstart",ue),zt(E.scroller,"drop",re),Dl(a),setTimeout(function(){return E.input.focus()},20)}function Ds(a,y,x){if(x=="char")return new Ar(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Ar(Te(y.line,0),ut(a.doc,Te(y.line+1,0)));var b=x(a,y);return new Ar(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;kt(y);var re,oe,ue=ee.sel,ce=ue.ranges;if(b.addNew&&!b.extend?(oe=ee.sel.contains(x),oe>-1?re=ce[oe]:re=new Ar(x,x)):(re=ee.sel.primary(),oe=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Ar(x,x)),x=Ca(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,di(ee,Ui(a,ce.concat([re]),oe),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[oe].empty()&&b.unit=="char"&&!b.extend?(di(ee,Ui(a,ce.slice(0,oe).concat(ce.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ue=ee.sel):ul(ee,oe,re,at):(oe=0,di(ee,new Ii([re],0),at),ue=ee.sel);var Ee=x;function Je(hn){if(pt(Ee,hn)!=0)if(Ee=hn,b.unit=="rectangle"){for(var Sn=[],Zn=a.options.tabSize,Tn=ve(qe(ee,x.line).text,x.ch,Zn),ar=ve(qe(ee,hn.line).text,hn.ch,Zn),_r=Math.min(Tn,ar),ri=Math.max(Tn,ar),Zr=Math.min(x.line,hn.line),Mi=Math.min(a.lastLine(),Math.max(x.line,hn.line));Zr<=Mi;Zr++){var Si=qe(ee,Zr).text,Qr=tn(Si,_r,Zn);_r==ri?Sn.push(new Ar(Te(Zr,Qr),Te(Zr,Qr))):Si.length>Qr&&Sn.push(new Ar(Te(Zr,Qr),Te(Zr,tn(Si,ri,Zn))))}Sn.length||Sn.push(new Ar(x,x)),di(ee,Ui(a,ue.ranges.slice(0,oe).concat(Sn),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(hn)}else{var Ei=re,si=Ds(a,hn,b.unit),ei=Ei.anchor,qr;pt(si.anchor,ei)>0?(qr=si.head,ei=He(Ei.from(),si.anchor)):(qr=si.anchor,ei=fn(Ei.to(),si.head));var Vr=ue.ranges.slice(0);Vr[oe]=Wu(a,new Ar(ut(ee,ei),qr)),di(ee,Ui(a,Vr,oe),at)}}var Ue=E.wrapper.getBoundingClientRect(),xt=0;function Rt(hn){var Sn=++xt,Zn=Ca(a,hn,!0,b.unit=="rectangle");if(Zn)if(pt(Zn,Ee)!=0){a.curOp.focus=Se(),Je(Zn);var Tn=Bo(E,ee);(Zn.line>=Tn.to||Zn.line<Tn.from)&&setTimeout(ti(a,function(){xt==Sn&&Rt(hn)}),150)}else{var ar=hn.clientY<Ue.top?-20:hn.clientY>Ue.bottom?20:0;ar&&setTimeout(ti(a,function(){xt==Sn&&(E.scroller.scrollTop+=ar,Rt(hn))}),50)}}function en(hn){a.state.selectingText=!1,xt=1/0,hn&&(kt(hn),E.input.focus()),Oe(E.wrapper.ownerDocument,"mousemove",dn),Oe(E.wrapper.ownerDocument,"mouseup",bn),ee.history.lastSelOrigin=null}var dn=ti(a,function(hn){hn.buttons===0||!gn(hn)?en(hn):Rt(hn)}),bn=ti(a,en);a.state.selectingText=bn,zt(E.wrapper.ownerDocument,"mousemove",dn),zt(E.wrapper.ownerDocument,"mouseup",bn)}function Wu(a,y){var x=y.anchor,b=y.head,E=qe(a.doc,x.line);if(pt(x,b)==0&&x.sticky==b.sticky)return y;var ee=cn(E);if(!ee)return y;var re=on(ee,x.ch,x.sticky),oe=ee[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var ue=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(ue==0||ue==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=on(ee,b.ch,b.sticky),Ee=ye-re||(b.ch-x.ch)*(oe.level==1?-1:1);ye==ue-1||ye==ue?ce=Ee<0:ce=Ee>0}var Je=ee[ue+(ce?-1:0)],Ue=ce==(Je.level==1),xt=Ue?Je.from:Je.to,Rt=Ue?"after":"before";return x.ch==xt&&x.sticky==Rt?y:new Ar(new Te(x.line,xt,Rt),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&&kt(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(ee>oe.bottom||!dt(a,x))return Pt(y);ee-=oe.top-re.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=re.gutters.childNodes[ue];if(ce&&ce.getBoundingClientRect().right>=E){var ye=De(a.doc,ee),Ee=a.display.gutterSpecs[ue];return nt(a,x,a,ye,Ee.className,y),Pt(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function As(a,y){oi(a.display,y)||zu(a,y)||we(a,y,"contextmenu")||Re||a.display.input.onContextMenu(y)}function zu(a,y){return dt(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-"),ba(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,ue,ce){ce!=za&&ee(oe,ue,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),ba(b),xi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],re=b.doc.first;b.doc.iter(function(ue){for(var ce=0;;){var ye=ue.text.indexOf(E,ce);if(ye==-1)break;ce=ye+E.length,ee.push(Te(re,ye))}re++});for(var oe=ee.length-1;oe>=0;oe--)Na(b.doc,E,ee[oe],Te(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",Ti,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Le?"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",!et),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 Pa(b)},!0),x("scrollbarStyle","native",function(b){Tl(b),Pa(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"&&(Ma(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?zt:Oe;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?(Ve(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(je(a.display.wrapper,"CodeMirror-wrap"),gr(a)),Yo(a),xi(a),ba(a),setTimeout(function(){return Pa(a)},100)}function Wr(a,y){var x=this;if(!(this instanceof Wr))return new Wr(a,y);this.options=y=y?Ht(y):{},Ht(Ls,y,!1);var b=y.value;typeof b=="string"?b=new wi(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Wr.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&&!Le&&ee.input.focus(),me&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),ju(this),wu(),Ea(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Le||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Jo(x)},20):Ma(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);ka(this),_e&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Wr.defaults=Ls,Wr.optionHandlers=Wo;function ju(a){var y=a.display;zt(y.scroller,"mousedown",ti(a,ks)),me&&ge<11?zt(y.scroller,"dblclick",ti(a,function(ue){if(!we(a,ue)){var ce=Ca(a,ue);if(!(!ce||vl(a,ue)||oi(a.display,ue))){kt(ue);var ye=a.findWordAt(ce);Po(a.doc,ye.anchor,ye.head)}}})):zt(y.scroller,"dblclick",function(ue){return we(a,ue)||kt(ue)}),zt(y.scroller,"contextmenu",function(ue){return As(a,ue)}),zt(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||As(a,ue)});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(ue){if(ue.touches.length!=1)return!1;var ce=ue.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(ue,ce){if(ce.left==null)return!0;var ye=ce.left-ue.left,Ee=ce.top-ue.top;return ye*ye+Ee*Ee>20*20}zt(y.scroller,"touchstart",function(ue){if(!we(a,ue)&&!ee(ue)&&!vl(a,ue)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),zt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),zt(y.scroller,"touchend",function(ue){var ce=y.activeTouch;if(ce&&!oi(y,ue)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var ye=a.coordsChar(y.activeTouch,"page"),Ee;!ce.prev||re(ce,ce.prev)?Ee=new Ar(ye,ye):!ce.prev.prev||re(ce,ce.prev.prev)?Ee=a.findWordAt(ye):Ee=new Ar(Te(ye.line,0),ut(a.doc,Te(ye.line+1,0))),a.setSelection(Ee.anchor,Ee.head),a.focus(),kt(ue)}E()}),zt(y.scroller,"touchcancel",E),zt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qa(a,y.scroller.scrollTop),wa(a,y.scroller.scrollLeft,!0),nt(a,"scroll",a))}),zt(y.scroller,"mousewheel",function(ue){return _l(a,ue)}),zt(y.scroller,"DOMMouseScroll",function(ue){return _l(a,ue)}),zt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){we(a,ue)||Vt(ue)},over:function(ue){we(a,ue)||(xu(a,ue),Vt(ue))},start:function(ue){return Cu(a,ue)},drop:ti(a,bu),leave:function(ue){we(a,ue)||hs(a)}};var oe=y.input.getField();zt(oe,"keyup",function(ue){return Ss.call(a,ue)}),zt(oe,"keydown",ti(a,ws)),zt(oe,"keypress",ti(a,Es)),zt(oe,"focus",function(ue){return Jo(a,ue)}),zt(oe,"blur",function(ue){return Ma(a,ue)})}var ml=[];Wr.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=Un(a,y).state:x="prev");var re=a.options.tabSize,oe=qe(E,y),ue=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==St||ye>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?ye=ve(qe(E,y-1).text,null,re):ye=0:x=="add"?ye=ue+a.options.indentUnit:x=="subtract"?ye=ue-a.options.indentUnit:typeof x=="number"&&(ye=ue+x),ye=Math.max(0,ye);var Ee="",Je=0;if(a.options.indentWithTabs)for(var Ue=Math.floor(ye/re);Ue;--Ue)Je+=re,Ee+=" ";if(Je<ye&&(Ee+=Tt(ye-Je)),Ee!=ce)return Na(E,Ee,Te(y,0),Te(y,ce.length),"+input"),oe.stateAfter=null,!0;for(var xt=0;xt<E.sel.ranges.length;xt++){var Rt=E.sel.ranges[xt];if(Rt.head.line==y&&Rt.head.ch<ce.length){var en=Te(y,ce.length);ul(E,xt,new Ar(en,en));break}}}var Ki=null;function zo(a){Ki=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,ue=Pn(y),ce=null;if(oe&&b.ranges.length>1)if(Ki&&Ki.text.join(`
`)==y){if(b.ranges.length%Ki.text.length==0){ce=[];for(var ye=0;ye<Ki.text.length;ye++)ce.push(ee.splitLines(Ki.text[ye]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=Et(ue,function(dn){return[dn]}));for(var Ee=a.curOp.updateInput,Je=b.ranges.length-1;Je>=0;Je--){var Ue=b.ranges[Je],xt=Ue.from(),Rt=Ue.to();Ue.empty()&&(x&&x>0?xt=Te(xt.line,xt.ch-x):a.state.overwrite&&!oe?Rt=Te(Rt.line,Math.min(qe(ee,Rt.line).text.length,Rt.ch+We(ue).length)):oe&&Ki&&Ki.lineWise&&Ki.text.join(`
`)==ue.join(`
`)&&(xt=Rt=Te(xt.line,0)));var en={from:xt,to:Rt,text:ce?ce[Je%ce.length]:ue,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Ra(a.doc,en),Gr(a,"inputRead",a,en)}y&&!oe&&Ts(a,y),Ta(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ee),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&&Li(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(qe(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=go(a,E.head.line,"smart"));re&&Gr(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:Te(E,0),head:Te(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 _e?a.style.width="1000px":a.setAttribute("wrap","off"),Me&&(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)&&ti(this,y[b])(this,E,re),nt(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:mi(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");Bt(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,xi(this)}),removeOverlay:mi(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++,xi(this);return}}}),indentLine:mi(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),At(this.doc,b)&&go(this,b,E,ee)}),indentSelection:mi(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&&Ta(this));else{var ue=oe.from(),ce=oe.to(),ye=Math.max(ee,ue.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var Ee=ye;Ee<ee;++Ee)go(this,Ee,b);var Je=this.doc.sel.ranges;ue.ch==0&&E.length==Je.length&&Je[re].from().ch>0&&ul(this.doc,re,new Ar(ue,Je[re].to()),Pe)}}}),getTokenAt:function(b,E){return yr(this,b,E)},getLineTokens:function(b,E){return yr(this,Te(b),E,!0)},getTokenTypeAt:function(b){b=ut(this.doc,b);var E=kn(this,qe(this.doc,b.line)),ee=0,re=(E.length-1)/2,oe=b.ch,ue;if(oe==0)ue=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{ue=E[ce*2+2];break}}var ye=ue?ue.indexOf("overlay "):-1;return ye<0?ue:ye==0?null:ue.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 ue=0;ue<oe[E].length;ue++){var ce=re[oe[E][ue]];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 Ee=re._global[ye];Ee.pred(oe,this)&&st(ee,Ee.val)==-1&&ee.push(Ee.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=Xt(ee,b==null?ee.first+ee.size-1:b),Un(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=ut(this.doc,b):ee=b?re.from():re.to(),Ci(this,ee,E||"page")},charCoords:function(b,E){return La(this,ut(this.doc,b),E||"page")},coordsChar:function(b,E){return b=So(this,b,E||"page"),li(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 ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,re=!0),oe=qe(this.doc,b)}else oe=b;return Fa(this,oe,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-ir(oe):0)},defaultTextHeight:function(){return Fi(this.display)},defaultCharWidth:function(){return ji(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,re,oe){var ue=this.display;b=Ci(this,ut(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),ue.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var Ee=Math.max(ue.wrapper.clientHeight,this.doc.height),Je=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Ee)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Ee&&(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=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?ye=0:oe=="middle"&&(ye=(ue.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:mi(ws),triggerOnKeyPress:mi(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:mi(ks),execCommand:function(b){if(fo.hasOwnProperty(b))return fo[b].call(null,this)},triggerElectric:mi(function(b){Ts(this,b)}),findPosH:function(b,E,ee,re){var oe=1;E<0&&(oe=-1,E=-E);for(var ue=ut(this.doc,b),ce=0;ce<E&&(ue=yl(this.doc,ue,oe,ee,re),!ue.hitSide);++ce);return ue},moveH:mi(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()},lt)}),deleteH:mi(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):Wa(this,function(oe){var ue=yl(re,oe.head,b,E,!1);return b<0?{from:ue,to:oe.head}:{from:oe.head,to:ue}})}),findPosV:function(b,E,ee,re){var oe=1,ue=re;E<0&&(oe=-1,E=-E);for(var ce=ut(this.doc,b),ye=0;ye<E;++ye){var Ee=Ci(this,ce,"div");if(ue==null?ue=Ee.left:Ee.left=ue,ce=Rs(this,Ee,oe,ee),ce.hitSide)break}return ce},moveV:mi(function(b,E){var ee=this,re=this.doc,oe=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(ye){if(ue)return b<0?ye.from():ye.to();var Ee=Ci(ee,ye.head,"div");ye.goalColumn!=null&&(Ee.left=ye.goalColumn),oe.push(Ee.left);var Je=Rs(ee,Ee,b,E);return E=="page"&&ye==re.sel.primary()&&qo(ee,La(ee,Je,"div").top-Ee.top),Je},lt),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=qe(E,b.line).text,re=b.ch,oe=b.ch;if(ee){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||oe==ee.length)&&re?--re:++oe;for(var ce=ee.charAt(re),ye=se(ce,ue)?function(Ee){return se(Ee,ue)}:/\s/.test(ce)?function(Ee){return/\s/.test(Ee)}:function(Ee){return!/\s/.test(Ee)&&!se(Ee)};re>0&&ye(ee.charAt(re-1));)--re;for(;oe<ee.length&&ye(ee.charAt(oe));)++oe}return new Ar(Te(b.line,re),Te(b.line,oe))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):je(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(b,E){Qa(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Bi(this)-this.display.barHeight,width:b.scrollWidth-Bi(this)-this.display.barWidth,clientHeight:na(this),clientWidth:Ji(this)}},scrollIntoView:mi(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:Te(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:mi(function(b,E){var ee=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};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(ue){if(ue.widgets){for(var ce=0;ce<ue.widgets.length;ce++)if(ue.widgets[ce].noHScroll){ca(ee,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(b){return Li(this,b)},startOperation:function(){return Ea(this)},endOperation:function(){return ka(this)},refresh:mi(function(){var b=this.display.cachedTextHeight;xi(this),this.curOp.forceUpdate=!0,ba(this),Qa(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Fi(this.display))>.5||this.options.lineWrapping)&&Yo(this),nt(this,"refresh",this)}),swapDoc:mi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),ba(this),this.display.input.reset(),Qa(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Gr(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}},vt(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=qe(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function ce(){var bn=y.line+ue;return bn<a.first||bn>=a.first+a.size?!1:(y=new Te(bn,y.ch,y.sticky),oe=qe(a,bn))}function ye(bn){var hn;if(b=="codepoint"){var Sn=oe.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Sn)?hn=null:hn=new Te(y.line,Math.max(0,Math.min(oe.text.length,y.ch+x*(Sn>=55296&&Sn<56320?2:1))),-x)}else E?hn=Bu(a.cm,oe,y,x):hn=dl(oe,y,x);if(hn==null)if(!bn&&ce())y=hl(E,a.cm,oe,y.line,ue);else return!1;else y=hn;return!0}if(b=="char"||b=="codepoint")ye();else if(b=="column")ye(!0);else if(b=="word"||b=="group")for(var Ee=null,Je=b=="group",Ue=a.cm&&a.cm.getHelper(y,"wordChars"),xt=!0;!(x<0&&!ye(!xt));xt=!1){var Rt=oe.text.charAt(y.ch)||`
`,en=se(Rt,Ue)?"w":Je&&Rt==`
`?"n":!Je||/\s/.test(Rt)?null:"p";if(Je&&!xt&&!en&&(en="s"),Ee&&Ee!=en){x<0&&(x=1,ye(),y.sticky="after");break}if(en&&(Ee=en),x>0&&!ye(!xt))break}var dn=Io(a,y,ee,re,!0);return Gt(ee,dn)&&(dn.hitSide=!0),dn}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),ue=Math.max(oe-.5*Fi(a.display),3);re=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=li(a,ee,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Or=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};Or.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 ue=oe.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}zt(E,"paste",function(oe){!ee(oe)||we(b,oe)||Ms(oe,b)||ge<=11&&setTimeout(ti(b,function(){return y.updateFromDOM()}),20)}),zt(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),zt(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),zt(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),zt(E,"touchstart",function(){return x.forceCompositionEnd()}),zt(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!ee(oe)||we(b,oe))){if(b.somethingSelected())zo({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Ps(b);zo({lineWise:!0,text:ue.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,Pe),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var ce=Ki.text.join(`
`);if(oe.clipboardData.setData("Text",ce),oe.clipboardData.getData("Text")==ce){oe.preventDefault();return}}var ye=Is(),Ee=ye.firstChild;b.display.lineSpace.insertBefore(ye,b.display.lineSpace.firstChild),Ee.value=Ki.text.join(`
`);var Je=document.activeElement;ht(Ee),setTimeout(function(){b.display.lineSpace.removeChild(ye),Je.focus(),Je==E&&x.showPrimarySelection()},50)}}zt(E,"copy",re),zt(E,"cut",re)},Or.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Or.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Or.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Or.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Or.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&&pt(He(ee,re),b)==0&&pt(fn(ee,re),E)==0)){var oe=y.display.view,ue=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,Ee=ye.maps?ye.maps[ye.maps.length-1]:ye.map;ce={node:Ee[Ee.length-1],offset:Ee[Ee.length-2]-Ee[Ee.length-3]}}if(!ue||!ce){a.removeAllRanges();return}var Je=a.rangeCount&&a.getRangeAt(0),Ue;try{Ue=Fe(ue.node,ue.offset,ce.offset,ce.node)}catch(xt){}Ue&&(!le&&y.state.focused?(a.collapse(ue.node,ue.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()}},Or.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)},Or.prototype.showMultipleSelections=function(a){ze(this.cm.display.cursorDiv,a.cursors),ze(this.cm.display.selectionDiv,a.selection)},Or.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Or.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Xe(this.div,y)},Or.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Or.prototype.blur=function(){this.div.blur()},Or.prototype.getField=function(){return this.div},Or.prototype.supportsTouch=function(){return!0},Or.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Li(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)},Or.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Or.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Be&&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&&Li(y,function(){di(y.doc,ha(x,b),Pe),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Or.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=Te(b.line-1,qe(a.doc,b.line-1).length)),E.ch==qe(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Te(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,oe;b.line==y.viewFrom||(ee=xa(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 ue=xa(a,E.line),ce,ye;if(ue==y.view.length-1?(ce=y.viewTo-1,ye=y.lineDiv.lastChild):(ce=xe(y.view[ue+1].line)-1,ye=y.view[ue+1].node.previousSibling),!oe)return!1;for(var Ee=a.doc.splitLines(Yu(a,oe,ye,re,ce)),Je=rn(a.doc,Te(re,0),Te(ce,qe(a.doc,ce).text.length));Ee.length>1&&Je.length>1;)if(We(Ee)==We(Je))Ee.pop(),Je.pop(),ce--;else if(Ee[0]==Je[0])Ee.shift(),Je.shift(),re++;else break;for(var Ue=0,xt=0,Rt=Ee[0],en=Je[0],dn=Math.min(Rt.length,en.length);Ue<dn&&Rt.charCodeAt(Ue)==en.charCodeAt(Ue);)++Ue;for(var bn=We(Ee),hn=We(Je),Sn=Math.min(bn.length-(Ee.length==1?Ue:0),hn.length-(Je.length==1?Ue:0));xt<Sn&&bn.charCodeAt(bn.length-xt-1)==hn.charCodeAt(hn.length-xt-1);)++xt;if(Ee.length==1&&Je.length==1&&re==b.line)for(;Ue&&Ue>b.ch&&bn.charCodeAt(bn.length-xt-1)==hn.charCodeAt(hn.length-xt-1);)Ue--,xt++;Ee[Ee.length-1]=bn.slice(0,bn.length-xt).replace(/^\u200b+/,""),Ee[0]=Ee[0].slice(Ue).replace(/\u200b+$/,"");var Zn=Te(re,Ue),Tn=Te(ce,Je.length?We(Je).length-xt:0);if(Ee.length>1||Ee[0]||pt(Zn,Tn))return Na(a.doc,Ee,Zn,Tn,"+input"),!0},Or.prototype.ensurePolled=function(){this.forceCompositionEnd()},Or.prototype.reset=function(){this.forceCompositionEnd()},Or.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Or.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))},Or.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return xi(a.cm)})},Or.prototype.setUneditable=function(a){a.contentEditable="false"},Or.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||ti(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Or.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Or.prototype.onContextMenu=function(){},Or.prototype.resetPosition=function(){},Or.prototype.needsContentAttribute=!0;function Ns(a,y){var x=Qi(a,y.line);if(!x||x.hidden)return null;var b=qe(a.doc,y.line),E=Aa(x,b,y.line),ee=cn(b,a.doc.direction),re="left";if(ee){var oe=on(ee,y.ch);re=oe%2?"right":"left"}var ue=Co(E.map,y.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Za(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,oe=a.doc.lineSeparator(),ue=!1;function ce(Ue){return function(xt){return xt.id==Ue}}function ye(){re&&(ee+=oe,ue&&(ee+=oe),re=ue=!1)}function Ee(Ue){Ue&&(ye(),ee+=Ue)}function Je(Ue){if(Ue.nodeType==1){var xt=Ue.getAttribute("cm-text");if(xt){Ee(xt);return}var Rt=Ue.getAttribute("cm-marker"),en;if(Rt){var dn=a.findMarks(Te(b,0),Te(E+1,0),ce(+Rt));dn.length&&(en=dn[0].find(0))&&Ee(rn(a.doc,en.from,en.to).join(oe));return}if(Ue.getAttribute("contenteditable")=="false")return;var bn=/^(pre|div|p|li|table|br)$/i.test(Ue.nodeName);if(!/^br$/i.test(Ue.nodeName)&&Ue.textContent.length==0)return;bn&&ye();for(var hn=0;hn<Ue.childNodes.length;hn++)Je(Ue.childNodes[hn]);/^(pre|p)$/i.test(Ue.nodeName)&&(ue=!0),bn&&(re=!0)}else Ue.nodeType==3&&Ee(Ue.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Je(y),y!=x;)y=y.nextSibling,ue=!1;return ee}function Zo(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Za(a.clipPos(Te(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 Za(Te(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 Za(Te(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 ue=a.measure,ce=ue.maps;function ye(en,dn,bn){for(var hn=-1;hn<(ce?ce.length:0);hn++)for(var Sn=hn<0?ue.map:ce[hn],Zn=0;Zn<Sn.length;Zn+=3){var Tn=Sn[Zn+2];if(Tn==en||Tn==dn){var ar=xe(hn<0?a.line:a.rest[hn]),_r=Sn[Zn]+bn;return(bn<0||Tn!=en)&&(_r=Sn[Zn+(bn?1:0)]),Te(ar,_r)}}}var Ee=ye(re,oe,x);if(Ee)return Za(Ee,E);for(var Je=oe.nextSibling,Ue=re?re.nodeValue.length-x:0;Je;Je=Je.nextSibling){if(Ee=ye(Je,Je.firstChild,0),Ee)return Za(Te(Ee.line,Ee.ch-Ue),E);Ue+=Je.textContent.length}for(var xt=oe.previousSibling,Rt=x;xt;xt=xt.previousSibling){if(Ee=ye(xt,xt.firstChild,-1),Ee)return Za(Te(Ee.line,Ee.ch+Rt),E);Rt+=xt.textContent.length}}var Yr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};Yr.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),Me&&(E.style.width="0px"),zt(E,"input",function(){me&&ge>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),zt(E,"paste",function(re){we(b,re)||Ms(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!we(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,Pe):(x.prevInput="",E.value=oe.text.join(`
`),ht(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}zt(E,"cut",ee),zt(E,"copy",ee),zt(a.scroller,"paste",function(re){if(!(oi(a,re)||we(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)}}),zt(a.lineSpace,"selectstart",function(re){oi(a,re)||kt(re)}),zt(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"})}}),zt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Yr.prototype.createField=function(a){this.wrapper=Is(),this.textarea=this.wrapper.firstChild},Yr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Yr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Ci(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},Yr.prototype.showSelection=function(a){var y=this.cm,x=y.display;ze(x.cursorDiv,a.cursors),ze(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Yr.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&&ht(this.textarea),me&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ge>=9&&(this.hasSelection=null))}},Yr.prototype.getField=function(){return this.textarea},Yr.prototype.supportsTouch=function(){return!1},Yr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Le||Se()!=this.textarea))try{this.textarea.focus()}catch(a){}},Yr.prototype.blur=function(){this.textarea.blur()},Yr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Yr.prototype.receivedFocus=function(){this.slowPoll()},Yr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Yr.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)},Yr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Xn(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 Li(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},Yr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Yr.prototype.onKeyPress=function(){me&&ge>=9&&(this.hasSelection=null),this.fastPoll()},Yr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=Ca(x,a),re=b.scroller.scrollTop;if(!ee||he)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(ee)==-1&&ti(x,di)(x.doc,ha(ee),Pe);var ue=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 Ee;_e&&(Ee=window.scrollY),b.input.focus(),_e&&window.scrollTo(null,Ee),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 Rt=x.somethingSelected(),en="\u200B"+(Rt?E.value:"");E.value="\u21DA",E.value=en,y.prevInput=Rt?"":"\u200B",E.selectionStart=1,E.selectionEnd=en.length,b.selForContextMenu=x.doc.sel}}function Ue(){if(y.contextMenuPending==Ue&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=ue,me&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&ge<9)&&Je();var Rt=0,en=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?ti(x,ts)(x):Rt++<10?b.detectingSelectAll=setTimeout(en,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(en,200)}}if(me&&ge>=9&&Je(),Re){Vt(a);var xt=function(){Oe(window,"mouseup",xt),setTimeout(Ue,20)};zt(window,"mouseup",xt)}else setTimeout(Ue,50)},Yr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Yr.prototype.setUneditable=function(){},Yr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Ht(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=Se();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(zt(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(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(Oe(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var oe=Wr(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return oe}function Qu(a){a.off=Oe,a.on=zt,a.wheelEventPixels=iu,a.Doc=wi,a.splitLines=Pn,a.countColumn=ve,a.findColumn=tn,a.isWordChar=ie,a.Pass=St,a.signal=nt,a.Line=Hr,a.changeEnd=fa,a.scrollbarModel=Ml,a.Pos=Te,a.cmpPos=pt,a.modes=Ut,a.mimeModes=jt,a.resolveMode=Ln,a.getMode=mn,a.modeExtensions=Gn,a.extendMode=Rn,a.copyState=Fn,a.startState=tr,a.innerMode=On,a.commands=fo,a.keyMap=ia,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Ha,a.normalizeKeyMap=Du,a.StringStream=Mt,a.SharedTextMarker=uo,a.TextMarker=va,a.LineWidget=so,a.e_preventDefault=kt,a.e_stopPropagation=Yt,a.e_stop=Vt,a.addClass=Ve,a.contains=Xe,a.rmClass=je,a.keyNames=ma}Zu(Wr),Uu(Wr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Go in wi.prototype)wi.prototype.hasOwnProperty(Go)&&st(qu,Go)<0&&(Wr.prototype[Go]=function(a){return function(){return a.apply(this.doc,arguments)}}(wi.prototype[Go]));return vt(wi),Wr.inputStyles={textarea:Yr,contenteditable:Or},Wr.defineMode=function(a){!Wr.defaults.mode&&a!="null"&&(Wr.defaults.mode=a),vn.apply(this,arguments)},Wr.defineMIME=Wn,Wr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Wr.defineMIME("text/plain","null"),Wr.defineExtension=function(a,y){Wr.prototype[a]=y},Wr.defineDocExtension=function(a,y){wi.prototype[a]=y},Wr.fromTextArea=Ju,Qu(Wr),Wr.version="5.58.2",Wr})},25419:function(Nt,_t,fe){(function(le){le(fe(89780),fe(15525),fe(98101))})(function(le){"use strict";le.defineMode("markdown",function(it,Ae){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 st=le.getMode(it,ve);return st.name=="null"?null:st}Ae.highlightFormatting===void 0&&(Ae.highlightFormatting=!1),Ae.maxBlockquoteDepth===void 0&&(Ae.maxBlockquoteDepth=0),Ae.taskLists===void 0&&(Ae.taskLists=!1),Ae.strikethrough===void 0&&(Ae.strikethrough=!1),Ae.emoji===void 0&&(Ae.emoji=!1),Ae.fencedCodeBlockHighlighting===void 0&&(Ae.fencedCodeBlockHighlighting=!0),Ae.fencedCodeBlockDefaultMode===void 0&&(Ae.fencedCodeBlockDefaultMode="text/plain"),Ae.xml===void 0&&(Ae.xml=!0),Ae.tokenTypeOverrides===void 0&&(Ae.tokenTypeOverrides={});var _e={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 Ge in _e)_e.hasOwnProperty(Ge)&&Ae.tokenTypeOverrides[Ge]&&(_e[Ge]=Ae.tokenTypeOverrides[Ge]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ye=/^\[(x| )\](?=\s)/i,pe=Ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Me=/^[^#!\[\]*_\\<>` "'(~:]+/,Be=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Le=/^\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]/,tt=" ";function et(ve,de,st){return de.f=de.inline=st,st(ve,de)}function $e(ve,de,st){return de.f=de.block=st,st(ve,de)}function Ie(ve){return!ve||!/\S/.test(ve.string)}function Re(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==je){var de=me;if(!de){var st=le.innerMode(Ke,ve.htmlState);de=st.mode.name=="xml"&&st.state.tagStart===null&&!st.state.context&&st.state.tokenize.isInText}de&&(ve.f=ct,ve.block=Ze,ve.htmlState=null)}return ve.trailingSpace=0,ve.trailingSpaceNewLine=!1,ve.prevLine=ve.thisLine,ve.thisLine={stream:null},null}function Ze(ve,de){var st=ve.column()===de.indentation,Zt=Ie(de.prevLine.stream),St=de.indentedCode,Pe=de.prevLine.hr,at=de.list!==!1,lt=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var tn=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,at)){for(de.list=null;tn<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=tn-de.listStack[de.listStack.length-1])}var gt=!Zt&&!Pe&&!de.prevLine.header&&(!at||!St)&&!de.prevLine.fencedCodeEnd,Tt=(de.list===!1||Pe||Zt)&&de.indentation<=lt&&ve.match(Ce),We=null;if(de.indentationDiff>=4&&(St||de.prevLine.fencedCodeEnd||de.prevLine.header||Zt))return ve.skipToEnd(),de.indentedCode=!0,_e.code;if(ve.eatSpace())return null;if(st&&de.indentation<=lt&&(We=ve.match(pe))&&We[1].length<=6)return de.quote=0,de.header=We[1].length,de.thisLine.header=!0,Ae.highlightFormatting&&(de.formatting="header"),de.f=de.inline,ze(de);if(de.indentation<=lt&&ve.eat(">"))return de.quote=st?1:de.quote+1,Ae.highlightFormatting&&(de.formatting="quote"),ve.eatSpace(),ze(de);if(!Tt&&!de.setext&&st&&de.indentation<=lt&&(We=ve.match(he))){var Et=We[1]?"ol":"ul";return de.indentation=tn+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,Ae.taskLists&&ve.match(Ye,!1)&&(de.taskList=!0),de.f=de.inline,Ae.highlightFormatting&&(de.formatting=["list","list-"+Et]),ze(de)}else{if(st&&de.indentation<=lt&&(We=ve.match(Be,!0)))return de.quote=0,de.fencedEndRE=new RegExp(We[1]+"+ *$"),de.localMode=Ae.fencedCodeBlockHighlighting&&ge(We[2]||Ae.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=le.startState(de.localMode)),de.f=de.block=wt,Ae.highlightFormatting&&(de.formatting="code-block"),de.code=-1,ze(de);if(de.setext||(!gt||!at)&&!de.quote&&de.list===!1&&!de.code&&!Tt&&!Le.test(ve.string)&&(We=ve.lookAhead(1))&&(We=We.match(rt)))return de.setext?(de.header=de.setext,de.setext=0,ve.skipToEnd(),Ae.highlightFormatting&&(de.formatting="header")):(de.header=We[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,ze(de);if(Tt)return ve.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,_e.hr;if(ve.peek()==="[")return et(ve,de,yt)}return et(ve,de,de.inline)}function je(ve,de){var st=Ke.token(ve,de.htmlState);if(!me){var Zt=le.innerMode(Ke,de.htmlState);(Zt.mode.name=="xml"&&Zt.state.tagStart===null&&!Zt.state.context&&Zt.state.tokenize.isInText||de.md_inside&&ve.current().indexOf(">")>-1)&&(de.f=ct,de.block=Ze,de.htmlState=null)}return st}function wt(ve,de){var st=de.listStack[de.listStack.length-1]||0,Zt=de.indentation<st,St=st+3;if(de.fencedEndRE&&de.indentation<=St&&(Zt||ve.match(de.fencedEndRE))){Ae.highlightFormatting&&(de.formatting="code-block");var Pe;return Zt||(Pe=ze(de)),de.localMode=de.localState=null,de.block=Ze,de.f=ct,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,Zt?$e(ve,de,de.block):Pe}else return de.localMode?de.localMode.token(ve,de.localState):(ve.skipToEnd(),_e.code)}function ze(ve){var de=[];if(ve.formatting){de.push(_e.formatting),typeof ve.formatting=="string"&&(ve.formatting=[ve.formatting]);for(var st=0;st<ve.formatting.length;st++)de.push(_e.formatting+"-"+ve.formatting[st]),ve.formatting[st]==="header"&&de.push(_e.formatting+"-"+ve.formatting[st]+"-"+ve.header),ve.formatting[st]==="quote"&&(!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=ve.quote?de.push(_e.formatting+"-"+ve.formatting[st]+"-"+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(_e.linkHref,"url"):(ve.strong&&de.push(_e.strong),ve.em&&de.push(_e.em),ve.strikethrough&&de.push(_e.strikethrough),ve.emoji&&de.push(_e.emoji),ve.linkText&&de.push(_e.linkText),ve.code&&de.push(_e.code),ve.image&&de.push(_e.image),ve.imageAltText&&de.push(_e.imageAltText,"link"),ve.imageMarker&&de.push(_e.imageMarker)),ve.header&&de.push(_e.header,_e.header+"-"+ve.header),ve.quote&&(de.push(_e.quote),!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=ve.quote?de.push(_e.quote+"-"+ve.quote):de.push(_e.quote+"-"+Ae.maxBlockquoteDepth)),ve.list!==!1){var Zt=(ve.listStack.length-1)%3;Zt?Zt===1?de.push(_e.list2):de.push(_e.list3):de.push(_e.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(Me,!0))return ze(de)}function ct(ve,de){var st=de.text(ve,de);if(typeof st!="undefined")return st;if(de.list)return de.list=null,ze(de);if(de.taskList){var Zt=ve.match(Ye,!0)[1]===" ";return Zt?de.taskOpen=!0:de.taskClosed=!0,Ae.highlightFormatting&&(de.formatting="task"),de.taskList=!1,ze(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&ve.match(/^#+$/,!0))return Ae.highlightFormatting&&(de.formatting="header"),ze(de);var St=ve.next();if(de.linkTitle){de.linkTitle=!1;var Pe=St;St==="("&&(Pe=")"),Pe=(Pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var at="^\\s*(?:[^"+Pe+"\\\\]+|\\\\\\\\|\\\\.)"+Pe;if(ve.match(new RegExp(at),!0))return _e.linkHref}if(St==="`"){var lt=de.formatting;Ae.highlightFormatting&&(de.formatting="code"),ve.eatWhile("`");var tn=ve.current().length;if(de.code==0&&(!de.quote||tn==1))return de.code=tn,ze(de);if(tn==de.code){var gt=ze(de);return de.code=0,gt}else return de.formatting=lt,ze(de)}else if(de.code)return ze(de);if(St==="\\"&&(ve.next(),Ae.highlightFormatting)){var Tt=ze(de),We=_e.formatting+"-escape";return Tt?Tt+" "+We:We}if(St==="!"&&ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,Ae.highlightFormatting&&(de.formatting="image"),ze(de);if(St==="["&&de.imageMarker&&ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,Ae.highlightFormatting&&(de.formatting="image"),ze(de);if(St==="]"&&de.imageAltText){Ae.highlightFormatting&&(de.formatting="image");var Tt=ze(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Xe,Tt}if(St==="["&&!de.image)return de.linkText&&ve.match(/^.*?\]/)||(de.linkText=!0,Ae.highlightFormatting&&(de.formatting="link")),ze(de);if(St==="]"&&de.linkText){Ae.highlightFormatting&&(de.formatting="link");var Tt=ze(de);return de.linkText=!1,de.inline=de.f=ve.match(/\(.*?\)| ?\[.*?\]/,!1)?Xe:ct,Tt}if(St==="<"&&ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Fe,Ae.highlightFormatting&&(de.formatting="link");var Tt=ze(de);return Tt?Tt+=" ":Tt="",Tt+_e.linkInline}if(St==="<"&&ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Fe,Ae.highlightFormatting&&(de.formatting="link");var Tt=ze(de);return Tt?Tt+=" ":Tt="",Tt+_e.linkEmail}if(Ae.xml&&St==="<"&&ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Et=ve.string.indexOf(">",ve.pos);if(Et!=-1){var Bt=ve.string.substring(ve.start,Et);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Bt)&&(de.md_inside=!0)}return ve.backUp(1),de.htmlState=le.startState(Ke),$e(ve,de,je)}if(Ae.xml&&St==="<"&&ve.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(St==="*"||St==="_"){for(var ae=1,te=ve.pos==1?" ":ve.string.charAt(ve.pos-2);ae<3&&ve.eat(St);)ae++;var z=ve.peek()||" ",ie=!/\s/.test(z)&&(!ke.test(z)||/\s/.test(te)||ke.test(te)),se=!/\s/.test(te)&&(!ke.test(te)||/\s/.test(z)||ke.test(z)),ne=null,be=null;if(ae%2&&(!de.em&&ie&&(St==="*"||!se||ke.test(te))?ne=!0:de.em==St&&se&&(St==="*"||!ie||ke.test(z))&&(ne=!1)),ae>1&&(!de.strong&&ie&&(St==="*"||!se||ke.test(te))?be=!0:de.strong==St&&se&&(St==="*"||!ie||ke.test(z))&&(be=!1)),be!=null||ne!=null){Ae.highlightFormatting&&(de.formatting=ne==null?"strong":be==null?"em":"strong em"),ne===!0&&(de.em=St),be===!0&&(de.strong=St);var gt=ze(de);return ne===!1&&(de.em=!1),be===!1&&(de.strong=!1),gt}}else if(St===" "&&(ve.eat("*")||ve.eat("_"))){if(ve.peek()===" ")return ze(de);ve.backUp(1)}if(Ae.strikethrough){if(St==="~"&&ve.eatWhile(St)){if(de.strikethrough){Ae.highlightFormatting&&(de.formatting="strikethrough");var gt=ze(de);return de.strikethrough=!1,gt}else if(ve.match(/^[^\s]/,!1))return de.strikethrough=!0,Ae.highlightFormatting&&(de.formatting="strikethrough"),ze(de)}else if(St===" "&&ve.match(/^~~/,!0)){if(ve.peek()===" ")return ze(de);ve.backUp(2)}}if(Ae.emoji&&St===":"&&ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,Ae.highlightFormatting&&(de.formatting="emoji");var Qe=ze(de);return de.emoji=!1,Qe}return St===" "&&(ve.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),ze(de)}function Fe(ve,de){var st=ve.next();if(st===">"){de.f=de.inline=ct,Ae.highlightFormatting&&(de.formatting="link");var Zt=ze(de);return Zt?Zt+=" ":Zt="",Zt+_e.linkInline}return ve.match(/^[^>]+/,!0),_e.linkInline}function Xe(ve,de){if(ve.eatSpace())return null;var st=ve.next();return st==="("||st==="["?(de.f=de.inline=Ve(st==="("?")":"]"),Ae.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,ze(de)):"error"}var Se={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ve(ve){return function(de,st){var Zt=de.next();if(Zt===ve){st.f=st.inline=ct,Ae.highlightFormatting&&(st.formatting="link-string");var St=ze(st);return st.linkHref=!1,St}return de.match(Se[ve]),st.linkHref=!0,ze(st)}}function yt(ve,de){return ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=ht,ve.next(),Ae.highlightFormatting&&(de.formatting="link"),de.linkText=!0,ze(de)):et(ve,de,ct)}function ht(ve,de){if(ve.match(/^\]:/,!0)){de.f=de.inline=Qt,Ae.highlightFormatting&&(de.formatting="link");var st=ze(de);return de.linkText=!1,st}return ve.match(/^([^\]\\]|\\.)+/,!0),_e.linkText}function Qt(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=ct,_e.linkHref+" url")}var Ht={startState:function(){return{f:Ze,prevLine:{stream:null},thisLine:{stream:null},block:Ze,htmlState:null,indentation:0,inline:ct,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 Re(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!=je)){var st=ve.match(/^\s*/,!0)[0].replace(/\t/g,tt).length;if(de.indentation=st,de.indentationDiff=null,st>0)return null}}return de.f(ve,de)},innerMode:function(ve){return ve.block==je?{state:ve.htmlState,mode:Ke}:ve.localState?{state:ve.localState,mode:ve.localMode}:{state:ve,mode:Ht}},indent:function(ve,de,st){return ve.block==je&&Ke.indent?Ke.indent(ve.htmlState,de,st):ve.localState&&ve.localMode.indent?ve.localMode.indent(ve.localState,de,st):le.Pass},blankLine:Re,getType:ze,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ht},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(Nt,_t,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 Ae=le.modeInfo[it];Ae.mimes&&(Ae.mime=Ae.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 _e=0;_e<ge.mimes.length;_e++)if(ge.mimes[_e]==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 _e=0;_e<ge.ext.length;_e++)if(ge.ext[_e]==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 _e=Ke.lastIndexOf("."),Ge=_e>-1&&Ke.substring(_e+1,Ke.length);if(Ge)return le.findModeByExtension(Ge)},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 _e=0;_e<ge.alias.length;_e++)if(ge.alias[_e].toLowerCase()==Ke)return ge}}}})},67549:function(Nt,_t,fe){(function(le){le(fe(89780))})(function(le){"use strict";le.defineMode("stex",function(it,Ae){"use strict";function Ke(Me,Be){Me.cmdState.push(Be)}function me(Me){return Me.cmdState.length>0?Me.cmdState[Me.cmdState.length-1]:null}function ge(Me){var Be=Me.cmdState.pop();Be&&Be.closeBracket()}function _e(Me){for(var Be=Me.cmdState,Le=Be.length-1;Le>=0;Le--){var ke=Be[Le];if(ke.name!="DEFAULT")return ke}return{styleIdentifier:function(){return null}}}function Ge(Me,Be,Le){return function(){this.name=Me,this.bracketNo=0,this.style=Be,this.styles=Le,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=Ge("importmodule","tag",["string","builtin"]),Ce.documentclass=Ge("documentclass","tag",["","atom"]),Ce.usepackage=Ge("usepackage","tag",["atom"]),Ce.begin=Ge("begin","tag",["atom"]),Ce.end=Ge("end","tag",["atom"]),Ce.label=Ge("label","tag",["atom"]),Ce.ref=Ge("ref","tag",["atom"]),Ce.eqref=Ge("eqref","tag",["atom"]),Ce.cite=Ge("cite","tag",["atom"]),Ce.bibitem=Ge("bibitem","tag",["atom"]),Ce.Bibitem=Ge("Bibitem","tag",["atom"]),Ce.RBibitem=Ge("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function he(Me,Be){Me.f=Be}function Ye(Me,Be){var Le;if(Me.match(/^\\[a-zA-Z@]+/)){var ke=Me.current().slice(1);return Le=Ce.hasOwnProperty(ke)?Ce[ke]:Ce.DEFAULT,Le=new Le,Ke(Be,Le),he(Be,rt),Le.style}if(Me.match(/^\\[$&%#{}_]/)||Me.match(/^\\[,;!\/\\]/))return"tag";if(Me.match("\\["))return he(Be,function(et,$e){return pe(et,$e,"\\]")}),"keyword";if(Me.match("\\("))return he(Be,function(et,$e){return pe(et,$e,"\\)")}),"keyword";if(Me.match("$$"))return he(Be,function(et,$e){return pe(et,$e,"$$")}),"keyword";if(Me.match("$"))return he(Be,function(et,$e){return pe(et,$e,"$")}),"keyword";var tt=Me.next();if(tt=="%")return Me.skipToEnd(),"comment";if(tt=="}"||tt=="]"){if(Le=me(Be),Le)Le.closeBracket(tt),he(Be,rt);else return"error";return"bracket"}else return tt=="{"||tt=="["?(Le=Ce.DEFAULT,Le=new Le,Ke(Be,Le),"bracket"):/\d/.test(tt)?(Me.eatWhile(/[\w.%]/),"atom"):(Me.eatWhile(/[\w\-_]/),Le=_e(Be),Le.name=="begin"&&(Le.argument=Me.current()),Le.styleIdentifier())}function pe(Me,Be,Le){if(Me.eatSpace())return null;if(Le&&Me.match(Le))return he(Be,Ye),"keyword";if(Me.match(/^\\[a-zA-Z@]+/))return"tag";if(Me.match(/^[a-zA-Z]+/))return"variable-2";if(Me.match(/^\\[$&%#{}_]/)||Me.match(/^\\[,;!\/]/)||Me.match(/^[\^_&]/))return"tag";if(Me.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Me.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ke=Me.next();return ke=="{"||ke=="}"||ke=="["||ke=="]"||ke=="("||ke==")"?"bracket":ke=="%"?(Me.skipToEnd(),"comment"):"error"}function rt(Me,Be){var Le=Me.peek(),ke;return Le=="{"||Le=="["?(ke=me(Be),ke.openBracket(Le),Me.eat(Le),he(Be,Ye),"bracket"):/[ \t\r]/.test(Le)?(Me.eat(Le),null):(he(Be,Ye),ge(Be),Ye(Me,Be))}return{startState:function(){var Me=Ae.inMathMode?function(Be,Le){return pe(Be,Le)}:Ye;return{cmdState:[],f:Me}},copyState:function(Me){return{cmdState:Me.cmdState.slice(),f:Me.f}},token:function(Me,Be){return Be.f(Me,Be)},blankLine:function(Me){Me.f=Ye,Me.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(Nt,_t,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},Ae={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(Ke,me){var ge=Ke.indentUnit,_e={},Ge=me.htmlMode?it:Ae;for(var Ce in Ge)_e[Ce]=Ge[Ce];for(var Ce in me)_e[Ce]=me[Ce];var he,Ye;function pe(Fe,Xe){function Se(ht){return Xe.tokenize=ht,ht(Fe,Xe)}var Ve=Fe.next();if(Ve=="<")return Fe.eat("!")?Fe.eat("[")?Fe.match("CDATA[")?Se(Be("atom","]]>")):null:Fe.match("--")?Se(Be("comment","-->")):Fe.match("DOCTYPE",!0,!0)?(Fe.eatWhile(/[\w\._\-]/),Se(Le(1))):null:Fe.eat("?")?(Fe.eatWhile(/[\w\._\-]/),Xe.tokenize=Be("meta","?>"),"meta"):(he=Fe.eat("/")?"closeTag":"openTag",Xe.tokenize=rt,"tag bracket");if(Ve=="&"){var yt;return Fe.eat("#")?Fe.eat("x")?yt=Fe.eatWhile(/[a-fA-F\d]/)&&Fe.eat(";"):yt=Fe.eatWhile(/[\d]/)&&Fe.eat(";"):yt=Fe.eatWhile(/[\w\.\-:]/)&&Fe.eat(";"),yt?"atom":"error"}else return Fe.eatWhile(/[^&<]/),null}pe.isInText=!0;function rt(Fe,Xe){var Se=Fe.next();if(Se==">"||Se=="/"&&Fe.eat(">"))return Xe.tokenize=pe,he=Se==">"?"endTag":"selfcloseTag","tag bracket";if(Se=="=")return he="equals",null;if(Se=="<"){Xe.tokenize=pe,Xe.state=$e,Xe.tagName=Xe.tagStart=null;var Ve=Xe.tokenize(Fe,Xe);return Ve?Ve+" tag error":"tag error"}else return/[\'\"]/.test(Se)?(Xe.tokenize=Me(Se),Xe.stringStartCol=Fe.column(),Xe.tokenize(Fe,Xe)):(Fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Me(Fe){var Xe=function(Se,Ve){for(;!Se.eol();)if(Se.next()==Fe){Ve.tokenize=rt;break}return"string"};return Xe.isInAttribute=!0,Xe}function Be(Fe,Xe){return function(Se,Ve){for(;!Se.eol();){if(Se.match(Xe)){Ve.tokenize=pe;break}Se.next()}return Fe}}function Le(Fe){return function(Xe,Se){for(var Ve;(Ve=Xe.next())!=null;){if(Ve=="<")return Se.tokenize=Le(Fe+1),Se.tokenize(Xe,Se);if(Ve==">")if(Fe==1){Se.tokenize=pe;break}else return Se.tokenize=Le(Fe-1),Se.tokenize(Xe,Se)}return"meta"}}function ke(Fe,Xe,Se){this.prev=Fe.context,this.tagName=Xe,this.indent=Fe.indented,this.startOfLine=Se,(_e.doNotIndent.hasOwnProperty(Xe)||Fe.context&&Fe.context.noIndent)&&(this.noIndent=!0)}function tt(Fe){Fe.context&&(Fe.context=Fe.context.prev)}function et(Fe,Xe){for(var Se;;){if(!Fe.context||(Se=Fe.context.tagName,!_e.contextGrabbers.hasOwnProperty(Se)||!_e.contextGrabbers[Se].hasOwnProperty(Xe)))return;tt(Fe)}}function $e(Fe,Xe,Se){return Fe=="openTag"?(Se.tagStart=Xe.column(),Ie):Fe=="closeTag"?Re:$e}function Ie(Fe,Xe,Se){return Fe=="word"?(Se.tagName=Xe.current(),Ye="tag",wt):_e.allowMissingTagName&&Fe=="endTag"?(Ye="tag bracket",wt(Fe,Xe,Se)):(Ye="error",Ie)}function Re(Fe,Xe,Se){if(Fe=="word"){var Ve=Xe.current();return Se.context&&Se.context.tagName!=Ve&&_e.implicitlyClosed.hasOwnProperty(Se.context.tagName)&&tt(Se),Se.context&&Se.context.tagName==Ve||_e.matchClosing===!1?(Ye="tag",Ze):(Ye="tag error",je)}else return _e.allowMissingTagName&&Fe=="endTag"?(Ye="tag bracket",Ze(Fe,Xe,Se)):(Ye="error",je)}function Ze(Fe,Xe,Se){return Fe!="endTag"?(Ye="error",Ze):(tt(Se),$e)}function je(Fe,Xe,Se){return Ye="error",Ze(Fe,Xe,Se)}function wt(Fe,Xe,Se){if(Fe=="word")return Ye="attribute",ze;if(Fe=="endTag"||Fe=="selfcloseTag"){var Ve=Se.tagName,yt=Se.tagStart;return Se.tagName=Se.tagStart=null,Fe=="selfcloseTag"||_e.autoSelfClosers.hasOwnProperty(Ve)?et(Se,Ve):(et(Se,Ve),Se.context=new ke(Se,Ve,yt==Se.indented)),$e}return Ye="error",wt}function ze(Fe,Xe,Se){return Fe=="equals"?Ne:(_e.allowMissing||(Ye="error"),wt(Fe,Xe,Se))}function Ne(Fe,Xe,Se){return Fe=="string"?ct:Fe=="word"&&_e.allowUnquoted?(Ye="string",wt):(Ye="error",wt(Fe,Xe,Se))}function ct(Fe,Xe,Se){return Fe=="string"?ct:wt(Fe,Xe,Se)}return{startState:function(Fe){var Xe={tokenize:pe,state:$e,indented:Fe||0,tagName:null,tagStart:null,context:null};return Fe!=null&&(Xe.baseIndent=Fe),Xe},token:function(Fe,Xe){if(!Xe.tagName&&Fe.sol()&&(Xe.indented=Fe.indentation()),Fe.eatSpace())return null;he=null;var Se=Xe.tokenize(Fe,Xe);return(Se||he)&&Se!="comment"&&(Ye=null,Xe.state=Xe.state(he||Se,Fe,Xe),Ye&&(Se=Ye=="error"?Se+" error":Ye)),Se},indent:function(Fe,Xe,Se){var Ve=Fe.context;if(Fe.tokenize.isInAttribute)return Fe.tagStart==Fe.indented?Fe.stringStartCol+1:Fe.indented+ge;if(Ve&&Ve.noIndent)return le.Pass;if(Fe.tokenize!=rt&&Fe.tokenize!=pe)return Se?Se.match(/^(\s*)/)[0].length:0;if(Fe.tagName)return _e.multilineTagIndentPastTag!==!1?Fe.tagStart+Fe.tagName.length+2:Fe.tagStart+ge*(_e.multilineTagIndentFactor||1);if(_e.alignCDATA&&/<!\[CDATA\[/.test(Xe))return 0;var yt=Xe&&/^<(\/)?([\w_:\.-]*)/.exec(Xe);if(yt&&yt[1])for(;Ve;)if(Ve.tagName==yt[2]){Ve=Ve.prev;break}else if(_e.implicitlyClosed.hasOwnProperty(Ve.tagName))Ve=Ve.prev;else break;else if(yt)for(;Ve;){var ht=_e.contextGrabbers[Ve.tagName];if(ht&&ht.hasOwnProperty(yt[2]))Ve=Ve.prev;else break}for(;Ve&&Ve.prev&&!Ve.startOfLine;)Ve=Ve.prev;return Ve?Ve.indent+ge:Fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_e.htmlMode?"html":"xml",helperType:_e.htmlMode?"html":"xml",skipAttribute:function(Fe){Fe.state==Ne&&(Fe.state=wt)},xmlCurrentTag:function(Fe){return Fe.tagName?{name:Fe.tagName,close:Fe.type=="closeTag"}:null},xmlCurrentContext:function(Fe){for(var Xe=[],Se=Fe.context;Se;Se=Se.prev)Se.tagName&&Xe.push(Se.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(Nt,_t,fe){"use strict";fe.d(_t,{hP:function(){return Bt}});var le=function(ae,te){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ie){z.__proto__=ie}||function(z,ie){for(var se in ie)Object.prototype.hasOwnProperty.call(ie,se)&&(z[se]=ie[se])})(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 Ae(ae,te,z,ie){return new(z||(z=Promise))(function(se,ne){function be(Ft){try{Wt(ie.next(Ft))}catch(Ct){ne(Ct)}}function Qe(Ft){try{Wt(ie.throw(Ft))}catch(Ct){ne(Ct)}}function Wt(Ft){var Ct;Ft.done?se(Ft.value):(Ct=Ft.value,Ct instanceof z?Ct:new z(function(Dt){Dt(Ct)})).then(be,Qe)}Wt((ie=ie.apply(ae,te||[])).next())})}function Ke(ae,te){var z,ie,se,ne,be={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return ne={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Qe(Wt){return function(Ft){return function(Ct){if(z)throw new TypeError("Generator is already executing.");for(;be;)try{if(z=1,ie&&(se=2&Ct[0]?ie.return:Ct[0]?ie.throw||((se=ie.return)&&se.call(ie),0):ie.next)&&!(se=se.call(ie,Ct[1])).done)return se;switch(ie=0,se&&(Ct=[2&Ct[0],se.value]),Ct[0]){case 0:case 1:se=Ct;break;case 4:return be.label++,{value:Ct[1],done:!1};case 5:be.label++,ie=Ct[1],Ct=[0];continue;case 7:Ct=be.ops.pop(),be.trys.pop();continue;default:if(se=be.trys,!((se=se.length>0&&se[se.length-1])||Ct[0]!==6&&Ct[0]!==2)){be=0;continue}if(Ct[0]===3&&(!se||Ct[1]>se[0]&&Ct[1]<se[3])){be.label=Ct[1];break}if(Ct[0]===6&&be.label<se[1]){be.label=se[1],se=Ct;break}if(se&&be.label<se[2]){be.label=se[2],be.ops.push(Ct);break}se[2]&&be.ops.pop(),be.trys.pop();continue}Ct=te.call(ae,be)}catch(Dt){Ct=[6,Dt],ie=0}finally{z=se=0}if(5&Ct[0])throw Ct[1];return{value:Ct[0]?Ct[1]:void 0,done:!0}}([Wt,Ft])}}}function me(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var ie=Array(ae),se=0;for(te=0;te<z;te++)for(var ne=arguments[te],be=0,Qe=ne.length;be<Qe;be++,se++)ie[se]=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,se=z;ie<se.length;ie++){var ne=se[ie],be=ne[0],Qe=ne[1];te.setAttribute(be,Qe)}},ae.createRect=function(te,z,ie){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",te.toString()),se.setAttribute("height",z.toString()),ie&&ae.setAttributes(se,ie),se},ae.createLine=function(te,z,ie,se,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",se.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 se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(te/2).toString()),se.setAttribute("cy",(z/2).toString()),se.setAttribute("rx",(te/2).toString()),se.setAttribute("ry",(z/2).toString()),ie&&ae.setAttributes(se,ie),se},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,se,ne,be,Qe){var Wt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Wt,[["id",te],["orient",z],["markerWidth",ie.toString()],["markerHeight",se.toString()],["refX",ne.toString()],["refY",be.toString()]]),Wt.appendChild(Qe),Wt},ae.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&ae.setAttributes(z,te),z},ae.createTSpan=function(te,z){var 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}(),_e=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}(),Ge=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,ie){var se=this;return new Promise(function(ne){var be=ie!==void 0?ie:document.createElement("canvas");te===null&&(se.markersOnly=!0,se.naturalSize=!1);var Qe=document.createElementNS("http://www.w3.org/2000/svg","svg");Qe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Qe.setAttribute("width",z.width.baseVal.valueAsString),Qe.setAttribute("height",z.height.baseVal.valueAsString),Qe.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Qe.innerHTML=z.innerHTML,se.naturalSize===!0?(Qe.width.baseVal.value=te.naturalWidth,Qe.height.baseVal.value=te.naturalHeight):se.width!==void 0&&se.height!==void 0&&(Qe.width.baseVal.value=se.width,Qe.height.baseVal.value=se.height),be.width=Qe.width.baseVal.value,be.height=Qe.height.baseVal.value;var Wt=Qe.outerHTML,Ft=be.getContext("2d");se.markersOnly!==!0&&Ft.drawImage(te,0,0,be.width,be.height);var Ct=window.URL,Dt=new Image(be.width,be.height);Dt.setAttribute("crossOrigin","anonymous");var on=new Blob([Wt],{type:"image/svg+xml"}),$t=Ct.createObjectURL(on);Dt.onload=function(){Ft.drawImage(Dt,0,0),Ct.revokeObjectURL($t);var cn=be.toDataURL(se.imageType,se.imageQuality);ne(cn)},Dt.src=$t})},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,se,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=ie,this.uiStyleSettings=se,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 se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'<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(se,'<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 se=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){se.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}(),Me=function(){function ae(te,z,ie,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=ie,this.styles=se,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,se=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=se.uiStyleSettings;var Qe=document.createElement("div");Qe.className=se.toolboxButtonStyleClass.name+" "+((be=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:se.toolboxButtonStyleColorsClass.name),Qe.innerHTML=ne.icon,Qe.title=ne.title,Qe.addEventListener("click",function(){se.panelButtonClick(ne)}),se.panelButtons.push(Qe),se.buttonRow.appendChild(Qe)}),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 se=te.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),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 Qe,Wt;ne.className=z.toolboxButtonStyleClass.name+" "+(be===ie?""+((Qe=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:z.toolboxActiveButtonStyleColorsClass.name):""+((Wt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Wt!==void 0?Wt:z.toolboxButtonStyleColorsClass.name))})},ae}(),Be=function(ae,te){this.title=ae,this.icon=te},Le=function(ae){function te(z,ie,se,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=se,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(se){var ne=z.getColorBox(se);ie.appendChild(ne),z.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(z){var ie=this,se=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-se,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 Qe=document.createElement("div");return Qe.style.display="inline-block",Qe.style.width=ne-2+"px",Qe.style.height=ne-2+"px",Qe.style.backgroundColor=z,Qe.style.borderRadius=ne/2+"px",z==="transparent"&&(Qe.style.fill=this.uiStyleSettings.toolboxAccentColor,Qe.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(Qe),be},te.prototype.setCurrentColor=function(z,ie){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Be),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}(),tt=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}(),et=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}(),$e=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}(),Ie=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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 se=this.unrotatePoint(z);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.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,se=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,se=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=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}se>=0?(this.left=ie,this.width=se):(this.left=ie+se,this.width=-se),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(),se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(ie)).x,y:se.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM();ie=ie.inverse();var se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(ie)).x,y:se.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 tt,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 et;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,se=ie,ne=(this.width+this.CB_DISTANCE)/2-z/2,be=(this.height+this.CB_DISTANCE)/2-z/2,Qe=this.height+this.CB_DISTANCE-z/2,Wt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,se),this.positionGrip(this.controlGrips.topCenter.visual,ne,se),this.positionGrip(this.controlGrips.topRight.visual,Wt,se),this.positionGrip(this.controlGrips.centerLeft.visual,ie,be),this.positionGrip(this.controlGrips.centerRight.visual,Wt,be),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,Qe),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,Wt,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,se-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,ie,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,se),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:$e.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:$e.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($e.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix($e.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie);var se=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:se.x*z,y:se.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*ie,this.adjustControlBox()},te}(ke),Re=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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}(Ie),Ze=function(ae){function te(z,ie,se,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=se,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(se){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=se===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(se,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=se.toString(),be.style.marginRight="5px",ne.appendChild(be);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.display="flex",Qe.style.alignItems="center";var Wt=document.createElement("hr");Wt.style.minWidth="20px",Wt.style.border="0px",Wt.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,Wt.style.flexGrow="2",Qe.appendChild(Wt),ne.appendChild(Qe),z.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(z,ie){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Be),je=function(ae){function te(z,ie,se,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=se,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(se){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=se===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(se,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var Qe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(se!==""?'stroke-dasharray="'+se+'"':"")+` />
</svg>`;be.innerHTML=Qe,ne.appendChild(be),z.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(z,ie){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Be),wt=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Le("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new je("Line style",se.defaultStrokeDasharrays,se.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}(Re),ze=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,se){var ne=ae.call(this,z,ie,se)||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 et;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,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,se),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),ct=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Le("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new je("Line style",se.defaultStrokeDasharrays,se.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),Fe=function(ae){function te(z,ie,se,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=se,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(se){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=se===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(se,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=se,be.style.overflow="hidden";var Qe=document.createElement("div");Qe.style.whiteSpace="nowrap",Qe.style.overflow="hidden",Qe.style.textOverflow="ellipsis",Qe.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(Qe),ne.appendChild(be),z.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(z,ie){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Be),Xe=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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=se.defaultColor,ne.fontFamily=se.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 Le("Color",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Fe("Font",se.defaultFontFamilies,se.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(se){se===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 se=(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(se,ne)}return ie},te.prototype.getTextPosition=function(z){var ie=this.textElement.getBBox(),se=0,ne=0;return ie.width>0&&ie.height>0&&(se=(this.width-ie.width*z)/2,ne=this.height/2-ie.height*z/2),{x:se,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),ie=this.getTextScale(),se=this.getTextPosition(ie);se.y-=z.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.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 se=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(se)),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}),se=this.textElement.getBBox(),ne={x:se.width*z,y:se.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}(Ie),Se=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=se.defaultColor,ne.lineWidth=se.defaultStrokeWidth,ne.pixelRatio=se.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 Le("Color",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.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],se=ie[0],ne=ie[1],be=ie[2],Qe=ie[3],Wt=!1,Ft=0;Ft<this.canvasElement.height;Ft++)for(var Ct=0;Ct<this.canvasElement.width;Ct++)z.data[Ft*this.canvasElement.width*4+4*Ct+3]>0&&(Wt=!0,Ft<ne&&(ne=Ft),Ct<se&&(se=Ct),Ft>Qe&&(Qe=Ft),Ct>be&&(be=Ct));if(Wt){this.left=se/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-se)/this.pixelRatio,this.height=(Qe-ne)/this.pixelRatio;var Dt=document.createElement("canvas");Dt.width=be-se,Dt.height=Qe-ne,Dt.getContext("2d").putImageData(this.canvasContext.getImageData(se,ne,be-se,Qe-ne),0,0),this.drawingImgUrl=Dt.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}(Ie),Ve=function(ae){function te(z,ie,se){var ne=ae.call(this,z,se||'<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 se=function(Qe){var Wt="both";switch(Qe){case 0:Wt="both";break;case 1:Wt="start";break;case 2:Wt="end";break;case 3:Wt="none"}var Ft=document.createElement("div");if(Ft.style.display="flex",Ft.style.flexGrow="2",Ft.style.alignItems="center",Ft.style.justifyContent="space-between",Ft.style.padding="5px",Ft.style.borderWidth="2px",Ft.style.borderStyle="solid",Ft.style.borderColor=Wt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ft.addEventListener("click",function(){z.setCurrentType(Wt,Ft)}),ie.appendChild(Ft),Wt==="both"||Wt==="start"){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.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>`,Ct.style.marginLeft="5px",Ft.appendChild(Ct)}var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",Dt.appendChild(on),Ft.appendChild(Dt),Wt==="both"||Wt==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.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>`,$t.style.marginRight="5px",Ft.appendChild($t)}ne.typeBoxes.push(Ft)},ne=this,be=0;be<4;be++)se(be);return ie},te.prototype.setCurrentType=function(z,ie){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Be),yt=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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 Ve("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 se=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(ie+ne/2)+" "+z+","+(ie-ne/2)+" "+(z+se/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 se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,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}(ct),ht=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.fillColor=se.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Le("Color",se.defaultColorSet,se.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}(Re),Qt=function(ae){function te(z,ie,se,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=se,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(se){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=se===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(se,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=100*se+"%",ne.appendChild(be),z.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(z,ie){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Be),Ht=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=se.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=se.defaultHighlightOpacity,ne.fillPanel=new Le("Color",se.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Qt("Opacity",se.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}(ht),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>',st=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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=se.defaultStrokeColor,ne.bgColor=se.defaultFillColor,ne.fontFamily=se.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 Le("Text color",se.defaultColorSet,ne.color,ve),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Le("Fill color",se.defaultColorSet,ne.bgColor,de),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Fe("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new et,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),se=this.height/5;z&&(this.tipPosition={x:ie+se/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))?(se=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+se,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+se}):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))?(se=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-se,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+se}):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))?(se=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-se,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-se},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-se})},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),Zt=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.fillColor=se.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 Le("Line color",me(se.defaultColorSet,["transparent"]),se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Le("Fill color",me(se.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new je("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Qt("Opacity",se.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}(Ie),St=function(ae){function te(z,ie,se){return ae.call(this,z,ie,se)||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 se=this.tip2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,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}(ct),Pe=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.strokePanel.colors=se.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}(Zt),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}(),lt=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Le("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new je("Line style",se.defaultStrokeDasharrays,se.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),tn=function(ae){function te(z,ie,se){var ne=ae.call(this,z,ie,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.fillColor=se.defaultFillColor,ne.textColor=se.defaultStrokeColor,ne.fontFamily=se.defaultFontFamily,ne.fontSize=se.defaultCaptionFontSize,ne.captionText=se.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 Le("Line color",me(se.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Le("Fill color",me(se.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ze("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new je("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Fe("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Le("Text color",se.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}(Ie),gt=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}(),Tt=function(ae){function te(z,ie,se){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=ie,ne.state=se,ne}return it(te,ae),te}(gt),We=function(ae){function te(z,ie,se){se===void 0&&(se=!1);var ne=ae.call(this,z,se)||this;return ne.marker=ie,ne}return it(te,ae),te}(gt),Et=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}(),Bt=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 ze,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 Et,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[wt,Se,yt,Xe,Pe,Zt,Ht,st,St,ht,ct,lt,tn]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[wt,Se,yt,Xe,Zt,Ht,st]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[wt,Se,yt,Xe,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var se=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});se!==void 0&&z._availableMarkerTypes.push(se)}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(),_e.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 gt(te))})},ae.prototype.render=function(){return Ae(this,void 0,void 0,function(){var te;return Ke(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ge).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(se){var ne=new gt(z,!0);se(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(se){return se(new gt(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,se=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,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var ie,se=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(te,z):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==se._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 Me(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(se){var ne=new We(te,te._currentMarker,!0);se(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(se){return se(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 Qe=new We(te,void 0,!0);be(Qe),Qe.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var ie=function(be){var Qe=se.markers[be];se.setCurrentMarker(se.markers[be]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Wt){return Wt(new We(te,Qe))})},se=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 se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new gt(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new gt(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 gt(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 gt(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 Ae(this,void 0,void 0,function(){var te,z,ie=this;return Ke(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return te=se.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Tt(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 se=z._availableMarkerTypes.find(function(be){return be.typeName===ie.typeName});if(se!==void 0){var ne=z.addNewMarker(se);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 gt(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(se){return se.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(se){return se(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 Se&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Se):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){_e.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 gt(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 gt(te))}))},ae.instanceCounter=0,ae}()},63727:function(Nt,_t,fe){"use strict";fe.d(_t,{s:function(){return Ct},default:function(){return Cn}});var le=fe(67711),it=fe(98506),Ae=fe(15142),Ke=fe(16886),me=fe(33346),ge=fe(37463),_e=fe(6551),Ge=fe(6089),Ce=fe(18929),he=fe(59301),Ye=he.createContext({}),pe=Ye,rt=fe(26420),Me=fe(52873),Be="__rc_cascader_search_mark__",Le=function(nt,we,mt){var dt=mt.label,vt=dt===void 0?"":dt;return we.some(function(kt){return String(kt[vt]).toLowerCase().includes(nt.toLowerCase())})},ke=function(nt,we,mt,dt){return we.map(function(vt){return vt[dt.label]}).join(" / ")},tt=function(nt,we,mt,dt,vt,kt){var Yt=vt.filter,Pt=Yt===void 0?Le:Yt,Vt=vt.render,En=Vt===void 0?ke:Vt,gn=vt.limit,Mn=gn===void 0?50:gn,zn=vt.sort;return he.useMemo(function(){var An=[];if(!nt)return[];function wn(yn,Pn){var Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;yn.forEach(function(pn){if(!(!zn&&Mn!==!1&&Mn>0&&An.length>=Mn)){var In=[].concat((0,Ae.Z)(Pn),[pn]),Kt=pn[mt.children],Ut=Xn||pn.disabled;if((!Kt||Kt.length===0||kt)&&Pt(nt,In,{label:mt.label})){var jt;An.push((0,it.Z)((0,it.Z)({},pn),{},(jt={disabled:Ut},(0,Me.Z)(jt,mt.label,En(nt,In,dt,mt)),(0,Me.Z)(jt,Be,In),(0,Me.Z)(jt,mt.children,void 0),jt)))}Kt&&wn(pn[mt.children],In,Ut)}})}return wn(we,[]),zn&&An.sort(function(yn,Pn){return zn(yn[Be],Pn[Be],nt,mt)}),Mn!==!1&&Mn>0?An.slice(0,Mn):An},[nt,we,mt,dt,En,kt,Pt,zn,Mn])},et=tt,$e="__RC_CASCADER_SPLIT__",Ie="SHOW_PARENT",Re="SHOW_CHILD";function Ze(Oe){return Oe.join($e)}function je(Oe){return Oe.map(Ze)}function wt(Oe){return Oe.split($e)}function ze(Oe){var nt=Oe||{},we=nt.label,mt=nt.value,dt=nt.children,vt=mt||"value";return{label:we||"label",value:vt,key:vt,children:dt||"children"}}function Ne(Oe,nt){var we,mt;return(we=Oe.isLeaf)!==null&&we!==void 0?we:!((mt=Oe[nt.children])!==null&&mt!==void 0&&mt.length)}function ct(Oe){var nt=Oe.parentElement;if(nt){var we=Oe.offsetTop-nt.offsetTop;we-nt.scrollTop<0?nt.scrollTo({top:we}):we+Oe.offsetHeight-nt.scrollTop>nt.offsetHeight&&nt.scrollTo({top:we+Oe.offsetHeight-nt.offsetHeight})}}function Fe(Oe,nt){return Oe.map(function(we){var mt;return(mt=we[Be])===null||mt===void 0?void 0:mt.map(function(dt){return dt[nt.value]})})}function Xe(Oe){return Array.isArray(Oe)&&Array.isArray(Oe[0])}function Se(Oe){return Oe?Xe(Oe)?Oe:(Oe.length===0?[]:[Oe]).map(function(nt){return Array.isArray(nt)?nt:[nt]}):[]}function Ve(Oe,nt,we){var mt=new Set(Oe),dt=nt();return Oe.filter(function(vt){var kt=dt[vt],Yt=kt?kt.parent:null,Pt=kt?kt.children:null;return kt&&kt.node.disabled?!0:we===Re?!(Pt&&Pt.some(function(Vt){return Vt.key&&mt.has(Vt.key)})):!(Yt&&!Yt.node.disabled&&mt.has(Yt.key))})}function yt(Oe,nt,we){for(var mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,dt=nt,vt=[],kt=function(){var Vt,En,gn,Mn=Oe[Yt],zn=(Vt=dt)===null||Vt===void 0?void 0:Vt.findIndex(function(wn){var yn=wn[we.value];return mt?String(yn)===String(Mn):yn===Mn}),An=zn!==-1?(En=dt)===null||En===void 0?void 0:En[zn]:null;vt.push({value:(gn=An==null?void 0:An[we.value])!==null&&gn!==void 0?gn:Mn,index:zn,option:An}),dt=An==null?void 0:An[we.children]},Yt=0;Yt<Oe.length;Yt+=1)kt();return vt}var ht=function(Oe,nt,we,mt,dt){return he.useMemo(function(){var vt=dt||function(kt){var Yt=mt?kt.slice(-1):kt,Pt=" / ";return Yt.every(function(Vt){return["string","number"].includes((0,rt.Z)(Vt))})?Yt.join(Pt):Yt.reduce(function(Vt,En,gn){var Mn=he.isValidElement(En)?he.cloneElement(En,{key:gn}):En;return gn===0?[Mn]:[].concat((0,Ae.Z)(Vt),[Pt,Mn])},[])};return Oe.map(function(kt){var Yt,Pt=yt(kt,nt,we),Vt=vt(Pt.map(function(gn){var Mn,zn=gn.option,An=gn.value;return(Mn=zn==null?void 0:zn[we.label])!==null&&Mn!==void 0?Mn:An}),Pt.map(function(gn){var Mn=gn.option;return Mn})),En=Ze(kt);return{label:Vt,value:En,key:En,valueCells:kt,disabled:(Yt=Pt[Pt.length-1])===null||Yt===void 0||(Yt=Yt.option)===null||Yt===void 0?void 0:Yt.disabled}})},[Oe,nt,we,dt,mt])};function Qt(Oe,nt){return he.useCallback(function(we){var mt=[],dt=[];return we.forEach(function(vt){var kt=yt(vt,Oe,nt);kt.every(function(Yt){return Yt.option})?dt.push(vt):mt.push(vt)}),[dt,mt]},[Oe,nt])}var Ht=fe(34061),ve=function(Oe,nt){var we=he.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),mt=he.useCallback(function(){return we.current.options!==Oe&&(we.current.options=Oe,we.current.info=(0,Ht.I8)(Oe,{fieldNames:nt,initWrapper:function(vt){return(0,it.Z)((0,it.Z)({},vt),{},{pathKeyEntities:{}})},processEntity:function(vt,kt){var Yt=vt.nodes.map(function(Pt){return Pt[nt.value]}).join($e);kt.pathKeyEntities[Yt]=vt,vt.key=Yt}})),we.current.info.pathKeyEntities},[nt,Oe]);return mt};function de(Oe,nt){var we=he.useMemo(function(){return nt||[]},[nt]),mt=ve(we,Oe),dt=he.useCallback(function(vt){var kt=mt();return vt.map(function(Yt){var Pt=kt[Yt].nodes;return Pt.map(function(Vt){return Vt[Oe.value]})})},[mt,Oe]);return[we,mt,dt]}var st=fe(48736);function Zt(Oe){return he.useMemo(function(){if(!Oe)return[!1,{}];var nt={matchInputWidth:!0,limit:50};return Oe&&(0,rt.Z)(Oe)==="object"&&(nt=(0,it.Z)((0,it.Z)({},nt),Oe)),nt.limit<=0&&(nt.limit=!1),[!0,nt]},[Oe])}var St=fe(34643);function Pe(Oe,nt,we,mt,dt,vt,kt,Yt){return function(Pt){if(!Oe)nt(Pt);else{var Vt=Ze(Pt),En=je(we),gn=je(mt),Mn=En.includes(Vt),zn=dt.some(function(Ut){return Ze(Ut)===Vt}),An=we,wn=dt;if(zn&&!Mn)wn=dt.filter(function(Ut){return Ze(Ut)!==Vt});else{var yn=Mn?En.filter(function(Ut){return Ut!==Vt}):[].concat((0,Ae.Z)(En),[Vt]),Pn=vt(),Xn;if(Mn){var pn=(0,St.S)(yn,{checked:!1,halfCheckedKeys:gn},Pn);Xn=pn.checkedKeys}else{var In=(0,St.S)(yn,!0,Pn);Xn=In.checkedKeys}var Kt=Ve(Xn,vt,Yt);An=kt(Kt)}nt([].concat((0,Ae.Z)(wn),(0,Ae.Z)(An)))}}}function at(Oe,nt,we,mt,dt){return he.useMemo(function(){var vt=dt(nt),kt=(0,Ke.Z)(vt,2),Yt=kt[0],Pt=kt[1];if(!Oe||!nt.length)return[Yt,[],Pt];var Vt=je(Yt),En=we(),gn=(0,St.S)(Vt,!0,En),Mn=gn.checkedKeys,zn=gn.halfCheckedKeys;return[mt(Mn),mt(zn),Pt]},[Oe,nt,we,mt,dt])}var lt=fe(92310),tn=fe.n(lt),gt=he.memo(function(Oe){var nt=Oe.children;return nt},function(Oe,nt){return!nt.open}),Tt=gt;function We(Oe){var nt,we=Oe.prefixCls,mt=Oe.checked,dt=Oe.halfChecked,vt=Oe.disabled,kt=Oe.onClick,Yt=Oe.disableCheckbox,Pt=he.useContext(pe),Vt=Pt.checkable,En=typeof Vt!="boolean"?Vt:null;return he.createElement("span",{className:tn()("".concat(we),(nt={},(0,Me.Z)(nt,"".concat(we,"-checked"),mt),(0,Me.Z)(nt,"".concat(we,"-indeterminate"),!mt&&dt),(0,Me.Z)(nt,"".concat(we,"-disabled"),vt||Yt),nt)),onClick:kt},En)}var Et="__cascader_fix_label__";function Bt(Oe){var nt=Oe.prefixCls,we=Oe.multiple,mt=Oe.options,dt=Oe.activeValue,vt=Oe.prevValuePath,kt=Oe.onToggleOpen,Yt=Oe.onSelect,Pt=Oe.onActive,Vt=Oe.checkedSet,En=Oe.halfCheckedSet,gn=Oe.loadingKeys,Mn=Oe.isSelectable,zn=Oe.disabled,An="".concat(nt,"-menu"),wn="".concat(nt,"-menu-item"),yn=he.useContext(pe),Pn=yn.fieldNames,Xn=yn.changeOnSelect,pn=yn.expandTrigger,In=yn.expandIcon,Kt=yn.loadingIcon,Ut=yn.dropdownMenuColumnStyle,jt=yn.optionRender,vn=pn==="hover",Wn=function(Gn){return zn||Gn},Ln=he.useMemo(function(){return mt.map(function(mn){var Gn,Rn=mn.disabled,Fn=mn.disableCheckbox,On=mn[Be],tr=(Gn=mn[Et])!==null&&Gn!==void 0?Gn:mn[Pn.label],Mt=mn[Pn.value],qe=Ne(mn,Pn),rn=On?On.map(function(At){return At[Pn.value]}):[].concat((0,Ae.Z)(vt),[Mt]),xn=Ze(rn),_n=gn.includes(xn),xe=Vt.has(xn),De=En.has(xn);return{disabled:Rn,label:tr,value:Mt,isLeaf:qe,isLoading:_n,checked:xe,halfChecked:De,option:mn,disableCheckbox:Fn,fullPath:rn,fullPathKey:xn}})},[mt,Vt,Pn,En,gn,vt]);return he.createElement("ul",{className:An,role:"menu"},Ln.map(function(mn){var Gn,Rn=mn.disabled,Fn=mn.label,On=mn.value,tr=mn.isLeaf,Mt=mn.isLoading,qe=mn.checked,rn=mn.halfChecked,xn=mn.option,_n=mn.fullPath,xe=mn.fullPathKey,De=mn.disableCheckbox,At=function(){if(!Wn(Rn)){var Gt=(0,Ae.Z)(_n);vn&&tr&&Gt.pop(),Pt(Gt)}},ft=function(){Mn(xn)&&!Wn(Rn)&&Yt(_n,tr)},Te;return typeof xn.title=="string"?Te=xn.title:typeof Fn=="string"&&(Te=Fn),he.createElement("li",{key:xe,className:tn()(wn,(Gn={},(0,Me.Z)(Gn,"".concat(wn,"-expand"),!tr),(0,Me.Z)(Gn,"".concat(wn,"-active"),dt===On||dt===xe),(0,Me.Z)(Gn,"".concat(wn,"-disabled"),Wn(Rn)),(0,Me.Z)(Gn,"".concat(wn,"-loading"),Mt),Gn)),style:Ut,role:"menuitemcheckbox",title:Te,"aria-checked":qe,"data-path-key":xe,onClick:function(){At(),!De&&(!we||tr)&&ft()},onDoubleClick:function(){Xn&&kt(!1)},onMouseEnter:function(){vn&&At()},onMouseDown:function(Gt){Gt.preventDefault()}},we&&he.createElement(We,{prefixCls:"".concat(nt,"-checkbox"),checked:qe,halfChecked:rn,disabled:Wn(Rn)||De,disableCheckbox:De,onClick:function(Gt){De||(Gt.stopPropagation(),ft())}}),he.createElement("div",{className:"".concat(wn,"-content")},jt?jt(xn):Fn),!Mt&&In&&!tr&&he.createElement("div",{className:"".concat(wn,"-expand-icon")},In),Mt&&Kt&&he.createElement("div",{className:"".concat(wn,"-loading-icon")},Kt))}))}var ae=function(nt,we){var mt=he.useContext(pe),dt=mt.values,vt=dt[0],kt=he.useState([]),Yt=(0,Ke.Z)(kt,2),Pt=Yt[0],Vt=Yt[1];return he.useEffect(function(){nt||Vt(vt||[])},[we,vt]),[Pt,Vt]},te=ae,z=fe(10228),ie=function(Oe,nt,we,mt,dt,vt,kt){var Yt=kt.direction,Pt=kt.searchValue,Vt=kt.toggleOpen,En=kt.open,gn=Yt==="rtl",Mn=he.useMemo(function(){for(var Ut=-1,jt=nt,vn=[],Wn=[],Ln=mt.length,mn=Fe(nt,we),Gn=function(Mt){var qe=jt.findIndex(function(rn,xn){return(mn[xn]?Ze(mn[xn]):rn[we.value])===mt[Mt]});if(qe===-1)return 1;Ut=qe,vn.push(Ut),Wn.push(mt[Mt]),jt=jt[Ut][we.children]},Rn=0;Rn<Ln&&jt&&!Gn(Rn);Rn+=1);for(var Fn=nt,On=0;On<vn.length-1;On+=1)Fn=Fn[vn[On]][we.children];return[Wn,Ut,Fn,mn]},[mt,we,nt]),zn=(0,Ke.Z)(Mn,4),An=zn[0],wn=zn[1],yn=zn[2],Pn=zn[3],Xn=function(jt){dt(jt)},pn=function(jt){var vn=yn.length,Wn=wn;Wn===-1&&jt<0&&(Wn=vn);for(var Ln=0;Ln<vn;Ln+=1){Wn=(Wn+jt+vn)%vn;var mn=yn[Wn];if(mn&&!mn.disabled){var Gn=An.slice(0,-1).concat(Pn[Wn]?Ze(Pn[Wn]):mn[we.value]);Xn(Gn);return}}},In=function(){if(An.length>1){var jt=An.slice(0,-1);Xn(jt)}else Vt(!1)},Kt=function(){var jt,vn=((jt=yn[wn])===null||jt===void 0?void 0:jt[we.children])||[],Wn=vn.find(function(mn){return!mn.disabled});if(Wn){var Ln=[].concat((0,Ae.Z)(An),[Wn[we.value]]);Xn(Ln)}};he.useImperativeHandle(Oe,function(){return{onKeyDown:function(jt){var vn=jt.which;switch(vn){case z.Z.UP:case z.Z.DOWN:{var Wn=0;vn===z.Z.UP?Wn=-1:vn===z.Z.DOWN&&(Wn=1),Wn!==0&&pn(Wn);break}case z.Z.LEFT:{if(Pt)break;gn?Kt():In();break}case z.Z.RIGHT:{if(Pt)break;gn?In():Kt();break}case z.Z.BACKSPACE:{Pt||In();break}case z.Z.ENTER:{if(An.length){var Ln=yn[wn],mn=(Ln==null?void 0:Ln[Be])||[];mn.length?vt(mn.map(function(Gn){return Gn[we.value]}),mn[mn.length-1]):vt(An,yn[wn])}break}case z.Z.ESC:Vt(!1),En&&jt.stopPropagation()}},onKeyUp:function(){}}})},se=he.forwardRef(function(Oe,nt){var we,mt,dt,vt=Oe.prefixCls,kt=Oe.multiple,Yt=Oe.searchValue,Pt=Oe.toggleOpen,Vt=Oe.notFoundContent,En=Oe.direction,gn=Oe.open,Mn=Oe.disabled,zn=he.useRef(null),An=En==="rtl",wn=he.useContext(pe),yn=wn.options,Pn=wn.values,Xn=wn.halfValues,pn=wn.fieldNames,In=wn.changeOnSelect,Kt=wn.onSelect,Ut=wn.searchOptions,jt=wn.dropdownPrefixCls,vn=wn.loadData,Wn=wn.expandTrigger,Ln=jt||vt,mn=he.useState([]),Gn=(0,Ke.Z)(mn,2),Rn=Gn[0],Fn=Gn[1],On=function(nn){if(!(!vn||Yt)){var Lt=yt(nn,yn,pn),sn=Lt.map(function(kn){var Un=kn.option;return Un}),un=sn[sn.length-1];if(un&&!Ne(un,pn)){var Dn=Ze(nn);Fn(function(kn){return[].concat((0,Ae.Z)(kn),[Dn])}),vn(sn)}}};he.useEffect(function(){Rn.length&&Rn.forEach(function(ut){var nn=wt(ut),Lt=yt(nn,yn,pn,!0).map(function(un){var Dn=un.option;return Dn}),sn=Lt[Lt.length-1];(!sn||sn[pn.children]||Ne(sn,pn))&&Fn(function(un){return un.filter(function(Dn){return Dn!==ut})})})},[yn,Rn,pn]);var tr=he.useMemo(function(){return new Set(je(Pn))},[Pn]),Mt=he.useMemo(function(){return new Set(je(Xn))},[Xn]),qe=te(kt,gn),rn=(0,Ke.Z)(qe,2),xn=rn[0],_n=rn[1],xe=function(nn){_n(nn),On(nn)},De=function(nn){if(Mn)return!1;var Lt=nn.disabled,sn=Ne(nn,pn);return!Lt&&(sn||In||kt)},At=function(nn,Lt){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Kt(nn),!kt&&(Lt||In&&(Wn==="hover"||sn))&&Pt(!1)},ft=he.useMemo(function(){return Yt?Ut:yn},[Yt,Ut,yn]),Te=he.useMemo(function(){for(var ut=[{options:ft}],nn=ft,Lt=Fe(nn,pn),sn=function(){var kn=xn[un],Un=nn.find(function(Jn,or){return(Lt[or]?Ze(Lt[or]):Jn[pn.value])===kn}),qn=Un==null?void 0:Un[pn.children];if(!(qn!=null&&qn.length))return 1;nn=qn,ut.push({options:qn})},un=0;un<xn.length&&!sn();un+=1);return ut},[ft,xn,pn]),pt=function(nn,Lt){De(Lt)&&At(nn,Ne(Lt,pn),!0)};ie(nt,ft,pn,xn,xe,pt,{direction:En,searchValue:Yt,toggleOpen:Pt,open:gn}),he.useEffect(function(){if(!Yt)for(var ut=0;ut<xn.length;ut+=1){var nn,Lt=xn.slice(0,ut+1),sn=Ze(Lt),un=(nn=zn.current)===null||nn===void 0?void 0:nn.querySelector('li[data-path-key="'.concat(sn.replace(/\\{0,2}"/g,'\\"'),'"]'));un&&ct(un)}},[xn,Yt]);var Gt=!((we=Te[0])!==null&&we!==void 0&&(we=we.options)!==null&&we!==void 0&&we.length),an=[(mt={},(0,Me.Z)(mt,pn.value,"__EMPTY__"),(0,Me.Z)(mt,Et,Vt),(0,Me.Z)(mt,"disabled",!0),mt)],fn=(0,it.Z)((0,it.Z)({},Oe),{},{multiple:!Gt&&kt,onSelect:At,onActive:xe,onToggleOpen:Pt,checkedSet:tr,halfCheckedSet:Mt,loadingKeys:Rn,isSelectable:De}),He=Gt?[{options:an}]:Te,Xt=He.map(function(ut,nn){var Lt=xn.slice(0,nn),sn=xn[nn];return he.createElement(Bt,(0,le.Z)({key:nn},fn,{prefixCls:Ln,options:ut.options,prevValuePath:Lt,activeValue:sn}))});return he.createElement(Tt,{open:gn},he.createElement("div",{className:tn()("".concat(Ln,"-menus"),(dt={},(0,Me.Z)(dt,"".concat(Ln,"-menu-empty"),Gt),(0,Me.Z)(dt,"".concat(Ln,"-rtl"),An),dt)),ref:zn},Xt))}),ne=se,be=he.forwardRef(function(Oe,nt){var we=(0,ge.lk)();return he.createElement(ne,(0,le.Z)({},Oe,we,{ref:nt}))}),Qe=be,Wt=fe(70425);function Ft(){}function Ct(Oe){var nt,we=Oe,mt=we.prefixCls,dt=mt===void 0?"rc-cascader":mt,vt=we.style,kt=we.className,Yt=we.options,Pt=we.checkable,Vt=we.defaultValue,En=we.value,gn=we.fieldNames,Mn=we.changeOnSelect,zn=we.onChange,An=we.showCheckedStrategy,wn=we.loadData,yn=we.expandTrigger,Pn=we.expandIcon,Xn=Pn===void 0?">":Pn,pn=we.loadingIcon,In=we.direction,Kt=we.notFoundContent,Ut=Kt===void 0?"Not Found":Kt,jt=we.disabled,vn=!!Pt,Wn=(0,Wt.C8)(Vt,{value:En,postState:Se}),Ln=(0,Ke.Z)(Wn,2),mn=Ln[0],Gn=Ln[1],Rn=he.useMemo(function(){return ze(gn)},[JSON.stringify(gn)]),Fn=de(Rn,Yt),On=(0,Ke.Z)(Fn,3),tr=On[0],Mt=On[1],qe=On[2],rn=Qt(tr,Rn),xn=at(vn,mn,Mt,qe,rn),_n=(0,Ke.Z)(xn,3),xe=_n[0],De=_n[1],At=_n[2],ft=(0,Wt.zX)(function(He){if(Gn(He),zn){var Xt=Se(He),ut=Xt.map(function(sn){return yt(sn,tr,Rn).map(function(un){return un.option})}),nn=vn?Xt:Xt[0],Lt=vn?ut:ut[0];zn(nn,Lt)}}),Te=Pe(vn,ft,xe,De,At,Mt,qe,An),pt=(0,Wt.zX)(function(He){Te(He)}),Gt=he.useMemo(function(){return{options:tr,fieldNames:Rn,values:xe,halfValues:De,changeOnSelect:Mn,onSelect:pt,checkable:Pt,searchOptions:[],dropdownPrefixCls:void 0,loadData:wn,expandTrigger:yn,expandIcon:Xn,loadingIcon:pn,dropdownMenuColumnStyle:void 0}},[tr,Rn,xe,De,Mn,pt,Pt,wn,yn,Xn,pn]),an="".concat(dt,"-panel"),fn=!tr.length;return he.createElement(pe.Provider,{value:Gt},he.createElement("div",{className:tn()(an,(nt={},(0,Me.Z)(nt,"".concat(an,"-rtl"),In==="rtl"),(0,Me.Z)(nt,"".concat(an,"-empty"),fn),nt),kt),style:vt},fn?Ut:he.createElement(ne,{prefixCls:dt,searchValue:"",multiple:vn,toggleOpen:Ft,open:!0,direction:In,disabled:jt})))}function Dt(Oe){var nt=Oe.onPopupVisibleChange,we=Oe.popupVisible,mt=Oe.popupClassName,dt=Oe.popupPlacement;warning(!nt,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(we===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(mt===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(dt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function on(Oe,nt){if(Oe){var we=function mt(dt){for(var vt=0;vt<dt.length;vt++){var kt=dt[vt];if(kt[nt==null?void 0:nt.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(kt[nt==null?void 0:nt.children])&&mt(kt[nt==null?void 0:nt.children]))return!0}};we(Oe)}}var $t=null,cn=["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"],ln=he.forwardRef(function(Oe,nt){var we=Oe.id,mt=Oe.prefixCls,dt=mt===void 0?"rc-cascader":mt,vt=Oe.fieldNames,kt=Oe.defaultValue,Yt=Oe.value,Pt=Oe.changeOnSelect,Vt=Oe.onChange,En=Oe.displayRender,gn=Oe.checkable,Mn=Oe.autoClearSearchValue,zn=Mn===void 0?!0:Mn,An=Oe.searchValue,wn=Oe.onSearch,yn=Oe.showSearch,Pn=Oe.expandTrigger,Xn=Oe.options,pn=Oe.dropdownPrefixCls,In=Oe.loadData,Kt=Oe.popupVisible,Ut=Oe.open,jt=Oe.popupClassName,vn=Oe.dropdownClassName,Wn=Oe.dropdownMenuColumnStyle,Ln=Oe.dropdownStyle,mn=Oe.popupPlacement,Gn=Oe.placement,Rn=Oe.onDropdownVisibleChange,Fn=Oe.onPopupVisibleChange,On=Oe.expandIcon,tr=On===void 0?">":On,Mt=Oe.loadingIcon,qe=Oe.children,rn=Oe.dropdownMatchSelectWidth,xn=rn===void 0?!1:rn,_n=Oe.showCheckedStrategy,xe=_n===void 0?Ie:_n,De=Oe.optionRender,At=(0,me.Z)(Oe,cn),ft=(0,_e.ZP)(we),Te=!!gn,pt=(0,Ce.Z)(kt,{value:Yt,postState:Se}),Gt=(0,Ke.Z)(pt,2),an=Gt[0],fn=Gt[1],He=he.useMemo(function(){return ze(vt)},[JSON.stringify(vt)]),Xt=de(He,Xn),ut=(0,Ke.Z)(Xt,3),nn=ut[0],Lt=ut[1],sn=ut[2],un=(0,Ce.Z)("",{value:An,postState:function(Cr){return Cr||""}}),Dn=(0,Ke.Z)(un,2),kn=Dn[0],Un=Dn[1],qn=function(Cr,xr){Un(Cr),xr.source!=="blur"&&wn&&wn(Cr)},Jn=Zt(yn),or=(0,Ke.Z)(Jn,2),Kn=or[0],yr=or[1],Fr=et(kn,nn,He,pn||dt,yr,Pt||Te),ur=Qt(nn,He),br=at(Te,an,Lt,sn,ur),Sr=(0,Ke.Z)(br,3),cr=Sr[0],$n=Sr[1],Er=Sr[2],dr=he.useMemo(function(){var Ir=je(cr),Cr=Ve(Ir,Lt,xe);return[].concat((0,Ae.Z)(Er),(0,Ae.Z)(sn(Cr)))},[cr,Lt,sn,Er,xe]),hr=ht(dr,nn,He,Te,En),mr=(0,Ge.Z)(function(Ir){if(fn(Ir),Vt){var Cr=Se(Ir),xr=Cr.map(function(Jt){return yt(Jt,nn,He).map(function(bt){return bt.option})}),Vn=Te?Cr:Cr[0],Ot=Te?xr:xr[0];Vt(Vn,Ot)}}),Tr=Pe(Te,mr,cr,$n,Er,Lt,sn,xe),vr=(0,Ge.Z)(function(Ir){(!Te||zn)&&Un(""),Tr(Ir)}),lr=function(Cr,xr){if(xr.type==="clear"){mr([]);return}var Vn=xr.values[0],Ot=Vn.valueCells;vr(Ot)},nr=Ut!==void 0?Ut:Kt,fr=vn||jt,zr=Gn||mn,Pr=function(Cr){Rn==null||Rn(Cr),Fn==null||Fn(Cr)},kr=he.useMemo(function(){return{options:nn,fieldNames:He,values:cr,halfValues:$n,changeOnSelect:Pt,onSelect:vr,checkable:gn,searchOptions:Fr,dropdownPrefixCls:pn,loadData:In,expandTrigger:Pn,expandIcon:tr,loadingIcon:Mt,dropdownMenuColumnStyle:Wn,optionRender:De}},[nn,He,cr,$n,Pt,vr,gn,Fr,pn,In,Pn,tr,Mt,Wn,De]),Xr=!(kn?Fr:nn).length,Lr=kn&&yr.matchInputWidth||Xr?{}:{minWidth:"auto"};return he.createElement(pe.Provider,{value:kr},he.createElement(ge.Ac,(0,le.Z)({},At,{ref:nt,id:ft,prefixCls:dt,autoClearSearchValue:zn,dropdownMatchSelectWidth:xn,dropdownStyle:(0,it.Z)((0,it.Z)({},Lr),Ln),displayValues:hr,onDisplayValuesChange:lr,mode:Te?"multiple":void 0,searchValue:kn,onSearch:qn,showSearch:Kn,OptionList:Qe,emptyOptions:Xr,open:nr,dropdownClassName:fr,placement:zr,onDropdownVisibleChange:Pr,getRawInputElement:function(){return qe}})))});ln.SHOW_PARENT=Ie,ln.SHOW_CHILD=Re,ln.Panel=Ct;var zt=ln,Cn=zt},66042:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Xe}});var le=fe(98506),it=fe(16886),Ae=fe(43403),Ke=fe(34280),me=fe(59301),ge=me.createContext(null),_e=me.createContext({}),Ge=ge,Ce=fe(52873),he=fe(67711),Ye=fe(92310),pe=fe.n(Ye),rt=fe(77900),Me=fe(10228),Be=fe(26112),Le=fe(33346),ke=fe(8654),tt=["prefixCls","className","containerRef"],et=function(Ve){var yt=Ve.prefixCls,ht=Ve.className,Qt=Ve.containerRef,Ht=(0,Le.Z)(Ve,tt),ve=me.useContext(_e),de=ve.panel,st=(0,ke.x1)(de,Qt);return me.createElement("div",(0,he.Z)({className:pe()("".concat(yt,"-content"),ht),role:"dialog",ref:st},(0,Be.Z)(Ve,{aria:!0}),{"aria-modal":"true"},Ht))},$e=et,Ie=fe(48736);function Re(Se){return typeof Se=="string"&&String(Number(Se))===Se?((0,Ie.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Se)):Se}function Ze(Se){warning(!("wrapperClassName"in Se),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Se.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var je={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function wt(Se,Ve){var yt,ht,Qt,Ht=Se.prefixCls,ve=Se.open,de=Se.placement,st=Se.inline,Zt=Se.push,St=Se.forceRender,Pe=Se.autoFocus,at=Se.keyboard,lt=Se.classNames,tn=Se.rootClassName,gt=Se.rootStyle,Tt=Se.zIndex,We=Se.className,Et=Se.id,Bt=Se.style,ae=Se.motion,te=Se.width,z=Se.height,ie=Se.children,se=Se.mask,ne=Se.maskClosable,be=Se.maskMotion,Qe=Se.maskClassName,Wt=Se.maskStyle,Ft=Se.afterOpenChange,Ct=Se.onClose,Dt=Se.onMouseEnter,on=Se.onMouseOver,$t=Se.onMouseLeave,cn=Se.onClick,ln=Se.onKeyDown,zt=Se.onKeyUp,Cn=Se.styles,Oe=Se.drawerRender,nt=me.useRef(),we=me.useRef(),mt=me.useRef();me.useImperativeHandle(Ve,function(){return nt.current});var dt=function(In){var Kt=In.keyCode,Ut=In.shiftKey;switch(Kt){case Me.Z.TAB:{if(Kt===Me.Z.TAB){if(!Ut&&document.activeElement===mt.current){var jt;(jt=we.current)===null||jt===void 0||jt.focus({preventScroll:!0})}else if(Ut&&document.activeElement===we.current){var vn;(vn=mt.current)===null||vn===void 0||vn.focus({preventScroll:!0})}}break}case Me.Z.ESC:{Ct&&at&&(In.stopPropagation(),Ct(In));break}}};me.useEffect(function(){if(ve&&Pe){var pn;(pn=nt.current)===null||pn===void 0||pn.focus({preventScroll:!0})}},[ve]);var vt=me.useState(!1),kt=(0,it.Z)(vt,2),Yt=kt[0],Pt=kt[1],Vt=me.useContext(Ge),En;typeof Zt=="boolean"?En=Zt?{}:{distance:0}:En=Zt||{};var gn=(yt=(ht=(Qt=En)===null||Qt===void 0?void 0:Qt.distance)!==null&&ht!==void 0?ht:Vt==null?void 0:Vt.pushDistance)!==null&&yt!==void 0?yt:180,Mn=me.useMemo(function(){return{pushDistance:gn,push:function(){Pt(!0)},pull:function(){Pt(!1)}}},[gn]);me.useEffect(function(){if(ve){var pn;Vt==null||(pn=Vt.push)===null||pn===void 0||pn.call(Vt)}else{var In;Vt==null||(In=Vt.pull)===null||In===void 0||In.call(Vt)}},[ve]),me.useEffect(function(){return function(){var pn;Vt==null||(pn=Vt.pull)===null||pn===void 0||pn.call(Vt)}},[]);var zn=se&&me.createElement(rt.default,(0,he.Z)({key:"mask"},be,{visible:ve}),function(pn,In){var Kt=pn.className,Ut=pn.style;return me.createElement("div",{className:pe()("".concat(Ht,"-mask"),Kt,lt==null?void 0:lt.mask,Qe),style:(0,le.Z)((0,le.Z)((0,le.Z)({},Ut),Wt),Cn==null?void 0:Cn.mask),onClick:ne&&ve?Ct:void 0,ref:In})}),An=typeof ae=="function"?ae(de):ae,wn={};if(Yt&&gn)switch(de){case"top":wn.transform="translateY(".concat(gn,"px)");break;case"bottom":wn.transform="translateY(".concat(-gn,"px)");break;case"left":wn.transform="translateX(".concat(gn,"px)");break;default:wn.transform="translateX(".concat(-gn,"px)");break}de==="left"||de==="right"?wn.width=Re(te):wn.height=Re(z);var yn={onMouseEnter:Dt,onMouseOver:on,onMouseLeave:$t,onClick:cn,onKeyDown:ln,onKeyUp:zt},Pn=me.createElement(rt.default,(0,he.Z)({key:"panel"},An,{visible:ve,forceRender:St,onVisibleChanged:function(In){Ft==null||Ft(In)},removeOnLeave:!1,leavedClassName:"".concat(Ht,"-content-wrapper-hidden")}),function(pn,In){var Kt=pn.className,Ut=pn.style,jt=me.createElement($e,(0,he.Z)({id:Et,containerRef:In,prefixCls:Ht,className:pe()(We,lt==null?void 0:lt.content),style:(0,le.Z)((0,le.Z)({},Bt),Cn==null?void 0:Cn.content)},(0,Be.Z)(Se,{aria:!0}),yn),ie);return me.createElement("div",(0,he.Z)({className:pe()("".concat(Ht,"-content-wrapper"),lt==null?void 0:lt.wrapper,Kt),style:(0,le.Z)((0,le.Z)((0,le.Z)({},wn),Ut),Cn==null?void 0:Cn.wrapper)},(0,Be.Z)(Se,{data:!0})),Oe?Oe(jt):jt)}),Xn=(0,le.Z)({},gt);return Tt&&(Xn.zIndex=Tt),me.createElement(Ge.Provider,{value:Mn},me.createElement("div",{className:pe()(Ht,"".concat(Ht,"-").concat(de),tn,(0,Ce.Z)((0,Ce.Z)({},"".concat(Ht,"-open"),ve),"".concat(Ht,"-inline"),st)),style:Xn,tabIndex:-1,ref:nt,onKeyDown:dt},zn,me.createElement("div",{tabIndex:0,ref:we,style:je,"aria-hidden":"true","data-sentinel":"start"}),Pn,me.createElement("div",{tabIndex:0,ref:mt,style:je,"aria-hidden":"true","data-sentinel":"end"})))}var ze=me.forwardRef(wt),Ne=ze,ct=function(Ve){var yt=Ve.open,ht=yt===void 0?!1:yt,Qt=Ve.prefixCls,Ht=Qt===void 0?"rc-drawer":Qt,ve=Ve.placement,de=ve===void 0?"right":ve,st=Ve.autoFocus,Zt=st===void 0?!0:st,St=Ve.keyboard,Pe=St===void 0?!0:St,at=Ve.width,lt=at===void 0?378:at,tn=Ve.mask,gt=tn===void 0?!0:tn,Tt=Ve.maskClosable,We=Tt===void 0?!0:Tt,Et=Ve.getContainer,Bt=Ve.forceRender,ae=Ve.afterOpenChange,te=Ve.destroyOnClose,z=Ve.onMouseEnter,ie=Ve.onMouseOver,se=Ve.onMouseLeave,ne=Ve.onClick,be=Ve.onKeyDown,Qe=Ve.onKeyUp,Wt=Ve.panelRef,Ft=me.useState(!1),Ct=(0,it.Z)(Ft,2),Dt=Ct[0],on=Ct[1],$t=me.useState(!1),cn=(0,it.Z)($t,2),ln=cn[0],zt=cn[1];(0,Ke.Z)(function(){zt(!0)},[]);var Cn=ln?ht:!1,Oe=me.useRef(),nt=me.useRef();(0,Ke.Z)(function(){Cn&&(nt.current=document.activeElement)},[Cn]);var we=function(Yt){var Pt;if(on(Yt),ae==null||ae(Yt),!Yt&&nt.current&&!((Pt=Oe.current)!==null&&Pt!==void 0&&Pt.contains(nt.current))){var Vt;(Vt=nt.current)===null||Vt===void 0||Vt.focus({preventScroll:!0})}},mt=me.useMemo(function(){return{panel:Wt}},[Wt]);if(!Bt&&!Dt&&!Cn&&te)return null;var dt={onMouseEnter:z,onMouseOver:ie,onMouseLeave:se,onClick:ne,onKeyDown:be,onKeyUp:Qe},vt=(0,le.Z)((0,le.Z)({},Ve),{},{open:Cn,prefixCls:Ht,placement:de,autoFocus:Zt,keyboard:Pe,width:lt,mask:gt,maskClosable:We,inline:Et===!1,afterOpenChange:we,ref:Oe},dt);return me.createElement(_e.Provider,{value:mt},me.createElement(Ae.Z,{open:Cn||Bt||Dt,autoDestroy:!1,getContainer:Et,autoLock:gt&&(Cn||Dt)},me.createElement(Ne,vt)))},Fe=ct,Xe=Fe},6551:function(Nt,_t,fe){"use strict";fe.d(_t,{ZP:function(){return _e}});var le=fe(16886),it=fe(59301),Ae=fe(47273),Ke=0,me=(0,Ae.Z)();function ge(){var Ge;return me?(Ge=Ke,Ke+=1):Ge="TEST_OR_SSR",Ge}function _e(Ge){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()))},[]),Ge||Ye}},37463:function(Nt,_t,fe){"use strict";fe.d(_t,{Ac:function(){return we},Xo:function(){return dt},Wx:function(){return kt},ZP:function(){return _n},lk:function(){return $e}});var le=fe(67711),it=fe(15142),Ae=fe(52873),Ke=fe(98506),me=fe(16886),ge=fe(33346),_e=fe(26420),Ge=fe(18929),Ce=fe(48736),he=fe(59301),Ye=fe(92310),pe=fe.n(Ye),rt=fe(34280),Me=fe(49658),Be=fe(8654),Le=function(De){var At=De.className,ft=De.customizeIcon,Te=De.customizeIconProps,pt=De.children,Gt=De.onMouseDown,an=De.onClick,fn=typeof ft=="function"?ft(Te):ft;return he.createElement("span",{className:At,onMouseDown:function(Xt){Xt.preventDefault(),Gt==null||Gt(Xt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:an,"aria-hidden":!0},fn!==void 0?fn:he.createElement("span",{className:pe()(At.split(/\s+/).map(function(He){return"".concat(He,"-icon")}))},pt))},ke=Le,tt=function(De,At,ft,Te,pt){var Gt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,an=arguments.length>6?arguments[6]:void 0,fn=arguments.length>7?arguments[7]:void 0,He=he.useMemo(function(){if((0,_e.Z)(Te)==="object")return Te.clearIcon;if(pt)return pt},[Te,pt]),Xt=he.useMemo(function(){return!!(!Gt&&Te&&(ft.length||an)&&!(fn==="combobox"&&an===""))},[Te,Gt,ft.length,an,fn]);return{allowClear:Xt,clearIcon:he.createElement(ke,{className:"".concat(De,"-clear"),onMouseDown:At,customizeIcon:He},"\xD7")}},et=he.createContext(null);function $e(){return he.useContext(et)}function Ie(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=he.useState(!1),At=(0,me.Z)(De,2),ft=At[0],Te=At[1],pt=he.useRef(null),Gt=function(){window.clearTimeout(pt.current)};he.useEffect(function(){return Gt},[]);var an=function(He,Xt){Gt(),pt.current=window.setTimeout(function(){Te(He),Xt&&Xt()},xe)};return[ft,an,Gt]}function Re(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=he.useRef(null),At=he.useRef(null);he.useEffect(function(){return function(){window.clearTimeout(At.current)}},[]);function ft(Te){(Te||De.current===null)&&(De.current=Te),window.clearTimeout(At.current),At.current=window.setTimeout(function(){De.current=null},xe)}return[function(){return De.current},ft]}function Ze(xe,De,At,ft){var Te=he.useRef(null);Te.current={open:De,triggerOpen:At,customizedTrigger:ft},he.useEffect(function(){function pt(Gt){var an;if(!((an=Te.current)!==null&&an!==void 0&&an.customizedTrigger)){var fn=Gt.target;fn.shadowRoot&&Gt.composed&&(fn=Gt.composedPath()[0]||fn),Te.current.open&&xe().filter(function(He){return He}).every(function(He){return!He.contains(fn)&&He!==fn})&&Te.current.triggerOpen(!1)}}return window.addEventListener("mousedown",pt),function(){return window.removeEventListener("mousedown",pt)}},[])}var je=fe(10228);function wt(xe){return xe&&![je.Z.ESC,je.Z.SHIFT,je.Z.BACKSPACE,je.Z.TAB,je.Z.WIN_KEY,je.Z.ALT,je.Z.META,je.Z.WIN_KEY_RIGHT,je.Z.CTRL,je.Z.SEMICOLON,je.Z.EQUALS,je.Z.CAPS_LOCK,je.Z.CONTEXT_MENU,je.Z.F1,je.Z.F2,je.Z.F3,je.Z.F4,je.Z.F5,je.Z.F6,je.Z.F7,je.Z.F8,je.Z.F9,je.Z.F10,je.Z.F11,je.Z.F12].includes(xe)}var ze=fe(26112),Ne=fe(11780);function ct(xe,De,At){var ft=(0,Ke.Z)((0,Ke.Z)({},xe),At?De:{});return Object.keys(De).forEach(function(Te){var pt=De[Te];typeof pt=="function"&&(ft[Te]=function(){for(var Gt,an=arguments.length,fn=new Array(an),He=0;He<an;He++)fn[He]=arguments[He];return pt.apply(void 0,fn),(Gt=xe[Te])===null||Gt===void 0?void 0:Gt.call.apply(Gt,[xe].concat(fn))})}),ft}var Fe=ct,Xe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Se=function(De,At){var ft=De.prefixCls,Te=De.id,pt=De.inputElement,Gt=De.autoFocus,an=De.autoComplete,fn=De.editable,He=De.activeDescendantId,Xt=De.value,ut=De.open,nn=De.attrs,Lt=(0,ge.Z)(De,Xe),sn=pt||he.createElement("input",null),un=sn,Dn=un.ref,kn=un.props;return(0,Ce.Kp)(!("maxLength"in sn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),sn=he.cloneElement(sn,(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({type:"search"},Fe(Lt,kn,!0)),{},{id:Te,ref:(0,Be.sQ)(At,Dn),autoComplete:an||"off",autoFocus:Gt,className:pe()("".concat(ft,"-selection-search-input"),kn==null?void 0:kn.className),role:"combobox","aria-expanded":ut||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Te,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Te,"_list"),"aria-activedescendant":ut?He:void 0},nn),{},{value:fn?Xt:"",readOnly:!fn,unselectable:fn?null:"on",style:(0,Ke.Z)((0,Ke.Z)({},kn.style),{},{opacity:fn?null:0})})),sn},Ve=he.forwardRef(Se),yt=Ve;function ht(xe){return Array.isArray(xe)?xe:xe!==void 0?[xe]:[]}var Qt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ht=Qt;function ve(xe){return xe!=null}function de(xe){return!xe&&xe!==0}function st(xe){return["string","number"].includes((0,_e.Z)(xe))}function Zt(xe){var De=void 0;return xe&&(st(xe.title)?De=xe.title.toString():st(xe.label)&&(De=xe.label.toString())),De}function St(xe,De){Ht?he.useLayoutEffect(xe,De):he.useEffect(xe,De)}function Pe(xe){var De;return(De=xe.key)!==null&&De!==void 0?De:xe.value}var at=function(De){De.preventDefault(),De.stopPropagation()},lt=function(De){var At=De.id,ft=De.prefixCls,Te=De.values,pt=De.open,Gt=De.searchValue,an=De.autoClearSearchValue,fn=De.inputRef,He=De.placeholder,Xt=De.disabled,ut=De.mode,nn=De.showSearch,Lt=De.autoFocus,sn=De.autoComplete,un=De.activeDescendantId,Dn=De.tabIndex,kn=De.removeIcon,Un=De.maxTagCount,qn=De.maxTagTextLength,Jn=De.maxTagPlaceholder,or=Jn===void 0?function(bt){return"+ ".concat(bt.length," ...")}:Jn,Kn=De.tagRender,yr=De.onToggleOpen,Fr=De.onRemove,ur=De.onInputChange,br=De.onInputPaste,Sr=De.onInputKeyDown,cr=De.onInputMouseDown,$n=De.onInputCompositionStart,Er=De.onInputCompositionEnd,dr=De.onInputBlur,hr=he.useRef(null),mr=(0,he.useState)(0),Tr=(0,me.Z)(mr,2),vr=Tr[0],lr=Tr[1],nr=(0,he.useState)(!1),fr=(0,me.Z)(nr,2),zr=fr[0],Pr=fr[1],kr="".concat(ft,"-selection"),Xr=pt||ut==="multiple"&&an===!1||ut==="tags"?Gt:"",Lr=ut==="tags"||ut==="multiple"&&an===!1||nn&&(pt||zr);St(function(){lr(hr.current.scrollWidth)},[Xr]);var Ir=function(ot,It,qt,Bn,Nn){return he.createElement("span",{title:Zt(ot),className:pe()("".concat(kr,"-item"),(0,Ae.Z)({},"".concat(kr,"-item-disabled"),qt))},he.createElement("span",{className:"".concat(kr,"-item-content")},It),Bn&&he.createElement(ke,{className:"".concat(kr,"-item-remove"),onMouseDown:at,onClick:Nn,customizeIcon:kn},"\xD7"))},Cr=function(ot,It,qt,Bn,Nn,rr){var sr=function(Dr){at(Dr),yr(!pt)};return he.createElement("span",{onMouseDown:sr},Kn({label:It,value:ot,disabled:qt,closable:Bn,onClose:Nn,isMaxTag:!!rr}))},xr=function(ot){var It=ot.disabled,qt=ot.label,Bn=ot.value,Nn=!Xt&&!It,rr=qt;if(typeof qn=="number"&&(typeof qt=="string"||typeof qt=="number")){var sr=String(rr);sr.length>qn&&(rr="".concat(sr.slice(0,qn),"..."))}var ir=function(gr){gr&&gr.stopPropagation(),Fr(ot)};return typeof Kn=="function"?Cr(Bn,rr,It,Nn,ir):Ir(ot,rr,It,Nn,ir)},Vn=function(ot){if(!Te.length)return null;var It=typeof or=="function"?or(ot):or;return typeof Kn=="function"?Cr(void 0,It,!1,!1,void 0,!0):Ir({title:It},It,!1)},Ot=he.createElement("div",{className:"".concat(kr,"-search"),style:{width:vr},onFocus:function(){Pr(!0)},onBlur:function(){Pr(!1)}},he.createElement(yt,{ref:fn,open:pt,prefixCls:ft,id:At,inputElement:null,disabled:Xt,autoFocus:Lt,autoComplete:sn,editable:Lr,activeDescendantId:un,value:Xr,onKeyDown:Sr,onMouseDown:cr,onChange:ur,onPaste:br,onCompositionStart:$n,onCompositionEnd:Er,onBlur:dr,tabIndex:Dn,attrs:(0,ze.Z)(De,!0)}),he.createElement("span",{ref:hr,className:"".concat(kr,"-search-mirror"),"aria-hidden":!0},Xr,"\xA0")),Jt=he.createElement(Ne.Z,{prefixCls:"".concat(kr,"-overflow"),data:Te,renderItem:xr,renderRest:Vn,suffix:Ot,itemKey:Pe,maxCount:Un});return he.createElement("span",{className:"".concat(kr,"-wrap")},Jt,!Te.length&&!Xr&&he.createElement("span",{className:"".concat(kr,"-placeholder")},He))},tn=lt,gt=function(De){var At=De.inputElement,ft=De.prefixCls,Te=De.id,pt=De.inputRef,Gt=De.disabled,an=De.autoFocus,fn=De.autoComplete,He=De.activeDescendantId,Xt=De.mode,ut=De.open,nn=De.values,Lt=De.placeholder,sn=De.tabIndex,un=De.showSearch,Dn=De.searchValue,kn=De.activeValue,Un=De.maxLength,qn=De.onInputKeyDown,Jn=De.onInputMouseDown,or=De.onInputChange,Kn=De.onInputPaste,yr=De.onInputCompositionStart,Fr=De.onInputCompositionEnd,ur=De.onInputBlur,br=De.title,Sr=he.useState(!1),cr=(0,me.Z)(Sr,2),$n=cr[0],Er=cr[1],dr=Xt==="combobox",hr=dr||un,mr=nn[0],Tr=Dn||"";dr&&kn&&!$n&&(Tr=kn),he.useEffect(function(){dr&&Er(!1)},[dr,kn]);var vr=Xt!=="combobox"&&!ut&&!un?!1:!!Tr,lr=br===void 0?Zt(mr):br,nr=he.useMemo(function(){return mr?null:he.createElement("span",{className:"".concat(ft,"-selection-placeholder"),style:vr?{visibility:"hidden"}:void 0},Lt)},[mr,vr,Lt,ft]);return he.createElement("span",{className:"".concat(ft,"-selection-wrap")},he.createElement("span",{className:"".concat(ft,"-selection-search")},he.createElement(yt,{ref:pt,prefixCls:ft,id:Te,open:ut,inputElement:At,disabled:Gt,autoFocus:an,autoComplete:fn,editable:hr,activeDescendantId:He,value:Tr,onKeyDown:qn,onMouseDown:Jn,onChange:function(zr){Er(!0),or(zr)},onPaste:Kn,onCompositionStart:yr,onCompositionEnd:Fr,onBlur:ur,tabIndex:sn,attrs:(0,ze.Z)(De,!0),maxLength:dr?Un:void 0})),!dr&&mr?he.createElement("span",{className:"".concat(ft,"-selection-item"),title:lr,style:vr?{visibility:"hidden"}:void 0},mr.label):null,nr)},Tt=gt,We=function(De,At){var ft=(0,he.useRef)(null),Te=(0,he.useRef)(!1),pt=De.prefixCls,Gt=De.open,an=De.mode,fn=De.showSearch,He=De.tokenWithEnter,Xt=De.disabled,ut=De.prefix,nn=De.autoClearSearchValue,Lt=De.onSearch,sn=De.onSearchSubmit,un=De.onToggleOpen,Dn=De.onInputKeyDown,kn=De.onInputBlur,Un=De.domRef;he.useImperativeHandle(At,function(){return{focus:function(lr){ft.current.focus(lr)},blur:function(){ft.current.blur()}}});var qn=Re(0),Jn=(0,me.Z)(qn,2),or=Jn[0],Kn=Jn[1],yr=function(lr){var nr=lr.which,fr=ft.current instanceof HTMLTextAreaElement;!fr&&Gt&&(nr===je.Z.UP||nr===je.Z.DOWN)&&lr.preventDefault(),Dn&&Dn(lr),nr===je.Z.ENTER&&an==="tags"&&!Te.current&&!Gt&&(sn==null||sn(lr.target.value)),!(fr&&!Gt&&~[je.Z.UP,je.Z.DOWN,je.Z.LEFT,je.Z.RIGHT].indexOf(nr))&&wt(nr)&&un(!0)},Fr=function(){Kn(!0)},ur=(0,he.useRef)(null),br=function(lr){Lt(lr,!0,Te.current)!==!1&&un(!0)},Sr=function(){Te.current=!0},cr=function(lr){Te.current=!1,an!=="combobox"&&br(lr.target.value)},$n=function(lr){var nr=lr.target.value;if(He&&ur.current&&/[\r\n]/.test(ur.current)){var fr=ur.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");nr=nr.replace(fr,ur.current)}ur.current=null,br(nr)},Er=function(lr){var nr=lr.clipboardData,fr=nr==null?void 0:nr.getData("text");ur.current=fr||""},dr=function(lr){var nr=lr.target;if(nr!==ft.current){var fr=document.body.style.msTouchAction!==void 0;fr?setTimeout(function(){ft.current.focus()}):ft.current.focus()}},hr=function(lr){var nr=or();lr.target!==ft.current&&!nr&&!(an==="combobox"&&Xt)&&lr.preventDefault(),(an!=="combobox"&&(!fn||!nr)||!Gt)&&(Gt&&nn!==!1&&Lt("",!0,!1),un())},mr={inputRef:ft,onInputKeyDown:yr,onInputMouseDown:Fr,onInputChange:$n,onInputPaste:Er,onInputCompositionStart:Sr,onInputCompositionEnd:cr,onInputBlur:kn},Tr=an==="multiple"||an==="tags"?he.createElement(tn,(0,le.Z)({},De,mr)):he.createElement(Tt,(0,le.Z)({},De,mr));return he.createElement("div",{ref:Un,className:"".concat(pt,"-selector"),onClick:dr,onMouseDown:hr},ut&&he.createElement("div",{className:"".concat(pt,"-prefix")},ut),Tr)},Et=he.forwardRef(We),Bt=Et,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 At=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"}}},ie=function(De,At){var ft=De.prefixCls,Te=De.disabled,pt=De.visible,Gt=De.children,an=De.popupElement,fn=De.animation,He=De.transitionName,Xt=De.dropdownStyle,ut=De.dropdownClassName,nn=De.direction,Lt=nn===void 0?"ltr":nn,sn=De.placement,un=De.builtinPlacements,Dn=De.dropdownMatchSelectWidth,kn=De.dropdownRender,Un=De.dropdownAlign,qn=De.getPopupContainer,Jn=De.empty,or=De.getTriggerDOMNode,Kn=De.onPopupVisibleChange,yr=De.onPopupMouseEnter,Fr=(0,ge.Z)(De,te),ur="".concat(ft,"-dropdown"),br=an;kn&&(br=kn(an));var Sr=he.useMemo(function(){return un||z(Dn)},[un,Dn]),cr=fn?"".concat(ur,"-").concat(fn):He,$n=typeof Dn=="number",Er=he.useMemo(function(){return $n?null:Dn===!1?"minWidth":"width"},[Dn,$n]),dr=Xt;$n&&(dr=(0,Ke.Z)((0,Ke.Z)({},dr),{},{width:Dn}));var hr=he.useRef(null);return he.useImperativeHandle(At,function(){return{getPopupElement:function(){var Tr;return(Tr=hr.current)===null||Tr===void 0?void 0:Tr.popupElement}}}),he.createElement(ae.Z,(0,le.Z)({},Fr,{showAction:Kn?["click"]:[],hideAction:Kn?["click"]:[],popupPlacement:sn||(Lt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Sr,prefixCls:ur,popupTransitionName:cr,popup:he.createElement("div",{onMouseEnter:yr},br),ref:hr,stretch:Er,popupAlign:Un,popupVisible:pt,getPopupContainer:qn,popupClassName:pe()(ut,(0,Ae.Z)({},"".concat(ur,"-empty"),Jn)),popupStyle:dr,getTriggerDOMNode:or,onPopupVisibleChange:Kn}),Gt)},se=he.forwardRef(ie),ne=se,be=fe(57879);function Qe(xe,De){var At=xe.key,ft;return"value"in xe&&(ft=xe.value),At!=null?At:ft!==void 0?ft:"rc-index-key-".concat(De)}function Wt(xe){return typeof xe!="undefined"&&!Number.isNaN(xe)}function Ft(xe,De){var At=xe||{},ft=At.label,Te=At.value,pt=At.options,Gt=At.groupLabel,an=ft||(De?"children":"label");return{label:an,value:Te||"value",options:pt||"options",groupLabel:Gt||an}}function Ct(xe){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=De.fieldNames,ft=De.childrenAsData,Te=[],pt=Ft(At,!1),Gt=pt.label,an=pt.value,fn=pt.options,He=pt.groupLabel;function Xt(ut,nn){Array.isArray(ut)&&ut.forEach(function(Lt){if(nn||!(fn in Lt)){var sn=Lt[an];Te.push({key:Qe(Lt,Te.length),groupOption:nn,data:Lt,label:Lt[Gt],value:sn})}else{var un=Lt[He];un===void 0&&ft&&(un=Lt.label),Te.push({key:Qe(Lt,Te.length),group:!0,data:Lt,label:un}),Xt(Lt[fn],!0)}})}return Xt(xe,!1),Te}function Dt(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 on=function(De,At,ft){if(!At||!At.length)return null;var Te=!1,pt=function an(fn,He){var Xt=(0,be.Z)(He),ut=Xt[0],nn=Xt.slice(1);if(!ut)return[fn];var Lt=fn.split(ut);return Te=Te||Lt.length>1,Lt.reduce(function(sn,un){return[].concat((0,it.Z)(sn),(0,it.Z)(an(un,nn)))},[]).filter(Boolean)},Gt=pt(De,At);return Te?typeof ft!="undefined"?Gt.slice(0,ft):Gt:null},$t=he.createContext(null),cn=$t;function ln(xe){var De=xe.visible,At=xe.values;if(!De)return null;var ft=50;return he.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(At.slice(0,ft).map(function(Te){var pt=Te.label,Gt=Te.value;return["number","string"].includes((0,_e.Z)(pt))?pt:Gt}).join(", ")),At.length>ft?", ...":null)}var zt=["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"],Cn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Oe=function(De){return De==="tags"||De==="multiple"},nt=he.forwardRef(function(xe,De){var At,ft=xe.id,Te=xe.prefixCls,pt=xe.className,Gt=xe.showSearch,an=xe.tagRender,fn=xe.direction,He=xe.omitDomProps,Xt=xe.displayValues,ut=xe.onDisplayValuesChange,nn=xe.emptyOptions,Lt=xe.notFoundContent,sn=Lt===void 0?"Not Found":Lt,un=xe.onClear,Dn=xe.mode,kn=xe.disabled,Un=xe.loading,qn=xe.getInputElement,Jn=xe.getRawInputElement,or=xe.open,Kn=xe.defaultOpen,yr=xe.onDropdownVisibleChange,Fr=xe.activeValue,ur=xe.onActiveValueChange,br=xe.activeDescendantId,Sr=xe.searchValue,cr=xe.autoClearSearchValue,$n=xe.onSearch,Er=xe.onSearchSplit,dr=xe.tokenSeparators,hr=xe.allowClear,mr=xe.prefix,Tr=xe.suffixIcon,vr=xe.clearIcon,lr=xe.OptionList,nr=xe.animation,fr=xe.transitionName,zr=xe.dropdownStyle,Pr=xe.dropdownClassName,kr=xe.dropdownMatchSelectWidth,Xr=xe.dropdownRender,Lr=xe.dropdownAlign,Ir=xe.placement,Cr=xe.builtinPlacements,xr=xe.getPopupContainer,Vn=xe.showAction,Ot=Vn===void 0?[]:Vn,Jt=xe.onFocus,bt=xe.onBlur,ot=xe.onKeyUp,It=xe.onKeyDown,qt=xe.onMouseDown,Bn=(0,ge.Z)(xe,zt),Nn=Oe(Dn),rr=(Gt!==void 0?Gt:Nn)||Dn==="combobox",sr=(0,Ke.Z)({},Bn);Cn.forEach(function(pr){delete sr[pr]}),He==null||He.forEach(function(pr){delete sr[pr]});var ir=he.useState(!1),Dr=(0,me.Z)(ir,2),gr=Dr[0],Hr=Dr[1];he.useEffect(function(){Hr((0,Me.Z)())},[]);var Di=he.useRef(null),ai=he.useRef(null),jr=he.useRef(null),ui=he.useRef(null),Mr=he.useRef(null),fi=he.useRef(!1),Ti=Ie(),Br=(0,me.Z)(Ti,3),yi=Br[0],pi=Br[1],Hi=Br[2];he.useImperativeHandle(De,function(){var pr,er;return{focus:(pr=ui.current)===null||pr===void 0?void 0:pr.focus,blur:(er=ui.current)===null||er===void 0?void 0:er.blur,scrollTo:function(ci){var Kr;return(Kr=Mr.current)===null||Kr===void 0?void 0:Kr.scrollTo(ci)},nativeElement:Di.current||ai.current}});var bi=he.useMemo(function(){var pr;if(Dn!=="combobox")return Sr;var er=(pr=Xt[0])===null||pr===void 0?void 0:pr.value;return typeof er=="string"||typeof er=="number"?String(er):""},[Sr,Dn,Xt]),Wi=Dn==="combobox"&&typeof qn=="function"&&qn()||null,Rr=typeof Jn=="function"&&Jn(),Pi=(0,Be.x1)(ai,Rr==null||(At=Rr.props)===null||At===void 0?void 0:At.ref),$i=he.useState(!1),ea=(0,me.Z)($i,2),ja=ea[0],Yi=ea[1];(0,rt.Z)(function(){Yi(!0)},[]);var Gr=(0,Ge.Z)(!1,{defaultValue:Kn,value:or}),ta=(0,me.Z)(Gr,2),oa=ta[0],zi=ta[1],Jr=ja?oa:!1,ya=!sn&&nn;(kn||ya&&Jr&&Dn==="combobox")&&(Jr=!1);var la=ya?!1:Jr,Hn=he.useCallback(function(pr){var er=pr!==void 0?pr:!Jr;kn||(zi(er),Jr!==er&&(yr==null||yr(er)))},[kn,Jr,zi,yr]),Qn=he.useMemo(function(){return(dr||[]).some(function(pr){return[`
`,`\r
`].includes(pr)})},[dr]),jn=he.useContext(cn)||{},Yn=jn.maxCount,wr=jn.rawValues,Nr=function(er,li,ci){if(!(Nn&&Wt(Yn)&&(wr==null?void 0:wr.size)>=Yn)){var Kr=!0,$r=er;ur==null||ur(null);var Vi=on(er,dr,Wt(Yn)?Yn-wr.size:void 0),_i=ci?null:Vi;return Dn!=="combobox"&&_i&&($r="",Er==null||Er(_i),Hn(!1),Kr=!1),$n&&bi!==$r&&$n($r,{source:li?"typing":"effect"}),Kr}},Zi=function(er){!er||!er.trim()||$n(er,{source:"submit"})};he.useEffect(function(){!Jr&&!Nn&&Dn!=="combobox"&&Nr("",!1,!1)},[Jr]),he.useEffect(function(){oa&&kn&&zi(!1),kn&&!fi.current&&pi(!1)},[kn]);var vi=Re(),oi=(0,me.Z)(vi,2),Ur=oi[0],Ri=oi[1],Xi=he.useRef(!1),Bi=function(er){var li=Ur(),ci=er.key,Kr=ci==="Enter";if(Kr&&(Dn!=="combobox"&&er.preventDefault(),Jr||Hn(!0)),Ri(!!bi),ci==="Backspace"&&!li&&Nn&&!bi&&Xt.length){for(var $r=(0,it.Z)(Xt),Vi=null,_i=$r.length-1;_i>=0;_i-=1){var ra=$r[_i];if(!ra.disabled){$r.splice(_i,1),Vi=ra;break}}Vi&&ut($r,{type:"remove",values:[Vi]})}for(var Ai=arguments.length,Fi=new Array(Ai>1?Ai-1:0),ji=1;ji<Ai;ji++)Fi[ji-1]=arguments[ji];if(Jr&&(!Kr||!Xi.current)){var ua;Kr&&(Xi.current=!0),(ua=Mr.current)===null||ua===void 0||ua.onKeyDown.apply(ua,[er].concat(Fi))}It==null||It.apply(void 0,[er].concat(Fi))},Ji=function(er){for(var li=arguments.length,ci=new Array(li>1?li-1:0),Kr=1;Kr<li;Kr++)ci[Kr-1]=arguments[Kr];if(Jr){var $r;($r=Mr.current)===null||$r===void 0||$r.onKeyUp.apply($r,[er].concat(ci))}er.key==="Enter"&&(Xi.current=!1),ot==null||ot.apply(void 0,[er].concat(ci))},na=function(er){var li=Xt.filter(function(ci){return ci!==er});ut(li,{type:"remove",values:[er]})},Gi=function(){Xi.current=!1},Aa=he.useRef(!1),Vo=function(){pi(!0),kn||(Jt&&!Aa.current&&Jt.apply(void 0,arguments),Ot.includes("focus")&&Hn(!0)),Aa.current=!0},yo=function(){fi.current=!0,pi(!1,function(){Aa.current=!1,fi.current=!1,Hn(!1)}),!kn&&(bi&&(Dn==="tags"?$n(bi,{source:"submit"}):Dn==="multiple"&&$n("",{source:"blur"})),bt&&bt.apply(void 0,arguments))},Qi=[];he.useEffect(function(){return function(){Qi.forEach(function(pr){return clearTimeout(pr)}),Qi.splice(0,Qi.length)}},[]);var sa=function(er){var li,ci=er.target,Kr=(li=jr.current)===null||li===void 0?void 0:li.getPopupElement();if(Kr&&Kr.contains(ci)){var $r=setTimeout(function(){var Ai=Qi.indexOf($r);if(Ai!==-1&&Qi.splice(Ai,1),Hi(),!gr&&!Kr.contains(document.activeElement)){var Fi;(Fi=ui.current)===null||Fi===void 0||Fi.focus()}});Qi.push($r)}for(var Vi=arguments.length,_i=new Array(Vi>1?Vi-1:0),ra=1;ra<Vi;ra++)_i[ra-1]=arguments[ra];qt==null||qt.apply(void 0,[er].concat(_i))},Ni=he.useState({}),bo=(0,me.Z)(Ni,2),Co=bo[1];function jo(){Co({})}var xo;Rr&&(xo=function(er){Hn(er)}),Ze(function(){var pr;return[Di.current,(pr=jr.current)===null||pr===void 0?void 0:pr.getPopupElement()]},la,Hn,!!Rr);var Uo=he.useMemo(function(){return(0,Ke.Z)((0,Ke.Z)({},xe),{},{notFoundContent:sn,open:Jr,triggerOpen:la,id:ft,showSearch:rr,multiple:Nn,toggleOpen:Hn})},[xe,sn,la,Jr,ft,rr,Nn,Hn]),Ua=!!Tr||Un,Ka;Ua&&(Ka=he.createElement(ke,{className:pe()("".concat(Te,"-arrow"),(0,Ae.Z)({},"".concat(Te,"-arrow-loading"),Un)),customizeIcon:Tr,customizeIconProps:{loading:Un,searchValue:bi,open:Jr,focused:yi,showSearch:rr}}));var ba=function(){var er;un==null||un(),(er=ui.current)===null||er===void 0||er.focus(),ut([],{type:"clear",values:Xt}),Nr("",!1,!1)},Ya=tt(Te,ba,Xt,hr,vr,kn,bi,Dn),wo=Ya.allowClear,Xa=Ya.clearIcon,Fa=he.createElement(lr,{ref:Mr}),So=pe()(Te,pt,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat(Te,"-focused"),yi),"".concat(Te,"-multiple"),Nn),"".concat(Te,"-single"),!Nn),"".concat(Te,"-allow-clear"),hr),"".concat(Te,"-show-arrow"),Ua),"".concat(Te,"-disabled"),kn),"".concat(Te,"-loading"),Un),"".concat(Te,"-open"),Jr),"".concat(Te,"-customize-input"),Wi),"".concat(Te,"-show-search"),rr)),La=he.createElement(ne,{ref:jr,disabled:kn,prefixCls:Te,visible:la,popupElement:Fa,animation:nr,transitionName:fr,dropdownStyle:zr,dropdownClassName:Pr,direction:fn,dropdownMatchSelectWidth:kr,dropdownRender:Xr,dropdownAlign:Lr,placement:Ir,builtinPlacements:Cr,getPopupContainer:xr,empty:nn,getTriggerDOMNode:function(er){return ai.current||er},onPopupVisibleChange:xo,onPopupMouseEnter:jo},Rr?he.cloneElement(Rr,{ref:Pi}):he.createElement(Bt,(0,le.Z)({},xe,{domRef:ai,prefixCls:Te,inputElement:Wi,ref:ui,id:ft,prefix:mr,showSearch:rr,autoClearSearchValue:cr,mode:Dn,activeDescendantId:br,tagRender:an,values:Xt,open:Jr,onToggleOpen:Hn,activeValue:Fr,searchValue:bi,onSearch:Nr,onSearchSubmit:Zi,onRemove:na,tokenWithEnter:Qn,onInputBlur:Gi}))),Ci;return Rr?Ci=La:Ci=he.createElement("div",(0,le.Z)({className:So},sr,{ref:Di,onMouseDown:sa,onKeyDown:Bi,onKeyUp:Ji,onFocus:Vo,onBlur:yo}),he.createElement(ln,{visible:yi&&!Jr,values:Xt}),La,Ka,wo&&Xa),he.createElement(et.Provider,{value:Uo},Ci)}),we=nt,mt=function(){return null};mt.isSelectOptGroup=!0;var dt=mt,vt=function(){return null};vt.isSelectOption=!0;var kt=vt,Yt=fe(80547),Pt=fe(2738),Vt=fe(6790);function En(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var gn=["disabled","title","children","style","className"];function Mn(xe){return typeof xe=="string"||typeof xe=="number"}var zn=function(De,At){var ft=$e(),Te=ft.prefixCls,pt=ft.id,Gt=ft.open,an=ft.multiple,fn=ft.mode,He=ft.searchValue,Xt=ft.toggleOpen,ut=ft.notFoundContent,nn=ft.onPopupScroll,Lt=he.useContext(cn),sn=Lt.maxCount,un=Lt.flattenOptions,Dn=Lt.onActiveValue,kn=Lt.defaultActiveFirstOption,Un=Lt.onSelect,qn=Lt.menuItemSelectedIcon,Jn=Lt.rawValues,or=Lt.fieldNames,Kn=Lt.virtual,yr=Lt.direction,Fr=Lt.listHeight,ur=Lt.listItemHeight,br=Lt.optionRender,Sr="".concat(Te,"-item"),cr=(0,Yt.Z)(function(){return un},[Gt,un],function(Vn,Ot){return Ot[0]&&Vn[1]!==Ot[1]}),$n=he.useRef(null),Er=he.useMemo(function(){return an&&Wt(sn)&&(Jn==null?void 0:Jn.size)>=sn},[an,sn,Jn==null?void 0:Jn.size]),dr=function(Ot){Ot.preventDefault()},hr=function(Ot){var Jt;(Jt=$n.current)===null||Jt===void 0||Jt.scrollTo(typeof Ot=="number"?{index:Ot}:Ot)},mr=he.useCallback(function(Vn){return fn==="combobox"?!1:Jn.has(Vn)},[fn,(0,it.Z)(Jn).toString(),Jn.size]),Tr=function(Ot){for(var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,bt=cr.length,ot=0;ot<bt;ot+=1){var It=(Ot+ot*Jt+bt)%bt,qt=cr[It]||{},Bn=qt.group,Nn=qt.data;if(!Bn&&!(Nn!=null&&Nn.disabled)&&(mr(Nn.value)||!Er))return It}return-1},vr=he.useState(function(){return Tr(0)}),lr=(0,me.Z)(vr,2),nr=lr[0],fr=lr[1],zr=function(Ot){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(Ot);var bt={source:Jt?"keyboard":"mouse"},ot=cr[Ot];if(!ot){Dn(null,-1,bt);return}Dn(ot.value,Ot,bt)};(0,he.useEffect)(function(){zr(kn!==!1?Tr(0):-1)},[cr.length,He]);var Pr=he.useCallback(function(Vn){return fn==="combobox"?String(Vn).toLowerCase()===He.toLowerCase():Jn.has(Vn)},[fn,He,(0,it.Z)(Jn).toString(),Jn.size]);(0,he.useEffect)(function(){var Vn=setTimeout(function(){if(!an&&Gt&&Jn.size===1){var Jt=Array.from(Jn)[0],bt=cr.findIndex(function(ot){var It=ot.data;return He?String(It.value).startsWith(He):It.value===Jt});bt!==-1&&(zr(bt),hr(bt))}});if(Gt){var Ot;(Ot=$n.current)===null||Ot===void 0||Ot.scrollTo(void 0)}return function(){return clearTimeout(Vn)}},[Gt,He]);var kr=function(Ot){Ot!==void 0&&Un(Ot,{selected:!Jn.has(Ot)}),an||Xt(!1)};if(he.useImperativeHandle(At,function(){return{onKeyDown:function(Ot){var Jt=Ot.which,bt=Ot.ctrlKey;switch(Jt){case je.Z.N:case je.Z.P:case je.Z.UP:case je.Z.DOWN:{var ot=0;if(Jt===je.Z.UP?ot=-1:Jt===je.Z.DOWN?ot=1:En()&&bt&&(Jt===je.Z.N?ot=1:Jt===je.Z.P&&(ot=-1)),ot!==0){var It=Tr(nr+ot,ot);hr(It),zr(It,!0)}break}case je.Z.TAB:case je.Z.ENTER:{var qt,Bn=cr[nr];Bn&&!(Bn!=null&&(qt=Bn.data)!==null&&qt!==void 0&&qt.disabled)&&!Er?kr(Bn.value):kr(void 0),Gt&&Ot.preventDefault();break}case je.Z.ESC:Xt(!1),Gt&&Ot.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ot){hr(Ot)}}}),cr.length===0)return he.createElement("div",{role:"listbox",id:"".concat(pt,"_list"),className:"".concat(Sr,"-empty"),onMouseDown:dr},ut);var Xr=Object.keys(or).map(function(Vn){return or[Vn]}),Lr=function(Ot){return Ot.label};function Ir(Vn,Ot){var Jt=Vn.group;return{role:Jt?"presentation":"option",id:"".concat(pt,"_list_").concat(Ot)}}var Cr=function(Ot){var Jt=cr[Ot];if(!Jt)return null;var bt=Jt.data||{},ot=bt.value,It=Jt.group,qt=(0,ze.Z)(bt,!0),Bn=Lr(Jt);return Jt?he.createElement("div",(0,le.Z)({"aria-label":typeof Bn=="string"&&!It?Bn:null},qt,{key:Ot},Ir(Jt,Ot),{"aria-selected":Pr(ot)}),ot):null},xr={role:"listbox",id:"".concat(pt,"_list")};return he.createElement(he.Fragment,null,Kn&&he.createElement("div",(0,le.Z)({},xr,{style:{height:0,width:0,overflow:"hidden"}}),Cr(nr-1),Cr(nr),Cr(nr+1)),he.createElement(Vt.Z,{itemKey:"key",ref:$n,data:cr,height:Fr,itemHeight:ur,fullHeight:!1,onMouseDown:dr,onScroll:nn,virtual:Kn,direction:yr,innerProps:Kn?null:xr},function(Vn,Ot){var Jt=Vn.group,bt=Vn.groupOption,ot=Vn.data,It=Vn.label,qt=Vn.value,Bn=ot.key;if(Jt){var Nn,rr=(Nn=ot.title)!==null&&Nn!==void 0?Nn:Mn(It)?It.toString():void 0;return he.createElement("div",{className:pe()(Sr,"".concat(Sr,"-group"),ot.className),title:rr},It!==void 0?It:Bn)}var sr=ot.disabled,ir=ot.title,Dr=ot.children,gr=ot.style,Hr=ot.className,Di=(0,ge.Z)(ot,gn),ai=(0,Pt.Z)(Di,Xr),jr=mr(qt),ui=sr||!jr&&Er,Mr="".concat(Sr,"-option"),fi=pe()(Sr,Mr,Hr,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat(Mr,"-grouped"),bt),"".concat(Mr,"-active"),nr===Ot&&!ui),"".concat(Mr,"-disabled"),ui),"".concat(Mr,"-selected"),jr)),Ti=Lr(Vn),Br=!qn||typeof qn=="function"||jr,yi=typeof Ti=="number"?Ti:Ti||qt,pi=Mn(yi)?yi.toString():void 0;return ir!==void 0&&(pi=ir),he.createElement("div",(0,le.Z)({},(0,ze.Z)(ai),Kn?{}:Ir(Vn,Ot),{"aria-selected":Pr(qt),className:fi,title:pi,onMouseMove:function(){nr===Ot||ui||zr(Ot)},onClick:function(){ui||kr(qt)},style:gr}),he.createElement("div",{className:"".concat(Mr,"-content")},typeof br=="function"?br(Vn,{index:Ot}):yi),he.isValidElement(qn)||jr,Br&&he.createElement(ke,{className:"".concat(Sr,"-option-state"),customizeIcon:qn,customizeIconProps:{value:qt,disabled:ui,isSelected:jr}},jr?"\u2713":null))}))},An=he.forwardRef(zn),wn=An,yn=function(xe,De){var At=he.useRef({values:new Map,options:new Map}),ft=he.useMemo(function(){var pt=At.current,Gt=pt.values,an=pt.options,fn=xe.map(function(ut){if(ut.label===void 0){var nn;return(0,Ke.Z)((0,Ke.Z)({},ut),{},{label:(nn=Gt.get(ut.value))===null||nn===void 0?void 0:nn.label})}return ut}),He=new Map,Xt=new Map;return fn.forEach(function(ut){He.set(ut.value,ut),Xt.set(ut.value,De.get(ut.value)||an.get(ut.value))}),At.current.values=He,At.current.options=Xt,fn},[xe,De]),Te=he.useCallback(function(pt){return De.get(pt)||At.current.options.get(pt)},[De]);return[ft,Te]};function Pn(xe,De){return ht(xe).join("").toUpperCase().includes(De)}var Xn=function(xe,De,At,ft,Te){return he.useMemo(function(){if(!At||ft===!1)return xe;var pt=De.options,Gt=De.label,an=De.value,fn=[],He=typeof ft=="function",Xt=At.toUpperCase(),ut=He?ft:function(Lt,sn){return Te?Pn(sn[Te],Xt):sn[pt]?Pn(sn[Gt!=="children"?Gt:"label"],Xt):Pn(sn[an],Xt)},nn=He?function(Lt){return Dt(Lt)}:function(Lt){return Lt};return xe.forEach(function(Lt){if(Lt[pt]){var sn=ut(At,nn(Lt));if(sn)fn.push(Lt);else{var un=Lt[pt].filter(function(Dn){return ut(At,nn(Dn))});un.length&&fn.push((0,Ke.Z)((0,Ke.Z)({},Lt),{},(0,Ae.Z)({},pt,un)))}return}ut(At,nn(Lt))&&fn.push(Lt)}),fn},[xe,ft,Te,At,De])},pn=fe(6551),In=fe(11592),Kt=["children","value"],Ut=["children"];function jt(xe){var De=xe,At=De.key,ft=De.props,Te=ft.children,pt=ft.value,Gt=(0,ge.Z)(ft,Kt);return(0,Ke.Z)({key:At,value:pt!==void 0?pt:At,children:Te},Gt)}function vn(xe){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,In.Z)(xe).map(function(At,ft){if(!he.isValidElement(At)||!At.type)return null;var Te=At,pt=Te.type.isSelectOptGroup,Gt=Te.key,an=Te.props,fn=an.children,He=(0,ge.Z)(an,Ut);return De||!pt?jt(At):(0,Ke.Z)((0,Ke.Z)({key:"__RC_SELECT_GRP__".concat(Gt===null?ft:Gt,"__"),label:Gt},He),{},{options:vn(fn)})}).filter(function(At){return At})}var Wn=function(De,At,ft,Te,pt){return he.useMemo(function(){var Gt=De,an=!De;an&&(Gt=vn(At));var fn=new Map,He=new Map,Xt=function(Lt,sn,un){un&&typeof un=="string"&&Lt.set(sn[un],sn)},ut=function nn(Lt){for(var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,un=0;un<Lt.length;un+=1){var Dn=Lt[un];!Dn[ft.options]||sn?(fn.set(Dn[ft.value],Dn),Xt(He,Dn,ft.label),Xt(He,Dn,Te),Xt(He,Dn,pt)):nn(Dn[ft.options],!0)}};return ut(Gt),{options:Gt,valueOptions:fn,labelOptions:He}},[De,At,ft,Te,pt])},Ln=Wn;function mn(xe){var De=he.useRef();De.current=xe;var At=he.useCallback(function(){return De.current.apply(De,arguments)},[]);return At}function Gn(xe){var De=xe.mode,At=xe.options,ft=xe.children,Te=xe.backfill,pt=xe.allowClear,Gt=xe.placeholder,an=xe.getInputElement,fn=xe.showSearch,He=xe.onSearch,Xt=xe.defaultOpen,ut=xe.autoFocus,nn=xe.labelInValue,Lt=xe.value,sn=xe.inputValue,un=xe.optionLabelProp,Dn=isMultiple(De),kn=fn!==void 0?fn:Dn||De==="combobox",Un=At||convertChildrenToData(ft);if(warning(De!=="tags"||Un.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 qn=Un.some(function(Kn){return Kn.options?Kn.options.some(function(yr){return typeof("value"in yr?yr.value:yr.key)=="number"}):typeof("value"in Kn?Kn.value:Kn.key)=="number"});warning(!qn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(De!=="combobox"||!un,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(De==="combobox"||!Te,"`backfill` only works with `combobox` mode."),warning(De==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(De!=="combobox"||!an||!pt||!Gt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!kn&&De!=="combobox"&&De!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Xt||ut,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Lt!=null){var Jn=toArray(Lt);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(!Dn||Array.isArray(Lt),"`value` should be array when `mode` is `multiple` or `tags`")}if(ft){var or=null;toNodeArray(ft).some(function(Kn){if(!React.isValidElement(Kn)||!Kn.type)return!1;var yr=Kn,Fr=yr.type;if(Fr.isSelectOption)return!1;if(Fr.isSelectOptGroup){var ur=toNodeArray(Kn.props.children).every(function(br){return!React.isValidElement(br)||!Kn.type||br.type.isSelectOption?!0:(or=br.type,!1)});return!ur}return or=Fr,!0}),or&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(or.displayName||or.name||or,"`.")),warning(sn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Rn(xe,De){if(xe){var At=function ft(Te){for(var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gt=0;Gt<Te.length;Gt++){var an=Te[Gt];if(an[De==null?void 0:De.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!pt&&Array.isArray(an[De==null?void 0:De.options])&&ft(an[De==null?void 0:De.options],!0))break}};At(xe)}}var Fn=null,On=["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"],tr=["inputValue"];function Mt(xe){return!xe||(0,_e.Z)(xe)!=="object"}var qe=he.forwardRef(function(xe,De){var At=xe.id,ft=xe.mode,Te=xe.prefixCls,pt=Te===void 0?"rc-select":Te,Gt=xe.backfill,an=xe.fieldNames,fn=xe.inputValue,He=xe.searchValue,Xt=xe.onSearch,ut=xe.autoClearSearchValue,nn=ut===void 0?!0:ut,Lt=xe.onSelect,sn=xe.onDeselect,un=xe.dropdownMatchSelectWidth,Dn=un===void 0?!0:un,kn=xe.filterOption,Un=xe.filterSort,qn=xe.optionFilterProp,Jn=xe.optionLabelProp,or=xe.options,Kn=xe.optionRender,yr=xe.children,Fr=xe.defaultActiveFirstOption,ur=xe.menuItemSelectedIcon,br=xe.virtual,Sr=xe.direction,cr=xe.listHeight,$n=cr===void 0?200:cr,Er=xe.listItemHeight,dr=Er===void 0?20:Er,hr=xe.labelRender,mr=xe.value,Tr=xe.defaultValue,vr=xe.labelInValue,lr=xe.onChange,nr=xe.maxCount,fr=(0,ge.Z)(xe,On),zr=(0,pn.ZP)(At),Pr=Oe(ft),kr=!!(!or&&yr),Xr=he.useMemo(function(){return kn===void 0&&ft==="combobox"?!1:kn},[kn,ft]),Lr=he.useMemo(function(){return Ft(an,kr)},[JSON.stringify(an),kr]),Ir=(0,Ge.Z)("",{value:He!==void 0?He:fn,postState:function(Qn){return Qn||""}}),Cr=(0,me.Z)(Ir,2),xr=Cr[0],Vn=Cr[1],Ot=Ln(or,yr,Lr,qn,Jn),Jt=Ot.valueOptions,bt=Ot.labelOptions,ot=Ot.options,It=he.useCallback(function(Hn){var Qn=ht(Hn);return Qn.map(function(jn){var Yn,wr,Nr,Zi,vi;if(Mt(jn))Yn=jn;else{var oi;Nr=jn.key,wr=jn.label,Yn=(oi=jn.value)!==null&&oi!==void 0?oi:Nr}var Ur=Jt.get(Yn);if(Ur){var Ri;if(wr===void 0&&(wr=Ur==null?void 0:Ur[Jn||Lr.label]),Nr===void 0&&(Nr=(Ri=Ur==null?void 0:Ur.key)!==null&&Ri!==void 0?Ri:Yn),Zi=Ur==null?void 0:Ur.disabled,vi=Ur==null?void 0:Ur.title,0)var Xi}return{label:wr,value:Yn,key:Nr,disabled:Zi,title:vi}})},[Lr,Jn,Jt]),qt=(0,Ge.Z)(Tr,{value:mr}),Bn=(0,me.Z)(qt,2),Nn=Bn[0],rr=Bn[1],sr=he.useMemo(function(){var Hn,Qn=Pr&&Nn===null?[]:Nn,jn=It(Qn);return ft==="combobox"&&de((Hn=jn[0])===null||Hn===void 0?void 0:Hn.value)?[]:jn},[Nn,It,ft,Pr]),ir=yn(sr,Jt),Dr=(0,me.Z)(ir,2),gr=Dr[0],Hr=Dr[1],Di=he.useMemo(function(){if(!ft&&gr.length===1){var Hn=gr[0];if(Hn.value===null&&(Hn.label===null||Hn.label===void 0))return[]}return gr.map(function(Qn){var jn;return(0,Ke.Z)((0,Ke.Z)({},Qn),{},{label:(jn=typeof hr=="function"?hr(Qn):Qn.label)!==null&&jn!==void 0?jn:Qn.value})})},[ft,gr,hr]),ai=he.useMemo(function(){return new Set(gr.map(function(Hn){return Hn.value}))},[gr]);he.useEffect(function(){if(ft==="combobox"){var Hn,Qn=(Hn=gr[0])===null||Hn===void 0?void 0:Hn.value;Vn(ve(Qn)?String(Qn):"")}},[gr]);var jr=mn(function(Hn,Qn){var jn=Qn!=null?Qn:Hn;return(0,Ae.Z)((0,Ae.Z)({},Lr.value,Hn),Lr.label,jn)}),ui=he.useMemo(function(){if(ft!=="tags")return ot;var Hn=(0,it.Z)(ot),Qn=function(Yn){return Jt.has(Yn)};return(0,it.Z)(gr).sort(function(jn,Yn){return jn.value<Yn.value?-1:1}).forEach(function(jn){var Yn=jn.value;Qn(Yn)||Hn.push(jr(Yn,jn.label))}),Hn},[jr,ot,Jt,gr,ft]),Mr=Xn(ui,Lr,xr,Xr,qn),fi=he.useMemo(function(){return ft!=="tags"||!xr||Mr.some(function(Hn){return Hn[qn||"value"]===xr})||Mr.some(function(Hn){return Hn[Lr.value]===xr})?Mr:[jr(xr)].concat((0,it.Z)(Mr))},[jr,qn,ft,Mr,xr,Lr]),Ti=function Hn(Qn){var jn=(0,it.Z)(Qn).sort(function(Yn,wr){return Un(Yn,wr,{searchValue:xr})});return jn.map(function(Yn){return Array.isArray(Yn.options)?(0,Ke.Z)((0,Ke.Z)({},Yn),{},{options:Yn.options.length>0?Hn(Yn.options):Yn.options}):Yn})},Br=he.useMemo(function(){return Un?Ti(fi):fi},[fi,Un,xr]),yi=he.useMemo(function(){return Ct(Br,{fieldNames:Lr,childrenAsData:kr})},[Br,Lr,kr]),pi=function(Qn){var jn=It(Qn);if(rr(jn),lr&&(jn.length!==gr.length||jn.some(function(Nr,Zi){var vi;return((vi=gr[Zi])===null||vi===void 0?void 0:vi.value)!==(Nr==null?void 0:Nr.value)}))){var Yn=vr?jn:jn.map(function(Nr){return Nr.value}),wr=jn.map(function(Nr){return Dt(Hr(Nr.value))});lr(Pr?Yn:Yn[0],Pr?wr:wr[0])}},Hi=he.useState(null),bi=(0,me.Z)(Hi,2),Wi=bi[0],Rr=bi[1],Pi=he.useState(0),$i=(0,me.Z)(Pi,2),ea=$i[0],ja=$i[1],Yi=Fr!==void 0?Fr:ft!=="combobox",Gr=he.useCallback(function(Hn,Qn){var jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Yn=jn.source,wr=Yn===void 0?"keyboard":Yn;ja(Qn),Gt&&ft==="combobox"&&Hn!==null&&wr==="keyboard"&&Rr(String(Hn))},[Gt,ft]),ta=function(Qn,jn,Yn){var wr=function(){var na,Gi=Hr(Qn);return[vr?{label:Gi==null?void 0:Gi[Lr.label],value:Qn,key:(na=Gi==null?void 0:Gi.key)!==null&&na!==void 0?na:Qn}:Qn,Dt(Gi)]};if(jn&&Lt){var Nr=wr(),Zi=(0,me.Z)(Nr,2),vi=Zi[0],oi=Zi[1];Lt(vi,oi)}else if(!jn&&sn&&Yn!=="clear"){var Ur=wr(),Ri=(0,me.Z)(Ur,2),Xi=Ri[0],Bi=Ri[1];sn(Xi,Bi)}},oa=mn(function(Hn,Qn){var jn,Yn=Pr?Qn.selected:!0;Yn?jn=Pr?[].concat((0,it.Z)(gr),[Hn]):[Hn]:jn=gr.filter(function(wr){return wr.value!==Hn}),pi(jn),ta(Hn,Yn),ft==="combobox"?Rr(""):(!Oe||nn)&&(Vn(""),Rr(""))}),zi=function(Qn,jn){pi(Qn);var Yn=jn.type,wr=jn.values;(Yn==="remove"||Yn==="clear")&&wr.forEach(function(Nr){ta(Nr.value,!1,Yn)})},Jr=function(Qn,jn){if(Vn(Qn),Rr(null),jn.source==="submit"){var Yn=(Qn||"").trim();if(Yn){var wr=Array.from(new Set([].concat((0,it.Z)(ai),[Yn])));pi(wr),ta(Yn,!0),Vn("")}return}jn.source!=="blur"&&(ft==="combobox"&&pi(Qn),Xt==null||Xt(Qn))},ya=function(Qn){var jn=Qn;ft!=="tags"&&(jn=Qn.map(function(wr){var Nr=bt.get(wr);return Nr==null?void 0:Nr.value}).filter(function(wr){return wr!==void 0}));var Yn=Array.from(new Set([].concat((0,it.Z)(ai),(0,it.Z)(jn))));pi(Yn),Yn.forEach(function(wr){ta(wr,!0)})},la=he.useMemo(function(){var Hn=br!==!1&&Dn!==!1;return(0,Ke.Z)((0,Ke.Z)({},Ot),{},{flattenOptions:yi,onActiveValue:Gr,defaultActiveFirstOption:Yi,onSelect:oa,menuItemSelectedIcon:ur,rawValues:ai,fieldNames:Lr,virtual:Hn,direction:Sr,listHeight:$n,listItemHeight:dr,childrenAsData:kr,maxCount:nr,optionRender:Kn})},[nr,Ot,yi,Gr,Yi,oa,ur,ai,Lr,br,Dn,Sr,$n,dr,kr,Kn]);return he.createElement(cn.Provider,{value:la},he.createElement(we,(0,le.Z)({},fr,{id:zr,prefixCls:pt,ref:De,omitDomProps:tr,mode:ft,displayValues:Di,onDisplayValuesChange:zi,direction:Sr,searchValue:xr,onSearch:Jr,autoClearSearchValue:nn,onSearchSplit:ya,dropdownMatchSelectWidth:Dn,OptionList:wn,emptyOptions:!yi.length,activeValue:Wi,activeDescendantId:"".concat(zr,"_list_").concat(ea)})))}),rn=qe;rn.Option=kt,rn.OptGroup=dt;var xn=rn,_n=xn},63158:function(Nt,_t,fe){"use strict";var le=fe(67711),it=fe(52873),Ae=fe(16886),Ke=fe(33346),me=fe(59301),ge=fe(92310),_e=fe.n(ge),Ge=fe(18929),Ce=fe(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ye=me.forwardRef(function(pe,rt){var Me,Be=pe.prefixCls,Le=Be===void 0?"rc-switch":Be,ke=pe.className,tt=pe.checked,et=pe.defaultChecked,$e=pe.disabled,Ie=pe.loadingIcon,Re=pe.checkedChildren,Ze=pe.unCheckedChildren,je=pe.onClick,wt=pe.onChange,ze=pe.onKeyDown,Ne=(0,Ke.Z)(pe,he),ct=(0,Ge.Z)(!1,{value:tt,defaultValue:et}),Fe=(0,Ae.Z)(ct,2),Xe=Fe[0],Se=Fe[1];function Ve(Ht,ve){var de=Xe;return $e||(de=Ht,Se(de),wt==null||wt(de,ve)),de}function yt(Ht){Ht.which===Ce.Z.LEFT?Ve(!1,Ht):Ht.which===Ce.Z.RIGHT&&Ve(!0,Ht),ze==null||ze(Ht)}function ht(Ht){var ve=Ve(!Xe,Ht);je==null||je(ve,Ht)}var Qt=_e()(Le,ke,(Me={},(0,it.Z)(Me,"".concat(Le,"-checked"),Xe),(0,it.Z)(Me,"".concat(Le,"-disabled"),$e),Me));return me.createElement("button",(0,le.Z)({},Ne,{type:"button",role:"switch","aria-checked":Xe,disabled:$e,className:Qt,ref:rt,onKeyDown:yt,onClick:ht}),Ie,me.createElement("span",{className:"".concat(Le,"-inner")},me.createElement("span",{className:"".concat(Le,"-inner-checked")},Re),me.createElement("span",{className:"".concat(Le,"-inner-unchecked")},Ze)))});Ye.displayName="Switch",_t.Z=Ye},22711:function(Nt,_t,fe){"use strict";fe.r(_t),fe.d(_t,{ResizableTextArea:function(){return Fe},default:function(){return yt}});var le=fe(67711),it=fe(52873),Ae=fe(98506),Ke=fe(15142),me=fe(16886),ge=fe(33346),_e=fe(92310),Ge=fe.n(_e),Ce=fe(36901),he=fe(66003),Ye=fe(30292),pe=fe(18929),rt=fe(59301),Me=fe(26420),Be=fe(29301),Le=fe(34280),ke=fe(16089),tt=`
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;
`,et=["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"],$e={},Ie;function Re(ht){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=ht.getAttribute("id")||ht.getAttribute("data-reactid")||ht.getAttribute("name");if(Qt&&$e[Ht])return $e[Ht];var ve=window.getComputedStyle(ht),de=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),st=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),Zt=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),St=et.map(function(at){return"".concat(at,":").concat(ve.getPropertyValue(at))}).join(";"),Pe={sizingStyle:St,paddingSize:st,borderSize:Zt,boxSizing:de};return Qt&&Ht&&($e[Ht]=Pe),Pe}function Ze(ht){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ie||(Ie=document.createElement("textarea"),Ie.setAttribute("tab-index","-1"),Ie.setAttribute("aria-hidden","true"),Ie.setAttribute("name","hiddenTextarea"),document.body.appendChild(Ie)),ht.getAttribute("wrap")?Ie.setAttribute("wrap",ht.getAttribute("wrap")):Ie.removeAttribute("wrap");var de=Re(ht,Qt),st=de.paddingSize,Zt=de.borderSize,St=de.boxSizing,Pe=de.sizingStyle;Ie.setAttribute("style","".concat(Pe,";").concat(tt)),Ie.value=ht.value||ht.placeholder||"";var at=void 0,lt=void 0,tn,gt=Ie.scrollHeight;if(St==="border-box"?gt+=Zt:St==="content-box"&&(gt-=st),Ht!==null||ve!==null){Ie.value=" ";var Tt=Ie.scrollHeight-st;Ht!==null&&(at=Tt*Ht,St==="border-box"&&(at=at+st+Zt),gt=Math.max(at,gt)),ve!==null&&(lt=Tt*ve,St==="border-box"&&(lt=lt+st+Zt),tn=gt>lt?"":"hidden",gt=Math.min(lt,gt))}var We={height:gt,overflowY:tn,resize:"none"};return at&&(We.minHeight=at),lt&&(We.maxHeight=lt),We}var je=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],wt=0,ze=1,Ne=2,ct=rt.forwardRef(function(ht,Qt){var Ht=ht,ve=Ht.prefixCls,de=Ht.defaultValue,st=Ht.value,Zt=Ht.autoSize,St=Ht.onResize,Pe=Ht.className,at=Ht.style,lt=Ht.disabled,tn=Ht.onChange,gt=Ht.onInternalAutoSize,Tt=(0,ge.Z)(Ht,je),We=(0,pe.Z)(de,{value:st,postState:function(kt){return kt!=null?kt:""}}),Et=(0,me.Z)(We,2),Bt=Et[0],ae=Et[1],te=function(kt){ae(kt.target.value),tn==null||tn(kt)},z=rt.useRef();rt.useImperativeHandle(Qt,function(){return{textArea:z.current}});var ie=rt.useMemo(function(){return Zt&&(0,Me.Z)(Zt)==="object"?[Zt.minRows,Zt.maxRows]:[]},[Zt]),se=(0,me.Z)(ie,2),ne=se[0],be=se[1],Qe=!!Zt,Wt=function(){try{if(document.activeElement===z.current){var kt=z.current,Yt=kt.selectionStart,Pt=kt.selectionEnd,Vt=kt.scrollTop;z.current.setSelectionRange(Yt,Pt),z.current.scrollTop=Vt}}catch(En){}},Ft=rt.useState(Ne),Ct=(0,me.Z)(Ft,2),Dt=Ct[0],on=Ct[1],$t=rt.useState(),cn=(0,me.Z)($t,2),ln=cn[0],zt=cn[1],Cn=function(){on(wt)};(0,Le.Z)(function(){Qe&&Cn()},[st,ne,be,Qe]),(0,Le.Z)(function(){if(Dt===wt)on(ze);else if(Dt===ze){var vt=Ze(z.current,!1,ne,be);on(Ne),zt(vt)}else Wt()},[Dt]);var Oe=rt.useRef(),nt=function(){ke.Z.cancel(Oe.current)},we=function(kt){Dt===Ne&&(St==null||St(kt),Zt&&(nt(),Oe.current=(0,ke.Z)(function(){Cn()})))};rt.useEffect(function(){return nt},[]);var mt=Qe?ln:null,dt=(0,Ae.Z)((0,Ae.Z)({},at),mt);return(Dt===wt||Dt===ze)&&(dt.overflowY="hidden",dt.overflowX="hidden"),rt.createElement(Be.Z,{onResize:we,disabled:!(Zt||St)},rt.createElement("textarea",(0,le.Z)({},Tt,{ref:z,style:dt,className:Ge()(ve,Pe,(0,it.Z)({},"".concat(ve,"-disabled"),lt)),disabled:lt,value:Bt,onChange:te})))}),Fe=ct,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"],Se=rt.forwardRef(function(ht,Qt){var Ht,ve=ht.defaultValue,de=ht.value,st=ht.onFocus,Zt=ht.onBlur,St=ht.onChange,Pe=ht.allowClear,at=ht.maxLength,lt=ht.onCompositionStart,tn=ht.onCompositionEnd,gt=ht.suffix,Tt=ht.prefixCls,We=Tt===void 0?"rc-textarea":Tt,Et=ht.showCount,Bt=ht.count,ae=ht.className,te=ht.style,z=ht.disabled,ie=ht.hidden,se=ht.classNames,ne=ht.styles,be=ht.onResize,Qe=ht.onClear,Wt=ht.onPressEnter,Ft=ht.readOnly,Ct=ht.autoSize,Dt=ht.onKeyDown,on=(0,ge.Z)(ht,Xe),$t=(0,pe.Z)(ve,{value:de,defaultValue:ve}),cn=(0,me.Z)($t,2),ln=cn[0],zt=cn[1],Cn=ln==null?"":String(ln),Oe=rt.useState(!1),nt=(0,me.Z)(Oe,2),we=nt[0],mt=nt[1],dt=rt.useRef(!1),vt=rt.useState(null),kt=(0,me.Z)(vt,2),Yt=kt[0],Pt=kt[1],Vt=(0,rt.useRef)(null),En=(0,rt.useRef)(null),gn=function(){var rn;return(rn=En.current)===null||rn===void 0?void 0:rn.textArea},Mn=function(){gn().focus()};(0,rt.useImperativeHandle)(Qt,function(){var qe;return{resizableTextArea:En.current,focus:Mn,blur:function(){gn().blur()},nativeElement:((qe=Vt.current)===null||qe===void 0?void 0:qe.nativeElement)||gn()}}),(0,rt.useEffect)(function(){mt(function(qe){return!z&&qe})},[z]);var zn=rt.useState(null),An=(0,me.Z)(zn,2),wn=An[0],yn=An[1];rt.useEffect(function(){if(wn){var qe;(qe=gn()).setSelectionRange.apply(qe,(0,Ke.Z)(wn))}},[wn]);var Pn=(0,he.Z)(Bt,Et),Xn=(Ht=Pn.max)!==null&&Ht!==void 0?Ht:at,pn=Number(Xn)>0,In=Pn.strategy(Cn),Kt=!!Xn&&In>Xn,Ut=function(rn,xn){var _n=xn;!dt.current&&Pn.exceedFormatter&&Pn.max&&Pn.strategy(xn)>Pn.max&&(_n=Pn.exceedFormatter(xn,{max:Pn.max}),xn!==_n&&yn([gn().selectionStart||0,gn().selectionEnd||0])),zt(_n),(0,Ye.rJ)(rn.currentTarget,rn,St,_n)},jt=function(rn){dt.current=!0,lt==null||lt(rn)},vn=function(rn){dt.current=!1,Ut(rn,rn.currentTarget.value),tn==null||tn(rn)},Wn=function(rn){Ut(rn,rn.target.value)},Ln=function(rn){rn.key==="Enter"&&Wt&&Wt(rn),Dt==null||Dt(rn)},mn=function(rn){mt(!0),st==null||st(rn)},Gn=function(rn){mt(!1),Zt==null||Zt(rn)},Rn=function(rn){zt(""),Mn(),(0,Ye.rJ)(gn(),rn,St)},Fn=gt,On;Pn.show&&(Pn.showFormatter?On=Pn.showFormatter({value:Cn,count:In,maxLength:Xn}):On="".concat(In).concat(pn?" / ".concat(Xn):""),Fn=rt.createElement(rt.Fragment,null,Fn,rt.createElement("span",{className:Ge()("".concat(We,"-data-count"),se==null?void 0:se.count),style:ne==null?void 0:ne.count},On)));var tr=function(rn){var xn;be==null||be(rn),(xn=gn())!==null&&xn!==void 0&&xn.style.height&&Pt(!0)},Mt=!Ct&&!Et&&!Pe;return rt.createElement(Ce.BaseInput,{ref:Vt,value:Cn,allowClear:Pe,handleReset:Rn,suffix:Fn,prefixCls:We,classNames:(0,Ae.Z)((0,Ae.Z)({},se),{},{affixWrapper:Ge()(se==null?void 0:se.affixWrapper,(0,it.Z)((0,it.Z)({},"".concat(We,"-show-count"),Et),"".concat(We,"-textarea-allow-clear"),Pe))}),disabled:z,focused:we,className:Ge()(ae,Kt&&"".concat(We,"-out-of-range")),style:(0,Ae.Z)((0,Ae.Z)({},te),Yt&&!Mt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof On=="string"?On:void 0}},hidden:ie,readOnly:Ft,onClear:Qe},rt.createElement(Fe,(0,le.Z)({},on,{autoSize:Ct,maxLength:at,onKeyDown:Ln,onChange:Wn,onFocus:mn,onBlur:Gn,onCompositionStart:jt,onCompositionEnd:vn,className:Ge()(se==null?void 0:se.textarea),style:(0,Ae.Z)((0,Ae.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:We,onResize:tr,ref:En,readOnly:Ft})))}),Ve=Se,yt=Ve},34643:function(Nt,_t,fe){"use strict";fe.d(_t,{S:function(){return _e}});var le=fe(48736),it=fe(65065);function Ae(Ge,Ce){var he=new Set;return Ge.forEach(function(Ye){Ce.has(Ye)||he.add(Ye)}),he}function Ke(Ge){var Ce=Ge||{},he=Ce.disabled,Ye=Ce.disableCheckbox,pe=Ce.checkable;return!!(he||Ye)||pe===!1}function me(Ge,Ce,he,Ye){for(var pe=new Set(Ge),rt=new Set,Me=0;Me<=he;Me+=1){var Be=Ce.get(Me)||new Set;Be.forEach(function(et){var $e=et.key,Ie=et.node,Re=et.children,Ze=Re===void 0?[]:Re;pe.has($e)&&!Ye(Ie)&&Ze.filter(function(je){return!Ye(je.node)}).forEach(function(je){pe.add(je.key)})})}for(var Le=new Set,ke=he;ke>=0;ke-=1){var tt=Ce.get(ke)||new Set;tt.forEach(function(et){var $e=et.parent,Ie=et.node;if(!(Ye(Ie)||!et.parent||Le.has(et.parent.key))){if(Ye(et.parent.node)){Le.add($e.key);return}var Re=!0,Ze=!1;($e.children||[]).filter(function(je){return!Ye(je.node)}).forEach(function(je){var wt=je.key,ze=pe.has(wt);Re&&!ze&&(Re=!1),!Ze&&(ze||rt.has(wt))&&(Ze=!0)}),Re&&pe.add($e.key),Ze&&rt.add($e.key),Le.add($e.key)}})}return{checkedKeys:Array.from(pe),halfCheckedKeys:Array.from(Ae(rt,pe))}}function ge(Ge,Ce,he,Ye,pe){for(var rt=new Set(Ge),Me=new Set(Ce),Be=0;Be<=Ye;Be+=1){var Le=he.get(Be)||new Set;Le.forEach(function($e){var Ie=$e.key,Re=$e.node,Ze=$e.children,je=Ze===void 0?[]:Ze;!rt.has(Ie)&&!Me.has(Ie)&&!pe(Re)&&je.filter(function(wt){return!pe(wt.node)}).forEach(function(wt){rt.delete(wt.key)})})}Me=new Set;for(var ke=new Set,tt=Ye;tt>=0;tt-=1){var et=he.get(tt)||new Set;et.forEach(function($e){var Ie=$e.parent,Re=$e.node;if(!(pe(Re)||!$e.parent||ke.has($e.parent.key))){if(pe($e.parent.node)){ke.add(Ie.key);return}var Ze=!0,je=!1;(Ie.children||[]).filter(function(wt){return!pe(wt.node)}).forEach(function(wt){var ze=wt.key,Ne=rt.has(ze);Ze&&!Ne&&(Ze=!1),!je&&(Ne||Me.has(ze))&&(je=!0)}),Ze||rt.delete(Ie.key),je&&Me.add(Ie.key),ke.add(Ie.key)}})}return{checkedKeys:Array.from(rt),halfCheckedKeys:Array.from(Ae(Me,rt))}}function _e(Ge,Ce,he,Ye){var pe=[],rt;Ye?rt=Ye:rt=Ke;var Me=new Set(Ge.filter(function(tt){var et=!!(0,it.Z)(he,tt);return et||pe.push(tt),et})),Be=new Map,Le=0;Object.keys(he).forEach(function(tt){var et=he[tt],$e=et.level,Ie=Be.get($e);Ie||(Ie=new Set,Be.set($e,Ie)),Ie.add(et),Le=Math.max(Le,$e)}),(0,le.ZP)(!pe.length,"Tree missing follow keys: ".concat(pe.slice(0,100).map(function(tt){return"'".concat(tt,"'")}).join(", ")));var ke;return Ce===!0?ke=me(Me,Be,Le,rt):ke=ge(Me,Ce.halfCheckedKeys,Be,Le,rt),ke}},65065:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return le}});function le(it,Ae){return it[Ae]}},34061:function(Nt,_t,fe){"use strict";fe.d(_t,{F:function(){return $e},H8:function(){return et},I8:function(){return tt},km:function(){return pe},oH:function(){return Le},w$:function(){return rt},zn:function(){return Be}});var le=fe(26420),it=fe(15142),Ae=fe(98506),Ke=fe(33346),me=fe(11592),ge=fe(2738),_e=fe(48736),Ge=fe(65065),Ce=["children"];function he(Ie,Re){return"".concat(Ie,"-").concat(Re)}function Ye(Ie){return Ie&&Ie.type&&Ie.type.isTreeNode}function pe(Ie,Re){return Ie!=null?Ie:Re}function rt(Ie){var Re=Ie||{},Ze=Re.title,je=Re._title,wt=Re.key,ze=Re.children,Ne=Ze||"title";return{title:Ne,_title:je||[Ne],key:wt||"key",children:ze||"children"}}function Me(Ie,Re){var Ze=new Map;function je(wt){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(wt||[]).forEach(function(Ne){var ct=Ne[Re.key],Fe=Ne[Re.children];warning(ct!=null,"Tree node must have a certain key: [".concat(ze).concat(ct,"]"));var Xe=String(ct);warning(!Ze.has(Xe)||ct===null||ct===void 0,"Same 'key' exist in the Tree: ".concat(Xe)),Ze.set(Xe,!0),je(Fe,"".concat(ze).concat(Xe," > "))})}je(Ie)}function Be(Ie){function Re(Ze){var je=(0,me.Z)(Ze);return je.map(function(wt){if(!Ye(wt))return(0,_e.ZP)(!wt,"Tree/TreeNode can only accept TreeNode as children."),null;var ze=wt.key,Ne=wt.props,ct=Ne.children,Fe=(0,Ke.Z)(Ne,Ce),Xe=(0,Ae.Z)({key:ze},Fe),Se=Re(ct);return Se.length&&(Xe.children=Se),Xe}).filter(function(wt){return wt})}return Re(Ie)}function Le(Ie,Re,Ze){var je=rt(Ze),wt=je._title,ze=je.key,Ne=je.children,ct=new Set(Re===!0?[]:Re),Fe=[];function Xe(Se){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Se.map(function(yt,ht){for(var Qt=he(Ve?Ve.pos:"0",ht),Ht=pe(yt[ze],Qt),ve,de=0;de<wt.length;de+=1){var st=wt[de];if(yt[st]!==void 0){ve=yt[st];break}}var Zt=Object.assign((0,ge.Z)(yt,[].concat((0,it.Z)(wt),[ze,Ne])),{title:ve,key:Ht,parent:Ve,pos:Qt,children:null,data:yt,isStart:[].concat((0,it.Z)(Ve?Ve.isStart:[]),[ht===0]),isEnd:[].concat((0,it.Z)(Ve?Ve.isEnd:[]),[ht===Se.length-1])});return Fe.push(Zt),Re===!0||ct.has(Ht)?Zt.children=Xe(yt[Ne]||[],Zt):Zt.children=[],Zt})}return Xe(Ie),Fe}function ke(Ie,Re,Ze){var je={};(0,le.Z)(Ze)==="object"?je=Ze:je={externalGetKey:Ze},je=je||{};var wt=je,ze=wt.childrenPropName,Ne=wt.externalGetKey,ct=wt.fieldNames,Fe=rt(ct),Xe=Fe.key,Se=Fe.children,Ve=ze||Se,yt;Ne?typeof Ne=="string"?yt=function(Ht){return Ht[Ne]}:typeof Ne=="function"&&(yt=function(Ht){return Ne(Ht)}):yt=function(Ht,ve){return pe(Ht[Xe],ve)};function ht(Qt,Ht,ve,de){var st=Qt?Qt[Ve]:Ie,Zt=Qt?he(ve.pos,Ht):"0",St=Qt?[].concat((0,it.Z)(de),[Qt]):[];if(Qt){var Pe=yt(Qt,Zt),at={node:Qt,index:Ht,pos:Zt,key:Pe,parentPos:ve.node?ve.pos:null,level:ve.level+1,nodes:St};Re(at)}st&&st.forEach(function(lt,tn){ht(lt,tn,{node:Qt,pos:Zt,level:ve?ve.level+1:-1},St)})}ht(null)}function tt(Ie){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ze=Re.initWrapper,je=Re.processEntity,wt=Re.onProcessFinished,ze=Re.externalGetKey,Ne=Re.childrenPropName,ct=Re.fieldNames,Fe=arguments.length>2?arguments[2]:void 0,Xe=ze||Fe,Se={},Ve={},yt={posEntities:Se,keyEntities:Ve};return Ze&&(yt=Ze(yt)||yt),ke(Ie,function(ht){var Qt=ht.node,Ht=ht.index,ve=ht.pos,de=ht.key,st=ht.parentPos,Zt=ht.level,St=ht.nodes,Pe={node:Qt,nodes:St,index:Ht,key:de,pos:ve,level:Zt},at=pe(de,ve);Se[ve]=Pe,Ve[at]=Pe,Pe.parent=Se[st],Pe.parent&&(Pe.parent.children=Pe.parent.children||[],Pe.parent.children.push(Pe)),je&&je(Pe,yt)},{externalGetKey:Xe,childrenPropName:Ne,fieldNames:ct}),wt&&wt(yt),yt}function et(Ie,Re){var Ze=Re.expandedKeys,je=Re.selectedKeys,wt=Re.loadedKeys,ze=Re.loadingKeys,Ne=Re.checkedKeys,ct=Re.halfCheckedKeys,Fe=Re.dragOverNodeKey,Xe=Re.dropPosition,Se=Re.keyEntities,Ve=(0,Ge.Z)(Se,Ie),yt={eventKey:Ie,expanded:Ze.indexOf(Ie)!==-1,selected:je.indexOf(Ie)!==-1,loaded:wt.indexOf(Ie)!==-1,loading:ze.indexOf(Ie)!==-1,checked:Ne.indexOf(Ie)!==-1,halfChecked:ct.indexOf(Ie)!==-1,pos:String(Ve?Ve.pos:""),dragOver:Fe===Ie&&Xe===0,dragOverGapTop:Fe===Ie&&Xe===-1,dragOverGapBottom:Fe===Ie&&Xe===1};return yt}function $e(Ie){var Re=Ie.data,Ze=Ie.expanded,je=Ie.selected,wt=Ie.checked,ze=Ie.loaded,Ne=Ie.loading,ct=Ie.halfChecked,Fe=Ie.dragOver,Xe=Ie.dragOverGapTop,Se=Ie.dragOverGapBottom,Ve=Ie.pos,yt=Ie.active,ht=Ie.eventKey,Qt=(0,Ae.Z)((0,Ae.Z)({},Re),{},{expanded:Ze,selected:je,checked:wt,loaded:ze,loading:Ne,halfChecked:ct,dragOver:Fe,dragOverGapTop:Xe,dragOverGapBottom:Se,pos:Ve,active:yt,key:ht});return"props"in Qt||Object.defineProperty(Qt,"props",{get:function(){return(0,_e.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Ie}}),Qt}},6790:function(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Bt}});var le=fe(67711),it=fe(26420),Ae=fe(98506),Ke=fe(52873),me=fe(16886),ge=fe(33346),_e=fe(92310),Ge=fe.n(_e),Ce=fe(29301),he=fe(70425),Ye=fe(34280),pe=fe(59301),rt=fe(4676),Me=pe.forwardRef(function(ae,te){var z=ae.height,ie=ae.offsetY,se=ae.offsetX,ne=ae.children,be=ae.prefixCls,Qe=ae.onInnerResize,Wt=ae.innerProps,Ft=ae.rtl,Ct=ae.extra,Dt={},on={display:"flex",flexDirection:"column"};return ie!==void 0&&(Dt={height:z,position:"relative",overflow:"hidden"},on=(0,Ae.Z)((0,Ae.Z)({},on),{},(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({transform:"translateY(".concat(ie,"px)")},Ft?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:Dt},pe.createElement(Ce.Z,{onResize:function(cn){var ln=cn.offsetHeight;ln&&Qe&&Qe()}},pe.createElement("div",(0,le.Z)({style:on,className:Ge()((0,Ke.Z)({},"".concat(be,"-holder-inner"),be)),ref:te},Wt),ne,Ct)))});Me.displayName="Filler";var Be=Me;function Le(ae){var te=ae.children,z=ae.setRef,ie=pe.useCallback(function(se){z(se)},[]);return pe.cloneElement(te,{ref:ie})}function ke(ae,te,z,ie,se,ne,be,Qe){var Wt=Qe.getKey;return ae.slice(te,z+1).map(function(Ft,Ct){var Dt=te+Ct,on=be(Ft,Dt,{style:{width:ie},offsetX:se}),$t=Wt(Ft);return pe.createElement(Le,{key:$t,setRef:function(ln){return ne(Ft,ln)}},on)})}function tt(ae,te,z,ie){var se=z-ae,ne=te-z,be=Math.min(se,ne)*2;if(ie<=be){var Qe=Math.floor(ie/2);return ie%2?z+Qe+1:z-Qe}return se>ne?z-(ie-ne):z+(ie-se)}function et(ae,te,z){var ie=ae.length,se=te.length,ne,be;if(ie===0&&se===0)return null;ie<se?(ne=ae,be=te):(ne=te,be=ae);var Qe={__EMPTY_ITEM__:!0};function Wt(cn){return cn!==void 0?z(cn):Qe}for(var Ft=null,Ct=Math.abs(ie-se)!==1,Dt=0;Dt<be.length;Dt+=1){var on=Wt(ne[Dt]),$t=Wt(be[Dt]);if(on!==$t){Ft=Dt,Ct=Ct||on!==Wt(be[Dt+1]);break}}return Ft===null?null:{index:Ft,multiple:Ct}}function $e(ae,te,z){var ie=pe.useState(ae),se=(0,me.Z)(ie,2),ne=se[0],be=se[1],Qe=pe.useState(null),Wt=(0,me.Z)(Qe,2),Ft=Wt[0],Ct=Wt[1];return pe.useEffect(function(){var Dt=et(ne||[],ae||[],te);(Dt==null?void 0:Dt.index)!==void 0&&(z==null||z(Dt.index),Ct(ae[Dt.index])),be(ae)},[ae]),[Ft]}var Ie=fe(16089),Re=(typeof navigator=="undefined"?"undefined":(0,it.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ze=Re,je=function(ae,te,z,ie){var se=(0,pe.useRef)(!1),ne=(0,pe.useRef)(null);function be(){clearTimeout(ne.current),se.current=!0,ne.current=setTimeout(function(){se.current=!1},50)}var Qe=(0,pe.useRef)({top:ae,bottom:te,left:z,right:ie});return Qe.current.top=ae,Qe.current.bottom=te,Qe.current.left=z,Qe.current.right=ie,function(Wt,Ft){var Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Dt=Wt?Ft<0&&Qe.current.left||Ft>0&&Qe.current.right:Ft<0&&Qe.current.top||Ft>0&&Qe.current.bottom;return Ct&&Dt?(clearTimeout(ne.current),se.current=!1):(!Dt||se.current)&&be(),!se.current&&Dt}};function wt(ae,te,z,ie,se,ne,be){var Qe=(0,pe.useRef)(0),Wt=(0,pe.useRef)(null),Ft=(0,pe.useRef)(null),Ct=(0,pe.useRef)(!1),Dt=je(te,z,ie,se);function on(Oe,nt){if(Ie.Z.cancel(Wt.current),!Dt(!1,nt)){var we=Oe;if(!we._virtualHandled)we._virtualHandled=!0;else return;Qe.current+=nt,Ft.current=nt,Ze||we.preventDefault(),Wt.current=(0,Ie.Z)(function(){var mt=Ct.current?10:1;be(Qe.current*mt,!1),Qe.current=0})}}function $t(Oe,nt){be(nt,!0),Ze||Oe.preventDefault()}var cn=(0,pe.useRef)(null),ln=(0,pe.useRef)(null);function zt(Oe){if(ae){Ie.Z.cancel(ln.current),ln.current=(0,Ie.Z)(function(){cn.current=null},2);var nt=Oe.deltaX,we=Oe.deltaY,mt=Oe.shiftKey,dt=nt,vt=we;(cn.current==="sx"||!cn.current&&mt&&we&&!nt)&&(dt=we,vt=0,cn.current="sx");var kt=Math.abs(dt),Yt=Math.abs(vt);cn.current===null&&(cn.current=ne&&kt>Yt?"x":"y"),cn.current==="y"?on(Oe,vt):$t(Oe,dt)}}function Cn(Oe){ae&&(Ct.current=Oe.detail===Ft.current)}return[zt,Cn]}function ze(ae,te,z,ie){var se=pe.useMemo(function(){return[new Map,[]]},[ae,z.id,ie]),ne=(0,me.Z)(se,2),be=ne[0],Qe=ne[1],Wt=function(Ct){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct,on=be.get(Ct),$t=be.get(Dt);if(on===void 0||$t===void 0)for(var cn=ae.length,ln=Qe.length;ln<cn;ln+=1){var zt,Cn=ae[ln],Oe=te(Cn);be.set(Oe,ln);var nt=(zt=z.get(Oe))!==null&&zt!==void 0?zt:ie;if(Qe[ln]=(Qe[ln-1]||0)+nt,Oe===Ct&&(on=ln),Oe===Dt&&($t=ln),on!==void 0&&$t!==void 0)break}return{top:Qe[on-1]||0,bottom:Qe[$t]}};return Wt}var Ne=fe(42573),ct=fe(58698),Fe=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,ct.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=Fe;function Se(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function Ve(ae,te,z){var ie=pe.useState(0),se=(0,me.Z)(ie,2),ne=se[0],be=se[1],Qe=(0,pe.useRef)(new Map),Wt=(0,pe.useRef)(new Xe),Ft=(0,pe.useRef)(0);function Ct(){Ft.current+=1}function Dt(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ct();var cn=function(){var Cn=!1;Qe.current.forEach(function(Oe,nt){if(Oe&&Oe.offsetParent){var we=Oe.offsetHeight,mt=getComputedStyle(Oe),dt=mt.marginTop,vt=mt.marginBottom,kt=Se(dt),Yt=Se(vt),Pt=we+kt+Yt;Wt.current.get(nt)!==Pt&&(Wt.current.set(nt,Pt),Cn=!0)}}),Cn&&be(function(Oe){return Oe+1})};if($t)cn();else{Ft.current+=1;var ln=Ft.current;Promise.resolve().then(function(){ln===Ft.current&&cn()})}}function on($t,cn){var ln=ae($t),zt=Qe.current.get(ln);cn?(Qe.current.set(ln,cn),Dt()):Qe.current.delete(ln),!zt!=!cn&&(cn?te==null||te($t):z==null||z($t))}return(0,pe.useEffect)(function(){return Ct},[]),[on,Dt,Wt.current,ne]}var yt=14/15;function ht(ae,te,z){var ie=(0,pe.useRef)(!1),se=(0,pe.useRef)(0),ne=(0,pe.useRef)(0),be=(0,pe.useRef)(null),Qe=(0,pe.useRef)(null),Wt,Ft=function($t){if(ie.current){var cn=Math.ceil($t.touches[0].pageX),ln=Math.ceil($t.touches[0].pageY),zt=se.current-cn,Cn=ne.current-ln,Oe=Math.abs(zt)>Math.abs(Cn);Oe?se.current=cn:ne.current=ln;var nt=z(Oe,Oe?zt:Cn,!1,$t);nt&&$t.preventDefault(),clearInterval(Qe.current),nt&&(Qe.current=setInterval(function(){Oe?zt*=yt:Cn*=yt;var we=Math.floor(Oe?zt:Cn);(!z(Oe,we,!0)||Math.abs(we)<=.1)&&clearInterval(Qe.current)},16))}},Ct=function(){ie.current=!1,Wt()},Dt=function($t){Wt(),$t.touches.length===1&&!ie.current&&(ie.current=!0,se.current=Math.ceil($t.touches[0].pageX),ne.current=Math.ceil($t.touches[0].pageY),be.current=$t.target,be.current.addEventListener("touchmove",Ft,{passive:!1}),be.current.addEventListener("touchend",Ct,{passive:!0}))};Wt=function(){be.current&&(be.current.removeEventListener("touchmove",Ft),be.current.removeEventListener("touchend",Ct))},(0,Ye.Z)(function(){return ae&&te.current.addEventListener("touchstart",Dt,{passive:!0}),function(){var on;(on=te.current)===null||on===void 0||on.removeEventListener("touchstart",Dt),Wt(),clearInterval(Qe.current)}},[ae])}function Qt(ae){return Math.floor(Math.pow(ae,.5))}function Ht(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function ve(ae,te,z){pe.useEffect(function(){var ie=te.current;if(ae&&ie){var se=!1,ne,be,Qe=function(){Ie.Z.cancel(ne)},Wt=function on(){Qe(),ne=(0,Ie.Z)(function(){z(be),on()})},Ft=function($t){if(!($t.target.draggable||$t.button!==0)){var cn=$t;cn._virtualHandled||(cn._virtualHandled=!0,se=!0)}},Ct=function(){se=!1,Qe()},Dt=function($t){if(se){var cn=Ht($t,!1),ln=ie.getBoundingClientRect(),zt=ln.top,Cn=ln.bottom;if(cn<=zt){var Oe=zt-cn;be=-Qt(Oe),Wt()}else if(cn>=Cn){var nt=cn-Cn;be=Qt(nt),Wt()}else Qe()}};return ie.addEventListener("mousedown",Ft),ie.ownerDocument.addEventListener("mouseup",Ct),ie.ownerDocument.addEventListener("mousemove",Dt),function(){ie.removeEventListener("mousedown",Ft),ie.ownerDocument.removeEventListener("mouseup",Ct),ie.ownerDocument.removeEventListener("mousemove",Dt),Qe()}}},[ae])}var de=10;function st(ae,te,z,ie,se,ne,be,Qe){var Wt=pe.useRef(),Ft=pe.useState(null),Ct=(0,me.Z)(Ft,2),Dt=Ct[0],on=Ct[1];return(0,Ye.Z)(function(){if(Dt&&Dt.times<de){if(!ae.current){on(function(Pn){return(0,Ae.Z)({},Pn)});return}ne();var $t=Dt.targetAlign,cn=Dt.originAlign,ln=Dt.index,zt=Dt.offset,Cn=ae.current.clientHeight,Oe=!1,nt=$t,we=null;if(Cn){for(var mt=$t||cn,dt=0,vt=0,kt=0,Yt=Math.min(te.length-1,ln),Pt=0;Pt<=Yt;Pt+=1){var Vt=se(te[Pt]);vt=dt;var En=z.get(Vt);kt=vt+(En===void 0?ie:En),dt=kt}for(var gn=mt==="top"?zt:Cn-zt,Mn=Yt;Mn>=0;Mn-=1){var zn=se(te[Mn]),An=z.get(zn);if(An===void 0){Oe=!0;break}if(gn-=An,gn<=0)break}switch(mt){case"top":we=vt-zt;break;case"bottom":we=kt-Cn+zt;break;default:{var wn=ae.current.scrollTop,yn=wn+Cn;vt<wn?nt="top":kt>yn&&(nt="bottom")}}we!==null&&be(we),we!==Dt.lastTop&&(Oe=!0)}Oe&&on((0,Ae.Z)((0,Ae.Z)({},Dt),{},{times:Dt.times+1,targetAlign:nt,lastTop:we}))}},[Dt,ae.current]),function($t){if($t==null){Qe();return}if(Ie.Z.cancel(Wt.current),typeof $t=="number")be($t);else if($t&&(0,it.Z)($t)==="object"){var cn,ln=$t.align;"index"in $t?cn=$t.index:cn=te.findIndex(function(Oe){return se(Oe)===$t.key});var zt=$t.offset,Cn=zt===void 0?0:zt;on({times:0,index:cn,offset:Cn,originAlign:ln})}}}var Zt=pe.forwardRef(function(ae,te){var z=ae.prefixCls,ie=ae.rtl,se=ae.scrollOffset,ne=ae.scrollRange,be=ae.onStartMove,Qe=ae.onStopMove,Wt=ae.onScroll,Ft=ae.horizontal,Ct=ae.spinSize,Dt=ae.containerSize,on=ae.style,$t=ae.thumbStyle,cn=ae.showScrollBar,ln=pe.useState(!1),zt=(0,me.Z)(ln,2),Cn=zt[0],Oe=zt[1],nt=pe.useState(null),we=(0,me.Z)(nt,2),mt=we[0],dt=we[1],vt=pe.useState(null),kt=(0,me.Z)(vt,2),Yt=kt[0],Pt=kt[1],Vt=!ie,En=pe.useRef(),gn=pe.useRef(),Mn=pe.useState(cn),zn=(0,me.Z)(Mn,2),An=zn[0],wn=zn[1],yn=pe.useRef(),Pn=function(){cn===!0||cn===!1||(clearTimeout(yn.current),wn(!0),yn.current=setTimeout(function(){wn(!1)},3e3))},Xn=ne-Dt||0,pn=Dt-Ct||0,In=pe.useMemo(function(){if(se===0||Xn===0)return 0;var Rn=se/Xn;return Rn*pn},[se,Xn,pn]),Kt=function(Fn){Fn.stopPropagation(),Fn.preventDefault()},Ut=pe.useRef({top:In,dragging:Cn,pageY:mt,startTop:Yt});Ut.current={top:In,dragging:Cn,pageY:mt,startTop:Yt};var jt=function(Fn){Oe(!0),dt(Ht(Fn,Ft)),Pt(Ut.current.top),be(),Fn.stopPropagation(),Fn.preventDefault()};pe.useEffect(function(){var Rn=function(Mt){Mt.preventDefault()},Fn=En.current,On=gn.current;return Fn.addEventListener("touchstart",Rn,{passive:!1}),On.addEventListener("touchstart",jt,{passive:!1}),function(){Fn.removeEventListener("touchstart",Rn),On.removeEventListener("touchstart",jt)}},[]);var vn=pe.useRef();vn.current=Xn;var Wn=pe.useRef();Wn.current=pn,pe.useEffect(function(){if(Cn){var Rn,Fn=function(Mt){var qe=Ut.current,rn=qe.dragging,xn=qe.pageY,_n=qe.startTop;Ie.Z.cancel(Rn);var xe=En.current.getBoundingClientRect(),De=Dt/(Ft?xe.width:xe.height);if(rn){var At=(Ht(Mt,Ft)-xn)*De,ft=_n;!Vt&&Ft?ft-=At:ft+=At;var Te=vn.current,pt=Wn.current,Gt=pt?ft/pt:0,an=Math.ceil(Gt*Te);an=Math.max(an,0),an=Math.min(an,Te),Rn=(0,Ie.Z)(function(){Wt(an,Ft)})}},On=function(){Oe(!1),Qe()};return window.addEventListener("mousemove",Fn,{passive:!0}),window.addEventListener("touchmove",Fn,{passive:!0}),window.addEventListener("mouseup",On,{passive:!0}),window.addEventListener("touchend",On,{passive:!0}),function(){window.removeEventListener("mousemove",Fn),window.removeEventListener("touchmove",Fn),window.removeEventListener("mouseup",On),window.removeEventListener("touchend",On),Ie.Z.cancel(Rn)}}},[Cn]),pe.useEffect(function(){return Pn(),function(){clearTimeout(yn.current)}},[se]),pe.useImperativeHandle(te,function(){return{delayHidden:Pn}});var Ln="".concat(z,"-scrollbar"),mn={position:"absolute",visibility:An?null:"hidden"},Gn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ft?(Object.assign(mn,{height:8,left:0,right:0,bottom:0}),Object.assign(Gn,(0,Ke.Z)({height:"100%",width:Ct},Vt?"left":"right",In))):(Object.assign(mn,(0,Ke.Z)({width:8,top:0,bottom:0},Vt?"right":"left",0)),Object.assign(Gn,{width:"100%",height:Ct,top:In})),pe.createElement("div",{ref:En,className:Ge()(Ln,(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},"".concat(Ln,"-horizontal"),Ft),"".concat(Ln,"-vertical"),!Ft),"".concat(Ln,"-visible"),An)),style:(0,Ae.Z)((0,Ae.Z)({},mn),on),onMouseDown:Kt,onMouseMove:Pn},pe.createElement("div",{ref:gn,className:Ge()("".concat(Ln,"-thumb"),(0,Ke.Z)({},"".concat(Ln,"-thumb-moving"),Cn)),style:(0,Ae.Z)((0,Ae.Z)({},Gn),$t),onMouseDown:jt}))}),St=Zt,Pe=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,Pe),Math.floor(z)}var lt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],tn=[],gt={overflowY:"auto",overflowAnchor:"none"};function Tt(ae,te){var z=ae.prefixCls,ie=z===void 0?"rc-virtual-list":z,se=ae.className,ne=ae.height,be=ae.itemHeight,Qe=ae.fullHeight,Wt=Qe===void 0?!0:Qe,Ft=ae.style,Ct=ae.data,Dt=ae.children,on=ae.itemKey,$t=ae.virtual,cn=ae.direction,ln=ae.scrollWidth,zt=ae.component,Cn=zt===void 0?"div":zt,Oe=ae.onScroll,nt=ae.onVirtualScroll,we=ae.onVisibleChange,mt=ae.innerProps,dt=ae.extraRender,vt=ae.styles,kt=ae.showScrollBar,Yt=kt===void 0?"optional":kt,Pt=(0,ge.Z)(ae,lt),Vt=pe.useCallback(function(Ot){return typeof on=="function"?on(Ot):Ot==null?void 0:Ot[on]},[on]),En=Ve(Vt,null,null),gn=(0,me.Z)(En,4),Mn=gn[0],zn=gn[1],An=gn[2],wn=gn[3],yn=!!($t!==!1&&ne&&be),Pn=pe.useMemo(function(){return Object.values(An.maps).reduce(function(Ot,Jt){return Ot+Jt},0)},[An.id,An.maps]),Xn=yn&&Ct&&(Math.max(be*Ct.length,Pn)>ne||!!ln),pn=cn==="rtl",In=Ge()(ie,(0,Ke.Z)({},"".concat(ie,"-rtl"),pn),se),Kt=Ct||tn,Ut=(0,pe.useRef)(),jt=(0,pe.useRef)(),vn=(0,pe.useRef)(),Wn=(0,pe.useState)(0),Ln=(0,me.Z)(Wn,2),mn=Ln[0],Gn=Ln[1],Rn=(0,pe.useState)(0),Fn=(0,me.Z)(Rn,2),On=Fn[0],tr=Fn[1],Mt=(0,pe.useState)(!1),qe=(0,me.Z)(Mt,2),rn=qe[0],xn=qe[1],_n=function(){xn(!0)},xe=function(){xn(!1)},De={getKey:Vt};function At(Ot){Gn(function(Jt){var bt;typeof Ot=="function"?bt=Ot(Jt):bt=Ot;var ot=Fr(bt);return Ut.current.scrollTop=ot,ot})}var ft=(0,pe.useRef)({start:0,end:Kt.length}),Te=(0,pe.useRef)(),pt=$e(Kt,Vt),Gt=(0,me.Z)(pt,1),an=Gt[0];Te.current=an;var fn=pe.useMemo(function(){if(!yn)return{scrollHeight:void 0,start:0,end:Kt.length-1,offset:void 0};if(!Xn){var Ot;return{scrollHeight:((Ot=jt.current)===null||Ot===void 0?void 0:Ot.offsetHeight)||0,start:0,end:Kt.length-1,offset:void 0}}for(var Jt=0,bt,ot,It,qt=Kt.length,Bn=0;Bn<qt;Bn+=1){var Nn=Kt[Bn],rr=Vt(Nn),sr=An.get(rr),ir=Jt+(sr===void 0?be:sr);ir>=mn&&bt===void 0&&(bt=Bn,ot=Jt),ir>mn+ne&&It===void 0&&(It=Bn),Jt=ir}return bt===void 0&&(bt=0,ot=0,It=Math.ceil(ne/be)),It===void 0&&(It=Kt.length-1),It=Math.min(It+1,Kt.length-1),{scrollHeight:Jt,start:bt,end:It,offset:ot}},[Xn,yn,mn,Kt,wn,ne]),He=fn.scrollHeight,Xt=fn.start,ut=fn.end,nn=fn.offset;ft.current.start=Xt,ft.current.end=ut,pe.useLayoutEffect(function(){var Ot=An.getRecord();if(Ot.size===1){var Jt=Array.from(Ot.keys())[0],bt=Ot.get(Jt),ot=Kt[Xt];if(ot&&bt===void 0){var It=Vt(ot);if(It===Jt){var qt=An.get(Jt),Bn=qt-be;At(function(Nn){return Nn+Bn})}}}An.resetRecord()},[He]);var Lt=pe.useState({width:0,height:ne}),sn=(0,me.Z)(Lt,2),un=sn[0],Dn=sn[1],kn=function(Jt){Dn({width:Jt.offsetWidth,height:Jt.offsetHeight})},Un=(0,pe.useRef)(),qn=(0,pe.useRef)(),Jn=pe.useMemo(function(){return at(un.width,ln)},[un.width,ln]),or=pe.useMemo(function(){return at(un.height,He)},[un.height,He]),Kn=He-ne,yr=(0,pe.useRef)(Kn);yr.current=Kn;function Fr(Ot){var Jt=Ot;return Number.isNaN(yr.current)||(Jt=Math.min(Jt,yr.current)),Jt=Math.max(Jt,0),Jt}var ur=mn<=0,br=mn>=Kn,Sr=On<=0,cr=On>=ln,$n=je(ur,br,Sr,cr),Er=function(){return{x:pn?-On:On,y:mn}},dr=(0,pe.useRef)(Er()),hr=(0,he.zX)(function(Ot){if(nt){var Jt=(0,Ae.Z)((0,Ae.Z)({},Er()),Ot);(dr.current.x!==Jt.x||dr.current.y!==Jt.y)&&(nt(Jt),dr.current=Jt)}});function mr(Ot,Jt){var bt=Ot;Jt?((0,rt.flushSync)(function(){tr(bt)}),hr()):At(bt)}function Tr(Ot){var Jt=Ot.currentTarget.scrollTop;Jt!==mn&&At(Jt),Oe==null||Oe(Ot),hr()}var vr=function(Jt){var bt=Jt,ot=ln?ln-un.width:0;return bt=Math.max(bt,0),bt=Math.min(bt,ot),bt},lr=(0,he.zX)(function(Ot,Jt){Jt?((0,rt.flushSync)(function(){tr(function(bt){var ot=bt+(pn?-Ot:Ot);return vr(ot)})}),hr()):At(function(bt){var ot=bt+Ot;return ot})}),nr=wt(yn,ur,br,Sr,cr,!!ln,lr),fr=(0,me.Z)(nr,2),zr=fr[0],Pr=fr[1];ht(yn,Ut,function(Ot,Jt,bt,ot){var It=ot;return $n(Ot,Jt,bt)?!1:!It||!It._virtualHandled?(It&&(It._virtualHandled=!0),zr({preventDefault:function(){},deltaX:Ot?Jt:0,deltaY:Ot?0:Jt}),!0):!1}),ve(Xn,Ut,function(Ot){At(function(Jt){return Jt+Ot})}),(0,Ye.Z)(function(){function Ot(bt){var ot=ur&&bt.detail<0,It=br&&bt.detail>0;yn&&!ot&&!It&&bt.preventDefault()}var Jt=Ut.current;return Jt.addEventListener("wheel",zr,{passive:!1}),Jt.addEventListener("DOMMouseScroll",Pr,{passive:!0}),Jt.addEventListener("MozMousePixelScroll",Ot,{passive:!1}),function(){Jt.removeEventListener("wheel",zr),Jt.removeEventListener("DOMMouseScroll",Pr),Jt.removeEventListener("MozMousePixelScroll",Ot)}},[yn,ur,br]),(0,Ye.Z)(function(){if(ln){var Ot=vr(On);tr(Ot),hr({x:Ot})}},[un.width,ln]);var kr=function(){var Jt,bt;(Jt=Un.current)===null||Jt===void 0||Jt.delayHidden(),(bt=qn.current)===null||bt===void 0||bt.delayHidden()},Xr=st(Ut,Kt,An,be,Vt,function(){return zn(!0)},At,kr);pe.useImperativeHandle(te,function(){return{nativeElement:vn.current,getScrollInfo:Er,scrollTo:function(Jt){function bt(ot){return ot&&(0,it.Z)(ot)==="object"&&("left"in ot||"top"in ot)}bt(Jt)?(Jt.left!==void 0&&tr(vr(Jt.left)),Xr(Jt.top)):Xr(Jt)}}}),(0,Ye.Z)(function(){if(we){var Ot=Kt.slice(Xt,ut+1);we(Ot,Kt)}},[Xt,ut,Kt]);var Lr=ze(Kt,Vt,An,be),Ir=dt==null?void 0:dt({start:Xt,end:ut,virtual:Xn,offsetX:On,offsetY:nn,rtl:pn,getSize:Lr}),Cr=ke(Kt,Xt,ut,ln,On,Mn,Dt,De),xr=null;ne&&(xr=(0,Ae.Z)((0,Ke.Z)({},Wt?"height":"maxHeight",ne),gt),yn&&(xr.overflowY="hidden",ln&&(xr.overflowX="hidden"),rn&&(xr.pointerEvents="none")));var Vn={};return pn&&(Vn.dir="rtl"),pe.createElement("div",(0,le.Z)({ref:vn,style:(0,Ae.Z)((0,Ae.Z)({},Ft),{},{position:"relative"}),className:In},Vn,Pt),pe.createElement(Ce.Z,{onResize:kn},pe.createElement(Cn,{className:"".concat(ie,"-holder"),style:xr,ref:Ut,onScroll:Tr,onMouseEnter:kr},pe.createElement(Be,{prefixCls:ie,height:He,offsetX:On,offsetY:nn,scrollWidth:ln,onInnerResize:zn,ref:jt,innerProps:mt,rtl:pn,extra:Ir},Cr))),Xn&&He>ne&&pe.createElement(St,{ref:Un,prefixCls:ie,scrollOffset:mn,scrollRange:He,rtl:pn,onScroll:mr,onStartMove:_n,onStopMove:xe,spinSize:or,containerSize:un.height,style:vt==null?void 0:vt.verticalScrollBar,thumbStyle:vt==null?void 0:vt.verticalScrollBarThumb,showScrollBar:Yt}),Xn&&ln>un.width&&pe.createElement(St,{ref:qn,prefixCls:ie,scrollOffset:On,scrollRange:ln,rtl:pn,onScroll:mr,onStartMove:_n,onStopMove:xe,spinSize:Jn,containerSize:un.width,horizontal:!0,style:vt==null?void 0:vt.horizontalScrollBar,thumbStyle:vt==null?void 0:vt.horizontalScrollBarThumb,showScrollBar:Yt}))}var We=pe.forwardRef(Tt);We.displayName="List";var Et=We,Bt=Et},93314:function(Nt){"use strict";Nt.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(Nt,_t,fe){"use strict";fe.d(_t,{Z:function(){return Ge}});const le=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,it=(Ce,he)=>(!he||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",Ae=(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=(Me=>{if(!Me.ownerDocument||!Me.ownerDocument.defaultView)return null;try{return Me.ownerDocument.defaultView.frameElement}catch(Be){return null}})(pe);return!!rt&&(rt.clientHeight<pe.scrollHeight||rt.clientWidth<pe.scrollWidth)})(Ce)}return!1},Ke=(Ce,he,Ye,pe,rt,Me,Be,Le)=>Me<Ce&&Be>he||Me>Ce&&Be<he?0:Me<=Ce&&Le<=Ye||Be>=he&&Le>=Ye?Me-Ce-pe:Be>he&&Le<Ye||Me<Ce&&Le>Ye?Be-he+rt:0,me=Ce=>{const he=Ce.parentElement;return he==null?Ce.getRootNode().host||null:he},ge=(Ce,he)=>{var Ye,pe,rt,Me;if(typeof document=="undefined")return[];const{scrollMode:Be,block:Le,inline:ke,boundary:tt,skipOverflowHiddenElements:et}=he,$e=typeof tt=="function"?tt:St=>St!==tt;if(!le(Ce))throw new TypeError("Invalid target");const Ie=document.scrollingElement||document.documentElement,Re=[];let Ze=Ce;for(;le(Ze)&&$e(Ze);){if(Ze=me(Ze),Ze===Ie){Re.push(Ze);break}Ze!=null&&Ze===document.body&&Ae(Ze)&&!Ae(document.documentElement)||Ze!=null&&Ae(Ze,et)&&Re.push(Ze)}const je=(pe=(Ye=window.visualViewport)==null?void 0:Ye.width)!=null?pe:innerWidth,wt=(Me=(rt=window.visualViewport)==null?void 0:rt.height)!=null?Me:innerHeight,{scrollX:ze,scrollY:Ne}=window,{height:ct,width:Fe,top:Xe,right:Se,bottom:Ve,left:yt}=Ce.getBoundingClientRect(),{top:ht,right:Qt,bottom:Ht,left:ve}=(St=>{const Pe=window.getComputedStyle(St);return{top:parseFloat(Pe.scrollMarginTop)||0,right:parseFloat(Pe.scrollMarginRight)||0,bottom:parseFloat(Pe.scrollMarginBottom)||0,left:parseFloat(Pe.scrollMarginLeft)||0}})(Ce);let de=Le==="start"||Le==="nearest"?Xe-ht:Le==="end"?Ve+Ht:Xe+ct/2-ht+Ht,st=ke==="center"?yt+Fe/2-ve+Qt:ke==="end"?Se+Qt:yt-ve;const Zt=[];for(let St=0;St<Re.length;St++){const Pe=Re[St],{height:at,width:lt,top:tn,right:gt,bottom:Tt,left:We}=Pe.getBoundingClientRect();if(Be==="if-needed"&&Xe>=0&&yt>=0&&Ve<=wt&&Se<=je&&(Pe===Ie&&!Ae(Pe)||Xe>=tn&&Ve<=Tt&&yt>=We&&Se<=gt))return Zt;const Et=getComputedStyle(Pe),Bt=parseInt(Et.borderLeftWidth,10),ae=parseInt(Et.borderTopWidth,10),te=parseInt(Et.borderRightWidth,10),z=parseInt(Et.borderBottomWidth,10);let ie=0,se=0;const ne="offsetWidth"in Pe?Pe.offsetWidth-Pe.clientWidth-Bt-te:0,be="offsetHeight"in Pe?Pe.offsetHeight-Pe.clientHeight-ae-z:0,Qe="offsetWidth"in Pe?Pe.offsetWidth===0?0:lt/Pe.offsetWidth:0,Wt="offsetHeight"in Pe?Pe.offsetHeight===0?0:at/Pe.offsetHeight:0;if(Ie===Pe)ie=Le==="start"?de:Le==="end"?de-wt:Le==="nearest"?Ke(Ne,Ne+wt,wt,ae,z,Ne+de,Ne+de+ct,ct):de-wt/2,se=ke==="start"?st:ke==="center"?st-je/2:ke==="end"?st-je:Ke(ze,ze+je,je,Bt,te,ze+st,ze+st+Fe,Fe),ie=Math.max(0,ie+Ne),se=Math.max(0,se+ze);else{ie=Le==="start"?de-tn-ae:Le==="end"?de-Tt+z+be:Le==="nearest"?Ke(tn,Tt,at,ae,z+be,de,de+ct,ct):de-(tn+at/2)+be/2,se=ke==="start"?st-We-Bt:ke==="center"?st-(We+lt/2)+ne/2:ke==="end"?st-gt+te+ne:Ke(We,gt,lt,Bt,te+ne,st,st+Fe,Fe);const{scrollLeft:Ft,scrollTop:Ct}=Pe;ie=Wt===0?0:Math.max(0,Math.min(Ct+ie/Wt,Pe.scrollHeight-at/Wt+be)),se=Qe===0?0:Math.max(0,Math.min(Ft+se/Qe,Pe.scrollWidth-lt/Qe+ne)),de+=Ct-ie,st+=Ft-se}Zt.push({el:Pe,top:ie,left:se})}return Zt},_e=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(he=>he===Object(he)&&Object.keys(he).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function Ge(Ce,he){if(!Ce.isConnected||!(rt=>{let Me=rt;for(;Me&&Me.parentNode;){if(Me.parentNode===document)return!0;Me=Me.parentNode instanceof ShadowRoot?Me.parentNode.host:Me.parentNode}return!1})(Ce))return;const Ye=(rt=>{const Me=window.getComputedStyle(rt);return{top:parseFloat(Me.scrollMarginTop)||0,right:parseFloat(Me.scrollMarginRight)||0,bottom:parseFloat(Me.scrollMarginBottom)||0,left:parseFloat(Me.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:Me,left:Be}of ge(Ce,_e(he))){const Le=Me-Ye.top+Ye.bottom,ke=Be-Ye.left+Ye.right;rt.scroll({top:Le,left:ke,behavior:pe})}}}}]);