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

1105 lines
676 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[7043],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(It,Ht){"use strict";Ht.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 It={},Ht="5.0",he={},te=null,Ke=!1,_e=!1,Xe=null,ve=!1,me=null,Oe=null,Ve=0;Ve<arguments.length;Ve++){var we=arguments[Ve];if(we!==null)switch(typeof we){case"number":Ht=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ht=we:Xe=we;break;case"object":typeof we.is3D!="undefined"?te=we:he=we;break;case"boolean":Ke=we,_e=!0;break}}te===null&&(te={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},he.material_id!==void 0&&!_e&&(Ke=!0)),Xe!==null&&he.id===void 0&&(he.id=Xe);var fe="",Ye="",pe=!1,it=null,He=null,Ce=null,Ee=!1,Se=null,Je=null,lt=null,$e=null,tt=null;he.height!==void 0&&(he.height=Math.round(he.height)),he.width!==void 0&&(he.width=Math.round(he.width));var Te=function(Ne){return parseFloat(Ne)>4?parseFloat(Ne):5};It.setHTML5Codebase=function(Ne,rt){Oe=Ne,ft(Ne,rt)},It.setJavaCodebase=It.setJavaCodebaseVersion=It.isCompiledInstalled=It.setPreCompiledScriptPath=It.setPreCompiledResourcePath=function(){},It.setHTML5CodebaseVersion=function(Ne,rt){var ct=parseFloat(Ne);if(ct!==NaN&&ct<5){console.log("The GeoGebra HTML5 codebase version "+ct+" is deprecated. Using version latest instead.");return}me=Ne,de(Ne,rt)},It.getHTML5CodebaseVersion=function(){return He},It.getParameters=function(){return he},It.setFontsCSSURL=function(Ne){$e=Ne},It.setGiacJSURL=function(Ne){},It.setJNLPFile=function(Ne){fe=Ne},It.setJNLPBaseDir=function(Ne){},It.inject=function(){function Ne(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rt="auto",ct=he.id,on,vt=!1,Pt=0;Pt<arguments.length;Pt++){var ze=arguments[Pt];typeof ze=="string"?(ze=ze.toLowerCase(),ze.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rt=ze:ct=arguments[Pt]):typeof ze=="boolean"?vt=ze:ze instanceof HTMLElement&&(on=ze)}wt();function wt(){if(!ve){setTimeout(wt,200);return}rt=Mt(rt);var Bt=on||document.getElementById(ct);if(!Bt){console.log("possibly bug on ajax loading? ");return}if(It.removeExistingApplet(Bt,!1),he.width===void 0&&Bt.clientWidth&&(he.width=Bt.clientWidth),he.height===void 0&&Bt.clientHeight&&(he.height=Bt.clientHeight),!(he.width&&he.height)&&rt==="html5"&&(delete he.width,delete he.height),it=rt,rt==="screenshot")Fe(Bt,he);else{var ae=!1;he.hasOwnProperty("playButton")&&he.playButton||he.hasOwnProperty("clickToLoad")&&he.clickToLoad?ae=!0:he.hasOwnProperty("playButtonAutoDecide")&&he.playButtonAutoDecide&&(ae=(!dt()||Ne())&&ht()),ae?(it="screenshot",Ut(Bt,he,vt,rt)):Qe(Bt,he,vt)}}};function dt(){try{return window.self!==window.top}catch(Ne){return!0}}function ht(){return he.hasOwnProperty("screenshotGenerator")&&he.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}It.getViews=function(){return te},It.isJavaInstalled=function(){return!1};var Vt=function(Ne){var rt=function(Pt){var ze=JSON.parse(Pt),wt=function(ne){return ne.type=="G"||ne.type=="E"},Bt=ze.elements?ze.elements.filter(wt)[0]:ze;if(!Bt||!Bt.url){ct();return}he.fileName=Bt.url,Be(Bt.settings||{}),te.is3D=!0;var ae="https://www.geogebra.org/images/";It.setPreviewImage(Se||Bt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Ne()},ct=function(){he.onError&&he.onError(),qt("Error: Fetching material (id "+he.material_id+") failed.",he)},on=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",vt="/materials/"+he.material_id+"?scope=basic";Ge("https://"+on+"/api/proxy.php?path="+encodeURIComponent(vt),rt,ct)};function Be(Ne){var rt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ct){Ne[ct]=!!Ne[ct]}),rt.forEach(function(ct){he[ct]===void 0&&Ne[ct]!==void 0&&(he[ct]=Ne[ct])}),he.showToolBarHelp===void 0&&(he.showToolBarHelp=he.showToolBar)}function Ge(Ne,rt,ct){var on=new XMLHttpRequest;on.open("GET",Ne),on.onload=function(){rt(on.responseText)},on.onerror=ct,on.send()}It.isHTML5Installed=function(){return!0},It.getLoadedAppletType=function(){return it},It.setPreviewImage=function(Ne,rt,ct){Se=Ne,Je=rt,lt=ct},It.removeExistingApplet=function(Ne,rt){var ct;typeof Ne=="string"&&(Ne=document.getElementById(Ne)),it=null;var on=null;for(ct=0;ct<Ne.childNodes.length;ct++){var vt=Ne.childNodes[ct],Pt=vt.className;Pt==="applet_screenshot"?rt?(vt.style.display="block",it="screenshot"):vt.style.display="none":Pt!=="applet_scaler prerender"&&(Ne.removeChild(vt),on=Pt&&Pt.indexOf("appletParameters")!=-1?vt.id:null,ct--)}var ze=he.id!==void 0?he.id:on,wt=window[ze];wt&&typeof wt.getBase64=="function"&&(wt.remove(),window[ze]=null)},It.refreshHitPoints=function(){if(Te(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ne=It.getAppletObject();return Ne&&typeof Ne.recalculateEnvironments=="function"?(Ne.recalculateEnvironments(),!0):!1},It.startAnimation=function(){var Ne=It.getAppletObject();return Ne&&typeof Ne.startAnimation=="function"?(Ne.startAnimation(),!0):!1},It.stopAnimation=function(){var Ne=It.getAppletObject();return Ne&&typeof Ne.stopAnimation=="function"?(Ne.stopAnimation(),!0):!1},It.getAppletObject=function(){var Ne=he.id!==void 0?he.id:"ggbApplet";return window[Ne]},It.resize=function(){};var nt=function(Ne,rt,ct){var on=document.createElement("param");on.setAttribute("name",rt),on.setAttribute("value",ct),Ne.appendChild(on)},Me=function(Ne){return Ne&&Ne!=="false"},Qe=function(Ne,rt,ct){Te(He)<=4.2&&(ct=!0);var on=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==He||ggbHTML5LoadedCodebaseIsWebSimple&&!Ee)&&(on=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var vt=document.createElement("div");vt.classList.add("appletParameters","notranslate");var Pt=rt.width,ze=rt.height;if(rt.disableAutoScale=rt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rt.disableAutoScale,rt.width!==void 0)if(Te(He)<=4.4)Me(rt.showToolBar)&&(rt.height-=7),Me(rt.showAlgebraInput)&&(rt.height-=37),rt.width<605&&Me(rt.showToolBar)&&(rt.width=605,Pt=605);else{var wt=100;(Me(rt.showToolBar)||Me(rt.showMenuBar))&&(rt.hasOwnProperty("customToolBar")&&(rt.customToolbar=rt.customToolBar),wt=Me(rt.showMenuBar)?245:155),Pt<wt&&(rt.width=wt,Pt=wt)}vt.style.border="none",vt.style.display="inline-block";for(var Bt in rt)rt.hasOwnProperty(Bt)&&Bt!=="appletOnLoad"&&vt.setAttribute("data-param-"+Bt,rt[Bt]);$e&&vt.setAttribute("data-param-fontscssurl",$e),It.resize=function(){GGBAppletUtils.responsiveResize(Ne,rt)},window.addEventListener("resize",function($t){It.resize()});var ae=typeof rt.appletOnLoad=="function"?rt.appletOnLoad:function(){};if(!ct&&rt.width!==void 0){rt.hasOwnProperty("showSplash")||vt.setAttribute("data-param-showSplash","false");var ne=Ne.querySelector(".applet_scaler.prerender"),z=ne!==null;if(z)var oe=ne.querySelector(".ggb_preview");else{var oe=hn(Pt,ze,rt.borderColor,!1);ne=document.createElement("div"),ne.className="applet_scaler",ne.style.position="relative",ne.style.display="block",ne.style.width=Pt+"px",ne.style.height=ze+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ne,"66%"),Te(He)>=5?(rt.appletOnLoad=function($t){var Gt=Ne.querySelector(".ggb_preview");Gt&&Gt.parentNode.removeChild(Gt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ne),window.GGBT_wsf_view&&$(window).trigger("resize"),ae($t)},z||ne.appendChild(oe)):vt.appendChild(oe),ne.appendChild(vt),z||Ne.appendChild(ne),setTimeout(function(){It.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(vt),Ne.appendChild(se),rt.appletOnLoad=function($t){It.resize(),ae($t)}}function ie($t,Gt){Gt&&typeof Gt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement($t,Gt.appletOnLoad):renderGGBElement($t),qt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Gt)}function xe($t,Gt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:$t,params:Gt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(nn){ie(nn.article,nn.params)}),html5AppletsToProcess=null)},Te(He)<5&&($t.className+=" geogebraweb")):ie($t,Gt)}if(on){scriptLoadStarted=!0;for(var Ue=0;Ue<vt.childNodes.length;Ue++){var Ot=vt.childNodes[Ue].tagName;Ot==="TABLE"&&(vt.removeChild(vt.childNodes[Ue]),Ue--)}if(ggbHTML5LoadedScript!==null){var Dt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Dt!=null&&Dt.parentNode.removeChild(Dt)}var gt=document.createElement("script"),kt=function(){xe(vt,rt)};gt.src=Ye+Ce,ggbHTML5LoadedCodebaseIsWebSimple=Ee,ggbHTML5LoadedCodebaseVersion=He,ggbHTML5LoadedScript=gt.src,qt("GeoGebra HTML5 codebase loaded: '"+Ye+"'.",rt),!Oe&&(!me||me=="5.0")?(Ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),kt()):Ye.requirejs?__webpack_require__.e(981).then(function(){var $t=[__webpack_require__(60981)];kt.apply(null,$t)}.bind(this)).catch(__webpack_require__.oe):(gt.onload=kt,Ne.appendChild(gt))}else xe(vt,rt);rt.height=ze,rt.width=Pt},Fe=function(Ne,rt,ct){var on=hn(rt.width,rt.height,rt.borderColor,ct),vt=document.createElement("div");vt.style.position="relative",vt.style.display="block",vt.style.width=rt.width+"px",vt.style.height=rt.height+"px",vt.className="applet_screenshot applet_scaler"+(ct?" applet_screenshot_play":""),vt.appendChild(on);var Pt=GGBAppletUtils.getScale(rt,Ne,ct);ct?(Ne.appendChild(Et()),window.GGBT_wsf_view||(Ne.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(vt,"66%"),Ne.appendChild(vt),Pt!==1&&!isNaN(Pt)&&(GGBAppletUtils.scaleElement(vt,Pt),vt.style.width=rt.width+"px",vt.style.height=rt.height+"px",vt.parentNode.style.width=rt.width*Pt+"px",vt.parentNode.style.height=rt.height*Pt+"px"),It.resize=function(){ot(Ne,on,vt,ct)},window.addEventListener("resize",function(ze){It.resize()}),It.resize()};function ot(Ne,rt,ct,on){if(Ne.contains(rt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ne.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ne)}var vt=GGBAppletUtils.getScale(he,Ne,on);ct.parentNode!==null&&(!isNaN(vt)&&vt!==1?(GGBAppletUtils.scaleElement(ct,vt),ct.parentNode.style.width=he.width*vt+"px",ct.parentNode.style.height=he.height*vt+"px"):(GGBAppletUtils.scaleElement(ct,1),ct.parentNode.style.width=he.width+"px",ct.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ne),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}It.onExitFullscreen=function(Ne,rt){rt.appendChild(Ne)};var Ut=function(Ne,rt,ct,on){Fe(Ne,rt,!0);for(var vt=function(){var wt=[];for(ze=0;ze<Ne.childNodes.length;ze++)wt.push(Ne.childNodes[ze]);if(window.GGBT_wsf_view){var Bt=window.GGBT_wsf_view.renderFullScreen(Ne,rt.id),ae=document.getElementById("fullscreencontainer"),ne=jQuery(Ne).find(".fullscreencontent");ne.length>0?(Bt.remove(),ne.attr("id","fullscreencontent").show(),jQuery(ae).append(ne),window.dispatchEvent(new Event("resize"))):Qe(Bt,rt,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else it=on,Qe(Ne,rt,!1);if(!window.GGBT_wsf_view)for(ze=0;ze<wt.length;ze++)Ne.removeChild(wt[ze])},Pt=Ne.getElementsByClassName("ggb_preview_play"),ze=0;ze<Pt.length;ze++)Pt[ze].addEventListener("click",vt,!1),Pt[ze].addEventListener("ontouchstart",vt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ne),ht()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Et=function(){var Ne=document.createElement("div");if(Ne.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rt='.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");}',ct=document.createElement("style");ct.styleSheet?ct.styleSheet.cssText=rt:ct.appendChild(document.createTextNode(rt)),document.getElementsByTagName("head")[0].appendChild(ct)}return Ne},hn=function(Ne,rt,ct,on){var vt=document.createElement("div");vt.className="ggb_preview",vt.style.position="absolute",vt.style.zIndex="90",vt.style.width=Ne-2+"px",vt.style.height=rt-2+"px",vt.style.top="0px",vt.style.left="0px",vt.style.overflow="hidden",vt.style.backgroundColor="white";var Pt="lightgrey";ct!==void 0&&(ct==="none"?Pt="transparent":Pt=ct),vt.style.border="1px solid "+Pt;var ze=document.createElement("img");if(ze.style.position="relative",ze.style.zIndex="1000",ze.style.top="-1px",ze.style.left="-1px",Se!==null&&ze.setAttribute("src",Se),ze.style.opacity=.7,Je!==null){var wt,Bt,ae;if(!on){wt=document.createElement("img"),wt.style.position="absolute",wt.style.zIndex="1001",wt.style.opacity=1,ze.style.opacity=.3,Bt=360,Bt>Ne/4*3&&(Bt=Ne/4*3),ae=Bt/5.8,wt.setAttribute("src",Je),wt.setAttribute("width",Bt),wt.setAttribute("height",ae);var ne=(Ne-Bt)/2,z=(rt-ae)/2;wt.style.left=ne+"px",wt.style.top=z+"px",vt.appendChild(wt)}}return vt.appendChild(ze),vt},Mt=function(Ne){return Ne=Ne.toLowerCase(),Ne==="html5"||Ne==="screenshot"?Ne:"html5"},ge=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Ne,rt){if(He=Ne,rt){ft(He,!0);return}var ct=!Ke;if(ct){var on=Te(He);!isNaN(on)&&on<4.4&&(ct=!1)}var vt,Pt;window.location.protocol.substr(0,4)==="http"?vt=window.location.protocol:vt="http:";var ze=He.indexOf("//");ze>0?Pt=He:ze===0?Pt=vt+He:Pt="https://www.geogebra.org/apps/5.2.814.0/";for(var wt in ge)if(He.slice(ge[wt].length*-1)===ge[wt]||He.slice((ge[wt].length+1)*-1)===ge[wt]+"/"){ft(Pt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ct&&!te.is3D&&!te.AV&&!te.SV&&!te.CV&&!te.EV2&&!te.CP&&!te.PC&&!te.DA&&!te.FI&&!te.PV&&!Me(he.showToolBar)&&!Me(he.showMenuBar)&&!Me(he.showAlgebraInput)&&!Me(he.enableRightClick)&&(!he.appName||he.appName=="classic")?Pt+="webSimple/":Pt+="web3d/",ft(Pt,!1)},ft=function(Ne,rt){if(Ne.requirejs){Ye=Ne;return}Ne.slice(-1)!=="/"&&(Ne+="/"),Ye=Ne,rt===null&&(rt=Ne.indexOf("http")===-1),pe=rt,Ce="web.nocache.js",Ee=!1;var ct=Ye.split("/");ct.length>1&&(!rt&&ct[ct.length-2]==="webSimple"?(Ce="webSimple.nocache.js",Ee=!0):ge.indexOf(ct[ct.length-2])>=0&&(Ce=ct[ct.length-2]+".nocache.js")),ct=Ne.split("/"),He=ct[ct.length-3],He.substr(0,4)==="test"?He=He.substr(4,1)+"."+He.substr(5,1):(He.substr(0,3)==="war"||He.substr(0,4)==="beta")&&(He="5.0");var on=parseFloat(He);on!==NaN&&on<5&&Ne.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+on+" is deprecated. Using version latest instead."),de("5.0",rt))},qt=function(Ne,rt){window.console&&window.console.log&&(!rt||typeof rt.showLogging=="undefined"||rt.showLogging&&rt.showLogging!=="false")&&console.log(Ne)};he.material_id!==void 0?Vt(xt):xt();function xt(){var Ne=Ht;me!==null?Ne=me:parseFloat(Ne)<5&&(Ne="5.0"),de(Ne,!1),Oe!==null&&ft(Oe,pe),ve=!0}return It},GGBAppletUtils=function(){"use strict";function It(){return window.GGBT_wsf_edit!==void 0}function Ht(ve,me){me!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+me+","+me+")",ve.style.webkitTransform="scale("+me+","+me+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function he(ve,me,Oe,Ve,we,fe){var Ye=null;if(fe!=null&&fe!="")for(var pe=ve.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+fe+" ")>-1){Ye=pe;break}else pe=pe.parentNode;var it=0,He=0,Ce=0,Ee=0,Se=0,Je=0,lt=0;if(Ye)it=Ye.offsetWidth,He=Math.max(Ve?Ye.offsetWidth:0,Ye.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(it=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),Ce=it):(it=window.innerWidth,He=window.innerHeight,Ce=window.innerWidth),ve){var $e=ve.getBoundingClientRect();$e.left>0&&$e.left<=it&&(we===void 0||!we)&&(document.dir==="rtl"?(Se=it-$e.width-$e.left,Je=Ce<=480?10:30):(Je=$e.left,Se=Ce<=480?10:30),Ee=Je+Se)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var tt=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee=40,lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ee=0,lt=40)}}return ve&&((Oe===void 0||!Oe)&&me>0&&me+Ee<it?it=me:it-=Ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Oe===void 0||!Oe)&&(He-=lt)),{width:it,height:He}}function te(ve,me,Oe,Ve,we){if(ve.isScreenshoGenerator)return 1;var fe=Ve!==void 0&&Ve,Ye=ve.noScaleMargin!=null&&ve.noScaleMargin,pe=function(tt){return tt&&tt!=="false"},it=pe(ve.autoHeight),He=he(me,ve.width,Oe,it,fe&&window.GGBT_wsf_view||Ye,we),Ce=parseInt(He.width),Ee=ve.width,Se=ve.height;if(Ee===void 0){var Je=me.querySelector(".appletParameters");Je&&(Ee=Je.offsetWidth,Se=Je.offsetHeight)}var lt=Ce/Ee,$e=fe?1:He.height/Se;return Oe!==void 0&&!Oe&&(lt=Math.min(1,lt),$e=Math.min(1,$e)),Math.min(lt,$e)}function Ke(ve,me,Oe){var Ve=1,we,fe=!1;if(ve.hasOwnProperty("allowUpscale")&&(fe=ve.allowUpscale),ve.hasOwnProperty("scale")&&(Ve=parseFloat(ve.scale),(isNaN(Ve)||Ve===null||Ve===0)&&(Ve=1),Ve>1&&(fe=!0)),me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))we=te(ve,me,fe,Oe,ve.scaleContainerClass);else return Ve;return fe&&(!ve.hasOwnProperty("scale")||Ve===1)?we:Math.min(Ve,we)}function _e(ve){var me=Math.min(window.innerWidth,document.documentElement.clientWidth),Oe=Math.min(window.innerHeight,document.documentElement.clientHeight),Ve=ve.getBoundingClientRect(),we=(me-Ve.width)/2,fe=(Oe-Ve.height)/2;fe<0&&(fe=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?ve.style.left="40px":ve.style.left=we+"px",ve.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?ve.style.top="40px":ve.style.top=fe+"px",ve.style.left=we+"px")}function Xe(ve,me){var Oe=ve.querySelector(".appletParameters");if(Oe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(me.id!==Oe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Oe.parentElement&&/fullscreen/.test(Oe.parentElement.className))return;var Ve=Ke(me,ve);It()&&Oe.setAttribute("data-param-scale",Ve);for(var we=null,fe=0;fe<ve.childNodes.length;fe++)if(ve.childNodes[fe].className!==void 0&&ve.childNodes[fe].className.match(/^applet_scaler/)){we=ve.childNodes[fe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Ye=me.id!==void 0?me.id:"ggbApplet",pe=window[Ye];(pe==null||!pe.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ve)&&Ve!==1?(we.parentNode.style.width=me.width*Ve+"px",we.parentNode.style.height=me.height*Ve+"px",Ht(we,Ve)):(Ht(we,1),we.parentNode.style.width=me.width+"px",we.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&_e(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Oe).parents(".content-added-content"))}}return{responsiveResize:Xe,isFlexibleWorksheetEditor:It,positionCenter:_e,getScale:Ke,scaleElement:Ht}}();__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 It=n.location.search;return It.indexOf(J)!=-1||It.indexOf(K)!=-1}function q(It,Ht){}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(It){var Ht=s[L].bindings;s[L].bindings=function(){for(var he=Ht?Ht():{},te=It[webModule.__softPermutationId],Ke=O;Ke<te.length;Ke++){var _e=te[Ke];he[_e[O]]=_e[P]}return he}};var t;function u(){return v(),t}function v(){if(!t){var It=o.createElement(Q);if(It.id=L,It.style.cssText=R+S,It.tabIndex=-1,o.body.appendChild(It),t=It.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ht=document.compatMode==U?V:W;t.write(Ht+X),t.close()}}}function w(It){function Ht(te){function Ke(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var _e=Ke();if(_e){te();return}function Xe(){if(!_e){if(!Ke())return;_e=!0,te(),o.removeEventListener&&o.removeEventListener(Z,Xe,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,Xe,!1);var ve=setInterval(function(){Xe()},$)}function he(te){var Ke=u(),_e=Ke.body,Xe=Ke.createElement(_);Xe.language=ab,Xe.crossOrigin=W,Xe.src=te,webModule.__errFn&&(Xe.onerror=function(){webModule.__errFn(L,new Error(bb+te))}),_e.appendChild(Xe)}Ht(function(){he(It)})}webModule.__startLoadingFragment=function(It){return C(It)},webModule.__installRunAsyncCode=function(It){var Ht=u(),he=Ht.body,te=Ht.createElement(_);te.language=ab,te.text=It,he.appendChild(te),he.removeChild(te)};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(It){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(It){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(It){var Ht=c[It];return Ht==null?null:Ht},r=d,webModule.__errFn=e}function B(){function It(ve){var me=ve.lastIndexOf(rb);me==-1&&(me=ve.length);var Oe=ve.indexOf(sb);Oe==-1&&(Oe=ve.length);var Ve=ve.lastIndexOf(tb,Math.min(Oe,me));return Ve>=O?ve.substring(O,Ve+P):W}function Ht(ve){if(!ve.match(/^\w+:\/\//)){var me=o.createElement(ub);me.src=ve+vb,ve=It(me.src)}return ve}function he(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function te(){for(var ve=o.getElementsByTagName(_),me=O;me<ve.length;++me)if(ve[me].src.indexOf(xb)!=-1)return It(ve[me].src);return W}function Ke(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function _e(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var Xe=he();return Xe==W&&(Xe=te()),Xe==W&&(Xe=Ke()),Xe==W&&_e()&&(Xe=It(o.location.href)),Xe=Ht(Xe),Xe}function C(It){return It.match(/^\//)||It.match(/^[a-zA-Z]+:\/\//)?It:webModule.__moduleBase+It}function D(){var It=[],Ht=O,he=[],te=[];function Ke(ve){var me=te[ve](),Oe=he[ve];if(me in Oe)return me;var Ve=[];for(var we in Oe)Ve[Oe[we]]=we;throw r&&r(ve,Ve,me),null}if(__gwt_isKnownPropertyValue=function(ve,me){return me in he[ve]},webModule.__getPropMap=function(){var ve={};for(var me in he)he.hasOwnProperty(me)&&(ve[me]=Ke(me));return ve},webModule.__computePropValue=Ke,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var _e;try{_e=Cb;var Xe=_e.indexOf(Db);Xe!=-1&&(Ht=parseInt(_e.substring(Xe+P),$),_e=_e.substring(O,Xe))}catch(ve){}return webModule.__softPermutationId=Ht,C(_e+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(It,Ht,he){"use strict";he.d(Ht,{Ax:function(){return Xe},Ds:function(){return ve},KI:function(){return Oe},SI:function(){return _e},f1:function(){return Ke}});var te=he(90524);function Ke(Ve){let we=!0;if(Ve.length>0){for(let fe=0;fe<Ve.length;fe++)if(Ve[fe].compile_success==0||!Ve[fe].compile_success){we=!1;break}}else we=!1;return we}function _e(Ve,we=""){let fe=[];for(let Ye=0;Ye<Ve.length;Ye++){let pe=Ve[Ye],it=we?`${we}/${pe.name}`:`${pe.name}`;fe.push({title:pe.name,type:pe.type,isLeaf:pe.type!=="tree",key:it})}return fe}function Xe(Ve,we,fe){for(let Ye=0;Ye<Ve.length;Ye++){let pe=Ve[Ye];if(pe.key===we){pe.children=fe;break}pe.children&&Xe(pe.children,we,fe)}return Ve}function ve(Ve,we,fe){let Ye;return function(){let pe=this,it=arguments,He=function(){Ye=null,fe||Ve.apply(pe,it)},Ce=fe&&!Ye;clearTimeout(Ye),Ye=setTimeout(He,we),Ce&&Ve.apply(pe,it)}}const me=!0,Oe=te.Z.API_SERVER},20927:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return we}});var te=he(59301),Ke=he(37568),_e=he(96599),Xe=he(6767),ve={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},me=he(62772);const{TextArea:Oe}=Ke.default;class Ve extends te.Component{constructor(Ye){super(Ye),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ye,onAnswerChange:pe,addChildAnswer:it,exerciseIsPublish:He,answers:Ce,activeOptionErrorIndex:Ee,flex:Se="0 0 1000px"}=this.props;console.log("----",Ce);let{inputVisible:Je,EditInputIndex:lt}=this.state;return te.createElement("div",{className:ve.flex},te.createElement("div",{className:`${ve.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ye+1,"):"),te.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},Ce==null?void 0:Ce.map(($e,tt)=>te.createElement(te.Fragment,null,lt!==tt?($e==null?void 0:$e.length)>0?te.createElement(_e.default,{className:"edit-tag",key:$e,closable:!((Ce==null?void 0:Ce.length)===1&&tt===0),onClose:Te=>{Te.preventDefault(),(Ce==null?void 0:Ce.length)===1&&tt===0?this.props.deleteChildAnswermain(Ye,tt):this.props.deleteChildAnswer(Ye,tt)}},te.createElement("span",{onDoubleClick:Te=>{this.setState({EditInputIndex:tt}),Te.preventDefault()}},$e)):te.createElement(Ke.default,{defaultValue:$e,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Te=>{if(Te.target.value.replaceAll(" ","").length<=0){Xe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pe(Ye,tt,Te.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):te.createElement(Ke.default,{defaultValue:$e,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Te=>{if(Te.target.value.replaceAll(" ","").length<=0){Xe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pe(Ye,tt,Te.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!Je&&te.createElement(_e.default,{className:"site-tag-plus",onClick:()=>{it(Ye),this.setState({inputVisible:!0})}},te.createElement(me.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var we=Ve},48106:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return He}});var te=he(59301),Ke=he(2978),_e=Object.defineProperty,Xe=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,we=(Ce,Ee,Se)=>Ee in Ce?_e(Ce,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ce[Ee]=Se,fe=(Ce,Ee)=>{for(var Se in Ee||(Ee={}))Oe.call(Ee,Se)&&we(Ce,Se,Ee[Se]);if(me)for(var Se of me(Ee))Ve.call(Ee,Se)&&we(Ce,Se,Ee[Se]);return Ce},Ye=(Ce,Ee)=>Xe(Ce,ve(Ee)),pe=(Ce,Ee,Se)=>we(Ce,typeof Ee!="symbol"?Ee+"":Ee,Se);const it="\u2581";class He extends te.Component{constructor(){super(...arguments),pe(this,"getChCountBeforeCursor",(Ee,Se)=>{const Je=Se.line;let lt=0;for(let tt=0;tt<Je;tt++)lt+=Ee.getLine(tt).split(it).length-1;const $e=Ee.getLine(Je).substring(0,Se.ch);return lt+=$e.split(it).length-1,lt}),pe(this,"onCMBeforeChange",(Ee,Se)=>{const Je=Ee.getRange(Se.from,Se.to);let lt=0;if(Se.text.forEach($e=>{lt+=$e.split(it).length-1}),Je&&Je.indexOf(it)!=-1){const $e=Je.split(it).length-1,tt=this.getChCountBeforeCursor(Ee,Se.from);console.log(`\u5220\u9664${$e}\u4E2A\uFF0C \u4E4B\u524D\u6709${tt}\u4E2A\uFF0C\u65B0\u589E${lt}\u4E2A`),this.props.deleteEmptyDisabled?Se.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(tt,$e,lt)}else if(lt){const $e=this.getChCountBeforeCursor(Ee,Se.from);console.log(`\u65B0\u589E${lt}\u4E2A\uFF0C\u4E4B\u524D\u6709${$e}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange($e,0,lt)}})}render(){return te.createElement(Ke.Z,Ye(fe({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},6077:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return Ye}});var te=he(59301),Ke={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},_e=he(92310),Xe=he.n(_e),ve=he(29787),me=he(2859),Oe=he(82093),Ve=he(49661),we=(pe,it,He)=>new Promise((Ce,Ee)=>{var Se=$e=>{try{lt(He.next($e))}catch(tt){Ee(tt)}},Je=$e=>{try{lt(He.throw($e))}catch(tt){Ee(tt)}},lt=$e=>$e.done?Ce($e.value):Promise.resolve($e.value).then(Se,Je);lt((He=He.apply(pe,it)).next())}),Ye=({data:pe,className:it,fullWidth:He,style:Ce={},onClose:Ee,onOk:Se,showFullTools:Je,noAssociationId:lt})=>{const $e=(0,te.useRef)(null),tt=(0,te.useRef)(null),Te=(0,te.useRef)(null),dt=(0,te.useRef)(null),[ht,Vt]=(0,te.useState)(!1),[Be,Ge]=(0,te.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,te.useEffect)(()=>(Te.current||(Te.current=document.createElement("style"),document.head.appendChild(Te.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),Te.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&nt()):(document.body.removeAttribute("data-custom"),Te.current&&(document.head.removeChild(Te.current),Te.current=null)),()=>{document.body.removeAttribute("data-custom"),Te.current&&(document.head.removeChild(Te.current),Te.current=null)}),[pe==null?void 0:pe.visible]);const nt=()=>we(void 0,null,function*(){Vt(!0),Ge("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ot=yield(0,Ve.ZJ)(pe==null?void 0:pe.src);$e.current.src="",$e.current.src=ot,$e.current.onload=function(){Fe()},Vt(!1),Ge("")}),Me=ot=>we(void 0,null,function*(){Vt(!0),Ge("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ut=yield(0,Oe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:ot.dataUrl}});Ut!=null&&Ut.id&&!lt?(yield(0,Oe.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ut==null?void 0:Ut.id,settings:JSON.stringify(ot.state)}})).status===0&&Se():Ut!=null&&Ut.id&&Se(Ut),Vt(!1),Ge("")}),Qe=()=>{const ot=document.querySelector('a[href="https://markerjs.com/"]');ot&&ot.parentNode&&(ot.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Et=>{const hn=document.querySelector(Et.name);hn&&hn.setAttribute("title",Et.title)})},Fe=()=>{tt.current=new me.hP($e.current),tt.current.targetRoot=dt.current,tt.current.addEventListener("render",Me),tt.current.addEventListener("beforeclose",Ee),Je&&(tt.current.availableMarkerTypes=tt.current.ALL_MARKER_TYPES,tt.current.uiStyleSettings.redoButtonVisible=!0,tt.current.uiStyleSettings.notesButtonVisible=!0,tt.current.uiStyleSettings.zoomButtonVisible=!0,tt.current.uiStyleSettings.zoomOutButtonVisible=!0,tt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=tt.current.uiStyleSettings,tt.current.show(),pe!=null&&pe.snapshotData&&tt.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Qe()},300)};return te.createElement(te.Fragment,null,(pe==null?void 0:pe.visible)&&te.createElement(ve.Z,{spinning:ht,tip:Be,style:{position:"absolute",width:"100vw"}},te.createElement("div",{ref:dt,className:Xe()(Ke.imageDimensions,it,He?Ke.fullWidth:""),style:Ce},te.createElement("img",{className:Ke.img,ref:$e}))))}},88615:function(It,Ht,he){"use strict";var te=he(59301),Ke=he(77019),_e=he(5269),Xe=he(20554),ve=he(99571),me=he(38394),Oe=he(21697),Ve=he(48136),we=he(59301);const fe=(0,te.forwardRef)(({callback:Ye,showSaveButton:pe,value:it=""},He)=>{const Ce=(0,te.useRef)(),Ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Se=[{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}`}]}]}],Je=tt=>{Ce.current.setValue(Ce.current.getValue()+" "+tt.value+" ")},lt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(Ke.Z,{className:Oe.Z.lists,gutter:[10,10]},Ee.map((tt,Te)=>we.createElement(_e.Z,{flex:"110px",className:Oe.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:`$$${tt.value}$$`}),tt.name),we.createElement("div",{className:Oe.Z.children},tt.children.map((dt,ht)=>we.createElement("div",{key:ht},we.createElement("h1",null,dt.name),we.createElement(Ke.Z,{gutter:[10,10]},dt.data.map((Vt,Be)=>we.createElement(_e.Z,{key:Be,onClick:()=>Je(Vt),className:Oe.Z.diamond},we.createElement(me.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(Ke.Z,{className:Oe.Z.lists,gutter:[10,10]},Se.map((tt,Te)=>we.createElement(_e.Z,{flex:"110px",className:Oe.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:"`$$"+tt.value+"$$`"}),tt.name),we.createElement("div",{className:Oe.Z.children},tt.children.map((dt,ht)=>we.createElement("div",{key:ht},dt.name&&we.createElement("h1",null,dt.name),we.createElement(Ke.Z,{gutter:[10,10]},dt.data.map((Vt,Be)=>we.createElement(_e.Z,{key:Be,onClick:()=>Je(Vt),className:Oe.Z.diamond},we.createElement(me.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))}],$e=()=>{var tt=document.createElement("div");tt.innerHTML=Ce.current.getValue();var Te=tt.innerText;return Ye&&Ye(Te),Te};return(0,te.useImperativeHandle)(He,()=>({getData:$e})),we.createElement("div",{className:Oe.Z.mathWrap},we.createElement(Xe.default,{defaultActiveKey:"1",items:lt}),we.createElement("math-field",{locale:"zh_cn",className:Oe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ce,style:{width:800,marginTop:30,fontSize:18}},it||""),pe&&we.createElement("div",{className:Oe.Z.button},we.createElement(ve.ZP,{size:"large",onClick:$e,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ht.Z=fe},57884:function(It,Ht,he){"use strict";var te=he(59301),Ke=he(93314),_e=he(99571),Xe=Object.defineProperty,ve=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(He,Ce,Ee)=>Ce in He?Xe(He,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):He[Ce]=Ee,Ye=(He,Ce)=>{for(var Ee in Ce||(Ce={}))Ve.call(Ce,Ee)&&fe(He,Ee,Ce[Ee]);if(Oe)for(var Ee of Oe(Ce))we.call(Ce,Ee)&&fe(He,Ee,Ce[Ee]);return He},pe=(He,Ce)=>ve(He,me(Ce));const it=({img:He,buttonProps:Ce={},styles:Ee={},customText:Se,ButtonText:Je,ButtonClick:lt,Buttonclass:$e,ButtonTwo:tt,imgStyles:Te,loading:dt=!1,className:ht=""})=>te.createElement("section",{className:`tc animated fadeIn ${ht}`,style:Ye({color:"#999",margin:"100px auto",visibility:dt?"hidden":"visible"},Ee)},te.createElement("img",{src:He||Ke,style:pe(Ye({},Te),{pointerEvents:"none",userSelect:"none"})}),te.createElement("p",{className:"mt20 font14"},Se||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Je&&te.createElement(_e.ZP,Ye({className:$e,onClick:lt},Ce),Je),tt&&tt);Ht.Z=it},41550:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return $e}});var te=he(59301),Ke={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},_e=he(99571),Xe=he(70557),ve=he(51124),me=he(25399),Oe=he(49661),Ve=he(72664),we=he(57884),fe=he(90524),Ye=he(14794),pe=he(59301),it=Object.defineProperty,He=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Se=(tt,Te,dt)=>Te in tt?it(tt,Te,{enumerable:!0,configurable:!0,writable:!0,value:dt}):tt[Te]=dt,Je=(tt,Te)=>{for(var dt in Te||(Te={}))Ce.call(Te,dt)&&Se(tt,dt,Te[dt]);if(He)for(var dt of He(Te))Ee.call(Te,dt)&&Se(tt,dt,Te[dt]);return tt},lt=(tt,Te,dt)=>new Promise((ht,Vt)=>{var Be=Me=>{try{nt(dt.next(Me))}catch(Qe){Vt(Qe)}},Ge=Me=>{try{nt(dt.throw(Me))}catch(Qe){Vt(Qe)}},nt=Me=>Me.done?ht(Me.value):Promise.resolve(Me.value).then(Be,Ge);nt((dt=dt.apply(tt,Te)).next())}),$e=({editOffice:tt="view",data:Te,issaver:dt,onSaver:ht,theme:Vt,type:Be,filename:Ge,monacoEditor:nt,className:Me,style:Qe,close:Fe,onClose:ot,hasMask:Ut,disabledDownload:Et,onImgDimensions:hn,showNodata:Mt,recordInfo:ge})=>{const[de,ft]=(0,te.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[qt,xt]=(0,te.useState)(""),[Ne,rt]=(0,te.useState)(),ct=window.ENV==="build"?"/react/build":"",on=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,Pt=10*(1024*1024),ze=(0,te.useRef)();Te!=null&&Te.startsWith("/api")&&Be!=="txt"&&(Te=fe.Z.API_SERVER+Te);const wt=oe=>oe.substring(oe.lastIndexOf("/")+1).split(".").pop();Ge&&nt&&(nt.filename=Ge),(0,te.useEffect)(()=>{var oe,se;const ie=(se=(oe=document.cookie)==null?void 0:oe.replace(/\s/g,""))==null?void 0:se.split(";");ie==null||ie.map(xe=>{let Ue=xe.split("=");Ue[0]==="_educoder_session"&&xt(Ue[1])})},[]),(0,te.useEffect)(()=>{Be==="office"&&(Te.indexOf("bigfilescdn.")>-1||Te.indexOf("bigfiles1")>-1?rt({url:Te,fileType:wt(Te),model:Te.indexOf("model=edit")?"edit":"view"}):ae())},[Be,Te]);function Bt(oe){return lt(this,null,function*(){oe.data.type==="pdfdata"&&(ht(oe.data.data),window.removeEventListener("message",Bt,!1)),console.log("mess---:",oe.data)})}const ae=()=>lt(void 0,null,function*(){console.log("data:",Te);let oe=Te;Te.startsWith("http")||(oe=location.origin+oe);let se=new URL(oe).pathname.split("/").pop();const ie=yield(0,Ve.gJ)({attachment_id:se});ie.url=on+ie.url,rt(ie)}),ne=()=>{if(Te.startsWith("http")||Te.startsWith("blob:")){z();return}(0,Oe.Sv)(Ge||"educoder",Te,Ge)},z=()=>{ge&&(0,Ye.fc)({id:ge==null?void 0:ge.id,watch_type:1,course_id:ge==null?void 0:ge.course_id}),(0,Oe.Nd)(Ge||"educoder",decodeURIComponent(Te))};return pe.createElement("div",{style:Je({},Qe||{}),className:`${Ut&&Ke.bgBlack} ${Be?Ke.wrp:"hide"}`},Fe&&pe.createElement("div",{className:Ke.close,ref:ze},!!hn&&pe.createElement(me.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ze.current},pe.createElement("span",{onClick:()=>{ot(),hn()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!Et&&pe.createElement(me.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ze.current},pe.createElement("span",{onClick:z},pe.createElement("i",{className:"icon-quxiaozhiding"}))),dt&&pe.createElement(me.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ze.current},pe.createElement("span",{className:"",onClick:()=>{const oe=document.getElementById("pdfiframe");window.addEventListener("message",Bt,!1),setTimeout(()=>{oe.contentWindow.postMessage("getData","*")},300)}},pe.createElement("i",{className:"icon-baocun"}))),pe.createElement(me.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ze.current},pe.createElement("span",{className:"",onClick:()=>{ot()}},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${Ke[Me]} ${Me} ${Ke.monaco} ${Be==="txt"?"show":"hide"}`},Be==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(ve.ZP,Je({},nt)))),Be==="audio"&&pe.createElement("audio",{src:`${(Te==null?void 0:Te.indexOf("http://"))>-1||(Te==null?void 0:Te.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Te}`,autoPlay:!0}),Be==="video"&&pe.createElement(pe.Fragment,null,(Te==null?void 0:Te.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${Te}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Te}`,autoPlay:!0})),Be==="office"&&Ne&&pe.createElement("iframe",{src:`${ct}/office.html?key=${Ne.key}&url=${btoa(Ne.url)}&callbackUrl=${on+(Ne.callbackUrl||"")}&fileType=${Ne.fileType}&title=${Ne.title||""}&model=${tt}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!Et}`}),Be==="html"&&pe.createElement("iframe",{src:Te+"&disposition=inline"}),Be==="pdf"&&pe.createElement("iframe",{id:"pdfiframe",src:`${ct}/js/pdfview/index.html?filename=${Ge||"educoder.pdf"}&url=${encodeURIComponent(Te)}&disabledDownload=${!!Et}&model=${tt}`}),Be==="image"&&pe.createElement("img",{src:`${(Te==null?void 0:Te.indexOf("http://"))>-1||(Te==null?void 0:Te.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Te}`}),(Be==="other"||Be==="download")&&pe.createElement(pe.Fragment,null,Mt?pe.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pe.createElement(_e.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ne,disabled:Et},"\u4E0B\u8F7D")}):pe.createElement(_e.ZP,{type:"primary",size:"middle",onClick:ne,disabled:Et},pe.createElement(Xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Be==="flowChart"&&pe.createElement("div",{className:"embed"},pe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Te||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(It,Ht,he){"use strict";he.d(Ht,{z:function(){return nt},Z:function(){return Me}});var te=he(59301),Ke=he(88831),_e=he(90290),Xe=he(64018),ve=he(39394),me=he(90524),Oe=he(49661),Ve=he(15342),we=he(77736),fe=he(99571),Ye=he(1012),pe=he(41550),it=he(59301),Ce=({html:Qe})=>{const Fe=(0,te.useRef)(null),ot=(0,te.useRef)(null),Ut=`.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,te.useEffect)(()=>{const Et=Fe.current.attachShadow({mode:"open"});ot.current=document.createElement("div"),ot.current.className="markdown-body",ot.current.innerHTML=Qe,Et.appendChild(ot.current);const hn=document.createElement("style");return hn.textContent=Ut,Et.appendChild(hn),()=>{Et.innerHTML=""}},[]),(0,te.useEffect)(()=>{ot.current&&(ot.current.innerHTML=Qe)},[Qe]),it.createElement("div",{ref:Fe})};function Ee(Qe){const Fe=["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"],ot=new RegExp(`\\b(${Fe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(ot,"").trim()}var Se={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},Je=Object.defineProperty,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Te=(Qe,Fe,ot)=>Fe in Qe?Je(Qe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Qe[Fe]=ot,dt=(Qe,Fe)=>{for(var ot in Fe||(Fe={}))$e.call(Fe,ot)&&Te(Qe,ot,Fe[ot]);if(lt)for(var ot of lt(Fe))tt.call(Fe,ot)&&Te(Qe,ot,Fe[ot]);return Qe};const ht="@\u2581\u2581@",Vt="@\u2581@",Be=/<pre[^>]*>/g;function Ge(Qe){let Fe=document.createElement("div");return Fe.innerHTML=Qe,Fe.childNodes.length===0?"":Fe.childNodes[0].nodeValue}const nt=(Qe,Fe)=>{Qe=Qe||"";const ot=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ut=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,hn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Fe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ot,(Mt,ge,de,ft,qt,xt,Ne)=>{const rt=ge||ft||xt,ct=de||qt||Ne||"?";return me.Z.API_SERVER+"/api/attachments/"+rt+ct+"&t="+(0,Oe.Jn)(rt,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(hn,(Mt,ge,de,ft,qt,xt,Ne)=>{const rt=ge||ft||xt,ct=de||qt||Ne||"?";return me.Z.API_SERVER+"/attachments/download/"+rt+ct+"&t="+(0,Oe.Jn)(rt,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replace(ot,(Mt,ge,de,ft,qt,xt,Ne)=>{const rt=ge||ft||xt,ct=de||qt||Ne||"?";return me.Z.API_SERVER+"/api/attachments/"+rt+ct+"&t="+(0,Oe.Jn)(rt,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replace(Ut,(Mt,ge,de,ft,qt)=>{const xt=ge||ft,Ne=de||qt||"";return'"'+me.Z.API_SERVER+"/api/attachments/"+xt+Ne+xt+Ne+"&t="+(0,Oe.Jn)(xt,Date.now())}).replace(Et,(Mt,ge,de,ft,qt)=>{const xt=ge||ft,Ne=de||qt||"";return"("+me.Z.API_SERVER+"/files/uploads/"+xt+Ne+xt+Ne+"&t="+(0,Oe.Jn)(xt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Qe)};var Me=({value:Qe="",edit:Fe=!1,className:ot,showTextOnly:Ut,showLines:Et,style:hn={},stylesPrev:Mt={},highlightKeywords:ge,showProgramFill:de,isProgramFill:ft,disabledFill:qt=!1,programFillValue:xt,openEditor:Ne=()=>{},onFillChange:rt=vt=>{},onFillBlur:ct=()=>{},onFillFocus:on=()=>{}})=>{let vt=Ee(String(Qe||""));const Pt=(0,te.useRef)(),ze=(0,te.useRef)(),[wt,Bt]=(0,te.useState)(""),[ae,ne]=(0,te.useState)("office"),[z,oe]=(0,te.useState)([]),se=(0,te.useRef)("a"+(0,Ye.Z)()),ie={},xe=st=>/<style[\s\S]*?>/i.test(st||""),Ue=(st,An,Rt)=>{const sn=document.createElement(st===Vt?"input":"textarea");sn.style.width="100%",sn.style.height=st===Vt?"40px":"151px",sn.rows=5,sn.spellcheck=!1,sn.name="edu-program-fill",sn.placeholder="\u8BF7\u8F93\u5165",sn.dataset.id=An;const wn=Object.keys(ie).length;return ie[wn]=sn,`<span class="edu-program-fill-wrap ${st===Vt?"":"show"}" style="width:${st===Vt?"600px":"100%"}" title=${Rt||""}><span>${sn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ot(st){return st=st.replace(/!\[.*?\]\(.*?\)/g,""),st=st.replace(/\[.*?\]\(.*?\)/g,""),st=st.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),st=st.replace(/<embed.*?>/g,""),st=st.replace(/<img.*?>/g,""),st=st.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),st=st.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),st=st.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),st=st.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),st}const Dt=st=>!Ut&&xe(vt)?st:st.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(An,Rt){let sn=Rt.replace(/(\n|\r)/g,"").split("}"),wn=[];return sn.map(Jn=>{Jn!=""&&wn.push(`.${se.current} ${Jn}`)}),`<style>${wn.join("}")}</style>`}),gt=(0,te.useMemo)(()=>{try{const sn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,wn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Jn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,jt=/\(\/attachments\/download\//g;vt=vt.replace(jt,"("+me.Z.API_SERVER+"/attachments/download/").replace(sn,"("+me.Z.API_SERVER+"/api/attachments/").replace(wn,'"'+me.Z.API_SERVER+"/api/attachments/").replace(Jn,'"'+me.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,`
`),Pt.current.style.display="none"}catch(sn){}if(de){let sn=-1;return vt=vt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(wn,Jn,jt){var Fn;return++sn,Ue(wn,sn,(Fn=xt==null?void 0:xt[sn])==null?void 0:Fn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Dt(vt||"")}</pre>`}let st=Dt(vt);st=(0,_e.ZP)(st);const An=(0,_e.ez)();vt.match(/\[TOC\]/)&&(st=st.replace("<p>[TOC]</p>",(0,_e.Qv)()),(0,_e.Iy)()),st=st.replace(/(__special_katext_id_\d+__)/g,(sn,wn)=>{const{type:Jn,expression:jt}=An[wn];return(0,Ve.renderToString)(Ge(jt)||"",{displayMode:Jn==="block",throwOnError:!1,output:"html"})}),st=st.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,_e.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=st,Ut)return Rt.innerText;if(ge){const sn=ge.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return nn(Rt,sn),Rt.innerHTML}return setTimeout(()=>En(),500),Rt.innerHTML},[vt,ge]);(0,te.useEffect)(()=>{an.current&&an.current.querySelectorAll(["input","textarea"]).forEach(An=>{An.oninput=kt,An.onblur=$t,An.onfocus=Gt})},[z]),(0,te.useEffect)(()=>{var st,An,Rt,sn,wn;if(xt!=null&&xt.length)try{const Jn=an.current.querySelectorAll(".edu-program-fill-score"),jt=an.current.querySelectorAll('[name="edu-program-fill"]');for(const[Fn,xi]of jt.entries())xi.value=((st=xt==null?void 0:xt[Fn])==null?void 0:st.value)||"",((An=xt==null?void 0:xt[Fn])==null?void 0:An.type)==="warning"?xi.className="program-fill-warning":((Rt=xt==null?void 0:xt[Fn])==null?void 0:Rt.type)==="success"?xi.className="program-fill-success":xi.className="";for(const[Fn,xi]of Jn.entries())xi.innerHTML=(sn=xt==null?void 0:xt[Fn])!=null&&sn.score?`${(wn=xt==null?void 0:xt[Fn])==null?void 0:wn.score}\u5206`:"";oe(xt)}catch(Jn){console.log(Jn,"error")}},[xt]);const kt=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),rt(z,st.target.dataset.id)},$t=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),ct(z,st.target.dataset.id)},Gt=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),on(z,st.target.dataset.id)};function nn(st,An){return st.childNodes.forEach(Rt=>{var sn;if(Rt.childNodes.length>0)nn(Rt,An);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(sn=Rt.innerHTML)==null?void 0:sn.replace(new RegExp(An,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const wn=document.createElement("span");wn.innerHTML=Rt.textContent.replace(new RegExp(An,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(wn)}})}const an=(0,te.useRef)();_e.jb.WebkitLineClamp=Et,Et&&(hn=dt(dt({},hn),_e.jb));function _t(st){let An=st.target;if(An.tagName.toUpperCase()==="A"){let Rt=An.getAttribute("href");if(Rt.indexOf("office")>-1)st.preventDefault(),Bt(Rt),ne("office");else if(Rt.indexOf("application/pdf")>-1)st.preventDefault(),Bt(Rt),ne("pdf");else if(Rt.indexOf("text/html")>-1)st.preventDefault(),Bt(Rt),ne("html");else if(Rt.startsWith("#")){st.preventDefault();let sn=document.getElementById(Rt.replace("#",""));sn&&sn.scrollIntoView(!0)}}}const En=()=>{var st;const An=(st=an.current)==null?void 0:st.querySelectorAll("video");An==null||An.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(ve.ZP.isSupported()){var sn=new ve.ZP;sn.loadSource(Rt.src),sn.attachMedia(Rt)}}})};(0,te.useEffect)(()=>{if(an.current&&gt&&gt.match(Be)&&window.PR.prettyPrint(),an.current)return an.current.addEventListener("click",_t),()=>{var st;(st=an.current)==null||st.removeEventListener("click",_t),(0,_e.AL)(),(0,_e.Iy)()}},[gt,an.current,_t]);const ln=st=>{st.target.nodeName==="IMG"&&st.target.className.indexOf("draw-flowchart")>-1?(Pt.current.style.zIndex=1,Pt.current.style.display="flex",Pt.current.style.width=st.target.clientWidth+"px",Pt.current.style.height=st.target.clientHeight+"px",Pt.current.style.top=st.target.offsetTop+"px",Pt.current.style.left=st.target.offsetLeft+"px",st.target.id&&(ze.current=st.target.id)):Pt.current.style.display="none"},kn=()=>{Pt.current.style.display="none"};return(0,te.useEffect)(()=>{var st;const An=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(st=an.current)==null||st.addEventListener("copy",An),()=>{var Rt;(Rt=an.current)==null||Rt.removeEventListener("copy",An)}},[an.current]),te.createElement("div",{style:{position:"relative"},onMouseLeave:kn},Ut&&te.createElement("div",{ref:an,className:`${Se.mdBody} `},gt),!Ut&&!xe(gt)&&te.createElement("div",{ref:an,style:dt({},hn),onMouseOver:ln,className:`${ot||""} ${qt?"disabled-fill":""} markdown-body ${Se.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:gt}}),!Ut&&xe(gt)&&te.createElement(Ce,{html:gt}),te.createElement("div",{ref:Pt,className:`${Se.button} ${Fe?"":Se.previewFlowChart}`},te.createElement(we.Z,null,te.createElement(fe.ZP,{onClick:()=>{Fe?Ne(ze.current):(Bt(ze.current),ne("flowChart"))}},Fe?"\u7F16\u8F91":"\u9884\u89C8"))),te.createElement(pe.Z,{close:!0,data:wt,type:wt!=null&&wt.length?ae:"",style:dt({},Mt),onClose:()=>Bt("")}))}},44905:function(It,Ht,he){"use strict";he.d(Ht,{h:function(){return tt}});var te=he(59301),Ke=he(82326),_e=he(28284),Xe=he(99571),ve=he(89780),me=he.n(ve),Oe=he(66543),Ve=he(59598),we=Object.defineProperty,fe=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ce=(Te,dt,ht)=>dt in Te?we(Te,dt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Te[dt]=ht,Ee=(Te,dt)=>{for(var ht in dt||(dt={}))it.call(dt,ht)&&Ce(Te,ht,dt[ht]);if(pe)for(var ht of pe(dt))He.call(dt,ht)&&Ce(Te,ht,dt[ht]);return Te},Se=(Te,dt)=>fe(Te,Ye(dt));const Je=Ke.default.Option,lt={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"]};Ht.Z=({callback:Te,onCancel:dt})=>{const[ht,Vt]=(0,te.useState)("python");function Be(nt){Vt($e[nt][1])}function Ge(nt){Te(nt)}return te.createElement(_e.default,Se(Ee({},lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ge,style:{width:500}}),te.createElement(_e.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},te.createElement(Ke.default,{getPopupContainer:nt=>nt.parentNode,onChange:Be},Object.keys($e).map(nt=>te.createElement(Je,{key:nt,value:nt},$e[nt][0])))),te.createElement(_e.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},te.createElement(tt,{mode:ht})),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Xe.ZP,{type:"ghost",onClick:dt},"\u53D6\u6D88")))};function tt({value:Te,onChange:dt,mode:ht,options:Vt={}}){const Be=(0,te.useRef)(),[Ge,nt]=(0,te.useState)();return(0,te.useEffect)(()=>{if(Ge){let Me=function(Qe){const Fe=Qe.getValue();dt&&dt(Fe)};return Ge.on("change",Me),()=>{Ge.off("change",Me)}}},[Ge,dt]),(0,te.useEffect)(()=>{Ge&&Ge.setOption("mode",ht)},[Ge,ht]),(0,te.useEffect)(()=>{Ge&&(Te!==Ge.getValue()||Te==="")&&setTimeout(()=>{Ge.setValue(Te||"")},300)},[Ge,Te]),(0,te.useEffect)(()=>{if(Be.current&&!Ge){const Me=me().fromTextArea(Be.current,Ee({mode:ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Vt));nt(Me)}},[Be.current,Ge]),te.createElement("div",{className:"my-codemirror-container"},te.createElement("textarea",{ref:Be}))}},2978:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return yi}});var te=he(59301),Ke=he(89780),_e=he.n(Ke),Xe=he(76374),ve=he(66543),me=he(6313),Oe=he(25717),Ve=he(99498),we=he(25419),fe=he(67549),Ye=he(38394),pe=({value:cn="",className:xn,showTextOnly:Sn,showLines:ti,style:zi={}})=>{const Vn=(0,te.useMemo)(()=>"",[cn]);return te.createElement(te.Fragment,null,te.createElement("div",{dangerouslySetInnerHTML:{__html:Vn}}))},it=Object.defineProperty,He=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,lt=(cn,xn,Sn)=>xn in cn?it(cn,xn,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):cn[xn]=Sn,$e=(cn,xn)=>{for(var Sn in xn||(xn={}))Se.call(xn,Sn)&&lt(cn,Sn,xn[Sn]);if(Ee)for(var Sn of Ee(xn))Je.call(xn,Sn)&&lt(cn,Sn,xn[Sn]);return cn},tt=(cn,xn)=>He(cn,Ce(xn));let Te=[{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 dt({onActionCallback:cn,title:xn,icon:Sn,actionName:ti,className:zi="",children:Vn}){function vi(){cn(ti)}return te.createElement("a",{title:xn,className:zi,onClick:vi},te.createElement("i",{className:`${Sn}`}),Vn)}var ht=({watch:cn,showNullButton:xn,showNullProgramButton:Sn,onActionCallback:ti,fullScreen:zi,insertTemp:Vn,hidetoolBar:vi,extraUse:Di})=>{const Ei=[...Te,{title:`${cn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${cn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return te.createElement("ul",{className:"markdown-toolbar-container"},!vi&&Ei.map((ii,ui)=>te.createElement("li",{key:ui},ii.actionName?te.createElement(dt,tt($e({},ii),{onActionCallback:ti})):te.createElement("span",{className:"v-line"}))),xn?te.createElement("li",null,te.createElement(dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ti},te.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Sn?te.createElement(te.Fragment,null,te.createElement("li",null,te.createElement(dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:ti},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),te.createElement("li",null,te.createElement(dt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:ti},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Vn&&te.createElement("li",null,te.createElement(dt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Vn}`,onActionCallback:ti},te.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Di&&te.createElement("li",null,Di),te.createElement("li",{className:"btn-full-screen"},te.createElement(dt,{icon:`${zi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:zi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ti})))},Vt=he(75790),Be=he(28284),Ge=he(37568),nt=he(99571),Me=Object.defineProperty,Qe=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,hn=(cn,xn,Sn)=>xn in cn?Me(cn,xn,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):cn[xn]=Sn,Mt=(cn,xn)=>{for(var Sn in xn||(xn={}))Ut.call(xn,Sn)&&hn(cn,Sn,xn[Sn]);if(ot)for(var Sn of ot(xn))Et.call(xn,Sn)&&hn(cn,Sn,xn[Sn]);return cn},ge=(cn,xn)=>Qe(cn,Fe(xn));const de={labelCol:{span:4},wrapperCol:{span:20}};var ft=({callback:cn,onCancel:xn})=>{function Sn(ti){cn(ti)}return te.createElement(Be.default,ge(Mt({},de),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Sn,style:{width:500}}),te.createElement(Be.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},te.createElement(Ge.default,null)),te.createElement(Be.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},te.createElement(Ge.default,null)),te.createElement("div",{className:"flex-container flex-end"},te.createElement(nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(nt.ZP,{type:"ghost",onClick:xn},"\u53D6\u6D88")))},qt=he(44905),xt=he(45596),Ne=he(62957),rt=he(77019),ct=he(6077),on=he(59301),vt=({callback:cn,onCancel:xn})=>{const Sn=document.createElement("canvas"),ti=Sn.getContext("2d");Sn.width=1e3,Sn.height=800,ti.fillStyle="#ffffff",ti.fillRect(0,0,Sn.width,Sn.height);const zi=Sn.toDataURL("image/png");return on.createElement(Ne.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},on.createElement(rt.Z,{style:{height:"100vh"}},on.createElement(ct.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:zi,visible:!0,title:String(Date.now())},onOk:Vn=>{cn({src:Vn.url})},onClose:xn})))},Pt=he(30641),ze=he(5269),wt=he(6767),Bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ae=he(59301),z=(0,te.forwardRef)(({onCancel:cn,editImgId:xn,callback:Sn},ti)=>{let zi=(0,te.useRef)(),Vn=(0,te.useRef)(),vi=(0,te.useRef)(),Di=(0,te.useRef)(!1);const Ei=(0,te.useRef)(!1);console.log("ref:",ti);const[ii,ui]=(0,te.useState)(0),[Fi,zt]=(0,te.useState)("100vh");return(0,te.useEffect)(()=>{ui(1)},[]),(0,te.useImperativeHandle)(ti,()=>({setHeight:zt})),ae.createElement("div",{ref:Ei,className:"body-overflow-initial"},ae.createElement(Pt.Z,{width:"100vw",height:Fi,footer:null,closable:!0,placement:"bottom",open:!!ii,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Bt.drawerWrap}`,onClose:()=>{window.saveDrawData(at=>{Sn({src:`/api/attachments/${at}`,id:at})})},title:ae.createElement(rt.Z,{align:"middle"},ae.createElement(ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ae.createElement(ze.Z,{onClick:()=>{zt(Fi==="60px"?"100vh":"60px")}},ae.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ae.createElement(ze.Z,{onClick:()=>{window.saveDrawData(at=>{if(at===null){wt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}wt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Sn({src:`/api/attachments/${at}`,id:at,disabledClose:!0})})}},ae.createElement(nt.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ae.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${xn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Vn})))}),oe=he(90524),se=he(47889),ie=he(71051);const xe=se.ZP.Group,Ue={margin:"0 8px"};var Ot=({callback:cn,onCancel:xn})=>{function Sn(ti){cn(ti)}return te.createElement(Be.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Sn},te.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},te.createElement("span",{style:Ue},"\u5355\u5143\u683C\u6570\uFF1A"),te.createElement("span",{style:Ue},"\u884C\u6570"),te.createElement(Be.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},te.createElement(ie.Z,null)),te.createElement("span",{style:Ue},"\u5217\u6570"),te.createElement(Be.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},te.createElement(ie.Z,null))),te.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},te.createElement("span",{style:Ue},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),te.createElement(Be.default.Item,{name:"align"},te.createElement(xe,null,te.createElement(se.ZP,{value:"default"},te.createElement("i",{className:"fa fa-align-justify"})),te.createElement(se.ZP,{value:"left"},te.createElement("i",{className:"fa fa-align-left"})),te.createElement(se.ZP,{value:"center"},te.createElement("i",{className:"fa fa-align-center"})),te.createElement(se.ZP,{value:"right"},te.createElement("i",{className:"fa fa-align-right"}))))),te.createElement("div",{className:"flex-container flex-end"},te.createElement(nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(nt.ZP,{type:"ghost",onClick:xn},"\u53D6\u6D88")))},Dt=he(71411),gt=he(11081),kt=he.n(gt),Gt=(0,te.forwardRef)(({use3d:cn,width:xn,height:Sn,callback:ti,showSaveButton:zi},Vn)=>{const vi=(0,te.useRef)(),Di=(0,te.useRef)(),[Ei,ii]=(0,te.useState)(!1),ui=(0,te.useRef)({id:vi,appName:"graphing",width:xn||1e3,height:Sn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,te.useEffect)(()=>{Di.current=new(kt())(ui.current,!0),window.onload=function(){Di.current.inject("applet_container")}},[]);const Fi=()=>{var zt=window.ggbApplet.getPNGBase64(1,!0,72);return ti&&ti(zt),zt};return(0,te.useEffect)(()=>{ui.current.appName=Ei?"3D":"graphing",Di.current.inject("applet_container")},[Ei]),(0,te.useEffect)(()=>{ii(cn)},[cn]),(0,te.useImperativeHandle)(Vn,()=>({getImgData:Fi})),te.createElement(te.Fragment,null,te.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:vi}),te.createElement(rt.Z,{align:"middle"},te.createElement(ze.Z,{flex:1},te.createElement(Dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ei,onChange:zt=>ii(zt)})),te.createElement(ze.Z,null,te.createElement(nt.ZP,{size:"large",onClick:Fi,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),nn=he(88615);const an="link",_t="upload-image",En="add-flowchart",ln="draw-image",kn="add-flowchart",st="code-block",An="add-table",Rt="------------",sn={default:Rt,left:`:${Rt}`,center:`:${Rt}:`,right:`${Rt}:`};var wn=he(17904);function Jn(){}let jt=0;const Fn=1e4,xi="\u2581",hi="@\u2581\u2581@",_i="@\u2581@",Ri=`
**\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`,Ai=["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 Bi(cn){return/^\d+$/.test(cn)?`${cn}px`:cn}const bi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Si={[bi+"-B"]:"bold",[bi+"-I"]:"italic"},ni={[an]:"\u6DFB\u52A0\u94FE\u63A5",[st]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[_t]:"\u6DFB\u52A0\u56FE\u7247",[ln]:"\u6DFB\u52A0\u753B\u56FE",[En]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[An]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var yi=({defaultValue:cn="",onChange:xn,width:Sn="100%",height:ti=400,miniToolbar:zi=!1,isFocus:Vn=!1,watch:vi,insertTemp:Di,mode:Ei="markdown",id:ii="markdown-editor-id",showResizeBar:ui=!1,noStorage:Fi=!1,showNullButton:zt=!1,showNullProgramButton:at=!1,hidetoolBar:vn=!1,fullScreen:ri=!1,onBlur:ci,onCMBeforeChange:Ae,onFullScreen:Pe,className:Lt="",disablePaste:pt=!1,disabled:Re=!1,disabledFill:yt=!1,placeholder:Xt="",values:Wt="",extraUse:tn})=>{const[We,en]=(0,te.useState)(null),[St,_n]=(0,te.useState)(cn),[Jt,De]=(0,te.useState)(vi),[Le,ye]=(0,te.useState)(ri),[ut,Cn]=(0,te.useState)(""),[Hn,rn]=(0,te.useState)(0),[At,Ie]=(0,te.useState)(ti),[un,bn]=(0,te.useState)(!1),[Ln,On]=(0,te.useState)(0),[qn,Kt]=(0,te.useState)(0),Bn=(0,te.useRef)(),Wn=(0,te.useRef)(),Rn=(0,te.useRef)(),Zt=(0,te.useRef)(),dn=(0,te.useRef)(),Pn=(0,te.useRef)();(0,te.useEffect)(()=>{const et=window.scrollY||window.pageYOffset;_n(Wt),We==null||We.setValue(Wt),window.scrollTo(0,et)},[Wt]),(0,te.useEffect)(()=>{Pe==null||Pe(Le)},[Le]),(0,te.useEffect)(()=>{if(Bn.current){let et=function(mt,Ft){var gn;if(pt){Ft.preventDefault();return}const zn=Ft.clipboardData;if(zn){const oi=zn.types.toString(),mi=zn.items;if(oi==="Files"||zn.types.indexOf("Files")>-1){if(Ft.preventDefault(),Ei=="stex")return;try{let fi=mi[1];((gn=mi[0])==null?void 0:gn.kind)==="file"&&(fi=mi[0]);const Pi=fi.getAsFile(),Ci=Pi.name.split(".").pop();(0,xt.I)(Pi,Hi=>{var vr,Ji,ji;Hi.id?((vr=Pi==null?void 0:Pi.type)==null?void 0:vr.indexOf("image"))>-1?Ze.replaceSelection(`<img width="100%" src="/api/attachments/${Hi.id}?type=${Hi.content_type})" alt="" />`):((Ji=Pi==null?void 0:Pi.type)==null?void 0:Ji.indexOf("video"))>-1?Ze.replaceSelection(`<video width="100%" controls src="/api/attachments/${Hi.id}"></video>`):((ji=Pi==null?void 0:Pi.type)==null?void 0:ji.indexOf("pdf"))>-1?Ze.replaceSelection(`<a href="/api/attachments/${Hi.id}?type=${Pi.type}&disposition=inline" target="_blank">${Pi.name}</a>`):Ai.includes(Ci)?Ze.replaceSelection(`<a href="/api/attachments/${Hi.id}?type=office&disposition=inline" target="_blank">${Pi.name}</a>`):Ze.replaceSelection(`[${Pi.name}](/api/attachments/${Hi.id}?type=${Hi.content_type})`):(Hi==null?void 0:Hi.status)===401&&(document.location.href="/user/login")})}catch(fi){wt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ze=_e().fromTextArea(Bn.current,{mode:Ei,lineNumbers:!zi,lineWrapping:!0,value:cn,autoCloseTags:!0,autoCloseBrackets:!0});return Ze.on("keyup",function(mt,Ft){Ft.keyCode===8&&(mt.getValue()==""?Ze.setOption("placeholder",Xt):Ze.setOption("placeholder",null))}),Ze.on("keydown",function(mt,Ft){if(Ft.keyCode===8){var gn=jn(mt);gn&&Ft.preventDefault()}}),Vn&&Ze.focus(),Ze.on("paste",et),Re&&Ze.on("beforeChange",function(mt,Ft){(Ft.origin==="paste"||Ft.origin==="+input")&&Ft.cancel()}),en(Ze),()=>{Ze.off("paste",et)}}},[]);const Zn=(0,te.useCallback)(()=>{if(Wn.current)try{}catch(et){console.log(et,"---- to set md editor body height")}},[At,Wn,Le]);(0,te.useEffect)(()=>{function et(){let Ze=new Xe.Z(mt=>{for(let Ft of mt)(Ft.target.offsetHeight>0||Ft.target.offsetWidth>0)&&(Zn(),We.setSize("100%","100%"),We.refresh())});return Ze.observe(Bn.current.parentElement),Ze}if(We){const Ze=et();return()=>{var mt,Ft;(mt=Bn.current)!=null&&mt.parentElement&&Ze.unobserve((Ft=Bn.current)==null?void 0:Ft.parentElement)}}},[We,Zn]),(0,te.useEffect)(()=>{if(We){let et=[];for(const[Ze,mt]of Object.entries(Si)){let Ft={[Ze]:()=>{Nn(mt)}};et.push(Ft),We.addKeyMap(Ft)}return()=>{for(let Ze of et)We.removeKeyMap(Ze)}}},[We]),(0,te.useEffect)(()=>{ri!==Le&&ye(ri)},[ri]),(0,wn.Z)(()=>{if(!Fi&&Hn>0){let et=new Date().getTime(),Ze=window.sessionStorage.getItem(ii);et>=Hn+Fn&&(!Ze||Ze!==St)&&(window.sessionStorage.setItem(ii,St),bn(!0))}},Fn),(0,te.useEffect)(()=>{De(vi)},[We,vi]),(0,te.useEffect)(()=>{We&&Vn&&We.focus()},[We,Vn]),(0,te.useEffect)(()=>{if(Jt&&We){let et=function(mt){let Ft=mt.target;if(Zt.current){let gn=Ft.scrollTop/Ft.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*gn}};const Ze=We.getScrollerElement();return Ze.addEventListener("scroll",et),()=>{Ze.removeEventListener("scroll",et)}}},[We,Jt]),(0,te.useEffect)(()=>{if(We&&Ae){let et=function(Ze,mt){Ae(Ze,mt)};return We.on("beforeChange",et),()=>{We.off("beforeChange",et)}}},[We,Ae]),(0,te.useEffect)(()=>{if(We&&ci){let et=function(){ci(We.getValue())};return We.on("blur",et),()=>{We.off("blur",et)}}},[We,ci]);function jn(et,Ze){var mt=et.getDoc(),Ft=mt.getCursor(),gn=mt.getLine(Ft.line),zn=gn.charAt(Ft.ch-1),oi=gn.lastIndexOf("@\u2581@",Ft.ch),mi=gn.lastIndexOf("@\u2581\u2581@",Ft.ch),fi=oi>mi?oi:mi,Pi=oi>mi?3:4;if(hi.indexOf(zn)===-1)return null;if(console.log("change1:",Ze,et,gn,Ft,fi,oi,mi,zn),fi>=0&&Ft.ch-fi<5){var Ci=fi+Pi;return mt.replaceRange("",{line:Ft.line,ch:fi},{line:Ft.line,ch:Ci}),{line:Ft.line,ch:Ci}}return null}(0,te.useEffect)(()=>{if(We){let et=function(Ze,mt){const Ft=Ze.getValue();_n(Ft),rn(new Date().getTime()),Ze.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),xn&&(at?xn(Ft,Un(Ft)):xn(Ft))};return We.on("change",et),()=>{We.off("change",et)}}},[We,xn]),(0,te.useEffect)(()=>{if(We)if(cn==null)We.setValue(""),_n("");else{const et=window.scrollY||window.pageYOffset;cn!==We.getValue()&&(We.setValue(cn),_n(cn),We.setCursor(Re?1:We.lineCount(),0),window.scrollTo(0,et))}},[We,cn]);const Nn=(0,te.useCallback)(et=>{const Ze=We.getCursor(),mt=We.getSelection();let Ft=mt.split(`
`);switch(et){case"bold":return We.replaceSelection("**"+mt+"**"),mt===""&&We.setCursor(Ze.line,Ze.ch+2),We.focus();case"italic":return We.replaceSelection("*"+mt+"*"),mt===""&&We.setCursor(Ze.line,Ze.ch+1),We.focus();case"code":return We.replaceSelection("`"+mt+"`"),mt===""&&We.setCursor(Ze.line,Ze.ch+1),We.focus();case"inline-latex":return Cn("inline-latex"),We.focus();case"latex":return We.replaceSelection("```latex\n"+mt+"\n```"),We.setCursor(Ze.line+1,mt.length+1),We.focus();case"line-break":return We.replaceSelection(`<br/>
`),We.focus();case"list-ul":return mt===""?We.replaceSelection("- "+mt):We.replaceSelection(Ft.map(gn=>gn===""?"":`- ${gn}`).join(`
`)),We.focus();case"list-ol":return mt===""?We.replaceSelection("1. "+mt):We.replaceSelection(Ft.map((gn,zn)=>gn===""?"":`${zn+1}. ${gn}`).join(`
`)),We.focus();case"add-null-ch":return mt===""&&We.setCursor(Ze.line,Ze.ch),We.replaceSelection(xi),We.focus();case"add-signal":return mt===""&&We.setCursor(Ze.line,Ze.ch),We.replaceSelection(_i),We.focus();case"add-multiple":return mt===""&&We.setCursor(Ze.line,Ze.ch),We.replaceSelection(hi),We.focus();case"inster-template-1":return mt===""&&We.setCursor(Ze.line,Ze.ch),We.replaceSelection(Ri),We.focus();case"eraser":return We.setValue(""),We.focus();case"trigger-watch":return De(!Jt),We.focus();case"trigger-full-screen":return ye(!Le),We.focus();case an:Cn(an);return;case st:Cn(st);return;case _t:Cn(_t);return;case ln:Cn(ln);return;case"maths-latex":Cn("maths-latex");return;case En:dn.current="",sessionStorage.removeItem("file_id"),Cn(En);return;case An:Cn(An);return;default:throw new Error}},[We,Jt,Le]),Mn=(0,te.useCallback)((et,Ze)=>{var mt,Ft,gn,zn,oi,mi;switch(et!=null&&et.disabledClose||Cn(""),ut){case an:const{title:vr,link:Ji}=et;return We.replaceSelection(`[${vr}](${Ji})`),We.focus();case st:const{language:ji,content:tr}=et;return We.replaceSelection(["```"+ji,tr,"```"].join(`
`)),We.focus();case"maths-latex":for(var fi=atob(et),Pi=new Uint8Array(fi.length),Ci=0;Ci<fi.length;Ci++)Pi[Ci]=fi.charCodeAt(Ci);var Hi=new Blob([Pi],{type:"image/png"});(0,xt.I)(Hi,Ni=>{Ni.id?We.replaceSelection(`![,](/api/attachments/${Ni.id}?type=${Ni.content_type})`):(Ni==null?void 0:Ni.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":We.replaceSelection("`$$"+et+"$$`");break;case kn:const{src:Mi,alt:rr,id:xr}=et;if(!xr)return;We.getValue().indexOf(Mi)===-1?We.replaceSelection(`<center><img id="${xr}" width="80%" src="${Mi}" class="draw-flowchart" alt="${rr||""}" /></center>`):document.getElementById(xr).src=oe.Z.API_SERVER+Mi+"?t="+Date.now();break;case _t:case ln:const Li=Ze,dr=(gn=(Ft=(mt=Li==null?void 0:Li.name)==null?void 0:mt.split("."))==null?void 0:Ft.pop)==null?void 0:gn.call(Ft);return((zn=Li==null?void 0:Li.type)==null?void 0:zn.indexOf("image"))>-1||!(Li!=null&&Li.type)?Li!=null&&Li.align||Li!=null&&Li.width?We.replaceSelection(`<p style="text-align:${Li.align||"initial"}"><img width="${Li.width?Li.width+"%":"initial"}" src="${Mi}" alt="${rr||""}" /></p>`):We.replaceSelection(`<img width="100%" src="${Mi}" alt="${rr||""}" />`):((oi=Li==null?void 0:Li.type)==null?void 0:oi.indexOf("video"))>-1?We.replaceSelection(`<video width="100%" controls src="${Mi}"></video>`):((mi=Li==null?void 0:Li.type)==null?void 0:mi.indexOf("pdf"))>-1?We.replaceSelection(`<a href="${Mi}?type=${Li.type}&disposition=inline" target="_blank">${Li.name}</a>`):Ai.includes(dr)?We.replaceSelection(`<a href="${Mi}?type=office&disposition=inline" target="_blank">${Li.name}</a>`):We.replaceSelection(`[${Li.name}](${Mi})`),We.focus();case An:const{row:or,col:Mr,align:hr}=et;let Fr=`
`;for(let Ni=0;Ni<or;Ni++){let wr=[],Gr=[];for(let kr=0;kr<Mr;kr++)Ni===1&&Gr.push(sn[hr]),wr.push(" ");Ni===1&&(Fr+=`| ${Gr.join(" | ")} |
`),Fr+=`| ${wr.join(Mr===1?"":" | ")} |
`}return We.replaceSelection(Fr+`
`),We.focus();default:throw new Error}},[We,ut]),$n=(0,te.useMemo)(()=>{switch(ut){case an:return te.createElement(ft,{callback:Mn,onCancel:mn});case st:return te.createElement(qt.Z,{callback:Mn,onCancel:mn});case _t:return te.createElement(xt.Z,{callback:Mn,onCancel:mn});case En:return te.createElement(z,{editImgId:dn.current,callback:Mn,onCancel:mn});case An:return te.createElement(Ot,{callback:Mn,onCancel:mn});case"maths-latex":return te.createElement(Gt,{showSaveButton:!0,callback:Mn});case"inline-latex":return te.createElement(nn.Z,{showSaveButton:!0,callback:Mn});default:return null}},[ut]);function mn(){Cn("")}(0,te.useEffect)(()=>{if(Rn.current){let et=function(oi){gn=!0,zn=oi.pageY},Ze=function(){gn=!1},mt=function(oi){if(gn){let mi=oi.pageY-zn;mi<0&&(mi=0),mi>300&&(mi=300);let fi=ti+mi+"px";Ie(fi)}},Ft=Rn.current,gn=!1,zn=0;return Ft.addEventListener("mousedown",et),document.addEventListener("mousemove",mt),document.addEventListener("mouseup",Ze),()=>{Ft.removeEventListener("mousedown",et),document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",Ze)}}},[We,Rn]),(0,te.useEffect)(()=>{Ie(ti)},[ti]);const di=Bi(Sn),Gn=Bi(At),Yt={width:di,height:Gn},Xn=(0,te.useMemo)(()=>{if(Hn){let et=new Date(Hn),Ze=et.getHours(),mt=et.getMinutes(),Ft=et.getSeconds();return Ze=Ze<10?"0"+Ze:Ze,mt=mt<10?"0"+mt:mt,Ft=Ft<10?"0"+Ft:Ft,`${Ze}:${mt}:${Ft}`}return 0},[Hn]),Un=et=>{const Ze=[];if(at){let mt=-1;et=et.replace(/(@▁▁@|@▁@)/g,function(Ft,gn,zn){Ze.push({multiLine:Ft!==_i})})}return Ze};function wi(){window.sessionStorage.removeItem(ii),bn(!1),rn(0)}function In(){bn(!1),rn(0),We.setValue(window.sessionStorage.getItem(ii))}(0,te.useEffect)(()=>{ni[ut]&&ut!==ln&&ut!==En&&setTimeout(()=>{const et=document.getElementsByClassName("markdown-popup-form")[0],Ze=window.innerWidth/2-et.offsetWidth/2,mt=window.innerHeight/2-et.offsetHeight/2;On(Ze),Kt(mt)},0)},[ut]);const bt=et=>{et.preventDefault();const Ze=et.clientX-Ln,mt=et.clientY-qn;document.body.onmousemove=Ft=>{let gn=Ft.clientX-Ze,zn=Ft.clientY-mt;const oi=document.getElementsByClassName("markdown-popup-form")[0],mi=window.innerWidth-oi.offsetWidth,fi=window.innerHeight-oi.offsetHeight;gn=Math.max(0,Math.min(gn,mi)),zn=Math.max(0,Math.min(zn,fi)),Tt(Ft.clientX,Ft.clientY,Ze,mt)&&(On(gn),Kt(zn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Tt=(et,Ze,mt,Ft)=>{const gn=document.body.clientHeight,zn=document.body.clientWidth;return et<20&&mt>et||et>zn-20&&mt<et||Ze<20&&Ft>Ze||Ze>gn-20&&Ft<Ze?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return te.createElement(te.Fragment,null,te.createElement("div",{className:"markdown-editor-wrapper",ref:Wn},te.createElement("div",{className:`markdown-editor-container ${Lt} ${Jt?"on-preview":""} ${zi?"mini":""} ${Le?"full-screen":""}`,style:Yt},te.createElement(ht,{insertTemp:Di,watch:Jt,fullScreen:Le,showNullButton:zt,showNullProgramButton:at,onActionCallback:Nn,hidetoolBar:vn,extraUse:tn}),te.createElement("div",{className:"markdown-editor-body"},te.createElement("div",{className:"codemirror-container"},te.createElement("textarea",{ref:Bn,placeholder:Xt})),Jt?te.createElement("div",{ref:Zt,className:"preview-container"},Ei==="stex"&&te.createElement(pe,{value:St}),Ei!=="stex"&&te.createElement(Ye.Z,{edit:!0,disabledFill:yt,showProgramFill:at,value:St,openEditor:et=>{var Ze;dn.current=et,(Ze=Pn.current)==null||Ze.setHeight("100vh"),setTimeout(()=>{Cn("add-flowchart")},150)}})):null))),ui?te.createElement("a",{ref:Rn,className:"editor-resize"}):null,ut===ln&&te.createElement(vt,{callback:Mn,onCancel:mn}),ut===En&&te.createElement(z,{ref:Pn,editImgId:dn.current,callback:Mn,onCancel:mn}),te.createElement(Vt.Z,null,ni[ut]&&ut!==ln&&ut!==En?te.createElement(Ne.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ln,top:qn},title:te.createElement("div",{style:{cursor:"move"},onMouseDown:bt},ni[ut]),open:!0,onCancel:mn,footer:null,destroyOnClose:!0,width:ut===En?"1200px":null,height:ut===En?"80vh":null,className:"markdown-popup-form"},$n):null))}},45596:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return dt},I:function(){return Vt}});var te=he(28284),Ke=he(6767),_e=he(37568),Xe=he(77736),ve=he(71051),me=he(47889),Oe=he(99571),Ve=he(67303),we=he(59301),fe=he(59301),Ye=Object.defineProperty,pe=Object.defineProperties,it=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Se=(Be,Ge,nt)=>Ge in Be?Ye(Be,Ge,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Be[Ge]=nt,Je=(Be,Ge)=>{for(var nt in Ge||(Ge={}))Ce.call(Ge,nt)&&Se(Be,nt,Ge[nt]);if(He)for(var nt of He(Ge))Ee.call(Ge,nt)&&Se(Be,nt,Ge[nt]);return Be},lt=(Be,Ge)=>pe(Be,it(Ge));const{useForm:$e}=te.default,tt={width:280,marginRight:10},Te={labelCol:{span:5},wrapperCol:{span:19}};var dt=({callback:Be,onCancel:Ge})=>{const[nt]=$e();let Me=(0,we.useRef)();function Qe(Ut){Me.current.width=nt.getFieldValue("width"),Me.current.align=nt.getFieldValue("align"),Be(Ut,Me.current)}function Fe(Ut,Et){if(Ut.status===-1){Ke.ZP.error(Ut.message);return}nt.setFieldsValue({src:`/api/attachments/${Ut.id}`,type:Et.type})}function ot(Ut){let Et=Ut.target.files[0];Me.current=Et,Vt(Et,Fe)}return fe.createElement(te.default,lt(Je({form:nt},Te),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(te.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(_e.default,{style:tt})),fe.createElement(ht,{onFileChange:ot}))),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(_e.default,{style:{width:264}})),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Xe.Z,null,fe.createElement(te.default.Item,{name:"width",style:{margin:0}},fe.createElement(ve.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(te.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(me.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"}]})),fe.createElement("aside",null,fe.createElement(te.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Oe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Oe.ZP,{type:"default",onClick:Ge},"\u53D6\u6D88"))))};function ht({onFileChange:Be}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Be}))}function Vt(Be,Ge){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");let nt=new FormData;nt.append("editormd-image-file",Be),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var Me=new window.XMLHttpRequest;Me.withCredentials=!0,Me.addEventListener("load",function(Qe){Ge(JSON.parse(Qe.target.responseText),Be)},!1),Me.addEventListener("error",function(Qe){console.error(Qe)},!1),Me.open("POST",`${Ve.KI}/api/attachments.json`),Me.send(nt)}},75790:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return _e}});var te=he(59301),Ke=he(4676);class _e extends te.Component{constructor(ve){super(ve);const me=window.document;this.node=me.createElement("div"),me.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,Ke.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(It,Ht,he){"use strict";he.d(Ht,{SV:function(){return Pt},ZP:function(){return vt}});var te=he(59301),Ke=he(76374);const _e={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"]},Xe={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"]},ve={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(`
`)}]},me={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(`
`)}]},Oe={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 Ve=he(53184),we=he.n(Ve),fe=(ze,wt,Bt)=>new Promise((ae,ne)=>{var z=ie=>{try{se(Bt.next(ie))}catch(xe){ne(xe)}},oe=ie=>{try{se(Bt.throw(ie))}catch(xe){ne(xe)}},se=ie=>ie.done?ae(ie.value):Promise.resolve(ie.value).then(z,oe);se((Bt=Bt.apply(ze,wt)).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=(ze,wt,Bt,ae)=>{const ne=wt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Bt.lineNumber,endColumn:Bt.column});return Array.from(new Set(ne.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:ze.languages.CompletionItemKind.Text,insertText:oe,range:ae}))},it=(ze,wt,Bt,ae)=>{ze.languages.registerCompletionItemProvider(wt,{provideCompletionItems(ne,z){const oe=ne.getWordUntilPosition(z),se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},ie=ne.getLineContent(z.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...pe(ze,ne,z,se),...Bt.map(Ue=>({label:Ue,kind:ze.languages.CompletionItemKind.Keyword,documentation:Ue,insertText:Ue,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(Ue=>({label:Ue.label,kind:ze.languages.CompletionItemKind.Snippet,documentation:Ue.content,insertText:ie.startsWith("#")?Ue.content.replace(/#/,""):Ue.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var He=ze=>{Ye.languages.forEach(wt=>{ze.languages.registerDocumentFormattingEditProvider(wt,{provideDocumentFormattingEdits(Bt){return fe(this,null,function*(){const ae=we()(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}]})}})}),it(ze,"java",Xe.keywords,Xe.quickKey),it(ze,"cpp",ve.keywords,ve.quickKey),it(ze,"c",_e.keywords,[]),it(ze,"python",me.keywords,me.quickKey),it(ze,"scala",Oe.keywords,Oe.quickKey)};const Ce="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ee=Object.defineProperty,Se=(ze,wt,Bt)=>wt in ze?Ee(ze,wt,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):ze[wt]=Bt,Je=(ze,wt,Bt)=>Se(ze,typeof wt!="symbol"?wt+"":wt,Bt);const lt=class Rs{constructor(wt,Bt,ae){this.placeholder=wt,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 Rs.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)}};Je(lt,"ID","editor.widget.placeholderHint");var tt=lt,Te=he(96236),dt=he(6767),ht=he(25399),Vt=he(89392),Be=he(33796),Ge=he(56102),nt=Object.defineProperty,Me=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Et=(ze,wt,Bt)=>wt in ze?nt(ze,wt,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):ze[wt]=Bt,hn=(ze,wt)=>{for(var Bt in wt||(wt={}))ot.call(wt,Bt)&&Et(ze,Bt,wt[Bt]);if(Fe)for(var Bt of Fe(wt))Ut.call(wt,Bt)&&Et(ze,Bt,wt[Bt]);return ze},Mt=(ze,wt)=>Me(ze,Qe(wt)),ge=(ze,wt)=>{var Bt={};for(var ae in ze)ot.call(ze,ae)&&wt.indexOf(ae)<0&&(Bt[ae]=ze[ae]);if(ze!=null&&Fe)for(var ae of Fe(ze))wt.indexOf(ae)<0&&Ut.call(ze,ae)&&(Bt[ae]=ze[ae]);return Bt},de=(ze,wt,Bt)=>new Promise((ae,ne)=>{var z=ie=>{try{se(Bt.next(ie))}catch(xe){ne(xe)}},oe=ie=>{try{se(Bt.throw(ie))}catch(xe){ne(xe)}},se=ie=>ie.done?ae(ie.value):Promise.resolve(ie.value).then(z,oe);se((Bt=Bt.apply(ze,wt)).next())});function ft(ze){return/^\d+$/.test(ze)?`${ze}px`:ze}function qt(){}let xt=!1;const Ne={"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 rt(ze=[]){let wt=ze;if(Array.isArray(ze)){for(let Bt=0;Bt<ze.length;Bt++){let ae=Ne[ze[Bt]];if(ae)return ae}return wt[0]}return Ne[wt]||wt}let ct=null;const on=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ze){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ze)}});var vt=ze=>{var wt=ze,{width:Bt="100%",height:ae="100%",value:ne,language:z="javascript",style:oe={},options:se={},overrideServices:ie={},theme:xe="vs-dark",onEditBlur:Ue,isCopy:Ot=!1,onSave:Dt,autoHeight:gt=!1,forbidCopy:kt=!1,onChange:$t=qt,editorDidMount:Gt=qt,onFocus:nn=qt,onBreakPoint:an=qt,breakPointValue:_t=[],filename:En="educoder.txt",errorLine:ln,errorContent:kn="",highlightLine:st,openBreakPoint:An=!1,placeholder:Rt="",showMiniMap:sn=!0}=wt,wn=ge(wt,["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 Jn=(0,te.useRef)(),jt=(0,te.useRef)({}),Fn=(0,te.useRef)(),xi=(0,te.useRef)(),hi=(0,te.useRef)([]),_i=(0,te.useRef)(!1),Ri=(0,te.useRef)(),Ai=(0,te.useRef)(),Bi=(0,te.useRef)(!1),[li,bi]=(0,te.useState)(!1);function Si(){let zt;return Jn.current&&(zt=new Ke.Z(at=>{for(let vn of at)(vn.target.offsetHeight>0||vn.target.offsetWidth>0)&&jt.current.instance.layout()}),zt.observe(Jn.current)),zt}function ni(){dt.ZP.warning({content:decodeURIComponent(Ce),key:"monaco-editor-tip"})}const yi=()=>{let zt=jt.current.instance;if(ne!=null&&zt&&li){const at=zt.getModel();at&&ne!==at.getValue()&&(xt=!0,at.setValue(ne),zt.layout(),xt=!1)}};(0,te.useEffect)(()=>{const zt=Be.Z.subscribe("formatDocument",at=>{var vn;let ri=jt.current.instance;(vn=ri==null?void 0:ri.getAction)==null||vn.call(ri,"editor.action.formatDocument").run()});return window.updateMonacoValue=at=>{$t(at)},zt},[]),(0,te.useEffect)(()=>{var zt;let at=jt.current.instance;xi.current&&clearTimeout(xi.current),xi.current=setTimeout(()=>{yi()},500),ne&&(ne!=null&&ne.length)&&((zt=at==null?void 0:at.updateOptions)==null||zt.call(at,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[ne,li,jt.current]),(0,te.useEffect)(()=>{if(ln&&jt.current&&jt.current.instance){let at=jt.current.instance;at.changeViewZones(function(vn){var ri=document.createElement("div");ri.style.padding="10px 20px",ri.style.width="calc(100% - 20px)",ri.className="my-error-line-wrp",ri.innerHTML=kn,vn.addZone({afterLineNumber:ln||11,heightInLines:3,domNode:ri})});var zt={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}};at.addOverlayWidget(zt),at.revealPositionInCenter({lineNumber:20,column:1})}},[ln,jt.current,li]);const cn=(zt="",at)=>{if(!zt||zt.trim()==="")return!0;const ri=jt.current.instance.getModel().getLineTokens(at);let ci=!1;for(let Ae=0;Ae<2;Ae++)ri.getStandardTokenType(Ae)===1&&(ci=!0);return ci};(0,te.useEffect)(()=>{var zt;const at=(zt=jt.current)==null?void 0:zt.instance;if(at&&li&&kt){const vn=at.onDidBlurEditorWidget(()=>{Bi.current=!1}),ri=at.onDidFocusEditorText(()=>{Bi.current=!0});return()=>{vn.dispose(),ri.dispose()}}},[jt.current,li,kt]),(0,te.useEffect)(()=>{var zt;if((zt=jt.current)!=null&&zt.instance&&li&&An){let at=jt.current.instance,vn=at.getModel();if(!vn)return;(()=>{var We;let en=[],St=[];const _n=vn.getAllDecorations();for(let De of _n)De.options.className==="highlighted-line"&&(en.push((We=De==null?void 0:De.range)==null?void 0:We.startLineNumber),St.push(De==null?void 0:De.id));if(st===en[0])return;vn.deltaDecorations(St,[]);const Jt=vn.getLineCount();st&&st<=Jt&&(at.deltaDecorations([],[{range:new ct.Range(st,1,st,vn.getLineMaxColumn(st)),options:{isWholeLine:!0,className:"highlighted-line"}}]),at.revealLineInCenter(st))})();const ci=(We=!1)=>{var en;let St=[],_n=[];const Jt=vn.getAllDecorations();for(let De of Jt)De.options.linesDecorationsClassName==="breakpoints-select"&&(St.push((en=De==null?void 0:De.range)==null?void 0:en.startLineNumber),_n.push(De==null?void 0:De.id));if(We)return{lines:St,ids:_n};an(St)},Ae=We=>de(void 0,null,function*(){let en={range:new ct.Range(We,1,We,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield vn.deltaDecorations([],[en]),ci()}),Pe=We=>de(void 0,null,function*(){let en=[];const St=at.getLineDecorations(We);for(let _n of St)_n.options.linesDecorationsClassName==="breakpoints-select"&&en.push(_n.id);yield vn.deltaDecorations(en,[]),ci()}),Lt=We=>{let en=at.getLineDecorations(We);for(let St of en)if(St.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Vt.isEqual)(_t,ci(!0).lines)){vn.deltaDecorations(ci(!0).ids,[]);const We=_t.map(en=>({range:new ct.Range(en,1,en,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));vn.deltaDecorations([],We)}const pt=at.onDidChangeModelContent(We=>{let en=at.getPosition();if(en){let St=en.lineNumber;clearTimeout(Ai.current),Ai.current=setTimeout(()=>{cn(vn.getLineContent(St),St)?Pe(St):Lt(St)?(Pe(St),Ae(St)):ci()},100)}}),Re=at.onMouseDown(We=>{var en,St,_n;if(We.target.detail&&((_n=(St=(en=We.target)==null?void 0:en.element)==null?void 0:St.className)!=null&&_n.includes("line-numbers"))){let Jt=We.target.position.lineNumber;if(cn(vn.getLineContent(Jt),Jt))return;Lt(Jt)?Pe(Jt):Ae(Jt)}}),yt=We=>{let en={range:new ct.Range(We,1,We,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};hi.current=at.deltaDecorations(hi.current,[en])},Xt=()=>{hi.current=at.deltaDecorations(hi.current,[])},Wt=at.onMouseMove(We=>{var en,St,_n;if(Xt(),We.target.detail&&((_n=(St=(en=We.target)==null?void 0:en.element)==null?void 0:St.className)!=null&&_n.includes("line-numbers"))){let Jt=We.target.position.lineNumber;if(cn(vn.getLineContent(Jt),Jt))return;yt(Jt)}}),tn=at.onMouseLeave(()=>{Xt()});return()=>{pt.dispose(),Re.dispose(),Wt.dispose(),tn.dispose()}}},[jt.current,li,_t,st,An,z]),(0,te.useEffect)(()=>{var zt;(zt=jt.current)!=null&&zt.instance&&An&&jt.current.instance.setPosition({lineNumber:0,column:0})},[st]);function xn(){let zt=jt.current.instance;if(zt){const at=zt.getSelection(),vn=jt.current.pastePos||{},ri=new ct.Range(vn.startLineNumber||at.endLineNumber,vn.startColumn||at.endColumn,vn.endLineNumber||at.endLineNumber,vn.endColumn||at.endColumn);setTimeout(()=>{zt.executeEdits("",[{range:ri,text:""}])},300)}}function Sn(zt){(window.navigator.platform.match("Mac")?zt.metaKey:zt.ctrlKey)&&zt.keyCode==83&&(zt.preventDefault(),Dt())}const ti=()=>{if(gt&&jt.current.instance){const zt=jt.current.instance.getContentHeight();ui(zt<ae?ae:zt)}else ui(ae)};function zi(zt){var at=document.createEvent("MouseEvents");at.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),zt.dispatchEvent(at)}const Vn=zt=>{if(!Bi.current)return;const{keyCode:at,ctrlKey:vn,metaKey:ri,target:ci,type:Ae}=zt;return(Ae==="paste"||(at===67||at===86)&&(ri||vn))&&ci.nodeName==="TEXTAREA"&&(ni(),zt.preventDefault()),!1};function vi(zt,at){var vn=window.URL||window.webkitURL||window,ri=new Blob([at]),ci=document.createElementNS("http://www.w3.org/1999/xhtml","a");ci.href=vn.createObjectURL(ri),ci.download=zt,zi(ci)}(0,te.useEffect)(()=>{ti()},[ti]),(0,te.useEffect)(()=>{Jn.current&&!li&&Promise.all([he.e(8909),he.e(5028)]).then(he.bind(he,71448)).then(zt=>{try{ct=zt,jt.current.instance=ct.editor.create(Jn.current,{value:ne,language:rt(z),theme:xe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:sn||!1}},ie);const at=jt.current.instance;let ci=[...Te.BH._menuItems].find(pt=>pt[0]._debugName=="EditorContext")[1],Ae=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Pe=(pt,Re)=>{var yt,Xt;let Wt=pt._first;do Re.includes((Xt=(yt=Wt.element)==null?void 0:yt.command)==null?void 0:Xt.id)&&pt._remove(Wt);while(Wt=Wt.next)};if(Gt(at,ct),setTimeout(()=>{ti(),jt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{vi(En||"educoder.txt",at.getValue())}})},500),jt.current.subscription=at.onDidChangeModelContent(pt=>{_i.current?clearTimeout(Ri.current):(ti(),$t(at.getValue(),pt)),Ri.current=setTimeout(()=>{_i.current=!1},500)}),window.Monaco||He(ct,rt(z)),kt&&(Pe(ci,Ae),Jn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Vn),window.removeEventListener("paste",Vn),window.addEventListener("keydown",Vn),window.addEventListener("paste",Vn)),window.Monaco=ct,Ue&&at.onDidBlurEditorWidget(()=>{Ue(at.getValue())}),nn&&at.onDidFocusEditorText(()=>{kt&&on(),nn(at.getValue())}),kt){on();try{at.onDidPaste(pt=>{const Re=at.getSelection(),yt=jt.current.pastePos||{},Xt=new ct.Range(yt.startLineNumber||Re.endLineNumber,yt.startColumn||Re.endColumn,yt.endLineNumber||Re.endLineNumber,yt.endColumn||Re.endColumn);at.executeEdits("",[{range:pt.range,text:""}])})}catch(pt){}}let Lt=Si();return Rt&&typeof Rt=="string"&&new tt(Rt,at,ct),bi(!0),()=>{const pt=jt.current.instance;pt.dispose();const Re=pt.getModel();Re&&Re.dispose(),jt.current.subscription&&jt.current.subscription.dispose(),Lt.unobserve(Jn.current)}}catch(at){}})},[]),(0,te.useEffect)(()=>{if(jt.current.instance&&li)return document.addEventListener("keydown",Sn,!1),()=>{document.removeEventListener("keydown",Sn)}},[Dt,li]),(0,te.useEffect)(()=>{let zt=jt.current.instance;if(zt&&li){let at=rt(z);ct.editor.setModelLanguage(zt.getModel(),at)}},[z,li]),(0,te.useEffect)(()=>{jt.current.instance&&li&&ct.editor.setTheme(xe)},[xe,li]),(0,te.useEffect)(()=>{let zt=jt.current.instance;Fn.current=se,zt&&li&&(zt.updateOptions(hn({},se)),setTimeout(()=>{zt.getModel().updateOptions(hn({},se))},200))},[JSON.stringify(se),li]),(0,te.useEffect)(()=>{let zt=jt.current.instance;zt&&li&&zt.layout()},[Bt,ae,li]);const[Di,Ei]=(0,te.useState)(ft(Bt)),[ii,ui]=(0,te.useState)(ft(ae)),Fi=Mt(hn({},oe),{width:Di,height:ii,position:"relative"});return te.createElement("div",{className:"my-monaco-editor",ref:Jn,style:Fi},Ot&&te.createElement(Ge.CopyToClipboard,{text:ne,onCopy:()=>dt.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement(ht.Z,{title:"\u590D\u5236\u4EE3\u7801"},te.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},te.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Pt({width:ze="100%",height:wt="100%",original:Bt,modified:ae,language:ne,options:z={}}){const oe=(0,te.useRef)(),[se,ie]=(0,te.useState)(null);function xe(gt){let kt;return oe.current&&(kt=new Ke.Z($t=>{for(let Gt of $t)(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&gt.layout()}),kt.observe(oe.current)),kt}(0,te.useEffect)(()=>(oe.current&&Promise.all([he.e(8909),he.e(9404)]).then(he.bind(he,2550)).then(gt=>{ct=gt;const kt=ct.editor.createDiffEditor(oe.current,Mt(hn({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}));ie(kt);let $t=xe(kt);return()=>{kt.dispose();const Gt=kt.getModel();Gt&&Gt.dispose(),$t.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,te.useEffect)(()=>{se&&se.setModel({original:ct.editor.createModel(Bt,ne),modified:ct.editor.createModel(ae,ne)})},[Bt,ae,ne,se]);const Ue=ft(ze),Ot=ft(wt),Dt={width:Ue,height:Ot};return te.createElement("div",{className:"my-diff-editor",ref:oe,style:Dt})}},17904:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return Ke}});var te=he(59301);function Ke(_e,Xe){const ve=(0,te.useRef)();(0,te.useEffect)(()=>{ve.current=_e}),(0,te.useEffect)(()=>{function me(){ve.current()}if(Xe!==null){let Oe=setInterval(me,Xe);return()=>clearInterval(Oe)}},[Xe])}},99667:function(It,Ht,he){"use strict";he.r(Ht),he.d(Ht,{default:function(){return Jt}});var te=he(59301),Ke=he(76560),_e=he(93041),Xe=he(24404),ve=he(28284),me=he(6767),Oe=he(37285),Ve=he(91882),we=he(77019),fe=he(5269),Ye=he(25399),pe=he(37568),it=he(99571),He=he(32134),Ce=he(79763),Ee=he(62957),Se=he(62673),Je=he(71051),lt=he(72664),$e=he(2978),tt=he(38394),Te={flex_box_center:"flex_box_center___T9vjl",flex_space_between:"flex_space_between___zZP1J",flex_box_vertical_center:"flex_box_vertical_center___vbIhw",flex_box_center_end:"flex_box_center_end___SjRau",flex_box_column:"flex_box_column___Ic_zi",wrap:"wrap___GtXAk",modal:"modal___mDuC3",titleWrap:"titleWrap___EzCZh",required:"required___KgfdI",title:"title___TMgfc",colorGray:"colorGray___xNVTs",choiceWrap:"choiceWrap___Rv9ug",answer:"answer___hVpls",activeAnswer:"activeAnswer___oJoq9",deleteIcon:"deleteIcon___bkn4b",addIcon:"addIcon___S2pDY",editorWrap:"editorWrap___BOx_r",htmlWrap:"htmlWrap___ERVlQ",radio:"radio___lrt5b",color333:"color333___pz3OT",color999:"color999___jtQ7e",questionType:"questionType___qUnUb",questionChoices:"questionChoices___n36qp"},dt=Object.defineProperty,ht=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Ge=(De,Le,ye)=>Le in De?dt(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,nt=(De,Le)=>{for(var ye in Le||(Le={}))Vt.call(Le,ye)&&Ge(De,ye,Le[ye]);if(ht)for(var ye of ht(Le))Be.call(Le,ye)&&Ge(De,ye,Le[ye]);return De},Me=(De,Le)=>{var ye={};for(var ut in De)Vt.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&ht)for(var ut of ht(De))Le.indexOf(ut)<0&&Be.call(De,ut)&&(ye[ut]=De[ut]);return ye},Qe=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const Fe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ot=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,onRef:At=()=>{},editData:Ie}=ye,un=Me(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[bn,Ln]=(0,te.useState)([]),[On,qn]=(0,te.useState)(),[Kt,Bn]=(0,te.useState)([]),[Wn,Rn]=(0,te.useState)(""),[Zt,dn]=(0,te.useState)(5),[Pn,Zn]=(0,te.useState)(!1),jn=(0,Ke.useParams)();(0,te.useEffect)(()=>{Ln(["","","",""])},[]),(0,te.useEffect)(()=>{if(!(Ie!=null&&Ie.question_choices)){Zn(!0);return}Rn(Ie==null?void 0:Ie.question_title),dn(parseInt(Ie==null?void 0:Ie.question_score)),Ln(Ie==null?void 0:Ie.question_choices.map(Yt=>Yt.choice_text));const Gn=[];Ie==null||Ie.standard_answer.map((Yt,Xn)=>{Gn.push(Yt-1)}),Bn(Gn)},[Ie]),(0,te.useImperativeHandle)(Le,()=>({onSave:Nn,isEdit:Pn}));const Nn=()=>Qe(void 0,null,function*(){if(!Wn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const Gn=bn.findIndex(Un=>!Un);if(Gn>-1)return me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Fe[Gn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Kt.length)return me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Kt.length<1)return me.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Yt=bn.map((Un,wi)=>({choice_text:Un,is_answer:Kt.includes(wi)?wi+1:0}));let Xn;Ie.question_id?Xn=yield rn({type:"exercise/editExerciseQuestion",payload:{id:Ie.question_id,question_title:Wn,question_type:1,question_score:"5.0",question_choices:Yt.map(Un=>Un.choice_text),standard_answers:Yt.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}}):Xn=yield rn({type:"exercise/addExerciseQuestion",payload:{categoryId:jn.categoryId,question_title:Wn,question_type:1,question_score:"5.0",question_choices:Yt.map(Un=>Un.choice_text),standard_answers:Yt.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}}),Xn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Zn(!1),rn({type:"exercise/editExercise",payload:nt({},jn)}))}),Mn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],$n=Gn=>Qe(void 0,null,function*(){switch(Gn.id){case"del":let Yt;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Qe(this,null,function*(){yield(0,lt.Fl)({id:Ie.question_id}),rn({type:"exercise/editExercise",payload:nt({},jn)})})}});break;case"up":case"down":yield rn({type:"exercise/exeriseMoveUpDown",payload:{id:Ie.question_id,opr:Gn.id}}),rn({type:"exercise/editExercise",payload:nt({},jn)});break;case"edit":Zn(!0);break}}),mn=()=>{var Gn;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},Ie.key,"\u3001\u591A\u9009\u9898"),"\uFF08",Ie.question_score,"\u5206\uFF09"),!Ie.hideAction&&Mn.map(function(Yt,Xn){return Yt.id==="up"&&Ie.key===1||Yt.id==="down"&&Ie.key===Ie.len?null:te.createElement(Ye.Z,{key:Xn,placement:"bottom",title:Yt.name},te.createElement("span",{onClick:()=>$n(Yt),className:Yt.icon}))})),te.createElement("div",{className:"mt5"},te.createElement(tt.Z,{value:Ie.question_title})),te.createElement("div",{className:Te.questionChoices},(Gn=Ie==null?void 0:Ie.question_choices)==null?void 0:Gn.map(function(Yt,Xn){return te.createElement(we.Z,null,te.createElement(fe.Z,null,te.createElement(Se.default,{key:Xn,checked:Ie.standard_answer.includes(Xn+1),disabled:!0},Fe[Xn],".")),te.createElement(fe.Z,{flex:"1"},te.createElement("span",{className:"c-black font14"},te.createElement(tt.Z,{value:Yt.choice_text}))))})))},di=()=>te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),te.createElement("p",{className:Te.titleWrap},te.createElement("span",{className:Te.required},"*"),te.createElement("span",{className:Te.title},"\u9898\u5E72\uFF1A")),te.createElement($e.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Wn,onChange:Gn=>Rn(Gn)}),bn.map((Gn,Yt)=>te.createElement("div",{className:Te.choiceWrap,key:Yt},te.createElement(Ye.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},te.createElement("div",{className:`${Te.answer} ${Kt.includes(Yt)?Te.activeAnswer:""}`,onClick:()=>{Kt.includes(Yt)?Bn(Kt.filter(Xn=>Xn!==Yt)):Bn([...Kt,Yt])}},Fe[Yt])),te.createElement("div",{className:Te.editorWrap},On===Yt?te.createElement($e.Z,{id:`single-question-option-${Yt}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Gn,onChange:Xn=>{bn[Yt]=Xn,Ln(bn)}}):te.createElement("div",{className:Te.htmlWrap,onClick:()=>qn(Yt)},te.createElement(tt.Z,{value:Gn}))),Yt>1&&te.createElement(Ye.Z,{title:"\u5220\u9664"},te.createElement("i",{className:`${Te.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Ln(bn.filter((Xn,Un)=>Un!==Yt))})),Yt<7&&Yt===bn.length-1&&te.createElement(Ye.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},te.createElement("i",{className:`${Te.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Ln([...bn,""])})))),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement(Je.Z,{value:Zt,max:1e4,min:-1,onChange:Gn=>{dn(Gn)}})," \u5206"),te.createElement("aside",{className:"tr"},Ie.question_id&&te.createElement(it.ZP,{type:"default",onClick:()=>Zn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>Nn()},"\u4FDD\u5B58")));return te.createElement("section",{className:Te.wrap},!Pn&&mn(),Pn&&di())};var Ut=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(ot)),Et=he(47889),hn=Object.defineProperty,Mt=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ft=(De,Le,ye)=>Le in De?hn(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,qt=(De,Le)=>{for(var ye in Le||(Le={}))ge.call(Le,ye)&&ft(De,ye,Le[ye]);if(Mt)for(var ye of Mt(Le))de.call(Le,ye)&&ft(De,ye,Le[ye]);return De},xt=(De,Le)=>{var ye={};for(var ut in De)ge.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&Mt)for(var ut of Mt(De))Le.indexOf(ut)<0&&de.call(De,ut)&&(ye[ut]=De[ut]);return ye},Ne=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const rt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ct=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,onRef:At=()=>{},editData:Ie}=ye,un=xt(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[bn,Ln]=(0,te.useState)([]),[On,qn]=(0,te.useState)(),[Kt,Bn]=(0,te.useState)([]),[Wn,Rn]=(0,te.useState)(""),[Zt,dn]=(0,te.useState)(0),[Pn,Zn]=(0,te.useState)(!1),jn=(0,Ke.useParams)();(0,te.useEffect)(()=>{Ln(["","","",""])},[]),(0,te.useEffect)(()=>{if(!(Ie!=null&&Ie.question_choices)){Zn(!0);return}Rn(Ie==null?void 0:Ie.question_title),dn(parseInt(Ie==null?void 0:Ie.question_score)),Ln(Ie==null?void 0:Ie.question_choices.map(Yt=>Yt.choice_text));const Gn=[];Ie==null||Ie.standard_answer.map((Yt,Xn)=>{Gn.push(Yt-1)}),Bn(Gn)},[Ie]),(0,te.useImperativeHandle)(Le,()=>({onSave:Nn,isEdit:Pn}));const Nn=()=>Ne(void 0,null,function*(){if(!Wn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const Gn=bn.findIndex(Un=>!Un);if(Gn>-1)return me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${rt[Gn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Kt.length)return me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Kt.length<1)return me.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Yt=bn.map((Un,wi)=>({choice_text:Un,is_answer:Kt.includes(wi)?wi+1:0}));let Xn;Ie.question_id?Xn=yield(0,Ce.Kc)({id:Ie.question_id,question_title:Wn,question_type:1,question_score:Zt,question_choices:Yt.map(Un=>Un.choice_text),standard_answers:Yt.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}):Xn=yield(0,Ce.iV)({exercise_bank_id:jn.topicId,question_title:Wn,question_type:1,question_score:"5.0",question_choices:Yt.map(Un=>Un.choice_text),standard_answers:Yt.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}),Xn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Zn(!1)),yield rn({type:"polls/getExerciseBanks",payload:qt({},jn)})}),Mn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],$n=Gn=>Ne(void 0,null,function*(){switch(Gn.id){case"del":let Yt;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ne(this,null,function*(){yield(0,Ce.x$)({pollsId:Ie.question_id}),rn({type:"polls/getExerciseBanks",payload:qt({},jn)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Ie==null?void 0:Ie.question_id,opr:Gn.id}),rn({type:"polls/getExerciseBanks",payload:qt({},jn)});break;case"edit":Zn(!0);break}}),mn=()=>{var Gn;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},Ie.key,"\u3001\u5355\u9009\u9898"),"\uFF08",Ie.question_score,"\u5206\uFF09"),!Ie.hideAction&&Mn.map(function(Yt,Xn){return Yt.id==="up"&&Ie.key===1||Yt.id==="down"&&Ie.key===Ie.len?null:te.createElement(Ye.Z,{key:Xn,placement:"bottom",title:Yt.name},te.createElement("span",{onClick:()=>$n(Yt),className:Yt.icon}))})),te.createElement("div",{className:"mt5"},te.createElement(tt.Z,{value:Ie.question_title})),te.createElement("div",{className:Te.questionChoices},(Gn=Ie==null?void 0:Ie.question_choices)==null?void 0:Gn.map(function(Yt,Xn){return te.createElement(we.Z,null,te.createElement(fe.Z,null,te.createElement(Et.ZP,{key:Xn,checked:Ie.standard_answer.includes(Xn+1),disabled:!0},rt[Xn],".")),te.createElement(fe.Z,{flex:"1"},te.createElement("span",{className:"c-black font14"},te.createElement(tt.Z,{value:Yt.choice_text}))))})))},di=()=>te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),te.createElement("p",{className:Te.titleWrap},te.createElement("span",{className:Te.required},"*"),te.createElement("span",{className:Te.title},"\u9898\u5E72\uFF1A")),te.createElement($e.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Wn,onChange:Gn=>Rn(Gn)}),bn.map((Gn,Yt)=>te.createElement("div",{className:Te.choiceWrap,key:Yt},te.createElement(Ye.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},te.createElement("div",{className:`${Te.answer} ${Kt.includes(Yt)?Te.activeAnswer:""}`,onClick:()=>{Kt.includes(Yt)?Bn(Kt.filter(Xn=>Xn!==Yt)):Bn([...Kt,Yt])}},rt[Yt])),te.createElement("div",{className:Te.editorWrap},On===Yt?te.createElement($e.Z,{id:`single-question-option-${Yt}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Gn,onChange:Xn=>{bn[Yt]=Xn,Ln(bn)}}):te.createElement("div",{className:Te.htmlWrap,onClick:()=>qn(Yt)},te.createElement(tt.Z,{value:Gn}))),Yt>1&&te.createElement(Ye.Z,{title:"\u5220\u9664"},te.createElement("i",{className:`${Te.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Ln(bn.filter((Xn,Un)=>Un!==Yt))})),Yt<7&&Yt===bn.length-1&&te.createElement(Ye.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},te.createElement("i",{className:`${Te.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Ln([...bn,""])})))),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement(Je.Z,{value:Zt,max:1e4,min:-1,onChange:Gn=>{dn(Gn)}})," \u5206"),te.createElement("aside",{className:"tr"},Ie.question_id&&te.createElement(it.ZP,{type:"default",onClick:()=>Zn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>Nn()},"\u4FDD\u5B58")));return te.createElement("section",{className:Te.wrap},!Pn&&mn(),Pn&&di())};var on=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(ct)),vt=Object.defineProperty,Pt=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Bt=(De,Le,ye)=>Le in De?vt(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,ae=(De,Le)=>{for(var ye in Le||(Le={}))ze.call(Le,ye)&&Bt(De,ye,Le[ye]);if(Pt)for(var ye of Pt(Le))wt.call(Le,ye)&&Bt(De,ye,Le[ye]);return De},ne=(De,Le)=>{var ye={};for(var ut in De)ze.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&Pt)for(var ut of Pt(De))Le.indexOf(ut)<0&&wt.call(De,ut)&&(ye[ut]=De[ut]);return ye},z=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const oe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],se=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,onRef:At=()=>{},editData:Ie}=ye,un=ne(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[bn,Ln]=(0,te.useState)(),[On,qn]=(0,te.useState)(""),[Kt,Bn]=(0,te.useState)(!1),[Wn,Rn]=(0,te.useState)(5),Zt=(0,Ke.useParams)();(0,te.useEffect)(()=>{if(!(Ie!=null&&Ie.question_choices)){Bn(!0);return}qn(Ie==null?void 0:Ie.question_title),Rn(Ie==null?void 0:Ie.question_score),Ln(Ie.standard_answer[0]+"")},[Ie]),(0,te.useImperativeHandle)(Le,()=>({onSave:dn,isEdit:Kt}));const dn=()=>z(void 0,null,function*(){if(!On)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!bn)return me.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const Mn=[{choice_text:"\u6B63\u786E",is_answer:bn==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:bn==="2"?2:0}];let $n;return Ie.question_id?$n=yield(0,Ce.Kc)({id:Ie.question_id,question_title:On,question_type:2,question_score:Wn,question_choices:Mn.map(mn=>mn.choice_text),standard_answers:Mn.filter(mn=>mn.is_answer).map(mn=>mn.is_answer)}):$n=yield(0,Ce.iV)({exercise_bank_id:Zt.topicId,question_title:On,question_type:2,question_score:Wn,question_choices:Mn.map(mn=>mn.choice_text),standard_answers:Mn.filter(mn=>mn.is_answer).map(mn=>mn.is_answer)}),$n.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Bn(!1)),rn({type:"polls/getExerciseBanks",payload:ae({},Zt)}),{name:On,choices:Mn}}),Pn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Zn=Mn=>z(void 0,null,function*(){switch(Mn.id){case"del":let $n;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return z(this,null,function*(){yield(0,Ce.x$)({pollsId:Ie.question_id}),rn({type:"polls/getExerciseBanks",payload:ae({},Zt)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Ie==null?void 0:Ie.question_id,opr:Mn.id}),rn({type:"polls/getExerciseBanks",payload:ae({},Zt)});break;case"edit":Bn(!0);break}}),jn=()=>{var Mn;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},Ie.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",Ie.question_score,"\u5206\uFF09"),!Ie.hideAction&&Pn.map(function($n,mn){return $n.id==="up"&&Ie.key===1||$n.id==="down"&&Ie.key===Ie.len?null:te.createElement(Ye.Z,{key:mn,placement:"bottom",title:$n.name},te.createElement("span",{onClick:()=>Zn($n),className:$n.icon}))})),te.createElement("div",{className:"mt5"},Ie.question_title),te.createElement("div",{className:Te.questionChoices},(Mn=Ie==null?void 0:Ie.question_choices)==null?void 0:Mn.map(function($n,mn){return te.createElement(Et.ZP,{key:mn,checked:Ie.standard_answer.includes(mn+1),disabled:!0},oe[mn],". ",te.createElement("span",{className:"c-black font14"},$n.choice_text))})))},Nn=()=>te.createElement("aside",null,te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),te.createElement("p",{className:Te.titleWrap},te.createElement("span",{className:Te.required},"*"),te.createElement("span",{className:Te.title},"\u9898\u5E72\uFF1A")),te.createElement($e.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:On,onChange:Mn=>qn(Mn)}),te.createElement("p",{className:Te.titleWrap},te.createElement("span",{className:Te.required},"*"),te.createElement("span",{className:Te.title},"\u7B54\u6848\u9009\u9879\uFF1A",te.createElement("span",{className:Te.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),te.createElement(Et.ZP.Group,{buttonStyle:"solid",value:bn,onChange:Mn=>Ln(Mn.target.value)},te.createElement(Et.ZP.Button,{value:"1",className:`${Te.radio} mr40`},"\u6B63\u786E"),te.createElement(Et.ZP.Button,{value:"2",className:Te.radio},"\u9519\u8BEF")),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement(Je.Z,{value:Wn,max:1e4,min:-1,onChange:Mn=>{Rn(Mn)}})," \u5206"),te.createElement("aside",{className:"tr"},Ie.question_id&&te.createElement(it.ZP,{type:"default",onClick:()=>Bn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>dn()},"\u4FDD\u5B58")));return te.createElement("section",{className:Te.wrap},!Kt&&jn(),Kt&&Nn())};var ie=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(se)),xe=he(48106),Ue=he(20927),Ot=he(49661),Dt=Object.defineProperty,gt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Gt=(De,Le,ye)=>Le in De?Dt(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,nn=(De,Le)=>{for(var ye in Le||(Le={}))kt.call(Le,ye)&&Gt(De,ye,Le[ye]);if(gt)for(var ye of gt(Le))$t.call(Le,ye)&&Gt(De,ye,Le[ye]);return De},an=(De,Le)=>{var ye={};for(var ut in De)kt.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&gt)for(var ut of gt(De))Le.indexOf(ut)<0&&$t.call(De,ut)&&(ye[ut]=De[ut]);return ye},_t=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const En=null,ln=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,editData:At}=ye,Ie=an(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[un,bn]=(0,te.useState)(""),[Ln,On]=(0,te.useState)(""),[qn,Kt]=(0,te.useState)([]),[Bn,Wn]=(0,te.useState)(""),[Rn,Zt]=(0,te.useState)(),[dn,Pn]=(0,te.useState)(!1),[Zn,jn]=(0,te.useState)(5),[Nn,Mn]=(0,te.useState)(!1),$n=(0,Ke.useParams)();(0,te.useEffect)(()=>{if(!(At!=null&&At.question_title)){Mn(!0);return}bn(At==null?void 0:At.question_title),Zt(At==null?void 0:At.is_ordered),jn(At==null?void 0:At.question_score);const et=At==null?void 0:At.standard_answer.map(Ze=>Ze.answer_text);Kt(et)},[ut.editData]),(0,te.useEffect)(()=>{Pn(!1)},[Nn]),(0,te.useImperativeHandle)(Le,()=>({onSave:mn,isEdit:Nn}));const mn=()=>_t(void 0,null,function*(){let et=[],Ze=!1;if(qn.forEach((Ft,gn)=>{et.push({choice_id:gn+1,answer_text:[]}),Ft.forEach((zn,oi)=>{et[gn].answer_text.push(zn),(!zn||!(0,Ot.eR)(zn,1e4))&&(Wn(`${gn}-${oi}`),me.ZP.info(zn?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ze=!0)})}),Ze)return!1;let mt;return At.question_id?mt=yield(0,Ce.Kc)({id:At.question_id,question_title:un,question_type:3,question_score:Zn,is_ordered:Rn,standard_answers:et}):mt=yield(0,Ce.iV)({exercise_bank_id:$n.topicId,question_title:un,question_type:3,question_score:Zn,is_ordered:Rn,standard_answers:et}),mt.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Mn(!1)),rn({type:"polls/getExerciseBanks",payload:nn({},$n)}),{name:un,analysis:Ln,standard_answers:et,is_ordered:Rn}}),di=(et,Ze,mt)=>{const Ft=qn.slice();if(Ze&&Ft.splice(et,Ze),mt&&dn)for(let gn=0;gn<mt;gn++)Ft.splice(et+gn,0,[""]);Pn(!0),Kt(Ft)},Gn=(et,Ze,mt)=>{Wn("");let Ft=qn.slice();Ft[et][Ze]=mt,Kt(Ft)},Yt=et=>{let Ze=qn.slice();Ze[et]=[...Ze[et],""],Kt(Ze)},Xn=(et,Ze)=>{let mt=qn.slice();if(!mt[et][Ze]){mt[et]=mt[et].filter((Ft,gn)=>gn!==Ze),Kt(mt);return}Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Te.modal,onOk:()=>{mt[et]=mt[et].filter((Ft,gn)=>gn!==Ze),Kt(mt)}})},Un=et=>{Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Te.modal,onOk:()=>{let Ze=qn.slice();Ze=qn.filter((mt,Ft)=>et!==Ft),Kt(Ze)}})},wi=()=>te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),te.createElement("div",null,te.createElement(xe.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:un,onChange:et=>bn(et),showNullButton:!0,onPlaceholderChange:di})),te.createElement("div",{className:"mt20"},qn.map((et,Ze)=>te.createElement(Ue.Z,{key:Ze,answers:et,index:Ze,is_md:!0,activeOptionErrorIndex:Bn,onAnswerChange:Gn,addChildAnswer:Yt,deleteChildAnswer:Xn,deleteChildAnswermain:Un}))),te.createElement("div",{className:"mt20"},qn.length>1&&te.createElement("span",null,te.createElement(Se.default,{checked:Rn,onChange:et=>Zt(et.target.checked),className:`${Te.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),te.createElement("span",{className:`${Te.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement(Je.Z,{value:Zn,max:1e4,min:-1,onChange:et=>{jn(et)}})," \u5206"),te.createElement("aside",{className:"tr"},At.question_id&&te.createElement(it.ZP,{type:"default",onClick:()=>Mn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>mn()},"\u4FDD\u5B58"))),In=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],bt=et=>_t(void 0,null,function*(){switch(et.id){case"del":let Ze;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return _t(this,null,function*(){yield(0,Ce.x$)({pollsId:At.question_id}),rn({type:"polls/getExerciseBanks",payload:nn({},$n)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:At==null?void 0:At.question_id,opr:et.id}),rn({type:"polls/getExerciseBanks",payload:nn({},$n)});break;case"edit":Mn(!0);break}}),Tt=()=>{var et;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},At.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",At.question_score,"\u5206\uFF09"),!At.hideAction&&In.map(function(Ze,mt){return Ze.id==="up"&&At.key===1||Ze.id==="down"&&At.key===At.len?null:te.createElement(Ye.Z,{key:mt,placement:"bottom",title:Ze.name},te.createElement("span",{onClick:()=>bt(Ze),className:Ze.icon}))})),te.createElement("div",{className:"mt5"},At.question_title),te.createElement("div",{className:Te.questionChoices},(et=At==null?void 0:At.standard_answer)==null?void 0:et.map(function(Ze,mt){return te.createElement(we.Z,null,te.createElement(fe.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",Ze.choice_id,"\uFF09\uFF1A"),te.createElement(fe.Z,{flex:"1"},te.createElement(pe.default,{key:mt,checked:At.standard_answer.includes(mt),disabled:!0,value:Ze.answer_text})))})))};return te.createElement("section",{className:Te.wrap},!Nn&&Tt(),Nn&&wi())};var kn=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(ln)),st=Object.defineProperty,An=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,wn=(De,Le,ye)=>Le in De?st(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,Jn=(De,Le)=>{for(var ye in Le||(Le={}))Rt.call(Le,ye)&&wn(De,ye,Le[ye]);if(An)for(var ye of An(Le))sn.call(Le,ye)&&wn(De,ye,Le[ye]);return De},jt=(De,Le)=>{var ye={};for(var ut in De)Rt.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&An)for(var ut of An(De))Le.indexOf(ut)<0&&sn.call(De,ut)&&(ye[ut]=De[ut]);return ye},Fn=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const xi=null,hi=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,onRef:At=()=>{},editData:Ie}=ye,un=jt(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[bn,Ln]=(0,te.useState)(""),[On,qn]=(0,te.useState)(""),[Kt,Bn]=(0,te.useState)(""),[Wn,Rn]=(0,te.useState)(5),[Zt,dn]=(0,te.useState)(!1),Pn=(0,Ke.useParams)();(0,te.useEffect)(()=>{var mn;if(!(Ie!=null&&Ie.question_title)){dn(!0);return}Ln(Ie==null?void 0:Ie.question_title),Bn((mn=Ie==null?void 0:Ie.standard_answer)==null?void 0:mn[0]),Rn(Ie==null?void 0:Ie.question_score)},[ut.editData]),(0,te.useImperativeHandle)(Le,()=>({onSave:Zn,isEdit:Zt}));const Zn=()=>Fn(void 0,null,function*(){if(!bn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let mn;return Ie.question_id?mn=yield(0,Ce.Kc)({id:Ie.question_id,question_title:bn,question_type:4,question_score:Wn,standard_answers:[Kt]}):mn=yield(0,Ce.iV)({exercise_bank_id:Pn.topicId,question_title:bn,question_type:4,question_score:Wn,standard_answers:[Kt]}),mn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),dn(!1),rn({type:"polls/getExerciseBanks",payload:Jn({},Pn)})),{name:bn,answer_texts:[Kt],analysis:On}}),jn=()=>te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),te.createElement($e.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:bn,onChange:mn=>Ln(mn)}),te.createElement("p",{className:Te.titleWrap},te.createElement("span",{className:Te.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),te.createElement($e.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Kt,onChange:mn=>Bn(mn)}),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement(Je.Z,{value:Wn,max:1e4,min:-1,onChange:mn=>{Rn(mn)}})," \u5206"),te.createElement("aside",{className:"tr"},Ie.question_id&&te.createElement(it.ZP,{type:"default",onClick:()=>dn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>Zn()},"\u4FDD\u5B58"))),Nn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Mn=mn=>Fn(void 0,null,function*(){switch(mn.id){case"del":let di;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Fn(this,null,function*(){yield(0,Ce.x$)({pollsId:Ie.question_id}),rn({type:"polls/getExerciseBanks",payload:Jn({},Pn)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Ie==null?void 0:Ie.question_id,opr:mn.id}),rn({type:"polls/getExerciseBanks",payload:Jn({},Pn)});break;case"edit":dn(!0);break}}),$n=()=>te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},Ie.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",Ie.question_score,"\u5206\uFF09"),!Ie.hideAction&&Nn.map(function(mn,di){return mn.id==="up"&&Ie.key===1||mn.id==="down"&&Ie.key===Ie.len?null:te.createElement(Ye.Z,{key:di,placement:"bottom",title:mn.name},te.createElement("span",{onClick:()=>Mn(mn),className:mn.icon}))})),te.createElement("div",{className:"mt5"},Ie.question_title),te.createElement("div",{className:Te.questionChoices},te.createElement("p",null,te.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),te.createElement(tt.Z,{value:Kt})));return te.createElement("section",{className:Te.wrap},!Zt&&$n(),Zt&&jn())};var _i=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(hi)),Ri=Object.defineProperty,Ai=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable,bi=(De,Le,ye)=>Le in De?Ri(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,Si=(De,Le)=>{for(var ye in Le||(Le={}))Bi.call(Le,ye)&&bi(De,ye,Le[ye]);if(Ai)for(var ye of Ai(Le))li.call(Le,ye)&&bi(De,ye,Le[ye]);return De},ni=(De,Le)=>{var ye={};for(var ut in De)Bi.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&Ai)for(var ut of Ai(De))Le.indexOf(ut)<0&&li.call(De,ut)&&(ye[ut]=De[ut]);return ye},yi=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const cn=null,xn=(De,Le)=>{var ye=De,{problemset:ut,globalSetting:Cn,loading:Hn,dispatch:rn,editData:At}=ye,Ie=ni(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[un,bn]=(0,te.useState)(""),[Ln,On]=(0,te.useState)(""),[qn,Kt]=(0,te.useState)(""),[Bn,Wn]=(0,te.useState)([]),[Rn,Zt]=(0,te.useState)(""),[dn,Pn]=(0,te.useState)(),[Zn,jn]=(0,te.useState)(!1),[Nn,Mn]=(0,te.useState)([]),[$n,mn]=(0,te.useState)(!1),di=(0,Ke.useParams)();(0,te.useEffect)(()=>{var In;At.edit&&mn(!0),bn(At.shixun_name),On(At.question_title);const bt=[];(In=At.shixun)==null||In.map(Tt=>{bt.push(Tt.challenge_score)}),Mn(bt)},[At]),(0,te.useEffect)(()=>{jn(!1)},[$n]),(0,te.useImperativeHandle)(Le,()=>({onSave:Gn,isEdit:$n}));const Gn=()=>yi(void 0,null,function*(){let In=[];if(!1)return!1;let Tt;return At.question_id?Tt=yield(0,Ce.Kc)({id:At.question_id,question_title:Ln,shixun_name:un,shixun_id:At.shixun_id,question_type:5,question_scores:Nn}):Tt=yield(0,Ce.iV)({exercise_bank_id:di.topicId,question_title:Ln,shixun_name:un,shixun_id:At.shixun_id,question_type:5,question_scores:Nn}),Tt.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),mn(!1)),yield rn({type:"polls/getExerciseBanks",payload:Si({},di)}),{name:Ln,analysis:qn,standard_answers:In,is_ordered:dn}}),Yt=()=>{var In;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),te.createElement("div",{className:"mt10"},te.createElement(pe.default,{defaultValue:un,onChange:bt=>{bn(bt.target.value)}})),te.createElement("div",{className:"mt10"},te.createElement($e.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:Ln,onChange:bt=>{On(bt)}})),te.createElement("div",{className:"mt20"},(In=At.shixun)==null?void 0:In.map((bt,Tt)=>te.createElement(we.Z,{gutter:[20,20]},te.createElement(fe.Z,{flex:"1"},Tt+1,".",bt.challenge_name),te.createElement(fe.Z,null,te.createElement(Je.Z,{defaultValue:Nn[Tt],onChange:et=>{Nn[Tt]=et,Mn(Nn),console.log("srore:L",Nn[Tt])}}))))),te.createElement("div",{className:"mt20"},Bn.length>1&&te.createElement("span",null,te.createElement(Se.default,{checked:dn,onChange:bt=>Pn(bt.target.checked),className:`${Te.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),te.createElement("span",{className:`${Te.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),te.createElement("aside",{className:"tr"},!(At!=null&&At.edit)&&te.createElement(it.ZP,{type:"default",onClick:()=>mn(!1)},"\u53D6\u6D88"),te.createElement(it.ZP,{className:"ml20",type:"primary",onClick:()=>Gn()},"\u4FDD\u5B58")))},Xn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Un=In=>yi(void 0,null,function*(){switch(In.id){case"del":let bt;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return yi(this,null,function*(){yield(0,Ce.x$)({pollsId:At.question_id}),rn({type:"polls/getExerciseBanks",payload:Si({},di)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:At==null?void 0:At.question_id,opr:In.id}),rn({type:"polls/getExerciseBanks",payload:Si({},di)});break;case"edit":mn(!0);break}}),wi=()=>{var In;return te.createElement("aside",null,te.createElement("div",{className:Te.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},At.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",At.question_score,"\u5206\uFF09"),te.createElement("div",{className:"tr"},te.createElement(Ke.Link,{target:"_blank",to:`/shixuns/${At.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!At.hideAction&&Xn.map(function(bt,Tt){return bt.id==="up"&&At.key===1||bt.id==="down"&&At.key===At.len?null:te.createElement(Ye.Z,{key:Tt,placement:"bottom",title:bt.name},te.createElement("span",{onClick:()=>Un(bt),className:bt.icon}))}))),te.createElement("div",{className:"font16"},At.shixun_name),te.createElement("div",{className:"mt30"}),(In=At.shixun)==null?void 0:In.map(function(bt,Tt){return te.createElement("div",{key:Tt},"\u7B2C",Tt+1,"\u5173 ",te.createElement("span",{className:"ml10"},bt.challenge_name)," ",te.createElement("span",{className:"ml10"},bt.challenge_score))}))};return te.createElement("section",{className:Te.wrap},!$n&&wi(),$n&&Yt())};var Sn=(0,Ke.connect)(({problemset:De,loading:Le,globalSetting:ye})=>({problemset:De,globalSetting:ye,loading:Le.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(xn)),ti=he(30641),zi=he(13747),Vn={flex_box_center:"flex_box_center___hUmFx",flex_space_between:"flex_space_between___ZQWRF",flex_box_vertical_center:"flex_box_vertical_center___NvFWH",flex_box_center_end:"flex_box_center_end___VzfH9",flex_box_column:"flex_box_column___jzLHY",wrp:"wrp___tA5YW",drawer:"drawer___aMsAr",menu:"menu___EdF6h",actived:"actived___rUgO6",actived2:"actived2___ENpPA",listItem:"listItem___Ixzli",info:"info___KHkuz",title:"title___pDJPn",titleLeft:"titleLeft___UBBKz",titleRight:"titleRight___WrCz9",search:"search___AEwRm",description:"description___CYPQc",menuCourse:"menuCourse___gwZ0E"},vi=Object.defineProperty,Di=Object.getOwnPropertySymbols,Ei=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,ui=(De,Le,ye)=>Le in De?vi(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,Fi=(De,Le)=>{for(var ye in Le||(Le={}))Ei.call(Le,ye)&&ui(De,ye,Le[ye]);if(Di)for(var ye of Di(Le))ii.call(Le,ye)&&ui(De,ye,Le[ye]);return De},zt=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const{Search:at}=pe.default,vn=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],ri=({classroomList:De,loading:Le,dispatch:ye,callback:ut})=>{var Cn;const Hn=(0,Ke.useParams)(),rn=(0,Ke.useLocation)(),{actionTabs:At}=De,[Ie]=ve.default.useForm(),{shixunLists:un}=De,[bn,Ln]=(0,te.useState)([]),[On,qn]=(0,te.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1});return(0,te.useEffect)(()=>{ye({type:"classroomList/getShixunLists",payload:Fi({},On)})},[Hn.categoryId]),(0,te.useEffect)(()=>{Ln([])},[De.actionTabs.key]),De.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:te.createElement(ti.Z,{title:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",placement:"bottom",height:"100%",closable:!1,open:De.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",rootClassName:Vn.drawer,footer:te.createElement("div",{className:"tc"},te.createElement(it.ZP,{size:"middle",onClick:()=>{ye({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53D6\u6D88"),te.createElement(it.ZP,{size:"middle",onClick:()=>zt(void 0,null,function*(){var Kt;bn.length>1?me.ZP.error("\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B9E\u8DF5\u9879\u76EE"):bn.length===0?me.ZP.error("\u8BF7\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE"):(ut&&ut((Kt=un==null?void 0:un.shixun_list)==null?void 0:Kt.filter(Bn=>Bn.id===bn[0])[0]),ye({type:"classroomList/setActionTabs",payload:{key:""}}))}),type:"primary"},"\u786E\u5B9A"))},te.createElement("section",{className:"tc"},te.createElement(at,{placeholder:"\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",enterButton:"\u641C\u7D22",size:"middle",className:Vn.search,onSearch:Kt=>{On.keyword=Kt,ye({type:"classroomList/getShixunLists",payload:Fi({},On)})}})),te.createElement("section",{className:"edu-container"},vn.map(function(Kt,Bn){var Wn;return te.createElement("ul",{className:Vn.menu,key:Bn},te.createElement("li",null,Kt.name),(Wn=Kt==null?void 0:Kt.children)==null?void 0:Wn.map(function(Rn,Zt){return te.createElement("li",{key:Zt,className:On[Kt.id]==Rn.id?Vn.actived:"",onClick:()=>{On[Kt.id]=Rn.id,qn(Fi({},On)),ye({type:"classroomList/getShixunLists",payload:Fi({},On)})}},te.createElement("strong",null,Rn.name))}))}),(Cn=un==null?void 0:un.shixun_list)==null?void 0:Cn.map(function(Kt,Bn){return te.createElement("div",{className:Vn.listItem,key:Bn},te.createElement(Se.default,{checked:bn.includes(Kt.id),value:Kt.id,onChange:Wn=>{let Rn=bn.indexOf(Kt.id);bn.indexOf(Kt.id)>-1?Ln(bn.filter(Zt=>Zt!==Kt.id)):Ln(bn.concat(Kt.id))}}),te.createElement("div",{className:Vn.info},te.createElement("div",{className:Vn.title},te.createElement("div",{className:Vn.titleLeft},te.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:Kt.title}}))),te.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},te.createElement("span",{className:Vn.description,dangerouslySetInnerHTML:{__html:Kt.description}})),te.createElement("div",{className:" mt15"},Kt.challenge_names.map(function(Wn,Rn){return te.createElement("span",{key:Rn,className:"mr30"},"\u7B2C",Rn+1,"\u5173 ",Wn," ")})),te.createElement(Oe.Z,{dashed:!0}),te.createElement("div",{className:"c-light-black mt20"},te.createElement("span",null,Kt.author_name),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,Kt.author_school_name),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",Kt.level),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),te.createElement("span",null,Kt.study_count))))}),te.createElement("p",null)),te.createElement("div",{className:"tc"},te.createElement(zi.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:un==null?void 0:un.shixuns_count,onChange:Kt=>{On.page=Kt,Ln([]),ye({type:"classroomList/getShixunLists",payload:Fi({},On)})}})))};var ci=(0,Ke.connect)(({classroomList:De,loading:Le})=>({classroomList:De,loading:Le}))(ri),Ae={flex_box_center:"flex_box_center___SQWFF",flex_space_between:"flex_space_between___CnFKV",flex_box_vertical_center:"flex_box_vertical_center___pIPP9",flex_box_center_end:"flex_box_center_end___wiYA8",flex_box_column:"flex_box_column___elCPc",bg:"bg___EaPuT",containerTitle:"containerTitle___ixpkx",containerDesc:"containerDesc___r2R0u",listItem:"listItem___jvD98",info:"info___dCwGz",title:"title___UW6TT",titleLeft:"titleLeft___MquHc",titleRight:"titleRight___aWhE3",acitons:"acitons___yle7y"},Pe=Object.defineProperty,Lt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,yt=(De,Le,ye)=>Le in De?Pe(De,Le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Le]=ye,Xt=(De,Le)=>{for(var ye in Le||(Le={}))pt.call(Le,ye)&&yt(De,ye,Le[ye]);if(Lt)for(var ye of Lt(Le))Re.call(Le,ye)&&yt(De,ye,Le[ye]);return De},Wt=(De,Le)=>{var ye={};for(var ut in De)pt.call(De,ut)&&Le.indexOf(ut)<0&&(ye[ut]=De[ut]);if(De!=null&&Lt)for(var ut of Lt(De))Le.indexOf(ut)<0&&Re.call(De,ut)&&(ye[ut]=De[ut]);return ye},tn=(De,Le,ye)=>new Promise((ut,Cn)=>{var Hn=Ie=>{try{At(ye.next(Ie))}catch(un){Cn(un)}},rn=Ie=>{try{At(ye.throw(Ie))}catch(un){Cn(un)}},At=Ie=>Ie.done?ut(Ie.value):Promise.resolve(Ie.value).then(Hn,rn);At((ye=ye.apply(De,Le)).next())});const{SubMenu:We}=_e.default,{Content:en,Sider:St}=Xe.default,_n=De=>{var Le=De,{polls:ye,globalSetting:ut,loading:Cn,user:Hn,dispatch:rn}=Le,At=Wt(Le,["polls","globalSetting","loading","user","dispatch"]),Ie,un,bn,Ln,On,qn,Kt,Bn,Wn,Rn,Zt,dn,Pn,Zn,jn,Nn,Mn,$n,mn,di,Gn,Yt,Xn,Un,wi,In,bt,Tt,et,Ze,mt,Ft,gn,zn,oi,mi,fi,Pi,Ci,Hi,vr,Ji,ji,tr,Mi,rr,xr,Li,dr,or,Mr,hr,Fr,Ni,wr,Gr;const kr=(0,Ke.useParams)(),Po=(0,Ke.useLocation)(),{userInfo:Cr}=Hn,[Wi]=ve.default.useForm(),[mr,Vr]=(0,te.useState)([]),[_r,Vi]=(0,te.useState)(!1),ro=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],Nr=(0,te.useRef)();(0,te.useEffect)(()=>{var yn,si,Ti,Ir,ar,Qi;(yn=ye.exerciseBanks)!=null&&yn.exercise_questions&&(Vr([...(si=ye.exerciseBanks)==null?void 0:si.exercise_questions]),Wi.setFieldsValue({exercise_name:(Ir=(Ti=ye.exerciseBanks)==null?void 0:Ti.exercise)==null?void 0:Ir.exercise_name,exercise_description:(Qi=(ar=ye.exerciseBanks)==null?void 0:ar.exercise)==null?void 0:Qi.exercise_description}))},[ye.exerciseBanks]),(0,te.useEffect)(()=>{rn({type:"polls/getExerciseBanks",payload:Xt({},kr)})},[kr.categoryId]);const Yn=()=>tn(void 0,null,function*(){var yn,si;yield Wi.validateFields();const Ti=Wi.getFieldValue();Ti.is_md=!0,Ti.topicId=(si=(yn=ye.exerciseBanks)==null?void 0:yn.exercise)==null?void 0:si.id,Vi(!1),yield(0,Ce.hO)(Xt({},Ti)),rn({type:"polls/getExerciseBanks",payload:Xt({},kr)})}),ai=yn=>tn(void 0,null,function*(){const si=yield Nr==null?void 0:Nr.current;if(si!=null&&si.isEdit){me.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}yn===5?rn({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):Vr([...mr,{question_type:yn}])}),ei=function(){return mr==null?void 0:mr.map(function(yn,si){if(yn.key=si+1,yn.len=mr.length,yn.question_type===0)return te.createElement("aside",null,te.createElement(on,{ref:Nr,editData:yn}),te.createElement(Oe.Z,null));if(yn.question_type===1)return te.createElement("aside",null,te.createElement(Ut,{ref:Nr,editData:yn}),te.createElement(Oe.Z,null));if(yn.question_type===2)return te.createElement("aside",null,te.createElement(ie,{ref:Nr,editData:yn}),te.createElement(Oe.Z,null));if(yn.question_type===3)return te.createElement("aside",null,te.createElement(kn,{editData:yn}),te.createElement(Oe.Z,null));if(yn.question_type===4)return te.createElement("aside",null,te.createElement(_i,{editData:yn}),te.createElement(Oe.Z,null));if(yn.question_type===5)return te.createElement("aside",null,te.createElement(Sn,{editData:yn}),te.createElement(Oe.Z,null))})};return te.createElement("section",{className:"edu-container"},te.createElement("section",{className:"animated fadeIn"},te.createElement("aside",{className:"mt10"},Cr&&te.createElement(Ve.Z,{separator:">"},te.createElement(Ve.Z.Item,null,te.createElement(Ke.Link,{to:`/users/${Cr.login}/topics/personal`},"\u6211\u7684\u9898\u5E93")),te.createElement(Ve.Z.Item,null,te.createElement(Ke.Link,{to:`/users/${Cr==null?void 0:Cr.login}/topics/${kr.topicId}/${kr.topictype}/exercise/detail`},"\u8BE6\u60C5")),te.createElement(Ve.Z.Item,null,"\u7F16\u8F91"))),te.createElement("aside",{className:[Ae.title,"mt20"].join(" ")},te.createElement(we.Z,{style:{width:"100%"},align:"middle"},te.createElement(fe.Z,{flex:"1"},te.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u8BD5\u5377"),te.createElement(Ot.VV,{status:[(un=(Ie=ye.exerciseBanks)==null?void 0:Ie.exercise)!=null&&un.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),te.createElement(fe.Z,null,te.createElement(Ke.Link,{className:"font16 c-light-black",to:`/users/${Cr.login}/topics/personal`},"\u8FD4\u56DE"))))),te.createElement("section",{className:[Ae.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!_r&&te.createElement("aside",null,te.createElement("div",{className:Ae.containerDesc},te.createElement("div",null,(Ln=(bn=ye.exerciseBanks)==null?void 0:bn.exercise)==null?void 0:Ln.exercise_name),te.createElement("div",null,te.createElement(Ye.Z,{title:"\u7F16\u8F91"},te.createElement("span",{onClick:()=>Vi(!0),className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),te.createElement("div",{className:"c-light-black"},(qn=(On=ye.exerciseBanks)==null?void 0:On.exercise)==null?void 0:qn.exercise_description)),_r&&te.createElement(ve.default,{layout:"vertical",form:Wi},te.createElement(ve.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},te.createElement(pe.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),te.createElement(ve.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},te.createElement(pe.default.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),te.createElement(ve.default.Item,{className:"tr"},te.createElement(it.ZP,{type:"primary",onClick:()=>{Yn()}},"\u4FDD\u5B58")))),te.createElement("p",{className:"mt10",style:{display:"flex"}},te.createElement("span",{className:"fl",style:{flex:"1"}},!!((Bn=(Kt=ye.exerciseBanks)==null?void 0:Kt.exercise_types)!=null&&Bn.q_singles)&&te.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(Rn=(Wn=ye.exerciseBanks)==null?void 0:Wn.exercise_types)==null?void 0:Rn.q_singles,"\u9898\uFF0C\u5171",(dn=(Zt=ye.exerciseBanks)==null?void 0:Zt.exercise_types)==null?void 0:dn.q_singles_scores,"\u5206"),!!((Zn=(Pn=ye.exerciseBanks)==null?void 0:Pn.exercise_types)!=null&&Zn.q_doubles)&&te.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(Nn=(jn=ye.exerciseBanks)==null?void 0:jn.exercise_types)==null?void 0:Nn.q_doubles,"\u9898\uFF0C\u5171",($n=(Mn=ye.exerciseBanks)==null?void 0:Mn.exercise_types)==null?void 0:$n.q_doubles_scores,"\u5206"),!!((di=(mn=ye.exerciseBanks)==null?void 0:mn.exercise_types)!=null&&di.q_judges)&&te.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(Yt=(Gn=ye.exerciseBanks)==null?void 0:Gn.exercise_types)==null?void 0:Yt.q_judges,"\u9898\uFF0C\u5171",(Un=(Xn=ye.exerciseBanks)==null?void 0:Xn.exercise_types)==null?void 0:Un.q_judges_scores,"\u5206"),!!((In=(wi=ye.exerciseBanks)==null?void 0:wi.exercise_types)!=null&&In.q_nulls)&&te.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(Tt=(bt=ye.exerciseBanks)==null?void 0:bt.exercise_types)==null?void 0:Tt.q_nulls,"\u9898\uFF0C\u5171",(Ze=(et=ye.exerciseBanks)==null?void 0:et.exercise_types)==null?void 0:Ze.q_nulls_scores,"\u5206"),!!((Ft=(mt=ye.exerciseBanks)==null?void 0:mt.exercise_types)!=null&&Ft.q_mains)&&te.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(zn=(gn=ye.exerciseBanks)==null?void 0:gn.exercise_types)==null?void 0:zn.q_mains,"\u9898\uFF0C\u5171",(mi=(oi=ye.exerciseBanks)==null?void 0:oi.exercise_types)==null?void 0:mi.q_mains_scores,"\u5206"),!!((Pi=(fi=ye.exerciseBanks)==null?void 0:fi.exercise_types)!=null&&Pi.q_shixuns)&&te.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(Hi=(Ci=ye.exerciseBanks)==null?void 0:Ci.exercise_types)==null?void 0:Hi.q_shixuns,"\u9898\uFF0C\u5171",(Ji=(vr=ye.exerciseBanks)==null?void 0:vr.exercise_types)==null?void 0:Ji.q_shixuns_scores,"\u5206"),!!((tr=(ji=ye.exerciseBanks)==null?void 0:ji.exercise_types)!=null&&tr.q_pros)&&te.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(rr=(Mi=ye.exerciseBanks)==null?void 0:Mi.exercise_types)==null?void 0:rr.q_pros,"\u9898\uFF0C\u5171",(Li=(xr=ye.exerciseBanks)==null?void 0:xr.exercise_types)==null?void 0:Li.q_pros_scores,"\u5206")),te.createElement("span",{className:"fr"},!!((or=(dr=ye.exerciseBanks)==null?void 0:dr.exercise_types)!=null&&or.q_counts)&&te.createElement("span",null,"\u5408\u8BA1 ",te.createElement("span",{className:"color-blue"},(hr=(Mr=ye.exerciseBanks)==null?void 0:Mr.exercise_types)==null?void 0:hr.q_counts)," \u9898\uFF0C \u5171 ",te.createElement("span",{className:`${((Ni=(Fr=ye.exerciseBanks)==null?void 0:Fr.exercise_types)==null?void 0:Ni.q_scores)>100?"color-red font-bd":"color-orange"}`},(Gr=(wr=ye.exerciseBanks)==null?void 0:wr.exercise_types)==null?void 0:Gr.q_scores)," \u5206"))),mr!=""&&te.createElement("section",{className:[Ae.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},ei()),te.createElement("section",{style:{display:"flex"},className:[Ae.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},te.createElement("div",{style:{flex:"1"}},ro.map(function(yn,si){return te.createElement(it.ZP,{className:"mr20",type:"primary",onClick:()=>ai(yn.id)},te.createElement(He.Z,{className:"mr5"}),yn.name)}))),te.createElement(ci,{callback:yn=>{mr.push({shixun:yn.challenge_names.map(si=>({challenge_name:si,challenge_score:5})),shixun_name:yn.title,shixun_id:yn.id,question_type:5,edit:!0}),Vr([...mr])}}))};var Jt=(0,Ke.connect)(({polls:De,loading:Le,user:ye,globalSetting:ut})=>({polls:De,globalSetting:ut,user:ye,loading:Le.effects}))(_n)},90290:function(It,Ht,he){"use strict";he.d(Ht,{AL:function(){return tt},Iy:function(){return Ye},Qv:function(){return He},ez:function(){return $e},jb:function(){return pe}});var te=he(32834),Ke=he.n(te),_e=he(11690),Xe=he.n(_e);let ve=1;function me(Be,Ge){const nt=Be.match(/^(\s+)(?:```)/);if(nt===null)return Ge;const Me=nt[1];return Ge.split(`
`).map(Qe=>{const Fe=Qe.match(/^\s+/);if(Fe===null)return Qe;const[ot]=Fe;return ot.length>=Me.length?Qe.slice(Me.length):Qe}).join(`
`)}let Oe=[],Ve=["<ul>"];const we=new(Ke()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ye(){Oe.length=0,Ve=["<ul>"]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function it(Be,Ge,nt,Me){if(Ge>=Be.length||Be[Ge].level<=nt)return Ge;var Qe=Be[Ge];Me.push("<li><a href='#"+ve+Qe.anchor+"'>"+Qe.text+"</a>"),Ge++;var Fe=[];return Ge=it(Be,Ge,Qe.level,Fe),Fe.length>0&&(Me.push("<ul>"),Fe.forEach(function(ot){Me.push(ot)}),Me.push("</ul>")),Me.push("</li>"),Ge=it(Be,Ge,nt,Me),Ge}function He(){return it(Oe,0,0,Ve),Ve.push("</ul>"),Ve.join("")}const Ce={heading(Be){const Ge=fe.exec(Be);if(ve+=1,Ge)return{type:"heading",raw:Ge[0],depth:Ge[1].length,text:Ge[2]}},fences(Be){const Ge=this.rules.block.fences.exec(Be);if(Ge){const nt=Ge[0];let Me=me(nt,Ge[3]||"");const Qe=Ge[2]?Ge[2].trim():Ge[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Fe=Je(),ot=Me;Me=Fe,lt[Fe]={type:"block",expression:ot}}return{type:"code",raw:nt,lang:Qe,text:Me}}}},Ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Se=0;const Je=()=>`__special_katext_id_${Se++}__`;let lt={};function $e(){return lt}function tt(){Se=0,lt={}}function Te(Be){return Be=Be.replace(Ee,(Ge,nt)=>{const Me=Je();return lt[Me]={type:"inline",expression:nt},Me}),Be}const dt=we.listitem;we.listitem=function(Be){return dt(Te(Be))};const ht=we.paragraph;we.paragraph=function(Be){return ht(Te(Be))};const Vt=we.tablecell;we.tablecell=function(Be,Ge){return Vt(Te(Be),Ge)},we.code=function(Be,Ge,nt){const Me=(Ge||"").match(/\S*/)[0];return Me?["latex","katex","math"].indexOf(Me)>=0?`<p class='editormd-tex'>${Be}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ge}">${nt?Be:(0,_e.escape)(Be,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(nt?Be:(0,_e.escape)(Be,!0))+"</code></pre>"},we.heading=function(Be,Ge,nt){let Me=this.options.headerPrefix+nt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Oe.push({anchor:Me,level:Ge,text:Be}),"<h"+Ge+' id="'+ve+Me+'">'+Be+"</h"+Ge+">"},Ke().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ke().use({tokenizer:Ce,renderer:we}),Ht.ZP=Ke()},99498:function(It,Ht,he){(function(te){te(he(89780))})(function(te){te.defineOption("placeholder","",function(Ve,we,fe){var Ye=fe&&fe!=te.Init;if(we&&!Ye)Ve.on("blur",ve),Ve.on("change",me),Ve.on("swapDoc",me),te.on(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose=function(){Xe(Ve)}),me(Ve);else if(!we&&Ye){Ve.off("blur",ve),Ve.off("change",me),Ve.off("swapDoc",me),te.off(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose),Ke(Ve);var pe=Ve.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}we&&!Ve.hasFocus()&&ve(Ve)});function Ke(Ve){Ve.state.placeholder&&(Ve.state.placeholder.parentNode.removeChild(Ve.state.placeholder),Ve.state.placeholder=null)}function _e(Ve){Ke(Ve);var we=Ve.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ve.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ve.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),we.appendChild(fe),Ve.display.lineSpace.insertBefore(we,Ve.display.lineSpace.firstChild)}function Xe(Ve){setTimeout(function(){var we=!1,fe=Ve.getInputField();fe.nodeName=="TEXTAREA"?we=!fe.value:Ve.lineCount()==1&&(we=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),we?_e(Ve):Ke(Ve)},20)}function ve(Ve){Oe(Ve)&&_e(Ve)}function me(Ve){var we=Ve.getWrapperElement(),fe=Oe(Ve);we.className=we.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?_e(Ve):Ke(Ve)}function Oe(Ve){return Ve.lineCount()===1&&Ve.getLine(0)===""}})},25717:function(It,Ht,he){(function(te){te(he(89780))})(function(te){var Ke={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_e=te.Pos;te.defineOption("autoCloseBrackets",!1,function(Ce,Ee,Se){Se&&Se!=te.Init&&(Ce.removeKeyMap(ve),Ce.state.closeBrackets=null),Ee&&(me(Xe(Ee,"pairs")),Ce.state.closeBrackets=Ee,Ce.addKeyMap(ve))});function Xe(Ce,Ee){return Ee=="pairs"&&typeof Ce=="string"?Ce:typeof Ce=="object"&&Ce[Ee]!=null?Ce[Ee]:Ke[Ee]}var ve={Backspace:we,Enter:fe};function me(Ce){for(var Ee=0;Ee<Ce.length;Ee++){var Se=Ce.charAt(Ee),Je="'"+Se+"'";ve[Je]||(ve[Je]=Oe(Se))}}me(Ke.pairs+"`");function Oe(Ce){return function(Ee){return pe(Ee,Ce)}}function Ve(Ce){var Ee=Ce.state.closeBrackets;if(!Ee||Ee.override)return Ee;var Se=Ce.getModeAt(Ce.getCursor());return Se.closeBrackets||Ee}function we(Ce){var Ee=Ve(Ce);if(!Ee||Ce.getOption("disableInput"))return te.Pass;for(var Se=Xe(Ee,"pairs"),Je=Ce.listSelections(),lt=0;lt<Je.length;lt++){if(!Je[lt].empty())return te.Pass;var $e=it(Ce,Je[lt].head);if(!$e||Se.indexOf($e)%2!=0)return te.Pass}for(var lt=Je.length-1;lt>=0;lt--){var tt=Je[lt].head;Ce.replaceRange("",_e(tt.line,tt.ch-1),_e(tt.line,tt.ch+1),"+delete")}}function fe(Ce){var Ee=Ve(Ce),Se=Ee&&Xe(Ee,"explode");if(!Se||Ce.getOption("disableInput"))return te.Pass;for(var Je=Ce.listSelections(),lt=0;lt<Je.length;lt++){if(!Je[lt].empty())return te.Pass;var $e=it(Ce,Je[lt].head);if(!$e||Se.indexOf($e)%2!=0)return te.Pass}Ce.operation(function(){var tt=Ce.lineSeparator()||`
`;Ce.replaceSelection(tt+tt,null),Ce.execCommand("goCharLeft"),Je=Ce.listSelections();for(var Te=0;Te<Je.length;Te++){var dt=Je[Te].head.line;Ce.indentLine(dt,null,!0),Ce.indentLine(dt+1,null,!0)}})}function Ye(Ce){var Ee=te.cmpPos(Ce.anchor,Ce.head)>0;return{anchor:new _e(Ce.anchor.line,Ce.anchor.ch+(Ee?-1:1)),head:new _e(Ce.head.line,Ce.head.ch+(Ee?1:-1))}}function pe(Ce,Ee){var Se=Ve(Ce);if(!Se||Ce.getOption("disableInput"))return te.Pass;var Je=Xe(Se,"pairs"),lt=Je.indexOf(Ee);if(lt==-1)return te.Pass;for(var $e=Xe(Se,"closeBefore"),tt=Xe(Se,"triples"),Te=Je.charAt(lt+1)==Ee,dt=Ce.listSelections(),ht=lt%2==0,Vt,Be=0;Be<dt.length;Be++){var Ge=dt[Be],nt=Ge.head,Me,Qe=Ce.getRange(nt,_e(nt.line,nt.ch+1));if(ht&&!Ge.empty())Me="surround";else if((Te||!ht)&&Qe==Ee)Te&&He(Ce,nt)?Me="both":tt.indexOf(Ee)>=0&&Ce.getRange(nt,_e(nt.line,nt.ch+3))==Ee+Ee+Ee?Me="skipThree":Me="skip";else if(Te&&nt.ch>1&&tt.indexOf(Ee)>=0&&Ce.getRange(_e(nt.line,nt.ch-2),nt)==Ee+Ee){if(nt.ch>2&&/\bstring/.test(Ce.getTokenTypeAt(_e(nt.line,nt.ch-2))))return te.Pass;Me="addFour"}else if(Te){var Fe=nt.ch==0?" ":Ce.getRange(_e(nt.line,nt.ch-1),nt);if(!te.isWordChar(Qe)&&Fe!=Ee&&!te.isWordChar(Fe))Me="both";else return te.Pass}else if(ht&&(Qe.length===0||/\s/.test(Qe)||$e.indexOf(Qe)>-1))Me="both";else return te.Pass;if(!Vt)Vt=Me;else if(Vt!=Me)return te.Pass}var ot=lt%2?Je.charAt(lt-1):Ee,Ut=lt%2?Ee:Je.charAt(lt+1);Ce.operation(function(){if(Vt=="skip")Ce.execCommand("goCharRight");else if(Vt=="skipThree")for(var Et=0;Et<3;Et++)Ce.execCommand("goCharRight");else if(Vt=="surround"){for(var hn=Ce.getSelections(),Et=0;Et<hn.length;Et++)hn[Et]=ot+hn[Et]+Ut;Ce.replaceSelections(hn,"around"),hn=Ce.listSelections().slice();for(var Et=0;Et<hn.length;Et++)hn[Et]=Ye(hn[Et]);Ce.setSelections(hn)}else Vt=="both"?(Ce.replaceSelection(ot+Ut,null),Ce.triggerElectric(ot+Ut),Ce.execCommand("goCharLeft")):Vt=="addFour"&&(Ce.replaceSelection(ot+ot+ot+ot,"before"),Ce.execCommand("goCharRight"))})}function it(Ce,Ee){var Se=Ce.getRange(_e(Ee.line,Ee.ch-1),_e(Ee.line,Ee.ch+1));return Se.length==2?Se:null}function He(Ce,Ee){var Se=Ce.getTokenAt(_e(Ee.line,Ee.ch+1));return/\bstring/.test(Se.type)&&Se.start==Ee.ch&&(Ee.ch==0||!/\bstring/.test(Ce.getTokenTypeAt(Ee)))}})},6313:function(It,Ht,he){(function(te){te(he(89780),he(32855))})(function(te){te.defineOption("autoCloseTags",!1,function(we,fe,Ye){if(Ye!=te.Init&&Ye&&we.removeKeyMap("autoCloseTags"),!!fe){var pe={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(pe["'/'"]=function(it){return me(it)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(pe["'>'"]=function(it){return Xe(it)}),we.addKeyMap(pe)}});var Ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_e=["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 Xe(we){if(we.getOption("disableInput"))return te.Pass;for(var fe=we.listSelections(),Ye=[],pe=we.getOption("autoCloseTags"),it=0;it<fe.length;it++){if(!fe[it].empty())return te.Pass;var He=fe[it].head,Ce=we.getTokenAt(He),Ee=te.innerMode(we.getMode(),Ce.state),Se=Ee.state,Je=Ee.mode.xmlCurrentTag&&Ee.mode.xmlCurrentTag(Se),lt=Je&&Je.name;if(!lt)return te.Pass;var $e=Ee.mode.configuration=="html",tt=typeof pe=="object"&&pe.dontCloseTags||$e&&Ke,Te=typeof pe=="object"&&pe.indentTags||$e&&_e;Ce.end>He.ch&&(lt=lt.slice(0,lt.length-Ce.end+He.ch));var dt=lt.toLowerCase();if(!lt||Ce.type=="string"&&(Ce.end!=He.ch||!/[\"\']/.test(Ce.string.charAt(Ce.string.length-1))||Ce.string.length==1)||Ce.type=="tag"&&Je.close||Ce.string.indexOf("/")==He.ch-Ce.start-1||tt&&Oe(tt,dt)>-1||Ve(we,Ee.mode.xmlCurrentContext&&Ee.mode.xmlCurrentContext(Se)||[],lt,He,!0))return te.Pass;var ht=typeof pe=="object"&&pe.emptyTags;if(ht&&Oe(ht,lt)>-1){Ye[it]={text:"/>",newPos:te.Pos(He.line,He.ch+2)};continue}var Vt=Te&&Oe(Te,dt)>-1;Ye[it]={indent:Vt,text:">"+(Vt?`
`:"")+"</"+lt+">",newPos:Vt?te.Pos(He.line+1,0):te.Pos(He.line,He.ch+1)}}for(var Be=typeof pe=="object"&&pe.dontIndentOnAutoClose,it=fe.length-1;it>=0;it--){var Ge=Ye[it];we.replaceRange(Ge.text,fe[it].head,fe[it].anchor,"+insert");var nt=we.listSelections().slice(0);nt[it]={head:Ge.newPos,anchor:Ge.newPos},we.setSelections(nt),!Be&&Ge.indent&&(we.indentLine(Ge.newPos.line,null,!0),we.indentLine(Ge.newPos.line+1,null,!0))}}function ve(we,fe){for(var Ye=we.listSelections(),pe=[],it=fe?"/":"</",He=we.getOption("autoCloseTags"),Ce=typeof He=="object"&&He.dontIndentOnSlash,Ee=0;Ee<Ye.length;Ee++){if(!Ye[Ee].empty())return te.Pass;var Se=Ye[Ee].head,Je=we.getTokenAt(Se),lt=te.innerMode(we.getMode(),Je.state),$e=lt.state;if(fe&&(Je.type=="string"||Je.string.charAt(0)!="<"||Je.start!=Se.ch-1))return te.Pass;var tt,Te=lt.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Te&&lt.mode.name=="javascript")tt=it+"script";else if(Te&&lt.mode.name=="css")tt=it+"style";else{var dt=lt.mode.xmlCurrentContext&&lt.mode.xmlCurrentContext($e);if(!dt||dt.length&&Ve(we,dt,dt[dt.length-1],Se))return te.Pass;tt=it+dt[dt.length-1]}we.getLine(Se.line).charAt(Je.end)!=">"&&(tt+=">"),pe[Ee]=tt}if(we.replaceSelections(pe),Ye=we.listSelections(),!Ce)for(var Ee=0;Ee<Ye.length;Ee++)(Ee==Ye.length-1||Ye[Ee].head.line<Ye[Ee+1].head.line)&&we.indentLine(Ye[Ee].head.line)}function me(we){return we.getOption("disableInput")?te.Pass:ve(we,!0)}te.commands.closeTag=function(we){return ve(we)};function Oe(we,fe){if(we.indexOf)return we.indexOf(fe);for(var Ye=0,pe=we.length;Ye<pe;++Ye)if(we[Ye]==fe)return Ye;return-1}function Ve(we,fe,Ye,pe,it){if(!te.scanForClosingTag)return!1;var He=Math.min(we.lastLine()+1,pe.line+500),Ce=te.scanForClosingTag(we,pe,null,He);if(!Ce||Ce.tag!=Ye)return!1;for(var Ee=it?1:0,Se=fe.length-1;Se>=0&&fe[Se]==Ye;Se--)++Ee;pe=Ce.to;for(var Se=1;Se<Ee;Se++){var Je=te.scanForClosingTag(we,pe,null,He);if(!Je||Je.tag!=Ye)return!1;pe=Je.to}return!0}})},32855:function(It,Ht,he){(function(te){te(he(89780))})(function(te){"use strict";var Ke=te.Pos;function _e(Se,Je){return Se.line-Je.line||Se.ch-Je.ch}var Xe="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",ve=Xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",me=new RegExp("<(/?)(["+Xe+"]["+ve+"]*)","g");function Oe(Se,Je,lt,$e){this.line=Je,this.ch=lt,this.cm=Se,this.text=Se.getLine(Je),this.min=$e?Math.max($e.from,Se.firstLine()):Se.firstLine(),this.max=$e?Math.min($e.to-1,Se.lastLine()):Se.lastLine()}function Ve(Se,Je){var lt=Se.cm.getTokenTypeAt(Ke(Se.line,Je));return lt&&/\btag\b/.test(lt)}function we(Se){if(!(Se.line>=Se.max))return Se.ch=0,Se.text=Se.cm.getLine(++Se.line),!0}function fe(Se){if(!(Se.line<=Se.min))return Se.text=Se.cm.getLine(--Se.line),Se.ch=Se.text.length,!0}function Ye(Se){for(;;){var Je=Se.text.indexOf(">",Se.ch);if(Je==-1){if(we(Se))continue;return}if(!Ve(Se,Je+1)){Se.ch=Je+1;continue}var lt=Se.text.lastIndexOf("/",Je),$e=lt>-1&&!/\S/.test(Se.text.slice(lt+1,Je));return Se.ch=Je+1,$e?"selfClose":"regular"}}function pe(Se){for(;;){var Je=Se.ch?Se.text.lastIndexOf("<",Se.ch-1):-1;if(Je==-1){if(fe(Se))continue;return}if(!Ve(Se,Je+1)){Se.ch=Je;continue}me.lastIndex=Je,Se.ch=Je;var lt=me.exec(Se.text);if(lt&&lt.index==Je)return lt}}function it(Se){for(;;){me.lastIndex=Se.ch;var Je=me.exec(Se.text);if(!Je){if(we(Se))continue;return}if(!Ve(Se,Je.index+1)){Se.ch=Je.index+1;continue}return Se.ch=Je.index+Je[0].length,Je}}function He(Se){for(;;){var Je=Se.ch?Se.text.lastIndexOf(">",Se.ch-1):-1;if(Je==-1){if(fe(Se))continue;return}if(!Ve(Se,Je+1)){Se.ch=Je;continue}var lt=Se.text.lastIndexOf("/",Je),$e=lt>-1&&!/\S/.test(Se.text.slice(lt+1,Je));return Se.ch=Je+1,$e?"selfClose":"regular"}}function Ce(Se,Je){for(var lt=[];;){var $e=it(Se),tt,Te=Se.line,dt=Se.ch-($e?$e[0].length:0);if(!$e||!(tt=Ye(Se)))return;if(tt!="selfClose")if($e[1]){for(var ht=lt.length-1;ht>=0;--ht)if(lt[ht]==$e[2]){lt.length=ht;break}if(ht<0&&(!Je||Je==$e[2]))return{tag:$e[2],from:Ke(Te,dt),to:Ke(Se.line,Se.ch)}}else lt.push($e[2])}}function Ee(Se,Je){for(var lt=[];;){var $e=He(Se);if(!$e)return;if($e=="selfClose"){pe(Se);continue}var tt=Se.line,Te=Se.ch,dt=pe(Se);if(!dt)return;if(dt[1])lt.push(dt[2]);else{for(var ht=lt.length-1;ht>=0;--ht)if(lt[ht]==dt[2]){lt.length=ht;break}if(ht<0&&(!Je||Je==dt[2]))return{tag:dt[2],from:Ke(Se.line,Se.ch),to:Ke(tt,Te)}}}}te.registerHelper("fold","xml",function(Se,Je){for(var lt=new Oe(Se,Je.line,0);;){var $e=it(lt);if(!$e||lt.line!=Je.line)return;var tt=Ye(lt);if(!tt)return;if(!$e[1]&&tt!="selfClose"){var Te=Ke(lt.line,lt.ch),dt=Ce(lt,$e[2]);return dt&&_e(dt.from,Te)>0?{from:Te,to:dt.from}:null}}}),te.findMatchingTag=function(Se,Je,lt){var $e=new Oe(Se,Je.line,Je.ch,lt);if(!($e.text.indexOf(">")==-1&&$e.text.indexOf("<")==-1)){var tt=Ye($e),Te=tt&&Ke($e.line,$e.ch),dt=tt&&pe($e);if(!(!tt||!dt||_e($e,Je)>0)){var ht={from:Ke($e.line,$e.ch),to:Te,tag:dt[2]};return tt=="selfClose"?{open:ht,close:null,at:"open"}:dt[1]?{open:Ee($e,dt[2]),close:ht,at:"close"}:($e=new Oe(Se,Te.line,Te.ch,lt),{open:ht,close:Ce($e,dt[2]),at:"open"})}}},te.findEnclosingTag=function(Se,Je,lt,$e){for(var tt=new Oe(Se,Je.line,Je.ch,lt);;){var Te=Ee(tt,$e);if(!Te)break;var dt=new Oe(Se,Je.line,Je.ch,lt),ht=Ce(dt,Te.tag);if(ht)return{open:Te,close:ht}}},te.scanForClosingTag=function(Se,Je,lt,$e){var tt=new Oe(Se,Je.line,Je.ch,$e?{from:0,to:$e}:null);return Ce(tt,lt)}})},89780:function(It){(function(Ht,he){It.exports=he()})(this,function(){"use strict";var Ht=navigator.userAgent,he=navigator.platform,te=/gecko\/\d/i.test(Ht),Ke=/MSIE \d/.test(Ht),_e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht),Xe=/Edge\/(\d+)/.exec(Ht),ve=Ke||_e||Xe,me=ve&&(Ke?document.documentMode||6:+(Xe||_e)[1]),Oe=!Xe&&/WebKit\//.test(Ht),Ve=Oe&&/Qt\/\d+\.\d+/.test(Ht),we=!Xe&&/Chrome\//.test(Ht),fe=/Opera\//.test(Ht),Ye=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ht),it=/PhantomJS/.test(Ht),He=!Xe&&/AppleWebKit/.test(Ht)&&/Mobile\/\w+/.test(Ht),Ce=/Android/.test(Ht),Ee=He||Ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ht),Se=He||/Mac/.test(he),Je=/\bCrOS\b/.test(Ht),lt=/win/i.test(he),$e=fe&&Ht.match(/Version\/(\d*\.\d*)/);$e&&($e=Number($e[1])),$e&&$e>=15&&(fe=!1,Oe=!0);var tt=Se&&(Ve||fe&&($e==null||$e<12.11)),Te=te||ve&&me>=9;function dt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ht=function(a,y){var x=a.className,b=dt(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 Vt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Be(a,y){return Vt(a).appendChild(y)}function Ge(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 nt(a,y,x,b){var E=Ge(a,y,x,b);return E.setAttribute("role","presentation"),E}var Me;document.createRange?Me=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Me=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 Qe(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 Fe(){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 ot(a,y){var x=a.className;dt(y).test(x)||(a.className+=(x?" ":"")+y)}function Ut(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!dt(x[b]).test(y)&&(y+=" "+x[b]);return y}var Et=function(a){a.select()};He?Et=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:ve&&(Et=function(a){try{a.select()}catch(y){}});function hn(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Mt(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 ge(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 le=a.indexOf(" ",ee);if(le<0||le>=y)return re+(y-ee);re+=le-ee,re+=x-re%x,ee=le+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=hn(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 ft(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var qt=50,xt={toString:function(){return"CodeMirror.Pass"}},Ne={scroll:!1},rt={origin:"*mouse"},ct={origin:"+move"};function on(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 vt=[""];function Pt(a){for(;vt.length<=a;)vt.push(ze(vt)+" ");return vt[a]}function ze(a){return a[a.length-1]}function wt(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 ne(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&Mt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(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&&oe(a)?!0:y.test(a):oe(a)}function ie(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var xe=/[\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 Ue(a){return a.charCodeAt(0)>=768&&xe.test(a)}function Ot(a,y,x){for(;(x<0?y>0:y<a.length)&&Ue(a.charAt(y));)y+=x;return y}function Dt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function gt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var re=a[ee];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var kt=null;function $t(a,y,x){var b;kt=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:kt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:kt=E)}return b!=null?b:kt}var Gt=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]/,le=/[1n]/;function ue(ce,be,ke){this.level=ce,this.from=be,this.to=ke}return function(ce,be){var ke=be=="ltr"?"L":"R";if(ce.length==0||be=="ltr"&&!b.test(ce))return!1;for(var qe=ce.length,je=[],Ct=0;Ct<qe;++Ct)je.push(x(ce.charCodeAt(Ct)));for(var Nt=0,Qt=ke;Nt<qe;++Nt){var fn=je[Nt];fn=="m"?je[Nt]=Qt:Qt=fn}for(var Dn=0,pn=ke;Dn<qe;++Dn){var Tn=je[Dn];Tn=="1"&&pn=="r"?je[Dn]="n":ee.test(Tn)&&(pn=Tn,Tn=="r"&&(je[Dn]="R"))}for(var Qn=1,Kn=je[0];Qn<qe-1;++Qn){var gi=je[Qn];gi=="+"&&Kn=="1"&&je[Qn+1]=="1"?je[Qn]="1":gi==","&&Kn==je[Qn+1]&&(Kn=="1"||Kn=="n")&&(je[Qn]=Kn),Kn=gi}for(var Zi=0;Zi<qe;++Zi){var ur=je[Zi];if(ur==",")je[Zi]="N";else if(ur=="%"){var Ui=void 0;for(Ui=Zi+1;Ui<qe&&je[Ui]=="%";++Ui);for(var Wr=Zi&&je[Zi-1]=="!"||Ui<qe&&je[Ui]=="1"?"1":"N",Pr=Zi;Pr<Ui;++Pr)je[Pr]=Wr;Zi=Ui-1}}for(var $i=0,Lr=ke;$i<qe;++$i){var pr=je[$i];Lr=="L"&&pr=="1"?je[$i]="L":ee.test(pr)&&(Lr=pr)}for(var ir=0;ir<qe;++ir)if(E.test(je[ir])){var er=void 0;for(er=ir+1;er<qe&&E.test(je[er]);++er);for(var Ki=(ir?je[ir-1]:ke)=="L",Tr=(er<qe?je[er]:ke)=="L",Vo=Ki==Tr?Ki?"L":"R":ke,bo=ir;bo<er;++bo)je[bo]=Vo;ir=er-1}for(var br=[],io,cr=0;cr<qe;)if(re.test(je[cr])){var bl=cr;for(++cr;cr<qe&&re.test(je[cr]);++cr);br.push(new ue(0,bl,cr))}else{var so=cr,Bo=br.length,Do=be=="rtl"?1:0;for(++cr;cr<qe&&je[cr]!="L";++cr);for(var Er=so;Er<cr;)if(le.test(je[Er])){so<Er&&(br.splice(Bo,0,new ue(1,so,Er)),Bo+=Do);var Uo=Er;for(++Er;Er<cr&&le.test(je[Er]);++Er);br.splice(Bo,0,new ue(2,Uo,Er)),Bo+=Do,so=Er}else++Er;so<cr&&br.splice(Bo,0,new ue(1,so,cr))}return be=="ltr"&&(br[0].level==1&&(io=ce.match(/^\s+/))&&(br[0].from=io[0].length,br.unshift(new ue(0,0,io[0].length))),ze(br).level==1&&(io=ce.match(/\s+$/))&&(ze(br).to-=io[0].length,br.push(new ue(0,qe-io[0].length,qe)))),be=="rtl"?br.reverse():br}}();function nn(a,y){var x=a.order;return x==null&&(x=a.order=Gt(a.text,y)),x}var an=[],_t=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||an).concat(x)}};function En(a,y){return a._handlers&&a._handlers[y]||an}function ln(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=ft(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function kn(a,y){var x=En(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 st(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),kn(a,x||y.type,a,y),jt(y)||y.codemirrorIgnore}function An(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)ft(x,y[b])==-1&&x.push(y[b])}function Rt(a,y){return En(a,y).length>0}function sn(a){a.prototype.on=function(y,x){_t(this,y,x)},a.prototype.off=function(y,x){ln(this,y,x)}}function wn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Jn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function jt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Fn(a){wn(a),Jn(a)}function xi(a){return a.target||a.srcElement}function hi(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Se&&a.ctrlKey&&y==1&&(y=3),y}var _i=function(){if(ve&&me<9)return!1;var a=Ge("div");return"draggable"in a||"dragDrop"in a}(),Ri;function Ai(a){if(Ri==null){var y=Ge("span","\u200B");Be(a,Ge("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Ri=y.offsetWidth<=1&&y.offsetHeight>2&&!(ve&&me<8))}var x=Ri?Ge("span","\u200B"):Ge("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Bi;function li(a){if(Bi!=null)return Bi;var y=Be(a,document.createTextNode("A\u062EA")),x=Me(y,0,1).getBoundingClientRect(),b=Me(y,1,2).getBoundingClientRect();return Vt(a),!x||x.left==x.right?!1:Bi=b.right-x.right<3}var bi=`
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/)},Si=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},ni=function(){var a=Ge("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),yi=null;function cn(a){if(yi!=null)return yi;var y=Be(a,Ge("span","x")),x=y.getBoundingClientRect(),b=Me(y,0,1).getBoundingClientRect();return yi=Math.abs(x.left-b.left)>1}var xn={},Sn={};function ti(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xn[a]=y}function zi(a,y){Sn[a]=y}function Vn(a){if(typeof a=="string"&&Sn.hasOwnProperty(a))a=Sn[a];else if(a&&typeof a.name=="string"&&Sn.hasOwnProperty(a.name)){var y=Sn[a.name];typeof y=="string"&&(y={name:y}),a=ne(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Vn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Vn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function vi(a,y){y=Vn(y);var x=xn[y.name];if(!x)return vi(a,"text/plain");var b=x(a,y);if(Di.hasOwnProperty(y.name)){var E=Di[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 Di={};function Ei(a,y){var x=Di.hasOwnProperty(a)?Di[a]:Di[a]={};Mt(y,x)}function ii(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 ui(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 Fi(a,y,x){return a.startState?a.startState(y,x):!0}var zt=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};zt.prototype.eol=function(){return this.pos>=this.string.length},zt.prototype.sol=function(){return this.pos==this.lineStart},zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},zt.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},zt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},zt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},zt.prototype.skipToEnd=function(){this.pos=this.string.length},zt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},zt.prototype.backUp=function(a){this.pos-=a},zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},zt.prototype.indentation=function(){return ge(this.string,null,this.tabSize)-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},zt.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)}},zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},zt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},zt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},zt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function at(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 vn(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 ri(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function ci(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ae(a){if(a.parent==null)return null;for(var y=a.parent,x=ft(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 Pe(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 le=a.lines[re],ue=le.height;if(y<ue)break;y-=ue}return x+re}function Lt(a,y){return y>=a.first&&y<a.first+a.size}function pt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Re(a,y,x){if(x===void 0&&(x=null),!(this instanceof Re))return new Re(a,y,x);this.line=a,this.ch=y,this.sticky=x}function yt(a,y){return a.line-y.line||a.ch-y.ch}function Xt(a,y){return a.sticky==y.sticky&&yt(a,y)==0}function Wt(a){return Re(a.line,a.ch)}function tn(a,y){return yt(a,y)<0?y:a}function We(a,y){return yt(a,y)<0?a:y}function en(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function St(a,y){if(y.line<a.first)return Re(a.first,0);var x=a.first+a.size-1;return y.line>x?Re(x,at(a,x).text.length):_n(y,at(a,y.line).text.length)}function _n(a,y){var x=a.ch;return x==null||x>y?Re(a.line,y):x<0?Re(a.line,0):a}function Jt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=St(a,y[b]);return x}var De=function(a,y){this.state=a,this.lookAhead=y},Le=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};Le.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Le.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}},Le.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Le.fromSaved=function(a,y,x){return y instanceof De?new Le(a,ii(a.mode,y.state),x,y.lookAhead):new Le(a,ii(a.mode,y),x)},Le.prototype.save=function(a){var y=a!==!1?ii(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new De(y,this.maxLookAhead):y};function ye(a,y,x,b){var E=[a.state.modeGen],ee={};Ln(a,y.text,a.doc.mode,x,function(ce,be){return E.push(ce,be)},ee,b);for(var re=x.state,le=function(ce){x.baseTokens=E;var be=a.state.overlays[ce],ke=1,qe=0;x.state=!0,Ln(a,y.text,be.mode,x,function(je,Ct){for(var Nt=ke;qe<je;){var Qt=E[ke];Qt>je&&E.splice(ke,1,je,E[ke+1],Qt),ke+=2,qe=Math.min(je,Qt)}if(Ct)if(be.opaque)E.splice(Nt,ke-Nt,je,"overlay "+Ct),ke=Nt+2;else for(;Nt<ke;Nt+=2){var fn=E[Nt+1];E[Nt+1]=(fn?fn+" ":"")+"overlay "+Ct}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)le(ue);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function ut(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Cn(a,Ae(y)),E=y.text.length>a.options.maxHighlightLength&&ii(a.doc.mode,b.state),ee=ye(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 Cn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new Le(b,!0,y);var ee=On(a,y,x),re=ee>b.first&&at(b,ee-1).stateAfter,le=re?Le.fromSaved(b,re,ee):new Le(b,Fi(b.mode),ee);return b.iter(ee,y,function(ue){Hn(a,ue.text,le);var ce=le.line;ue.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?le.save():null,le.nextLine()}),x&&(b.modeFrontier=le.line),le}function Hn(a,y,x,b){var E=a.doc.mode,ee=new zt(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&rn(E,x.state);!ee.eol();)At(E,ee,x.state),ee.start=ee.pos}function rn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=ui(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function At(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=ui(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 Ie=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function un(a,y,x,b){var E=a.doc,ee=E.mode,re;y=St(E,y);var le=at(E,y.line),ue=Cn(a,y.line,x),ce=new zt(le.text,a.options.tabSize,ue),be;for(b&&(be=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=At(ee,ce,ue.state),b&&be.push(new Ie(ce,re,ii(E.mode,ue.state)));return b?be:new Ie(ce,re,ue.state)}function bn(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 Ln(a,y,x,b,E,ee,re){var le=x.flattenSpans;le==null&&(le=a.options.flattenSpans);var ue=0,ce=null,be=new zt(y,a.options.tabSize,b),ke,qe=a.options.addModeClass&&[null];for(y==""&&bn(rn(x,b.state),ee);!be.eol();){if(be.pos>a.options.maxHighlightLength?(le=!1,re&&Hn(a,y,b,be.pos),be.pos=y.length,ke=null):ke=bn(At(x,be,b.state,qe),ee),qe){var je=qe[0].name;je&&(ke="m-"+(ke?je+" "+ke:je))}if(!le||ce!=ke){for(;ue<be.start;)ue=Math.min(be.start,ue+5e3),E(ue,ce);ce=ke}be.start=be.pos}for(;ue<be.pos;){var Ct=Math.min(be.pos,ue+5e3);E(Ct,ce),ue=Ct}}function On(a,y,x){for(var b,E,ee=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),le=y;le>re;--le){if(le<=ee.first)return ee.first;var ue=at(ee,le-1),ce=ue.stateAfter;if(ce&&(!x||le+(ce instanceof De?ce.lookAhead:0)<=ee.modeFrontier))return le;var be=ge(ue.text,null,a.options.tabSize);(E==null||b>be)&&(E=le-1,b=be)}return E}function qn(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=at(a,b).stateAfter;if(E&&(!(E instanceof De)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Kt=!1,Bn=!1;function Wn(){Kt=!0}function Rn(){Bn=!0}function Zt(a,y,x){this.marker=a,this.from=y,this.to=x}function dn(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Pn(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function Zn(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);if(le||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 Zt(re,ee.from,ue?null:ee.to))}}return b}function Nn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);if(le||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 Zt(re,ue?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Mn(a,y){if(y.full)return null;var x=Lt(a,y.from.line)&&at(a,y.from.line).markedSpans,b=Lt(a,y.to.line)&&at(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=yt(y.from,y.to)==0,le=jn(x,E,re),ue=Nn(b,ee,re),ce=y.text.length==1,be=ze(y.text).length+(ce?E:0);if(le)for(var ke=0;ke<le.length;++ke){var qe=le[ke];if(qe.to==null){var je=dn(ue,qe.marker);je?ce&&(qe.to=je.to==null?null:je.to+be):qe.to=E}}if(ue)for(var Ct=0;Ct<ue.length;++Ct){var Nt=ue[Ct];if(Nt.to!=null&&(Nt.to+=be),Nt.from==null){var Qt=dn(le,Nt.marker);Qt||(Nt.from=be,ce&&(le||(le=[])).push(Nt))}else Nt.from+=be,ce&&(le||(le=[])).push(Nt)}le&&(le=$n(le)),ue&&ue!=le&&(ue=$n(ue));var fn=[le];if(!ce){var Dn=y.text.length-2,pn;if(Dn>0&&le)for(var Tn=0;Tn<le.length;++Tn)le[Tn].to==null&&(pn||(pn=[])).push(new Zt(le[Tn].marker,null,null));for(var Qn=0;Qn<Dn;++Qn)fn.push(pn);fn.push(ue)}return fn}function $n(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 mn(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(je){if(je.markedSpans)for(var Ct=0;Ct<je.markedSpans.length;++Ct){var Nt=je.markedSpans[Ct].marker;Nt.readOnly&&(!b||ft(b,Nt)==-1)&&(b||(b=[])).push(Nt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var re=b[ee],le=re.find(0),ue=0;ue<E.length;++ue){var ce=E[ue];if(!(yt(ce.to,le.from)<0||yt(ce.from,le.to)>0)){var be=[ue,1],ke=yt(ce.from,le.from),qe=yt(ce.to,le.to);(ke<0||!re.inclusiveLeft&&!ke)&&be.push({from:ce.from,to:le.from}),(qe>0||!re.inclusiveRight&&!qe)&&be.push({from:le.to,to:ce.to}),E.splice.apply(E,be),ue+=be.length-3}}return E}function di(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Gn(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Yt(a){return a.inclusiveLeft?-1:0}function Xn(a){return a.inclusiveRight?1:0}function Un(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=yt(b.from,E.from)||Yt(a)-Yt(y);if(ee)return-ee;var re=yt(b.to,E.to)||Xn(a)-Xn(y);return re||y.id-a.id}function wi(a,y){var x=Bn&&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||Un(b,E.marker)<0)&&(b=E.marker);return b}function In(a){return wi(a,!0)}function bt(a){return wi(a,!1)}function Tt(a,y){var x=Bn&&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||Un(b,ee.marker)<0)&&(b=ee.marker)}return b}function et(a,y,x,b,E){var ee=at(a,y),re=Bn&&ee.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(ue.marker.collapsed){var ce=ue.marker.find(0),be=yt(ce.from,x)||Yt(ue.marker)-Yt(E),ke=yt(ce.to,b)||Xn(ue.marker)-Xn(E);if(!(be>=0&&ke<=0||be<=0&&ke>=0)&&(be<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?yt(ce.to,x)>=0:yt(ce.to,x)>0)||be>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?yt(ce.from,b)<=0:yt(ce.from,b)<0)))return!0}}}function Ze(a){for(var y;y=In(a);)a=y.find(-1,!0).line;return a}function mt(a){for(var y;y=bt(a);)a=y.find(1,!0).line;return a}function Ft(a){for(var y,x;y=bt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function gn(a,y){var x=at(a,y),b=Ze(x);return x==b?y:Ae(b)}function zn(a,y){if(y>a.lastLine())return y;var x=at(a,y),b;if(!oi(a,x))return y;for(;b=bt(x);)x=b.find(1,!0).line;return Ae(x)+1}function oi(a,y){var x=Bn&&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&&mi(a,y,b))return!0}}}function mi(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return mi(a,b.line,dn(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)&&mi(a,y,E))return!0}function fi(a){a=Ze(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 le=ee.children[re];if(le==x)break;y+=le.height}return y}function Pi(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=In(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=bt(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 Ci(a){var y=a.display,x=a.doc;y.maxLine=at(x,x.first),y.maxLineLength=Pi(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Pi(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Hi=function(a,y,x){this.text=a,Gn(this,y),this.height=x?x(this):1};Hi.prototype.lineNo=function(){return Ae(this)},sn(Hi);function vr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),di(a),Gn(a,x);var E=b?b(a):1;E!=a.height&&ci(a,E)}function Ji(a){a.parent=null,di(a)}var ji={},tr={};function Mi(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?tr:ji;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function rr(a,y){var x=nt("span",null,null,Oe?"padding-right: .1px":null),b={pre:nt("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=Li,li(a.display.measure)&&(re=nn(ee,a.doc.direction))&&(b.addToken=or(b.addToken,re)),b.map=[];var le=y!=a.display.externalMeasured&&Ae(ee);hr(ee,b,ut(a,ee,le)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=Ut(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=Ut(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Ai(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(Oe){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 kn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Ut(b.pre.className,b.textClass||"")),b}function xr(a){var y=Ge("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Li(a,y,x,b,E,ee,re){if(y){var le=a.splitSpaces?dr(y,a.trailingSpace):y,ue=a.cm.state.specialChars,ce=!1,be;if(!ue.test(y))a.col+=y.length,be=document.createTextNode(le),a.map.push(a.pos,a.pos+y.length,be),ve&&me<9&&(ce=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var ke=0;;){ue.lastIndex=ke;var qe=ue.exec(y),je=qe?qe.index-ke:y.length-ke;if(je){var Ct=document.createTextNode(le.slice(ke,ke+je));ve&&me<9?be.appendChild(Ge("span",[Ct])):be.appendChild(Ct),a.map.push(a.pos,a.pos+je,Ct),a.col+=je,a.pos+=je}if(!qe)break;ke+=je+1;var Nt=void 0;if(qe[0]==" "){var Qt=a.cm.options.tabSize,fn=Qt-a.col%Qt;Nt=be.appendChild(Ge("span",Pt(fn),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),a.col+=fn}else qe[0]=="\r"||qe[0]==`
`?(Nt=be.appendChild(Ge("span",qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",qe[0]),a.col+=1):(Nt=a.cm.options.specialCharPlaceholder(qe[0]),Nt.setAttribute("cm-text",qe[0]),ve&&me<9?be.appendChild(Ge("span",[Nt])):be.appendChild(Nt),a.col+=1);a.map.push(a.pos,a.pos+1,Nt),a.pos++}}if(a.trailingSpace=le.charCodeAt(y.length-1)==32,x||b||E||ce||ee||re){var Dn=x||"";b&&(Dn+=b),E&&(Dn+=E);var pn=Ge("span",[be],Dn,ee);if(re)for(var Tn in re)re.hasOwnProperty(Tn)&&Tn!="style"&&Tn!="class"&&pn.setAttribute(Tn,re[Tn]);return a.content.appendChild(pn)}a.content.appendChild(be)}}function dr(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 or(a,y){return function(x,b,E,ee,re,le,ue){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,be=ce+b.length;;){for(var ke=void 0,qe=0;qe<y.length&&(ke=y[qe],!(ke.to>ce&&ke.from<=ce));qe++);if(ke.to>=be)return a(x,b,E,ee,re,le,ue);a(x,b.slice(0,ke.to-ce),E,ee,null,le,ue),ee=null,b=b.slice(ke.to-ce),ce=ke.to}}}function Mr(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 hr(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]),Mi(x[re+1],y.cm.options));return}for(var le=E.length,ue=0,ce=1,be="",ke,qe,je=0,Ct,Nt,Qt,fn,Dn;;){if(je==ue){Ct=Nt=Qt=qe="",Dn=null,fn=null,je=1/0;for(var pn=[],Tn=void 0,Qn=0;Qn<b.length;++Qn){var Kn=b[Qn],gi=Kn.marker;if(gi.type=="bookmark"&&Kn.from==ue&&gi.widgetNode)pn.push(gi);else if(Kn.from<=ue&&(Kn.to==null||Kn.to>ue||gi.collapsed&&Kn.to==ue&&Kn.from==ue)){if(Kn.to!=null&&Kn.to!=ue&&je>Kn.to&&(je=Kn.to,Nt=""),gi.className&&(Ct+=" "+gi.className),gi.css&&(qe=(qe?qe+";":"")+gi.css),gi.startStyle&&Kn.from==ue&&(Qt+=" "+gi.startStyle),gi.endStyle&&Kn.to==je&&(Tn||(Tn=[])).push(gi.endStyle,Kn.to),gi.title&&((Dn||(Dn={})).title=gi.title),gi.attributes)for(var Zi in gi.attributes)(Dn||(Dn={}))[Zi]=gi.attributes[Zi];gi.collapsed&&(!fn||Un(fn.marker,gi)<0)&&(fn=Kn)}else Kn.from>ue&&je>Kn.from&&(je=Kn.from)}if(Tn)for(var ur=0;ur<Tn.length;ur+=2)Tn[ur+1]==je&&(Nt+=" "+Tn[ur]);if(!fn||fn.from==ue)for(var Ui=0;Ui<pn.length;++Ui)Mr(y,0,pn[Ui]);if(fn&&(fn.from||0)==ue){if(Mr(y,(fn.to==null?le+1:fn.to)-ue,fn.marker,fn.from==null),fn.to==null)return;fn.to==ue&&(fn=!1)}}if(ue>=le)break;for(var Wr=Math.min(le,je);;){if(be){var Pr=ue+be.length;if(!fn){var $i=Pr>Wr?be.slice(0,Wr-ue):be;y.addToken(y,$i,ke?ke+Ct:Ct,Qt,ue+$i.length==je?Nt:"",qe,Dn)}if(Pr>=Wr){be=be.slice(Wr-ue),ue=Wr;break}ue=Pr,Qt=""}be=E.slice(ee,ee=x[ce++]),ke=Mi(x[ce++],y.cm.options)}}}function Fr(a,y,x){this.line=y,this.rest=Ft(y),this.size=this.rest?Ae(ze(this.rest))-x+1:1,this.node=this.text=null,this.hidden=oi(a,y)}function Ni(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new Fr(a.doc,at(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var wr=null;function Gr(a){wr?wr.ops.push(a):a.ownsGroup=wr={ops:[a],delayedCallbacks:[]}}function kr(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 Po(a,y){var x=a.ownsGroup;if(x)try{kr(x)}finally{wr=null,y(x)}}var Cr=null;function Wi(a,y){var x=En(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;wr?E=wr.delayedCallbacks:Cr?E=Cr:(E=Cr=[],setTimeout(mr,0));for(var ee=function(le){E.push(function(){return x[le].apply(null,b)})},re=0;re<x.length;++re)ee(re)}}function mr(){var a=Cr;Cr=null;for(var y=0;y<a.length;++y)a[y]()}function Vr(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?Nr(a,y):ee=="gutter"?ai(a,y,x,b):ee=="class"?Yn(a,y):ee=="widget"&&ei(a,y,b)}y.changes=null}function _r(a){return a.node==a.text&&(a.node=Ge("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),ve&&me<8&&(a.node.style.zIndex=2)),a.node}function Vi(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=_r(y);y.background=b.insertBefore(Ge("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function ro(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):rr(a,y)}function Nr(a,y){var x=y.text.className,b=ro(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,Yn(a,y)):x&&(y.text.className=x)}function Yn(a,y){Vi(a,y),y.line.wrapClass?_r(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 ai(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=_r(y);y.gutterBackground=Ge("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=_r(y),le=y.gutter=Ge("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(le),re.insertBefore(le,y.text),y.line.gutterClass&&(le.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=le.appendChild(Ge("div",pt(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,be=ee.hasOwnProperty(ce)&&ee[ce];be&&le.appendChild(Ge("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function ei(a,y,x){y.alignable&&(y.alignable=null);for(var b=dt("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);si(a,y,x)}function yn(a,y,x,b){var E=ro(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Yn(a,y),ai(a,y,x,b),si(a,y,b),y.node}function si(a,y,x){if(Ti(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Ti(a,y.rest[b],y,x,!1)}function Ti(a,y,x,b,E){if(y.widgets)for(var ee=_r(x),re=0,le=y.widgets;re<le.length;++re){var ue=le[re],ce=Ge("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Ir(ue,ce,x,b),a.display.input.setUneditable(ce),E&&ue.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Wi(ue,"redraw")}}function Ir(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 ar(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Qe(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;"),Be(y.display.measure,Ge("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function Qi(a,y){for(var x=xi(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 Yi(a){return a.lineSpace.offsetTop}function Ur(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function eo(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Be(a.measure,Ge("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 Or(a){return qt-a.display.nativeBarWidth}function to(a){return a.display.scroller.clientWidth-Or(a)-a.display.barWidth}function oo(a){return a.display.scroller.clientHeight-Or(a)-a.display.barHeight}function qr(a,y,x){var b=a.options.lineWrapping,E=b&&to(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(),le=0;le<re.length-1;le++){var ue=re[le],ce=re[le+1];Math.abs(ue.bottom-ce.bottom)>2&&ee.push((ue.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Lo(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(Ae(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=Ze(y);var x=Ae(y),b=a.display.externalMeasured=new Fr(a.doc,y,x);b.lineN=x;var E=b.built=rr(a,b);return b.text=E.pre,Be(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Kr(a,uo(a,y),x,b)}function no(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[Co(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=Ae(y),b=no(a,x);b&&!b.text?b=null:b&&b.changes&&(Vr(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=Ga(a,y));var E=Lo(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Kr(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||(qr(a,y.view,y.rect),y.hasHeights=!0),re=wa(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 ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ee,re,le,ue,ce=0;ce<a.length;ce+=3)if(le=a[ce],ue=a[ce+1],y<le?(E=0,ee=1,re="left"):y<ue?(E=y-le,ee=E+1):(ce==a.length-3||y==ue&&a[ce+3]>y)&&(ee=ue-le,E=ee-1,y>=ue&&(re="right")),E!=null){if(b=a[ce+2],le==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-le)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:le,coverEnd:ue}}function Va(a,y){var x=ba;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 wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,re=E.start,le=E.end,ue=E.collapse,ce;if(ee.nodeType==3){for(var be=0;be<4;be++){for(;re&&Ue(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+le<E.coverEnd&&Ue(y.line.text.charAt(E.coverStart+le));)++le;if(ve&&me<9&&re==0&&le==E.coverEnd-E.coverStart?ce=ee.parentNode.getBoundingClientRect():ce=Va(Me(ee,re,le).getClientRects(),b),ce.left||ce.right||re==0)break;le=re,re=re-1,ue="right"}ve&&me<11&&(ce=Ua(a.display.measure,ce))}else{re>0&&(ue=b="right");var ke;a.options.lineWrapping&&(ke=ee.getClientRects()).length>1?ce=ke[b=="right"?ke.length-1:0]:ce=ee.getBoundingClientRect()}if(ve&&me<9&&!re&&(!ce||!ce.left&&!ce.right)){var qe=ee.parentNode.getClientRects()[0];qe?ce={left:qe.left,right:qe.left+Jr(a.display),top:qe.top,bottom:qe.bottom}:ce=ba}for(var je=ce.top-y.rect.top,Ct=ce.bottom-y.rect.top,Nt=(je+Ct)/2,Qt=y.view.measure.heights,fn=0;fn<Qt.length-1&&!(Nt<Qt[fn]);fn++);var Dn=fn?Qt[fn-1]:0,pn=Qt[fn],Tn={left:(ue=="right"?ce.right:ce.left)-y.rect.left,right:(ue=="left"?ce.left:ce.right)-y.rect.left,top:Dn,bottom:pn};return!ce.left&&!ce.right&&(Tn.bogus=!0),a.options.singleCursorHeightPerLine||(Tn.rtop=je,Tn.rbottom=Ct),Tn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cn(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 Ko(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 Yo(a){a.display.externalMeasure=null,Vt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function xo(a){Yo(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function qo(){return we&&Ce?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&Ce?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=ar(a.widgets[x]));return y}function To(a,y,x,b,E){if(!E){var ee=Xo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var re=fi(y);if(b=="local"?re+=Yi(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var le=a.display.lineSpace.getBoundingClientRect();re+=le.top+(b=="window"?0:Ca());var ue=le.left+(b=="window"?0:qo());x.left+=ue,x.right+=ue}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=qo(),E-=Ca();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 Mo(a,y,x,b,E){return b||(b=at(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function Ar(a,y,x,b,E,ee){b=b||at(a.doc,y.line),E||(E=uo(a,b));function re(Ct,Nt){var Qt=Kr(a,E,Ct,Nt?"right":"left",ee);return Nt?Qt.left=Qt.right:Qt.right=Qt.left,To(a,b,Qt,x)}var le=nn(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"),!le)return re(ce=="before"?ue-1:ue,ce=="before");function be(Ct,Nt,Qt){var fn=le[Nt],Dn=fn.level==1;return re(Qt?Ct-1:Ct,Dn!=Qt)}var ke=$t(le,ue,ce),qe=kt,je=be(ue,ke,ce=="before");return qe!=null&&(je.other=be(ue,qe,ce!="before")),je}function ki(a,y){var x=0;y=St(a.doc,y),a.options.lineWrapping||(x=Jr(a.display)*y.ch);var b=at(a.doc,y.line),E=fi(b)+Yi(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function pi(a,y,x,b,E){var ee=Re(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function fr(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return pi(b.first,0,null,-1,-1);var E=Pe(b,x),ee=b.first+b.size-1;if(E>ee)return pi(b.first+b.size-1,at(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=at(b,E);;){var le=Xr(a,re,E,y,x),ue=Tt(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ce=ue.find(1);if(ce.line==E)return ce;re=at(b,E=ce.line)}}function gr(a,y,x,b){b-=Xo(y);var E=y.text.length,ee=Dt(function(re){return Kr(a,x,re-1).bottom<=b},E,0);return E=Dt(function(re){return Kr(a,x,re).top>b},ee,E),{begin:ee,end:E}}function qi(a,y,x,b){x||(x=uo(a,y));var E=To(a,y,Kr(a,x,b),"line").top;return gr(a,y,x,E)}function nr(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Xr(a,y,x,b,E){E-=fi(y);var ee=uo(a,y),re=Xo(y),le=0,ue=y.text.length,ce=!0,be=nn(y,a.doc.direction);if(be){var ke=(a.options.lineWrapping?ao:Yr)(a,y,x,ee,be,b,E);ce=ke.level!=1,le=ce?ke.from:ke.to-1,ue=ce?ke.to:ke.from-1}var qe=null,je=null,Ct=Dt(function(Qn){var Kn=Kr(a,ee,Qn);return Kn.top+=re,Kn.bottom+=re,nr(Kn,b,E,!1)?(Kn.top<=E&&Kn.left<=b&&(qe=Qn,je=Kn),!0):!1},le,ue),Nt,Qt,fn=!1;if(je){var Dn=b-je.left<je.right-b,pn=Dn==ce;Ct=qe+(pn?0:1),Qt=pn?"after":"before",Nt=Dn?je.left:je.right}else{!ce&&(Ct==ue||Ct==le)&&Ct++,Qt=Ct==0?"after":Ct==y.text.length?"before":Kr(a,ee,Ct-(ce?1:0)).bottom+re<=E==ce?"after":"before";var Tn=Ar(a,Re(x,Ct,Qt),"line",y,ee);Nt=Tn.left,fn=E<Tn.top?-1:E>=Tn.bottom?1:0}return Ct=Ot(y.text,Ct,1),pi(x,Ct,Qt,fn,b-Nt)}function Yr(a,y,x,b,E,ee,re){var le=Dt(function(ke){var qe=E[ke],je=qe.level!=1;return nr(Ar(a,Re(x,je?qe.to:qe.from,je?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),ue=E[le];if(le>0){var ce=ue.level!=1,be=Ar(a,Re(x,ce?ue.from:ue.to,ce?"after":"before"),"line",y,b);nr(be,ee,re,!0)&&be.top>re&&(ue=E[le-1])}return ue}function ao(a,y,x,b,E,ee,re){var le=gr(a,y,b,re),ue=le.begin,ce=le.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var be=null,ke=null,qe=0;qe<E.length;qe++){var je=E[qe];if(!(je.from>=ce||je.to<=ue)){var Ct=je.level!=1,Nt=Kr(a,b,Ct?Math.min(ce,je.to)-1:Math.max(ue,je.from)).right,Qt=Nt<ee?ee-Nt+1e9:Nt-ee;(!be||ke>Qt)&&(be=je,ke=Qt)}}return be||(be=E[E.length-1]),be.from<ue&&(be={from:ue,to:be.to,level:be.level}),be.to>ce&&(be={from:be.from,to:ce,level:be.level}),be}var Rr;function zr(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Rr==null){Rr=Ge("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Rr.appendChild(document.createTextNode("x")),Rr.appendChild(Ge("br"));Rr.appendChild(document.createTextNode("x"))}Be(a.measure,Rr);var x=Rr.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Vt(a.measure),x||1}function Jr(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ge("span","xxxxxxxxxx"),x=Ge("pre",[y],"CodeMirror-line-like");Be(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var le=a.display.gutterSpecs[re].className;x[le]=ee.offsetLeft+ee.clientLeft+E,b[le]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function wl(a){var y=zr(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Jr(a.display)-3);return function(E){if(oi(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 Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&ci(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&xi(y).getAttribute("cm-not-content")=="true")return null;var ee,re,le=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-le.left,re=y.clientY-le.top}catch(ke){return null}var ue=fr(a,ee,re),ce;if(b&&ue.xRel>0&&(ce=at(a.doc,ue.line).text).length==ue.ch){var be=ge(ce,ce.length,a.options.tabSize)-ce.length;ue=Re(ue.line,Math.max(0,Math.round((ee-eo(a.display).left)/Jr(a.display))-be))}return ue}function Co(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 Br(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)Bn&&gn(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)Bn&&zn(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var ee=Ea(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=Ea(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var le=Ea(a,y,y,-1),ue=Ea(a,x,x+b,1);le&&ue?(E.view=E.view.slice(0,le.index).concat(Ni(a,le.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):fo(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function ho(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[Co(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);ft(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Ea(a,y,x,b){var E=Co(a,y),ee,re=a.display.view;if(!Bn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var le=a.display.viewFrom,ue=0;ue<E;ue++)le+=re[ue].size;if(le!=y){if(b>0){if(E==re.length-1)return null;ee=le+re[E].size-y,E++}else ee=le-y;y+=ee,x+=ee}for(;gn(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 zs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Ni(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Ni(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(Co(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(Ni(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,Co(a,x)))),b.viewTo=x}function Cl(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 Jo(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 le=x.sel.ranges[re];if(!(le.from().line>=a.display.viewTo||le.to().line<a.display.viewFrom)){var ue=le.empty();(ue||a.options.showCursorWhenSelecting)&&El(a,le.head,E),ue||Hs(a,le,ee)}}return b}function El(a,y,x){var b=Ar(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ge("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(Ge("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 ka(a,y){return a.top-y.top||a.left-y.left}function Hs(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),re=eo(a.display),le=re.left,ue=Math.max(b.sizerWidth,to(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function be(pn,Tn,Qn,Kn){Tn<0&&(Tn=0),Tn=Math.round(Tn),Kn=Math.round(Kn),ee.appendChild(Ge("div",null,"CodeMirror-selected","position: absolute; left: "+pn+`px;
top: `+Tn+"px; width: "+(Qn==null?ue-pn:Qn)+`px;
height: `+(Kn-Tn)+"px"))}function ke(pn,Tn,Qn){var Kn=at(E,pn),gi=Kn.text.length,Zi,ur;function Ui($i,Lr){return Mo(a,Re(pn,$i),"div",Kn,Lr)}function Wr($i,Lr,pr){var ir=qi(a,Kn,null,$i),er=Lr=="ltr"==(pr=="after")?"left":"right",Ki=pr=="after"?ir.begin:ir.end-(/\s/.test(Kn.text.charAt(ir.end-1))?2:1);return Ui(Ki,er)[er]}var Pr=nn(Kn,E.direction);return gt(Pr,Tn||0,Qn==null?gi:Qn,function($i,Lr,pr,ir){var er=pr=="ltr",Ki=Ui($i,er?"left":"right"),Tr=Ui(Lr-1,er?"right":"left"),Vo=Tn==null&&$i==0,bo=Qn==null&&Lr==gi,br=ir==0,io=!Pr||ir==Pr.length-1;if(Tr.top-Ki.top<=3){var cr=(ce?Vo:bo)&&br,bl=(ce?bo:Vo)&&io,so=cr?le:(er?Ki:Tr).left,Bo=bl?ue:(er?Tr:Ki).right;be(so,Ki.top,Bo-so,Ki.bottom)}else{var Do,Er,Uo,xl;er?(Do=ce&&Vo&&br?le:Ki.left,Er=ce?ue:Wr($i,pr,"before"),Uo=ce?le:Wr(Lr,pr,"after"),xl=ce&&bo&&io?ue:Tr.right):(Do=ce?Wr($i,pr,"before"):le,Er=!ce&&Vo&&br?ue:Ki.right,Uo=!ce&&bo&&io?le:Tr.left,xl=ce?Wr(Lr,pr,"after"):ue),be(Do,Ki.top,Er-Do,Ki.bottom),Ki.bottom<Tr.top&&be(le,Ki.bottom,null,Tr.top),be(Uo,Tr.top,xl-Uo,Tr.bottom)}(!Zi||ka(Ki,Zi)<0)&&(Zi=Ki),ka(Tr,Zi)<0&&(Zi=Tr),(!ur||ka(Ki,ur)<0)&&(ur=Ki),ka(Tr,ur)<0&&(ur=Tr)}),{start:Zi,end:ur}}var qe=y.from(),je=y.to();if(qe.line==je.line)ke(qe.line,qe.ch,je.ch);else{var Ct=at(E,qe.line),Nt=at(E,je.line),Qt=Ze(Ct)==Ze(Nt),fn=ke(qe.line,qe.ch,Qt?Ct.text.length+1:null).end,Dn=ke(je.line,Qt?0:null,je.ch).start;Qt&&(fn.top<Dn.top-2?(be(fn.right,fn.top,null,fn.bottom),be(le,Dn.top,Dn.left,Dn.bottom)):be(fn.right,fn.top,Dn.left-fn.right,fn.bottom)),fn.bottom<Dn.top&&be(le,fn.bottom,null,Dn.top)}x.appendChild(ee)}function qa(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()||Fo(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(),Xa(a))}function Al(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Fo(a))},100)}function Xa(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(kn(a,"focus",a,y),a.state.focused=!0,ot(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Oe&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),qa(a))}function Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(kn(a,"blur",a,y),a.state.focused=!1,ht(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Aa(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,le=0;if(!E.hidden){if(ve&&me<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&&(le=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(ci(E.line,re),Bl(E.line),E.rest))for(var ke=0;ke<E.rest.length;ke++)Bl(E.rest[ke]);if(le>a.display.sizerWidth){var qe=Math.ceil(le/Jr(a.display));qe>a.display.maxLineLength&&(a.display.maxLineLength=qe,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 Ba(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Yi(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=Pe(y,b),re=Pe(y,E);if(x&&x.ensure){var le=x.ensure.from.line,ue=x.ensure.to.line;le<ee?(ee=le,re=Pe(y,fi(at(y,le))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=re&&(ee=Pe(y,fi(at(y,ue))-a.wrapper.clientHeight),re=ue)}return{from:ee,to:Math.max(re,ee+1)}}function Ws(a,y){if(!st(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&&!it){var ee=Ge("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Yi(a.display))+`px;
height: `+(y.bottom-y.top+Or(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?Re(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Re(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,le=Ar(a,y),ue=!x||x==y?le:Ar(a,x);E={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-b,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+b};var ce=Ja(a,E),be=a.doc.scrollTop,ke=a.doc.scrollLeft;if(ce.scrollTop!=null&&($o(a,ce.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),ce.scrollLeft!=null&&(So(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-ke)>1&&(re=!0)),!re)break}return E}function js(a,y){var x=Ja(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&So(a,x.scrollLeft)}function Ja(a,y){var x=a.display,b=zr(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=oo(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var le=a.doc.height+Ur(x),ue=y.top<b,ce=y.bottom>le-b;if(y.top<E)re.scrollTop=ue?0:y.top;else if(y.bottom>E+ee){var be=Math.min(y.top,(ce?le:y.bottom)-ee);be!=E&&(re.scrollTop=be)}var ke=a.options.fixedGutter?0:x.gutters.offsetWidth,qe=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-ke,je=to(a)-x.gutters.offsetWidth,Ct=y.right-y.left>je;return Ct&&(y.right=y.left+je),y.left<10?re.scrollLeft=0:y.left<qe?re.scrollLeft=Math.max(0,y.left+ke-(Ct?0:10)):y.right>je+qe-3&&(re.scrollLeft=y.right+(Ct?0:10)-je),re}function Qa(a,y){y!=null&&(Da(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function _o(a){Da(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Qo(a,y,x){(y!=null||x!=null)&&Da(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Gs(a,y){Da(a),a.curOp.scrollToPos=y}function Da(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=ki(a,y.from),b=ki(a,y.to);Dl(a,x,b,y.margin)}}function Dl(a,y,x,b){var E=Ja(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});Qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(te||el(a,{top:y}),Pl(a,y,!0),te&&el(a),na(a,100))}function Pl(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 So(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,_l(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Ur(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+Or(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=Ge("div",[Ge("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ge("div",[Ge("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),_t(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),_t(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&me<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.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}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=Se&&!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},Eo.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)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function No(a,y){y||(y=ea(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&&Aa(a),Ll(a,ea(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 Tl={native:Eo,null:ta};function Ml(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ht(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Tl[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),_t(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?So(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&ot(a.display.wrapper,a.display.scrollbars.addClass)}var Vs=0;function ko(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:++Vs},Gr(a.curOp)}function Ao(a){var y=a.curOp;y&&Po(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++)qs(y[E]);for(var ee=0;ee<y.length;ee++)Xs(y[ee]);for(var re=0;re<y.length;re++)Js(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&Ci(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 Pa(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function qs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Aa(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(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+Or(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-to(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Xs(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&So(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Fe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&qa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Js(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Pl(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&So(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,St(b,a.scrollToPos.from),St(b,a.scrollToPos.to),a.scrollToPos.margin);Ws(y,E)}var ee=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(ee)for(var le=0;le<ee.length;++le)ee[le].lines.length||kn(ee[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&kn(re[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&kn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Hr(a,y){if(a.curOp)return y();ko(a);try{return y()}finally{Ao(a)}}function lr(a,y){return function(){if(a.curOp)return y.apply(a,arguments);ko(a);try{return y.apply(a,arguments)}finally{Ao(a)}}}function Sr(a){return function(){if(this.curOp)return a.apply(this,arguments);ko(this);try{return a.apply(this,arguments)}finally{Ao(this)}}}function sr(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);ko(y);try{return a.apply(this,arguments)}finally{Ao(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,hn(Qs,a))}function Qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Cn(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,le=ee.text.length>a.options.maxHighlightLength?ii(y.mode,b.state):null,ue=ye(a,ee,b,!0);le&&(b.state=le),ee.styles=ue.styles;var ce=ee.styleClasses,be=ue.classes;be?ee.styleClasses=be:ce&&(ee.styleClasses=null);for(var ke=!re||re.length!=ee.styles.length||ce!=be&&(!ce||!be||ce.bgClass!=be.bgClass||ce.textClass!=be.textClass),qe=0;!ke&&qe<re.length;++qe)ke=re[qe]!=ee.styles[qe];ke&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&Hn(a,ee.text,b),ee.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Hr(a,function(){for(var ee=0;ee<E.length;ee++)ho(a,E[ee],"text")})}}var Pa=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Ba(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=to(a),this.force=x,this.dims=co(a),this.events=[]};Pa.prototype.signal=function(a,y){Rt(a,y)&&this.events.push(arguments)},Pa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)kn.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=Or(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Or(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Fe();if(!y||!Qe(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Qe(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==Fe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Qe(document.body,a.anchorNode)&&Qe(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 $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(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&&Cl(a)==0)return!1;Nl(a)&&(fo(a),y.dims=co(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)),Bn&&(ee=gn(a.doc,ee),re=zn(a.doc,re));var le=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;zs(a,ee,re),x.viewOffset=fi(at(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cl(a);if(!le&&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),Vt(x.cursorDiv),Vt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,le&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Fl(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==to(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Ur(a.display)-oo(a),x.top)}),y.visible=Ba(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Ba(a.display,a.doc,x));if(!$a(a,y))break;Aa(a);var E=ea(a);Jo(a),No(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 Pa(a,y);if($a(a,x)){Aa(a),Fl(a,x);var b=ea(a);Jo(a),No(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 le(Ct){var Nt=Ct.nextSibling;return Oe&&Se&&a.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),Nt}for(var ue=b.view,ce=b.viewFrom,be=0;be<ue.length;be++){var ke=ue[be];if(!ke.hidden)if(!ke.node||ke.node.parentNode!=ee){var qe=yn(a,ke,ce,x);ee.insertBefore(qe,re)}else{for(;re!=ke.node;)re=le(re);var je=E&&y!=null&&y<=ce&&ke.lineNumber;ke.changes&&(ft(ke.changes,"gutter")>-1&&(je=!1),Vr(a,ke,ce,x)),je&&(Vt(ke.lineNumber),ke.lineNumber.appendChild(document.createTextNode(pt(a.options,ce)))),re=ke.node.nextSibling}ce+=ke.size}for(;re;)re=le(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+Or(a)+"px"}function _l(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(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 le=x[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=pt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ge("div",[Ge("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 il(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 Il(a){var y=a.gutters,x=a.gutterSpecs;Vt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,re=E.style,le=y.appendChild(Ge("div",null,"CodeMirror-gutter "+ee));re&&(le.style.cssText=re),ee=="CodeMirror-linenumbers"&&(a.lineGutter=le,le.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ia(a){Il(a.display),Br(a),_l(a)}function iu(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ge("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ge("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=nt("div",null,"CodeMirror-code"),E.selectionDiv=Ge("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ge("div",null,"CodeMirror-cursors"),E.measure=Ge("div",null,"CodeMirror-measure"),E.lineMeasure=Ge("div",null,"CodeMirror-measure"),E.lineSpace=nt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=nt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ge("div",[ee],null,"position: relative"),E.sizer=Ge("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ge("div",null,null,"position: absolute; height: "+qt+"px; width: 1px;"),E.gutters=Ge("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ge("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ge("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),ve&&me<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Oe&&!(te&&Ee)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=il(b.gutters,b.lineNumbers),Il(E),x.init(E)}var La=0,Zr=null;ve?Zr=-.53:te?Zr=15:we?Zr=-.7:Ye&&(Zr=-1/3);function Ol(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 ru(a){var y=Ol(a);return y.x*=Zr,y.y*=Zr,y}function Rl(a,y){var x=Ol(y),b=x.x,E=x.y,ee=a.display,re=ee.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(b&&le||E&&ue){if(E&&Se&&Oe){e:for(var ce=y.target,be=ee.view;ce!=re;ce=ce.parentNode)for(var ke=0;ke<be.length;ke++)if(be[ke].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!te&&!fe&&Zr!=null){E&&ue&&$o(a,Math.max(0,re.scrollTop+E*Zr)),So(a,Math.max(0,re.scrollLeft+b*Zr)),(!E||E&&ue)&&wn(y),ee.wheelStartX=null;return}if(E&&Zr!=null){var qe=E*Zr,je=a.doc.scrollTop,Ct=je+ee.wrapper.clientHeight;qe<0?je=Math.max(0,je+qe-50):Ct=Math.min(a.doc.height,Ct+qe+50),el(a,{top:je,bottom:Ct})}La<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 Nt=re.scrollLeft-ee.wheelStartX,Qt=re.scrollTop-ee.wheelStartY,fn=Qt&&ee.wheelDY&&Qt/ee.wheelDY||Nt&&ee.wheelDX&&Nt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,fn&&(Zr=(Zr*La+fn)/(La+1),++La)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var jr=function(a,y){this.ranges=a,this.primIndex=y};jr.prototype.primary=function(){return this.ranges[this.primIndex]},jr.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(!Xt(x.anchor,b.anchor)||!Xt(x.head,b.head))return!1}return!0},jr.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Ii(Wt(this.ranges[y].anchor),Wt(this.ranges[y].head));return new jr(a,this.primIndex)},jr.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},jr.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(yt(y,b.from())>=0&&yt(a,b.to())<=0)return x}return-1};var Ii=function(a,y){this.anchor=a,this.head=y};Ii.prototype.from=function(){return We(this.anchor,this.head)},Ii.prototype.to=function(){return tn(this.anchor,this.head)},Ii.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qr(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(qe,je){return yt(qe.from(),je.from())}),x=ft(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],le=y[ee-1],ue=yt(le.to(),re.from());if(b&&!re.empty()?ue>0:ue>=0){var ce=We(le.from(),re.from()),be=tn(le.to(),re.to()),ke=le.empty()?re.from()==re.head:le.from()==le.head;ee<=x&&--x,y.splice(--ee,2,new Ii(ke?be:ce,ke?ce:be))}}return new jr(y,x)}function po(a,y){return new jr([new Ii(a,y||a)],0)}function vo(a){return a.text?Re(a.from.line+a.text.length-1,ze(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function zl(a,y){if(yt(a,y.from)<0)return a;if(yt(a,y.to)<=0)return vo(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+=vo(y).ch-y.to.ch),Re(x,b)}function rl(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Ii(zl(E.anchor,y),zl(E.head,y)))}return Qr(a.cm,x,a.sel.primIndex)}function Hl(a,y,x){return a.line==y.line?Re(x.line,a.ch-y.ch+x.ch):Re(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Re(a.first,0),ee=E,re=0;re<y.length;re++){var le=y[re],ue=Hl(le.from,E,ee),ce=Hl(vo(le),E,ee);if(E=le.to,ee=ce,x=="around"){var be=a.sel.ranges[re],ke=yt(be.head,be.anchor)<0;b[re]=new Ii(ke?ce:ue,ke?ue:ce)}else b[re]=new Ii(ue,ue)}return new jr(b,a.sel.primIndex)}function ol(a){a.doc.mode=vi(a.options,a.doc.modeOption),ra(a)}function ra(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,na(a,100),a.state.modeGen++,a.curOp&&Br(a)}function Wl(a,y){return y.from.ch==0&&y.to.ch==0&&ze(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(Dn){return x?x[Dn]:null}function ee(Dn,pn,Tn){vr(Dn,pn,Tn,b),Wi(Dn,"change",Dn,y)}function re(Dn,pn){for(var Tn=[],Qn=Dn;Qn<pn;++Qn)Tn.push(new Hi(ce[Qn],E(Qn),b));return Tn}var le=y.from,ue=y.to,ce=y.text,be=at(a,le.line),ke=at(a,ue.line),qe=ze(ce),je=E(ce.length-1),Ct=ue.line-le.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(Wl(a,y)){var Nt=re(0,ce.length-1);ee(ke,ke.text,je),Ct&&a.remove(le.line,Ct),Nt.length&&a.insert(le.line,Nt)}else if(be==ke)if(ce.length==1)ee(be,be.text.slice(0,le.ch)+qe+be.text.slice(ue.ch),je);else{var Qt=re(1,ce.length-1);Qt.push(new Hi(qe+be.text.slice(ue.ch),je,b)),ee(be,be.text.slice(0,le.ch)+ce[0],E(0)),a.insert(le.line+1,Qt)}else if(ce.length==1)ee(be,be.text.slice(0,le.ch)+ce[0]+ke.text.slice(ue.ch),E(0)),a.remove(le.line+1,Ct);else{ee(be,be.text.slice(0,le.ch)+ce[0],E(0)),ee(ke,qe+ke.text.slice(ue.ch),je);var fn=re(1,ce.length-1);Ct>1&&a.remove(le.line+1,Ct-1),a.insert(le.line+1,fn)}Wi(a,"change",a,y)}function mo(a,y,x){function b(E,ee,re){if(E.linked)for(var le=0;le<E.linked.length;++le){var ue=E.linked[le];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,Ya(a),ol(a),jl(a),a.options.lineWrapping||Ci(a),a.options.mode=y.modeOption,Br(a)}function jl(a){(a.doc.direction=="rtl"?ot:ht)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Hr(a,function(){jl(a),Br(a)})}function Ta(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:Wt(y.from),to:vo(y),text:vn(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function Gl(a){for(;a.length;){var y=ze(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Gl(a.done),ze(a.done);if(a.done.length&&!ze(a.done).ranges)return ze(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ze(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,re,le;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)))le=ze(re.changes),yt(y.from,y.to)==0&&yt(y.from,le.to)==0?le.to=vo(y):re.changes.push(ll(a,y));else{var ue=ze(E.done);for((!ue||!ue.ranges)&&Ma(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,le||kn(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,ze(E.done),y))?E.done[E.done.length-1]=y:Ma(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gl(E.undone)}function Ma(a,y){var x=ze(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=Mn(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 le=0;le<re.length;++le){for(var ue=re[le],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 Io(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?jr.prototype.deepCopy.call(ee):ee);continue}var re=ee.changes,le=[];b.push({changes:le});for(var ue=0;ue<re.length;++ue){var ce=re[ue],be=void 0;if(le.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var ke in ce)(be=ke.match(/^spans_(\d+)$/))&&ft(y,Number(be[1]))>-1&&(ze(le)[ke]=ce[ke],delete ce[ke])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=yt(y,E)<0;ee!=yt(x,E)<0?(E=y,y=x):ee!=yt(y,x)<0&&(y=x)}return new Ii(E,y)}else return new Ii(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),yr(a,new jr([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=Qr(a.cm,b,a.sel.primIndex);yr(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,yr(a,Qr(a.cm,E,a.sel.primIndex),b)}function ql(a,y,x,b){yr(a,po(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 Ii(St(a,E[ee].anchor),St(a,E[ee].head))},origin:x&&x.origin};return kn(a,"beforeSelectionChange",a,b),a.cm&&kn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Qr(a.cm,b.ranges,b.ranges.length-1):y}function Xl(a,y,x){var b=a.history.done,E=ze(b);E&&E.ranges?(b[b.length-1]=y,_a(a,y,x)):yr(a,y,x)}function yr(a,y,x){_a(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function _a(a,y,x){(Rt(a,"beforeSelectionChange")||a.cm&&Rt(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(yt(y.primary().head,a.sel.primary().head)<0?-1:1);Jl(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&_o(a.cm)}function Jl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,An(a.cm)),Wi(a,"cursorActivity",a))}function Ql(a){Jl(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],le=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],ue=Na(a,re.anchor,le&&le.anchor,x,b),ce=Na(a,re.head,le&&le.head,x,b);(E||ue!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new Ii(ue,ce))}return E?Qr(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var ee=at(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var le=ee.markedSpans[re],ue=le.marker,ce="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,be="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ce?le.from<=y.ch:le.from<y.ch))&&(le.to==null||(be?le.to>=y.ch:le.to>y.ch))){if(E&&(kn(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(x){var ke=ue.find(b<0?1:-1),qe=void 0;if((b<0?be:ce)&&(ke=es(a,ke,-b,ke&&ke.line==y.line?ee:null)),ke&&ke.line==y.line&&(qe=yt(ke,x))&&(b<0?qe<0:qe>0))return Oo(a,ke,y,b,E)}var je=ue.find(b<0?-1:1);return(b<0?ce:be)&&(je=es(a,je,b,je.line==y.line?ee:null)),je?Oo(a,je,y,b,E):null}}return y}function Na(a,y,x,b,E){var ee=b||1,re=Oo(a,y,x,ee,E)||!E&&Oo(a,y,x,ee,!0)||Oo(a,y,x,-ee,E)||!E&&Oo(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Re(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?St(a,Re(y.line-1)):null:x>0&&y.ch==(b||at(a,y.line)).text.length?y.line<a.first+a.size-1?Re(y.line+1,0):null:new Re(y.line,y.ch+x)}function ts(a){a.setSelection(Re(a.firstLine(),0),Re(a.lastLine()),Ne)}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,le){E&&(b.from=St(a,E)),ee&&(b.to=St(a,ee)),re&&(b.text=re),le!==void 0&&(b.origin=le)}),kn(a,"beforeChange",a,b),a.cm&&kn(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 Ro(a,y,x){if(a.cm){if(!a.cm.curOp)return lr(a.cm,Ro)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=Kt&&!x&&mn(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)is(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else is(a,y)}}function is(a,y){if(!(y.text.length==1&&y.text[0]==""&&yt(y.from,y.to)==0)){var x=rl(a,y);Vl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Mn(a,y));var b=[];mo(a,function(E,ee){!ee&&ft(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,Mn(E,y))})}}function Ia(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,le=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,ce=0;ce<le.length&&(ee=le[ce],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ce++);if(ce!=le.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=le.pop(),ee.ranges){if(Ma(ee,ue),x&&!ee.equals(a.sel)){yr(a,ee,{clearRedo:!1});return}re=ee}else if(b){le.push(ee);return}else break;var be=[];Ma(re,ue),ue.push({changes:be,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var ke=Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"),qe=function(Nt){var Qt=ee.changes[Nt];if(Qt.origin=y,ke&&!ns(a,Qt,!1))return le.length=0,{};be.push(ll(a,Qt));var fn=Nt?rl(a,Qt):ze(le);oa(a,Qt,fn,Kl(a,Qt)),!Nt&&a.cm&&a.cm.scrollIntoView({from:Qt.from,to:vo(Qt)});var Dn=[];mo(a,function(pn,Tn){!Tn&&ft(Dn,pn.history)==-1&&(ls(pn.history,Qt),Dn.push(pn.history)),oa(pn,Qt,null,Kl(pn,Qt))})},je=ee.changes.length-1;je>=0;--je){var Ct=qe(je);if(Ct)return Ct.v}}}}function rs(a,y){if(y!=0&&(a.first+=y,a.sel=new jr(wt(a.sel.ranges,function(E){return new Ii(Re(E.anchor.line+y,E.anchor.ch),Re(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Br(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)ho(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return lr(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){rs(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);rs(a,E),y={from:Re(a.first,0),to:Re(y.to.line+E,y.to.ch),text:[ze(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Re(ee,at(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=vn(a,y.from,y.to),x||(x=rl(a,y)),a.cm?fu(a.cm,y,b):al(a,y,b),_a(a,x,Ne),a.cantEdit&&Na(a,Re(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,le=!1,ue=ee.line;a.options.lineWrapping||(ue=Ae(Ze(at(b,ee.line))),b.iter(ue,re.line+1,function(je){if(je==E.maxLine)return le=!0,!0})),b.sel.contains(y.from,y.to)>-1&&An(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(ue,ee.line+y.text.length,function(je){var Ct=Pi(je);Ct>E.maxLineLength&&(E.maxLine=je,E.maxLineLength=Ct,E.maxLineChanged=!0,le=!1)}),le&&(a.curOp.updateMaxLine=!0)),qn(b,ee.line),na(a,400);var ce=y.text.length-(re.line-ee.line)-1;y.full?Br(a):ee.line==re.line&&y.text.length==1&&!Wl(a.doc,y)?ho(a,ee.line,"text"):Br(a,ee.line,re.line+1,ce);var be=Rt(a,"changes"),ke=Rt(a,"change");if(ke||be){var qe={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};ke&&Wi(a,"change",a,qe),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(qe)}a.display.selForContextMenu=null}function zo(a,y,x,b,E){var ee;b||(b=x),yt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Ro(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(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 le=0;le<ee.ranges.length;le++)os(ee.ranges[le].anchor,y,x,b),os(ee.ranges[le].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=Re(ce.from.line+b,ce.from.ch),ce.to=Re(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;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=at(a,en(a,y)):E=Ae(y),E==null?null:(b(ee,E)&&a.cm&&ho(a.cm,E,x),ee)}function la(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}la.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,Ji(E),Wi(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 sa(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}sa.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 la))){var le=[];this.collapse(le),this.children=[new la(le)],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,le=re;le<E.lines.length;){var ue=new la(E.lines.slice(le,le+=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 sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=ft(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(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 ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ae(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=ar(this);ci(x,Math.max(0,x.height-ee)),a&&(Hr(a,function(){ss(a,x,-ee),ho(a,b,"widget")}),Wi(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=ar(this)-y;E&&(oi(this.doc,b)||ci(b,b.height+E),x&&Hr(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wi(x,"lineWidgetChanged",x,a,Ae(b))}))},sn(ua);function ss(a,y,x){fi(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(E.insertAt==null?le.push(E):le.splice(Math.min(le.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,ee&&!oi(a,re)){var ue=fi(re)<a.scrollTop;ci(re,re.height+ar(E)),ue&&Qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Wi(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Ae(y)),E}var us=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&ko(a),Rt(this,"clear")){var x=this.find();x&&Wi(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var re=this.lines[ee],le=dn(re.markedSpans,this);a&&!this.collapsed?ho(a,Ae(re),"text"):a&&(le.to!=null&&(E=Ae(re)),le.from!=null&&(b=Ae(re))),re.markedSpans=Pn(re.markedSpans,le),le.from==null&&this.collapsed&&!oi(this.doc,re)&&a&&ci(re,zr(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ce=Ze(this.lines[ue]),be=Pi(ce);be>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Br(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&&Wi(a,"markerCleared",a,this,b,E),y&&Ao(a),this.parent&&this.parent.clear()}},go.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=dn(ee.markedSpans,this);if(re.from!=null&&(x=Re(y?ee:Ae(ee),re.from),a==-1))return x;if(re.to!=null&&(b=Re(y?ee:Ae(ee),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Hr(b,function(){var E=y.line,ee=Ae(y.line),re=no(b,ee);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!oi(x.doc,E)&&x.height!=null){var le=x.height;x.height=null;var ue=ar(x)-le;ue&&ci(E,E.height+ue)}Wi(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||ft(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(ft(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},sn(go);function Ho(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return lr(a.cm,Ho)(a,y,x,b,E);var ee=new go(a,E),re=yt(y,x);if(b&&Mt(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=nt("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(et(a,y.line,y,x,ee)||y.line!=x.line&&et(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");Rn()}ee.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var le=y.line,ue=a.cm,ce;if(a.iter(le,x.line+1,function(ke){ue&&ee.collapsed&&!ue.options.lineWrapping&&Ze(ke)==ue.display.maxLine&&(ce=!0),ee.collapsed&&le!=y.line&&ci(ke,0),Zn(ke,new Zt(ee,le==y.line?y.ch:null,le==x.line?x.ch:null)),++le}),ee.collapsed&&a.iter(y.line,x.line+1,function(ke){oi(a,ke)&&ci(ke,0)}),ee.clearOnEnter&&_t(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Wn(),(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)Br(ue,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var be=y.line;be<=x.line;be++)ho(ue,be,"text");ee.atomic&&Ql(ue.doc),Wi(ue,"markerAdded",ue,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Wi(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},sn(ca);function vu(a,y,x,b,E){b=Mt(b),b.shared=!1;var ee=[Ho(a,y,x,b,E)],re=ee[0],le=b.widgetNode;return mo(a,function(ue){le&&(b.widgetNode=le.cloneNode(!0)),ee.push(Ho(ue,St(ue,y),St(ue,x),b,E));for(var ce=0;ce<ue.linked.length;++ce)if(ue.linked[ce].isParent)return;re=ze(ee)}),new ca(ee,re)}function cs(a){return a.findMarks(Re(a.first,0),a.clipPos(Re(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(yt(ee,re)){var le=Ho(a,ee,re,b.primary,b.primary.type);b.markers.push(le),le.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];mo(E.primary.doc,function(ue){return ee.push(ue)});for(var re=0;re<E.markers.length;re++){var le=E.markers[re];ft(ee,le.doc)==-1&&(le.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Dr=function(a,y,x,b,E){if(!(this instanceof Dr))return new Dr(a,y,x,b,E);x==null&&(x=0),sa.call(this,[new la([new Hi("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=Re(x,0);this.sel=po(ee),this.history=new Ta(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)),al(this,{from:ee,to:ee,text:a}),yr(this,po(ee),Ne)};Dr.prototype=ne(sa.prototype,{constructor:Dr,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=ri(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:sr(function(a){var y=Re(this.first,0),x=this.first+this.size-1;Ro(this,{from:y,to:Re(x,at(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),yr(this,po(y),Ne)}),replaceRange:function(a,y,x,b){y=St(this,y),x=x?St(this,x):y,zo(this,a,y,x,b)},getRange:function(a,y,x){var b=vn(this,St(this,a),St(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(Lt(this,a))return at(this,a)},getLineNumber:function(a){return Ae(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=at(this,a)),Ze(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return St(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:sr(function(a,y,x){ql(this,St(this,typeof a=="number"?Re(a,y||0):a),null,x)}),setSelection:sr(function(a,y,x){ql(this,St(this,a),St(this,y||a),x)}),extendSelection:sr(function(a,y,x){Fa(this,St(this,a),y&&St(this,y),x)}),extendSelections:sr(function(a,y){Yl(this,Jt(this,a),y)}),extendSelectionsBy:sr(function(a,y){var x=wt(this.sel.ranges,a);Yl(this,Jt(this,x),y)}),setSelections:sr(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Ii(St(this,a[E].anchor),St(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),yr(this,Qr(this.cm,b,y),x)}}),addSelection:sr(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Ii(St(this,a),St(this,y||a))),yr(this,Qr(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=vn(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=vn(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:sr(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 le=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)Ro(this,b[ue]);le?Xl(this,le):this.cm&&_o(this.cm)}),undo:sr(function(){Ia(this,"undo")}),redo:sr(function(){Ia(this,"redo")}),undoSelection:sr(function(){Ia(this,"undo",!0)}),redoSelection:sr(function(){Ia(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 Ta(this.history.maxGeneration),mo(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:Io(this.history.done),undone:Io(this.history.undone)}},setHistory:function(a){var y=this.history=new Ta(this.history.maxGeneration);y.done=Io(a.done.slice(0),null,!0),y.undone=Io(a.undone.slice(0),null,!0)},setGutterMarker:sr(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ie(E)&&(b.gutterMarkers=null),!0})}),clearGutter:sr(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ie(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Lt(this,a)||(y=a,a=at(this,a),!a))return null}else if(y=Ae(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:sr(function(a,y,x){return aa(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(dt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:sr(function(a,y,x){return aa(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(dt(x));if(!re)return!1;var le=re.index+re[0].length;b[E]=ee.slice(0,re.index)+(!re.index||le==ee.length?"":" ")+ee.slice(le)||null}else return!1;return!0})}),addLineWidget:sr(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,St(this,a),St(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=St(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=St(this,a);var y=[],x=at(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=St(this,a),y=St(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 le=0;le<re.length;le++){var ue=re[le];!(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}),St(this,Re(x,y))},indexFromPos:function(a){a=St(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 Dr(ri(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 Dr(ri(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 Gi&&(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];mo(a,function(E){return b.push(E.id)},!0),a.history=new Ta(null),a.history.done=Io(this.history.done,b),a.history.undone=Io(this.history.undone,b)}},iterLinkedDocs:function(a){mo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):bi(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:sr(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),Dr.prototype.eachLine=Dr.prototype.iter;var ds=0;function bu(a){var y=this;if(hs(y),!(st(y,a)||Qi(y.display,a))){wn(a),ve&&(ds=+new Date);var x=wo(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,le=function(){++re==E&&lr(y,function(){x=St(y.doc,x);var je={from:x,to:x,text:y.doc.splitLines(ee.filter(function(Ct){return Ct!=null}).join(y.doc.lineSeparator())),origin:"paste"};Ro(y.doc,je),Xl(y.doc,po(St(y.doc,x),St(y.doc,vo(je))))})()},ue=function(je,Ct){if(y.options.allowDropFileTypes&&ft(y.options.allowDropFileTypes,je.type)==-1){le();return}var Nt=new FileReader;Nt.onerror=function(){return le()},Nt.onload=function(){var Qt=Nt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qt)){le();return}ee[Ct]=Qt,le()},Nt.readAsText(je)},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 be=a.dataTransfer.getData("Text");if(be){var ke;if(y.state.draggingText&&!y.state.draggingText.copy&&(ke=y.listSelections()),_a(y.doc,po(x,x)),ke)for(var qe=0;qe<ke.length;++qe)zo(y.doc,"",ke[qe].anchor,ke[qe].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(je){}}}}function xu(a,y){if(ve&&(!a.state.draggingText||+new Date-ds<100)){Fn(y);return}if(!(st(a,y)||Qi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ye)){var x=Ge("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ge("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Be(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 Cu(){ps||(Su(),ps=!0)}function Su(){var a;_t(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(Eu)},100))}),_t(window,"blur",function(){return fs(Fo)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},da=0;da<10;da++)yo[da+48]=yo[da+96]=String(da);for(var Oa=65;Oa<=90;Oa++)yo[Oa]=String.fromCharCode(Oa);for(var ha=1;ha<=12;ha++)yo[ha+111]=yo[ha+63235]="F"+ha;var lo={};lo.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"},lo.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"},lo.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"},lo.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"]},lo.default=Se?lo.macDefault:lo.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 le=y[re];if(/^(cmd|meta|m)$/i.test(le))ee=!0;else if(/^a(lt)?$/i.test(le))x=!0;else if(/^(c|ctrl|control)$/i.test(le))b=!0;else if(/^s(hift)?$/i.test(le))E=!0;else throw new Error("Unrecognized modifier name: "+le)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Au(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=wt(x.split(" "),ku),ee=0;ee<E.length;ee++){var re=void 0,le=void 0;ee==E.length-1?(le=E.join(" "),re=b):(le=E.slice(0,ee+1).join(" "),re="...");var ue=y[le];if(!ue)y[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wo(a,y,x,b){y=Ra(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 Wo(a,y.fallthrough,x,b);for(var ee=0;ee<y.fallthrough.length;ee++){var re=Wo(a,y.fallthrough[ee],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:yo[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),(tt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(tt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function Ra(a){return typeof a=="string"?lo[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&yt(ee.from,ze(b).to)<=0;){var re=b.pop();if(yt(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}Hr(a,function(){for(var le=b.length-1;le>=0;le--)zo(a.doc,"",b[le].from,b[le].to,"+delete");_o(a)})}function cl(a,y,x){var b=Ot(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 Re(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=nn(x,y.doc.direction);if(ee){var re=E<0?ze(ee):ee[0],le=E<0==(re.level==1),ue=le?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);ce=E<0?x.text.length-1:0;var ke=Kr(y,be,ce).top;ce=Dt(function(qe){return Kr(y,be,qe).top==ke},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 Re(b,ce,ue)}}return new Re(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=nn(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=$t(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 le=function(fn,Dn){return cl(y,fn instanceof Re?fn.ch:fn,Dn)},ue,ce=function(fn){return a.options.lineWrapping?(ue=ue||uo(a,y),qi(a,y,ue,fn)):{begin:0,end:y.text.length}},be=ce(x.sticky=="before"?le(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var ke=re.level==1==b<0,qe=le(x,ke?1:-1);if(qe!=null&&(ke?qe<=re.to&&qe<=be.end:qe>=re.from&&qe>=be.begin)){var je=ke?"before":"after";return new Re(x.line,qe,je)}}var Ct=function(fn,Dn,pn){for(var Tn=function(Zi,ur){return ur?new Re(x.line,le(Zi,1),"before"):new Re(x.line,Zi,"after")};fn>=0&&fn<E.length;fn+=Dn){var Qn=E[fn],Kn=Dn>0==(Qn.level!=1),gi=Kn?pn.begin:le(pn.end,-1);if(Qn.from<=gi&&gi<Qn.to||(gi=Kn?Qn.from:le(Qn.to,-1),pn.begin<=gi&&gi<pn.end))return Tn(gi,Kn)}},Nt=Ct(ee+b,b,be);if(Nt)return Nt;var Qt=b>0?be.end:le(be.begin,-1);return Qt!=null&&!(b>0&&Qt==y.text.length)&&(Nt=Ct(b>0?0:E.length-1,b,ce(Qt)),Nt)?Nt:null}var fa={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ne)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=at(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Re(y.head.line+1,0)}:{from:y.head,to:Re(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Re(y.from().line,0),to:St(a.doc,Re(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Re(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(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 Zo(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(Re(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Re(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 Du(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")},ct)},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")},ct)},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},ct)},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=ge(a.getLine(ee.line),ee.ch,b);y.push(Pt(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Hr(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=at(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Re(E.line,E.ch-1)),E.ch>0)E=new Re(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Re(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=at(a.doc,E.line-1).text;re&&(E=new Re(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Re(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Ii(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Hr(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);_o(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=at(a.doc,y),b=Ze(x);return b!=x&&(y=Ae(b)),hl(!0,a,b,y,1)}function Du(a,y){var x=at(a.doc,y),b=mt(x);return b!=x&&(y=Ae(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=at(a.doc,x.line),E=nn(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 Re(x.line,re?0:ee,x.sticky)}return x}function za(a,y,x){if(typeof y=="string"&&(y=fa[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=xt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Pu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wo(y,a.options.extraKeys,x,a)||Wo(y,a.options.keyMap,x,a)}var Lu=new de;function pa(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())}),xs(a,E+" "+y,x,b))return!0}return xs(a,y,x,b)}function xs(a,y,x,b){var E=Pu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wi(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(wn(x),qa(a)),!!E}function ws(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return za(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return za(a,b)}):pa(a,x,y,function(b){return za(a,b)}):!1}function Tu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return za(a,b,!0)})}var fl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Fe(),!st(y,a))){ve&&me<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);fe&&(fl=b?x:null,!b&&x==88&&!ni&&(Se?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),te&&!Se&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Mu(y)}}function Mu(a){var y=a.display.lineDiv;ot(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(ht(y,"CodeMirror-crosshair"),ln(document,"keyup",x),ln(document,"mouseover",x))}_t(document,"keyup",x),_t(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),st(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(Qi(y.display,a)||st(y,a)||a.ctrlKey&&!a.altKey||Se&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fl){fl=null,wn(a);return}if(!(fe&&(!a.which||a.which<10)&&ws(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Tu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=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+Fu>a&&yt(y,this.pos)==0&&x==this.button};var va,ma;function _u(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new pl(x,a,y),va=null,"double"):(va=new pl(x,a,y),ma=null,"single")}function ks(a){var y=this,x=y.display;if(!(st(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,Qi(x,a)){Oe||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=wo(y,a),E=hi(a),ee=b?_u(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,ee,a))&&(E==1?b?Ou(y,b,ee,a):xi(a)==x.scroller&&wn(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Te?y.display.input.onContextMenu(a):Al(y)))}}}function Nu(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,pa(a,ms(ee,E),E,function(re){if(typeof re=="string"&&(re=fa[re]),!re)return!1;var le=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),le=re(a,x)!=xt}finally{a.state.suppressEdits=!1}return le})}function Iu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=Je?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=Se?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Se?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){ve?setTimeout(hn(kl,a),0):a.curOp.focus=Fe();var E=Iu(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&_i&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(yt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(yt(re.to(),y)>0||y.xRel<0)?Ru(a,b,y,E):zu(a,b,y,E)}function Ru(a,y,x,b){var E=a.display,ee=!1,re=lr(a,function(ce){Oe&&(E.scroller.draggable=!1),a.state.draggingText=!1,ln(E.wrapper.ownerDocument,"mouseup",re),ln(E.wrapper.ownerDocument,"mousemove",le),ln(E.scroller,"dragstart",ue),ln(E.scroller,"drop",re),ee||(wn(ce),b.addNew||Fa(a.doc,x,null,null,b.extend),Oe&&!Ye||ve&&me==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),le=function(ce){ee=ee||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},ue=function(){return ee=!0};Oe&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),_t(E.wrapper.ownerDocument,"mouseup",re),_t(E.wrapper.ownerDocument,"mousemove",le),_t(E.scroller,"dragstart",ue),_t(E.scroller,"drop",re),Al(a),setTimeout(function(){return E.input.focus()},20)}function As(a,y,x){if(x=="char")return new Ii(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Ii(Re(y.line,0),St(a.doc,Re(y.line+1,0)));var b=x(a,y);return new Ii(b.from,b.to)}function zu(a,y,x,b){var E=a.display,ee=a.doc;wn(y);var re,le,ue=ee.sel,ce=ue.ranges;if(b.addNew&&!b.extend?(le=ee.sel.contains(x),le>-1?re=ce[le]:re=new Ii(x,x)):(re=ee.sel.primary(),le=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Ii(x,x)),x=wo(a,y,!0,!0),le=-1;else{var be=As(a,x,b.unit);b.extend?re=sl(re,be.anchor,be.head,b.extend):re=be}b.addNew?le==-1?(le=ce.length,yr(ee,Qr(a,ce.concat([re]),le),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[le].empty()&&b.unit=="char"&&!b.extend?(yr(ee,Qr(a,ce.slice(0,le).concat(ce.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=ee.sel):ul(ee,le,re,rt):(le=0,yr(ee,new jr([re],0),rt),ue=ee.sel);var ke=x;function qe(pn){if(yt(ke,pn)!=0)if(ke=pn,b.unit=="rectangle"){for(var Tn=[],Qn=a.options.tabSize,Kn=ge(at(ee,x.line).text,x.ch,Qn),gi=ge(at(ee,pn.line).text,pn.ch,Qn),Zi=Math.min(Kn,gi),ur=Math.max(Kn,gi),Ui=Math.min(x.line,pn.line),Wr=Math.min(a.lastLine(),Math.max(x.line,pn.line));Ui<=Wr;Ui++){var Pr=at(ee,Ui).text,$i=on(Pr,Zi,Qn);Zi==ur?Tn.push(new Ii(Re(Ui,$i),Re(Ui,$i))):Pr.length>$i&&Tn.push(new Ii(Re(Ui,$i),Re(Ui,on(Pr,ur,Qn))))}Tn.length||Tn.push(new Ii(x,x)),yr(ee,Qr(a,ue.ranges.slice(0,le).concat(Tn),le),{origin:"*mouse",scroll:!1}),a.scrollIntoView(pn)}else{var Lr=re,pr=As(a,pn,b.unit),ir=Lr.anchor,er;yt(pr.anchor,ir)>0?(er=pr.head,ir=We(Lr.from(),pr.anchor)):(er=pr.anchor,ir=tn(Lr.to(),pr.head));var Ki=ue.ranges.slice(0);Ki[le]=Hu(a,new Ii(St(ee,ir),er)),yr(ee,Qr(a,Ki,le),rt)}}var je=E.wrapper.getBoundingClientRect(),Ct=0;function Nt(pn){var Tn=++Ct,Qn=wo(a,pn,!0,b.unit=="rectangle");if(Qn)if(yt(Qn,ke)!=0){a.curOp.focus=Fe(),qe(Qn);var Kn=Ba(E,ee);(Qn.line>=Kn.to||Qn.line<Kn.from)&&setTimeout(lr(a,function(){Ct==Tn&&Nt(pn)}),150)}else{var gi=pn.clientY<je.top?-20:pn.clientY>je.bottom?20:0;gi&&setTimeout(lr(a,function(){Ct==Tn&&(E.scroller.scrollTop+=gi,Nt(pn))}),50)}}function Qt(pn){a.state.selectingText=!1,Ct=1/0,pn&&(wn(pn),E.input.focus()),ln(E.wrapper.ownerDocument,"mousemove",fn),ln(E.wrapper.ownerDocument,"mouseup",Dn),ee.history.lastSelOrigin=null}var fn=lr(a,function(pn){pn.buttons===0||!hi(pn)?Qt(pn):Nt(pn)}),Dn=lr(a,Qt);a.state.selectingText=Dn,_t(E.wrapper.ownerDocument,"mousemove",fn),_t(E.wrapper.ownerDocument,"mouseup",Dn)}function Hu(a,y){var x=y.anchor,b=y.head,E=at(a.doc,x.line);if(yt(x,b)==0&&x.sticky==b.sticky)return y;var ee=nn(E);if(!ee)return y;var re=$t(ee,x.ch,x.sticky),le=ee[re];if(le.from!=x.ch&&le.to!=x.ch)return y;var ue=re+(le.from==x.ch==(le.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 be=$t(ee,b.ch,b.sticky),ke=be-re||(b.ch-x.ch)*(le.level==1?-1:1);be==ue-1||be==ue?ce=ke<0:ce=ke>0}var qe=ee[ue+(ce?-1:0)],je=ce==(qe.level==1),Ct=je?qe.from:qe.to,Nt=je?"after":"before";return x.ch==Ct&&x.sticky==Nt?y:new Ii(new Re(x.line,Ct,Nt),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(qe){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&wn(y);var re=a.display,le=re.lineDiv.getBoundingClientRect();if(ee>le.bottom||!Rt(a,x))return jt(y);ee-=le.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 be=Pe(a.doc,ee),ke=a.display.gutterSpecs[ue];return kn(a,x,a,be,ke.className,y),jt(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function Ds(a,y){Qi(a.display,y)||Wu(a,y)||st(a,y,"contextmenu")||Te||a.display.input.onContextMenu(y)}function Wu(a,y){return Rt(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Ps(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xo(a)}var jo={toString:function(){return"CodeMirror.Init"}},Ls={},Ha={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(le,ue,ce){ce!=jo&&ee(le,ue,ce)}:ee)}a.defineOption=x,a.Init=jo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,ol(b)},!0),x("indentUnit",2,ol,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ra(b),xo(b),Br(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 be=ue.text.indexOf(E,ce);if(be==-1)break;ce=be+E.length,ee.push(Re(re,be))}re++});for(var le=ee.length-1;le>=0;le--)zo(b.doc,E,ee[le],Re(ee[le].line,ee[le].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!=jo&&b.refresh()}),x("specialCharPlaceholder",xr,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Ee?"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",!lt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Ps(b),ia(b)},!0),x("keyMap","default",function(b,E,ee){var re=Ra(E),le=ee!=jo&&Ra(ee);le&&le.detach&&le.detach(b,re),re.attach&&re.attach(b,le||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=il(E,b.options.lineNumbers),ia(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return No(b)},!0),x("scrollbarStyle","native",function(b){Ml(b),No(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=il(b.options.gutters,E),ia(b)},!0),x("firstLineNumber",1,ia,!0),x("lineNumberFormatter",function(b){return b},ia,!0),x("showCursorWhenSelecting",!1,Jo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Fo(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,ju),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Jo,!0),x("singleCursorHeightPerLine",!0,Jo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ra,!0),x("addModeClass",!1,ra,!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,ra,!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 ju(a,y,x){var b=x&&x!=jo;if(!y!=!b){var E=a.display.dragFunctions,ee=y?_t:ln;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(ot(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ht(a.display.wrapper,"CodeMirror-wrap"),Ci(a)),Ya(a),Br(a),xo(a),setTimeout(function(){return No(a)},100)}function Gi(a,y){var x=this;if(!(this instanceof Gi))return new Gi(a,y);this.options=y=y?Mt(y):{},Mt(Ls,y,!1);var b=y.value;typeof b=="string"?b=new Dr(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Gi.inputStyles[y.inputStyle](this),ee=this.display=new iu(a,b,E,y);ee.wrapper.CodeMirror=this,Ps(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ml(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&&!Ee&&ee.input.focus(),ve&&me<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),ko(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Ee||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Xa(x)},20):Fo(this);for(var re in Ha)Ha.hasOwnProperty(re)&&Ha[re](this,y[re],jo);Nl(this),y.finishInit&&y.finishInit(this);for(var le=0;le<ml.length;++le)ml[le](this);Ao(this),Oe&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Gi.defaults=Ls,Gi.optionHandlers=Ha;function Vu(a){var y=a.display;_t(y.scroller,"mousedown",lr(a,ks)),ve&&me<11?_t(y.scroller,"dblclick",lr(a,function(ue){if(!st(a,ue)){var ce=wo(a,ue);if(!(!ce||vl(a,ue)||Qi(a.display,ue))){wn(ue);var be=a.findWordAt(ce);Fa(a.doc,be.anchor,be.head)}}})):_t(y.scroller,"dblclick",function(ue){return st(a,ue)||wn(ue)}),_t(y.scroller,"contextmenu",function(ue){return Ds(a,ue)}),_t(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||Ds(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 be=ce.left-ue.left,ke=ce.top-ue.top;return be*be+ke*ke>20*20}_t(y.scroller,"touchstart",function(ue){if(!st(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)}}),_t(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),_t(y.scroller,"touchend",function(ue){var ce=y.activeTouch;if(ce&&!Qi(y,ue)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var be=a.coordsChar(y.activeTouch,"page"),ke;!ce.prev||re(ce,ce.prev)?ke=new Ii(be,be):!ce.prev.prev||re(ce,ce.prev.prev)?ke=a.findWordAt(be):ke=new Ii(Re(be.line,0),St(a.doc,Re(be.line+1,0))),a.setSelection(ke.anchor,ke.head),a.focus(),wn(ue)}E()}),_t(y.scroller,"touchcancel",E),_t(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),So(a,y.scroller.scrollLeft,!0),kn(a,"scroll",a))}),_t(y.scroller,"mousewheel",function(ue){return Rl(a,ue)}),_t(y.scroller,"DOMMouseScroll",function(ue){return Rl(a,ue)}),_t(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){st(a,ue)||Fn(ue)},over:function(ue){st(a,ue)||(wu(a,ue),Fn(ue))},start:function(ue){return xu(a,ue)},drop:lr(a,bu),leave:function(ue){st(a,ue)||hs(a)}};var le=y.input.getField();_t(le,"keyup",function(ue){return Ss.call(a,ue)}),_t(le,"keydown",lr(a,Cs)),_t(le,"keypress",lr(a,Es)),_t(le,"focus",function(ue){return Xa(a,ue)}),_t(le,"blur",function(ue){return Fo(a,ue)})}var ml=[];Gi.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=Cn(a,y).state:x="prev");var re=a.options.tabSize,le=at(E,y),ue=ge(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ce=le.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(le.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(ee,le.text.slice(ce.length),le.text),be==xt||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=ge(at(E,y-1).text,null,re):be=0:x=="add"?be=ue+a.options.indentUnit:x=="subtract"?be=ue-a.options.indentUnit:typeof x=="number"&&(be=ue+x),be=Math.max(0,be);var ke="",qe=0;if(a.options.indentWithTabs)for(var je=Math.floor(be/re);je;--je)qe+=re,ke+=" ";if(qe<be&&(ke+=Pt(be-qe)),ke!=ce)return zo(E,ke,Re(y,0),Re(y,ce.length),"+input"),le.stateAfter=null,!0;for(var Ct=0;Ct<E.sel.ranges.length;Ct++){var Nt=E.sel.ranges[Ct];if(Nt.head.line==y&&Nt.head.ch<ce.length){var Qt=Re(y,ce.length);ul(E,Ct,new Ii(Qt,Qt));break}}}var $r=null;function Wa(a){$r=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,le=E=="paste"||a.state.pasteIncoming>re,ue=bi(y),ce=null;if(le&&b.ranges.length>1)if($r&&$r.text.join(`
`)==y){if(b.ranges.length%$r.text.length==0){ce=[];for(var be=0;be<$r.text.length;be++)ce.push(ee.splitLines($r.text[be]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=wt(ue,function(fn){return[fn]}));for(var ke=a.curOp.updateInput,qe=b.ranges.length-1;qe>=0;qe--){var je=b.ranges[qe],Ct=je.from(),Nt=je.to();je.empty()&&(x&&x>0?Ct=Re(Ct.line,Ct.ch-x):a.state.overwrite&&!le?Nt=Re(Nt.line,Math.min(at(ee,Nt.line).text.length,Nt.ch+ze(ue).length)):le&&$r&&$r.lineWise&&$r.text.join(`
`)==ue.join(`
`)&&(Ct=Nt=Re(Ct.line,0)));var Qt={from:Ct,to:Nt,text:ce?ce[qe%ce.length]:ue,origin:E||(le?"paste":a.state.cutIncoming>re?"cut":"+input")};Ro(a.doc,Qt),Wi(a,"inputRead",a,Qt)}y&&!le&&Ms(a,y),_o(a),a.curOp.updateInput<2&&(a.curOp.updateInput=ke),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ts(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Hr(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ms(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 le=0;le<ee.electricChars.length;le++)if(y.indexOf(ee.electricChars.charAt(le))>-1){re=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(at(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Wi(a,"electricInput",a,E.head.line)}}}function Fs(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:Re(E,0),head:Re(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function _s(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=Ge("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ge("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Oe?a.style.width="1000px":a.setAttribute("wrap","off"),He&&(a.style.border="1px solid black"),_s(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)&&lr(this,y[b])(this,E,re),kn(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"](Ra(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:Sr(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++,Br(this)}),removeOverlay:Sr(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++,Br(this);return}}}),indentLine:Sr(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Lt(this.doc,b)&&ga(this,b,E,ee)}),indentSelection:Sr(function(b){for(var E=this.doc.sel.ranges,ee=-1,re=0;re<E.length;re++){var le=E[re];if(le.empty())le.head.line>ee&&(ga(this,le.head.line,b,!0),ee=le.head.line,re==this.doc.sel.primIndex&&_o(this));else{var ue=le.from(),ce=le.to(),be=Math.max(ee,ue.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var ke=be;ke<ee;++ke)ga(this,ke,b);var qe=this.doc.sel.ranges;ue.ch==0&&E.length==qe.length&&qe[re].from().ch>0&&ul(this.doc,re,new Ii(ue,qe[re].to()),Ne)}}}),getTokenAt:function(b,E){return un(this,b,E)},getLineTokens:function(b,E){return un(this,Re(b),E,!0)},getTokenTypeAt:function(b){b=St(this.doc,b);var E=ut(this,at(this.doc,b.line)),ee=0,re=(E.length-1)/2,le=b.ch,ue;if(le==0)ue=E[2];else for(;;){var ce=ee+re>>1;if((ce?E[ce*2-1]:0)>=le)re=ce;else if(E[ce*2+1]<le)ee=ce+1;else{ue=E[ce*2+2];break}}var be=ue?ue.indexOf("overlay "):-1;return be<0?ue:be==0?null:ue.slice(0,be-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],le=this.getModeAt(b);if(typeof le[E]=="string")re[le[E]]&&ee.push(re[le[E]]);else if(le[E])for(var ue=0;ue<le[E].length;ue++){var ce=re[le[E][ue]];ce&&ee.push(ce)}else le.helperType&&re[le.helperType]?ee.push(re[le.helperType]):re[le.name]&&ee.push(re[le.name]);for(var be=0;be<re._global.length;be++){var ke=re._global[be];ke.pred(le,this)&&ft(ee,ke.val)==-1&&ee.push(ke.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=en(ee,b==null?ee.first+ee.size-1:b),Cn(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=St(this.doc,b):ee=b?re.from():re.to(),Ar(this,ee,E||"page")},charCoords:function(b,E){return Mo(this,St(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),fr(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Pe(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var re=!1,le;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),le=at(this.doc,b)}else le=b;return To(this,le,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-fi(le):0)},defaultTextHeight:function(){return zr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,re,le){var ue=this.display;b=Ar(this,St(this.doc,b));var ce=b.bottom,be=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 ke=Math.max(ue.wrapper.clientHeight,this.doc.height),qe=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>ke)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=ke&&(ce=b.bottom),be+E.offsetWidth>qe&&(be=qe-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",le=="right"?(be=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(le=="left"?be=0:le=="middle"&&(be=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),ee&&js(this,{left:be,top:ce,right:be+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:Sr(Cs),triggerOnKeyPress:Sr(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:Sr(ks),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:Sr(function(b){Ms(this,b)}),findPosH:function(b,E,ee,re){var le=1;E<0&&(le=-1,E=-E);for(var ue=St(this.doc,b),ce=0;ce<E&&(ue=yl(this.doc,ue,le,ee,re),!ue.hitSide);++ce);return ue},moveH:Sr(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()},ct)}),deleteH:Sr(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(le){var ue=yl(re,le.head,b,E,!1);return b<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(b,E,ee,re){var le=1,ue=re;E<0&&(le=-1,E=-E);for(var ce=St(this.doc,b),be=0;be<E;++be){var ke=Ar(this,ce,"div");if(ue==null?ue=ke.left:ke.left=ue,ce=Is(this,ke,le,ee),ce.hitSide)break}return ce},moveV:Sr(function(b,E){var ee=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(ue)return b<0?be.from():be.to();var ke=Ar(ee,be.head,"div");be.goalColumn!=null&&(ke.left=be.goalColumn),le.push(ke.left);var qe=Is(ee,ke,b,E);return E=="page"&&be==re.sel.primary()&&Qa(ee,Mo(ee,qe,"div").top-ke.top),qe},ct),le.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=le[ce]}),findWordAt:function(b){var E=this.doc,ee=at(E,b.line).text,re=b.ch,le=b.ch;if(ee){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||le==ee.length)&&re?--re:++le;for(var ce=ee.charAt(re),be=se(ce,ue)?function(ke){return se(ke,ue)}:/\s/.test(ce)?function(ke){return/\s/.test(ke)}:function(ke){return!/\s/.test(ke)&&!se(ke)};re>0&&be(ee.charAt(re-1));)--re;for(;le<ee.length&&be(ee.charAt(le));)++le}return new Ii(Re(b.line,re),Re(b.line,le))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ot(this.display.cursorDiv,"CodeMirror-overwrite"):ht(this.display.cursorDiv,"CodeMirror-overwrite"),kn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Fe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Sr(function(b,E){Qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Or(this)-this.display.barHeight,width:b.scrollWidth-Or(this)-this.display.barWidth,clientHeight:oo(this),clientWidth:to(this)}},scrollIntoView:Sr(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:Re(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?Gs(this,b):Dl(this,b.from,b.to,b.margin)}),setSize:Sr(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&&Yo(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ce=0;ce<ue.widgets.length;ce++)if(ue.widgets[ce].noHScroll){ho(ee,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,kn(this,"refresh",this)}),operation:function(b){return Hr(this,b)},startOperation:function(){return ko(this)},endOperation:function(){return Ao(this)},refresh:Sr(function(){var b=this.display.cachedTextHeight;Br(this),this.curOp.forceUpdate=!0,xo(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-zr(this.display))>.5||this.options.lineWrapping)&&Ya(this),kn(this,"refresh",this)}),swapDoc:Sr(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),xo(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wi(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}},sn(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,le=at(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function ce(){var Dn=y.line+ue;return Dn<a.first||Dn>=a.first+a.size?!1:(y=new Re(Dn,y.ch,y.sticky),le=at(a,Dn))}function be(Dn){var pn;if(b=="codepoint"){var Tn=le.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Tn)?pn=null:pn=new Re(y.line,Math.max(0,Math.min(le.text.length,y.ch+x*(Tn>=55296&&Tn<56320?2:1))),-x)}else E?pn=Bu(a.cm,le,y,x):pn=dl(le,y,x);if(pn==null)if(!Dn&&ce())y=hl(E,a.cm,le,y.line,ue);else return!1;else y=pn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var ke=null,qe=b=="group",je=a.cm&&a.cm.getHelper(y,"wordChars"),Ct=!0;!(x<0&&!be(!Ct));Ct=!1){var Nt=le.text.charAt(y.ch)||`
`,Qt=se(Nt,je)?"w":qe&&Nt==`
`?"n":!qe||/\s/.test(Nt)?null:"p";if(qe&&!Ct&&!Qt&&(Qt="s"),ke&&ke!=Qt){x<0&&(x=1,be(),y.sticky="after");break}if(Qt&&(ke=Qt),x>0&&!be(!Ct))break}var fn=Na(a,y,ee,re,!0);return Xt(ee,fn)&&(fn.hitSide=!0),fn}function Is(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var le=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*zr(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=fr(a,ee,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Oi=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};Oi.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;_s(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}_t(E,"paste",function(le){!ee(le)||st(b,le)||Ts(le,b)||me<=11&&setTimeout(lr(b,function(){return y.updateFromDOM()}),20)}),_t(E,"compositionstart",function(le){y.composing={data:le.data,done:!1}}),_t(E,"compositionupdate",function(le){y.composing||(y.composing={data:le.data,done:!1})}),_t(E,"compositionend",function(le){y.composing&&(le.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),_t(E,"touchstart",function(){return x.forceCompositionEnd()}),_t(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(le){if(!(!ee(le)||st(b,le))){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()}),le.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Fs(b);Wa({lineWise:!0,text:ue.text}),le.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,Ne),b.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ce=$r.text.join(`
`);if(le.clipboardData.setData("Text",ce),le.clipboardData.getData("Text")==ce){le.preventDefault();return}}var be=Ns(),ke=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),ke.value=$r.text.join(`
`);var qe=document.activeElement;Et(ke),setTimeout(function(){b.display.lineSpace.removeChild(be),qe.focus(),qe==E&&x.showPrimarySelection()},50)}}_t(E,"copy",re),_t(E,"cut",re)},Oi.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Oi.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Oi.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Oi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Oi.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=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&re&&!re.bad&&yt(We(ee,re),b)==0&&yt(tn(ee,re),E)==0)){var le=y.display.view,ue=b.line>=y.display.viewFrom&&Os(y,b)||{node:le[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Os(y,E);if(!ce){var be=le[le.length-1].measure,ke=be.maps?be.maps[be.maps.length-1]:be.map;ce={node:ke[ke.length-1],offset:ke[ke.length-2]-ke[ke.length-3]}}if(!ue||!ce){a.removeAllRanges();return}var qe=a.rangeCount&&a.getRangeAt(0),je;try{je=Me(ue.node,ue.offset,ce.offset,ce.node)}catch(Ct){}je&&(!te&&y.state.focused?(a.collapse(ue.node,ue.offset),je.collapsed||(a.removeAllRanges(),a.addRange(je))):(a.removeAllRanges(),a.addRange(je)),qe&&a.anchorNode==null?a.addRange(qe):te&&this.startGracePeriod()),this.rememberSelection()}},Oi.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)},Oi.prototype.showMultipleSelections=function(a){Be(this.cm.display.cursorDiv,a.cursors),Be(this.cm.display.selectionDiv,a.selection)},Oi.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Oi.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Qe(this.div,y)},Oi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Oi.prototype.blur=function(){this.div.blur()},Oi.prototype.getField=function(){return this.div},Oi.prototype.supportsTouch=function(){return!0},Oi.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Hr(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)},Oi.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Oi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ce&&we&&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=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Hr(y,function(){yr(y.doc,po(x,b),Ne),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Oi.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=Re(b.line-1,at(a.doc,b.line-1).length)),E.ch==at(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Re(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,le;b.line==y.viewFrom||(ee=Co(a,b.line))==0?(re=Ae(y.view[0].line),le=y.view[0].node):(re=Ae(y.view[ee].line),le=y.view[ee-1].node.nextSibling);var ue=Co(a,E.line),ce,be;if(ue==y.view.length-1?(ce=y.viewTo-1,be=y.lineDiv.lastChild):(ce=Ae(y.view[ue+1].line)-1,be=y.view[ue+1].node.previousSibling),!le)return!1;for(var ke=a.doc.splitLines(Yu(a,le,be,re,ce)),qe=vn(a.doc,Re(re,0),Re(ce,at(a.doc,ce).text.length));ke.length>1&&qe.length>1;)if(ze(ke)==ze(qe))ke.pop(),qe.pop(),ce--;else if(ke[0]==qe[0])ke.shift(),qe.shift(),re++;else break;for(var je=0,Ct=0,Nt=ke[0],Qt=qe[0],fn=Math.min(Nt.length,Qt.length);je<fn&&Nt.charCodeAt(je)==Qt.charCodeAt(je);)++je;for(var Dn=ze(ke),pn=ze(qe),Tn=Math.min(Dn.length-(ke.length==1?je:0),pn.length-(qe.length==1?je:0));Ct<Tn&&Dn.charCodeAt(Dn.length-Ct-1)==pn.charCodeAt(pn.length-Ct-1);)++Ct;if(ke.length==1&&qe.length==1&&re==b.line)for(;je&&je>b.ch&&Dn.charCodeAt(Dn.length-Ct-1)==pn.charCodeAt(pn.length-Ct-1);)je--,Ct++;ke[ke.length-1]=Dn.slice(0,Dn.length-Ct).replace(/^\u200b+/,""),ke[0]=ke[0].slice(je).replace(/\u200b+$/,"");var Qn=Re(re,je),Kn=Re(ce,qe.length?ze(qe).length-Ct:0);if(ke.length>1||ke[0]||yt(Qn,Kn))return zo(a.doc,ke,Qn,Kn,"+input"),!0},Oi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Oi.prototype.reset=function(){this.forceCompositionEnd()},Oi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Oi.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))},Oi.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Hr(this.cm,function(){return Br(a.cm)})},Oi.prototype.setUneditable=function(a){a.contentEditable="false"},Oi.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||lr(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Oi.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Oi.prototype.onContextMenu=function(){},Oi.prototype.resetPosition=function(){},Oi.prototype.needsContentAttribute=!0;function Os(a,y){var x=no(a,y.line);if(!x||x.hidden)return null;var b=at(a.doc,y.line),E=Lo(x,b,y.line),ee=nn(b,a.doc.direction),re="left";if(ee){var le=$t(ee,y.ch);re=le%2?"right":"left"}var ue=xa(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 Go(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,le=a.doc.lineSeparator(),ue=!1;function ce(je){return function(Ct){return Ct.id==je}}function be(){re&&(ee+=le,ue&&(ee+=le),re=ue=!1)}function ke(je){je&&(be(),ee+=je)}function qe(je){if(je.nodeType==1){var Ct=je.getAttribute("cm-text");if(Ct){ke(Ct);return}var Nt=je.getAttribute("cm-marker"),Qt;if(Nt){var fn=a.findMarks(Re(b,0),Re(E+1,0),ce(+Nt));fn.length&&(Qt=fn[0].find(0))&&ke(vn(a.doc,Qt.from,Qt.to).join(le));return}if(je.getAttribute("contenteditable")=="false")return;var Dn=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;Dn&&be();for(var pn=0;pn<je.childNodes.length;pn++)qe(je.childNodes[pn]);/^(pre|p)$/i.test(je.nodeName)&&(ue=!0),Dn&&(re=!0)}else je.nodeType==3&&ke(je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;qe(y),y!=x;)y=y.nextSibling,ue=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(Re(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 qu(ee,y,x)}}function qu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Qe(b,y))return Go(Re(Ae(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?ze(a.rest):a.line;return Go(Re(Ae(ee),ee.text.length),E)}var re=y.nodeType==3?y:null,le=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));le.parentNode!=b;)le=le.parentNode;var ue=a.measure,ce=ue.maps;function be(Qt,fn,Dn){for(var pn=-1;pn<(ce?ce.length:0);pn++)for(var Tn=pn<0?ue.map:ce[pn],Qn=0;Qn<Tn.length;Qn+=3){var Kn=Tn[Qn+2];if(Kn==Qt||Kn==fn){var gi=Ae(pn<0?a.line:a.rest[pn]),Zi=Tn[Qn]+Dn;return(Dn<0||Kn!=Qt)&&(Zi=Tn[Qn+(Dn?1:0)]),Re(gi,Zi)}}}var ke=be(re,le,x);if(ke)return Go(ke,E);for(var qe=le.nextSibling,je=re?re.nodeValue.length-x:0;qe;qe=qe.nextSibling){if(ke=be(qe,qe.firstChild,0),ke)return Go(Re(ke.line,ke.ch-je),E);je+=qe.textContent.length}for(var Ct=le.previousSibling,Nt=x;Ct;Ct=Ct.previousSibling){if(ke=be(Ct,Ct.firstChild,-1),ke)return Go(Re(ke.line,ke.ch+Nt),E);Nt+=Ct.textContent.length}}var Xi=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};Xi.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),He&&(E.style.width="0px"),_t(E,"input",function(){ve&&me>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),_t(E,"paste",function(re){st(b,re)||Ts(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!st(b,re)){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var le=Fs(b);Wa({lineWise:!0,text:le.text}),re.type=="cut"?b.setSelections(le.ranges,null,Ne):(x.prevInput="",E.value=le.text.join(`
`),Et(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}_t(E,"cut",ee),_t(E,"copy",ee),_t(a.scroller,"paste",function(re){if(!(Qi(a,re)||st(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,E.dispatchEvent(le)}}),_t(a.lineSpace,"selectstart",function(re){Qi(a,re)||wn(re)}),_t(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),_t(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xi.prototype.createField=function(a){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Xi.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xi.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Ar(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},Xi.prototype.showSelection=function(a){var y=this.cm,x=y.display;Be(x.cursorDiv,a.cursors),Be(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xi.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&&Et(this.textarea),ve&&me>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",ve&&me>=9&&(this.hasSelection=null))}},Xi.prototype.getField=function(){return this.textarea},Xi.prototype.supportsTouch=function(){return!1},Xi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ee||Fe()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xi.prototype.blur=function(){this.textarea.blur()},Xi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xi.prototype.receivedFocus=function(){this.slowPoll()},Xi.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xi.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)},Xi.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Si(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(ve&&me>=9&&this.hasSelection===E||Se&&/[\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,le=Math.min(b.length,E.length);re<le&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Hr(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},Xi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xi.prototype.onKeyPress=function(){ve&&me>=9&&(this.hasSelection=null),this.fastPoll()},Xi.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=wo(x,a),re=b.scroller.scrollTop;if(!ee||fe)return;var le=x.options.resetSelectionOnContextMenu;le&&x.doc.sel.contains(ee)==-1&&lr(x,yr)(x.doc,po(ee),Ne);var ue=E.style.cssText,ce=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ke;Oe&&(ke=window.scrollY),b.input.focus(),Oe&&window.scrollTo(null,ke),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function qe(){if(E.selectionStart!=null){var Nt=x.somethingSelected(),Qt="\u200B"+(Nt?E.value:"");E.value="\u21DA",E.value=Qt,y.prevInput=Nt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Qt.length,b.selForContextMenu=x.doc.sel}}function je(){if(y.contextMenuPending==je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=ue,ve&&me<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!ve||ve&&me<9)&&qe();var Nt=0,Qt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?lr(x,ts)(x):Nt++<10?b.detectingSelectAll=setTimeout(Qt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Qt,200)}}if(ve&&me>=9&&qe(),Te){Fn(a);var Ct=function(){ln(window,"mouseup",Ct),setTimeout(je,20)};_t(window,"mouseup",Ct)}else setTimeout(je,50)},Xi.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xi.prototype.setUneditable=function(){},Xi.prototype.needsContentAttribute=!1;function Xu(a,y){if(y=y?Mt(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=Fe();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=le.getValue()}var E;if(a.form&&(_t(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=re}}catch(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&&(ln(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var le=Gi(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return le}function Ju(a){a.off=ln,a.on=_t,a.wheelEventPixels=ru,a.Doc=Dr,a.splitLines=bi,a.countColumn=ge,a.findColumn=on,a.isWordChar=oe,a.Pass=xt,a.signal=kn,a.Line=Hi,a.changeEnd=vo,a.scrollbarModel=Tl,a.Pos=Re,a.cmpPos=yt,a.modes=xn,a.mimeModes=Sn,a.resolveMode=Vn,a.getMode=vi,a.modeExtensions=Di,a.extendMode=Ei,a.copyState=ii,a.startState=Fi,a.innerMode=ui,a.commands=fa,a.keyMap=lo,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wo,a.normalizeKeyMap=Au,a.StringStream=zt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=wn,a.e_stopPropagation=Jn,a.e_stop=Fn,a.addClass=ot,a.contains=Qe,a.rmClass=ht,a.keyNames=yo}Zu(Gi),Uu(Gi);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Dr.prototype)Dr.prototype.hasOwnProperty(ja)&&ft(Qu,ja)<0&&(Gi.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Dr.prototype[ja]));return sn(Dr),Gi.inputStyles={textarea:Xi,contenteditable:Oi},Gi.defineMode=function(a){!Gi.defaults.mode&&a!="null"&&(Gi.defaults.mode=a),ti.apply(this,arguments)},Gi.defineMIME=zi,Gi.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Gi.defineMIME("text/plain","null"),Gi.defineExtension=function(a,y){Gi.prototype[a]=y},Gi.defineDocExtension=function(a,y){Dr.prototype[a]=y},Gi.fromTextArea=Xu,Ju(Gi),Gi.version="5.58.2",Gi})},25419:function(It,Ht,he){(function(te){te(he(89780),he(15525),he(98101))})(function(te){"use strict";te.defineMode("markdown",function(Ke,_e){var Xe=te.getMode(Ke,"text/html"),ve=Xe.name=="null";function me(ge){if(te.findModeByName){var de=te.findModeByName(ge);de&&(ge=de.mime||de.mimes[0])}var ft=te.getMode(Ke,ge);return ft.name=="null"?null:ft}_e.highlightFormatting===void 0&&(_e.highlightFormatting=!1),_e.maxBlockquoteDepth===void 0&&(_e.maxBlockquoteDepth=0),_e.taskLists===void 0&&(_e.taskLists=!1),_e.strikethrough===void 0&&(_e.strikethrough=!1),_e.emoji===void 0&&(_e.emoji=!1),_e.fencedCodeBlockHighlighting===void 0&&(_e.fencedCodeBlockHighlighting=!0),_e.fencedCodeBlockDefaultMode===void 0&&(_e.fencedCodeBlockDefaultMode="text/plain"),_e.xml===void 0&&(_e.xml=!0),_e.tokenTypeOverrides===void 0&&(_e.tokenTypeOverrides={});var Oe={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 Ve in Oe)Oe.hasOwnProperty(Ve)&&_e.tokenTypeOverrides[Ve]&&(Oe[Ve]=_e.tokenTypeOverrides[Ve]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ye=/^\[(x| )\](?=\s)/i,pe=_e.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,it=/^ {0,3}(?:\={1,}|-{2,})\s*$/,He=/^[^#!\[\]*_\\<>` "'(~:]+/,Ce=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ee=/^\s*\[[^\]]+?\]:.*$/,Se=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Je=" ";function lt(ge,de,ft){return de.f=de.inline=ft,ft(ge,de)}function $e(ge,de,ft){return de.f=de.block=ft,ft(ge,de)}function tt(ge){return!ge||!/\S/.test(ge.string)}function Te(ge){if(ge.linkTitle=!1,ge.linkHref=!1,ge.linkText=!1,ge.em=!1,ge.strong=!1,ge.strikethrough=!1,ge.quote=0,ge.indentedCode=!1,ge.f==ht){var de=ve;if(!de){var ft=te.innerMode(Xe,ge.htmlState);de=ft.mode.name=="xml"&&ft.state.tagStart===null&&!ft.state.context&&ft.state.tokenize.isInText}de&&(ge.f=nt,ge.block=dt,ge.htmlState=null)}return ge.trailingSpace=0,ge.trailingSpaceNewLine=!1,ge.prevLine=ge.thisLine,ge.thisLine={stream:null},null}function dt(ge,de){var ft=ge.column()===de.indentation,qt=tt(de.prevLine.stream),xt=de.indentedCode,Ne=de.prevLine.hr,rt=de.list!==!1,ct=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var on=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,rt)){for(de.list=null;on<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=on-de.listStack[de.listStack.length-1])}var vt=!qt&&!Ne&&!de.prevLine.header&&(!rt||!xt)&&!de.prevLine.fencedCodeEnd,Pt=(de.list===!1||Ne||qt)&&de.indentation<=ct&&ge.match(we),ze=null;if(de.indentationDiff>=4&&(xt||de.prevLine.fencedCodeEnd||de.prevLine.header||qt))return ge.skipToEnd(),de.indentedCode=!0,Oe.code;if(ge.eatSpace())return null;if(ft&&de.indentation<=ct&&(ze=ge.match(pe))&&ze[1].length<=6)return de.quote=0,de.header=ze[1].length,de.thisLine.header=!0,_e.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Be(de);if(de.indentation<=ct&&ge.eat(">"))return de.quote=ft?1:de.quote+1,_e.highlightFormatting&&(de.formatting="quote"),ge.eatSpace(),Be(de);if(!Pt&&!de.setext&&ft&&de.indentation<=ct&&(ze=ge.match(fe))){var wt=ze[1]?"ol":"ul";return de.indentation=on+ge.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,_e.taskLists&&ge.match(Ye,!1)&&(de.taskList=!0),de.f=de.inline,_e.highlightFormatting&&(de.formatting=["list","list-"+wt]),Be(de)}else{if(ft&&de.indentation<=ct&&(ze=ge.match(Ce,!0)))return de.quote=0,de.fencedEndRE=new RegExp(ze[1]+"+ *$"),de.localMode=_e.fencedCodeBlockHighlighting&&me(ze[2]||_e.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=te.startState(de.localMode)),de.f=de.block=Vt,_e.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Be(de);if(de.setext||(!vt||!rt)&&!de.quote&&de.list===!1&&!de.code&&!Pt&&!Ee.test(ge.string)&&(ze=ge.lookAhead(1))&&(ze=ze.match(it)))return de.setext?(de.header=de.setext,de.setext=0,ge.skipToEnd(),_e.highlightFormatting&&(de.formatting="header")):(de.header=ze[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Be(de);if(Pt)return ge.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,Oe.hr;if(ge.peek()==="[")return lt(ge,de,Ut)}return lt(ge,de,de.inline)}function ht(ge,de){var ft=Xe.token(ge,de.htmlState);if(!ve){var qt=te.innerMode(Xe,de.htmlState);(qt.mode.name=="xml"&&qt.state.tagStart===null&&!qt.state.context&&qt.state.tokenize.isInText||de.md_inside&&ge.current().indexOf(">")>-1)&&(de.f=nt,de.block=dt,de.htmlState=null)}return ft}function Vt(ge,de){var ft=de.listStack[de.listStack.length-1]||0,qt=de.indentation<ft,xt=ft+3;if(de.fencedEndRE&&de.indentation<=xt&&(qt||ge.match(de.fencedEndRE))){_e.highlightFormatting&&(de.formatting="code-block");var Ne;return qt||(Ne=Be(de)),de.localMode=de.localState=null,de.block=dt,de.f=nt,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,qt?$e(ge,de,de.block):Ne}else return de.localMode?de.localMode.token(ge,de.localState):(ge.skipToEnd(),Oe.code)}function Be(ge){var de=[];if(ge.formatting){de.push(Oe.formatting),typeof ge.formatting=="string"&&(ge.formatting=[ge.formatting]);for(var ft=0;ft<ge.formatting.length;ft++)de.push(Oe.formatting+"-"+ge.formatting[ft]),ge.formatting[ft]==="header"&&de.push(Oe.formatting+"-"+ge.formatting[ft]+"-"+ge.header),ge.formatting[ft]==="quote"&&(!_e.maxBlockquoteDepth||_e.maxBlockquoteDepth>=ge.quote?de.push(Oe.formatting+"-"+ge.formatting[ft]+"-"+ge.quote):de.push("error"))}if(ge.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(ge.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(ge.linkHref?de.push(Oe.linkHref,"url"):(ge.strong&&de.push(Oe.strong),ge.em&&de.push(Oe.em),ge.strikethrough&&de.push(Oe.strikethrough),ge.emoji&&de.push(Oe.emoji),ge.linkText&&de.push(Oe.linkText),ge.code&&de.push(Oe.code),ge.image&&de.push(Oe.image),ge.imageAltText&&de.push(Oe.imageAltText,"link"),ge.imageMarker&&de.push(Oe.imageMarker)),ge.header&&de.push(Oe.header,Oe.header+"-"+ge.header),ge.quote&&(de.push(Oe.quote),!_e.maxBlockquoteDepth||_e.maxBlockquoteDepth>=ge.quote?de.push(Oe.quote+"-"+ge.quote):de.push(Oe.quote+"-"+_e.maxBlockquoteDepth)),ge.list!==!1){var qt=(ge.listStack.length-1)%3;qt?qt===1?de.push(Oe.list2):de.push(Oe.list3):de.push(Oe.list1)}return ge.trailingSpaceNewLine?de.push("trailing-space-new-line"):ge.trailingSpace&&de.push("trailing-space-"+(ge.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function Ge(ge,de){if(ge.match(He,!0))return Be(de)}function nt(ge,de){var ft=de.text(ge,de);if(typeof ft!="undefined")return ft;if(de.list)return de.list=null,Be(de);if(de.taskList){var qt=ge.match(Ye,!0)[1]===" ";return qt?de.taskOpen=!0:de.taskClosed=!0,_e.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Be(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&ge.match(/^#+$/,!0))return _e.highlightFormatting&&(de.formatting="header"),Be(de);var xt=ge.next();if(de.linkTitle){de.linkTitle=!1;var Ne=xt;xt==="("&&(Ne=")"),Ne=(Ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rt="^\\s*(?:[^"+Ne+"\\\\]+|\\\\\\\\|\\\\.)"+Ne;if(ge.match(new RegExp(rt),!0))return Oe.linkHref}if(xt==="`"){var ct=de.formatting;_e.highlightFormatting&&(de.formatting="code"),ge.eatWhile("`");var on=ge.current().length;if(de.code==0&&(!de.quote||on==1))return de.code=on,Be(de);if(on==de.code){var vt=Be(de);return de.code=0,vt}else return de.formatting=ct,Be(de)}else if(de.code)return Be(de);if(xt==="\\"&&(ge.next(),_e.highlightFormatting)){var Pt=Be(de),ze=Oe.formatting+"-escape";return Pt?Pt+" "+ze:ze}if(xt==="!"&&ge.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,_e.highlightFormatting&&(de.formatting="image"),Be(de);if(xt==="["&&de.imageMarker&&ge.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,_e.highlightFormatting&&(de.formatting="image"),Be(de);if(xt==="]"&&de.imageAltText){_e.highlightFormatting&&(de.formatting="image");var Pt=Be(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Qe,Pt}if(xt==="["&&!de.image)return de.linkText&&ge.match(/^.*?\]/)||(de.linkText=!0,_e.highlightFormatting&&(de.formatting="link")),Be(de);if(xt==="]"&&de.linkText){_e.highlightFormatting&&(de.formatting="link");var Pt=Be(de);return de.linkText=!1,de.inline=de.f=ge.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:nt,Pt}if(xt==="<"&&ge.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Me,_e.highlightFormatting&&(de.formatting="link");var Pt=Be(de);return Pt?Pt+=" ":Pt="",Pt+Oe.linkInline}if(xt==="<"&&ge.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Me,_e.highlightFormatting&&(de.formatting="link");var Pt=Be(de);return Pt?Pt+=" ":Pt="",Pt+Oe.linkEmail}if(_e.xml&&xt==="<"&&ge.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var wt=ge.string.indexOf(">",ge.pos);if(wt!=-1){var Bt=ge.string.substring(ge.start,wt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Bt)&&(de.md_inside=!0)}return ge.backUp(1),de.htmlState=te.startState(Xe),$e(ge,de,ht)}if(_e.xml&&xt==="<"&&ge.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(xt==="*"||xt==="_"){for(var ae=1,ne=ge.pos==1?" ":ge.string.charAt(ge.pos-2);ae<3&&ge.eat(xt);)ae++;var z=ge.peek()||" ",oe=!/\s/.test(z)&&(!Se.test(z)||/\s/.test(ne)||Se.test(ne)),se=!/\s/.test(ne)&&(!Se.test(ne)||/\s/.test(z)||Se.test(z)),ie=null,xe=null;if(ae%2&&(!de.em&&oe&&(xt==="*"||!se||Se.test(ne))?ie=!0:de.em==xt&&se&&(xt==="*"||!oe||Se.test(z))&&(ie=!1)),ae>1&&(!de.strong&&oe&&(xt==="*"||!se||Se.test(ne))?xe=!0:de.strong==xt&&se&&(xt==="*"||!oe||Se.test(z))&&(xe=!1)),xe!=null||ie!=null){_e.highlightFormatting&&(de.formatting=ie==null?"strong":xe==null?"em":"strong em"),ie===!0&&(de.em=xt),xe===!0&&(de.strong=xt);var vt=Be(de);return ie===!1&&(de.em=!1),xe===!1&&(de.strong=!1),vt}}else if(xt===" "&&(ge.eat("*")||ge.eat("_"))){if(ge.peek()===" ")return Be(de);ge.backUp(1)}if(_e.strikethrough){if(xt==="~"&&ge.eatWhile(xt)){if(de.strikethrough){_e.highlightFormatting&&(de.formatting="strikethrough");var vt=Be(de);return de.strikethrough=!1,vt}else if(ge.match(/^[^\s]/,!1))return de.strikethrough=!0,_e.highlightFormatting&&(de.formatting="strikethrough"),Be(de)}else if(xt===" "&&ge.match(/^~~/,!0)){if(ge.peek()===" ")return Be(de);ge.backUp(2)}}if(_e.emoji&&xt===":"&&ge.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,_e.highlightFormatting&&(de.formatting="emoji");var Ue=Be(de);return de.emoji=!1,Ue}return xt===" "&&(ge.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Be(de)}function Me(ge,de){var ft=ge.next();if(ft===">"){de.f=de.inline=nt,_e.highlightFormatting&&(de.formatting="link");var qt=Be(de);return qt?qt+=" ":qt="",qt+Oe.linkInline}return ge.match(/^[^>]+/,!0),Oe.linkInline}function Qe(ge,de){if(ge.eatSpace())return null;var ft=ge.next();return ft==="("||ft==="["?(de.f=de.inline=ot(ft==="("?")":"]"),_e.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Be(de)):"error"}var Fe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ot(ge){return function(de,ft){var qt=de.next();if(qt===ge){ft.f=ft.inline=nt,_e.highlightFormatting&&(ft.formatting="link-string");var xt=Be(ft);return ft.linkHref=!1,xt}return de.match(Fe[ge]),ft.linkHref=!0,Be(ft)}}function Ut(ge,de){return ge.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=Et,ge.next(),_e.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Be(de)):lt(ge,de,nt)}function Et(ge,de){if(ge.match(/^\]:/,!0)){de.f=de.inline=hn,_e.highlightFormatting&&(de.formatting="link");var ft=Be(de);return de.linkText=!1,ft}return ge.match(/^([^\]\\]|\\.)+/,!0),Oe.linkText}function hn(ge,de){return ge.eatSpace()?null:(ge.match(/^[^\s]+/,!0),ge.peek()===void 0?de.linkTitle=!0:ge.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=nt,Oe.linkHref+" url")}var Mt={startState:function(){return{f:dt,prevLine:{stream:null},thisLine:{stream:null},block:dt,htmlState:null,indentation:0,inline:nt,text:Ge,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(ge){return{f:ge.f,prevLine:ge.prevLine,thisLine:ge.thisLine,block:ge.block,htmlState:ge.htmlState&&te.copyState(Xe,ge.htmlState),indentation:ge.indentation,localMode:ge.localMode,localState:ge.localMode?te.copyState(ge.localMode,ge.localState):null,inline:ge.inline,text:ge.text,formatting:!1,linkText:ge.linkText,linkTitle:ge.linkTitle,linkHref:ge.linkHref,code:ge.code,em:ge.em,strong:ge.strong,strikethrough:ge.strikethrough,emoji:ge.emoji,header:ge.header,setext:ge.setext,hr:ge.hr,taskList:ge.taskList,list:ge.list,listStack:ge.listStack.slice(0),quote:ge.quote,indentedCode:ge.indentedCode,trailingSpace:ge.trailingSpace,trailingSpaceNewLine:ge.trailingSpaceNewLine,md_inside:ge.md_inside,fencedEndRE:ge.fencedEndRE}},token:function(ge,de){if(de.formatting=!1,ge!=de.thisLine.stream){if(de.header=0,de.hr=!1,ge.match(/^\s*$/,!0))return Te(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:ge},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=ht)){var ft=ge.match(/^\s*/,!0)[0].replace(/\t/g,Je).length;if(de.indentation=ft,de.indentationDiff=null,ft>0)return null}}return de.f(ge,de)},innerMode:function(ge){return ge.block==ht?{state:ge.htmlState,mode:Xe}:ge.localState?{state:ge.localState,mode:ge.localMode}:{state:ge,mode:Mt}},indent:function(ge,de,ft){return ge.block==ht&&Xe.indent?Xe.indent(ge.htmlState,de,ft):ge.localState&&ge.localMode.indent?ge.localMode.indent(ge.localState,de,ft):te.Pass},blankLine:Te,getType:Be,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mt},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},98101:function(It,Ht,he){(function(te){te(he(89780))})(function(te){"use strict";te.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 Ke=0;Ke<te.modeInfo.length;Ke++){var _e=te.modeInfo[Ke];_e.mimes&&(_e.mime=_e.mimes[0])}te.findModeByMIME=function(Xe){Xe=Xe.toLowerCase();for(var ve=0;ve<te.modeInfo.length;ve++){var me=te.modeInfo[ve];if(me.mime==Xe)return me;if(me.mimes){for(var Oe=0;Oe<me.mimes.length;Oe++)if(me.mimes[Oe]==Xe)return me}}if(/\+xml$/.test(Xe))return te.findModeByMIME("application/xml");if(/\+json$/.test(Xe))return te.findModeByMIME("application/json")},te.findModeByExtension=function(Xe){Xe=Xe.toLowerCase();for(var ve=0;ve<te.modeInfo.length;ve++){var me=te.modeInfo[ve];if(me.ext){for(var Oe=0;Oe<me.ext.length;Oe++)if(me.ext[Oe]==Xe)return me}}},te.findModeByFileName=function(Xe){for(var ve=0;ve<te.modeInfo.length;ve++){var me=te.modeInfo[ve];if(me.file&&me.file.test(Xe))return me}var Oe=Xe.lastIndexOf("."),Ve=Oe>-1&&Xe.substring(Oe+1,Xe.length);if(Ve)return te.findModeByExtension(Ve)},te.findModeByName=function(Xe){Xe=Xe.toLowerCase();for(var ve=0;ve<te.modeInfo.length;ve++){var me=te.modeInfo[ve];if(me.name.toLowerCase()==Xe)return me;if(me.alias){for(var Oe=0;Oe<me.alias.length;Oe++)if(me.alias[Oe].toLowerCase()==Xe)return me}}}})},67549:function(It,Ht,he){(function(te){te(he(89780))})(function(te){"use strict";te.defineMode("stex",function(Ke,_e){"use strict";function Xe(He,Ce){He.cmdState.push(Ce)}function ve(He){return He.cmdState.length>0?He.cmdState[He.cmdState.length-1]:null}function me(He){var Ce=He.cmdState.pop();Ce&&Ce.closeBracket()}function Oe(He){for(var Ce=He.cmdState,Ee=Ce.length-1;Ee>=0;Ee--){var Se=Ce[Ee];if(Se.name!="DEFAULT")return Se}return{styleIdentifier:function(){return null}}}function Ve(He,Ce,Ee){return function(){this.name=He,this.bracketNo=0,this.style=Ce,this.styles=Ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ve("importmodule","tag",["string","builtin"]),we.documentclass=Ve("documentclass","tag",["","atom"]),we.usepackage=Ve("usepackage","tag",["atom"]),we.begin=Ve("begin","tag",["atom"]),we.end=Ve("end","tag",["atom"]),we.label=Ve("label","tag",["atom"]),we.ref=Ve("ref","tag",["atom"]),we.eqref=Ve("eqref","tag",["atom"]),we.cite=Ve("cite","tag",["atom"]),we.bibitem=Ve("bibitem","tag",["atom"]),we.Bibitem=Ve("Bibitem","tag",["atom"]),we.RBibitem=Ve("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(He,Ce){He.f=Ce}function Ye(He,Ce){var Ee;if(He.match(/^\\[a-zA-Z@]+/)){var Se=He.current().slice(1);return Ee=we.hasOwnProperty(Se)?we[Se]:we.DEFAULT,Ee=new Ee,Xe(Ce,Ee),fe(Ce,it),Ee.style}if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/\\]/))return"tag";if(He.match("\\["))return fe(Ce,function(lt,$e){return pe(lt,$e,"\\]")}),"keyword";if(He.match("\\("))return fe(Ce,function(lt,$e){return pe(lt,$e,"\\)")}),"keyword";if(He.match("$$"))return fe(Ce,function(lt,$e){return pe(lt,$e,"$$")}),"keyword";if(He.match("$"))return fe(Ce,function(lt,$e){return pe(lt,$e,"$")}),"keyword";var Je=He.next();if(Je=="%")return He.skipToEnd(),"comment";if(Je=="}"||Je=="]"){if(Ee=ve(Ce),Ee)Ee.closeBracket(Je),fe(Ce,it);else return"error";return"bracket"}else return Je=="{"||Je=="["?(Ee=we.DEFAULT,Ee=new Ee,Xe(Ce,Ee),"bracket"):/\d/.test(Je)?(He.eatWhile(/[\w.%]/),"atom"):(He.eatWhile(/[\w\-_]/),Ee=Oe(Ce),Ee.name=="begin"&&(Ee.argument=He.current()),Ee.styleIdentifier())}function pe(He,Ce,Ee){if(He.eatSpace())return null;if(Ee&&He.match(Ee))return fe(Ce,Ye),"keyword";if(He.match(/^\\[a-zA-Z@]+/))return"tag";if(He.match(/^[a-zA-Z]+/))return"variable-2";if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/]/)||He.match(/^[\^_&]/))return"tag";if(He.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(He.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Se=He.next();return Se=="{"||Se=="}"||Se=="["||Se=="]"||Se=="("||Se==")"?"bracket":Se=="%"?(He.skipToEnd(),"comment"):"error"}function it(He,Ce){var Ee=He.peek(),Se;return Ee=="{"||Ee=="["?(Se=ve(Ce),Se.openBracket(Ee),He.eat(Ee),fe(Ce,Ye),"bracket"):/[ \t\r]/.test(Ee)?(He.eat(Ee),null):(fe(Ce,Ye),me(Ce),Ye(He,Ce))}return{startState:function(){var He=_e.inMathMode?function(Ce,Ee){return pe(Ce,Ee)}:Ye;return{cmdState:[],f:He}},copyState:function(He){return{cmdState:He.cmdState.slice(),f:He.f}},token:function(He,Ce){return Ce.f(He,Ce)},blankLine:function(He){He.f=Ye,He.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},15525:function(It,Ht,he){(function(te){te(he(89780))})(function(te){"use strict";var Ke={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},_e={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(Xe,ve){var me=Xe.indentUnit,Oe={},Ve=ve.htmlMode?Ke:_e;for(var we in Ve)Oe[we]=Ve[we];for(var we in ve)Oe[we]=ve[we];var fe,Ye;function pe(Me,Qe){function Fe(Et){return Qe.tokenize=Et,Et(Me,Qe)}var ot=Me.next();if(ot=="<")return Me.eat("!")?Me.eat("[")?Me.match("CDATA[")?Fe(Ce("atom","]]>")):null:Me.match("--")?Fe(Ce("comment","-->")):Me.match("DOCTYPE",!0,!0)?(Me.eatWhile(/[\w\._\-]/),Fe(Ee(1))):null:Me.eat("?")?(Me.eatWhile(/[\w\._\-]/),Qe.tokenize=Ce("meta","?>"),"meta"):(fe=Me.eat("/")?"closeTag":"openTag",Qe.tokenize=it,"tag bracket");if(ot=="&"){var Ut;return Me.eat("#")?Me.eat("x")?Ut=Me.eatWhile(/[a-fA-F\d]/)&&Me.eat(";"):Ut=Me.eatWhile(/[\d]/)&&Me.eat(";"):Ut=Me.eatWhile(/[\w\.\-:]/)&&Me.eat(";"),Ut?"atom":"error"}else return Me.eatWhile(/[^&<]/),null}pe.isInText=!0;function it(Me,Qe){var Fe=Me.next();if(Fe==">"||Fe=="/"&&Me.eat(">"))return Qe.tokenize=pe,fe=Fe==">"?"endTag":"selfcloseTag","tag bracket";if(Fe=="=")return fe="equals",null;if(Fe=="<"){Qe.tokenize=pe,Qe.state=$e,Qe.tagName=Qe.tagStart=null;var ot=Qe.tokenize(Me,Qe);return ot?ot+" tag error":"tag error"}else return/[\'\"]/.test(Fe)?(Qe.tokenize=He(Fe),Qe.stringStartCol=Me.column(),Qe.tokenize(Me,Qe)):(Me.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function He(Me){var Qe=function(Fe,ot){for(;!Fe.eol();)if(Fe.next()==Me){ot.tokenize=it;break}return"string"};return Qe.isInAttribute=!0,Qe}function Ce(Me,Qe){return function(Fe,ot){for(;!Fe.eol();){if(Fe.match(Qe)){ot.tokenize=pe;break}Fe.next()}return Me}}function Ee(Me){return function(Qe,Fe){for(var ot;(ot=Qe.next())!=null;){if(ot=="<")return Fe.tokenize=Ee(Me+1),Fe.tokenize(Qe,Fe);if(ot==">")if(Me==1){Fe.tokenize=pe;break}else return Fe.tokenize=Ee(Me-1),Fe.tokenize(Qe,Fe)}return"meta"}}function Se(Me,Qe,Fe){this.prev=Me.context,this.tagName=Qe,this.indent=Me.indented,this.startOfLine=Fe,(Oe.doNotIndent.hasOwnProperty(Qe)||Me.context&&Me.context.noIndent)&&(this.noIndent=!0)}function Je(Me){Me.context&&(Me.context=Me.context.prev)}function lt(Me,Qe){for(var Fe;;){if(!Me.context||(Fe=Me.context.tagName,!Oe.contextGrabbers.hasOwnProperty(Fe)||!Oe.contextGrabbers[Fe].hasOwnProperty(Qe)))return;Je(Me)}}function $e(Me,Qe,Fe){return Me=="openTag"?(Fe.tagStart=Qe.column(),tt):Me=="closeTag"?Te:$e}function tt(Me,Qe,Fe){return Me=="word"?(Fe.tagName=Qe.current(),Ye="tag",Vt):Oe.allowMissingTagName&&Me=="endTag"?(Ye="tag bracket",Vt(Me,Qe,Fe)):(Ye="error",tt)}function Te(Me,Qe,Fe){if(Me=="word"){var ot=Qe.current();return Fe.context&&Fe.context.tagName!=ot&&Oe.implicitlyClosed.hasOwnProperty(Fe.context.tagName)&&Je(Fe),Fe.context&&Fe.context.tagName==ot||Oe.matchClosing===!1?(Ye="tag",dt):(Ye="tag error",ht)}else return Oe.allowMissingTagName&&Me=="endTag"?(Ye="tag bracket",dt(Me,Qe,Fe)):(Ye="error",ht)}function dt(Me,Qe,Fe){return Me!="endTag"?(Ye="error",dt):(Je(Fe),$e)}function ht(Me,Qe,Fe){return Ye="error",dt(Me,Qe,Fe)}function Vt(Me,Qe,Fe){if(Me=="word")return Ye="attribute",Be;if(Me=="endTag"||Me=="selfcloseTag"){var ot=Fe.tagName,Ut=Fe.tagStart;return Fe.tagName=Fe.tagStart=null,Me=="selfcloseTag"||Oe.autoSelfClosers.hasOwnProperty(ot)?lt(Fe,ot):(lt(Fe,ot),Fe.context=new Se(Fe,ot,Ut==Fe.indented)),$e}return Ye="error",Vt}function Be(Me,Qe,Fe){return Me=="equals"?Ge:(Oe.allowMissing||(Ye="error"),Vt(Me,Qe,Fe))}function Ge(Me,Qe,Fe){return Me=="string"?nt:Me=="word"&&Oe.allowUnquoted?(Ye="string",Vt):(Ye="error",Vt(Me,Qe,Fe))}function nt(Me,Qe,Fe){return Me=="string"?nt:Vt(Me,Qe,Fe)}return{startState:function(Me){var Qe={tokenize:pe,state:$e,indented:Me||0,tagName:null,tagStart:null,context:null};return Me!=null&&(Qe.baseIndent=Me),Qe},token:function(Me,Qe){if(!Qe.tagName&&Me.sol()&&(Qe.indented=Me.indentation()),Me.eatSpace())return null;fe=null;var Fe=Qe.tokenize(Me,Qe);return(Fe||fe)&&Fe!="comment"&&(Ye=null,Qe.state=Qe.state(fe||Fe,Me,Qe),Ye&&(Fe=Ye=="error"?Fe+" error":Ye)),Fe},indent:function(Me,Qe,Fe){var ot=Me.context;if(Me.tokenize.isInAttribute)return Me.tagStart==Me.indented?Me.stringStartCol+1:Me.indented+me;if(ot&&ot.noIndent)return te.Pass;if(Me.tokenize!=it&&Me.tokenize!=pe)return Fe?Fe.match(/^(\s*)/)[0].length:0;if(Me.tagName)return Oe.multilineTagIndentPastTag!==!1?Me.tagStart+Me.tagName.length+2:Me.tagStart+me*(Oe.multilineTagIndentFactor||1);if(Oe.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var Ut=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(Ut&&Ut[1])for(;ot;)if(ot.tagName==Ut[2]){ot=ot.prev;break}else if(Oe.implicitlyClosed.hasOwnProperty(ot.tagName))ot=ot.prev;else break;else if(Ut)for(;ot;){var Et=Oe.contextGrabbers[ot.tagName];if(Et&&Et.hasOwnProperty(Ut[2]))ot=ot.prev;else break}for(;ot&&ot.prev&&!ot.startOfLine;)ot=ot.prev;return ot?ot.indent+me:Me.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Oe.htmlMode?"html":"xml",helperType:Oe.htmlMode?"html":"xml",skipAttribute:function(Me){Me.state==Ge&&(Me.state=Vt)},xmlCurrentTag:function(Me){return Me.tagName?{name:Me.tagName,close:Me.type=="closeTag"}:null},xmlCurrentContext:function(Me){for(var Qe=[],Fe=Me.context;Fe;Fe=Fe.prev)Fe.tagName&&Qe.push(Fe.tagName);return Qe.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(It,Ht,he){"use strict";he.d(Ht,{hP:function(){return Bt}});var te=function(ae,ne){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var se in oe)Object.prototype.hasOwnProperty.call(oe,se)&&(z[se]=oe[se])})(ae,ne)};function Ke(ae,ne){function z(){this.constructor=ae}te(ae,ne),ae.prototype=ne===null?Object.create(ne):(z.prototype=ne.prototype,new z)}function _e(ae,ne,z,oe){return new(z||(z=Promise))(function(se,ie){function xe(Dt){try{Ot(oe.next(Dt))}catch(gt){ie(gt)}}function Ue(Dt){try{Ot(oe.throw(Dt))}catch(gt){ie(gt)}}function Ot(Dt){var gt;Dt.done?se(Dt.value):(gt=Dt.value,gt instanceof z?gt:new z(function(kt){kt(gt)})).then(xe,Ue)}Ot((oe=oe.apply(ae,ne||[])).next())})}function Xe(ae,ne){var z,oe,se,ie,xe={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return ie={next:Ue(0),throw:Ue(1),return:Ue(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function Ue(Ot){return function(Dt){return function(gt){if(z)throw new TypeError("Generator is already executing.");for(;xe;)try{if(z=1,oe&&(se=2&gt[0]?oe.return:gt[0]?oe.throw||((se=oe.return)&&se.call(oe),0):oe.next)&&!(se=se.call(oe,gt[1])).done)return se;switch(oe=0,se&&(gt=[2&gt[0],se.value]),gt[0]){case 0:case 1:se=gt;break;case 4:return xe.label++,{value:gt[1],done:!1};case 5:xe.label++,oe=gt[1],gt=[0];continue;case 7:gt=xe.ops.pop(),xe.trys.pop();continue;default:if(se=xe.trys,!((se=se.length>0&&se[se.length-1])||gt[0]!==6&&gt[0]!==2)){xe=0;continue}if(gt[0]===3&&(!se||gt[1]>se[0]&&gt[1]<se[3])){xe.label=gt[1];break}if(gt[0]===6&&xe.label<se[1]){xe.label=se[1],se=gt;break}if(se&&xe.label<se[2]){xe.label=se[2],xe.ops.push(gt);break}se[2]&&xe.ops.pop(),xe.trys.pop();continue}gt=ne.call(ae,xe)}catch(kt){gt=[6,kt],oe=0}finally{z=se=0}if(5&gt[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([Ot,Dt])}}}function ve(){for(var ae=0,ne=0,z=arguments.length;ne<z;ne++)ae+=arguments[ne].length;var oe=Array(ae),se=0;for(ne=0;ne<z;ne++)for(var ie=arguments[ne],xe=0,Ue=ie.length;xe<Ue;xe++,se++)oe[se]=ie[xe];return oe}var me=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(ne,z){for(var oe=0,se=z;oe<se.length;oe++){var ie=se[oe],xe=ie[0],Ue=ie[1];ne.setAttribute(xe,Ue)}},ae.createRect=function(ne,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",ne.toString()),se.setAttribute("height",z.toString()),oe&&ae.setAttributes(se,oe),se},ae.createLine=function(ne,z,oe,se,ie){var xe=document.createElementNS("http://www.w3.org/2000/svg","line");return xe.setAttribute("x1",ne.toString()),xe.setAttribute("y1",z.toString()),xe.setAttribute("x2",oe.toString()),xe.setAttribute("y2",se.toString()),ie&&ae.setAttributes(xe,ie),xe},ae.createPolygon=function(ne,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",ne),z&&ae.setAttributes(oe,z),oe},ae.createCircle=function(ne,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(ne/2).toString()),oe.setAttribute("cy",(ne/2).toString()),oe.setAttribute("r",ne.toString()),z&&ae.setAttributes(oe,z),oe},ae.createEllipse=function(ne,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(ne/2).toString()),se.setAttribute("cy",(z/2).toString()),se.setAttribute("rx",(ne/2).toString()),se.setAttribute("ry",(z/2).toString()),oe&&ae.setAttributes(se,oe),se},ae.createGroup=function(ne){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ne&&ae.setAttributes(z,ne),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(ne,z,oe,se,ie,xe,Ue){var Ot=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Ot,[["id",ne],["orient",z],["markerWidth",oe.toString()],["markerHeight",se.toString()],["refX",ie.toString()],["refY",xe.toString()]]),Ot.appendChild(Ue),Ot},ae.createText=function(ne){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ne&&ae.setAttributes(z,ne),z},ae.createTSpan=function(ne,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=ne,z&&ae.setAttributes(oe,z),oe},ae.createImage=function(ne){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ne&&ae.setAttributes(z,ne),z},ae.createPoint=function(ne,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=ne,oe.y=z,oe},ae.createPath=function(ne,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",ne),z&&ae.setAttributes(oe,z),oe},ae}(),Oe=function(){function ae(){}return ae.addKey=function(ne){ae.key=ne},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}(),Ve=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(ne,z,oe){var se=this;return new Promise(function(ie){var xe=oe!==void 0?oe:document.createElement("canvas");ne===null&&(se.markersOnly=!0,se.naturalSize=!1);var Ue=document.createElementNS("http://www.w3.org/2000/svg","svg");Ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ue.setAttribute("width",z.width.baseVal.valueAsString),Ue.setAttribute("height",z.height.baseVal.valueAsString),Ue.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Ue.innerHTML=z.innerHTML,se.naturalSize===!0?(Ue.width.baseVal.value=ne.naturalWidth,Ue.height.baseVal.value=ne.naturalHeight):se.width!==void 0&&se.height!==void 0&&(Ue.width.baseVal.value=se.width,Ue.height.baseVal.value=se.height),xe.width=Ue.width.baseVal.value,xe.height=Ue.height.baseVal.value;var Ot=Ue.outerHTML,Dt=xe.getContext("2d");se.markersOnly!==!0&&Dt.drawImage(ne,0,0,xe.width,xe.height);var gt=window.URL,kt=new Image(xe.width,xe.height);kt.setAttribute("crossOrigin","anonymous");var $t=new Blob([Ot],{type:"image/svg+xml"}),Gt=gt.createObjectURL($t);kt.onload=function(){Dt.drawImage(kt,0,0),gt.revokeObjectURL(Gt);var nn=xe.toDataURL(se.imageType,se.imageQuality);ie(nn)},kt.src=Gt})},ae}(),we=function(){},fe=function(){function ae(ne){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ne+"_"}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(ne){return this.styleSheet===void 0&&this.addStyleSheet(),ne.name=""+this.classNamePrefix+ne.localName,this.classes.push(ne),this.styleSheet.sheet.insertRule("."+ne.name+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length),ne},ae.prototype.addRule=function(ne){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ne),this.styleSheet.sheet.insertRule(ne.selector+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var ne;this.styleSheet=document.createElement("style"),((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne: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 ne;this.styleSheet&&(((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),Ye=function(ae,ne){this.selector=ae,this.style=ne},pe=function(ae,ne){this.localName=ae,this.style=ne},it=function(){function ae(ne,z,oe,se,ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ne,this.displayMode=z,this.markerItems=oe,this.uiStyleSettings=se,this.styles=ie,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(ne){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ne,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(ie){var xe=document.createElement("div");xe.className=""+z.toolbarButtonStyleClass.name,xe.setAttribute("data-type-name",ie.typeName),xe.innerHTML=ie.icon,xe.addEventListener("click",function(){z.markerToolbarButtonClicked(xe,ie)}),z.buttons.push(xe),z.markerButtons.push(xe)}),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(ne){this.buttonClickListeners.push(ne)},ae.prototype.removeButtonClickListener=function(ne){this.buttonClickListeners.indexOf(ne)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ne),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ne=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<ne||z===ne&&this.markerButtons.length-1===ne?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===ne&&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 ne=this;this.buttons.forEach(function(z){z.className=z.className.replace(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ne.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(ne,z,oe){var se=this,ie=document.createElement("div");switch(ie.className=""+this.toolbarButtonStyleClass.name,ie.innerHTML=z,ie.setAttribute("data-action",oe),ie.addEventListener("click",function(){se.actionToolbarButtonClicked(ie,oe)}),oe){case"select":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ie.style.fill=this.uiStyleSettings.closeButtonColor}ne.appendChild(ie),this.buttons.push(ie)},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 ne=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ne)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ne)+`px;
padding: `+ne+`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(ne,z){this.setActiveButton(ne),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(ne,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(ne){this.resetButtonStyles(),ne.className=ne.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ne.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(ne){var z=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===ne});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(ne){var z=this;this.currentMarker=ne,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){z.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},ae}(),He=function(){function ae(ne,z,oe,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=ne,this.displayMode=z,this.uiStyleSettings=oe,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var ne;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: `+((ne=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ne!==void 0?ne: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(ne){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ne,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(ne){var z,oe,se=this;this.panels=ne,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+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ie){var xe;ie.uiStyleSettings=se.uiStyleSettings;var Ue=document.createElement("div");Ue.className=se.toolboxButtonStyleClass.name+" "+((xe=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:se.toolboxButtonStyleColorsClass.name),Ue.innerHTML=ie.icon,Ue.title=ie.title,Ue.addEventListener("click",function(){se.panelButtonClick(ie)}),se.panelButtons.push(Ue),se.buttonRow.appendChild(Ue)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(ne){var z=this,oe=-1;if(ne!==this.activePanel){oe=this.panels.indexOf(ne),this.panelRow.innerHTML="";var se=ne.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=ne}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(ie,xe){var Ue,Ot;ie.className=z.toolboxButtonStyleClass.name+" "+(xe===oe?""+((Ue=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:z.toolboxActiveButtonStyleColorsClass.name):""+((Ot=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ot!==void 0?Ot:z.toolboxButtonStyleColorsClass.name))})},ae}(),Ce=function(ae,ne){this.title=ae,this.icon=ne},Ee=function(ae){function ne(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.colors=[],xe.addTransparent=!1,xe.colorBoxes=[],xe.colors=oe,xe.currentColor=se,xe.setCurrentColor=xe.setCurrentColor.bind(xe),xe.getColorBox=xe.getColorBox.bind(xe),xe}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(se){var ie=z.getColorBox(se);oe.appendChild(ie),z.colorBoxes.push(ie)}),oe},ne.prototype.getColorBox=function(z){var oe=this,se=this.uiStyleSettings.toolbarHeight/4,ie=this.uiStyleSettings.toolbarHeight-se,xe=document.createElement("div");xe.style.display="inline-block",xe.style.boxSizing="content-box",xe.style.width=ie-2+"px",xe.style.height=ie-2+"px",xe.style.padding="1px",xe.style.marginRight="2px",xe.style.marginBottom="2px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderRadius=(ie+2)/2+"px",xe.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){oe.setCurrentColor(z,xe)});var Ue=document.createElement("div");return Ue.style.display="inline-block",Ue.style.width=ie-2+"px",Ue.style.height=ie-2+"px",Ue.style.backgroundColor=z,Ue.style.borderRadius=ie/2+"px",z==="transparent"&&(Ue.style.fill=this.uiStyleSettings.toolboxAccentColor,Ue.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>`),xe.appendChild(Ue),xe},ne.prototype.setCurrentColor=function(z,oe){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ne}(Ce),Se=function(){function ae(ne,z,oe){this._state="new",this._isSelected=!1,this._container=ne,this._overlayContainer=z,this.globalSettings=oe,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(ne){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(ne,z){},ae.prototype.dblClick=function(ne,z){},ae.prototype.manipulate=function(ne){},ae.prototype.pointerUp=function(ne){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(ne){this.container.childNodes.length>0?this.container.insertBefore(ne,this.container.childNodes[0]):this.container.appendChild(ne)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(ne){this._state=ne.state,this.notes=ne.notes},ae.prototype.scale=function(ne,z){},ae.prototype.colorChanged=function(ne){this.onColorChanged&&this.onColorChanged(ne),this.stateChanged()},ae.prototype.fillColorChanged=function(ne){this.onFillColorChanged&&this.onFillColorChanged(ne),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ne=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ne.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ne)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),Je=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(ne){return this.topLeft.ownsTarget(ne)?this.topLeft:this.topCenter.ownsTarget(ne)?this.topCenter:this.topRight.ownsTarget(ne)?this.topRight:this.centerLeft.ownsTarget(ne)?this.centerLeft:this.centerRight.ownsTarget(ne)?this.centerRight:this.bottomLeft.ownsTarget(ne)?this.bottomLeft:this.bottomCenter.ownsTarget(ne)?this.bottomCenter:this.bottomRight.ownsTarget(ne)?this.bottomRight:void 0},ae}(),lt=function(){function ae(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(ne){return ne===this.visual||ne===this.visual.childNodes[0]||ne===this.visual.childNodes[1]},ae}(),$e=function(){function ae(){}return ae.toITransformMatrix=function(ne){return{a:ne.a,b:ne.b,c:ne.c,d:ne.d,e:ne.e,f:ne.f}},ae.toSVGMatrix=function(ne,z){return ne.a=z.a,ne.b=z.b,ne.c=z.c,ne.d=z.d,ne.e=z.e,ne.f=z.f,ne},ae}(),tt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.left=0,ie.top=0,ie.width=0,ie.height=0,ie.defaultSize={x:50,y:20},ie.offsetX=0,ie.offsetY=0,ie.rotationAngle=0,ie.CB_DISTANCE=10,ie._suppressMarkerCreateEvent=!1,ie.container.transform.baseVal.appendItem(me.createTransform()),ie.setupControlBox(),ie}return Ke(ne,ae),Object.defineProperty(ne.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var oe=me.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),ne.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))},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),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(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ie.x-this.width/2,this.top=ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var xe=this.container.transform.baseVal.getItem(0);xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ne.prototype.pointerUp=function(z){var oe=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",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ne.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ne.prototype.manipulate=function(z){var oe=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(z)},ne.prototype.resize=function(z){var oe=this.manipulationStartLeft,se=this.manipulationStartWidth,ie=this.manipulationStartTop,xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+z.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-oe;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:ie=this.manipulationStartTop+z.y-this.manipulationStartY,xe=this.manipulationStartHeight+this.manipulationStartTop-ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:xe=this.manipulationStartHeight+z.y-this.manipulationStartY}se>=0?(this.left=oe,this.width=se):(this.left=oe+se,this.width=-se),xe>=0?(this.top=ie,this.height=xe):(this.top=ie+xe,this.height=-xe),this.setSize()},ne.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ne.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var oe=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},ne.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)},ne.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM(),se=me.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},ne.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM();oe=oe.inverse();var se=me.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},ne.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ne.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ne.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var z=me.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=me.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=me.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Je,this.addControlGrips(),this.controlBox.style.display="none"},ne.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()},ne.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()},ne.prototype.createGrip=function(){var z=new lt;return z.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(z.visual),z},ne.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,oe=-z/2,se=oe,ie=(this.width+this.CB_DISTANCE)/2-z/2,xe=(this.height+this.CB_DISTANCE)/2-z/2,Ue=this.height+this.CB_DISTANCE-z/2,Ot=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,se),this.positionGrip(this.controlGrips.topCenter.visual,ie,se),this.positionGrip(this.controlGrips.topRight.visual,Ot,se),this.positionGrip(this.controlGrips.centerLeft.visual,oe,xe),this.positionGrip(this.controlGrips.centerRight.visual,Ot,xe),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,Ue),this.positionGrip(this.controlGrips.bottomCenter.visual,ie,Ue),this.positionGrip(this.controlGrips.bottomRight.visual,Ot,Ue),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ie,se-3*this.CB_DISTANCE)},ne.prototype.positionGrip=function(z,oe,se){var ie=z.transform.baseVal.getItem(0);ie.setTranslate(oe,se),z.transform.baseVal.replaceItem(ie,0)},ne.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ne.prototype.showControlBox=function(){this.controlBox.style.display=""},ne.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))},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix($e.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix($e.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe);var se=this.rotatePoint({x:this.left,y:this.top}),ie=this.unrotatePoint({x:se.x*z,y:se.y*oe});this.left=ie.x,this.top=ie.y,this.width=this.width*z,this.height=this.height*oe,this.adjustControlBox()},ne}(Se),Te=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ne.prototype.createVisual=function(){this.visual=me.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ne.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ne.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},ne.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ne.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ne.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ne.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))},ne.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize()},ne.title="Rectangle marker",ne}(tt),dt=function(ae){function ne(z,oe,se,ie){var xe=ae.call(this,z,ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return xe.widths=[],xe.widthBoxes=[],xe.widths=oe,xe.currentWidth=se,xe.setCurrentWidth=xe.setCurrentWidth.bind(xe),xe}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=se===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentWidth(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.innerText=se.toString(),xe.style.marginRight="5px",ie.appendChild(xe);var Ue=document.createElement("div");Ue.style.minHeight="20px",Ue.style.flexGrow="2",Ue.style.display="flex",Ue.style.alignItems="center";var Ot=document.createElement("hr");Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,Ot.style.flexGrow="2",Ue.appendChild(Ot),ie.appendChild(Ue),z.widthBoxes.push(ie)}),oe},ne.prototype.setCurrentWidth=function(z,oe){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ne}(Ce),ht=function(ae){function ne(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.styles=[],xe.styleBoxes=[],xe.styles=oe,xe.currentStyle=se,xe.setCurrentStyle=xe.setCurrentStyle.bind(xe),xe}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/z.styles.length-5+"%",ie.style.borderColor=se===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentStyle(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.overflow="hidden";var Ue=`<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>`;xe.innerHTML=Ue,ie.appendChild(xe),z.styleBoxes.push(ie)}),oe},ne.prototype.setCurrentStyle=function(z,oe){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ne}(Ce),Vt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ht("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ke(ne,ae),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ne.typeName,z},ne.typeName="FrameMarker",ne.title="Frame marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ne}(Te),Be=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"},Ge=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.x1=0,ie.y1=0,ie.x2=0,ie.y2=0,ie.defaultLength=50,ie.manipulationStartX=0,ie.manipulationStartY=0,ie.manipulationStartX1=0,ie.manipulationStartY1=0,ie.manipulationStartX2=0,ie.manipulationStartY2=0,ie.setupControlBox(),ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),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(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ne.prototype.pointerUp=function(z){var oe=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",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ne.prototype.adjustVisual=function(){},ne.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)},ne.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()},ne.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ne.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ne.prototype.setupControlBox=function(){this.controlBox=me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ne.prototype.adjustControlBox=function(){this.positionGrips()},ne.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ne.prototype.createGrip=function(){var z=new lt;return z.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(z.visual),z},ne.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)},ne.prototype.positionGrip=function(z,oe,se){var ie=z.transform.baseVal.getItem(0);ie.setTranslate(oe,se),z.transform.baseVal.replaceItem(ie,0)},ne.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.x1=this.x1*z,this.y1=this.y1*oe,this.x2=this.x2*z,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},ne}(Se),nt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ht("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ne.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ne.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ne.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=ne.typeName,z},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.createVisual(),this.adjustVisual()},ne.typeName="LineMarker",ne.title="Line marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ne}(Ge),Me=function(ae){function ne(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.fonts=[],xe.fontBoxes=[],xe.fonts=oe,xe.currentFont=se,xe.setCurrentFont=xe.setCurrentFont.bind(xe),xe}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(se){var ie=document.createElement("div");ie.style.display="inline-block",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/z.fonts.length-5+"%",ie.style.borderColor=se===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentFont(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.style.display="flex",xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.fontFamily=se,xe.style.overflow="hidden";var Ue=document.createElement("div");Ue.style.whiteSpace="nowrap",Ue.style.overflow="hidden",Ue.style.textOverflow="ellipsis",Ue.innerHTML="The quick brown fox jumps over the lazy dog",xe.appendChild(Ue),ie.appendChild(xe),z.fontBoxes.push(ie)}),oe},ne.prototype.setCurrentFont=function(z,oe){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ne}(Ce),Qe=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.color="transparent",ie.padding=5,ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ie.text=ie.DEFAULT_TEXT,ie.isMoved=!1,ie.color=se.defaultColor,ie.fontFamily=se.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setColor=ie.setColor.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.renderText=ie.renderText.bind(ie),ie.sizeText=ie.sizeText.bind(ie),ie.textEditDivClicked=ie.textEditDivClicked.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.setSize=ie.setSize.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.colorPanel=new Ee("Color",se.defaultColorSet,se.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(se){se===z&&(oe=!0)}),oe},ne.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ne.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(oe){z.textElement.appendChild(me.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ne.prototype.getTextScale=function(){var z=this.textElement.getBBox(),oe=1;if(z.width>0&&z.height>0){var se=(1*this.width-this.width*this.padding*2/100)/z.width,ie=(1*this.height-this.height*this.padding*2/100)/z.height;oe=Math.min(se,ie)}return oe},ne.prototype.getTextPosition=function(z){var oe=this.textElement.getBBox(),se=0,ie=0;return oe.width>0&&oe.height>0&&(se=(this.width-oe.width*z)/2,ie=this.height/2-oe.height*z/2),{x:se,y:ie}},ne.prototype.sizeText=function(){var z=this.textElement.getBBox(),oe=this.getTextScale(),se=this.getTextPosition(oe);se.y-=z.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},ne.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)},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ne.prototype.pointerUp=function(z){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ne.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(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,z.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var se=oe.clipboardData.getData("text"),ie=window.getSelection();if(!ie.rangeCount)return!1;ie.deleteFromDocument(),ie.getRangeAt(0).insertNode(document.createTextNode(se)),oe.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")},ne.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),ie={x:se.width*z,y:se.height*z};oe.x-=ie.x/2,oe.y-=ie.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},ne.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()},ne.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ne.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},ne.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},ne.prototype.setColor=function(z){this.textElement&&me.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},ne.prototype.setFont=function(z){this.textElement&&me.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ne.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ne.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ne.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=ne.typeName,z},ne.prototype.restoreState=function(z){var oe=z;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize(),this.sizeText(),this.positionTextEditor()},ne.typeName="TextMarker",ne.title="Text marker",ne.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>',ne}(tt),Fe=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.color="transparent",ie.lineWidth=3,ie.drawing=!1,ie.pixelRatio=1,ie.color=se.defaultColor,ie.lineWidth=se.defaultStrokeWidth,ie.pixelRatio=se.freehandPixelRatio,ie.setColor=ie.setColor.bind(ie),ie.addCanvas=ie.addCanvas.bind(ie),ie.finishCreation=ie.finishCreation.bind(ie),ie.setLineWidth=ie.setLineWidth.bind(ie),ie.colorPanel=new Ee("Color",se.defaultColorSet,se.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.lineWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.lineWidthPanel.onWidthChanged=ie.setLineWidth,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ne.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var z=me.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(z,oe){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,oe)},ne.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)},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ne.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)},ne.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)},ne.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},ne.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},ne.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=oe[0],ie=oe[1],xe=oe[2],Ue=oe[3],Ot=!1,Dt=0;Dt<this.canvasElement.height;Dt++)for(var gt=0;gt<this.canvasElement.width;gt++)z.data[Dt*this.canvasElement.width*4+4*gt+3]>0&&(Ot=!0,Dt<ie&&(ie=Dt),gt<se&&(se=gt),Dt>Ue&&(Ue=Dt),gt>xe&&(xe=gt));if(Ot){this.left=se/this.pixelRatio,this.top=ie/this.pixelRatio,this.width=(xe-se)/this.pixelRatio,this.height=(Ue-ie)/this.pixelRatio;var kt=document.createElement("canvas");kt.width=xe-se,kt.height=Ue-ie,kt.getContext("2d").putImageData(this.canvasContext.getImageData(se,ie,xe-se,Ue-ie),0,0),this.drawingImgUrl=kt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ne.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ne.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},ne.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=ne.typeName,z},ne.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setDrawingImage()},ne.typeName="FreehandMarker",ne.title="Freehand marker",ne.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>',ne}(tt),ot=function(ae){function ne(z,oe,se){var ie=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 ie.typeBoxes=[],ie.currentType=oe,ie.setCurrentType=ie.setCurrentType.bind(ie),ie}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var se=function(Ue){var Ot="both";switch(Ue){case 0:Ot="both";break;case 1:Ot="start";break;case 2:Ot="end";break;case 3:Ot="none"}var Dt=document.createElement("div");if(Dt.style.display="flex",Dt.style.flexGrow="2",Dt.style.alignItems="center",Dt.style.justifyContent="space-between",Dt.style.padding="5px",Dt.style.borderWidth="2px",Dt.style.borderStyle="solid",Dt.style.borderColor=Ot===ie.currentType?ie.uiStyleSettings.toolboxAccentColor:"transparent",Dt.addEventListener("click",function(){z.setCurrentType(Ot,Dt)}),oe.appendChild(Dt),Ot==="both"||Ot==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,gt.style.marginLeft="5px",Dt.appendChild(gt)}var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.style.flexGrow="2";var $t=document.createElement("hr");if($t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop="3px solid "+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee"),$t.style.flexGrow="2",kt.appendChild($t),Dt.appendChild(kt),Ot==="both"||Ot==="end"){var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Gt.style.marginRight="5px",Dt.appendChild(Gt)}ie.typeBoxes.push(Dt)},ie=this,xe=0;xe<4;xe++)se(xe);return oe},ne.prototype.setCurrentType=function(z,oe){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ne}(Ce),Ut=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.arrowType="end",ie.arrowBaseHeight=10,ie.arrowBaseWidth=10,ie.getArrowPoints=ie.getArrowPoints.bind(ie),ie.setArrowType=ie.setArrowType.bind(ie),ie.arrowTypePanel=new ot("Arrow type","end"),ie.arrowTypePanel.onArrowTypeChanged=ie.setArrowType,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ne.prototype.getArrowPoints=function(z,oe){var se=this.arrowBaseWidth+2*this.strokeWidth,ie=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(oe+ie/2)+" "+z+","+(oe-ie/2)+" "+(z+se/2)+","+(oe+ie/2)},ne.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ne.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",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);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 oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},ne.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=ne.typeName,z},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.arrowType=oe.arrowType,this.createTips(),this.adjustVisual()},ne.typeName="ArrowMarker",ne.title="Arrow marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ne}(nt),Et=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor=se.defaultFillColor,ie.strokeWidth=0,ie.fillPanel=new Ee("Color",se.defaultColorSet,se.defaultFillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie}return Ke(ne,ae),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ne.typeName,z},ne.typeName="CoverMarker",ne.title="Cover marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ne}(Te),hn=function(ae){function ne(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.opacities=[],xe.opacityBoxes=[],xe.opacities=oe,xe.currentOpacity=se,xe.setCurrentOpacity=xe.setCurrentOpacity.bind(xe),xe}return Ke(ne,ae),ne.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="center",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=se===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentOpacity(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.innerText=100*se+"%",ie.appendChild(xe),z.opacityBoxes.push(ie)}),oe},ne.prototype.setCurrentOpacity=function(z,oe){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ne}(Ce),Mt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.setOpacity=ie.setOpacity.bind(ie),ie.fillColor=se.defaultHighlightColor,ie.strokeWidth=0,ie.opacity=se.defaultHighlightOpacity,ie.fillPanel=new Ee("Color",se.defaultColorSet,ie.fillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie.opacityPanel=new hn("Opacity",se.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Ke(ne,ae),ne.prototype.setOpacity=function(z){this.opacity=z,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ne.typeName,z},ne.typeName="HighlightMarker",ne.title="Highlight marker",ne.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>',ne}(Et),ge='<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>',ft=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.bgColor="transparent",ie.tipPosition={x:0,y:0},ie.tipBase1Position={x:0,y:0},ie.tipBase2Position={x:0,y:0},ie.tipMoving=!1,ie.color=se.defaultStrokeColor,ie.bgColor=se.defaultFillColor,ie.fontFamily=se.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setBgColor=ie.setBgColor.bind(ie),ie.getTipPoints=ie.getTipPoints.bind(ie),ie.positionTip=ie.positionTip.bind(ie),ie.setTipPoints=ie.setTipPoints.bind(ie),ie.colorPanel=new Ee("Text color",se.defaultColorSet,ie.color,ge),ie.colorPanel.onColorChanged=ie.setColor,ie.bgColorPanel=new Ee("Fill color",se.defaultColorSet,ie.bgColor,de),ie.bgColorPanel.onColorChanged=ie.setBgColor,ie.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.tipGrip=new lt,ie.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),ie.controlBox.appendChild(ie.tipGrip.visual),ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ne.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ne.prototype.pointerDown=function(z,oe){this.state==="new"&&ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,oe)},ne.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var oe=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(oe),this.positionTip()}},ne.prototype.manipulate=function(z){if(this.tipMoving){var oe=this.unrotatePoint(z);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},ne.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",z]]),me.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},ne.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},ne.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var oe=Math.min(this.height/2,15),se=this.height/5;z&&(this.tipPosition={x:oe+se/2,y:this.height+20});var ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+se,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-se},this.tipBase2Position={x:this.width,y:this.height-oe}):ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-se})},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},ne.prototype.positionTip=function(){me.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(ne.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ne.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},ne.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=ne.typeName,z},ne.prototype.restoreState=function(z){var oe=z;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*oe},this.positionTip()},ne.typeName="CalloutMarker",ne.title="Callout marker",ne.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>',ne}(Qe),qt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.fillColor=se.defaultFillColor,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.setOpacity=ie.setOpacity.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.strokePanel=new Ee("Line color",ve(se.defaultColorSet,["transparent"]),se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new Ee("Fill color",ve(se.defaultColorSet,["transparent"]),ie.fillColor,de),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ht("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.opacityPanel=new hn("Opacity",se.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ne.prototype.createVisual=function(){this.visual=me.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)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ne.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),me.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ne.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},ne.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ne.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ne.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ne.prototype.setOpacity=function(z){this.opacity=z,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ne.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=ne.typeName,z},ne.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize()},ne.typeName="EllipseMarker",ne.title="Ellipse marker",ne.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>',ne}(tt),xt=function(ae){function ne(z,oe,se){return ae.call(this,z,oe,se)||this}return Ke(ne,ae),Object.defineProperty(ne.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ne.prototype.createTips=function(){this.tip1=me.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(me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=me.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(me.createTransform()),this.visual.appendChild(this.tip2)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ne.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(me.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()]]),me.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),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,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(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ne.typeName,z},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},ne.typeName="MeasurementMarker",ne.title="Measurement marker",ne.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>',ne}(nt),Ne=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokePanel.colors=se.defaultColorSet,ie.fillColor="transparent",ie}return Ke(ne,ae),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ne.typeName,z},ne.typeName="EllipseFrameMarker",ne.title="Ellipse frame marker",ne.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>',ne}(qt),rt=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(ne){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ne)||(this.undoStack.push(ne),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ne)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(ne){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ne)},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 ne=this.undoStack.pop();return ne!==void 0&&this.redoStack.push(ne),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}(),ct=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.curveX=0,ie.curveY=0,ie.manipulationStartCurveX=0,ie.manipulationStartCurveY=0,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.positionGrips=ie.positionGrips.bind(ie),ie.addControlGrips=ie.addControlGrips.bind(ie),ie.adjustVisual=ie.adjustVisual.bind(ie),ie.setupControlBox=ie.setupControlBox.bind(ie),ie.resize=ie.resize.bind(ie),ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ht("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},ne.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ne.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),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(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},ne.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ne.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},ne.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()))},ne.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)},ne.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)},ne.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ne.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},ne.prototype.scale=function(z,oe){this.curveX=this.curveX*z,this.curveY=this.curveY*oe,ae.prototype.scale.call(this,z,oe)},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.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=ne.typeName,z},ne.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},ne.typeName="CurveMarker",ne.title="Curve marker",ne.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>',ne}(Ge),on=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.textColor="transparent",ie.fontSize="1rem",ie.isMoved=!1,ie.captionText="Caption",ie.PADDING=5,ie.captionBoxWidth=0,ie.captionBoxHeight=0,ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.fillColor=se.defaultFillColor,ie.textColor=se.defaultStrokeColor,ie.fontFamily=se.defaultFontFamily,ie.fontSize=se.defaultCaptionFontSize,ie.captionText=se.defaultCaptionText,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.sizeCaption=ie.sizeCaption.bind(ie),ie.setCaptionText=ie.setCaptionText.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.finishTextEditing=ie.finishTextEditing.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.setTextColor=ie.setTextColor.bind(ie),ie.strokePanel=new Ee("Line color",ve(se.defaultColorSet,["transparent"]),ie.strokeColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new Ee("Fill color",ve(se.defaultColorSet,["transparent"]),ie.fillColor,de),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new dt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ht("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.textColorPanel=new Ee("Text color",se.defaultColorSet,ie.textColor,ge),ie.textColorPanel.onColorChanged=ie.setTextColor,ie}return Ke(ne,ae),ne.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ne.prototype.createVisual=function(){this.visual=me.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=me.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=me.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=me.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()},ne.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},ne.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ne.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)},ne.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ne.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),me.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')"]]),me.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')"]])},ne.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(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.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()},ne.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"))},ne.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ne.prototype.setFont=function(z){this.captionElement&&me.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ne.prototype.setTextColor=function(z){this.captionElement&&me.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ne.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},ne.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},ne.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ne.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ne.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&me.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ne.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},ne.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ne.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize()},ne.typeName="CaptionFrameMarker",ne.title="Caption frame marker",ne.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>',ne}(tt),vt=function(){function ae(ne,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ne,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}(),Pt=function(ae){function ne(z,oe,se){var ie=ae.call(this,z,!1)||this;return ie.dataUrl=oe,ie.state=se,ie}return Ke(ne,ae),ne}(vt),ze=function(ae){function ne(z,oe,se){se===void 0&&(se=!1);var ie=ae.call(this,z,se)||this;return ie.marker=oe,ie}return Ke(ne,ae),ne}(vt),wt=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(ne,z){this[ne].push(z)},ae.prototype.removeEventListener=function(ne,z){var oe=this[ne].indexOf(z);oe>-1&&this[ne].splice(oe,1)},ae}(),Bt=function(){function ae(ne){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Be,this._isOpen=!1,this.undoRedoManager=new rt,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 wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ne,this.targetRoot=document.body,this.width=ne.clientWidth,this.height=ne.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[Vt,Fe,Ut,Qe,Ne,qt,Mt,ft,xt,Et,nt,ct,on]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Vt,Fe,Ut,Qe,qt,Mt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Vt,Fe,Ut,Qe,Mt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ne){var z=this;this._availableMarkerTypes.splice(0),ne.forEach(function(oe){if(typeof oe=="string"){var se=z.ALL_MARKER_TYPES.find(function(ie){return ie.typeName===oe});se!==void 0&&z._availableMarkerTypes.push(se)}else z._availableMarkerTypes.push(oe)})},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(ne){this._zoomLevel=ne,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(),Oe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var ne=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new vt(ne))})},ae.prototype.render=function(){return _e(this,void 0,void 0,function(){var ne;return Xe(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ne=new Ve).naturalSize=this.renderAtNaturalSize,ne.imageType=this.renderImageType,ne.imageQuality=this.renderImageQuality,ne.markersOnly=this.renderMarkersOnly,ne.width=this.renderWidth,ne.height=this.renderHeight,[4,ne.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,ne.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(ne){var z=this;if(ne===void 0&&(ne=!1),this.isOpen){var oe=!1;ne||this.eventListeners.beforeclose.forEach(function(se){var ie=new vt(z,!0);se(ie),ie.defaultPrevented&&(oe=!0)}),oe||(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 vt(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var ne,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];(ne=this._availableMarkerTypes).push.apply(ne,z)},ae.prototype.addRenderEventListener=function(ne){this.addEventListener("render",function(z){ne(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(ne){},ae.prototype.addCloseEventListener=function(ne){this.addEventListener("close",function(){ne()})},ae.prototype.removeCloseEventListener=function(ne){},ae.prototype.setupResizeObserver=function(){var ne=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ne.resize(ne.target.clientWidth,ne.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ne.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var ne=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/ne>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ne:this.editorCanvas.clientWidth,oe=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ne;this.resize(z,oe)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(ne,z){this._isResizing=!0;var oe=ne/this.imageWidth,se=z/this.imageHeight;this.imageWidth=Math.round(ne),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(oe,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(ne,z){var oe,se=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(ne,z):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ie){ie!==se._currentMarker&&ie.scale(ne,z)}),oe!==void 0&&this.setCurrentMarker(oe)},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 ne=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ne.left-z.left,this.top=ne.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 ne,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];this.defs=me.createDefs(),this.addDefsToImage(),(ne=this.defs).append.apply(ne,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 ne=document.createElement("a");ne.href="https://markerjs.com/",ne.target="_blank",ne.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>',ne.title="Powered by marker.js",ne.style.display="grid",ne.style.alignItems="center",ne.style.justifyItems="center",ne.style.padding="3px",ne.style.width="20px",ne.style.height="20px",this.logoUI.appendChild(ne),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 ne=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=ne+"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 it(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 He(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(ne){this.markerImage.removeChild(ne.container),this.markers.indexOf(ne)>-1&&this.markers.splice(this.markers.indexOf(ne),1),ne.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(ne,z){if(ne==="marker"&&z!==void 0)this.createNewMarker(z);else if(ne==="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 ne=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var ie=new ze(ne,ne._currentMarker,!0);se(ie),ie.defaultPrevented&&(z=!0)}),!z){var oe=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 ze(ne,oe))})}}},ae.prototype.clear=function(){var ne=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(xe){var Ue=new ze(ne,void 0,!0);xe(Ue),Ue.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var oe=function(xe){var Ue=se.markers[xe];se.setCurrentMarker(se.markers[xe]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Ot){return Ot(new ze(ne,Ue))})},se=this,ie=this.markers.length-1;ie>=0;ie--)oe(ie);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var ne;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=(ne=this._currentMarker.notes)!==null&&ne!==void 0?ne:"",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 ne=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===z.width&&oe.height===z.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ie){return ie(new vt(ne))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ie){return ie(new vt(ne))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var ne=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new vt(ne))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var ne=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new vt(ne))}))},ae.prototype.stepZoom=function(){var ne=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ne<this.zoomSteps.length-1?this.zoomSteps[ne+1]:this.zoomSteps[0]},ae.prototype.panTo=function(ne){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ne.x,top:this.prevPanPoint.y-ne.y}),this.prevPanPoint=ne},ae.prototype.startRenderAndClose=function(){return _e(this,void 0,void 0,function(){var ne,z,oe=this;return Xe(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return ne=se.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ie){return ie(new Pt(oe,ne,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(ne){ne===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return z.markers.push(oe.getState())}),z},ae.prototype.restoreState=function(ne){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ne.markers.forEach(function(oe){var se=z._availableMarkerTypes.find(function(xe){return xe.typeName===oe.typeName});if(se!==void 0){var ie=z.addNewMarker(se);ie.restoreState(oe),z.markers.push(ie)}}),ne.width&&ne.height&&(ne.width!==this.imageWidth||ne.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ne.width,this.imageHeight/ne.height),this.eventListeners.restorestate.forEach(function(oe){return oe(new vt(z))})},ae.prototype.addNewMarker=function(ne){var z=me.createGroup();return this.markerImage.appendChild(z),new ne(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(ne){var z,oe=this;(z=typeof ne=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===ne}):ne)&&(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 ze(oe,oe._currentMarker))}))},ae.prototype.markerCreated=function(ne){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ne),this.setCurrentMarker(ne),ne instanceof Fe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Fe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new ze(z,z._currentMarker))})},ae.prototype.colorChanged=function(ne){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ne,this.settings.defaultStrokeColor=ne)},ae.prototype.fillColorChanged=function(ne){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ne)},ae.prototype.markerStateChanged=function(ne){var z=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new ze(z,ne))})},ae.prototype.setCurrentMarker=function(ne){var z=this;this._currentMarker!==ne&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new ze(z,z._currentMarker))})),this._currentMarker=ne,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(oe){return oe(new ze(z,z._currentMarker))}))},ae.prototype.onPointerDown=function(ne){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ne.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(oe){return oe.ownsTarget(ne.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ne.clientX,ne.clientY),ne.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ne.clientX,y:ne.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ne.clientX,ne.clientY))},ae.prototype.onDblClick=function(ne){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(oe){return oe.ownsTarget(ne.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ne.clientX,ne.clientY),ne.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(ne){this.touchPoints!==1&&ne.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ne.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ne.clientX,ne.clientY)):this.zoomLevel>1&&this.panTo({x:ne.clientX,y:ne.clientY}))},ae.prototype.onPointerUp=function(ne){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ne.clientX,ne.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(ne){this._currentMarker===void 0||this.notesArea!==void 0||ne.key!=="Delete"&&ne.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(ne,z){var oe=this.markerImage.getBoundingClientRect();return{x:(ne-oe.left)/this.zoomLevel,y:(z-oe.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ne=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ne+"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(ne){Oe.addKey(ne)},ae.prototype.addEventListener=function(ne,z){this.eventListeners.addEventListener(ne,z)},ae.prototype.removeEventListener=function(ne,z){this.eventListeners.removeEventListener(ne,z)},ae.prototype.renderState=function(ne){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ne),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var ne=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 vt(ne))}))},ae.prototype.blur=function(){var ne=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new vt(ne))}))},ae.instanceCounter=0,ae}()},66042:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return Qe}});var te=he(98506),Ke=he(16886),_e=he(43403),Xe=he(34280),ve=he(59301),me=ve.createContext(null),Oe=ve.createContext({}),Ve=me,we=he(52873),fe=he(67711),Ye=he(92310),pe=he.n(Ye),it=he(77900),He=he(10228),Ce=he(26112),Ee=he(33346),Se=he(8654),Je=["prefixCls","className","containerRef"],lt=function(ot){var Ut=ot.prefixCls,Et=ot.className,hn=ot.containerRef,Mt=(0,Ee.Z)(ot,Je),ge=ve.useContext(Oe),de=ge.panel,ft=(0,Se.x1)(de,hn);return ve.createElement("div",(0,fe.Z)({className:pe()("".concat(Ut,"-content"),Et),role:"dialog",ref:ft},(0,Ce.Z)(ot,{aria:!0}),{"aria-modal":"true"},Mt))},$e=lt,tt=he(48736);function Te(Fe){return typeof Fe=="string"&&String(Number(Fe))===Fe?((0,tt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Fe)):Fe}function dt(Fe){warning(!("wrapperClassName"in Fe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Fe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ht={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Vt(Fe,ot){var Ut,Et,hn,Mt=Fe.prefixCls,ge=Fe.open,de=Fe.placement,ft=Fe.inline,qt=Fe.push,xt=Fe.forceRender,Ne=Fe.autoFocus,rt=Fe.keyboard,ct=Fe.classNames,on=Fe.rootClassName,vt=Fe.rootStyle,Pt=Fe.zIndex,ze=Fe.className,wt=Fe.id,Bt=Fe.style,ae=Fe.motion,ne=Fe.width,z=Fe.height,oe=Fe.children,se=Fe.mask,ie=Fe.maskClosable,xe=Fe.maskMotion,Ue=Fe.maskClassName,Ot=Fe.maskStyle,Dt=Fe.afterOpenChange,gt=Fe.onClose,kt=Fe.onMouseEnter,$t=Fe.onMouseOver,Gt=Fe.onMouseLeave,nn=Fe.onClick,an=Fe.onKeyDown,_t=Fe.onKeyUp,En=Fe.styles,ln=Fe.drawerRender,kn=ve.useRef(),st=ve.useRef(),An=ve.useRef();ve.useImperativeHandle(ot,function(){return kn.current});var Rt=function(yi){var cn=yi.keyCode,xn=yi.shiftKey;switch(cn){case He.Z.TAB:{if(cn===He.Z.TAB){if(!xn&&document.activeElement===An.current){var Sn;(Sn=st.current)===null||Sn===void 0||Sn.focus({preventScroll:!0})}else if(xn&&document.activeElement===st.current){var ti;(ti=An.current)===null||ti===void 0||ti.focus({preventScroll:!0})}}break}case He.Z.ESC:{gt&&rt&&(yi.stopPropagation(),gt(yi));break}}};ve.useEffect(function(){if(ge&&Ne){var ni;(ni=kn.current)===null||ni===void 0||ni.focus({preventScroll:!0})}},[ge]);var sn=ve.useState(!1),wn=(0,Ke.Z)(sn,2),Jn=wn[0],jt=wn[1],Fn=ve.useContext(Ve),xi;typeof qt=="boolean"?xi=qt?{}:{distance:0}:xi=qt||{};var hi=(Ut=(Et=(hn=xi)===null||hn===void 0?void 0:hn.distance)!==null&&Et!==void 0?Et:Fn==null?void 0:Fn.pushDistance)!==null&&Ut!==void 0?Ut:180,_i=ve.useMemo(function(){return{pushDistance:hi,push:function(){jt(!0)},pull:function(){jt(!1)}}},[hi]);ve.useEffect(function(){if(ge){var ni;Fn==null||(ni=Fn.push)===null||ni===void 0||ni.call(Fn)}else{var yi;Fn==null||(yi=Fn.pull)===null||yi===void 0||yi.call(Fn)}},[ge]),ve.useEffect(function(){return function(){var ni;Fn==null||(ni=Fn.pull)===null||ni===void 0||ni.call(Fn)}},[]);var Ri=se&&ve.createElement(it.default,(0,fe.Z)({key:"mask"},xe,{visible:ge}),function(ni,yi){var cn=ni.className,xn=ni.style;return ve.createElement("div",{className:pe()("".concat(Mt,"-mask"),cn,ct==null?void 0:ct.mask,Ue),style:(0,te.Z)((0,te.Z)((0,te.Z)({},xn),Ot),En==null?void 0:En.mask),onClick:ie&&ge?gt:void 0,ref:yi})}),Ai=typeof ae=="function"?ae(de):ae,Bi={};if(Jn&&hi)switch(de){case"top":Bi.transform="translateY(".concat(hi,"px)");break;case"bottom":Bi.transform="translateY(".concat(-hi,"px)");break;case"left":Bi.transform="translateX(".concat(hi,"px)");break;default:Bi.transform="translateX(".concat(-hi,"px)");break}de==="left"||de==="right"?Bi.width=Te(ne):Bi.height=Te(z);var li={onMouseEnter:kt,onMouseOver:$t,onMouseLeave:Gt,onClick:nn,onKeyDown:an,onKeyUp:_t},bi=ve.createElement(it.default,(0,fe.Z)({key:"panel"},Ai,{visible:ge,forceRender:xt,onVisibleChanged:function(yi){Dt==null||Dt(yi)},removeOnLeave:!1,leavedClassName:"".concat(Mt,"-content-wrapper-hidden")}),function(ni,yi){var cn=ni.className,xn=ni.style,Sn=ve.createElement($e,(0,fe.Z)({id:wt,containerRef:yi,prefixCls:Mt,className:pe()(ze,ct==null?void 0:ct.content),style:(0,te.Z)((0,te.Z)({},Bt),En==null?void 0:En.content)},(0,Ce.Z)(Fe,{aria:!0}),li),oe);return ve.createElement("div",(0,fe.Z)({className:pe()("".concat(Mt,"-content-wrapper"),ct==null?void 0:ct.wrapper,cn),style:(0,te.Z)((0,te.Z)((0,te.Z)({},Bi),xn),En==null?void 0:En.wrapper)},(0,Ce.Z)(Fe,{data:!0})),ln?ln(Sn):Sn)}),Si=(0,te.Z)({},vt);return Pt&&(Si.zIndex=Pt),ve.createElement(Ve.Provider,{value:_i},ve.createElement("div",{className:pe()(Mt,"".concat(Mt,"-").concat(de),on,(0,we.Z)((0,we.Z)({},"".concat(Mt,"-open"),ge),"".concat(Mt,"-inline"),ft)),style:Si,tabIndex:-1,ref:kn,onKeyDown:Rt},Ri,ve.createElement("div",{tabIndex:0,ref:st,style:ht,"aria-hidden":"true","data-sentinel":"start"}),bi,ve.createElement("div",{tabIndex:0,ref:An,style:ht,"aria-hidden":"true","data-sentinel":"end"})))}var Be=ve.forwardRef(Vt),Ge=Be,nt=function(ot){var Ut=ot.open,Et=Ut===void 0?!1:Ut,hn=ot.prefixCls,Mt=hn===void 0?"rc-drawer":hn,ge=ot.placement,de=ge===void 0?"right":ge,ft=ot.autoFocus,qt=ft===void 0?!0:ft,xt=ot.keyboard,Ne=xt===void 0?!0:xt,rt=ot.width,ct=rt===void 0?378:rt,on=ot.mask,vt=on===void 0?!0:on,Pt=ot.maskClosable,ze=Pt===void 0?!0:Pt,wt=ot.getContainer,Bt=ot.forceRender,ae=ot.afterOpenChange,ne=ot.destroyOnClose,z=ot.onMouseEnter,oe=ot.onMouseOver,se=ot.onMouseLeave,ie=ot.onClick,xe=ot.onKeyDown,Ue=ot.onKeyUp,Ot=ot.panelRef,Dt=ve.useState(!1),gt=(0,Ke.Z)(Dt,2),kt=gt[0],$t=gt[1],Gt=ve.useState(!1),nn=(0,Ke.Z)(Gt,2),an=nn[0],_t=nn[1];(0,Xe.Z)(function(){_t(!0)},[]);var En=an?Et:!1,ln=ve.useRef(),kn=ve.useRef();(0,Xe.Z)(function(){En&&(kn.current=document.activeElement)},[En]);var st=function(Jn){var jt;if($t(Jn),ae==null||ae(Jn),!Jn&&kn.current&&!((jt=ln.current)!==null&&jt!==void 0&&jt.contains(kn.current))){var Fn;(Fn=kn.current)===null||Fn===void 0||Fn.focus({preventScroll:!0})}},An=ve.useMemo(function(){return{panel:Ot}},[Ot]);if(!Bt&&!kt&&!En&&ne)return null;var Rt={onMouseEnter:z,onMouseOver:oe,onMouseLeave:se,onClick:ie,onKeyDown:xe,onKeyUp:Ue},sn=(0,te.Z)((0,te.Z)({},ot),{},{open:En,prefixCls:Mt,placement:de,autoFocus:qt,keyboard:Ne,width:ct,mask:vt,maskClosable:ze,inline:wt===!1,afterOpenChange:st,ref:ln},Rt);return ve.createElement(Oe.Provider,{value:An},ve.createElement(_e.Z,{open:En||Bt||kt,autoDestroy:!1,getContainer:wt,autoLock:vt&&(En||kt)},ve.createElement(Ge,sn)))},Me=nt,Qe=Me},23425:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return ht}});var te=he(52873),Ke=he(67711),_e=he(26420),Xe=he(98506),ve=he(16886),me=he(92310),Oe=he.n(me),Ve=he(18929),we=he(10228),fe=he(26112),Ye=he(48736),pe=he(59301),it=he(17119),He=[10,20,50,100],Ce=function(Be){var Ge=Be.pageSizeOptions,nt=Ge===void 0?He:Ge,Me=Be.locale,Qe=Be.changeSize,Fe=Be.pageSize,ot=Be.goButton,Ut=Be.quickGo,Et=Be.rootPrefixCls,hn=Be.disabled,Mt=Be.buildOptionText,ge=Be.showSizeChanger,de=Be.sizeChangerRender,ft=pe.useState(""),qt=(0,ve.Z)(ft,2),xt=qt[0],Ne=qt[1],rt=function(){return!xt||Number.isNaN(xt)?void 0:Number(xt)},ct=typeof Mt=="function"?Mt:function(z){return"".concat(z," ").concat(Me.items_per_page)},on=function(oe){Ne(oe.target.value)},vt=function(oe){ot||xt===""||(Ne(""),!(oe.relatedTarget&&(oe.relatedTarget.className.indexOf("".concat(Et,"-item-link"))>=0||oe.relatedTarget.className.indexOf("".concat(Et,"-item"))>=0))&&(Ut==null||Ut(rt())))},Pt=function(oe){xt!==""&&(oe.keyCode===we.Z.ENTER||oe.type==="click")&&(Ne(""),Ut==null||Ut(rt()))},ze=function(){return nt.some(function(oe){return oe.toString()===Fe.toString()})?nt:nt.concat([Fe]).sort(function(oe,se){var ie=Number.isNaN(Number(oe))?0:Number(oe),xe=Number.isNaN(Number(se))?0:Number(se);return ie-xe})},wt="".concat(Et,"-options");if(!ge&&!Ut)return null;var Bt=null,ae=null,ne=null;return ge&&de&&(Bt=de({disabled:hn,size:Fe,onSizeChange:function(oe){Qe==null||Qe(Number(oe))},"aria-label":Me.page_size,className:"".concat(wt,"-size-changer"),options:ze().map(function(z){return{label:ct(z),value:z}})})),Ut&&(ot&&(ne=typeof ot=="boolean"?pe.createElement("button",{type:"button",onClick:Pt,onKeyUp:Pt,disabled:hn,className:"".concat(wt,"-quick-jumper-button")},Me.jump_to_confirm):pe.createElement("span",{onClick:Pt,onKeyUp:Pt},ot)),ae=pe.createElement("div",{className:"".concat(wt,"-quick-jumper")},Me.jump_to,pe.createElement("input",{disabled:hn,type:"text",value:xt,onChange:on,onKeyUp:Pt,onBlur:vt,"aria-label":Me.page}),Me.page,ne)),pe.createElement("li",{className:wt},Bt,ae)},Ee=Ce,Se=function(Be){var Ge=Be.rootPrefixCls,nt=Be.page,Me=Be.active,Qe=Be.className,Fe=Be.showTitle,ot=Be.onClick,Ut=Be.onKeyPress,Et=Be.itemRender,hn="".concat(Ge,"-item"),Mt=Oe()(hn,"".concat(hn,"-").concat(nt),(0,te.Z)((0,te.Z)({},"".concat(hn,"-active"),Me),"".concat(hn,"-disabled"),!nt),Qe),ge=function(){ot(nt)},de=function(xt){Ut(xt,ot,nt)},ft=Et(nt,"page",pe.createElement("a",{rel:"nofollow"},nt));return ft?pe.createElement("li",{title:Fe?String(nt):null,className:Mt,onClick:ge,onKeyDown:de,tabIndex:0},ft):null},Je=Se,lt=function(Be,Ge,nt){return nt};function $e(){}function tt(Vt){var Be=Number(Vt);return typeof Be=="number"&&!Number.isNaN(Be)&&isFinite(Be)&&Math.floor(Be)===Be}function Te(Vt,Be,Ge){var nt=typeof Vt=="undefined"?Be:Vt;return Math.floor((Ge-1)/nt)+1}var dt=function(Be){var Ge=Be.prefixCls,nt=Ge===void 0?"rc-pagination":Ge,Me=Be.selectPrefixCls,Qe=Me===void 0?"rc-select":Me,Fe=Be.className,ot=Be.current,Ut=Be.defaultCurrent,Et=Ut===void 0?1:Ut,hn=Be.total,Mt=hn===void 0?0:hn,ge=Be.pageSize,de=Be.defaultPageSize,ft=de===void 0?10:de,qt=Be.onChange,xt=qt===void 0?$e:qt,Ne=Be.hideOnSinglePage,rt=Be.align,ct=Be.showPrevNextJumpers,on=ct===void 0?!0:ct,vt=Be.showQuickJumper,Pt=Be.showLessItems,ze=Be.showTitle,wt=ze===void 0?!0:ze,Bt=Be.onShowSizeChange,ae=Bt===void 0?$e:Bt,ne=Be.locale,z=ne===void 0?it.Z:ne,oe=Be.style,se=Be.totalBoundaryShowSizeChanger,ie=se===void 0?50:se,xe=Be.disabled,Ue=Be.simple,Ot=Be.showTotal,Dt=Be.showSizeChanger,gt=Dt===void 0?Mt>ie:Dt,kt=Be.sizeChangerRender,$t=Be.pageSizeOptions,Gt=Be.itemRender,nn=Gt===void 0?lt:Gt,an=Be.jumpPrevIcon,_t=Be.jumpNextIcon,En=Be.prevIcon,ln=Be.nextIcon,kn=pe.useRef(null),st=(0,Ve.Z)(10,{value:ge,defaultValue:ft}),An=(0,ve.Z)(st,2),Rt=An[0],sn=An[1],wn=(0,Ve.Z)(1,{value:ot,defaultValue:Et,postState:function(dn){return Math.max(1,Math.min(dn,Te(void 0,Rt,Mt)))}}),Jn=(0,ve.Z)(wn,2),jt=Jn[0],Fn=Jn[1],xi=pe.useState(jt),hi=(0,ve.Z)(xi,2),_i=hi[0],Ri=hi[1];(0,pe.useEffect)(function(){Ri(jt)},[jt]);var Ai=xt!==$e,Bi="current"in Be,li=Math.max(1,jt-(Pt?3:5)),bi=Math.min(Te(void 0,Rt,Mt),jt+(Pt?3:5));function Si(Zt,dn){var Pn=Zt||pe.createElement("button",{type:"button","aria-label":dn,className:"".concat(nt,"-item-link")});return typeof Zt=="function"&&(Pn=pe.createElement(Zt,(0,Xe.Z)({},Be))),Pn}function ni(Zt){var dn=Zt.target.value,Pn=Te(void 0,Rt,Mt),Zn;return dn===""?Zn=dn:Number.isNaN(Number(dn))?Zn=_i:dn>=Pn?Zn=Pn:Zn=Number(dn),Zn}function yi(Zt){return tt(Zt)&&Zt!==jt&&tt(Mt)&&Mt>0}var cn=Mt>Rt?vt:!1;function xn(Zt){(Zt.keyCode===we.Z.UP||Zt.keyCode===we.Z.DOWN)&&Zt.preventDefault()}function Sn(Zt){var dn=ni(Zt);switch(dn!==_i&&Ri(dn),Zt.keyCode){case we.Z.ENTER:Vn(dn);break;case we.Z.UP:Vn(dn-1);break;case we.Z.DOWN:Vn(dn+1);break;default:break}}function ti(Zt){Vn(ni(Zt))}function zi(Zt){var dn=Te(Zt,Rt,Mt),Pn=jt>dn&&dn!==0?dn:jt;sn(Zt),Ri(Pn),ae==null||ae(jt,Zt),Fn(Pn),xt==null||xt(Pn,Zt)}function Vn(Zt){if(yi(Zt)&&!xe){var dn=Te(void 0,Rt,Mt),Pn=Zt;return Zt>dn?Pn=dn:Zt<1&&(Pn=1),Pn!==_i&&Ri(Pn),Fn(Pn),xt==null||xt(Pn,Rt),Pn}return jt}var vi=jt>1,Di=jt<Te(void 0,Rt,Mt);function Ei(){vi&&Vn(jt-1)}function ii(){Di&&Vn(jt+1)}function ui(){Vn(li)}function Fi(){Vn(bi)}function zt(Zt,dn){if(Zt.key==="Enter"||Zt.charCode===we.Z.ENTER||Zt.keyCode===we.Z.ENTER){for(var Pn=arguments.length,Zn=new Array(Pn>2?Pn-2:0),jn=2;jn<Pn;jn++)Zn[jn-2]=arguments[jn];dn.apply(void 0,Zn)}}function at(Zt){zt(Zt,Ei)}function vn(Zt){zt(Zt,ii)}function ri(Zt){zt(Zt,ui)}function ci(Zt){zt(Zt,Fi)}function Ae(Zt){var dn=nn(Zt,"prev",Si(En,"prev page"));return pe.isValidElement(dn)?pe.cloneElement(dn,{disabled:!vi}):dn}function Pe(Zt){var dn=nn(Zt,"next",Si(ln,"next page"));return pe.isValidElement(dn)?pe.cloneElement(dn,{disabled:!Di}):dn}function Lt(Zt){(Zt.type==="click"||Zt.keyCode===we.Z.ENTER)&&Vn(_i)}var pt=null,Re=(0,fe.Z)(Be,{aria:!0,data:!0}),yt=Ot&&pe.createElement("li",{className:"".concat(nt,"-total-text")},Ot(Mt,[Mt===0?0:(jt-1)*Rt+1,jt*Rt>Mt?Mt:jt*Rt])),Xt=null,Wt=Te(void 0,Rt,Mt);if(Ne&&Mt<=Rt)return null;var tn=[],We={rootPrefixCls:nt,onClick:Vn,onKeyPress:zt,showTitle:wt,itemRender:nn,page:-1},en=jt-1>0?jt-1:0,St=jt+1<Wt?jt+1:Wt,_n=vt&&vt.goButton,Jt=(0,_e.Z)(Ue)==="object"?Ue.readOnly:!Ue,De=_n,Le=null;Ue&&(_n&&(typeof _n=="boolean"?De=pe.createElement("button",{type:"button",onClick:Lt,onKeyUp:Lt},z.jump_to_confirm):De=pe.createElement("span",{onClick:Lt,onKeyUp:Lt},_n),De=pe.createElement("li",{title:wt?"".concat(z.jump_to).concat(jt,"/").concat(Wt):null,className:"".concat(nt,"-simple-pager")},De)),Le=pe.createElement("li",{title:wt?"".concat(jt,"/").concat(Wt):null,className:"".concat(nt,"-simple-pager")},Jt?_i:pe.createElement("input",{type:"text","aria-label":z.jump_to,value:_i,disabled:xe,onKeyDown:xn,onKeyUp:Sn,onChange:Sn,onBlur:ti,size:3}),pe.createElement("span",{className:"".concat(nt,"-slash")},"/"),Wt));var ye=Pt?1:2;if(Wt<=3+ye*2){Wt||tn.push(pe.createElement(Je,(0,Ke.Z)({},We,{key:"noPager",page:1,className:"".concat(nt,"-item-disabled")})));for(var ut=1;ut<=Wt;ut+=1)tn.push(pe.createElement(Je,(0,Ke.Z)({},We,{key:ut,page:ut,active:jt===ut})))}else{var Cn=Pt?z.prev_3:z.prev_5,Hn=Pt?z.next_3:z.next_5,rn=nn(li,"jump-prev",Si(an,"prev page")),At=nn(bi,"jump-next",Si(_t,"next page"));on&&(pt=rn?pe.createElement("li",{title:wt?Cn:null,key:"prev",onClick:ui,tabIndex:0,onKeyDown:ri,className:Oe()("".concat(nt,"-jump-prev"),(0,te.Z)({},"".concat(nt,"-jump-prev-custom-icon"),!!an))},rn):null,Xt=At?pe.createElement("li",{title:wt?Hn:null,key:"next",onClick:Fi,tabIndex:0,onKeyDown:ci,className:Oe()("".concat(nt,"-jump-next"),(0,te.Z)({},"".concat(nt,"-jump-next-custom-icon"),!!_t))},At):null);var Ie=Math.max(1,jt-ye),un=Math.min(jt+ye,Wt);jt-1<=ye&&(un=1+ye*2),Wt-jt<=ye&&(Ie=Wt-ye*2);for(var bn=Ie;bn<=un;bn+=1)tn.push(pe.createElement(Je,(0,Ke.Z)({},We,{key:bn,page:bn,active:jt===bn})));if(jt-1>=ye*2&&jt!==3&&(tn[0]=pe.cloneElement(tn[0],{className:Oe()("".concat(nt,"-item-after-jump-prev"),tn[0].props.className)}),tn.unshift(pt)),Wt-jt>=ye*2&&jt!==Wt-2){var Ln=tn[tn.length-1];tn[tn.length-1]=pe.cloneElement(Ln,{className:Oe()("".concat(nt,"-item-before-jump-next"),Ln.props.className)}),tn.push(Xt)}Ie!==1&&tn.unshift(pe.createElement(Je,(0,Ke.Z)({},We,{key:1,page:1}))),un!==Wt&&tn.push(pe.createElement(Je,(0,Ke.Z)({},We,{key:Wt,page:Wt})))}var On=Ae(en);if(On){var qn=!vi||!Wt;On=pe.createElement("li",{title:wt?z.prev_page:null,onClick:Ei,tabIndex:qn?null:0,onKeyDown:at,className:Oe()("".concat(nt,"-prev"),(0,te.Z)({},"".concat(nt,"-disabled"),qn)),"aria-disabled":qn},On)}var Kt=Pe(St);if(Kt){var Bn,Wn;Ue?(Bn=!Di,Wn=vi?0:null):(Bn=!Di||!Wt,Wn=Bn?null:0),Kt=pe.createElement("li",{title:wt?z.next_page:null,onClick:ii,tabIndex:Wn,onKeyDown:vn,className:Oe()("".concat(nt,"-next"),(0,te.Z)({},"".concat(nt,"-disabled"),Bn)),"aria-disabled":Bn},Kt)}var Rn=Oe()(nt,Fe,(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(nt,"-start"),rt==="start"),"".concat(nt,"-center"),rt==="center"),"".concat(nt,"-end"),rt==="end"),"".concat(nt,"-simple"),Ue),"".concat(nt,"-disabled"),xe));return pe.createElement("ul",(0,Ke.Z)({className:Rn,style:oe,ref:kn},Re),yt,On,Ue?Le:tn,Kt,pe.createElement(Ee,{locale:z,rootPrefixCls:nt,disabled:xe,selectPrefixCls:Qe,changeSize:zi,pageSize:Rt,pageSizeOptions:$t,quickGo:cn?Vn:null,goButton:De,showSizeChanger:gt,sizeChangerRender:kt}))},ht=dt},6551:function(It,Ht,he){"use strict";he.d(Ht,{ZP:function(){return Oe}});var te=he(16886),Ke=he(59301),_e=he(47273),Xe=0,ve=(0,_e.Z)();function me(){var Ve;return ve?(Ve=Xe,Xe+=1):Ve="TEST_OR_SSR",Ve}function Oe(Ve){var we=Ke.useState(),fe=(0,te.Z)(we,2),Ye=fe[0],pe=fe[1];return Ke.useEffect(function(){pe("rc_select_".concat(me()))},[]),Ve||Ye}},37463:function(It,Ht,he){"use strict";he.d(Ht,{Ac:function(){return st},Xo:function(){return Rt},Wx:function(){return wn},ZP:function(){return ci},lk:function(){return $e}});var te=he(67711),Ke=he(15142),_e=he(52873),Xe=he(98506),ve=he(16886),me=he(33346),Oe=he(26420),Ve=he(18929),we=he(48736),fe=he(59301),Ye=he(92310),pe=he.n(Ye),it=he(34280),He=he(49658),Ce=he(8654),Ee=function(Pe){var Lt=Pe.className,pt=Pe.customizeIcon,Re=Pe.customizeIconProps,yt=Pe.children,Xt=Pe.onMouseDown,Wt=Pe.onClick,tn=typeof pt=="function"?pt(Re):pt;return fe.createElement("span",{className:Lt,onMouseDown:function(en){en.preventDefault(),Xt==null||Xt(en)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Wt,"aria-hidden":!0},tn!==void 0?tn:fe.createElement("span",{className:pe()(Lt.split(/\s+/).map(function(We){return"".concat(We,"-icon")}))},yt))},Se=Ee,Je=function(Pe,Lt,pt,Re,yt){var Xt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Wt=arguments.length>6?arguments[6]:void 0,tn=arguments.length>7?arguments[7]:void 0,We=fe.useMemo(function(){if((0,Oe.Z)(Re)==="object")return Re.clearIcon;if(yt)return yt},[Re,yt]),en=fe.useMemo(function(){return!!(!Xt&&Re&&(pt.length||Wt)&&!(tn==="combobox"&&Wt===""))},[Re,Xt,pt.length,Wt,tn]);return{allowClear:en,clearIcon:fe.createElement(Se,{className:"".concat(Pe,"-clear"),onMouseDown:Lt,customizeIcon:We},"\xD7")}},lt=fe.createContext(null);function $e(){return fe.useContext(lt)}function tt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=fe.useState(!1),Lt=(0,ve.Z)(Pe,2),pt=Lt[0],Re=Lt[1],yt=fe.useRef(null),Xt=function(){window.clearTimeout(yt.current)};fe.useEffect(function(){return Xt},[]);var Wt=function(We,en){Xt(),yt.current=window.setTimeout(function(){Re(We),en&&en()},Ae)};return[pt,Wt,Xt]}function Te(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=fe.useRef(null),Lt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Lt.current)}},[]);function pt(Re){(Re||Pe.current===null)&&(Pe.current=Re),window.clearTimeout(Lt.current),Lt.current=window.setTimeout(function(){Pe.current=null},Ae)}return[function(){return Pe.current},pt]}function dt(Ae,Pe,Lt,pt){var Re=fe.useRef(null);Re.current={open:Pe,triggerOpen:Lt,customizedTrigger:pt},fe.useEffect(function(){function yt(Xt){var Wt;if(!((Wt=Re.current)!==null&&Wt!==void 0&&Wt.customizedTrigger)){var tn=Xt.target;tn.shadowRoot&&Xt.composed&&(tn=Xt.composedPath()[0]||tn),Re.current.open&&Ae().filter(function(We){return We}).every(function(We){return!We.contains(tn)&&We!==tn})&&Re.current.triggerOpen(!1)}}return window.addEventListener("mousedown",yt),function(){return window.removeEventListener("mousedown",yt)}},[])}var ht=he(10228);function Vt(Ae){return Ae&&![ht.Z.ESC,ht.Z.SHIFT,ht.Z.BACKSPACE,ht.Z.TAB,ht.Z.WIN_KEY,ht.Z.ALT,ht.Z.META,ht.Z.WIN_KEY_RIGHT,ht.Z.CTRL,ht.Z.SEMICOLON,ht.Z.EQUALS,ht.Z.CAPS_LOCK,ht.Z.CONTEXT_MENU,ht.Z.F1,ht.Z.F2,ht.Z.F3,ht.Z.F4,ht.Z.F5,ht.Z.F6,ht.Z.F7,ht.Z.F8,ht.Z.F9,ht.Z.F10,ht.Z.F11,ht.Z.F12].includes(Ae)}var Be=he(26112),Ge=he(11780);function nt(Ae,Pe,Lt){var pt=(0,Xe.Z)((0,Xe.Z)({},Ae),Lt?Pe:{});return Object.keys(Pe).forEach(function(Re){var yt=Pe[Re];typeof yt=="function"&&(pt[Re]=function(){for(var Xt,Wt=arguments.length,tn=new Array(Wt),We=0;We<Wt;We++)tn[We]=arguments[We];return yt.apply(void 0,tn),(Xt=Ae[Re])===null||Xt===void 0?void 0:Xt.call.apply(Xt,[Ae].concat(tn))})}),pt}var Me=nt,Qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Fe=function(Pe,Lt){var pt=Pe.prefixCls,Re=Pe.id,yt=Pe.inputElement,Xt=Pe.autoFocus,Wt=Pe.autoComplete,tn=Pe.editable,We=Pe.activeDescendantId,en=Pe.value,St=Pe.open,_n=Pe.attrs,Jt=(0,me.Z)(Pe,Qe),De=yt||fe.createElement("input",null),Le=De,ye=Le.ref,ut=Le.props;return(0,we.Kp)(!("maxLength"in De.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),De=fe.cloneElement(De,(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({type:"search"},Me(Jt,ut,!0)),{},{id:Re,ref:(0,Ce.sQ)(Lt,ye),autoComplete:Wt||"off",autoFocus:Xt,className:pe()("".concat(pt,"-selection-search-input"),ut==null?void 0:ut.className),role:"combobox","aria-expanded":St||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Re,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Re,"_list"),"aria-activedescendant":St?We:void 0},_n),{},{value:tn?en:"",readOnly:!tn,unselectable:tn?null:"on",style:(0,Xe.Z)((0,Xe.Z)({},ut.style),{},{opacity:tn?null:0})})),De},ot=fe.forwardRef(Fe),Ut=ot;function Et(Ae){return Array.isArray(Ae)?Ae:Ae!==void 0?[Ae]:[]}var hn=typeof window!="undefined"&&window.document&&window.document.documentElement,Mt=hn;function ge(Ae){return Ae!=null}function de(Ae){return!Ae&&Ae!==0}function ft(Ae){return["string","number"].includes((0,Oe.Z)(Ae))}function qt(Ae){var Pe=void 0;return Ae&&(ft(Ae.title)?Pe=Ae.title.toString():ft(Ae.label)&&(Pe=Ae.label.toString())),Pe}function xt(Ae,Pe){Mt?fe.useLayoutEffect(Ae,Pe):fe.useEffect(Ae,Pe)}function Ne(Ae){var Pe;return(Pe=Ae.key)!==null&&Pe!==void 0?Pe:Ae.value}var rt=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},ct=function(Pe){var Lt=Pe.id,pt=Pe.prefixCls,Re=Pe.values,yt=Pe.open,Xt=Pe.searchValue,Wt=Pe.autoClearSearchValue,tn=Pe.inputRef,We=Pe.placeholder,en=Pe.disabled,St=Pe.mode,_n=Pe.showSearch,Jt=Pe.autoFocus,De=Pe.autoComplete,Le=Pe.activeDescendantId,ye=Pe.tabIndex,ut=Pe.removeIcon,Cn=Pe.maxTagCount,Hn=Pe.maxTagTextLength,rn=Pe.maxTagPlaceholder,At=rn===void 0?function(et){return"+ ".concat(et.length," ...")}:rn,Ie=Pe.tagRender,un=Pe.onToggleOpen,bn=Pe.onRemove,Ln=Pe.onInputChange,On=Pe.onInputPaste,qn=Pe.onInputKeyDown,Kt=Pe.onInputMouseDown,Bn=Pe.onInputCompositionStart,Wn=Pe.onInputCompositionEnd,Rn=Pe.onInputBlur,Zt=fe.useRef(null),dn=(0,fe.useState)(0),Pn=(0,ve.Z)(dn,2),Zn=Pn[0],jn=Pn[1],Nn=(0,fe.useState)(!1),Mn=(0,ve.Z)(Nn,2),$n=Mn[0],mn=Mn[1],di="".concat(pt,"-selection"),Gn=yt||St==="multiple"&&Wt===!1||St==="tags"?Xt:"",Yt=St==="tags"||St==="multiple"&&Wt===!1||_n&&(yt||$n);xt(function(){jn(Zt.current.scrollWidth)},[Gn]);var Xn=function(Ze,mt,Ft,gn,zn){return fe.createElement("span",{title:qt(Ze),className:pe()("".concat(di,"-item"),(0,_e.Z)({},"".concat(di,"-item-disabled"),Ft))},fe.createElement("span",{className:"".concat(di,"-item-content")},mt),gn&&fe.createElement(Se,{className:"".concat(di,"-item-remove"),onMouseDown:rt,onClick:zn,customizeIcon:ut},"\xD7"))},Un=function(Ze,mt,Ft,gn,zn,oi){var mi=function(Pi){rt(Pi),un(!yt)};return fe.createElement("span",{onMouseDown:mi},Ie({label:mt,value:Ze,disabled:Ft,closable:gn,onClose:zn,isMaxTag:!!oi}))},wi=function(Ze){var mt=Ze.disabled,Ft=Ze.label,gn=Ze.value,zn=!en&&!mt,oi=Ft;if(typeof Hn=="number"&&(typeof Ft=="string"||typeof Ft=="number")){var mi=String(oi);mi.length>Hn&&(oi="".concat(mi.slice(0,Hn),"..."))}var fi=function(Ci){Ci&&Ci.stopPropagation(),bn(Ze)};return typeof Ie=="function"?Un(gn,oi,mt,zn,fi):Xn(Ze,oi,mt,zn,fi)},In=function(Ze){if(!Re.length)return null;var mt=typeof At=="function"?At(Ze):At;return typeof Ie=="function"?Un(void 0,mt,!1,!1,void 0,!0):Xn({title:mt},mt,!1)},bt=fe.createElement("div",{className:"".concat(di,"-search"),style:{width:Zn},onFocus:function(){mn(!0)},onBlur:function(){mn(!1)}},fe.createElement(Ut,{ref:tn,open:yt,prefixCls:pt,id:Lt,inputElement:null,disabled:en,autoFocus:Jt,autoComplete:De,editable:Yt,activeDescendantId:Le,value:Gn,onKeyDown:qn,onMouseDown:Kt,onChange:Ln,onPaste:On,onCompositionStart:Bn,onCompositionEnd:Wn,onBlur:Rn,tabIndex:ye,attrs:(0,Be.Z)(Pe,!0)}),fe.createElement("span",{ref:Zt,className:"".concat(di,"-search-mirror"),"aria-hidden":!0},Gn,"\xA0")),Tt=fe.createElement(Ge.Z,{prefixCls:"".concat(di,"-overflow"),data:Re,renderItem:wi,renderRest:In,suffix:bt,itemKey:Ne,maxCount:Cn});return fe.createElement("span",{className:"".concat(di,"-wrap")},Tt,!Re.length&&!Gn&&fe.createElement("span",{className:"".concat(di,"-placeholder")},We))},on=ct,vt=function(Pe){var Lt=Pe.inputElement,pt=Pe.prefixCls,Re=Pe.id,yt=Pe.inputRef,Xt=Pe.disabled,Wt=Pe.autoFocus,tn=Pe.autoComplete,We=Pe.activeDescendantId,en=Pe.mode,St=Pe.open,_n=Pe.values,Jt=Pe.placeholder,De=Pe.tabIndex,Le=Pe.showSearch,ye=Pe.searchValue,ut=Pe.activeValue,Cn=Pe.maxLength,Hn=Pe.onInputKeyDown,rn=Pe.onInputMouseDown,At=Pe.onInputChange,Ie=Pe.onInputPaste,un=Pe.onInputCompositionStart,bn=Pe.onInputCompositionEnd,Ln=Pe.onInputBlur,On=Pe.title,qn=fe.useState(!1),Kt=(0,ve.Z)(qn,2),Bn=Kt[0],Wn=Kt[1],Rn=en==="combobox",Zt=Rn||Le,dn=_n[0],Pn=ye||"";Rn&&ut&&!Bn&&(Pn=ut),fe.useEffect(function(){Rn&&Wn(!1)},[Rn,ut]);var Zn=en!=="combobox"&&!St&&!Le?!1:!!Pn,jn=On===void 0?qt(dn):On,Nn=fe.useMemo(function(){return dn?null:fe.createElement("span",{className:"".concat(pt,"-selection-placeholder"),style:Zn?{visibility:"hidden"}:void 0},Jt)},[dn,Zn,Jt,pt]);return fe.createElement("span",{className:"".concat(pt,"-selection-wrap")},fe.createElement("span",{className:"".concat(pt,"-selection-search")},fe.createElement(Ut,{ref:yt,prefixCls:pt,id:Re,open:St,inputElement:Lt,disabled:Xt,autoFocus:Wt,autoComplete:tn,editable:Zt,activeDescendantId:We,value:Pn,onKeyDown:Hn,onMouseDown:rn,onChange:function($n){Wn(!0),At($n)},onPaste:Ie,onCompositionStart:un,onCompositionEnd:bn,onBlur:Ln,tabIndex:De,attrs:(0,Be.Z)(Pe,!0),maxLength:Rn?Cn:void 0})),!Rn&&dn?fe.createElement("span",{className:"".concat(pt,"-selection-item"),title:jn,style:Zn?{visibility:"hidden"}:void 0},dn.label):null,Nn)},Pt=vt,ze=function(Pe,Lt){var pt=(0,fe.useRef)(null),Re=(0,fe.useRef)(!1),yt=Pe.prefixCls,Xt=Pe.open,Wt=Pe.mode,tn=Pe.showSearch,We=Pe.tokenWithEnter,en=Pe.disabled,St=Pe.prefix,_n=Pe.autoClearSearchValue,Jt=Pe.onSearch,De=Pe.onSearchSubmit,Le=Pe.onToggleOpen,ye=Pe.onInputKeyDown,ut=Pe.onInputBlur,Cn=Pe.domRef;fe.useImperativeHandle(Lt,function(){return{focus:function(jn){pt.current.focus(jn)},blur:function(){pt.current.blur()}}});var Hn=Te(0),rn=(0,ve.Z)(Hn,2),At=rn[0],Ie=rn[1],un=function(jn){var Nn=jn.which,Mn=pt.current instanceof HTMLTextAreaElement;!Mn&&Xt&&(Nn===ht.Z.UP||Nn===ht.Z.DOWN)&&jn.preventDefault(),ye&&ye(jn),Nn===ht.Z.ENTER&&Wt==="tags"&&!Re.current&&!Xt&&(De==null||De(jn.target.value)),!(Mn&&!Xt&&~[ht.Z.UP,ht.Z.DOWN,ht.Z.LEFT,ht.Z.RIGHT].indexOf(Nn))&&Vt(Nn)&&Le(!0)},bn=function(){Ie(!0)},Ln=(0,fe.useRef)(null),On=function(jn){Jt(jn,!0,Re.current)!==!1&&Le(!0)},qn=function(){Re.current=!0},Kt=function(jn){Re.current=!1,Wt!=="combobox"&&On(jn.target.value)},Bn=function(jn){var Nn=jn.target.value;if(We&&Ln.current&&/[\r\n]/.test(Ln.current)){var Mn=Ln.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Nn=Nn.replace(Mn,Ln.current)}Ln.current=null,On(Nn)},Wn=function(jn){var Nn=jn.clipboardData,Mn=Nn==null?void 0:Nn.getData("text");Ln.current=Mn||""},Rn=function(jn){var Nn=jn.target;if(Nn!==pt.current){var Mn=document.body.style.msTouchAction!==void 0;Mn?setTimeout(function(){pt.current.focus()}):pt.current.focus()}},Zt=function(jn){var Nn=At();jn.target!==pt.current&&!Nn&&!(Wt==="combobox"&&en)&&jn.preventDefault(),(Wt!=="combobox"&&(!tn||!Nn)||!Xt)&&(Xt&&_n!==!1&&Jt("",!0,!1),Le())},dn={inputRef:pt,onInputKeyDown:un,onInputMouseDown:bn,onInputChange:Bn,onInputPaste:Wn,onInputCompositionStart:qn,onInputCompositionEnd:Kt,onInputBlur:ut},Pn=Wt==="multiple"||Wt==="tags"?fe.createElement(on,(0,te.Z)({},Pe,dn)):fe.createElement(Pt,(0,te.Z)({},Pe,dn));return fe.createElement("div",{ref:Cn,className:"".concat(yt,"-selector"),onClick:Rn,onMouseDown:Zt},St&&fe.createElement("div",{className:"".concat(yt,"-prefix")},St),Pn)},wt=fe.forwardRef(ze),Bt=wt,ae=he(65030),ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Pe){var Lt=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Lt,adjustY:1},htmlRegion:"scroll"}}},oe=function(Pe,Lt){var pt=Pe.prefixCls,Re=Pe.disabled,yt=Pe.visible,Xt=Pe.children,Wt=Pe.popupElement,tn=Pe.animation,We=Pe.transitionName,en=Pe.dropdownStyle,St=Pe.dropdownClassName,_n=Pe.direction,Jt=_n===void 0?"ltr":_n,De=Pe.placement,Le=Pe.builtinPlacements,ye=Pe.dropdownMatchSelectWidth,ut=Pe.dropdownRender,Cn=Pe.dropdownAlign,Hn=Pe.getPopupContainer,rn=Pe.empty,At=Pe.getTriggerDOMNode,Ie=Pe.onPopupVisibleChange,un=Pe.onPopupMouseEnter,bn=(0,me.Z)(Pe,ne),Ln="".concat(pt,"-dropdown"),On=Wt;ut&&(On=ut(Wt));var qn=fe.useMemo(function(){return Le||z(ye)},[Le,ye]),Kt=tn?"".concat(Ln,"-").concat(tn):We,Bn=typeof ye=="number",Wn=fe.useMemo(function(){return Bn?null:ye===!1?"minWidth":"width"},[ye,Bn]),Rn=en;Bn&&(Rn=(0,Xe.Z)((0,Xe.Z)({},Rn),{},{width:ye}));var Zt=fe.useRef(null);return fe.useImperativeHandle(Lt,function(){return{getPopupElement:function(){var Pn;return(Pn=Zt.current)===null||Pn===void 0?void 0:Pn.popupElement}}}),fe.createElement(ae.Z,(0,te.Z)({},bn,{showAction:Ie?["click"]:[],hideAction:Ie?["click"]:[],popupPlacement:De||(Jt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:qn,prefixCls:Ln,popupTransitionName:Kt,popup:fe.createElement("div",{onMouseEnter:un},On),ref:Zt,stretch:Wn,popupAlign:Cn,popupVisible:yt,getPopupContainer:Hn,popupClassName:pe()(St,(0,_e.Z)({},"".concat(Ln,"-empty"),rn)),popupStyle:Rn,getTriggerDOMNode:At,onPopupVisibleChange:Ie}),Xt)},se=fe.forwardRef(oe),ie=se,xe=he(57879);function Ue(Ae,Pe){var Lt=Ae.key,pt;return"value"in Ae&&(pt=Ae.value),Lt!=null?Lt:pt!==void 0?pt:"rc-index-key-".concat(Pe)}function Ot(Ae){return typeof Ae!="undefined"&&!Number.isNaN(Ae)}function Dt(Ae,Pe){var Lt=Ae||{},pt=Lt.label,Re=Lt.value,yt=Lt.options,Xt=Lt.groupLabel,Wt=pt||(Pe?"children":"label");return{label:Wt,value:Re||"value",options:yt||"options",groupLabel:Xt||Wt}}function gt(Ae){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Lt=Pe.fieldNames,pt=Pe.childrenAsData,Re=[],yt=Dt(Lt,!1),Xt=yt.label,Wt=yt.value,tn=yt.options,We=yt.groupLabel;function en(St,_n){Array.isArray(St)&&St.forEach(function(Jt){if(_n||!(tn in Jt)){var De=Jt[Wt];Re.push({key:Ue(Jt,Re.length),groupOption:_n,data:Jt,label:Jt[Xt],value:De})}else{var Le=Jt[We];Le===void 0&&pt&&(Le=Jt.label),Re.push({key:Ue(Jt,Re.length),group:!0,data:Jt,label:Le}),en(Jt[tn],!0)}})}return en(Ae,!1),Re}function kt(Ae){var Pe=(0,Xe.Z)({},Ae);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}var $t=function(Pe,Lt,pt){if(!Lt||!Lt.length)return null;var Re=!1,yt=function Wt(tn,We){var en=(0,xe.Z)(We),St=en[0],_n=en.slice(1);if(!St)return[tn];var Jt=tn.split(St);return Re=Re||Jt.length>1,Jt.reduce(function(De,Le){return[].concat((0,Ke.Z)(De),(0,Ke.Z)(Wt(Le,_n)))},[]).filter(Boolean)},Xt=yt(Pe,Lt);return Re?typeof pt!="undefined"?Xt.slice(0,pt):Xt:null},Gt=fe.createContext(null),nn=Gt;function an(Ae){var Pe=Ae.visible,Lt=Ae.values;if(!Pe)return null;var pt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Lt.slice(0,pt).map(function(Re){var yt=Re.label,Xt=Re.value;return["number","string"].includes((0,Oe.Z)(yt))?yt:Xt}).join(", ")),Lt.length>pt?", ...":null)}var _t=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],En=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ln=function(Pe){return Pe==="tags"||Pe==="multiple"},kn=fe.forwardRef(function(Ae,Pe){var Lt,pt=Ae.id,Re=Ae.prefixCls,yt=Ae.className,Xt=Ae.showSearch,Wt=Ae.tagRender,tn=Ae.direction,We=Ae.omitDomProps,en=Ae.displayValues,St=Ae.onDisplayValuesChange,_n=Ae.emptyOptions,Jt=Ae.notFoundContent,De=Jt===void 0?"Not Found":Jt,Le=Ae.onClear,ye=Ae.mode,ut=Ae.disabled,Cn=Ae.loading,Hn=Ae.getInputElement,rn=Ae.getRawInputElement,At=Ae.open,Ie=Ae.defaultOpen,un=Ae.onDropdownVisibleChange,bn=Ae.activeValue,Ln=Ae.onActiveValueChange,On=Ae.activeDescendantId,qn=Ae.searchValue,Kt=Ae.autoClearSearchValue,Bn=Ae.onSearch,Wn=Ae.onSearchSplit,Rn=Ae.tokenSeparators,Zt=Ae.allowClear,dn=Ae.prefix,Pn=Ae.suffixIcon,Zn=Ae.clearIcon,jn=Ae.OptionList,Nn=Ae.animation,Mn=Ae.transitionName,$n=Ae.dropdownStyle,mn=Ae.dropdownClassName,di=Ae.dropdownMatchSelectWidth,Gn=Ae.dropdownRender,Yt=Ae.dropdownAlign,Xn=Ae.placement,Un=Ae.builtinPlacements,wi=Ae.getPopupContainer,In=Ae.showAction,bt=In===void 0?[]:In,Tt=Ae.onFocus,et=Ae.onBlur,Ze=Ae.onKeyUp,mt=Ae.onKeyDown,Ft=Ae.onMouseDown,gn=(0,me.Z)(Ae,_t),zn=ln(ye),oi=(Xt!==void 0?Xt:zn)||ye==="combobox",mi=(0,Xe.Z)({},gn);En.forEach(function(ki){delete mi[ki]}),We==null||We.forEach(function(ki){delete mi[ki]});var fi=fe.useState(!1),Pi=(0,ve.Z)(fi,2),Ci=Pi[0],Hi=Pi[1];fe.useEffect(function(){Hi((0,He.Z)())},[]);var vr=fe.useRef(null),Ji=fe.useRef(null),ji=fe.useRef(null),tr=fe.useRef(null),Mi=fe.useRef(null),rr=fe.useRef(!1),xr=tt(),Li=(0,ve.Z)(xr,3),dr=Li[0],or=Li[1],Mr=Li[2];fe.useImperativeHandle(Pe,function(){var ki,pi;return{focus:(ki=tr.current)===null||ki===void 0?void 0:ki.focus,blur:(pi=tr.current)===null||pi===void 0?void 0:pi.blur,scrollTo:function(gr){var qi;return(qi=Mi.current)===null||qi===void 0?void 0:qi.scrollTo(gr)},nativeElement:vr.current||Ji.current}});var hr=fe.useMemo(function(){var ki;if(ye!=="combobox")return qn;var pi=(ki=en[0])===null||ki===void 0?void 0:ki.value;return typeof pi=="string"||typeof pi=="number"?String(pi):""},[qn,ye,en]),Fr=ye==="combobox"&&typeof Hn=="function"&&Hn()||null,Ni=typeof rn=="function"&&rn(),wr=(0,Ce.x1)(Ji,Ni==null||(Lt=Ni.props)===null||Lt===void 0?void 0:Lt.ref),Gr=fe.useState(!1),kr=(0,ve.Z)(Gr,2),Po=kr[0],Cr=kr[1];(0,it.Z)(function(){Cr(!0)},[]);var Wi=(0,Ve.Z)(!1,{defaultValue:Ie,value:At}),mr=(0,ve.Z)(Wi,2),Vr=mr[0],_r=mr[1],Vi=Po?Vr:!1,ro=!De&&_n;(ut||ro&&Vi&&ye==="combobox")&&(Vi=!1);var Nr=ro?!1:Vi,Yn=fe.useCallback(function(ki){var pi=ki!==void 0?ki:!Vi;ut||(_r(pi),Vi!==pi&&(un==null||un(pi)))},[ut,Vi,_r,un]),ai=fe.useMemo(function(){return(Rn||[]).some(function(ki){return[`
`,`\r
`].includes(ki)})},[Rn]),ei=fe.useContext(nn)||{},yn=ei.maxCount,si=ei.rawValues,Ti=function(pi,fr,gr){if(!(zn&&Ot(yn)&&(si==null?void 0:si.size)>=yn)){var qi=!0,nr=pi;Ln==null||Ln(null);var Xr=$t(pi,Rn,Ot(yn)?yn-si.size:void 0),Yr=gr?null:Xr;return ye!=="combobox"&&Yr&&(nr="",Wn==null||Wn(Yr),Yn(!1),qi=!1),Bn&&hr!==nr&&Bn(nr,{source:fr?"typing":"effect"}),qi}},Ir=function(pi){!pi||!pi.trim()||Bn(pi,{source:"submit"})};fe.useEffect(function(){!Vi&&!zn&&ye!=="combobox"&&Ti("",!1,!1)},[Vi]),fe.useEffect(function(){Vr&&ut&&_r(!1),ut&&!rr.current&&or(!1)},[ut]);var ar=Te(),Qi=(0,ve.Z)(ar,2),Yi=Qi[0],Ur=Qi[1],eo=fe.useRef(!1),Or=function(pi){var fr=Yi(),gr=pi.key,qi=gr==="Enter";if(qi&&(ye!=="combobox"&&pi.preventDefault(),Vi||Yn(!0)),Ur(!!hr),gr==="Backspace"&&!fr&&zn&&!hr&&en.length){for(var nr=(0,Ke.Z)(en),Xr=null,Yr=nr.length-1;Yr>=0;Yr-=1){var ao=nr[Yr];if(!ao.disabled){nr.splice(Yr,1),Xr=ao;break}}Xr&&St(nr,{type:"remove",values:[Xr]})}for(var Rr=arguments.length,zr=new Array(Rr>1?Rr-1:0),Jr=1;Jr<Rr;Jr++)zr[Jr-1]=arguments[Jr];if(Vi&&(!qi||!eo.current)){var co;qi&&(eo.current=!0),(co=Mi.current)===null||co===void 0||co.onKeyDown.apply(co,[pi].concat(zr))}mt==null||mt.apply(void 0,[pi].concat(zr))},to=function(pi){for(var fr=arguments.length,gr=new Array(fr>1?fr-1:0),qi=1;qi<fr;qi++)gr[qi-1]=arguments[qi];if(Vi){var nr;(nr=Mi.current)===null||nr===void 0||nr.onKeyUp.apply(nr,[pi].concat(gr))}pi.key==="Enter"&&(eo.current=!1),Ze==null||Ze.apply(void 0,[pi].concat(gr))},oo=function(pi){var fr=en.filter(function(gr){return gr!==pi});St(fr,{type:"remove",values:[pi]})},qr=function(){eo.current=!1},Lo=fe.useRef(!1),Ga=function(){or(!0),ut||(Tt&&!Lo.current&&Tt.apply(void 0,arguments),bt.includes("focus")&&Yn(!0)),Lo.current=!0},ya=function(){rr.current=!0,or(!1,function(){Lo.current=!1,rr.current=!1,Yn(!1)}),!ut&&(hr&&(ye==="tags"?Bn(hr,{source:"submit"}):ye==="multiple"&&Bn("",{source:"blur"})),et&&et.apply(void 0,arguments))},no=[];fe.useEffect(function(){return function(){no.forEach(function(ki){return clearTimeout(ki)}),no.splice(0,no.length)}},[]);var uo=function(pi){var fr,gr=pi.target,qi=(fr=ji.current)===null||fr===void 0?void 0:fr.getPopupElement();if(qi&&qi.contains(gr)){var nr=setTimeout(function(){var Rr=no.indexOf(nr);if(Rr!==-1&&no.splice(Rr,1),Mr(),!Ci&&!qi.contains(document.activeElement)){var zr;(zr=tr.current)===null||zr===void 0||zr.focus()}});no.push(nr)}for(var Xr=arguments.length,Yr=new Array(Xr>1?Xr-1:0),ao=1;ao<Xr;ao++)Yr[ao-1]=arguments[ao];Ft==null||Ft.apply(void 0,[pi].concat(Yr))},Kr=fe.useState({}),ba=(0,ve.Z)(Kr,2),xa=ba[1];function Va(){xa({})}var wa;Ni&&(wa=function(pi){Yn(pi)}),dt(function(){var ki;return[vr.current,(ki=ji.current)===null||ki===void 0?void 0:ki.getPopupElement()]},Nr,Yn,!!Ni);var Ua=fe.useMemo(function(){return(0,Xe.Z)((0,Xe.Z)({},Ae),{},{notFoundContent:De,open:Vi,triggerOpen:Nr,id:pt,showSearch:oi,multiple:zn,toggleOpen:Yn})},[Ae,De,Nr,Vi,pt,oi,zn,Yn]),Ko=!!Pn||Cn,Yo;Ko&&(Yo=fe.createElement(Se,{className:pe()("".concat(Re,"-arrow"),(0,_e.Z)({},"".concat(Re,"-arrow-loading"),Cn)),customizeIcon:Pn,customizeIconProps:{loading:Cn,searchValue:hr,open:Vi,focused:dr,showSearch:oi}}));var xo=function(){var pi;Le==null||Le(),(pi=tr.current)===null||pi===void 0||pi.focus(),St([],{type:"clear",values:en}),Ti("",!1,!1)},qo=Je(Re,xo,en,Zt,Zn,ut,hr,ye),Ca=qo.allowClear,Xo=qo.clearIcon,To=fe.createElement(jn,{ref:Mi}),Sa=pe()(Re,yt,(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(Re,"-focused"),dr),"".concat(Re,"-multiple"),zn),"".concat(Re,"-single"),!zn),"".concat(Re,"-allow-clear"),Zt),"".concat(Re,"-show-arrow"),Ko),"".concat(Re,"-disabled"),ut),"".concat(Re,"-loading"),Cn),"".concat(Re,"-open"),Vi),"".concat(Re,"-customize-input"),Fr),"".concat(Re,"-show-search"),oi)),Mo=fe.createElement(ie,{ref:ji,disabled:ut,prefixCls:Re,visible:Nr,popupElement:To,animation:Nn,transitionName:Mn,dropdownStyle:$n,dropdownClassName:mn,direction:tn,dropdownMatchSelectWidth:di,dropdownRender:Gn,dropdownAlign:Yt,placement:Xn,builtinPlacements:Un,getPopupContainer:wi,empty:_n,getTriggerDOMNode:function(pi){return Ji.current||pi},onPopupVisibleChange:wa,onPopupMouseEnter:Va},Ni?fe.cloneElement(Ni,{ref:wr}):fe.createElement(Bt,(0,te.Z)({},Ae,{domRef:Ji,prefixCls:Re,inputElement:Fr,ref:tr,id:pt,prefix:dn,showSearch:oi,autoClearSearchValue:Kt,mode:ye,activeDescendantId:On,tagRender:Wt,values:en,open:Vi,onToggleOpen:Yn,activeValue:bn,searchValue:hr,onSearch:Ti,onSearchSubmit:Ir,onRemove:oo,tokenWithEnter:ai,onInputBlur:qr}))),Ar;return Ni?Ar=Mo:Ar=fe.createElement("div",(0,te.Z)({className:Sa},mi,{ref:vr,onMouseDown:uo,onKeyDown:Or,onKeyUp:to,onFocus:Ga,onBlur:ya}),fe.createElement(an,{visible:dr&&!Vi,values:en}),Mo,Yo,Ca&&Xo),fe.createElement(lt.Provider,{value:Ua},Ar)}),st=kn,An=function(){return null};An.isSelectOptGroup=!0;var Rt=An,sn=function(){return null};sn.isSelectOption=!0;var wn=sn,Jn=he(80547),jt=he(2738),Fn=he(6790);function xi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var hi=["disabled","title","children","style","className"];function _i(Ae){return typeof Ae=="string"||typeof Ae=="number"}var Ri=function(Pe,Lt){var pt=$e(),Re=pt.prefixCls,yt=pt.id,Xt=pt.open,Wt=pt.multiple,tn=pt.mode,We=pt.searchValue,en=pt.toggleOpen,St=pt.notFoundContent,_n=pt.onPopupScroll,Jt=fe.useContext(nn),De=Jt.maxCount,Le=Jt.flattenOptions,ye=Jt.onActiveValue,ut=Jt.defaultActiveFirstOption,Cn=Jt.onSelect,Hn=Jt.menuItemSelectedIcon,rn=Jt.rawValues,At=Jt.fieldNames,Ie=Jt.virtual,un=Jt.direction,bn=Jt.listHeight,Ln=Jt.listItemHeight,On=Jt.optionRender,qn="".concat(Re,"-item"),Kt=(0,Jn.Z)(function(){return Le},[Xt,Le],function(In,bt){return bt[0]&&In[1]!==bt[1]}),Bn=fe.useRef(null),Wn=fe.useMemo(function(){return Wt&&Ot(De)&&(rn==null?void 0:rn.size)>=De},[Wt,De,rn==null?void 0:rn.size]),Rn=function(bt){bt.preventDefault()},Zt=function(bt){var Tt;(Tt=Bn.current)===null||Tt===void 0||Tt.scrollTo(typeof bt=="number"?{index:bt}:bt)},dn=fe.useCallback(function(In){return tn==="combobox"?!1:rn.has(In)},[tn,(0,Ke.Z)(rn).toString(),rn.size]),Pn=function(bt){for(var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,et=Kt.length,Ze=0;Ze<et;Ze+=1){var mt=(bt+Ze*Tt+et)%et,Ft=Kt[mt]||{},gn=Ft.group,zn=Ft.data;if(!gn&&!(zn!=null&&zn.disabled)&&(dn(zn.value)||!Wn))return mt}return-1},Zn=fe.useState(function(){return Pn(0)}),jn=(0,ve.Z)(Zn,2),Nn=jn[0],Mn=jn[1],$n=function(bt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Mn(bt);var et={source:Tt?"keyboard":"mouse"},Ze=Kt[bt];if(!Ze){ye(null,-1,et);return}ye(Ze.value,bt,et)};(0,fe.useEffect)(function(){$n(ut!==!1?Pn(0):-1)},[Kt.length,We]);var mn=fe.useCallback(function(In){return tn==="combobox"?String(In).toLowerCase()===We.toLowerCase():rn.has(In)},[tn,We,(0,Ke.Z)(rn).toString(),rn.size]);(0,fe.useEffect)(function(){var In=setTimeout(function(){if(!Wt&&Xt&&rn.size===1){var Tt=Array.from(rn)[0],et=Kt.findIndex(function(Ze){var mt=Ze.data;return We?String(mt.value).startsWith(We):mt.value===Tt});et!==-1&&($n(et),Zt(et))}});if(Xt){var bt;(bt=Bn.current)===null||bt===void 0||bt.scrollTo(void 0)}return function(){return clearTimeout(In)}},[Xt,We]);var di=function(bt){bt!==void 0&&Cn(bt,{selected:!rn.has(bt)}),Wt||en(!1)};if(fe.useImperativeHandle(Lt,function(){return{onKeyDown:function(bt){var Tt=bt.which,et=bt.ctrlKey;switch(Tt){case ht.Z.N:case ht.Z.P:case ht.Z.UP:case ht.Z.DOWN:{var Ze=0;if(Tt===ht.Z.UP?Ze=-1:Tt===ht.Z.DOWN?Ze=1:xi()&&et&&(Tt===ht.Z.N?Ze=1:Tt===ht.Z.P&&(Ze=-1)),Ze!==0){var mt=Pn(Nn+Ze,Ze);Zt(mt),$n(mt,!0)}break}case ht.Z.TAB:case ht.Z.ENTER:{var Ft,gn=Kt[Nn];gn&&!(gn!=null&&(Ft=gn.data)!==null&&Ft!==void 0&&Ft.disabled)&&!Wn?di(gn.value):di(void 0),Xt&&bt.preventDefault();break}case ht.Z.ESC:en(!1),Xt&&bt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(bt){Zt(bt)}}}),Kt.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(yt,"_list"),className:"".concat(qn,"-empty"),onMouseDown:Rn},St);var Gn=Object.keys(At).map(function(In){return At[In]}),Yt=function(bt){return bt.label};function Xn(In,bt){var Tt=In.group;return{role:Tt?"presentation":"option",id:"".concat(yt,"_list_").concat(bt)}}var Un=function(bt){var Tt=Kt[bt];if(!Tt)return null;var et=Tt.data||{},Ze=et.value,mt=Tt.group,Ft=(0,Be.Z)(et,!0),gn=Yt(Tt);return Tt?fe.createElement("div",(0,te.Z)({"aria-label":typeof gn=="string"&&!mt?gn:null},Ft,{key:bt},Xn(Tt,bt),{"aria-selected":mn(Ze)}),Ze):null},wi={role:"listbox",id:"".concat(yt,"_list")};return fe.createElement(fe.Fragment,null,Ie&&fe.createElement("div",(0,te.Z)({},wi,{style:{height:0,width:0,overflow:"hidden"}}),Un(Nn-1),Un(Nn),Un(Nn+1)),fe.createElement(Fn.Z,{itemKey:"key",ref:Bn,data:Kt,height:bn,itemHeight:Ln,fullHeight:!1,onMouseDown:Rn,onScroll:_n,virtual:Ie,direction:un,innerProps:Ie?null:wi},function(In,bt){var Tt=In.group,et=In.groupOption,Ze=In.data,mt=In.label,Ft=In.value,gn=Ze.key;if(Tt){var zn,oi=(zn=Ze.title)!==null&&zn!==void 0?zn:_i(mt)?mt.toString():void 0;return fe.createElement("div",{className:pe()(qn,"".concat(qn,"-group"),Ze.className),title:oi},mt!==void 0?mt:gn)}var mi=Ze.disabled,fi=Ze.title,Pi=Ze.children,Ci=Ze.style,Hi=Ze.className,vr=(0,me.Z)(Ze,hi),Ji=(0,jt.Z)(vr,Gn),ji=dn(Ft),tr=mi||!ji&&Wn,Mi="".concat(qn,"-option"),rr=pe()(qn,Mi,Hi,(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(Mi,"-grouped"),et),"".concat(Mi,"-active"),Nn===bt&&!tr),"".concat(Mi,"-disabled"),tr),"".concat(Mi,"-selected"),ji)),xr=Yt(In),Li=!Hn||typeof Hn=="function"||ji,dr=typeof xr=="number"?xr:xr||Ft,or=_i(dr)?dr.toString():void 0;return fi!==void 0&&(or=fi),fe.createElement("div",(0,te.Z)({},(0,Be.Z)(Ji),Ie?{}:Xn(In,bt),{"aria-selected":mn(Ft),className:rr,title:or,onMouseMove:function(){Nn===bt||tr||$n(bt)},onClick:function(){tr||di(Ft)},style:Ci}),fe.createElement("div",{className:"".concat(Mi,"-content")},typeof On=="function"?On(In,{index:bt}):dr),fe.isValidElement(Hn)||ji,Li&&fe.createElement(Se,{className:"".concat(qn,"-option-state"),customizeIcon:Hn,customizeIconProps:{value:Ft,disabled:tr,isSelected:ji}},ji?"\u2713":null))}))},Ai=fe.forwardRef(Ri),Bi=Ai,li=function(Ae,Pe){var Lt=fe.useRef({values:new Map,options:new Map}),pt=fe.useMemo(function(){var yt=Lt.current,Xt=yt.values,Wt=yt.options,tn=Ae.map(function(St){if(St.label===void 0){var _n;return(0,Xe.Z)((0,Xe.Z)({},St),{},{label:(_n=Xt.get(St.value))===null||_n===void 0?void 0:_n.label})}return St}),We=new Map,en=new Map;return tn.forEach(function(St){We.set(St.value,St),en.set(St.value,Pe.get(St.value)||Wt.get(St.value))}),Lt.current.values=We,Lt.current.options=en,tn},[Ae,Pe]),Re=fe.useCallback(function(yt){return Pe.get(yt)||Lt.current.options.get(yt)},[Pe]);return[pt,Re]};function bi(Ae,Pe){return Et(Ae).join("").toUpperCase().includes(Pe)}var Si=function(Ae,Pe,Lt,pt,Re){return fe.useMemo(function(){if(!Lt||pt===!1)return Ae;var yt=Pe.options,Xt=Pe.label,Wt=Pe.value,tn=[],We=typeof pt=="function",en=Lt.toUpperCase(),St=We?pt:function(Jt,De){return Re?bi(De[Re],en):De[yt]?bi(De[Xt!=="children"?Xt:"label"],en):bi(De[Wt],en)},_n=We?function(Jt){return kt(Jt)}:function(Jt){return Jt};return Ae.forEach(function(Jt){if(Jt[yt]){var De=St(Lt,_n(Jt));if(De)tn.push(Jt);else{var Le=Jt[yt].filter(function(ye){return St(Lt,_n(ye))});Le.length&&tn.push((0,Xe.Z)((0,Xe.Z)({},Jt),{},(0,_e.Z)({},yt,Le)))}return}St(Lt,_n(Jt))&&tn.push(Jt)}),tn},[Ae,pt,Re,Lt,Pe])},ni=he(6551),yi=he(11592),cn=["children","value"],xn=["children"];function Sn(Ae){var Pe=Ae,Lt=Pe.key,pt=Pe.props,Re=pt.children,yt=pt.value,Xt=(0,me.Z)(pt,cn);return(0,Xe.Z)({key:Lt,value:yt!==void 0?yt:Lt,children:Re},Xt)}function ti(Ae){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,yi.Z)(Ae).map(function(Lt,pt){if(!fe.isValidElement(Lt)||!Lt.type)return null;var Re=Lt,yt=Re.type.isSelectOptGroup,Xt=Re.key,Wt=Re.props,tn=Wt.children,We=(0,me.Z)(Wt,xn);return Pe||!yt?Sn(Lt):(0,Xe.Z)((0,Xe.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?pt:Xt,"__"),label:Xt},We),{},{options:ti(tn)})}).filter(function(Lt){return Lt})}var zi=function(Pe,Lt,pt,Re,yt){return fe.useMemo(function(){var Xt=Pe,Wt=!Pe;Wt&&(Xt=ti(Lt));var tn=new Map,We=new Map,en=function(Jt,De,Le){Le&&typeof Le=="string"&&Jt.set(De[Le],De)},St=function _n(Jt){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=0;Le<Jt.length;Le+=1){var ye=Jt[Le];!ye[pt.options]||De?(tn.set(ye[pt.value],ye),en(We,ye,pt.label),en(We,ye,Re),en(We,ye,yt)):_n(ye[pt.options],!0)}};return St(Xt),{options:Xt,valueOptions:tn,labelOptions:We}},[Pe,Lt,pt,Re,yt])},Vn=zi;function vi(Ae){var Pe=fe.useRef();Pe.current=Ae;var Lt=fe.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return Lt}function Di(Ae){var Pe=Ae.mode,Lt=Ae.options,pt=Ae.children,Re=Ae.backfill,yt=Ae.allowClear,Xt=Ae.placeholder,Wt=Ae.getInputElement,tn=Ae.showSearch,We=Ae.onSearch,en=Ae.defaultOpen,St=Ae.autoFocus,_n=Ae.labelInValue,Jt=Ae.value,De=Ae.inputValue,Le=Ae.optionLabelProp,ye=isMultiple(Pe),ut=tn!==void 0?tn:ye||Pe==="combobox",Cn=Lt||convertChildrenToData(pt);if(warning(Pe!=="tags"||Cn.every(function(Ie){return!Ie.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var Hn=Cn.some(function(Ie){return Ie.options?Ie.options.some(function(un){return typeof("value"in un?un.value:un.key)=="number"}):typeof("value"in Ie?Ie.value:Ie.key)=="number"});warning(!Hn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!Le,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!Re,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!Wt,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!Wt||!yt||!Xt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),We&&!ut&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!en||St,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Jt!=null){var rn=toArray(Jt);warning(!_n||rn.every(function(Ie){return _typeof(Ie)==="object"&&("key"in Ie||"value"in Ie)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ye||Array.isArray(Jt),"`value` should be array when `mode` is `multiple` or `tags`")}if(pt){var At=null;toNodeArray(pt).some(function(Ie){if(!React.isValidElement(Ie)||!Ie.type)return!1;var un=Ie,bn=un.type;if(bn.isSelectOption)return!1;if(bn.isSelectOptGroup){var Ln=toNodeArray(Ie.props.children).every(function(On){return!React.isValidElement(On)||!Ie.type||On.type.isSelectOption?!0:(At=On.type,!1)});return!Ln}return At=bn,!0}),At&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(At.displayName||At.name||At,"`.")),warning(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ei(Ae,Pe){if(Ae){var Lt=function pt(Re){for(var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xt=0;Xt<Re.length;Xt++){var Wt=Re[Xt];if(Wt[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!yt&&Array.isArray(Wt[Pe==null?void 0:Pe.options])&&pt(Wt[Pe==null?void 0:Pe.options],!0))break}};Lt(Ae)}}var ii=null,ui=["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"],Fi=["inputValue"];function zt(Ae){return!Ae||(0,Oe.Z)(Ae)!=="object"}var at=fe.forwardRef(function(Ae,Pe){var Lt=Ae.id,pt=Ae.mode,Re=Ae.prefixCls,yt=Re===void 0?"rc-select":Re,Xt=Ae.backfill,Wt=Ae.fieldNames,tn=Ae.inputValue,We=Ae.searchValue,en=Ae.onSearch,St=Ae.autoClearSearchValue,_n=St===void 0?!0:St,Jt=Ae.onSelect,De=Ae.onDeselect,Le=Ae.dropdownMatchSelectWidth,ye=Le===void 0?!0:Le,ut=Ae.filterOption,Cn=Ae.filterSort,Hn=Ae.optionFilterProp,rn=Ae.optionLabelProp,At=Ae.options,Ie=Ae.optionRender,un=Ae.children,bn=Ae.defaultActiveFirstOption,Ln=Ae.menuItemSelectedIcon,On=Ae.virtual,qn=Ae.direction,Kt=Ae.listHeight,Bn=Kt===void 0?200:Kt,Wn=Ae.listItemHeight,Rn=Wn===void 0?20:Wn,Zt=Ae.labelRender,dn=Ae.value,Pn=Ae.defaultValue,Zn=Ae.labelInValue,jn=Ae.onChange,Nn=Ae.maxCount,Mn=(0,me.Z)(Ae,ui),$n=(0,ni.ZP)(Lt),mn=ln(pt),di=!!(!At&&un),Gn=fe.useMemo(function(){return ut===void 0&&pt==="combobox"?!1:ut},[ut,pt]),Yt=fe.useMemo(function(){return Dt(Wt,di)},[JSON.stringify(Wt),di]),Xn=(0,Ve.Z)("",{value:We!==void 0?We:tn,postState:function(ai){return ai||""}}),Un=(0,ve.Z)(Xn,2),wi=Un[0],In=Un[1],bt=Vn(At,un,Yt,Hn,rn),Tt=bt.valueOptions,et=bt.labelOptions,Ze=bt.options,mt=fe.useCallback(function(Yn){var ai=Et(Yn);return ai.map(function(ei){var yn,si,Ti,Ir,ar;if(zt(ei))yn=ei;else{var Qi;Ti=ei.key,si=ei.label,yn=(Qi=ei.value)!==null&&Qi!==void 0?Qi:Ti}var Yi=Tt.get(yn);if(Yi){var Ur;if(si===void 0&&(si=Yi==null?void 0:Yi[rn||Yt.label]),Ti===void 0&&(Ti=(Ur=Yi==null?void 0:Yi.key)!==null&&Ur!==void 0?Ur:yn),Ir=Yi==null?void 0:Yi.disabled,ar=Yi==null?void 0:Yi.title,0)var eo}return{label:si,value:yn,key:Ti,disabled:Ir,title:ar}})},[Yt,rn,Tt]),Ft=(0,Ve.Z)(Pn,{value:dn}),gn=(0,ve.Z)(Ft,2),zn=gn[0],oi=gn[1],mi=fe.useMemo(function(){var Yn,ai=mn&&zn===null?[]:zn,ei=mt(ai);return pt==="combobox"&&de((Yn=ei[0])===null||Yn===void 0?void 0:Yn.value)?[]:ei},[zn,mt,pt,mn]),fi=li(mi,Tt),Pi=(0,ve.Z)(fi,2),Ci=Pi[0],Hi=Pi[1],vr=fe.useMemo(function(){if(!pt&&Ci.length===1){var Yn=Ci[0];if(Yn.value===null&&(Yn.label===null||Yn.label===void 0))return[]}return Ci.map(function(ai){var ei;return(0,Xe.Z)((0,Xe.Z)({},ai),{},{label:(ei=typeof Zt=="function"?Zt(ai):ai.label)!==null&&ei!==void 0?ei:ai.value})})},[pt,Ci,Zt]),Ji=fe.useMemo(function(){return new Set(Ci.map(function(Yn){return Yn.value}))},[Ci]);fe.useEffect(function(){if(pt==="combobox"){var Yn,ai=(Yn=Ci[0])===null||Yn===void 0?void 0:Yn.value;In(ge(ai)?String(ai):"")}},[Ci]);var ji=vi(function(Yn,ai){var ei=ai!=null?ai:Yn;return(0,_e.Z)((0,_e.Z)({},Yt.value,Yn),Yt.label,ei)}),tr=fe.useMemo(function(){if(pt!=="tags")return Ze;var Yn=(0,Ke.Z)(Ze),ai=function(yn){return Tt.has(yn)};return(0,Ke.Z)(Ci).sort(function(ei,yn){return ei.value<yn.value?-1:1}).forEach(function(ei){var yn=ei.value;ai(yn)||Yn.push(ji(yn,ei.label))}),Yn},[ji,Ze,Tt,Ci,pt]),Mi=Si(tr,Yt,wi,Gn,Hn),rr=fe.useMemo(function(){return pt!=="tags"||!wi||Mi.some(function(Yn){return Yn[Hn||"value"]===wi})||Mi.some(function(Yn){return Yn[Yt.value]===wi})?Mi:[ji(wi)].concat((0,Ke.Z)(Mi))},[ji,Hn,pt,Mi,wi,Yt]),xr=function Yn(ai){var ei=(0,Ke.Z)(ai).sort(function(yn,si){return Cn(yn,si,{searchValue:wi})});return ei.map(function(yn){return Array.isArray(yn.options)?(0,Xe.Z)((0,Xe.Z)({},yn),{},{options:yn.options.length>0?Yn(yn.options):yn.options}):yn})},Li=fe.useMemo(function(){return Cn?xr(rr):rr},[rr,Cn,wi]),dr=fe.useMemo(function(){return gt(Li,{fieldNames:Yt,childrenAsData:di})},[Li,Yt,di]),or=function(ai){var ei=mt(ai);if(oi(ei),jn&&(ei.length!==Ci.length||ei.some(function(Ti,Ir){var ar;return((ar=Ci[Ir])===null||ar===void 0?void 0:ar.value)!==(Ti==null?void 0:Ti.value)}))){var yn=Zn?ei:ei.map(function(Ti){return Ti.value}),si=ei.map(function(Ti){return kt(Hi(Ti.value))});jn(mn?yn:yn[0],mn?si:si[0])}},Mr=fe.useState(null),hr=(0,ve.Z)(Mr,2),Fr=hr[0],Ni=hr[1],wr=fe.useState(0),Gr=(0,ve.Z)(wr,2),kr=Gr[0],Po=Gr[1],Cr=bn!==void 0?bn:pt!=="combobox",Wi=fe.useCallback(function(Yn,ai){var ei=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},yn=ei.source,si=yn===void 0?"keyboard":yn;Po(ai),Xt&&pt==="combobox"&&Yn!==null&&si==="keyboard"&&Ni(String(Yn))},[Xt,pt]),mr=function(ai,ei,yn){var si=function(){var oo,qr=Hi(ai);return[Zn?{label:qr==null?void 0:qr[Yt.label],value:ai,key:(oo=qr==null?void 0:qr.key)!==null&&oo!==void 0?oo:ai}:ai,kt(qr)]};if(ei&&Jt){var Ti=si(),Ir=(0,ve.Z)(Ti,2),ar=Ir[0],Qi=Ir[1];Jt(ar,Qi)}else if(!ei&&De&&yn!=="clear"){var Yi=si(),Ur=(0,ve.Z)(Yi,2),eo=Ur[0],Or=Ur[1];De(eo,Or)}},Vr=vi(function(Yn,ai){var ei,yn=mn?ai.selected:!0;yn?ei=mn?[].concat((0,Ke.Z)(Ci),[Yn]):[Yn]:ei=Ci.filter(function(si){return si.value!==Yn}),or(ei),mr(Yn,yn),pt==="combobox"?Ni(""):(!ln||_n)&&(In(""),Ni(""))}),_r=function(ai,ei){or(ai);var yn=ei.type,si=ei.values;(yn==="remove"||yn==="clear")&&si.forEach(function(Ti){mr(Ti.value,!1,yn)})},Vi=function(ai,ei){if(In(ai),Ni(null),ei.source==="submit"){var yn=(ai||"").trim();if(yn){var si=Array.from(new Set([].concat((0,Ke.Z)(Ji),[yn])));or(si),mr(yn,!0),In("")}return}ei.source!=="blur"&&(pt==="combobox"&&or(ai),en==null||en(ai))},ro=function(ai){var ei=ai;pt!=="tags"&&(ei=ai.map(function(si){var Ti=et.get(si);return Ti==null?void 0:Ti.value}).filter(function(si){return si!==void 0}));var yn=Array.from(new Set([].concat((0,Ke.Z)(Ji),(0,Ke.Z)(ei))));or(yn),yn.forEach(function(si){mr(si,!0)})},Nr=fe.useMemo(function(){var Yn=On!==!1&&ye!==!1;return(0,Xe.Z)((0,Xe.Z)({},bt),{},{flattenOptions:dr,onActiveValue:Wi,defaultActiveFirstOption:Cr,onSelect:Vr,menuItemSelectedIcon:Ln,rawValues:Ji,fieldNames:Yt,virtual:Yn,direction:qn,listHeight:Bn,listItemHeight:Rn,childrenAsData:di,maxCount:Nn,optionRender:Ie})},[Nn,bt,dr,Wi,Cr,Vr,Ln,Ji,Yt,On,ye,qn,Bn,Rn,di,Ie]);return fe.createElement(nn.Provider,{value:Nr},fe.createElement(st,(0,te.Z)({},Mn,{id:$n,prefixCls:yt,ref:Pe,omitDomProps:Fi,mode:pt,displayValues:vr,onDisplayValuesChange:_r,direction:qn,searchValue:wi,onSearch:Vi,autoClearSearchValue:_n,onSearchSplit:ro,dropdownMatchSelectWidth:ye,OptionList:Bi,emptyOptions:!dr.length,activeValue:Fr,activeDescendantId:"".concat($n,"_list_").concat(kr)})))}),vn=at;vn.Option=wn,vn.OptGroup=Rt;var ri=vn,ci=ri},63158:function(It,Ht,he){"use strict";var te=he(67711),Ke=he(52873),_e=he(16886),Xe=he(33346),ve=he(59301),me=he(92310),Oe=he.n(me),Ve=he(18929),we=he(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ye=ve.forwardRef(function(pe,it){var He,Ce=pe.prefixCls,Ee=Ce===void 0?"rc-switch":Ce,Se=pe.className,Je=pe.checked,lt=pe.defaultChecked,$e=pe.disabled,tt=pe.loadingIcon,Te=pe.checkedChildren,dt=pe.unCheckedChildren,ht=pe.onClick,Vt=pe.onChange,Be=pe.onKeyDown,Ge=(0,Xe.Z)(pe,fe),nt=(0,Ve.Z)(!1,{value:Je,defaultValue:lt}),Me=(0,_e.Z)(nt,2),Qe=Me[0],Fe=Me[1];function ot(Mt,ge){var de=Qe;return $e||(de=Mt,Fe(de),Vt==null||Vt(de,ge)),de}function Ut(Mt){Mt.which===we.Z.LEFT?ot(!1,Mt):Mt.which===we.Z.RIGHT&&ot(!0,Mt),Be==null||Be(Mt)}function Et(Mt){var ge=ot(!Qe,Mt);ht==null||ht(ge,Mt)}var hn=Oe()(Ee,Se,(He={},(0,Ke.Z)(He,"".concat(Ee,"-checked"),Qe),(0,Ke.Z)(He,"".concat(Ee,"-disabled"),$e),He));return ve.createElement("button",(0,te.Z)({},Ge,{type:"button",role:"switch","aria-checked":Qe,disabled:$e,className:hn,ref:it,onKeyDown:Ut,onClick:Et}),tt,ve.createElement("span",{className:"".concat(Ee,"-inner")},ve.createElement("span",{className:"".concat(Ee,"-inner-checked")},Te),ve.createElement("span",{className:"".concat(Ee,"-inner-unchecked")},dt)))});Ye.displayName="Switch",Ht.Z=Ye},22711:function(It,Ht,he){"use strict";he.r(Ht),he.d(Ht,{ResizableTextArea:function(){return Me},default:function(){return Ut}});var te=he(67711),Ke=he(52873),_e=he(98506),Xe=he(15142),ve=he(16886),me=he(33346),Oe=he(92310),Ve=he.n(Oe),we=he(36901),fe=he(66003),Ye=he(30292),pe=he(18929),it=he(59301),He=he(26420),Ce=he(29301),Ee=he(34280),Se=he(16089),Je=`
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;
`,lt=["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={},tt;function Te(Et){var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Mt=Et.getAttribute("id")||Et.getAttribute("data-reactid")||Et.getAttribute("name");if(hn&&$e[Mt])return $e[Mt];var ge=window.getComputedStyle(Et),de=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),ft=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),qt=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),xt=lt.map(function(rt){return"".concat(rt,":").concat(ge.getPropertyValue(rt))}).join(";"),Ne={sizingStyle:xt,paddingSize:ft,borderSize:qt,boxSizing:de};return hn&&Mt&&($e[Mt]=Ne),Ne}function dt(Et){var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;tt||(tt=document.createElement("textarea"),tt.setAttribute("tab-index","-1"),tt.setAttribute("aria-hidden","true"),tt.setAttribute("name","hiddenTextarea"),document.body.appendChild(tt)),Et.getAttribute("wrap")?tt.setAttribute("wrap",Et.getAttribute("wrap")):tt.removeAttribute("wrap");var de=Te(Et,hn),ft=de.paddingSize,qt=de.borderSize,xt=de.boxSizing,Ne=de.sizingStyle;tt.setAttribute("style","".concat(Ne,";").concat(Je)),tt.value=Et.value||Et.placeholder||"";var rt=void 0,ct=void 0,on,vt=tt.scrollHeight;if(xt==="border-box"?vt+=qt:xt==="content-box"&&(vt-=ft),Mt!==null||ge!==null){tt.value=" ";var Pt=tt.scrollHeight-ft;Mt!==null&&(rt=Pt*Mt,xt==="border-box"&&(rt=rt+ft+qt),vt=Math.max(rt,vt)),ge!==null&&(ct=Pt*ge,xt==="border-box"&&(ct=ct+ft+qt),on=vt>ct?"":"hidden",vt=Math.min(ct,vt))}var ze={height:vt,overflowY:on,resize:"none"};return rt&&(ze.minHeight=rt),ct&&(ze.maxHeight=ct),ze}var ht=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Vt=0,Be=1,Ge=2,nt=it.forwardRef(function(Et,hn){var Mt=Et,ge=Mt.prefixCls,de=Mt.defaultValue,ft=Mt.value,qt=Mt.autoSize,xt=Mt.onResize,Ne=Mt.className,rt=Mt.style,ct=Mt.disabled,on=Mt.onChange,vt=Mt.onInternalAutoSize,Pt=(0,me.Z)(Mt,ht),ze=(0,pe.Z)(de,{value:ft,postState:function(wn){return wn!=null?wn:""}}),wt=(0,ve.Z)(ze,2),Bt=wt[0],ae=wt[1],ne=function(wn){ae(wn.target.value),on==null||on(wn)},z=it.useRef();it.useImperativeHandle(hn,function(){return{textArea:z.current}});var oe=it.useMemo(function(){return qt&&(0,He.Z)(qt)==="object"?[qt.minRows,qt.maxRows]:[]},[qt]),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ue=!!qt,Ot=function(){try{if(document.activeElement===z.current){var wn=z.current,Jn=wn.selectionStart,jt=wn.selectionEnd,Fn=wn.scrollTop;z.current.setSelectionRange(Jn,jt),z.current.scrollTop=Fn}}catch(xi){}},Dt=it.useState(Ge),gt=(0,ve.Z)(Dt,2),kt=gt[0],$t=gt[1],Gt=it.useState(),nn=(0,ve.Z)(Gt,2),an=nn[0],_t=nn[1],En=function(){$t(Vt)};(0,Ee.Z)(function(){Ue&&En()},[ft,ie,xe,Ue]),(0,Ee.Z)(function(){if(kt===Vt)$t(Be);else if(kt===Be){var sn=dt(z.current,!1,ie,xe);$t(Ge),_t(sn)}else Ot()},[kt]);var ln=it.useRef(),kn=function(){Se.Z.cancel(ln.current)},st=function(wn){kt===Ge&&(xt==null||xt(wn),qt&&(kn(),ln.current=(0,Se.Z)(function(){En()})))};it.useEffect(function(){return kn},[]);var An=Ue?an:null,Rt=(0,_e.Z)((0,_e.Z)({},rt),An);return(kt===Vt||kt===Be)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),it.createElement(Ce.Z,{onResize:st,disabled:!(qt||xt)},it.createElement("textarea",(0,te.Z)({},Pt,{ref:z,style:Rt,className:Ve()(ge,Ne,(0,Ke.Z)({},"".concat(ge,"-disabled"),ct)),disabled:ct,value:Bt,onChange:ne})))}),Me=nt,Qe=["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"],Fe=it.forwardRef(function(Et,hn){var Mt,ge=Et.defaultValue,de=Et.value,ft=Et.onFocus,qt=Et.onBlur,xt=Et.onChange,Ne=Et.allowClear,rt=Et.maxLength,ct=Et.onCompositionStart,on=Et.onCompositionEnd,vt=Et.suffix,Pt=Et.prefixCls,ze=Pt===void 0?"rc-textarea":Pt,wt=Et.showCount,Bt=Et.count,ae=Et.className,ne=Et.style,z=Et.disabled,oe=Et.hidden,se=Et.classNames,ie=Et.styles,xe=Et.onResize,Ue=Et.onClear,Ot=Et.onPressEnter,Dt=Et.readOnly,gt=Et.autoSize,kt=Et.onKeyDown,$t=(0,me.Z)(Et,Qe),Gt=(0,pe.Z)(ge,{value:de,defaultValue:ge}),nn=(0,ve.Z)(Gt,2),an=nn[0],_t=nn[1],En=an==null?"":String(an),ln=it.useState(!1),kn=(0,ve.Z)(ln,2),st=kn[0],An=kn[1],Rt=it.useRef(!1),sn=it.useState(null),wn=(0,ve.Z)(sn,2),Jn=wn[0],jt=wn[1],Fn=(0,it.useRef)(null),xi=(0,it.useRef)(null),hi=function(){var vn;return(vn=xi.current)===null||vn===void 0?void 0:vn.textArea},_i=function(){hi().focus()};(0,it.useImperativeHandle)(hn,function(){var at;return{resizableTextArea:xi.current,focus:_i,blur:function(){hi().blur()},nativeElement:((at=Fn.current)===null||at===void 0?void 0:at.nativeElement)||hi()}}),(0,it.useEffect)(function(){An(function(at){return!z&&at})},[z]);var Ri=it.useState(null),Ai=(0,ve.Z)(Ri,2),Bi=Ai[0],li=Ai[1];it.useEffect(function(){if(Bi){var at;(at=hi()).setSelectionRange.apply(at,(0,Xe.Z)(Bi))}},[Bi]);var bi=(0,fe.Z)(Bt,wt),Si=(Mt=bi.max)!==null&&Mt!==void 0?Mt:rt,ni=Number(Si)>0,yi=bi.strategy(En),cn=!!Si&&yi>Si,xn=function(vn,ri){var ci=ri;!Rt.current&&bi.exceedFormatter&&bi.max&&bi.strategy(ri)>bi.max&&(ci=bi.exceedFormatter(ri,{max:bi.max}),ri!==ci&&li([hi().selectionStart||0,hi().selectionEnd||0])),_t(ci),(0,Ye.rJ)(vn.currentTarget,vn,xt,ci)},Sn=function(vn){Rt.current=!0,ct==null||ct(vn)},ti=function(vn){Rt.current=!1,xn(vn,vn.currentTarget.value),on==null||on(vn)},zi=function(vn){xn(vn,vn.target.value)},Vn=function(vn){vn.key==="Enter"&&Ot&&Ot(vn),kt==null||kt(vn)},vi=function(vn){An(!0),ft==null||ft(vn)},Di=function(vn){An(!1),qt==null||qt(vn)},Ei=function(vn){_t(""),_i(),(0,Ye.rJ)(hi(),vn,xt)},ii=vt,ui;bi.show&&(bi.showFormatter?ui=bi.showFormatter({value:En,count:yi,maxLength:Si}):ui="".concat(yi).concat(ni?" / ".concat(Si):""),ii=it.createElement(it.Fragment,null,ii,it.createElement("span",{className:Ve()("".concat(ze,"-data-count"),se==null?void 0:se.count),style:ie==null?void 0:ie.count},ui)));var Fi=function(vn){var ri;xe==null||xe(vn),(ri=hi())!==null&&ri!==void 0&&ri.style.height&&jt(!0)},zt=!gt&&!wt&&!Ne;return it.createElement(we.BaseInput,{ref:Fn,value:En,allowClear:Ne,handleReset:Ei,suffix:ii,prefixCls:ze,classNames:(0,_e.Z)((0,_e.Z)({},se),{},{affixWrapper:Ve()(se==null?void 0:se.affixWrapper,(0,Ke.Z)((0,Ke.Z)({},"".concat(ze,"-show-count"),wt),"".concat(ze,"-textarea-allow-clear"),Ne))}),disabled:z,focused:st,className:Ve()(ae,cn&&"".concat(ze,"-out-of-range")),style:(0,_e.Z)((0,_e.Z)({},ne),Jn&&!zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ui=="string"?ui:void 0}},hidden:oe,readOnly:Dt,onClear:Ue},it.createElement(Me,(0,te.Z)({},$t,{autoSize:gt,maxLength:rt,onKeyDown:Vn,onChange:zi,onFocus:vi,onBlur:Di,onCompositionStart:Sn,onCompositionEnd:ti,className:Ve()(se==null?void 0:se.textarea),style:(0,_e.Z)((0,_e.Z)({},ie==null?void 0:ie.textarea),{},{resize:ne==null?void 0:ne.resize}),disabled:z,prefixCls:ze,onResize:Fi,ref:xi,readOnly:Dt})))}),ot=Fe,Ut=ot},6790:function(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return Bt}});var te=he(67711),Ke=he(26420),_e=he(98506),Xe=he(52873),ve=he(16886),me=he(33346),Oe=he(92310),Ve=he.n(Oe),we=he(29301),fe=he(70425),Ye=he(34280),pe=he(59301),it=he(4676),He=pe.forwardRef(function(ae,ne){var z=ae.height,oe=ae.offsetY,se=ae.offsetX,ie=ae.children,xe=ae.prefixCls,Ue=ae.onInnerResize,Ot=ae.innerProps,Dt=ae.rtl,gt=ae.extra,kt={},$t={display:"flex",flexDirection:"column"};return oe!==void 0&&(kt={height:z,position:"relative",overflow:"hidden"},$t=(0,_e.Z)((0,_e.Z)({},$t),{},(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({transform:"translateY(".concat(oe,"px)")},Dt?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:kt},pe.createElement(we.Z,{onResize:function(nn){var an=nn.offsetHeight;an&&Ue&&Ue()}},pe.createElement("div",(0,te.Z)({style:$t,className:Ve()((0,Xe.Z)({},"".concat(xe,"-holder-inner"),xe)),ref:ne},Ot),ie,gt)))});He.displayName="Filler";var Ce=He;function Ee(ae){var ne=ae.children,z=ae.setRef,oe=pe.useCallback(function(se){z(se)},[]);return pe.cloneElement(ne,{ref:oe})}function Se(ae,ne,z,oe,se,ie,xe,Ue){var Ot=Ue.getKey;return ae.slice(ne,z+1).map(function(Dt,gt){var kt=ne+gt,$t=xe(Dt,kt,{style:{width:oe},offsetX:se}),Gt=Ot(Dt);return pe.createElement(Ee,{key:Gt,setRef:function(an){return ie(Dt,an)}},$t)})}function Je(ae,ne,z,oe){var se=z-ae,ie=ne-z,xe=Math.min(se,ie)*2;if(oe<=xe){var Ue=Math.floor(oe/2);return oe%2?z+Ue+1:z-Ue}return se>ie?z-(oe-ie):z+(oe-se)}function lt(ae,ne,z){var oe=ae.length,se=ne.length,ie,xe;if(oe===0&&se===0)return null;oe<se?(ie=ae,xe=ne):(ie=ne,xe=ae);var Ue={__EMPTY_ITEM__:!0};function Ot(nn){return nn!==void 0?z(nn):Ue}for(var Dt=null,gt=Math.abs(oe-se)!==1,kt=0;kt<xe.length;kt+=1){var $t=Ot(ie[kt]),Gt=Ot(xe[kt]);if($t!==Gt){Dt=kt,gt=gt||$t!==Ot(xe[kt+1]);break}}return Dt===null?null:{index:Dt,multiple:gt}}function $e(ae,ne,z){var oe=pe.useState(ae),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ue=pe.useState(null),Ot=(0,ve.Z)(Ue,2),Dt=Ot[0],gt=Ot[1];return pe.useEffect(function(){var kt=lt(ie||[],ae||[],ne);(kt==null?void 0:kt.index)!==void 0&&(z==null||z(kt.index),gt(ae[kt.index])),xe(ae)},[ae]),[Dt]}var tt=he(16089),Te=(typeof navigator=="undefined"?"undefined":(0,Ke.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),dt=Te,ht=function(ae,ne,z,oe){var se=(0,pe.useRef)(!1),ie=(0,pe.useRef)(null);function xe(){clearTimeout(ie.current),se.current=!0,ie.current=setTimeout(function(){se.current=!1},50)}var Ue=(0,pe.useRef)({top:ae,bottom:ne,left:z,right:oe});return Ue.current.top=ae,Ue.current.bottom=ne,Ue.current.left=z,Ue.current.right=oe,function(Ot,Dt){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,kt=Ot?Dt<0&&Ue.current.left||Dt>0&&Ue.current.right:Dt<0&&Ue.current.top||Dt>0&&Ue.current.bottom;return gt&&kt?(clearTimeout(ie.current),se.current=!1):(!kt||se.current)&&xe(),!se.current&&kt}};function Vt(ae,ne,z,oe,se,ie,xe){var Ue=(0,pe.useRef)(0),Ot=(0,pe.useRef)(null),Dt=(0,pe.useRef)(null),gt=(0,pe.useRef)(!1),kt=ht(ne,z,oe,se);function $t(ln,kn){if(tt.Z.cancel(Ot.current),!kt(!1,kn)){var st=ln;if(!st._virtualHandled)st._virtualHandled=!0;else return;Ue.current+=kn,Dt.current=kn,dt||st.preventDefault(),Ot.current=(0,tt.Z)(function(){var An=gt.current?10:1;xe(Ue.current*An,!1),Ue.current=0})}}function Gt(ln,kn){xe(kn,!0),dt||ln.preventDefault()}var nn=(0,pe.useRef)(null),an=(0,pe.useRef)(null);function _t(ln){if(ae){tt.Z.cancel(an.current),an.current=(0,tt.Z)(function(){nn.current=null},2);var kn=ln.deltaX,st=ln.deltaY,An=ln.shiftKey,Rt=kn,sn=st;(nn.current==="sx"||!nn.current&&An&&st&&!kn)&&(Rt=st,sn=0,nn.current="sx");var wn=Math.abs(Rt),Jn=Math.abs(sn);nn.current===null&&(nn.current=ie&&wn>Jn?"x":"y"),nn.current==="y"?$t(ln,sn):Gt(ln,Rt)}}function En(ln){ae&&(gt.current=ln.detail===Dt.current)}return[_t,En]}function Be(ae,ne,z,oe){var se=pe.useMemo(function(){return[new Map,[]]},[ae,z.id,oe]),ie=(0,ve.Z)(se,2),xe=ie[0],Ue=ie[1],Ot=function(gt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gt,$t=xe.get(gt),Gt=xe.get(kt);if($t===void 0||Gt===void 0)for(var nn=ae.length,an=Ue.length;an<nn;an+=1){var _t,En=ae[an],ln=ne(En);xe.set(ln,an);var kn=(_t=z.get(ln))!==null&&_t!==void 0?_t:oe;if(Ue[an]=(Ue[an-1]||0)+kn,ln===gt&&($t=an),ln===kt&&(Gt=an),$t!==void 0&&Gt!==void 0)break}return{top:Ue[$t-1]||0,bottom:Ue[Gt]}};return Ot}var Ge=he(42573),nt=he(58698),Me=function(){function ae(){(0,Ge.Z)(this,ae),(0,Xe.Z)(this,"maps",void 0),(0,Xe.Z)(this,"id",0),(0,Xe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,nt.Z)(ae,[{key:"set",value:function(z,oe){this.diffRecords.set(z,this.maps[z]),this.maps[z]=oe,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}(),Qe=Me;function Fe(ae){var ne=parseFloat(ae);return isNaN(ne)?0:ne}function ot(ae,ne,z){var oe=pe.useState(0),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ue=(0,pe.useRef)(new Map),Ot=(0,pe.useRef)(new Qe),Dt=(0,pe.useRef)(0);function gt(){Dt.current+=1}function kt(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;gt();var nn=function(){var En=!1;Ue.current.forEach(function(ln,kn){if(ln&&ln.offsetParent){var st=ln.offsetHeight,An=getComputedStyle(ln),Rt=An.marginTop,sn=An.marginBottom,wn=Fe(Rt),Jn=Fe(sn),jt=st+wn+Jn;Ot.current.get(kn)!==jt&&(Ot.current.set(kn,jt),En=!0)}}),En&&xe(function(ln){return ln+1})};if(Gt)nn();else{Dt.current+=1;var an=Dt.current;Promise.resolve().then(function(){an===Dt.current&&nn()})}}function $t(Gt,nn){var an=ae(Gt),_t=Ue.current.get(an);nn?(Ue.current.set(an,nn),kt()):Ue.current.delete(an),!_t!=!nn&&(nn?ne==null||ne(Gt):z==null||z(Gt))}return(0,pe.useEffect)(function(){return gt},[]),[$t,kt,Ot.current,ie]}var Ut=14/15;function Et(ae,ne,z){var oe=(0,pe.useRef)(!1),se=(0,pe.useRef)(0),ie=(0,pe.useRef)(0),xe=(0,pe.useRef)(null),Ue=(0,pe.useRef)(null),Ot,Dt=function(Gt){if(oe.current){var nn=Math.ceil(Gt.touches[0].pageX),an=Math.ceil(Gt.touches[0].pageY),_t=se.current-nn,En=ie.current-an,ln=Math.abs(_t)>Math.abs(En);ln?se.current=nn:ie.current=an;var kn=z(ln,ln?_t:En,!1,Gt);kn&&Gt.preventDefault(),clearInterval(Ue.current),kn&&(Ue.current=setInterval(function(){ln?_t*=Ut:En*=Ut;var st=Math.floor(ln?_t:En);(!z(ln,st,!0)||Math.abs(st)<=.1)&&clearInterval(Ue.current)},16))}},gt=function(){oe.current=!1,Ot()},kt=function(Gt){Ot(),Gt.touches.length===1&&!oe.current&&(oe.current=!0,se.current=Math.ceil(Gt.touches[0].pageX),ie.current=Math.ceil(Gt.touches[0].pageY),xe.current=Gt.target,xe.current.addEventListener("touchmove",Dt,{passive:!1}),xe.current.addEventListener("touchend",gt,{passive:!0}))};Ot=function(){xe.current&&(xe.current.removeEventListener("touchmove",Dt),xe.current.removeEventListener("touchend",gt))},(0,Ye.Z)(function(){return ae&&ne.current.addEventListener("touchstart",kt,{passive:!0}),function(){var $t;($t=ne.current)===null||$t===void 0||$t.removeEventListener("touchstart",kt),Ot(),clearInterval(Ue.current)}},[ae])}function hn(ae){return Math.floor(Math.pow(ae,.5))}function Mt(ae,ne){var z="touches"in ae?ae.touches[0]:ae;return z[ne?"pageX":"pageY"]-window[ne?"scrollX":"scrollY"]}function ge(ae,ne,z){pe.useEffect(function(){var oe=ne.current;if(ae&&oe){var se=!1,ie,xe,Ue=function(){tt.Z.cancel(ie)},Ot=function $t(){Ue(),ie=(0,tt.Z)(function(){z(xe),$t()})},Dt=function(Gt){if(!(Gt.target.draggable||Gt.button!==0)){var nn=Gt;nn._virtualHandled||(nn._virtualHandled=!0,se=!0)}},gt=function(){se=!1,Ue()},kt=function(Gt){if(se){var nn=Mt(Gt,!1),an=oe.getBoundingClientRect(),_t=an.top,En=an.bottom;if(nn<=_t){var ln=_t-nn;xe=-hn(ln),Ot()}else if(nn>=En){var kn=nn-En;xe=hn(kn),Ot()}else Ue()}};return oe.addEventListener("mousedown",Dt),oe.ownerDocument.addEventListener("mouseup",gt),oe.ownerDocument.addEventListener("mousemove",kt),function(){oe.removeEventListener("mousedown",Dt),oe.ownerDocument.removeEventListener("mouseup",gt),oe.ownerDocument.removeEventListener("mousemove",kt),Ue()}}},[ae])}var de=10;function ft(ae,ne,z,oe,se,ie,xe,Ue){var Ot=pe.useRef(),Dt=pe.useState(null),gt=(0,ve.Z)(Dt,2),kt=gt[0],$t=gt[1];return(0,Ye.Z)(function(){if(kt&&kt.times<de){if(!ae.current){$t(function(bi){return(0,_e.Z)({},bi)});return}ie();var Gt=kt.targetAlign,nn=kt.originAlign,an=kt.index,_t=kt.offset,En=ae.current.clientHeight,ln=!1,kn=Gt,st=null;if(En){for(var An=Gt||nn,Rt=0,sn=0,wn=0,Jn=Math.min(ne.length-1,an),jt=0;jt<=Jn;jt+=1){var Fn=se(ne[jt]);sn=Rt;var xi=z.get(Fn);wn=sn+(xi===void 0?oe:xi),Rt=wn}for(var hi=An==="top"?_t:En-_t,_i=Jn;_i>=0;_i-=1){var Ri=se(ne[_i]),Ai=z.get(Ri);if(Ai===void 0){ln=!0;break}if(hi-=Ai,hi<=0)break}switch(An){case"top":st=sn-_t;break;case"bottom":st=wn-En+_t;break;default:{var Bi=ae.current.scrollTop,li=Bi+En;sn<Bi?kn="top":wn>li&&(kn="bottom")}}st!==null&&xe(st),st!==kt.lastTop&&(ln=!0)}ln&&$t((0,_e.Z)((0,_e.Z)({},kt),{},{times:kt.times+1,targetAlign:kn,lastTop:st}))}},[kt,ae.current]),function(Gt){if(Gt==null){Ue();return}if(tt.Z.cancel(Ot.current),typeof Gt=="number")xe(Gt);else if(Gt&&(0,Ke.Z)(Gt)==="object"){var nn,an=Gt.align;"index"in Gt?nn=Gt.index:nn=ne.findIndex(function(ln){return se(ln)===Gt.key});var _t=Gt.offset,En=_t===void 0?0:_t;$t({times:0,index:nn,offset:En,originAlign:an})}}}var qt=pe.forwardRef(function(ae,ne){var z=ae.prefixCls,oe=ae.rtl,se=ae.scrollOffset,ie=ae.scrollRange,xe=ae.onStartMove,Ue=ae.onStopMove,Ot=ae.onScroll,Dt=ae.horizontal,gt=ae.spinSize,kt=ae.containerSize,$t=ae.style,Gt=ae.thumbStyle,nn=ae.showScrollBar,an=pe.useState(!1),_t=(0,ve.Z)(an,2),En=_t[0],ln=_t[1],kn=pe.useState(null),st=(0,ve.Z)(kn,2),An=st[0],Rt=st[1],sn=pe.useState(null),wn=(0,ve.Z)(sn,2),Jn=wn[0],jt=wn[1],Fn=!oe,xi=pe.useRef(),hi=pe.useRef(),_i=pe.useState(nn),Ri=(0,ve.Z)(_i,2),Ai=Ri[0],Bi=Ri[1],li=pe.useRef(),bi=function(){nn===!0||nn===!1||(clearTimeout(li.current),Bi(!0),li.current=setTimeout(function(){Bi(!1)},3e3))},Si=ie-kt||0,ni=kt-gt||0,yi=pe.useMemo(function(){if(se===0||Si===0)return 0;var Ei=se/Si;return Ei*ni},[se,Si,ni]),cn=function(ii){ii.stopPropagation(),ii.preventDefault()},xn=pe.useRef({top:yi,dragging:En,pageY:An,startTop:Jn});xn.current={top:yi,dragging:En,pageY:An,startTop:Jn};var Sn=function(ii){ln(!0),Rt(Mt(ii,Dt)),jt(xn.current.top),xe(),ii.stopPropagation(),ii.preventDefault()};pe.useEffect(function(){var Ei=function(zt){zt.preventDefault()},ii=xi.current,ui=hi.current;return ii.addEventListener("touchstart",Ei,{passive:!1}),ui.addEventListener("touchstart",Sn,{passive:!1}),function(){ii.removeEventListener("touchstart",Ei),ui.removeEventListener("touchstart",Sn)}},[]);var ti=pe.useRef();ti.current=Si;var zi=pe.useRef();zi.current=ni,pe.useEffect(function(){if(En){var Ei,ii=function(zt){var at=xn.current,vn=at.dragging,ri=at.pageY,ci=at.startTop;tt.Z.cancel(Ei);var Ae=xi.current.getBoundingClientRect(),Pe=kt/(Dt?Ae.width:Ae.height);if(vn){var Lt=(Mt(zt,Dt)-ri)*Pe,pt=ci;!Fn&&Dt?pt-=Lt:pt+=Lt;var Re=ti.current,yt=zi.current,Xt=yt?pt/yt:0,Wt=Math.ceil(Xt*Re);Wt=Math.max(Wt,0),Wt=Math.min(Wt,Re),Ei=(0,tt.Z)(function(){Ot(Wt,Dt)})}},ui=function(){ln(!1),Ue()};return window.addEventListener("mousemove",ii,{passive:!0}),window.addEventListener("touchmove",ii,{passive:!0}),window.addEventListener("mouseup",ui,{passive:!0}),window.addEventListener("touchend",ui,{passive:!0}),function(){window.removeEventListener("mousemove",ii),window.removeEventListener("touchmove",ii),window.removeEventListener("mouseup",ui),window.removeEventListener("touchend",ui),tt.Z.cancel(Ei)}}},[En]),pe.useEffect(function(){return bi(),function(){clearTimeout(li.current)}},[se]),pe.useImperativeHandle(ne,function(){return{delayHidden:bi}});var Vn="".concat(z,"-scrollbar"),vi={position:"absolute",visibility:Ai?null:"hidden"},Di={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Dt?(Object.assign(vi,{height:8,left:0,right:0,bottom:0}),Object.assign(Di,(0,Xe.Z)({height:"100%",width:gt},Fn?"left":"right",yi))):(Object.assign(vi,(0,Xe.Z)({width:8,top:0,bottom:0},Fn?"right":"left",0)),Object.assign(Di,{width:"100%",height:gt,top:yi})),pe.createElement("div",{ref:xi,className:Ve()(Vn,(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},"".concat(Vn,"-horizontal"),Dt),"".concat(Vn,"-vertical"),!Dt),"".concat(Vn,"-visible"),Ai)),style:(0,_e.Z)((0,_e.Z)({},vi),$t),onMouseDown:cn,onMouseMove:bi},pe.createElement("div",{ref:hi,className:Ve()("".concat(Vn,"-thumb"),(0,Xe.Z)({},"".concat(Vn,"-thumb-moving"),En)),style:(0,_e.Z)((0,_e.Z)({},Di),Gt),onMouseDown:Sn}))}),xt=qt,Ne=20;function rt(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/ne*ae;return isNaN(z)&&(z=0),z=Math.max(z,Ne),Math.floor(z)}var ct=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],on=[],vt={overflowY:"auto",overflowAnchor:"none"};function Pt(ae,ne){var z=ae.prefixCls,oe=z===void 0?"rc-virtual-list":z,se=ae.className,ie=ae.height,xe=ae.itemHeight,Ue=ae.fullHeight,Ot=Ue===void 0?!0:Ue,Dt=ae.style,gt=ae.data,kt=ae.children,$t=ae.itemKey,Gt=ae.virtual,nn=ae.direction,an=ae.scrollWidth,_t=ae.component,En=_t===void 0?"div":_t,ln=ae.onScroll,kn=ae.onVirtualScroll,st=ae.onVisibleChange,An=ae.innerProps,Rt=ae.extraRender,sn=ae.styles,wn=ae.showScrollBar,Jn=wn===void 0?"optional":wn,jt=(0,me.Z)(ae,ct),Fn=pe.useCallback(function(bt){return typeof $t=="function"?$t(bt):bt==null?void 0:bt[$t]},[$t]),xi=ot(Fn,null,null),hi=(0,ve.Z)(xi,4),_i=hi[0],Ri=hi[1],Ai=hi[2],Bi=hi[3],li=!!(Gt!==!1&&ie&&xe),bi=pe.useMemo(function(){return Object.values(Ai.maps).reduce(function(bt,Tt){return bt+Tt},0)},[Ai.id,Ai.maps]),Si=li&&gt&&(Math.max(xe*gt.length,bi)>ie||!!an),ni=nn==="rtl",yi=Ve()(oe,(0,Xe.Z)({},"".concat(oe,"-rtl"),ni),se),cn=gt||on,xn=(0,pe.useRef)(),Sn=(0,pe.useRef)(),ti=(0,pe.useRef)(),zi=(0,pe.useState)(0),Vn=(0,ve.Z)(zi,2),vi=Vn[0],Di=Vn[1],Ei=(0,pe.useState)(0),ii=(0,ve.Z)(Ei,2),ui=ii[0],Fi=ii[1],zt=(0,pe.useState)(!1),at=(0,ve.Z)(zt,2),vn=at[0],ri=at[1],ci=function(){ri(!0)},Ae=function(){ri(!1)},Pe={getKey:Fn};function Lt(bt){Di(function(Tt){var et;typeof bt=="function"?et=bt(Tt):et=bt;var Ze=bn(et);return xn.current.scrollTop=Ze,Ze})}var pt=(0,pe.useRef)({start:0,end:cn.length}),Re=(0,pe.useRef)(),yt=$e(cn,Fn),Xt=(0,ve.Z)(yt,1),Wt=Xt[0];Re.current=Wt;var tn=pe.useMemo(function(){if(!li)return{scrollHeight:void 0,start:0,end:cn.length-1,offset:void 0};if(!Si){var bt;return{scrollHeight:((bt=Sn.current)===null||bt===void 0?void 0:bt.offsetHeight)||0,start:0,end:cn.length-1,offset:void 0}}for(var Tt=0,et,Ze,mt,Ft=cn.length,gn=0;gn<Ft;gn+=1){var zn=cn[gn],oi=Fn(zn),mi=Ai.get(oi),fi=Tt+(mi===void 0?xe:mi);fi>=vi&&et===void 0&&(et=gn,Ze=Tt),fi>vi+ie&&mt===void 0&&(mt=gn),Tt=fi}return et===void 0&&(et=0,Ze=0,mt=Math.ceil(ie/xe)),mt===void 0&&(mt=cn.length-1),mt=Math.min(mt+1,cn.length-1),{scrollHeight:Tt,start:et,end:mt,offset:Ze}},[Si,li,vi,cn,Bi,ie]),We=tn.scrollHeight,en=tn.start,St=tn.end,_n=tn.offset;pt.current.start=en,pt.current.end=St,pe.useLayoutEffect(function(){var bt=Ai.getRecord();if(bt.size===1){var Tt=Array.from(bt.keys())[0],et=bt.get(Tt),Ze=cn[en];if(Ze&&et===void 0){var mt=Fn(Ze);if(mt===Tt){var Ft=Ai.get(Tt),gn=Ft-xe;Lt(function(zn){return zn+gn})}}}Ai.resetRecord()},[We]);var Jt=pe.useState({width:0,height:ie}),De=(0,ve.Z)(Jt,2),Le=De[0],ye=De[1],ut=function(Tt){ye({width:Tt.offsetWidth,height:Tt.offsetHeight})},Cn=(0,pe.useRef)(),Hn=(0,pe.useRef)(),rn=pe.useMemo(function(){return rt(Le.width,an)},[Le.width,an]),At=pe.useMemo(function(){return rt(Le.height,We)},[Le.height,We]),Ie=We-ie,un=(0,pe.useRef)(Ie);un.current=Ie;function bn(bt){var Tt=bt;return Number.isNaN(un.current)||(Tt=Math.min(Tt,un.current)),Tt=Math.max(Tt,0),Tt}var Ln=vi<=0,On=vi>=Ie,qn=ui<=0,Kt=ui>=an,Bn=ht(Ln,On,qn,Kt),Wn=function(){return{x:ni?-ui:ui,y:vi}},Rn=(0,pe.useRef)(Wn()),Zt=(0,fe.zX)(function(bt){if(kn){var Tt=(0,_e.Z)((0,_e.Z)({},Wn()),bt);(Rn.current.x!==Tt.x||Rn.current.y!==Tt.y)&&(kn(Tt),Rn.current=Tt)}});function dn(bt,Tt){var et=bt;Tt?((0,it.flushSync)(function(){Fi(et)}),Zt()):Lt(et)}function Pn(bt){var Tt=bt.currentTarget.scrollTop;Tt!==vi&&Lt(Tt),ln==null||ln(bt),Zt()}var Zn=function(Tt){var et=Tt,Ze=an?an-Le.width:0;return et=Math.max(et,0),et=Math.min(et,Ze),et},jn=(0,fe.zX)(function(bt,Tt){Tt?((0,it.flushSync)(function(){Fi(function(et){var Ze=et+(ni?-bt:bt);return Zn(Ze)})}),Zt()):Lt(function(et){var Ze=et+bt;return Ze})}),Nn=Vt(li,Ln,On,qn,Kt,!!an,jn),Mn=(0,ve.Z)(Nn,2),$n=Mn[0],mn=Mn[1];Et(li,xn,function(bt,Tt,et,Ze){var mt=Ze;return Bn(bt,Tt,et)?!1:!mt||!mt._virtualHandled?(mt&&(mt._virtualHandled=!0),$n({preventDefault:function(){},deltaX:bt?Tt:0,deltaY:bt?0:Tt}),!0):!1}),ge(Si,xn,function(bt){Lt(function(Tt){return Tt+bt})}),(0,Ye.Z)(function(){function bt(et){var Ze=Ln&&et.detail<0,mt=On&&et.detail>0;li&&!Ze&&!mt&&et.preventDefault()}var Tt=xn.current;return Tt.addEventListener("wheel",$n,{passive:!1}),Tt.addEventListener("DOMMouseScroll",mn,{passive:!0}),Tt.addEventListener("MozMousePixelScroll",bt,{passive:!1}),function(){Tt.removeEventListener("wheel",$n),Tt.removeEventListener("DOMMouseScroll",mn),Tt.removeEventListener("MozMousePixelScroll",bt)}},[li,Ln,On]),(0,Ye.Z)(function(){if(an){var bt=Zn(ui);Fi(bt),Zt({x:bt})}},[Le.width,an]);var di=function(){var Tt,et;(Tt=Cn.current)===null||Tt===void 0||Tt.delayHidden(),(et=Hn.current)===null||et===void 0||et.delayHidden()},Gn=ft(xn,cn,Ai,xe,Fn,function(){return Ri(!0)},Lt,di);pe.useImperativeHandle(ne,function(){return{nativeElement:ti.current,getScrollInfo:Wn,scrollTo:function(Tt){function et(Ze){return Ze&&(0,Ke.Z)(Ze)==="object"&&("left"in Ze||"top"in Ze)}et(Tt)?(Tt.left!==void 0&&Fi(Zn(Tt.left)),Gn(Tt.top)):Gn(Tt)}}}),(0,Ye.Z)(function(){if(st){var bt=cn.slice(en,St+1);st(bt,cn)}},[en,St,cn]);var Yt=Be(cn,Fn,Ai,xe),Xn=Rt==null?void 0:Rt({start:en,end:St,virtual:Si,offsetX:ui,offsetY:_n,rtl:ni,getSize:Yt}),Un=Se(cn,en,St,an,ui,_i,kt,Pe),wi=null;ie&&(wi=(0,_e.Z)((0,Xe.Z)({},Ot?"height":"maxHeight",ie),vt),li&&(wi.overflowY="hidden",an&&(wi.overflowX="hidden"),vn&&(wi.pointerEvents="none")));var In={};return ni&&(In.dir="rtl"),pe.createElement("div",(0,te.Z)({ref:ti,style:(0,_e.Z)((0,_e.Z)({},Dt),{},{position:"relative"}),className:yi},In,jt),pe.createElement(we.Z,{onResize:ut},pe.createElement(En,{className:"".concat(oe,"-holder"),style:wi,ref:xn,onScroll:Pn,onMouseEnter:di},pe.createElement(Ce,{prefixCls:oe,height:We,offsetX:ui,offsetY:_n,scrollWidth:an,onInnerResize:Ri,ref:Sn,innerProps:An,rtl:ni,extra:Xn},Un))),Si&&We>ie&&pe.createElement(xt,{ref:Cn,prefixCls:oe,scrollOffset:vi,scrollRange:We,rtl:ni,onScroll:dn,onStartMove:ci,onStopMove:Ae,spinSize:At,containerSize:Le.height,style:sn==null?void 0:sn.verticalScrollBar,thumbStyle:sn==null?void 0:sn.verticalScrollBarThumb,showScrollBar:Jn}),Si&&an>Le.width&&pe.createElement(xt,{ref:Hn,prefixCls:oe,scrollOffset:ui,scrollRange:an,rtl:ni,onScroll:dn,onStartMove:ci,onStopMove:Ae,spinSize:rn,containerSize:Le.width,horizontal:!0,style:sn==null?void 0:sn.horizontalScrollBar,thumbStyle:sn==null?void 0:sn.horizontalScrollBarThumb,showScrollBar:Jn}))}var ze=pe.forwardRef(Pt);ze.displayName="List";var wt=ze,Bt=wt},93314:function(It){"use strict";It.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(It,Ht,he){"use strict";he.d(Ht,{Z:function(){return Ve}});const te=we=>typeof we=="object"&&we!=null&&we.nodeType===1,Ke=(we,fe)=>(!fe||we!=="hidden")&&we!=="visible"&&we!=="clip",_e=(we,fe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Ye=getComputedStyle(we,null);return Ke(Ye.overflowY,fe)||Ke(Ye.overflowX,fe)||(pe=>{const it=(He=>{if(!He.ownerDocument||!He.ownerDocument.defaultView)return null;try{return He.ownerDocument.defaultView.frameElement}catch(Ce){return null}})(pe);return!!it&&(it.clientHeight<pe.scrollHeight||it.clientWidth<pe.scrollWidth)})(we)}return!1},Xe=(we,fe,Ye,pe,it,He,Ce,Ee)=>He<we&&Ce>fe||He>we&&Ce<fe?0:He<=we&&Ee<=Ye||Ce>=fe&&Ee>=Ye?He-we-pe:Ce>fe&&Ee<Ye||He<we&&Ee>Ye?Ce-fe+it:0,ve=we=>{const fe=we.parentElement;return fe==null?we.getRootNode().host||null:fe},me=(we,fe)=>{var Ye,pe,it,He;if(typeof document=="undefined")return[];const{scrollMode:Ce,block:Ee,inline:Se,boundary:Je,skipOverflowHiddenElements:lt}=fe,$e=typeof Je=="function"?Je:xt=>xt!==Je;if(!te(we))throw new TypeError("Invalid target");const tt=document.scrollingElement||document.documentElement,Te=[];let dt=we;for(;te(dt)&&$e(dt);){if(dt=ve(dt),dt===tt){Te.push(dt);break}dt!=null&&dt===document.body&&_e(dt)&&!_e(document.documentElement)||dt!=null&&_e(dt,lt)&&Te.push(dt)}const ht=(pe=(Ye=window.visualViewport)==null?void 0:Ye.width)!=null?pe:innerWidth,Vt=(He=(it=window.visualViewport)==null?void 0:it.height)!=null?He:innerHeight,{scrollX:Be,scrollY:Ge}=window,{height:nt,width:Me,top:Qe,right:Fe,bottom:ot,left:Ut}=we.getBoundingClientRect(),{top:Et,right:hn,bottom:Mt,left:ge}=(xt=>{const Ne=window.getComputedStyle(xt);return{top:parseFloat(Ne.scrollMarginTop)||0,right:parseFloat(Ne.scrollMarginRight)||0,bottom:parseFloat(Ne.scrollMarginBottom)||0,left:parseFloat(Ne.scrollMarginLeft)||0}})(we);let de=Ee==="start"||Ee==="nearest"?Qe-Et:Ee==="end"?ot+Mt:Qe+nt/2-Et+Mt,ft=Se==="center"?Ut+Me/2-ge+hn:Se==="end"?Fe+hn:Ut-ge;const qt=[];for(let xt=0;xt<Te.length;xt++){const Ne=Te[xt],{height:rt,width:ct,top:on,right:vt,bottom:Pt,left:ze}=Ne.getBoundingClientRect();if(Ce==="if-needed"&&Qe>=0&&Ut>=0&&ot<=Vt&&Fe<=ht&&(Ne===tt&&!_e(Ne)||Qe>=on&&ot<=Pt&&Ut>=ze&&Fe<=vt))return qt;const wt=getComputedStyle(Ne),Bt=parseInt(wt.borderLeftWidth,10),ae=parseInt(wt.borderTopWidth,10),ne=parseInt(wt.borderRightWidth,10),z=parseInt(wt.borderBottomWidth,10);let oe=0,se=0;const ie="offsetWidth"in Ne?Ne.offsetWidth-Ne.clientWidth-Bt-ne:0,xe="offsetHeight"in Ne?Ne.offsetHeight-Ne.clientHeight-ae-z:0,Ue="offsetWidth"in Ne?Ne.offsetWidth===0?0:ct/Ne.offsetWidth:0,Ot="offsetHeight"in Ne?Ne.offsetHeight===0?0:rt/Ne.offsetHeight:0;if(tt===Ne)oe=Ee==="start"?de:Ee==="end"?de-Vt:Ee==="nearest"?Xe(Ge,Ge+Vt,Vt,ae,z,Ge+de,Ge+de+nt,nt):de-Vt/2,se=Se==="start"?ft:Se==="center"?ft-ht/2:Se==="end"?ft-ht:Xe(Be,Be+ht,ht,Bt,ne,Be+ft,Be+ft+Me,Me),oe=Math.max(0,oe+Ge),se=Math.max(0,se+Be);else{oe=Ee==="start"?de-on-ae:Ee==="end"?de-Pt+z+xe:Ee==="nearest"?Xe(on,Pt,rt,ae,z+xe,de,de+nt,nt):de-(on+rt/2)+xe/2,se=Se==="start"?ft-ze-Bt:Se==="center"?ft-(ze+ct/2)+ie/2:Se==="end"?ft-vt+ne+ie:Xe(ze,vt,ct,Bt,ne+ie,ft,ft+Me,Me);const{scrollLeft:Dt,scrollTop:gt}=Ne;oe=Ot===0?0:Math.max(0,Math.min(gt+oe/Ot,Ne.scrollHeight-rt/Ot+xe)),se=Ue===0?0:Math.max(0,Math.min(Dt+se/Ue,Ne.scrollWidth-ct/Ue+ie)),de+=gt-oe,ft+=Dt-se}qt.push({el:Ne,top:oe,left:se})}return qt},Oe=we=>we===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ve(we,fe){if(!we.isConnected||!(it=>{let He=it;for(;He&&He.parentNode;){if(He.parentNode===document)return!0;He=He.parentNode instanceof ShadowRoot?He.parentNode.host:He.parentNode}return!1})(we))return;const Ye=(it=>{const He=window.getComputedStyle(it);return{top:parseFloat(He.scrollMarginTop)||0,right:parseFloat(He.scrollMarginRight)||0,bottom:parseFloat(He.scrollMarginBottom)||0,left:parseFloat(He.scrollMarginLeft)||0}})(we);if((it=>typeof it=="object"&&typeof it.behavior=="function")(fe))return fe.behavior(me(we,fe));const pe=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:it,top:He,left:Ce}of me(we,Oe(fe))){const Ee=He-Ye.top+Ye.bottom,Se=Ce-Ye.left+Ye.right;it.scroll({top:Ee,left:Se,behavior:pe})}}}}]);